/* FT guide page kit (skill ft-guide-page). Copy, do not edit per page: a page brings markup only.
   Layout "guide" (ui/layouts/guide.hbs). Everything is scoped under .fg so the portal header and footer
   keep their own styles.
   One rule for motion: every rule below the "Motion" comment is written for the final state. The hidden
   start of an animation exists only inside the last media block, under .fg-js, so no JS, a failed script,
   reduced motion and print all show every part in its final state. */

/* Roboto 300 and 700: the portal theme ships only 400 and 500. */
@font-face { font-family: "Roboto"; font-weight: 300; font-display: swap; src: url("roboto-latin-300-normal.woff2") format("woff2"); }
@font-face { font-family: "Roboto"; font-weight: 700; font-display: swap; src: url("roboto-latin-700-normal.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
.fg { overflow-wrap: break-word; word-wrap: break-word; }
.fg h1, .fg h2, .fg h3, .fg h4, .fg h5 { font-family: inherit; color: inherit; }
.fg { --orange: #f37921;
    --orange-ink: #8a3d06;
    --orange-text: #a64806;
    --orange-soft: #fde9da;
    --blue: #2b6eac;
    --blue-ink: #1d4f7e;
    --blue-soft: #e3edf7;
    --ink: #2b2b2b;
    --muted: #5a595f;
    --line: #dcdde0;
    --soft: #f0f0f0;
    --purple: #b02a95;
    --green: #2f7d1a;
    --red: #9b2226;
    --red-soft: #f6e3e3;
    --bg: #ffffff;
    --band-blue: #f1f6fb;
    --band-orange: #fff5ee;
    --band-gray: #f6f6f7;
    --deco: #ebecec;

    --s1: calc(4px * var(--k)); --s2: calc(8px * var(--k)); --s3: calc(16px * var(--k)); --s4: calc(24px * var(--k)); --s5: calc(32px * var(--k)); --s6: calc(48px * var(--k)); --s7: calc(64px * var(--k)); --s8: calc(112px * var(--k));
    --r-sm: calc(6px * var(--k)); --r-md: calc(12px * var(--k)); --r-lg: calc(20px * var(--k));
    --shadow: 0 1px 2px rgba(43,43,43,.06), 0 calc(12px * var(--k)) calc(32px * var(--k)) rgba(43,43,43,.10);
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
    --max: calc(1160px * var(--k));
    --mono: 'SFMono-Regular', Menlo, monospace;
    /* The floor for small text, so the density scale never takes it under a size people read: 12px for a caption, 11px for a label. */
    --fs-cap: max(12px, calc(14px * var(--k))); --fs-lab: max(11px, calc(13px * var(--k))); --fs-tag: max(11px, calc(12px * var(--k)));}
.fg, .fg * { box-sizing: border-box;}
/* Density: the guide is drawn at a 1:1 scale for big screens. On a laptop next to the portal nav
   that is too large, so every length is multiplied by --k. Phones keep their own tuned sizes. */
.fg { --k: .9; }
@media (max-width: 2000px) { .fg { --k: .8; } }
@media (max-width: 1600px) { .fg { --k: .73; } }
@media (max-width: 1100px) { .fg { --k: .8; } }
@media (max-width: 760px) { .fg { --k: 1; } }
/* Own stacking context: scenes stay under the page's sticky bar, and everything stays under the portal header and nav. */
.fg { position: relative; isolation: isolate; }

/* ---------- Base ---------- */
html:has(.fg) { scroll-padding-top: 10.5rem;}
.fg { margin: 0; background: var(--bg); color: var(--ink); font: 400 calc(18px * var(--k))/1.55 "Roboto", system-ui, sans-serif; -webkit-font-smoothing: antialiased;}
.fg ::selection { background: var(--orange-soft); color: var(--ink);}
.fg img { display: block; max-width: 100%;}
.fg figure { margin: 0;}
.fg a { color: var(--blue); text-underline-offset: calc(3px * var(--k));}
.fg a:focus-visible, .fg button:focus-visible, .fg summary:focus-visible, .fg [tabindex]:focus-visible { outline: calc(3px * var(--k)) solid var(--orange); outline-offset: calc(3px * var(--k)); border-radius: calc(6px * var(--k));}
.fg .wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--s4); position: relative;}
.fg h1, .fg h2, .fg h3, .fg h4 { margin: 0; font-weight: 500; text-wrap: balance;}
.fg h2 { font-size: clamp(calc(30px * var(--k)), 3.6vw, calc(46px * var(--k))); line-height: 1.12; letter-spacing: -0.015em;}
.fg h3 { font-size: calc(20px * var(--k)); line-height: 1.3;}
.fg p { margin: 0;}
.fg .lead { font-size: calc(20px * var(--k)); font-weight: 300; color: var(--muted); max-width: 60ch;}
.fg .role { font-weight: 700;}
.fg .role.blue { color: var(--blue);}
.fg .role.orange { color: var(--orange-text);}
.fg .mark { box-shadow: inset 0 -0.3em 0 var(--orange-soft);}
.fg .ui { font-weight: 500; color: var(--ink);}
.fg .nw { white-space: nowrap;}
.fg code, .fg .mono { font-family: var(--mono); font-size: max(10.5px, .86em);}
.fg code { background: var(--soft); padding: 1px calc(6px * var(--k)); border-radius: calc(4px * var(--k)); overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone;}
.fg svg.i { width: calc(20px * var(--k)); height: calc(20px * var(--k)); flex: none;}

/* ---------- Sticky bar: section nav and audience switch ---------- */
.fg .bar { position: sticky; top: 6rem; z-index: 20; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.6) blur(calc(14px * var(--k))); -webkit-backdrop-filter: saturate(1.6) blur(calc(14px * var(--k))); box-shadow: 0 1px 0 rgba(43,43,43,.08);}
.fg .bar .wrap { display: flex; align-items: center; gap: var(--s4); min-height: calc(64px * var(--k));}
.fg .bar nav { display: flex; gap: var(--s4); margin-left: auto; min-width: 0; overflow-x: auto; scrollbar-width: none; font-size: calc(15px * var(--k)); white-space: nowrap;}
.fg .bar nav::-webkit-scrollbar { display: none;}
.fg .bar nav a { flex: none; color: var(--muted); text-decoration: none; padding: var(--s2) 0; transition: color 150ms ease, box-shadow 150ms ease;}
.fg .bar nav a:hover { color: var(--ink);}
.fg .bar nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--orange);}
.fg .bar nav a:focus-visible { outline-offset: -2px;}
@media (prefers-reduced-transparency: reduce) {
  .fg .bar { background: #fff; backdrop-filter: none;}
}
.fg .aud { display: none; flex: none; padding: calc(3px * var(--k)); background: var(--soft); border-radius: calc(999px * var(--k));}
.fg-js .fg .aud { display: inline-flex;}
.fg .aud button { font: 500 max(11px, calc(14px * var(--k))) "Roboto", sans-serif; color: var(--muted); border: 0; background: transparent; padding: var(--s2) var(--s3); min-height: calc(36px * var(--k)); border-radius: calc(999px * var(--k)); cursor: pointer; white-space: nowrap; transition: background-color 160ms ease, color 160ms ease, transform 120ms var(--ease-out);}
.fg .aud button:hover { color: var(--ink);}
.fg .aud button:active { transform: scale(0.97);}
.fg .aud button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(43,43,43,.12), 0 2px calc(8px * var(--k)) rgba(43,43,43,.08);}
.fg .aud button[data-tone="blue"][aria-pressed="true"] { color: var(--blue);}
.fg .aud button[data-tone="orange"][aria-pressed="true"] { color: var(--orange-text);}
/* Phone: the nav scrolls sideways on its own row, the switch sits under it. */
@media (max-width: 640px) {
  html:has(.fg) { scroll-padding-top: 13rem;}
  .fg .bar .wrap { flex-wrap: wrap; gap: 0 var(--s3); padding: var(--s1) var(--s3); min-height: 0;}
  .fg .bar nav { flex: 1 0 100%; margin: 0; gap: var(--s3);}
  .fg .aud { margin: var(--s1) 0;}
  .fg .aud button { padding: var(--s1) var(--s2); min-height: 32px; font-size: 13px;}
}
.fg .aud-off { display: none !important;}
.fg .aud-note { display: none; position: fixed; left: 50%; bottom: calc(var(--s4) + env(safe-area-inset-bottom, 0px)); z-index: 11; align-items: center; gap: var(--s3); padding: var(--s2) var(--s2) var(--s2) var(--s4); border-radius: calc(999px * var(--k)); background: var(--ink); color: #fff; font-size: calc(15px * var(--k)); box-shadow: 0 calc(8px * var(--k)) calc(28px * var(--k)) rgba(43,43,43,.28); transform: translate(-50%, 0); transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out); white-space: nowrap; max-width: calc(100vw - calc(32px * var(--k)));}
.fg-js .fg .aud-note { display: flex;}
/* the portal's Ask AI button sits in the bottom-right corner on phones */
@media (max-width: 640px) { .fg .aud-note { bottom: calc(calc(80px * var(--k)) + env(safe-area-inset-bottom, 0px)); white-space: normal; font-size: calc(14px * var(--k)); width: max-content; } }
.fg .aud-note:not(.show) { opacity: 0; transform: translate(-50%, calc(12px * var(--k))); pointer-events: none; visibility: hidden; transition: opacity 200ms var(--ease-out), transform 200ms var(--ease-out), visibility 0s 200ms;}
.fg .aud-note button { flex: none; font: 500 calc(14px * var(--k)) "Roboto", sans-serif; border: 0; border-radius: calc(999px * var(--k)); padding: var(--s2) var(--s3); min-height: calc(36px * var(--k)); background: var(--orange); color: var(--ink); cursor: pointer; transition: transform 120ms var(--ease-out);}
.fg .aud-note button:active { transform: scale(0.97);}

/* ---------- Sections and bands ---------- */
.fg section { padding: var(--s8) 0; position: relative; overflow: hidden;}
@media (max-width: 640px) {
  .fg section { padding: var(--s7) 0;}
}
/* Block flow: the default gap between the blocks a writer stacks in a section or a card. It sits above the scenes on
   purpose: a scene with its own margin (.pts, .split, .chips, .callout) has the same weight and comes later, so it wins. */
.fg :where(section) > .wrap > * + * { margin-top: var(--s4);}
.fg .wrap > .head + * { margin-top: 0;}
.fg .card > * + * { margin-top: var(--s3);}
.fg .card > :first-child { margin-top: 0;}
.fg .card > :last-child { margin-bottom: 0;}
/* Body text: a plain p. 66ch at the body size is the width of .lead, so the two share a right edge. */
.fg .wrap > p:not(.lead), .fg .stepline.v > li > p { max-width: 66ch; text-wrap: pretty;}
.fg .band-blue { background: var(--band-blue); --deco: var(--blue-soft);}
.fg .band-orange { background: var(--band-orange); --deco: var(--orange-soft);}
.fg .band-gray { background: var(--band-gray);}
.fg .head { display: grid; gap: var(--s3); margin-bottom: var(--s6); max-width: calc(780px * var(--k));}
.fg .circle { position: absolute; border-radius: 50%; pointer-events: none;}
.fg .circle.tr { width: calc(420px * var(--k)); height: calc(420px * var(--k)); right: -180px; top: -160px; background: var(--deco);}
.fg .circle.bl { width: calc(380px * var(--k)); height: calc(380px * var(--k)); left: -200px; bottom: -160px; background: var(--deco);}
@media (max-width: 700px) {
  .fg .circle.tr, .fg .circle.bl { width: 220px; height: 220px;}
  .fg .circle.tr { right: -130px; top: -120px;}
  .fg .circle.bl { left: -130px; bottom: -120px;}
}

/* ---------- Player, caption, labels ---------- */
.fg .player { position: relative; border-radius: var(--r-md); overflow: hidden; background: #fff; box-shadow: var(--shadow);}
.fg .vbtn { display: none; position: absolute; right: var(--s3); bottom: var(--s3); z-index: 7; width: calc(44px * var(--k)); height: calc(44px * var(--k)); border-radius: 50%; border: 0; place-items: center; color: #fff; background: rgba(43,43,43,.62); backdrop-filter: blur(calc(8px * var(--k))); -webkit-backdrop-filter: blur(calc(8px * var(--k))); cursor: pointer;}
.fg .vbtn:hover { background: rgba(43,43,43,.8);}
.fg .vbtn svg { width: calc(18px * var(--k)); height: calc(18px * var(--k));}
.fg .cap { font-size: var(--fs-cap); color: var(--muted); margin-top: var(--s3);}
.fg .cap .tag { margin-right: var(--s2);}
.fg .tag { font-size: var(--fs-tag); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--green);}
.fg .tag.illu { color: var(--purple);}
.fg .wide { max-width: calc(1060px * var(--k));}

/* ---------- Scene: hero with flow player ---------- */
.fg .hero { padding: var(--s7) 0 var(--s8);}
.fg .hero .g1 { width: calc(460px * var(--k)); height: calc(460px * var(--k)); right: -140px; top: -200px; background: var(--deco);}
.fg .hero .g2 { width: calc(260px * var(--k)); height: calc(260px * var(--k)); right: calc(260px * var(--k)); top: -150px; background: var(--deco);}
.fg .hero .g3 { width: calc(200px * var(--k)); height: calc(200px * var(--k)); right: calc(40px * var(--k)); top: calc(210px * var(--k)); background: var(--deco);}
@media (max-width: 700px) {
  .fg .hero .g2, .fg .hero .g3 { display: none;}
}
.fg .hero .c1 { width: calc(150px * var(--k)); height: calc(150px * var(--k)); left: -75px; top: calc(360px * var(--k)); background: var(--purple);}
.fg .hero .c2 { width: calc(210px * var(--k)); height: calc(210px * var(--k)); right: 7%; bottom: -130px; background: var(--orange);}
/* A long hero lead on a phone runs under the coloured circle: text wins. */
@media (max-width: 760px) {
  .fg .hero .c1 { display: none;}
}
.fg .hero h1 { font-size: clamp(calc(42px * var(--k)), 6vw, calc(76px * var(--k))); line-height: 1.04; letter-spacing: -0.025em; max-width: 15ch; margin-bottom: var(--s4);}
.fg .hero .lead { margin-bottom: var(--s6);}
.fg .hero .player { max-width: calc(1060px * var(--k));}
.fg .pipe { list-style: none; margin: 0; position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s3); padding: var(--s6) var(--s5) var(--s6);}
.fg .pipe { --ic: calc(68px * var(--k)); --lbl: max(16px, calc(18px * var(--k))); --gap: calc(10px * var(--k));}
.fg .lbl-up { font-size: var(--fs-lab); font-weight: 500; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); text-align: center; height: var(--lbl);}
.fg .node { position: relative; display: grid; justify-items: center; align-content: start; text-align: center; gap: var(--gap); min-width: 0;}
/* The rail: each node draws the piece to the next node, ::before is the grey piece and ::after its fill. */
.fg .node:not(:last-of-type)::before, .fg .node:not(:last-of-type)::after { content: ""; position: absolute; left: 50%; width: calc(100% + var(--s3)); top: calc(var(--lbl) + var(--gap) + var(--ic) / 2 - 1px); height: 2px;}
.fg .node:not(:last-of-type)::before { background: #b9bcc2;}
.fg .node:not(:last-of-type)::after { background: var(--blue); transform-origin: left;}
.fg .pipe-dot { display: none; position: absolute; left: 0; top: calc(var(--s6) + var(--lbl) + var(--gap) + var(--ic) / 2 - calc(6px * var(--k))); width: calc(12px * var(--k)); height: calc(12px * var(--k)); border-radius: 50%; background: var(--orange);}
.fg .node .ic { position: relative; z-index: 1; width: var(--ic); height: var(--ic); border-radius: var(--r-md); background: #fff; border: 1.5px solid var(--blue); display: grid; place-items: center; color: var(--blue); box-shadow: 0 0 0 calc(4px * var(--k)) var(--blue-soft);}
.fg .node .ic svg { width: calc(30px * var(--k)); height: calc(30px * var(--k));}
/* The check badge on a finished node. */
.fg .node .ic::after { content: ""; position: absolute; top: calc(-11px * var(--k)); right: calc(-11px * var(--k)); width: calc(22px * var(--k)); height: calc(22px * var(--k)); border-radius: 50%; box-shadow: 0 0 0 calc(3px * var(--k)) #fff; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 60% no-repeat;}
.fg .node .h { font-size: calc(16px * var(--k)); font-weight: 500;}
.fg .node p { font-size: var(--fs-lab); color: var(--muted); line-height: 1.4; max-width: 19ch;}
.fg .node .out { font-size: var(--fs-tag); font-weight: 700; letter-spacing: .05em; padding: calc(4px * var(--k)) calc(8px * var(--k)); border-radius: var(--r-sm); background: var(--blue-soft); color: var(--blue-ink); max-width: 100%;}
.fg .node:last-of-type .ic { border-color: var(--orange); color: var(--orange-text); box-shadow: 0 0 0 calc(4px * var(--k)) var(--orange-soft);}
.fg .node:last-of-type .out { background: var(--orange); color: var(--ink);}
@media (max-width: 820px) {
  .fg .pipe { grid-auto-flow: row; gap: var(--s4); padding: var(--s5) var(--s4) var(--s7);}
  .fg .node:not(:last-of-type)::before, .fg .node:not(:last-of-type)::after, .fg .pipe-dot, .fg .lbl-up { display: none !important;}
  .fg .node { grid-template-columns: calc(64px * var(--k)) minmax(0, 1fr); justify-items: start; text-align: left; column-gap: var(--s3); row-gap: 2px;}
  .fg .node .ic { grid-row: span 3; width: calc(60px * var(--k)); height: calc(60px * var(--k));}
  .fg .node p { max-width: none;}
}

/* ---------- Scene: before and now ---------- */
.fg .vs { display: grid; grid-template-columns: minmax(0, 1fr) calc(56px * var(--k)) minmax(0, 1.3fr); gap: var(--s3); align-items: center;}
@media (max-width: 860px) {
  .fg .vs { grid-template-columns: minmax(0, 1fr);}
  .fg .vs .arrow { justify-self: center;}
}
.fg .card { border-radius: var(--r-lg); padding: var(--s5);}
.fg .card h3 { margin-bottom: var(--s5); font-size: calc(22px * var(--k)); display: flex; align-items: baseline; gap: var(--s3); flex-wrap: wrap;}
.fg .card h3 small { font-size: calc(15px * var(--k)); font-weight: 400; color: var(--muted);}
.fg .card.old { border: 1.5px dashed #c9cacd;}
.fg .card.old h3 { color: var(--muted);}
.fg .old ol { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4);}
.fg .old li { display: grid; grid-template-columns: calc(36px * var(--k)) minmax(0, 1fr); gap: var(--s3); align-items: center; color: var(--muted);}
.fg .old li .ic { width: calc(36px * var(--k)); height: calc(36px * var(--k)); border-radius: calc(10px * var(--k)); display: grid; place-items: center; background: #e9e9eb; color: #8a8a90;}
.fg .old .x { -webkit-box-decoration-break: clone; box-decoration-break: clone; background: linear-gradient(#8a8a90, #8a8a90) no-repeat 0 55% / 100% 2px;}
.fg .vs .arrow { width: calc(56px * var(--k)); height: calc(56px * var(--k)); border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: var(--ink); box-shadow: 0 calc(6px * var(--k)) calc(18px * var(--k)) rgba(243,121,33,.35);}
@media (max-width: 860px) {
  .fg .vs .arrow svg { transform: rotate(90deg);}
}
.fg .card.now { background: #fff; box-shadow: var(--shadow);}
.fg .moves { display: grid; grid-template-columns: minmax(0, 1fr) calc(28px * var(--k)) minmax(0, 1fr); gap: var(--s3); align-items: start;}
.fg .mv { display: grid; gap: var(--s2); justify-items: start;}
.fg .mv p { font-size: calc(16px * var(--k)); color: var(--muted);}
.fg .mv p b { font-weight: 500; color: var(--ink);}
.fg .moves .chev { color: #b9bcc2; margin-top: calc(6px * var(--k));}
.fg .status { font-size: var(--fs-lab); font-weight: 700; letter-spacing: .05em; padding: calc(7px * var(--k)) calc(12px * var(--k)); border-radius: var(--r-sm); max-width: 100%;}
.fg .status.blue { background: var(--blue-soft); color: var(--blue-ink);}
.fg .status.orange { background: var(--orange); color: var(--ink);}
.fg .auto-label { margin: var(--s5) 0 var(--s3); padding-top: var(--s4); border-top: 1px solid var(--soft); font-size: calc(15px * var(--k)); font-weight: 500; color: var(--muted);}
.fg .auto { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3);}
.fg .auto li { display: flex; align-items: center; gap: var(--s2); font-size: calc(16px * var(--k));}
.fg .ok-dot { width: calc(22px * var(--k)); height: calc(22px * var(--k)); border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; flex: none;}
.fg .ok-dot svg { width: calc(13px * var(--k)); height: calc(13px * var(--k));}
@media (max-width: 480px) {
  .fg .moves { grid-template-columns: minmax(0, 1fr);}
  .fg .moves .chev { transform: rotate(90deg); margin: 0;}
  .fg .auto { grid-template-columns: 1fr;}
}

/* ---------- Scene: numbered steps with owner labels ---------- */
.fg .stepline { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s4); position: relative;}
.fg .stepline > li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--s2); align-content: start; padding-top: var(--s6); min-width: 0;}
.fg .stepline > li:not(:last-child)::before { content: ""; position: absolute; left: calc(14px * var(--k)); width: calc(100% + var(--s4)); top: calc(13px * var(--k)); height: calc(3px * var(--k)); border-radius: 2px; background: var(--ink); transform-origin: left;}
.fg .stepline > li.t-blue:not(:last-child)::before { background: var(--blue);}
.fg .stepline > li:has(+ li.t-orange)::before { background: var(--orange);}
.fg .stepline .n { position: absolute; top: 0; left: 0; width: calc(30px * var(--k)); height: calc(30px * var(--k)); border-radius: 50%; display: grid; place-items: center; font-size: var(--fs-lab); font-weight: 700; color: #fff; background: var(--ink); box-shadow: 0 0 0 calc(5px * var(--k)) #fff;}
.fg .band-gray .stepline .n { box-shadow: 0 0 0 calc(5px * var(--k)) var(--band-gray);}
.fg .band-blue .stepline .n { box-shadow: 0 0 0 calc(5px * var(--k)) var(--band-blue);}
.fg .band-orange .stepline .n { box-shadow: 0 0 0 calc(5px * var(--k)) var(--band-orange);}
.fg .stepline > li.t-blue .n { background: var(--blue);}
.fg .stepline > li.t-orange .n { background: var(--orange); color: var(--ink);}
.fg .stepline h3 { font-size: calc(19px * var(--k));}
.fg .stepline p { font-size: calc(15px * var(--k)); color: var(--muted); line-height: 1.5;}
.fg .who { font-size: var(--fs-lab); font-weight: 500; color: var(--muted);}
.fg .t-blue .who { color: var(--blue);}
.fg .t-orange .who { color: var(--orange-text);}
/* Vertical: always for .stepline.v (a how-to with commands), under 900px for every step line. */
.fg .stepline.v { grid-auto-flow: row; gap: var(--s5);}
.fg .stepline.v > li { padding: 0 0 0 var(--s6);}
.fg .stepline.v > li:not(:last-child)::before { left: calc(13px * var(--k)); top: calc(14px * var(--k)); bottom: calc(var(--s5) * -1); width: calc(3px * var(--k)); height: auto; transform: none;}
/* A plain list in a step keeps its bullets; the step line's list-style:none is inherited. */
.fg .stepline > li > ul:not([class]) { list-style: disc; margin: 0; padding-left: 1.2em; font-size: calc(15px * var(--k)); color: var(--muted);}
/* Two windows in one step are two things: they keep more than the line gap of the step. */
.fg .stepline.v > li > :is(.term, figure) + :is(.term, figure) { margin-top: var(--s2);}
@media (max-width: 900px) {
  .fg .stepline { grid-auto-flow: row; gap: var(--s5);}
  .fg .stepline > li { padding: 0 0 0 var(--s6);}
  .fg .stepline > li:not(:last-child)::before { left: calc(13px * var(--k)); top: calc(14px * var(--k)); bottom: calc(var(--s5) * -1); width: calc(3px * var(--k)); height: auto;}
}

/* ---------- Scene: feature grid ---------- */
.fg .pts { list-style: none; margin: var(--s6) 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5) var(--s6);}
.fg .pts.one { grid-template-columns: minmax(0, 1fr); margin-top: 0; gap: var(--s4);}
@media (max-width: 760px) {
  .fg .pts { grid-template-columns: minmax(0, 1fr);}
}
.fg .pts li { display: grid; grid-template-columns: calc(36px * var(--k)) minmax(0, 1fr); gap: var(--s3);}
.fg .pts .ic { width: calc(36px * var(--k)); height: calc(36px * var(--k)); border-radius: calc(10px * var(--k)); display: grid; place-items: center; background: #fff; color: var(--blue); box-shadow: 0 1px 2px rgba(43,43,43,.08);}
.fg .band-orange .pts .ic { color: var(--orange-text);}
.fg .pts .h { font-size: inherit; line-height: inherit; font-weight: 500; display: block; margin-bottom: 2px;}
.fg .pts .t { color: var(--muted); font-size: calc(16px * var(--k));}
.fg .split { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--s6); margin-top: var(--s6); align-items: start;}
.fg .split > div > h3 { margin-bottom: var(--s4);}
.fg .two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6); align-items: start;}
@media (max-width: 900px) {
  .fg .split, .fg .two { grid-template-columns: minmax(0, 1fr);}
}
.fg .two > .card { background: #fff; border: 1px solid var(--line);}
/* h3.sub: one clear step above the scene headings, in the same family and weight. No colour, no rule: size and space do it. */
.fg h3.sub { margin: var(--s7) 0 var(--s3); font-size: calc(24px * var(--k)); line-height: 1.25; letter-spacing: -0.01em;}
.fg h3.sub + * { margin-top: 0;}
/* A heading that opens a figure or a column has nothing above it to keep away from. */
.fg :is(figure, .two > *) > h3.sub:first-child { margin-top: 0;}
.fg .card h3.sub { margin: 0 0 var(--s3); font-size: calc(22px * var(--k)); letter-spacing: 0;}
/* Phone: a card heading takes the size of the other scene headings, and a terminal in a card keeps its width. */
@media (max-width: 760px) {
  .fg .card h3, .fg .card h3.sub { font-size: calc(19px * var(--k));}
  .fg .two > .card { padding: var(--s3);}
}
.fg .flags { display: grid; gap: var(--s3); align-content: start;}
.fg .flag { display: grid; grid-template-columns: calc(28px * var(--k)) minmax(0, 1fr); gap: var(--s3); align-items: start; padding: var(--s3); border-radius: var(--r-md); background: #fff; box-shadow: var(--shadow);}
.fg .flag .dot { width: calc(28px * var(--k)); height: calc(28px * var(--k)); border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--blue);}
.fg .flag .dot.green { background: var(--green);}
.fg .flag .dot.purple { background: var(--purple);}
.fg .flag .dot svg { width: calc(16px * var(--k)); height: calc(16px * var(--k));}
.fg .flag .h { font-size: inherit; line-height: inherit; font-weight: 500; display: block;}
.fg .flag .t { font-size: var(--fs-cap); color: var(--muted);}

/* ---------- Scene: card pairs and outcome pairs ---------- */
.fg .pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s4);}
.fg .fail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s6);}
@media (max-width: 900px) {
  .fg .pair, .fg .fail { grid-template-columns: minmax(0, 1fr);}
}
.fg .ev { border-radius: var(--r-md); background: #fff; padding: var(--s4); box-shadow: 0 1px 2px rgba(43,43,43,.06); border: 1.5px solid transparent;}
.fg .ev.hl { border-color: var(--orange); box-shadow: 0 0 0 calc(4px * var(--k)) var(--orange-soft), var(--shadow);}
.fg .ev .when { font-size: var(--fs-tag); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s2);}
.fg .ev h3 { font-size: calc(19px * var(--k)); margin-bottom: var(--s3);}
.fg .ev p { font-size: calc(15px * var(--k)); color: var(--muted);}
.fg .fail h3 { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap;}
.fg .checks { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); font-size: calc(17px * var(--k));}
.fg .checks li { display: grid; grid-template-columns: calc(22px * var(--k)) minmax(0, 1fr); gap: var(--s3); align-items: start;}
.fg .checks svg { width: calc(20px * var(--k)); height: calc(20px * var(--k)); margin-top: calc(3px * var(--k));}
.fg .checks .no { color: var(--red);}
.fg .checks .yes { color: var(--green);}

/* ---------- Chips, labels and legends ---------- */
.fg .lz { display: inline-block; font-size: var(--fs-lab); font-weight: 500; padding: calc(3px * var(--k)) calc(10px * var(--k)); border-radius: calc(4px * var(--k)); border: 1px solid; white-space: nowrap;}
.fg .lz.b { background: #dbe8fb; color: #163f73; border-color: #a9c6ee;}
.fg .lz.g { background: #dff1cf; color: #285c12; border-color: #b2dc90;}
.fg .lz.y { background: #fbefd2; color: #6b4a00; border-color: #ecd193;}
.fg .lz.r { background: var(--red-soft); color: var(--red); border-color: #e2b4b4;}
.fg .lz.o { background: var(--orange-soft); color: var(--orange-ink); border-color: #f5c39c;}
.fg .lz.n { background: var(--soft); color: var(--muted); border-color: var(--line);}
.fg dl.states { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--s3) var(--s4); margin: 0; font-size: calc(16px * var(--k)); align-items: baseline;}
.fg dl.states dd { margin: 0; color: var(--muted);}
.fg .chips { display: flex; flex-wrap: wrap; gap: calc(6px * var(--k)); margin: var(--s4) 0 var(--s3);}
.fg .chip-s { max-width: 100%; overflow-wrap: anywhere; font-size: var(--fs-lab); padding: calc(4px * var(--k)) calc(10px * var(--k)) calc(4px * var(--k)) calc(8px * var(--k)); border-radius: calc(999px * var(--k)); background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; gap: calc(6px * var(--k)); color: var(--muted);}
.fg .chip-s::before { content: ""; flex: none; width: calc(8px * var(--k)); height: calc(8px * var(--k)); border-radius: 50%; background: #c9cacd;}
.fg .chip-s.ok { background: #dff1cf; border-color: #b2dc90; color: #285c12;}
.fg .chip-s.ok::before { background: var(--green);}

/* ---------- Scene: window mock (always labelled Illustration) ---------- */
.fg .scene { padding: var(--s5); background: #fff;}
.fg .win { background: #fff; border-radius: calc(10px * var(--k)); border: 1px solid var(--line); overflow: hidden; position: relative;}
.fg .win-bar { display: flex; align-items: center; gap: calc(8px * var(--k)); padding: calc(9px * var(--k)) calc(14px * var(--k)); border-bottom: 1px solid var(--line); background: var(--band-gray); font-size: var(--fs-lab); color: var(--muted);}
.fg .win-bar i, .fg .term-bar i { flex: none; width: calc(10px * var(--k)); height: calc(10px * var(--k)); border-radius: 50%; background: #dcdde0; display: inline-block;}
.fg .win-bar .crumb, .fg .term-bar .crumb { margin-left: calc(10px * var(--k)); min-width: 0;}
.fg .win-bar .crumb b { color: var(--ink); font-weight: 500;}
.fg .win-body { padding: calc(22px * var(--k)) calc(24px * var(--k)) calc(26px * var(--k)); font-size: max(11px, calc(14px * var(--k))); position: relative;}
@media (max-width: 560px) {
  .fg .scene { padding: var(--s3);}
  .fg .win-body { padding: calc(16px * var(--k));}
}
.fg .win-body h4 { font-size: calc(20px * var(--k)); margin-bottom: calc(4px * var(--k));}
.fg .win-body .sub { color: var(--muted); font-size: var(--fs-lab); margin-bottom: calc(18px * var(--k));}
.fg .fld { margin-bottom: calc(14px * var(--k));}
.fg .fld .l { display: block; font-size: var(--fs-tag); font-weight: 500; color: var(--muted); margin-bottom: calc(5px * var(--k));}
.fg .inp { min-height: calc(38px * var(--k)); border: 1.5px solid var(--line); background: #fff; border-radius: var(--r-sm); padding: 0 calc(10px * var(--k)); display: flex; align-items: center; justify-content: space-between; color: #6d6d73;}
.fg .inp .v { color: var(--ink);}
.fg .inp .caret { flex: none; width: calc(8px * var(--k)); height: calc(8px * var(--k)); border-right: 2px solid #8a8a90; border-bottom: 2px solid #8a8a90; transform: rotate(45deg) translateY(-3px);}
.fg .row-btn { display: flex; align-items: center; gap: calc(12px * var(--k)); margin-top: calc(6px * var(--k)); flex-wrap: wrap;}
.fg .btn { min-height: calc(36px * var(--k)); padding: 0 calc(16px * var(--k)); border-radius: var(--r-sm); border: 0; font: 500 max(11px, calc(14px * var(--k))) "Roboto", sans-serif; display: inline-flex; align-items: center; background: var(--soft); color: #6d6d73;}
.fg .btn.blue { background: var(--blue); color: #fff;}
.fg .btn.orange { background: var(--orange); color: var(--ink);}
.fg .row-btn .hint { font-size: var(--fs-lab); color: var(--muted);}
.fg .msg { margin-top: calc(16px * var(--k)); border-radius: var(--r-sm); padding: calc(12px * var(--k)) calc(14px * var(--k)); display: grid; gap: calc(4px * var(--k)); background: var(--blue-soft); border: 1px solid #a9c6ee; font-size: var(--fs-lab);}
.fg .msg b { font-weight: 500;}
.fg .msg.ok { background: #dff1cf; border-color: #b2dc90;}
.fg .msg.err { background: var(--red-soft); border-color: #e2b4b4;}
.fg .mini { width: 100%; border-collapse: collapse; font-size: var(--fs-tag);}
.fg .mini th { text-align: left; font-weight: 500; color: var(--muted); font-size: inherit; padding: calc(6px * var(--k)) calc(8px * var(--k)); border-bottom: 1.5px solid var(--line);}
.fg .mini td { padding: calc(7px * var(--k)) calc(8px * var(--k)); border-bottom: 1px solid var(--soft);}
.fg .mini td.mono { font-family: var(--mono); font-size: .95em;}
/* A mock can hold a whole document: on a phone its table stays small and tight, so the page does not run for screens. */
@media (max-width: 760px) {
  .fg .mini { line-height: 1.35;}
  .fg .mini th, .fg .mini td { padding: var(--s1) var(--s1) var(--s1) 0;}
}

/* ---------- Scene: terminal window ---------- */
.fg .term { background: var(--ink); color: #f0f0f0; border-radius: calc(10px * var(--k)); overflow: hidden; box-shadow: var(--shadow);}
.fg .term-bar { display: flex; flex-wrap: wrap; align-items: center; gap: calc(8px * var(--k)); min-height: calc(44px * var(--k)); padding: calc(6px * var(--k)) calc(14px * var(--k)); background: #3a3a3d; color: #d6d6d9; font-size: var(--fs-lab);}
/* The crumb stays on one line while it can: when the Copy label grows ("Selected, copy it now") the button takes its own row. Only a file name wider than the row breaks. */
.fg .term-bar .crumb { overflow-wrap: anywhere;}
.fg .term-bar i { background: #6d6d73;}
.fg .copy { flex: none; margin-left: auto; min-height: max(24px, calc(30px * var(--k))); padding: 0 calc(12px * var(--k)); font: 500 var(--fs-lab) "Roboto", sans-serif; color: #f0f0f0; background: transparent; border: 1px solid #8a8a90; border-radius: var(--r-sm); cursor: pointer; transition: background-color 150ms ease, transform 120ms var(--ease-out);}
.fg .copy:hover { background: #4b4b4f;}
.fg .copy:active { transform: scale(0.97);}
.fg .copy.ok { color: #b9e39b; border-color: #b9e39b;}
.fg .copy.err { color: #f5b9b9; border-color: #f5b9b9;}
.fg .term-body { padding: var(--s3) var(--s4); display: grid; gap: var(--s2); font: 400 max(12.5px, calc(15px * var(--k)))/1.5 var(--mono);}
.fg .term .cmd, .fg .term .out { display: block; background: none; padding: 0; border-radius: 0; font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; min-width: 0;}
.fg .term .cmd { color: #fff; padding-left: 2ch; text-indent: -2ch;}
.fg .term .cmd::before { content: "$ "; color: var(--orange); -webkit-user-select: none; user-select: none;}
.fg .term .cmd[data-prompt]::before { content: attr(data-prompt) " ";}
.fg .term .cmd[data-prompt] { padding-left: 0; text-indent: 0;}
/* data-prompt="": a listing, such as a file or a pasted brief. No prompt, no indent, and its lines sit together. */
.fg .term .cmd[data-prompt=""]::before { content: none;}
.fg .term-body:has(> .cmd[data-prompt=""]) { gap: 0;}
.fg .term .out { color: #d6d6d9;}
.fg .term .out.ok { color: #b9e39b;}
.fg .term .out.err { color: #f5b9b9;}
.fg .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;}

/* ---------- Scene: callout ---------- */
.fg .callout { display: grid; grid-template-columns: calc(22px * var(--k)) minmax(0, 1fr); gap: var(--s3); align-items: start; padding: var(--s3) var(--s4); border-left: calc(4px * var(--k)) solid var(--blue); border-radius: 0 var(--r-md) var(--r-md) 0; background: var(--band-blue); font-size: calc(16px * var(--k)); margin: var(--s4) 0;}
.fg .callout svg.i { width: calc(22px * var(--k)); height: calc(22px * var(--k)); color: var(--blue);}
.fg .callout .h { display: block; font-weight: 500;}
.fg .callout.warn { border-left-color: var(--orange); background: #fff5ee;}
.fg .callout.warn svg.i { color: var(--orange-text);}
.fg .callout.danger { border-left-color: var(--red); background: var(--red-soft);}
.fg .callout.danger svg.i { color: var(--red);}
.fg .band-orange .callout.warn, .fg .band-blue .callout { background: #fff;}

/* ---------- Scene: embedded diagram (Kroki, PlantUML, image, .tkd) ---------- */
.fg .diagram { background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow); padding: var(--s5);}
.fg .diagram .imageblock, .fg .diagram .imageblock .content { margin: 0;}
.fg .diagram img { margin: 0 auto; height: auto;}
.fg .diagram .imageblock .title { margin-top: var(--s3); font-size: calc(14px * var(--k)); color: var(--muted); text-align: center;}
.fg .diagram .tkd { margin: 0;}
@media (max-width: 560px) {
  .fg .diagram { padding: var(--s3);}
}

/* ---------- Scene: table ---------- */
.fg .tbl-wrap { overflow-x: auto;}
.fg .tbl { width: 100%; border-collapse: collapse; font-size: calc(16px * var(--k)); background: #fff; border-radius: var(--r-md); overflow: hidden; box-shadow: var(--shadow);}
.fg .tbl th, .fg .tbl.stack td::before { font-size: var(--fs-tag); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted);}
.fg .tbl th { text-align: left; padding: calc(14px * var(--k)) calc(18px * var(--k)); border-bottom: 1px solid var(--line);}
.fg .tbl td { padding: calc(14px * var(--k)) calc(18px * var(--k)); border-top: 1px solid var(--soft); vertical-align: top;}
.fg .tbl td.mono { font-family: var(--mono); font-size: max(11px, calc(14px * var(--k))); white-space: nowrap;}
/* A code token in a cell stays whole: "anywhere" would let the column shrink until the token breaks. The wrapper scrolls instead. */
.fg .tbl code { overflow-wrap: break-word;}
/* .tbl.stack, a table of prose cells: on a phone each row is a block, and each cell names its column from data-label. */
@media (max-width: 760px) {
  .fg .tbl.stack, .fg .tbl.stack tbody, .fg .tbl.stack tr, .fg .tbl.stack td { display: block;}
  .fg .tbl.stack thead { display: none;}
  .fg .tbl.stack tr { padding: var(--s3);}
  .fg .tbl.stack tr + tr { border-top: 1px solid var(--line);}
  .fg .tbl.stack td { padding: 0; border: 0;}
  .fg .tbl.stack td + td { margin-top: var(--s3);}
  .fg .tbl.stack td:first-child { font-weight: 500;}
  .fg .tbl.stack td:empty { display: none;}
  .fg .tbl.stack td[data-label]::before { content: attr(data-label); display: block; margin-bottom: var(--s1);}
  .fg .tbl.stack td.mono { white-space: normal; overflow-wrap: anywhere;}
}
.fg .tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(230px * var(--k)), 1fr)); gap: var(--s2);}
.fg .tile { background: #fff; border-radius: var(--r-sm); padding: calc(12px * var(--k)) var(--s3); display: grid; gap: 2px;}
.fg .tile b { font-weight: 500; font-size: calc(16px * var(--k));}
.fg .tile code { background: none; padding: 0; color: var(--muted); font-size: var(--fs-lab);}
.fg a.tile { color: inherit; text-decoration: none; transition: box-shadow 150ms ease;}
.fg a.tile:hover { box-shadow: 0 0 0 2px var(--blue-soft);}

/* ---------- Scene: FAQ and any long detail (native details) ---------- */
.fg .faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s7); align-items: start;}
@media (max-width: 860px) {
  .fg .faq { grid-template-columns: minmax(0, 1fr);}
}
.fg details { padding: var(--s4) 0; border-top: 1px solid var(--line);}
.fg summary { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s3); align-items: baseline; min-height: 24px; cursor: pointer; list-style: none; font-size: calc(19px * var(--k)); font-weight: 500; line-height: 1.3;}
.fg summary::-webkit-details-marker { display: none;}
.fg summary::after { content: ""; width: calc(8px * var(--k)); height: calc(8px * var(--k)); border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg); transition: transform 160ms var(--ease-out);}
.fg details[open] > summary::after { transform: translateY(2px) rotate(-135deg);}
.fg summary h3 { font: inherit; display: inline;}
.fg details > :not(summary) { margin-top: var(--s2); color: var(--muted); font-size: calc(16px * var(--k));}
.fg details.more { margin-top: var(--s4); padding: var(--s3) var(--s4); border: 1px solid var(--line); border-radius: var(--r-md); background: #fff;}
.fg details.more > summary { font-size: calc(16px * var(--k));}

/* ---------- Scene: closing links ---------- */
.fg .end { background: var(--ink); color: #fff;}
.fg .end .c1 { width: calc(280px * var(--k)); height: calc(280px * var(--k)); right: -90px; top: -100px; background: var(--orange);}
.fg .end .c2 { width: calc(130px * var(--k)); height: calc(130px * var(--k)); left: 5%; bottom: -70px; background: var(--purple);}
.fg .end h2 { font-size: clamp(calc(52px * var(--k)), 7.5vw, calc(96px * var(--k))); letter-spacing: -0.03em;}
.fg .end .lead { color: #d6d6d9; margin-top: var(--s4);}
.fg .asks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); margin-top: var(--s6);}
@media (max-width: 860px) {
  .fg .asks { grid-template-columns: minmax(0, 1fr);}
}
.fg .asks div { padding: var(--s4); border-radius: var(--r-md); background: rgba(255,255,255,.07);}
.fg .asks .h { display: block; font-size: calc(19px * var(--k)); font-weight: 500; margin-bottom: var(--s2);}
.fg .asks .t { color: #d6d6d9; font-size: calc(16px * var(--k));}
.fg .asks a { color: #fff; text-decoration: underline;}
.fg .cta { margin-top: var(--s6); display: inline-flex; align-items: center; gap: var(--s3); padding: var(--s3) var(--s5); min-height: calc(56px * var(--k)); border-radius: calc(999px * var(--k)); background: var(--orange); color: var(--ink); font-weight: 500; font-size: calc(18px * var(--k)); text-decoration: none; transition: transform 140ms var(--ease-out), background-color 150ms ease;}
.fg .cta:hover { background: #f68a3d;}
.fg .cta:active { transform: scale(0.97);}
.fg .end a:focus-visible { outline-color: #fff;}
.fg .end code { background: color-mix(in srgb, currentColor 16%, transparent); color: inherit;}

/* ---------- Scene: system map. The base rules are the whole map as grouped text: no JS and print ---------- */
.fg .map { position: relative; margin: var(--s5) var(--s4) 0;}
.fg .map-stage { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(320px * var(--k))), 1fr)); gap: var(--s4); align-items: start;}
.fg .map-col { display: grid; gap: var(--s3); min-width: 0;}
.fg .map-grp { min-width: 0; padding: var(--s3); background: #fff; border-radius: var(--r-md); box-shadow: 0 1px 2px rgba(43,43,43,.06);}
.fg .map-grp > h3, .fg .map-scn > h3, .fg .map-sub { font-size: var(--fs-lab); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s2);}
.fg .map-grp > h3 small { display: block; font: 400 .92em var(--mono); letter-spacing: 0; text-transform: none;}
.fg .map-els { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2);}
.fg .el-n { font: 500 calc(14px * var(--k)) var(--mono); color: var(--blue);}
.fg .el-t { display: block; font-size: calc(14px * var(--k)); color: var(--muted);}
.fg .el-m, .fg .el-s { display: block; margin-top: var(--s1); font-size: calc(14px * var(--k)); color: var(--muted);}
.fg .el-s strong { display: block; color: var(--ink); font-weight: 500;}
.fg .el-s ul { margin: var(--s1) 0 0; padding-left: 1.2em;}
.fg .el-s li { margin-bottom: var(--s1);}
.fg .el[data-alias] .el-n::after { content: " (also here)"; font: 400 .9em "Roboto", sans-serif; color: var(--muted);}
.fg .map-legend { margin-top: var(--s3); font-size: var(--fs-cap); color: var(--muted);}
.fg .map-scns { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(360px * var(--k))), 1fr)); gap: var(--s4); margin-top: var(--s4);}
.fg .map-steps { margin: 0; padding-left: 1.4em; font-size: calc(15px * var(--k)); display: grid; gap: var(--s2);}
.fg .map-steps li.no { color: var(--red);}
.fg .map-edges { margin: var(--s2) 0 0; padding-left: 1.2em; font-size: var(--fs-cap); color: var(--muted); columns: 2 calc(340px * var(--k)); column-gap: var(--s5);}
.fg .map-edges li { margin-bottom: var(--s1); break-inside: avoid;}
.fg .map-skip { position: absolute; left: var(--s3); top: var(--s2); z-index: 9; padding: var(--s1) var(--s2); background: #fff; border-radius: var(--r-sm);}
.fg .map-skip:not(:focus) { width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%);}

/* The map with JS. Only for a screen, so print keeps the grouped text above. */
@media screen {
  .fg .map.m2d, .fg .map.mlist { background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow); overflow: hidden;}
  .fg .map-bar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2) var(--s3); padding: var(--s3); border-bottom: 1px solid var(--soft);}
  /* The portal's Ask AI button is fixed over the right edge of the page, so the controls stop short of it at any scroll. */
  .fg .m2d .map-bar { padding-right: 112px;}
  .fg .mlist .map-bar { padding-right: 56px;}
  .fg .map-pick { display: flex; flex-wrap: wrap; gap: var(--s1); flex: 1 1 auto;}
  .fg .map-scn-b { font: 500 max(13px, calc(14px * var(--k))) "Roboto", sans-serif; color: var(--muted); background: var(--soft); border: 0; border-radius: calc(999px * var(--k)); padding: var(--s1) var(--s3); min-height: 32px; cursor: pointer; transition: background-color 150ms ease, color 150ms ease;}
  .fg .map-scn-b:hover { color: var(--ink);}
  .fg .map-scn-b[aria-pressed="true"] { background: var(--ink); color: #fff;}
  .fg .map-tools { display: flex; align-items: center; gap: var(--s1);}
  .fg .map-tool { display: grid; place-items: center; min-width: 32px; height: 32px; padding: 0 var(--s1); font: 500 15px "Roboto", sans-serif; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; transition: background-color 150ms ease;}
  .fg .map-tool:hover:not(:disabled) { background: var(--soft);}
  .fg .map-tool:disabled { color: #9a9aa0; cursor: default;}
  .fg .map-tool svg.i { width: 16px; height: 16px;}
  .fg .map-tool.flip svg { transform: rotate(180deg);}
  .fg .map-pct { min-width: 4ch; margin-left: var(--s1); font-size: 13px; color: var(--muted);}
  .fg .m2d .map-legend { margin: 0; padding: var(--s2) var(--s3); border-top: 1px solid var(--soft);}
  .fg .map-cap { display: none; gap: var(--s3); align-items: baseline; padding: var(--s2) var(--s3); min-height: calc(2 * 1.4em + var(--s3)); font-size: max(14px, calc(17px * var(--k))); line-height: 1.4; border-bottom: 1px solid var(--soft);}
  .fg .map.has-scn .map-cap { display: flex;}
  .fg .map-cap-n { flex: none; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted);}
  .fg .map-cap.bad .map-cap-t { color: var(--red);}

  /* wide: a fixed-size stage, scaled by a transform so text and lines stay sharp */
  .fg .m2d .map-view { position: relative; overflow: hidden; background: var(--band-gray); touch-action: pan-y;}
  .fg .m2d .map-view.zoomed { touch-action: none; cursor: grab;}
  .fg .m2d .map-view.drag { cursor: grabbing;}
  .fg .m2d .map-view:focus-visible { outline: 3px solid var(--orange); outline-offset: -3px;}
  .fg .m2d .map-stage { position: absolute; left: 0; top: 0; width: 1240px; padding: 16px; display: grid; grid-template-columns: 204px fit-content(528px) 396px; justify-content: start; gap: 40px; transform-origin: 0 0; font-size: 13px; line-height: 1.3;}
  .fg .m2d .map-view.smooth .map-stage { transition: transform 240ms var(--ease-out);}
  .fg .m2d .map-col { gap: 8px;}
  .fg .m2d .map-grp { padding: 6px 8px 8px; border-radius: 8px;}
  .fg .m2d .map-grp > h3 { font-size: 12px; letter-spacing: .02em; margin: 0 0 4px; overflow-wrap: normal;}
  .fg .m2d .map-grp > h3 small { font-size: 11px;}
  .fg .m2d .map-grp.row { display: grid; grid-template-columns: 132px minmax(0, 1fr); column-gap: 8px; align-items: center; padding: 4px 8px;}
  .fg .m2d .map-grp.row > h3 { margin: 0; position: relative; z-index: 2; background: #fff; box-shadow: 0 0 0 2px #fff;}
  .fg .m2d .map-els { gap: 4px;}
  .fg .m2d .map-grp.row .map-els { display: flex; flex-wrap: wrap;}
  .fg .m2d .map-col:last-of-type .map-els { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);}
  .fg .m2d .el { position: relative; z-index: 2; min-width: 0;}
  .fg .m2d .el-n { display: block; padding: 3px 7px; font-size: 12px; line-height: 16px; overflow-wrap: anywhere; color: var(--ink); text-decoration: none; background: #fff; border: 1.5px solid var(--line); border-radius: 6px; transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;}
  .fg .m2d .t-blue .el-n { border-color: #a9c6ee;}
  .fg .m2d .t-orange .el-n { border-color: #f5c39c;}
  .fg .m2d .t-purple .el-n { border-color: #dcaed2;}
  .fg .m2d .el.opt .el-n { border-style: dashed; color: var(--muted);}
  .fg .m2d .el[data-alias] .el-n::after { content: none;}
  .fg .m2d .el-n:hover { border-color: var(--blue);}
  .fg .m2d .el.lit .el-n { background: var(--blue-soft); border-color: var(--blue);}
  .fg .m2d .el.cur .el-n { background: var(--orange-soft); border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft);}
  .fg .m2d .el.bad .el-n { background: var(--red-soft); border-color: var(--red); color: var(--red); box-shadow: 0 0 0 3px var(--red-soft);}
  .fg .m2d.live .el:not(.lit) .el-n { color: #77777d; border-color: var(--soft);}
  .fg .map-lines { position: absolute; left: 0; top: 0; z-index: 1; pointer-events: none; overflow: visible;}
  .fg .map-lines path { fill: none;}
  .fg .map-lines marker path { fill: var(--muted); fill: context-stroke;}
  .fg .map-lines .ln { stroke: #8b8f96; stroke-width: 1; opacity: .4; transition: opacity 200ms ease;}
  .fg .map-lines .ln.dash { stroke-dasharray: 4 4;}
  .fg .live .map-lines .ln { opacity: .1;}
  .fg .live .map-lines .ln.on { opacity: 1; stroke: var(--blue); stroke-width: 1.5;}
  .fg .map-lines .ln.hov { opacity: 1; stroke: var(--orange); stroke-width: 1.5;}
  .fg .map-lines .trail { stroke: var(--blue); stroke-width: 2.5;}
  .fg .map-lines .trail.bad { stroke: var(--red);}
  .fg .map-token { position: absolute; left: -7px; top: -7px; z-index: 3; display: none; width: 14px; height: 14px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 2px #fff; pointer-events: none;}
  .fg .m2d .map-token.show { display: block;}
  .fg .map-token.bad { background: var(--red);}

  /* the text the panel and the caption repeat stays in the page for search and screen readers */
  .fg .m2d .el-t, .fg .mlist .el-t, .fg .m2d .el-m, .fg .mlist .el-m, .fg .m2d .el-s, .fg .mlist .el-s, .fg .m2d .map-edges, .fg .mlist .map-edges, .fg .m2d .map-sub, .fg .mlist .map-sub { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;}
  .fg .map-info { position: absolute; right: 12px; top: 12px; z-index: 6; width: min(360px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: auto; padding: 12px 16px; background: #fff; border-radius: var(--r-md); box-shadow: var(--shadow); font-size: 14px; line-height: 1.45;}
  .fg .map-info.left { right: auto; left: 12px;}
  /* a map with room right of its columns: the panel opens there, and this line holds the place until then */
  .fg .map-ph { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: var(--fs-cap); color: var(--muted); text-align: center; pointer-events: none;}
  .fg .map-ph[hidden], .fg .mlist .map-ph, .fg .map-view.zoomed .map-ph, .fg .map-view:has(.map-info) .map-ph { display: none;}
  .fg .map-info h4 { font: 500 15px var(--mono); margin: 0 28px 4px 0;}
  .fg .map-info ul { margin: 8px 0 0; padding-left: 16px; color: var(--muted); font-size: 13px;}
  .fg .map-info details { margin-top: 8px; padding: 8px 0 0; border-top: 1px solid var(--soft);}
  .fg .map-info summary { font-size: 13px; font-weight: 500; min-height: 24px; align-items: center;}
  .fg .map-more { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; width: 100%; margin-top: 8px; padding: 8px 0 0; font: 500 13px/1.3 "Roboto", sans-serif; color: var(--ink); text-align: left; background: none; border: 0; border-top: 1px solid var(--soft); cursor: pointer;}
  .fg .map-more::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: translateY(-2px) rotate(45deg);}
  .fg .map-more[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg);}
  .fg .map-more-body > p { margin: 8px 0 0;}
  .fg .map-entry { display: inline-block; margin-top: 4px; padding: 4px 0; font-size: 13px;}
  .fg .map-info li { margin-bottom: 4px;}
  .fg .map-close { position: absolute; right: 8px; top: 8px; min-width: 28px; height: 28px; border: 0;}

  /* narrow: the same elements and scenarios as a grouped list */
  .fg .mlist .map-zoom, .fg .mlist .map-legend, .fg .mlist .map-cap, .fg .mlist .map-lines, .fg .mlist .map-token { display: none !important;}
  .fg .mlist .map-view { padding: var(--s3); background: var(--band-gray);}
  .fg .mlist .map-stage { grid-template-columns: minmax(0, 1fr); gap: var(--s3);}
  .fg .mlist .map-grp { padding: var(--s2) var(--s3) var(--s3);}
  .fg .mlist .map-els { display: flex; flex-wrap: wrap; gap: var(--s1);}
  .fg .mlist .el { max-width: 100%;}
  .fg .mlist .el-n { display: inline-block; padding: 10px var(--s2); font-size: 12.5px; overflow-wrap: anywhere; color: var(--ink); text-decoration: none; background: #fff; border: 1.5px solid var(--line); border-radius: 6px;}
  .fg .mlist .el.opt .el-n { border-style: dashed;}
  .fg .mlist .el.lit .el-n { background: var(--blue-soft); border-color: var(--blue);}
  .fg .mlist .el.cur .el-n { background: var(--orange-soft); border-color: var(--orange);}
  .fg .mlist .el:has(.map-info) { flex: 1 1 100%;}
  html:has(.fg .map.mlist) { overflow-anchor: none;} /* the panel opens in the page flow: scroll anchoring would push it off the top */
  .fg .mlist .map-info { position: relative; right: auto; top: auto; width: auto; max-height: 70vh; margin-top: var(--s1); padding: var(--s2) var(--s3); background: #fff; border: 1px solid var(--line); border-radius: var(--r-sm); font-size: 14px;}
  .fg .mlist .map-info h4 { font: 500 14px var(--mono); margin: 0 28px var(--s1) 0;}
  .fg .mlist .map-info ul { margin: var(--s2) 0 0; padding-left: var(--s3); color: var(--muted); font-size: 13px;}
  .fg .mlist .map-close { position: static; float: right; margin: calc(var(--s2) * -1) calc(var(--s3) * -1) 0 0; min-width: 44px; height: 44px; border: 0;}
  .fg .mlist .map-tool { min-width: 44px; height: 44px;}
  .fg .mlist .map-more, .fg .mlist .map-info summary { min-height: 44px; align-items: center;}
  .fg .mlist .map-entry { min-height: 44px; padding: 12px 0;}
  .fg .mlist .map-scn-b { min-height: 40px;}
  .fg .mlist .map-bar { order: -2;}
  .fg .mlist .map-scns { display: block; order: -1; margin: 0; padding: 0 var(--s3);}
  .fg .mlist .map-steps { padding: var(--s3) 0 var(--s3) 1.3em;}
  .fg .mlist .map-steps li { color: var(--muted); transition: color 200ms ease;}
  .fg .mlist .map-steps li.now { color: var(--ink); font-weight: 500;}
  .fg .mlist .map-steps li.now.no { color: var(--red);}
  .fg .mlist .map-steps li.was { color: var(--ink);}
  .fg .mlist { display: flex; flex-direction: column;}

  /* wide, motion on: the caption walks the steps, so the full lists stay for search and screen readers */
  .fg .m2d .map-scns { padding: 0 var(--s3) var(--s3);}
}
@media screen and (prefers-reduced-motion: no-preference) {
  .fg .mlist .map-scn:not(.cur), .fg .mlist .map-scn > h3 { display: none;}
  .fg .m2d .map-scns { position: absolute; width: 1px; height: 1px; padding: 0; margin: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap;}
}

/* ---------- Diagrams: palette ---------- */
/* Validated with the dataviz validator, light on #fff and dark on #1f2024: categorical order blue, orange, purple, green, teal;
   ordinal slate. The portal has no dark theme today and .fg stays white, so the dark steps wait on [data-theme="dark"]. */
.fg { --vz-surface: #fff; --vz-ink: var(--ink); --vz-muted: var(--muted); --vz-line: var(--line); --vz-off: #8f8f96;
  --vz-blue: var(--blue); --vz-orange: var(--orange); --vz-purple: var(--purple); --vz-green: var(--green); --vz-teal: #0e8ea3; --vz-gray: #8b8f96;
  --vz-o1: #a9b4c0; --vz-o2: #6b7c8e; --vz-o3: #2f3e50;}
:root[data-theme="dark"] .fg { --vz-surface: #1f2024; --vz-ink: #e9e9ec; --vz-muted: #b5b5bb; --vz-line: #3a3b41; --vz-off: #77777d;
  --vz-blue: #4a8fd0; --vz-orange: #d96a1e; --vz-purple: #c65aad; --vz-green: #46a02f; --vz-teal: #21a3b8; --vz-gray: #8b8f96;
  --vz-o1: #566576; --vz-o2: #8493a4; --vz-o3: #c0ccd8;}
:root[data-theme="dark"] .fg :is(.stats, .routes, .dnts, .orbit, .skinds, .bars, .mx, .dflow, .stair, .swaps) { --ink: #e9e9ec; --muted: #b5b5bb; --line: #3a3b41; --soft: #34353b; background: var(--vz-surface); color: var(--vz-ink);}
.fg [data-tone="blue"] { --t: var(--vz-blue);}
.fg [data-tone="orange"] { --t: var(--vz-orange);}
.fg [data-tone="purple"] { --t: var(--vz-purple);}
.fg [data-tone="green"] { --t: var(--vz-green);}
.fg [data-tone="teal"] { --t: var(--vz-teal);}
.fg [data-tone="gray"] { --t: var(--vz-gray);}
.fg [data-tone="o1"] { --t: var(--vz-o1);}
.fg [data-tone="o2"] { --t: var(--vz-o2);}
.fg [data-tone="o3"] { --t: var(--vz-o3);}

/* ---------- Scene: stat tiles ---------- */
.fg .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(190px * var(--k))), 1fr)); gap: var(--s3);}
.fg .stat { display: block; padding: var(--s3); background: var(--vz-surface); border: 1px solid var(--vz-line); border-radius: var(--r-md); color: var(--vz-muted); font-size: max(13px, calc(14px * var(--k))); line-height: 1.4; text-decoration: none;}
.fg .stat b { display: block; font-size: max(30px, calc(44px * var(--k))); font-weight: 700; line-height: 1.05; color: var(--vz-ink);}
.fg .stat span { display: block; margin-bottom: var(--s1); font-weight: 500; color: var(--vz-ink);}
.fg a.stat:hover { border-color: var(--blue);}

/* ---------- Scene: picks. A row in the page; details is the expansion, so it needs no script ---------- */
.fg .routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, calc(480px * var(--k))), 1fr)); gap: 0 var(--s5); align-items: start;}
.fg .routes details { padding: var(--s2) 0;}
.fg .routes summary { grid-template-columns: minmax(0, 1fr) auto; padding-right: var(--s1); font-size: max(14px, calc(16px * var(--k))); font-weight: 400;}
.fg .routes summary b { font-weight: 500;}
.fg .routes summary code { white-space: nowrap;}
@media (max-width: 760px) { .fg .routes summary code { white-space: normal;} }
.fg .routes summary .to { color: var(--muted);}
.fg .routes details > p { font-size: max(13px, calc(15px * var(--k)));}

/* the chip a pick turns into, and its card */
.fg .pick-b { display: inline-block; margin: 0; padding: 2px 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; border-radius: 4px;}
.fg .pick-b code { background: var(--soft); transition: background-color 150ms ease;}
.fg .band-gray .skind .pick-b code, .fg .band-gray .skind code { background: #fff;}
.fg .pick-b:hover code, .fg .band-gray .skind .pick-b:hover code { background: var(--blue-soft);}
.fg .pick-b.on code, .fg .band-gray .skind .pick-b.on code { background: var(--ink); color: #fff;}
.fg .pick-card { position: relative; margin-top: var(--s2); padding: var(--s2) var(--s3) var(--s3); background: var(--vz-surface); border: 1px solid var(--vz-line); border-radius: var(--r-md); font-size: max(13px, calc(14px * var(--k))); line-height: 1.45; color: var(--vz-muted);}
.fg .pick-card h4 { margin: 0 32px var(--s1) 0; font: 500 max(14px, calc(16px * var(--k))) var(--mono); color: var(--vz-ink);}
.fg .pick-card .map-close { position: absolute; right: 4px; top: 4px; min-width: 32px; height: 32px; border: 0; background: none;}
.fg .pick-card .el-l { margin: var(--s2) 0 0;}
.fg .el-l { display: grid; gap: var(--s1); margin: var(--s1) 0 0; font-size: max(13px, calc(14px * var(--k))); color: var(--vz-muted);}
.fg .el-l dt { font-weight: 500; color: var(--vz-ink);}
.fg .el-l dd { margin: 0 0 var(--s1); display: flex; flex-wrap: wrap; gap: 2px var(--s1); align-items: baseline;}
.fg .el-l code.pre, .fg .el-l .pre code { font-weight: 700;}
.fg .el-l code.unv, .fg .el-l .unv code { text-decoration: underline dashed; text-underline-offset: 3px;}

/* ---------- Scene: donut row ---------- */
.fg .dnts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--s3); margin: var(--s5) var(--s4) 0; align-items: start;}
.fg .dnt { min-width: 0; padding: var(--s3); background: var(--vz-surface); border: 1px solid var(--vz-line); border-radius: var(--r-md);}
.fg .dnt h3 { font-size: max(14px, calc(17px * var(--k))); color: var(--vz-ink);}
.fg .dnt-svg { display: block; width: 100%; max-width: 168px; margin: var(--s2) auto;}
.fg .dnt-w { fill: var(--t); cursor: pointer; transition: opacity 150ms ease;}
.fg .dnt-w:not([data-el]) { cursor: default;}
.fg .has-on .dnt-w:not(.on) { opacity: .28;}
.fg .dnt-n { font-size: 24px; font-weight: 700; text-anchor: middle; fill: var(--vz-ink);}
.fg .dnt-u { font-size: 9px; text-anchor: middle; fill: var(--vz-muted);}
.fg .dnt ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); font-size: max(13px, calc(14px * var(--k))); line-height: 1.35;}
.fg .dnt li { position: relative; padding-left: 16px; min-width: 0;}
.fg .dnt li::before { content: ""; position: absolute; left: 0; top: .28em; width: 10px; height: 10px; border-radius: 3px; background: var(--t);}
.fg .dnt li > b { font-weight: 700; color: var(--vz-ink);}
.fg .dnt li > span { color: var(--vz-ink);}
.fg .dnt li > .dnt-t { display: block; color: var(--vz-muted);}
.fg .dnt-m { display: flex; flex-wrap: wrap; gap: 2px var(--s1); margin-top: 2px; font-size: max(12px, calc(13px * var(--k)));}

.fg .split .dnts, .fg .wrap > .dnts { margin: 0;}

/* ---------- Scene: skill kinds. A unit chart: one chip per skill, one row per kind ---------- */
.fg .skinds { display: grid; gap: var(--s2);}
.fg .skind { display: grid; grid-template-columns: calc(120px * var(--k)) minmax(0, 1fr); gap: var(--s1) var(--s2); align-items: baseline; padding-bottom: var(--s2); border-bottom: 1px solid var(--vz-line); font-size: max(13px, calc(14px * var(--k)));}
.fg .skind > b { font-weight: 500; color: var(--vz-ink);}
.fg .skind > b small { color: var(--vz-muted); font-size: 1em; font-weight: 400; margin-left: var(--s1);}
.fg .skind > .dnt-m { margin: 0;}
.fg .skind > .pick-card { grid-column: 1 / -1;}
.fg .skind code.user, .fg .skind .user code { outline: 2px solid var(--vz-orange); outline-offset: -1px; font-weight: 700;}
.fg .skind code.ext, .fg .skind .ext code, .fg .band-gray .skind .ext code { background: none; outline: 1px dashed var(--vz-off); outline-offset: -1px;}
.fg .key { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); margin: var(--s2) 0 0; font-size: max(13px, calc(14px * var(--k))); color: var(--vz-muted);}

.fg .kc { font-family: var(--mono);}
.fg code.kc.user { outline: 2px solid var(--vz-orange); outline-offset: -1px; font-weight: 700;}
.fg code.kc.ext { background: none; outline: 1px dashed var(--vz-off); outline-offset: -1px;}
.fg .kd { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border-radius: 50%; background: var(--t, var(--vz-gray));}
.fg .kd.h { background: none; border: 2px solid var(--vz-gray);}
.fg .kd.ink { background: var(--ink);}
.fg .kl { display: inline-block; width: 22px; margin-right: 4px; vertical-align: middle; border-top: 2px solid var(--t);}
.fg .kl.thick { border-top-width: 4px;}
.fg .kl.dash { border-top-style: dashed;}
.fg .kl.arrow { position: relative;}
.fg .kl.arrow::after { content: ""; position: absolute; right: -1px; top: -5px; border-left: 7px solid var(--t); border-top: 4px solid transparent; border-bottom: 4px solid transparent;}

/* ---------- Scene: bars. Text only without JS: the track exists under .fg-js ---------- */
.fg .bars { display: grid; gap: var(--s1); font-size: max(13px, calc(14px * var(--k)));}
.fg .bars > h3, .fg .bars > h4 { margin-top: var(--s2); font-size: max(13px, calc(14px * var(--k))); font-weight: 700; color: var(--vz-ink);}
.fg .bars > :is(h3, h4):first-child { margin-top: 0;}
.fg .brow { padding: 0; border: 0; min-width: 0;}
.fg .brow > summary, .fg div.brow { display: grid; grid-template-columns: minmax(0, 36%) minmax(0, 1fr) auto; gap: var(--s2); align-items: center; min-height: 26px; font-size: inherit; font-weight: 400;}
.fg div.brow { grid-template-columns: minmax(0, 36%) minmax(0, 1fr);}
.fg .bar-l { min-width: 0; color: var(--vz-ink);}
.fg .bar-l .lz { margin-left: var(--s1); font-size: 11px; padding: 0 5px;}
.fg .bar-t { min-width: 0; padding-right: 5em;}
.fg .bar-v { font-weight: 500; color: var(--vz-ink); white-space: nowrap;}
.fg-js .fg .bar-f { display: block; position: relative; width: 0; min-width: 1px; height: 14px; border-radius: 0 4px 4px 0; background: var(--t, var(--vz-blue));}
.fg-js .fg .bar-v { position: absolute; left: 100%; top: 50%; transform: translateY(-50%); margin-left: 6px;}
.fg .brow > :not(summary) { margin-top: var(--s1); font-size: inherit;}
.fg details.brow > :not(summary):not(.pick-card) { padding-left: 36%;}

/* ---------- Scene: dot matrix. A real table; under 760px each row is its name and chips ---------- */
.fg .mx { width: 100%; border-collapse: collapse; font-size: max(13px, calc(14px * var(--k)));}
.fg .mx th, .fg .mx td { padding: 3px 4px; border-bottom: 1px solid var(--vz-line); font-weight: 400; color: var(--vz-ink);}
.fg .mx thead th { vertical-align: bottom; font-size: max(11px, calc(13px * var(--k))); line-height: 1.15; color: var(--vz-muted); text-align: center;}
.fg .mx thead th:first-child { text-align: left;}
.fg .mx tbody th { text-align: left; min-width: calc(240px * var(--k));}
.fg .mx tbody th details { padding: 0; border: 0;}
.fg .mx tbody th summary { font-size: inherit; font-weight: 400; min-height: 22px; align-items: center;}
.fg .mx tbody th summary code { justify-self: start;}
.fg .mx tbody th details > :not(summary) { font-size: inherit; margin-top: 2px;}
.fg .mx .mx-g th { padding-top: var(--s2); font-weight: 700; border-bottom: 1px solid var(--vz-ink);}
.fg .mx .mx-g th small { display: block; font-size: 1em; font-weight: 400; color: var(--vz-muted);}
.fg .mx td { text-align: center; width: calc(62px * var(--k));}
.fg .mx-d { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--t, var(--vz-ink)); border: 2px solid var(--t, var(--vz-ink)); font-size: 0; vertical-align: middle;}
.fg .mx-d.h { background: none;}
/* .mx.words: the same table with words in the cells, for a side-by-side comparison. */
.fg .mx.words { table-layout: fixed;}
.fg .mx.words thead th { padding: var(--s1) var(--s3) var(--s1) 0; text-align: left;}
.fg .mx.words thead th:first-child { width: 26%;}
.fg .mx.words tbody th { min-width: 0; padding: var(--s2) var(--s3) var(--s2) 0; vertical-align: top; font-weight: 500;}
.fg .mx.words td { width: auto; padding: var(--s2) var(--s3) var(--s2) 0; text-align: left; vertical-align: top;}
@media (max-width: 760px) {
  .fg .mx, .fg .mx tbody, .fg .mx tr, .fg .mx tbody th { display: block; width: auto; min-width: 0;}
  .fg .mx thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%);}
  .fg .mx tr { padding: var(--s2) 0; border-bottom: 1px solid var(--vz-line);}
  .fg .mx th, .fg .mx td { border: 0;}
  .fg .mx td { display: inline-block; width: auto; padding: 2px 2px 0 0;}
  .fg .mx td:empty { display: none;}
  .fg .mx td::before { content: attr(data-label); display: inline-block; padding: 2px var(--s1); border: 1px solid var(--vz-muted); border-radius: 4px; font-size: 12px; color: var(--vz-ink);}
  .fg .mx td:has(.mx-d.h)::before { border-style: dashed;}
  .fg .mx td .mx-d { display: none;}
  .fg .mx.words td { display: block; padding: var(--s1) 0 0;}
  .fg .mx.words tbody th { padding: 0;}
  .fg .mx.words td::before { display: block; padding: 0; border: 0; font-size: var(--fs-tag); font-weight: 500; color: var(--vz-muted);}
}

.fg .wrap > p + .stepline { margin-top: var(--s4);}

/* ---------- Scene: decision flow ---------- */
:where(.fg .dflow) { margin: 0;}
.fg .dflow { list-style: none; padding: 0; display: flex; gap: var(--s5); align-items: flex-start;}
.fg .dflow > li { flex: 1 1 0; position: relative; display: grid; gap: var(--s1); align-content: start; padding: var(--s3); background: var(--vz-surface); border: 1px solid var(--vz-line); border-radius: var(--r-md); font-size: max(13px, calc(14px * var(--k))); line-height: 1.4; color: var(--vz-muted); min-width: 0;}
.fg .dflow > li:not(:last-child)::after { content: "\2192"; position: absolute; right: calc(var(--s5) * -1); top: var(--s3); width: var(--s5); text-align: center; font-size: 18px; line-height: 1.2; color: var(--vz-muted);}
.fg .dflow h3 { font-size: max(14px, calc(17px * var(--k))); color: var(--vz-ink);}
.fg .dflow > li:has(.df-out) { flex-grow: 1.4;}
.fg .dflow .ask { border-color: var(--orange); border-width: 2px;}
.fg .df-out { list-style: none; margin: var(--s1) 0 0; padding: 0; display: grid; gap: var(--s1);}
.fg .df-out li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: var(--s1); align-items: baseline;}
.fg .df-out .lz { font-size: 11px; padding: 0 5px;}
.fg .dflow details { padding: var(--s1) 0 0; font-size: inherit;}
.fg .dflow details summary { font-size: inherit; font-weight: 500; color: var(--vz-ink);}
.fg .dflow details > :not(summary) { font-size: inherit;}
@media (max-width: 900px) {
  .fg .dflow { flex-direction: column; align-items: stretch; gap: var(--s4);}
  .fg .dflow > li { flex: none;}
  .fg .dflow > li:not(:last-child)::after { content: "\2193"; right: auto; left: var(--s3); top: auto; bottom: calc(var(--s4) * -1); width: auto; height: var(--s4);}
}
/* .dflow.loop: the same boxes on a closed cycle. A rail runs from the last box back to the first; li.back names it, li.exit is the way out. */
.fg .dflow.loop { position: relative; align-items: stretch; padding: var(--s4) 0 var(--s6);}
.fg .dflow.loop::before { content: ""; position: absolute; left: var(--s5); right: var(--s5); bottom: var(--s3); height: calc(var(--s6) - var(--s3)); border: 2px solid var(--vz-muted); border-top: 0; border-radius: 0 0 var(--r-md) var(--r-md);}
.fg .dflow.loop::after { content: ""; position: absolute; left: calc(var(--s5) - 4px); bottom: calc(var(--s6) - 8px); border: 5px solid transparent; border-top: 0; border-bottom: 8px solid var(--vz-muted);}
.fg .dflow.loop > .exit { border: 2px solid var(--vz-green);}
.fg .dflow.loop > .exit::before { content: "\2191"; position: absolute; left: var(--s3); top: calc(var(--s4) * -1); height: var(--s4); font-size: 18px; line-height: 1.2; color: var(--vz-green);}
.fg .dflow.loop > .back { position: absolute; z-index: 1; left: 50%; bottom: var(--s3); flex: none; max-width: 70%; padding: 0 var(--s2); border-radius: calc(999px * var(--k)); transform: translate(-50%, 50%); text-align: center;}
@media (min-width: 901px) {
  .fg .dflow.loop > li:has(+ .back)::after { content: none;}
}
@media (max-width: 900px) {
  .fg .dflow.loop { padding: 0 var(--s5) 0 0;}
  .fg .dflow.loop::before { left: auto; right: var(--s1); top: var(--s5); bottom: var(--s3); width: var(--s4); height: auto; border: 2px solid var(--vz-muted); border-left: 0; border-radius: 0 var(--r-md) var(--r-md) 0;}
  .fg .dflow.loop::after { left: auto; right: calc(var(--s5) - 1px); top: calc(var(--s5) - 4px); bottom: auto; border-width: 5px 8px 5px 0; border-style: solid; border-color: transparent var(--vz-muted) transparent transparent;}
  .fg .dflow.loop > .exit::before { content: none;}
  .fg .dflow.loop > .back { position: relative; left: auto; bottom: auto; max-width: none; border-radius: var(--r-md); transform: none; text-align: left;}
}

/* ---------- Scene: stairs and swaps ---------- */
:where(.fg .stair) { margin: 0;}
.fg .stair { --rise: calc(28px * var(--k)); list-style: none; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--s2); font-size: max(13px, calc(14px * var(--k))); line-height: 1.35; color: var(--vz-muted);}
.fg .stair li { min-width: 0; padding: var(--s2) var(--s3) var(--s3); border-top: 6px solid var(--t); background: color-mix(in srgb, var(--t) 12%, var(--vz-surface));}
.fg .stair b { display: block; font-weight: 700; color: var(--vz-ink);}
/* Every step stands on one floor and rises by one fixed step, for any number of steps. */
.fg .stair li:nth-last-child(2) { margin-top: var(--rise);}
.fg .stair li:nth-last-child(3) { margin-top: calc(var(--rise) * 2);}
.fg .stair li:nth-last-child(4) { margin-top: calc(var(--rise) * 3);}
.fg .stair li:nth-last-child(5) { margin-top: calc(var(--rise) * 4);}
.fg .stair li:nth-last-child(n+6) { margin-top: calc(var(--rise) * 5);}
@media (max-width: 560px) {
  .fg .stair { grid-auto-flow: row;}
  .fg .stair li:nth-last-child(n) { margin-top: 0;}
}
:where(.fg .swaps) { margin: 0;}
.fg .swaps { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: var(--s3); list-style: none; padding: 0; font-size: max(13px, calc(14px * var(--k))); line-height: 1.4;}
.fg .swaps li { grid-column: 1 / -1; display: grid; grid-template-columns: subgrid; gap: var(--s2) var(--s3); align-items: baseline; padding: var(--s1) 0; border-bottom: 1px solid var(--vz-line); color: var(--vz-muted);}
.fg .sw { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1); white-space: nowrap;}
.fg .sw svg.i { width: 14px; height: 14px; color: var(--vz-muted);}
.fg .pill { display: inline-block; padding: 0 var(--s1); border-radius: 4px; font: 500 max(12px, calc(13px * var(--k))) var(--mono); color: #fff; background: var(--t, var(--vz-o2));}
.fg .pill[data-tone="o1"] { color: #15202b;}
@media (max-width: 560px) {
  .fg .swaps { display: block;}
  .fg .swaps li { grid-template-columns: minmax(0, 1fr); gap: 2px;}
}

/* ---------- Scene: orbit. The base rules are the whole data as grouped text: no JS and print ---------- */
.fg .orbit { margin: var(--s5) var(--s4) 0;}
.fg .orb-src { columns: 3 calc(340px * var(--k)); column-gap: var(--s5);}
.fg .orb-grp { break-inside: avoid-column; margin-bottom: var(--s3);}
.fg .orb-grp > h3 { font-size: var(--fs-lab); font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--vz-muted);}
.fg .orb-grp ul { list-style: none; margin: var(--s1) 0 0; padding: 0; display: grid; gap: var(--s2);}
.fg .orb-grp .el-t { display: block;}
.fg .orb-grp .el-m { display: block; margin-top: 2px; font-size: calc(14px * var(--k)); color: var(--vz-muted);}
@media screen {
  .fg .orbit.owide, .fg .orbit.olist { padding: var(--s3); background: var(--vz-surface); border-radius: var(--r-md); box-shadow: var(--shadow);}
  .fg .orb-bar { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s3); align-items: center; margin-bottom: var(--s2);}
  .fg .orb-toggles, .fg .orb-tabs { display: flex; flex-wrap: wrap; gap: var(--s1);}
  .fg .orb-hint { font-size: max(12px, calc(13px * var(--k))); color: var(--vz-muted);}
  .fg .olist .orb-hint, .fg .olist .orb-find { display: none;}
  .fg .orb-find { max-width: 240px; min-height: 32px; padding: 0 var(--s1); font: 400 13px var(--mono); color: var(--vz-ink); background: var(--vz-surface); border: 1px solid var(--vz-line); border-radius: 6px;}
  .fg .owide .orb-tabs, .fg .olist .orb-toggles, .fg .olist .orb-view > svg { display: none;}
  .fg .owide .orb-src { display: none;}
  .fg .owide .orb-view { display: flex; flex-wrap: wrap; gap: var(--s3); align-items: flex-start;}
  .fg .owide .pick-card { flex: 1 1 calc(320px * var(--k)); min-width: 260px; margin-top: 0; max-height: 860px; overflow: auto;}
  .fg .orb-svg { display: block; flex: 3 1 640px; min-width: 0; max-width: 880px;}
  .fg .orb-arc { fill: var(--t, var(--vz-gray));}
  .fg .orb-g { font: 400 10px "Roboto", sans-serif; fill: var(--vz-muted); paint-order: stroke; stroke: var(--vz-surface); stroke-width: 3px;}
  .fg .orb-l { fill: none; stroke-width: 1; opacity: .13; transition: opacity 150ms ease;}
  .fg .rel-skill { stroke: var(--vz-green);}
  .fg .rel-mcp { stroke: var(--vz-teal);}
  .fg .rel-starts { stroke: var(--vz-orange);}
  .fg .orb-tip { fill: var(--vz-orange);}
  .fg .orb-l.unv { stroke-dasharray: 4 3;}
  .fg .has-sel .orb-l { opacity: .04;}
  .fg .has-sel .orb-l.on { opacity: 1; stroke-width: 1.75;}
  .fg .has-sel .orb-l.on.pre { stroke-width: 3.5;}
  .fg .off-skill .rel-skill, .fg .off-mcp .rel-mcp, .fg .off-starts .rel-starts { display: none;}
  .fg .orb-hit { fill: transparent;}
  .fg .orb-n { cursor: pointer; outline: none;}
  .fg .orb-n:focus-visible .orb-hit { fill: none; stroke: var(--orange); stroke-width: 2;}
  .fg .orb-d { fill: var(--t, var(--vz-gray)); stroke: var(--vz-surface); stroke-width: 2;}
  .fg .orb-d.noskill { fill: var(--vz-surface); stroke: var(--t, var(--vz-gray)); stroke-width: 2;}
  .fg .orb-t { font: 400 13px "Roboto", sans-serif; fill: var(--vz-ink); transition: opacity 150ms ease;}
  .fg .has-sel .orb-n:not(.sel):not(.rel) .orb-t { fill: var(--vz-muted); opacity: .6;}
  .fg .orb-n.rel .orb-t { font-weight: 500;}
  .fg .orb-n.sel .orb-t { font-weight: 700;}
  .fg .orb-n:hover .orb-t { text-decoration: underline;}
  .fg .orb-legend { margin: var(--s2) 0 0;}
  .fg .orb-legend svg { width: 26px; height: 10px; vertical-align: middle;}
  .fg .olist { display: flex; flex-direction: column;}
  .fg .olist .orb-src { columns: auto;}
  .fg .olist .orb-grp { margin-bottom: var(--s2);}
  .fg .olist .orb-grp ul { display: flex; flex-wrap: wrap; gap: var(--s1);}
  .fg .olist .el { max-width: 100%;}
  .fg .olist .el:has(.pick-card) { flex: 1 1 100%;}
  .fg .olist .el > .el-t, .fg .olist .el > .el-m, .fg .olist .el > .el-l { display: none;}
  .fg .olist .el-n { display: inline-block; padding: 13px var(--s2); font: 500 12.5px var(--mono); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; background: var(--soft); border-radius: 6px;}
  .fg .olist .el.cur .el-n { background: var(--ink); color: #fff;}
  .fg .olist[data-show] .orb-grp:not(.arc-on) { display: none;}
  .fg .olist .map-scn-b { min-height: 40px;}
  .fg .olist .pick-card .map-close { min-width: 44px; height: 44px;}
  @media (max-width: 760px) {
    .fg .pick-b { display: inline-flex; align-items: center; min-height: 40px; padding: 0;}
    .fg .brow > summary, .fg .routes summary, .fg .mx tbody th summary, .fg .dflow details summary { min-height: 44px; align-items: center;}
    .fg .skind { grid-template-columns: minmax(0, 1fr);}
    .fg .brow > summary, .fg div.brow { grid-template-columns: minmax(0, 1fr) auto; row-gap: 2px;}
    .fg div.brow { grid-template-columns: minmax(0, 1fr);}
    .fg .bar-l { grid-column: 1 / -1;}
    .fg details.brow > :not(summary):not(.pick-card) { padding-left: 0;}
  }
}

/* ---------- Scene: featured pages. The whole card is the link, on the ink of .term and .end, and each motif is a tiny drawing of a scene on its target page ---------- */
.fg .feat { list-style: none; margin: var(--s4) 0 var(--s7); padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--s3);}
.fg .feat > li { min-width: 0; margin: 0;}
/* The motif colours are the palette's validated dark steps, since the field stays ink in every theme. Orange stays the kit's own, to match the arrow. */
.fg .feat-c { --vz-blue: #4a8fd0; --vz-orange: var(--orange); --vz-purple: #c65aad; --vz-green: #46a02f; --vz-gray: #8b8f96;
  display: flex; flex-direction: column; gap: var(--s2); height: 100%; padding: var(--s3); border-radius: var(--r-md); background: var(--ink); color: #d6d6d9; font-size: max(13px, calc(15px * var(--k))); line-height: 1.4; text-decoration: none; transition: background-color 150ms ease;}
.fg .feat-m { display: block; flex: none; width: 100%; max-width: calc(200px * var(--k)); height: auto; color: #fff;}
.fg .feat-m .f { fill: var(--t);}
.fg .feat-m .l { fill: none; stroke: var(--t);}
.fg .feat-m text { font: 700 20px "Roboto", sans-serif;}
/* Names share a baseline across the row: a short name sits down on its own line of text, under the same gap above. */
.fg .feat-c h3 { display: flex; align-items: flex-end; min-height: 2.6em; margin-top: var(--s1); font-size: max(15px, calc(20px * var(--k))); color: #fff;}
.fg .feat-c p { text-wrap: pretty;}
.fg .feat-c b { font-weight: 500; color: #fff;}
.fg .feat-go { display: grid; place-items: center; flex: none; align-self: flex-end; margin-top: auto; width: max(24px, calc(34px * var(--k))); height: max(24px, calc(34px * var(--k))); border-radius: 50%; background: var(--orange); color: var(--ink); transition: background-color 150ms ease;}
/* The kit's orange ring on white is under 3:1, so this ring takes the darker orange of the kit's text. */
.fg a.feat-c:focus-visible { outline-color: var(--orange-text); border-radius: var(--r-md);}
.fg .feat-c:focus-visible { background: #3a3a3d;}
.fg .feat-c:focus-visible .feat-go { background: #f68a3d;}
.fg .feat-c:focus-visible .dim { opacity: .35;}
.fg .feat-m .dim { transition: opacity 150ms ease;}
@media (hover: hover) and (pointer: fine) {
  .fg .feat-c:hover { background: #3a3a3d;}
  .fg .feat-c:hover .feat-go { background: #f68a3d;}
  .fg .feat-c:hover .dim { opacity: .35;}
}
/* Three and two: the two wider cards fill the row, so no hole is left. */
@media (max-width: 1060px) {
  .fg .feat { grid-template-columns: repeat(6, minmax(0, 1fr));}
  .fg .feat > li { grid-column: span 2;}
  .fg .feat > li:nth-child(n+4) { grid-column: span 3;}
  .fg .feat-c h3 { min-height: 0;}
}
/* Phone: one row per card, the motif beside the words, so the five read as a list. The block takes a 16px gutter: the .wrap keeps 24px for text. */
@media (max-width: 640px) {
  .fg .feat { grid-template-columns: minmax(0, 1fr); gap: var(--s2); margin: var(--s4) calc(var(--s3) - var(--s4)) var(--s6);}
  .fg .feat > li, .fg .feat > li:nth-child(n+4) { grid-column: auto;}
  .fg .feat-c { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; grid-template-areas: "m n g" "m t t"; gap: var(--s1) var(--s3); align-items: start; padding: var(--s3); font-size: 14px;}
  .fg .feat-m { grid-area: m; align-self: center;}
  .fg .feat-c h3 { grid-area: n; align-self: center; margin: 0; font-size: 17px;}
  .fg .feat-c p { grid-area: t;}
  .fg .feat-go { grid-area: g; align-self: start; margin: 0;}
}

/* ---------- Print: everything visible, nothing that needs a pointer ---------- */
@media print {
  .fg { -webkit-print-color-adjust: exact; print-color-adjust: exact;}
  .fg .bar, .fg .aud-note, .fg .vbtn, .fg .copy, .fg .circle, .fg .pipe-dot, .fg .map-bar, .fg .map-hint, .fg .map-cap, .fg .map-info, .fg .map-ph, .fg .map-lines, .fg .map-token, .fg .map-skip, .fg .pick-card, .fg .orb-bar, .fg .orb-view { display: none !important;}
  .fg .map-stage { transform: none !important;}
  .fg .map-view { height: auto !important;}
  .fg .aud-off { display: block !important;}
  .fg section { padding: var(--s5) 0; overflow: visible;}
  .fg .player, .fg .card, .fg .ev, .fg .feat-c, .fg .flag, .fg .term, .fg .callout, .fg .diagram, .fg details, .fg .el, .fg .map-scn { break-inside: avoid;}
  .fg .map-grp > h3 { break-after: avoid;}
  .fg details::details-content { content-visibility: visible; height: auto;}
  .fg summary::after { display: none;}
}

/* ---------- Motion: all hidden starts live here, see the comment at the top ---------- */
@media screen and (prefers-reduced-motion: no-preference) {
  html:has(.fg) { scroll-behavior: smooth;}

  /* reveal once */
  .fg-js .fg .rv { opacity: 0; transform: translateY(calc(20px * var(--k))); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms);}
  .fg-js .fg .rv.in { opacity: 1; transform: none;}
  .fg-js .fg .pair > .rv:nth-child(2), .fg-js .fg .fail > .rv:nth-child(2) { --i: 1;}

  .fg .map-more::after { transition: transform 160ms var(--ease-out);}

  /* player button: only when something plays */
  .fg-js .fg .vbtn { display: grid; opacity: 0; transform: scale(.94); transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out), background-color 150ms ease;}
  .fg-js .fg .player:hover .vbtn, .fg-js .fg .vbtn:focus-visible, .fg-js .fg .player.paused .vbtn { opacity: 1; transform: none;}
  .fg-js .fg .vbtn:active { transform: scale(.94);}

  /* hero flow: a node is finished once the player gives it .on */
  .fg-js .fg .pipe-dot { display: block; opacity: 0; transition: transform 900ms var(--ease-in-out), opacity 200ms ease;}
  .fg-js .fg .node .ic { transition: border-color 300ms ease, color 300ms ease, box-shadow 300ms ease;}
  .fg-js .fg .node:not(.on) .ic { border-color: var(--line); color: var(--muted); box-shadow: none;}
  .fg-js .fg .node .ic::after { transition: opacity 200ms var(--ease-out) 200ms, transform 350ms var(--ease-out) 200ms;}
  .fg-js .fg .node:not(.on) .ic::after { opacity: 0; transform: scale(.6);}
  .fg-js .fg .node .out { transition: opacity 300ms ease, transform 400ms var(--ease-out);}
  .fg-js .fg .node:not(.on) .out { opacity: 0; transform: translateY(calc(6px * var(--k)));}
  .fg-js .fg .node:not(:last-of-type)::after { transform: scaleX(0); transition: transform 180ms var(--ease-out);}
  .fg-js .fg .node:not(:last-of-type):has(+ .node.on)::after { transform: none; transition: transform 900ms var(--ease-in-out);}

  /* before and now: the old steps are struck, then the arrow, then the results */
  .fg-js .fg .old .x { transition: background-size 450ms var(--ease-out); transition-delay: calc(300ms + var(--i, 0) * 180ms);}
  .fg-js .fg .old li:nth-child(2) .x { --i: 1;}
  .fg-js .fg .old li:nth-child(3) .x { --i: 2;}
  .fg-js .fg .old li:nth-child(4) .x { --i: 3;}
  .fg-js .fg .old li:nth-child(5) .x { --i: 4;}
  .fg-js .fg .vs:not(.in) .old .x { background-size: 0 2px;}
  .fg-js .fg .vs .arrow { transition: opacity 400ms var(--ease-out) 1100ms, transform 400ms var(--ease-out) 1100ms;}
  .fg-js .fg .vs:not(.in) .arrow { opacity: 0; transform: scale(.9);}
  .fg-js .fg .auto li { transition: opacity 400ms var(--ease-out), transform 400ms var(--ease-out); transition-delay: calc(1400ms + var(--i, 0) * 120ms);}
  .fg-js .fg .auto li:nth-child(2) { --i: 1;}
  .fg-js .fg .auto li:nth-child(3) { --i: 2;}
  .fg-js .fg .auto li:nth-child(4) { --i: 3;}
  .fg-js .fg .auto li:nth-child(n+5) { --i: 4;}
  .fg-js .fg .vs:not(.in) .auto li { opacity: 0; transform: translateY(calc(8px * var(--k)));}

  /* step line draws from left to right */
  @media (min-width: 901px) {
    .fg-js .fg .stepline:not(.v) > li:not(:last-child)::before { transition: transform 450ms var(--ease-in-out) 150ms;}
    .fg-js .fg .stepline:not(.v) > li:nth-child(2)::before { transition-delay: 450ms;}
    .fg-js .fg .stepline:not(.v) > li:nth-child(3)::before { transition-delay: 750ms;}
    .fg-js .fg .stepline:not(.v) > li:nth-child(4)::before { transition-delay: 1050ms;}
    .fg-js .fg .stepline:not(.v) > li:nth-child(n+5)::before { transition-delay: 1350ms;}
    .fg-js .fg .stepline:not(.v):not(.in) li::before { transform: scaleX(0);}
  }

  /* flag cards slide in one after the other */
  .fg-js .fg .flag { transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out);}
  .fg-js .fg .flag:nth-of-type(2) { transition-delay: 250ms;}
  .fg-js .fg .flag:nth-of-type(n+3) { transition-delay: 500ms;}
  .fg-js .fg .flags:not(.in) .flag { opacity: 0; transform: translateX(calc(24px * var(--k)));}

  @media (hover: none) {
    .fg-js .fg .vbtn { opacity: 1; transform: none;}
  }

  /* featured pages: the card rises, the arrow leans and the motif's token takes one step along its scene. Hover is gated, so a tap on a phone leaves nothing raised. */
  .fg .feat-c { transition: background-color 150ms ease, box-shadow 200ms var(--ease-out), transform 200ms var(--ease-out);}
  .fg .feat-go svg, .fg .feat-m .go { transition: transform 240ms var(--ease-out);}
  .fg .feat-c:focus-visible .feat-go svg { transform: translateX(2px);}
  .fg .feat-c:focus-visible .go { transform: translateX(48px);}
  .fg .feat-c:active { transform: scale(0.98);}
  @media (hover: hover) and (pointer: fine) {
    .fg .feat-c:hover { transform: translateY(-3px); box-shadow: var(--shadow);}
    .fg .feat-c:hover:active { transform: scale(0.98);}
    .fg .feat-c:hover .feat-go svg { transform: translateX(2px);}
    .fg .feat-c:hover .go { transform: translateX(48px);}
  }
}
@media (prefers-reduced-motion: reduce) {
  html:has(.fg) { scroll-behavior: auto;}
  .fg, .fg *, .fg *::before, .fg *::after { transition-duration: 1ms !important; transition-delay: 0ms !important;}
}
