/* Premium flow kit (owner 2026-12-03, retail pages). Loaded only where front matter has "fx: premium". Prefix fx-.
   Upgrades the story section, the rollout steps and the hero already on the page. Rules: SECTIONS.md "Premium flow". */
main { --fx: #236EB4; --fx-l: #8CC4F5; overflow-x: clip; }

/* ---------- hero ---------- */
.st-art[data-st-art] { overflow: visible; background: none; box-shadow: none; perspective: 1100px; }
.fx-clip { position: absolute; inset: 0; border-radius: 24px; overflow: hidden; isolation: isolate; background: var(--st-sky, #EAF2FB);
  box-shadow: 0 50px 90px -40px color-mix(in srgb, var(--fx) 55%, #0B1626), 0 2px 0 rgba(255, 255, 255, .7) inset; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.fx-clip > .st-l { position: absolute; inset: 0; width: 100%; height: 100%; will-change: transform; }
.fx-clip > .st-l svg { width: 100%; height: 100%; display: block; }
.fx-clip > .st-l:first-child { inset: -14% -4%; width: auto; height: auto; }
.st-art__chip { box-shadow: 0 24px 44px -18px rgba(11, 22, 38, .45); }

/* ---------- story: dark stage, flowchart on top, stacked scenes ---------- */
.sec.fx-stage { position: relative; padding: 104px 0 112px; color: #D5DFEC; isolation: isolate;
  background: radial-gradient(70% 420px at 82% 0, color-mix(in srgb, var(--fx) 55%, transparent), transparent 100%), linear-gradient(180deg, #0B1626, #10233B); }
.fx-stage > .wrap > .sec__head h2, .fx-stage > .wrap > .sec__head h2 * { color: #fff; }
.fx-stage > .wrap > .sec__head .answer { color: #D5DFEC; }
.fx-stage > .wrap > .sec__head a { color: #fff; }
main .fx-stage > .wrap > .sec__head .eyebrow { color: var(--fx-l); }
main .fx-stage > .wrap > .sec__head .eyebrow::before { background: var(--fx-l); }
main .fx-stage.sec > .wrap > p:not([class*="__"]), main .fx-stage.sec .sec__head > p[class$="-note"], main .fx-stage.sec .st-story__grid ~ * { color: #D5DFEC; }
.fx-stage > .wrap > p:not([class*="__"]) a { color: #fff; }
.fx-stage .st-story__grid { display: block; }
.fx-stage .st-rail { top: 68px; z-index: 20; display: flex; gap: 0; margin: 0 0 28px; padding: 18px 0 14px; background: transparent; overflow: visible; }
.fx-stage .st-rail::before { content: ""; position: absolute; inset: 0 -50vw; z-index: -1; background: #0E1D31; box-shadow: 0 18px 30px -22px #000; opacity: 0; transition: opacity .3s; }
.fx-stage.is-pinned .st-rail::before { opacity: 1; }
.fx-stage .st-rail li { flex: 1 1 0; min-width: 0; padding: 50px 6px 0; border-radius: 0; background: none; text-align: center; cursor: pointer;
  font: 600 14px/1.25 var(--font-ui); color: #A9B8CA; }
.fx-stage .st-rail li::before { left: 50%; top: 0; transform: translateX(-50%); width: 38px; height: 38px; border: 2px solid #3A516C; background: #10233B; color: #C6D3E2; font-size: 15px; z-index: 1; }
.fx-stage .st-rail li:nth-child(even)::before { top: 6px; }
.fx-stage .st-rail li.is-on { color: #fff; background: none; }
.fx-stage .st-rail li.is-on::before { border-color: #fff; background: var(--fx); color: #fff; box-shadow: 0 0 0 7px color-mix(in srgb, var(--fx-l) 26%, transparent); }
.fx-stage .st-rail li.is-done { color: #D5DFEC; }
.fx-stage .st-rail li.is-done::before { border-color: var(--fx-l); background: #10233B; color: var(--fx-l); }
.fx-stage .st-rail li:focus-visible { outline: 2px solid #fff; outline-offset: 4px; border-radius: 8px; }
.fx-line { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.fx-line path { fill: none; stroke-linecap: round; }
.fx-line .fx-base { stroke: #3A516C; stroke-width: 2; stroke-dasharray: 2 8; }
.fx-line .fx-run { stroke: var(--fx-l); stroke-width: 3; }
.fx-line .fx-dot { fill: #fff; stroke: var(--fx-l); stroke-width: 4; }

.fx-stage .st-scenes { display: block; }
.fx-stage .st-scene { grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 44px; min-height: 0; padding: 32px; margin: 0 0 28px; border: 0; border-radius: 26px;
  color: var(--text); box-shadow: 0 -18px 50px -22px rgba(0, 0, 0, .55); transform-origin: 50% 0; }
.fx-stage .st-scene__art { border-radius: 18px; box-shadow: 0 30px 50px -34px rgba(11, 22, 38, .6); }
.fx-stage .st-scene__k { color: var(--fx); }
.fx-stage .st-scene h3 { font-size: clamp(22px, 1rem + 1.3vw, 34px); line-height: 1.18; }
.fx-stage.fx-stack .st-scene { position: sticky; }
.fx-stage.fx-stack .st-scene::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: #0B1626; opacity: var(--fx-dim, 0); pointer-events: none; z-index: 6; }

/* ---------- rollout steps: drawn flow path ---------- */
.ks-roll.fx-roll { gap: 18px; padding: 6px 0 40px; }
.ks-roll.fx-roll::before, .ks-roll.fx-roll li::before, .ks-roll.fx-roll li::after { display: none; }
.fx-roll li { z-index: 1; }
.fx-roll i { width: 58px; height: 58px; font-size: 20px; border-color: var(--line); color: var(--muted); box-shadow: 0 0 0 8px #fff; transition: background .4s, color .4s, border-color .4s, box-shadow .4s; }
.sec--paper .fx-roll i { box-shadow: 0 0 0 8px var(--paper); }
.fx-roll li.is-hit i, .fx-roll li.is-hit:last-child i { background: var(--fx); border-color: var(--fx); color: #fff; }
.fx-roll .fx-base { stroke: #C3D0DF; }
.fx-roll .fx-run { stroke: var(--fx); }
.fx-roll .fx-dot { stroke: var(--fx); }
@media (min-width: 1101px) { .fx-roll li:nth-child(even) { top: 40px; } }

/* stage chips become an arrow flow */
.ks-stages li { border-radius: 0; padding: 10px 22px 10px 24px; margin-right: -8px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%); }
.ks-stages li:first-child { padding-left: 16px; clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); }

@media (max-width: 960px) {
  .sec.fx-stage { padding: 72px 0; }
  .fx-stage .st-rail { top: 64px; overflow-x: auto; padding: 14px 0 12px; scrollbar-width: none; }
  .fx-stage .st-rail::before { position: fixed; display: none; }
  .fx-stage .st-rail { margin-inline: calc(50% - 50vw); padding-inline: 20px; }
  .fx-stage.is-pinned .st-rail { background: #0E1D31; }
  .fx-stage .st-rail li { flex: 0 0 116px; }
  .fx-stage .st-rail li::before, .fx-stage .st-rail li:nth-child(even)::before { left: 50%; top: 2px; }
  .fx-stage .st-scene { grid-template-columns: minmax(0, 1fr); gap: 22px; padding: 18px; border-radius: 20px; margin-bottom: 18px; }
  .ks-roll.fx-roll { padding-bottom: 0; }
  .fx-roll i { width: 46px; height: 46px; font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) { .fx-line { display: none; } .fx-clip { transform: none !important; } }

/* ---------- page scale: more air, larger section titles ---------- */
@media (min-width: 961px) {
  main > .sec { padding-top: 108px; padding-bottom: 108px; }
  main > .sec > .wrap > .sec__head { max-width: 860px; margin-bottom: 48px; }
  main > .sec > .wrap > .sec__head h2 { font-size: clamp(34px, 1rem + 2vw, 46px); line-height: 1.12; letter-spacing: -.02em; text-wrap: balance; }
  main > .sec > .wrap > .sec__head .answer { max-width: 66ch; }
}

/* page notes inside the dark stage */
main .fx-stage.sec > .wrap > [class$="-note"], main .fx-stage.sec > .wrap > .sec__head > [class$="-note"] { background: #1B3350; border-color: #3A516C; color: #E3EBF4; }
main .fx-stage.sec > .wrap > [class$="-note"] * { color: inherit; }

/* shared cards, softer and borderless on premium pages */
main .ps-int__g, main .ks-areas > div { border: 0; border-radius: 20px; padding: 26px; background: color-mix(in srgb, var(--fx) 7%, #fff); box-shadow: none; }
main .sec--paper .ps-int__g, main .sec--paper .ks-areas > div { background: #fff; box-shadow: 0 22px 44px -36px rgba(11, 22, 38, .6); }
main .ps-int__g h3, main .ks-areas h3 { font-size: 21px; }
main .ks-areas > .ks-areas__cta { background: color-mix(in srgb, var(--fx) 88%, #0B1626) !important; color: #fff; }
main .ks-areas > .ks-areas__cta * { color: #fff; }
@media (min-width: 1081px) { main .ks-areas:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* ---------- sg: rich story stage (app screen on a coloured scene + who / record / exception). Owner 2026-12-03 ---------- */
.fx-stage .st-scene.sg { grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; align-items: stretch; }
.sg .sg-art { aspect-ratio: auto; min-height: 520px; border-radius: 0; box-shadow: none; background: var(--sg, #DDEFEA); }
.sg .sg-art > .st-l svg { width: 100%; height: 100%; }
.sg-win { position: absolute; left: 7%; right: 12%; top: 13%; padding: 0 0 10px; border-radius: 16px; background: #fff; color: #334155; box-shadow: 0 30px 60px -28px rgba(11, 22, 38, .6); overflow: hidden; }
.sg-h { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid #E2E8F0; }
.sg-h img { height: 28px; width: auto; }
.sg-h b { font: 700 16px/1.25 var(--font); color: #1E293B; }
.sg-h small { margin-left: auto; font: 500 13px/1 var(--font-ui); color: #5B6B80; }
.sg-r { margin: 0; padding: 4px 20px; list-style: none; }
.sg-r li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid #EDF1F5; font-size: 15px; line-height: 1.35; }
.sg-r li:last-child { border: 0; }
.sg-r b { color: #1E293B; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sg-ok, .sg-no, .sg-wt { display: inline-block; padding: 5px 10px; border-radius: 8px; font: 600 13px/1.2 var(--font-ui); white-space: nowrap; }
.sg-ok { background: #DFF3D6; color: #235F0A; } .sg-no { background: #FFE3D3; color: #8A2F0F; } .sg-wt { background: #FFF0CF; color: #6B3A06; }
.sg-k { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 10px; padding: 16px 20px 6px; }
.sg-k div { padding: 12px 14px; border-radius: 12px; background: #F1F6F9; font-size: 13.5px; line-height: 1.3; }
.sg-k b { display: block; font: 700 23px/1.2 var(--font); color: #1E293B; }
.sg-b { display: grid; gap: 12px; padding: 14px 20px; font-size: 14.5px; }
.sg-b div { display: grid; grid-template-columns: 110px 1fr auto; align-items: center; gap: 12px; }
.sg-b i { height: 14px; border-radius: 7px; background: var(--sg-a, #0F766E); transform-origin: 0 50%; }
.sg-f { position: absolute; padding: 14px 18px; border-radius: 14px; background: #fff; color: #334155; font-size: 14px; line-height: 1.4; box-shadow: 0 26px 46px -20px rgba(11, 22, 38, .65); }
.sg-f b { display: block; font: 700 18px/1.25 var(--font); color: #1E293B; }
.sg-f--dark { background: #10233B; color: #D5DFEC; } .sg-f--dark b { color: #fff; }
.sg-x { display: flex; flex-direction: column; justify-content: center; padding: 30px 36px; }
.fx-stage .sg .sg-x h3 { font-size: clamp(22px, 1rem + .95vw, 29px); margin: 0 0 8px; }
.sg-x > p { margin: 0 0 14px; font-size: 16px; line-height: 1.5; }
.sg-d { margin: 0 0 14px; border-top: 1px solid var(--line); }
.sg-d div { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; line-height: 1.45; }
.sg-d dt { font-weight: 600; color: var(--ink); } .sg-d dd { margin: 0; }
.sg-x .st-zoho li { padding: 5px 10px; }
.sg.is-cur .sg-r li, .sg.is-cur .sg-k div { animation: sg-up .55s cubic-bezier(.2, .7, .2, 1) backwards; }
.sg.is-cur .sg-r li:nth-child(2), .sg.is-cur .sg-k div:nth-child(2) { animation-delay: .08s; } .sg.is-cur .sg-r li:nth-child(3), .sg.is-cur .sg-k div:nth-child(3) { animation-delay: .16s; } .sg.is-cur .sg-r li:nth-child(n+4) { animation-delay: .24s; }
.sg.is-cur .sg-b i { animation: sg-grow .9s cubic-bezier(.2, .7, .2, 1) backwards; }
@keyframes sg-up { from { opacity: 0; transform: translateY(12px); } }
@keyframes sg-grow { from { transform: scaleX(0); } }
/* long journeys: smaller nodes, two-line labels */
.fx-stage .st-rail:has(> li:nth-child(9)) li { padding: 42px 4px 0; font-size: 13px; }
.fx-stage .st-rail:has(> li:nth-child(9)) li::before { width: 32px; height: 32px; font-size: 13.5px; }
@media (max-width: 960px) {
  .fx-stage .st-scene.sg { grid-template-columns: minmax(0, 1fr); }
  .sg .sg-art { min-height: 510px; } .sg-win { left: 4%; right: 6%; top: 7%; } .sg-x { padding: 22px 20px 24px; }
  .sg-r, .sg-h, .sg-k, .sg-b { padding-left: 14px; padding-right: 14px; } .sg-b div { grid-template-columns: 92px 1fr auto; }
  .sg-d div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .fx-stage .st-rail:has(> li:nth-child(9)) li { padding-top: 46px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .sg.is-cur * { animation: none !important; } }
@media (max-width: 600px) { .sg-k { gap: 8px; } .sg-k div { padding: 10px; } .sg-k b { font-size: 19px; } }
/* portal window: two platform logos, dark portal bar with tabs */
.sg-h--2 { gap: 10px; } .sg-h--2 > span { font: 500 14px/1 var(--font-ui); color: #5B6B80; }
.sg-nav { display: flex; align-items: center; gap: 6px; padding: 10px 20px; background: var(--sg-a, #10233B); color: #E6EEF7; font: 600 13.5px/1 var(--font-ui); }
.sg-nav b { margin-right: auto; font: 700 15.5px/1.2 var(--font); color: #fff; }
.sg-nav span { padding: 8px 11px; border-radius: 8px; } .sg-nav .is-on { background: #fff; color: #10233B; }
.sg-btn { padding: 9px 16px; border-radius: 8px; background: var(--sg-a, #0F766E); color: #fff; font: 600 14px/1 var(--font-ui); white-space: nowrap; }
@media (max-width: 600px) { .sg-nav { padding: 9px 14px; gap: 0; } .sg-nav span { padding: 7px 8px; } .sg-h--2 img { height: 24px; } }
