/* The Next strip (13 Oct 2026, chat NEXT STRIP, his notes via BUPA HUB and
   in chat): locked to 3 Split, <html data-next="split"> (the head script).
   The Today, Logo and Hiring options left on 20 Oct (chat FRAME SPLIT,
   backup _before-split-5/). The rules sit under :root[data-next="split"]
   [data-part="next"].cs-next, one step above look A's :is() block, so
   nothing needs !important. Tokens only; oversize steps are marked mock-ok.
   26 Oct (his picks in chat VA CLOSE, VIRGIN HUB): the next study runs full
   width with its logo, name and tagline inside on the left, a soft shade,
   the lime button; the lime Hiring tile left and the ask is one quiet line
   in the foot. */

/* The real marks, hidden in Today. Dark or blue wordmarks go white on ink
   (data-tone="mono"); Virgin's red mark, the Token Exporter icon and his
   own mark keep their colours. */
.cs-next-logo { display: none; }
.cs-next-logo img { display: block; width: auto; max-width: 100%; height: 100%; }
.cs-next-logo[data-tone="mono"] img { filter: brightness(0) invert(1); }

/* No widows or orphans (his rule, 13 Oct): balanced poster lines, pretty
   wrapping for the rest, every option. */
[data-part="next"].cs-next .cs-next-name { text-wrap: balance; }
[data-part="next"].cs-next :is(.cs-next-title, .cs-next-cta, .cs-ask) { text-wrap: pretty; }

/* The foot (his note: All work in the corner repeated the header): the
   quiet ask, then Back to top. */
[data-part="next"].cs-next .cs-foot { align-items: center; }
.cs-top { display: inline-flex; align-items: center; gap: var(--space-200); margin-left: auto; }
.cs-top svg { width: 16px; height: 16px; }
/* FULL (26 Oct, his pick 2 in chat VA CLOSE): one column, the next study
   full width on its own cover, logo, name and tagline inside on the left.
   The band is the page's own ground; the cover keeps its ink shade, so its
   words stay light. Kicker to card is the label step; card to foot keeps
   the var(--space-800) the cards above sit apart. */
:root[data-next="split"] [data-part="next"].cs-next {
  /* --nx-shade: the shade behind the card's words, a navy made from Bupa's own dark blue (his pick 27 Oct, row nx; was the neutral brand ink) */
  & { background: var(--color-bg); color: var(--color-text-primary); border-top: var(--border-hairline); --nx-shade: color-mix(in oklab, var(--ext-brand-bupa-blue-dark) 45%, var(--brand-ink)); }
  .cs-ask { display: block; margin: 0; }
  & > .cs-wrap { display: grid; grid-template-columns: minmax(0, 1fr); }
  .cs-next-kicker { justify-self: start; margin-bottom: var(--space-300); color: var(--color-text-tertiary); }
  .cs-next-link { position: relative; display: flex; flex-direction: column; justify-content: flex-end; margin-top: 0; border-radius: var(--radius-lg); overflow: hidden; isolation: isolate; color: var(--color-on-ink-primary); }
  .cs-next-img { position: absolute; inset: 0; z-index: -1; border-radius: 0; }
  .cs-next-img img { height: 100%; aspect-ratio: auto; }
  /* His preset "Right" from chat CARD ART: the wide art slides right, no zoom. */
  .cs-next-img img[data-pos="right"] { object-position: 82% 50%; } /* lint-ok: his tuner value, not a scale value */
  .cs-next-img::after { content: ""; position: absolute; inset: 0; }
  .cs-next-logo { display: block; margin-bottom: var(--space-400); }
  .cs-next-title { font-size: var(--size-lg); color: var(--color-on-ink-emphasis); max-width: 28ch; }
  /* Read the case study is the site's primary button (his pick 2, lime). */
  .cs-next-cta { min-height: var(--touch-target-min); padding: var(--btn-pad-y) var(--btn-pad-x); border-radius: var(--btn-radius); background: var(--btn-primary-bg); color: var(--btn-primary-fg); font-size: var(--btn-font-size); font-weight: var(--btn-font-weight); line-height: 1; transition: var(--btn-transition); }
  /* The hover lands on the button, never on the name. */
  .cs-next-link:hover .cs-next-name { text-decoration: none; }
  .cs-next-link:is(:hover, :focus-visible) .cs-next-cta .cta-t { text-decoration: underline; text-underline-offset: .2em; }
  .cs-foot { margin-top: var(--space-800); color: var(--color-text-secondary); border-top: var(--border-hairline); }
  .cs-foot a { color: var(--color-text-primary); }
}
/* Tablet and up: the card's words sit on the cover, over the soft shade
   (his pick 2: one long smooth fade with no hard end). */
@media (min-width: 768px) {
  :root[data-next="split"] [data-part="next"].cs-next {
    .cs-next-link { min-height: clamp(400px, 58svh, 620px); padding: var(--space-800); align-items: flex-start; } /* lint-ok: 400px and 620px are the full card's floor and cap, as tested at 1280 */
    .cs-next-img::after { background: linear-gradient(to right, color-mix(in oklab, var(--nx-shade) 90%, transparent) 0%, color-mix(in oklab, var(--nx-shade) 86%, transparent) 24%, color-mix(in oklab, var(--nx-shade) 74%, transparent) 38%, color-mix(in oklab, var(--nx-shade) 52%, transparent) 52%, color-mix(in oklab, var(--nx-shade) 28%, transparent) 66%, color-mix(in oklab, var(--nx-shade) 10%, transparent) 80%, color-mix(in oklab, var(--nx-shade) 0%, transparent) 94%); }
    .cs-next-text { display: flex; flex-direction: column; align-items: flex-start; max-width: 34rem; }
    .cs-next-logo { height: clamp(3rem, 4.5vw, 4rem); margin-bottom: var(--space-500); } /* mock-ok: one step under the name */
    .cs-next-logo[data-shape="square"] { height: clamp(4.5rem, 7vw, 6rem); } /* mock-ok: square marks read small at the same height */
    .cs-next-name { font-size: clamp(3.5rem, 7.5vw, 6.5rem); } /* mock-ok: the name leads a full width card */
    .cs-next-title { font-size: var(--size-xl); max-width: 30ch; margin-top: var(--space-200); }
  }
}
@media (hover: hover) {
  /* With a pointer the button lifts instead of underlining. */
  :root[data-next="split"] [data-part="next"].cs-next .cs-next-link:hover .cs-next-cta { background: var(--btn-primary-bg-hover); color: var(--btn-primary-fg-hover); transform: translateY(-1px); } /* lint-ok: the site button's one pixel lift */
  :root[data-next="split"] [data-part="next"].cs-next .cs-next-link:hover .cs-next-cta .cta-t { text-decoration: none; }
}

/* PHONE (13 Oct, his note: the options reached him undesigned for phones,
   and 3 broke when it stacked). One reading order for every option: Next
   case study first, since the reader came to move on, then the foot. The next study is a card, its cover on top and its words on
   ink below, never words laid over a busy cover at this width. */
@media (max-width: 767.98px) {
  [data-part="next"].cs-next .cs-foot { flex-direction: column; align-items: flex-start; gap: var(--space-200); }
  [data-part="next"].cs-next .cs-top { margin-left: 0; }

  /* The full card becomes a card: cover on top, words on ink below. */
  :root[data-next="split"] [data-part="next"].cs-next {
    .cs-next-link { display: grid; min-height: 0; padding: 0; background: var(--nx-shade); }
    .cs-next-img { position: relative; inset: auto; z-index: auto; }
    .cs-next-img img { aspect-ratio: 16 / 9; height: auto; }
    /* At 16:9 his 82% cut the Outlook tile; 92% frames all six tiles (27 Oct). */
    .cs-next-img img[data-pos="right"] { object-position: 92% 50%; } /* lint-ok: framing value for the phone crop */
    .cs-next-img::after { content: none; }
    .cs-next-text { padding: var(--card-pad-compact); } /* 16, the compact card padding (27 Oct 2026, chat VA MOBILE PASS, his pick) */
    .cs-next-logo { height: var(--space-700); }
    .cs-next-logo[data-shape="square"] { height: var(--space-800); }
    .cs-next-name { font-size: clamp(2rem, 10vw, 2.75rem); } /* mock-ok: half the desktop tile's name */
  }

}

@media (prefers-reduced-motion: no-preference) {
  .cs-top svg { transition: transform var(--duration-base) var(--ease-emphasized); }
  .cs-top:hover svg { transform: translateY(calc(var(--space-100) * -1)); }
}
/* Tablets: the words reach 70% across the card at 768, past where the fade thins, and the glass art is pale there
   (white title measured 1.9:1). The shade holds further across until the desktop card's words sit inside it. */
@media (min-width: 768px) and (max-width: 1099.98px) {
  :root[data-next="split"] [data-part="next"].cs-next .cs-next-img::after { background: linear-gradient(to right, color-mix(in oklab, var(--nx-shade) 90%, transparent) 0%, color-mix(in oklab, var(--nx-shade) 86%, transparent) 40%, color-mix(in oklab, var(--nx-shade) 74%, transparent) 60%, color-mix(in oklab, var(--nx-shade) 52%, transparent) 76%, color-mix(in oklab, var(--nx-shade) 20%, transparent) 90%, color-mix(in oklab, var(--nx-shade) 0%, transparent) 100%); }
}
