/* Landing "How it works" scroll story (Alex 11/18/2026; design round 3). Scenes are live HTML recreations of the app's
   own screens, in the app's own DARK tokens (frontend/css/tokens.css + accent.css values; the landing does not load the
   app CSS) and the app's font (Inter). The stage is a dark rounded panel with the live video box's look (round 5),
   on the white page after a white break where the title types. Motion: transform + opacity only (round 9: no blur), written by hiw.js
   (round 7: GSAP + ScrollTrigger scrub one master timeline with the page's native scroll, desktop and phones;
   reduced motion: last frames). */

#how-it-works.hiw { padding: 0; position: relative; border-top: 0; }
.hiw-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* no JavaScript: the three steps as plain text */
.hiw-plain { padding: 104px 0; }
.hiw-plain ol { margin: 32px 0 0; padding: 0; list-style: none; display: grid; gap: 18px; }
.hiw-plain b { display: block; font: 600 19px/1.3 var(--sans); color: var(--ink); }
.hiw-plain li span { color: var(--slate); }
.hiw.js .hiw-plain { display: none; }
.hiw-track, .hiw-blocks { display: none; }

/* the panel colours: the live video box (index.html .vid: 14 px radius, 1 px rule border, a 160deg gradient) */
.hiw { --st-bg: #1d2024; --st-ink: #f2f4f5; --st-mute: #a9b1b8; --st-rule: #343a40; --st-go: #4cc995;
  --st-panel: linear-gradient(160deg, #262a2f, var(--ink)); --st-gut: clamp(24px, 4vw, 64px); }
:root[data-theme="dark"] .hiw { --st-bg: #07090a; --st-rule: #262c31; --st-panel: linear-gradient(160deg, #1a1e22, #07090a); }

/* the break: the dark "edge" band ENDS, white breathing space where the title types, then the panel on the white page
   (Alex rounds 4 + 5: the dark areas never merge). Title = the hero headline's own font, size and spacing. */
.hiw-break { display: none; }
.hiw.js .hiw-break { display: grid; place-items: center; min-height: 20vh; padding: 5vh var(--st-gut); background: var(--paper); }
:root[data-theme="dark"] .hiw.js .hiw-break { border-top: 1px solid var(--rule); }   /* dark page: a hairline under the edge band */
.hiw-title { margin: 0; text-align: center; font: 400 clamp(42px, 6vw, 93px)/1.0 var(--serif); letter-spacing: -.025em; color: var(--ink); max-width: none; }
.hiw-title .ch { display: inline-block; opacity: 0; transform: translateY(.14em); transition: opacity .5s ease-out, transform .55s cubic-bezier(.2, .7, .3, 1); }
.hiw-title.on .ch { opacity: 1; transform: none; }
.hiw-title.fin .ch { transition: none; }   /* scrolling on while it types: it completes at once */
/* nothing shows through the translucent top nav while this section is under it (hiw.js toggles the class) */
html.hiw-under .bar, :root[data-theme="dark"].hiw-under .bar { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }

/* the step label (Alex round 5): words only, the hero headline font, big; its dots appear one by one */
.hiw-big { display: inline-block; white-space: nowrap; color: var(--st-ink); opacity: 0; transform-origin: 50% 50%; pointer-events: none;
  font: 400 100px/1.05 var(--serif); letter-spacing: -.02em; }   /* no text-shadow: on a huge glyph it cost a 367 ms frame (11/18) */
.hiw-big .dt { opacity: 0; }
.hiw-big .bi { display: inline-block; transform-origin: 50% 50%; }

/* ── A dark rounded PANEL pinned between the gutters (hiw.js adds .stg with motion: .pin on desktop, .scrub on phones) ── */
.hiw.stg .hiw-track { display: block; position: relative; height: 700vh; padding: 0 var(--st-gut); background: var(--paper); }   /* hiw.js sets the height */
.hiw-stage { position: sticky; top: 76px; height: calc(100vh - 88px); height: calc(100svh - 88px); overflow: hidden; isolation: isolate;
  border-radius: 14px; border: 1px solid var(--rule); background: var(--st-panel); }   /* 12 px of white under the nav and at the bottom; svh: the iOS address bar never resizes it */
/* behind the next label's words: the scene darkens, so its text never collides with them */
.hiw-veil { position: absolute; inset: 0; z-index: 3; opacity: 0; pointer-events: none;
  background: color-mix(in srgb, var(--st-bg) 78%, transparent); }   /* round 9: no blur anywhere (text stays sharp) */
.hiw-bigs { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.hiw-bigs .hiw-big { position: absolute; left: 50%; top: 50%; }   /* hiw.js centres it (margins) and sizes it */
.hiw-head { position: absolute; left: 28px; right: 28px; top: 22px; height: 60px; z-index: 5; }
.hiw-chip { position: absolute; left: 0; top: 0; display: flex; align-items: baseline; gap: 16px; color: var(--st-ink); white-space: nowrap; }
.hiw-chip .bt { font: 400 34px/1.05 var(--serif); letter-spacing: -.02em; opacity: 0; }
.hiw-chip .bd { font-size: 15px; color: var(--st-mute); opacity: 0; }
.hiw-bars { position: absolute; left: 0; top: 50px; width: 300px; display: flex; gap: 6px; opacity: 0; }
.hiw-bars i { flex: 1 1 0; height: 3px; border-radius: 2px; background: var(--st-rule); overflow: hidden; }
.hiw-bars b { display: block; height: 100%; background: var(--st-go); transform-origin: 0 50%; transform: scaleX(0); }
.hiw-skip { position: absolute; right: 0; top: 4px; font-size: 14px; color: var(--st-mute); text-decoration: none; padding: 6px 2px; }
.hiw-skip:hover, .hiw-skip:focus-visible, .hiw-skipu:hover, .hiw-skipu:focus-visible { color: var(--st-ink); text-decoration: underline; text-underline-offset: 3px; }
/* round 9: "Skip ↓" top-right (start, going down); "Skip ↑" bottom-right (the end, coming back up): one at a time */
.hiw-skipu { position: absolute; right: 22px; bottom: 12px; z-index: 5; font-size: 14px; color: var(--st-mute); text-decoration: none; padding: 6px 2px; display: none; }
.hiw-stage.skup .hiw-skipu { display: block; }
.hiw-stage.skup .hiw-skip { display: none; }
.hiw.scrub .hiw-skipu { right: 14px; bottom: 10px; font-size: 13px; }
.hiw-stage .hiw-swin { position: absolute; left: 50%; width: calc(var(--w) * var(--k, 1) * 1px); height: calc(var(--h) * var(--k, 1) * 1px);
  margin-left: calc(var(--w) * var(--k, 1) * -.5px); opacity: 0; z-index: 2; border-color: #2c2c33; box-shadow: 0 30px 90px -30px rgba(0, 0, 0, .8); }
.hiw-layer { position: absolute; inset: 0; transform-origin: 0 0; }   /* no will-change inside the scaled window: Chrome would freeze the raster size (soft text) */
.hiw-layer[data-a="L2"], .hiw-layer[data-a="L3"] { opacity: 0; }
.hiw-capd { position: absolute; left: 0; right: 0; margin: 0; text-align: center; font-size: 13px; color: var(--st-mute); height: 1.4em; z-index: 2; }
.hiw-capd span { position: absolute; left: 0; right: 0; opacity: 0; }

/* ── Phones (round 6, .scrub): the progress line on top, the docked words under it (two lines), the window below ── */
.hiw.scrub .hiw-head { left: 16px; right: 16px; top: 16px; height: auto; }
.hiw.scrub .hiw-bars { top: 0; width: calc(100% - 64px); }
.hiw.scrub .hiw-skip { top: -11px; font-size: 13px; padding: 6px 0 6px 10px; }
.hiw.scrub .hiw-chip { top: 16px; right: 0; flex-direction: column; align-items: flex-start; gap: 3px; white-space: normal; }
.hiw.scrub .hiw-chip .bt { font-size: 26px; white-space: nowrap; }
.hiw.scrub .hiw-chip .bd { font-size: 13px; line-height: 1.35; }
.hiw.scrub .hiw-capd { font-size: 12px; }

/* ── Reduced motion: the same panel, no pinning; each step's label + final frame ── */
.hiw.tap .hiw-blocks { display: block; margin: 0 var(--st-gut) 24px; padding: 8px 0 40px; border-radius: 14px; border: 1px solid var(--rule); background: var(--st-panel); }
.hiw-bw { max-width: 1500px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.hiw-blk { margin-top: 36px; }
.hiw-bl .hiw-big .dt { opacity: 1; }
.hiw-bl .hiw-big { opacity: 0; transition: opacity .8s ease-out; }   /* reduced motion: the title simply fades in at its spot */
.hiw-bl.on .hiw-big { opacity: 1; }
.hiw-bl .hiw-big { font-size: clamp(34px, 9vw, 64px); }
.hiw-bd { margin: 8px 0 16px; color: var(--st-mute); font-size: 16px; line-height: 1.5; }
.hiw-fig { margin: 0; min-width: 0; }
.hiw-cap { margin-top: 10px; font-size: 13px; color: var(--st-mute); }
.hiw-view { position: relative; overflow: hidden; height: calc(var(--h) * var(--k, 1) * 1px); }

/* a pick / press: a soft glow + a light sweep (no pointer) */
.hiw-g { position: absolute; inset: -2px; border-radius: inherit; overflow: hidden; pointer-events: none; opacity: 0; z-index: 4;
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--ds-accent) 85%, transparent), 0 0 26px 4px color-mix(in srgb, var(--ds-accent) 32%, transparent); }
.hiw-g i { position: absolute; top: 0; bottom: 0; left: 0; width: 40%; transform: translateX(-100%);
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .16), transparent); }
.s-sel .hiw-g { inset: 0; }

/* ── The app window (always the app's dark theme) ── */
/* the landing's own h1 / h2 / h3 rules (serif, 72 px, max-width) never reach the app screens */
.hiw-win h1, .hiw-win h2, .hiw-win h3 { font-family: inherit; color: inherit; max-width: none; letter-spacing: normal; text-wrap: wrap; margin: 0; }
.hiw-win {
  --ds-bg: #141417; --ds-surface: #1B1B1F; --ds-hover: #242429; --ds-border: #2B2B31; --ds-border-strong: #4A4A52;
  --ds-field-edge: #6E6E76; --ds-text: #DFDFE4; --ds-muted: #A2A2AA; --ds-label: #929299; --ds-accent: #7C9CFF;
  --ds-accent-soft: rgba(124, 156, 255, .14); --ds-on-accent: #141417; --ds-on-primary: #141417; --ds-pnl-up: #3DD68C;
  --ds-pnl-down: #FF6B6B; --ds-warn: #E0A43B; --ds-status-on: #3DD68C;
  --sw-blue: #7C9CFF; --sw-violet: #B39DFF;
  position: relative; overflow: hidden; border-radius: 14px; background: var(--ds-bg); color: var(--ds-text);
  border: 1px solid #2a2a30; box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .55);
  font: 400 14px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-align: left; cursor: default; -webkit-tap-highlight-color: transparent; }
/* the scene is drawn at a fixed logical size and scaled to its frame (hiw.js sets --k): crisp at every width */
.hiw-scale { position: absolute; left: 0; top: 0; width: calc(var(--w) * 1px); height: calc(var(--h) * 1px);
  transform: scale(var(--k, 1)); transform-origin: 0 0; }
.hiw-win { --w: 720; --h: 486; }
.hiw-win.nar { --w: 360; --h: 540; }
.hiw-part { position: absolute; inset: 0; padding: 22px 24px; }
.nar .hiw-part { padding: 16px; }
.hiw-part { transform-origin: 50% 40%; }


/* ── App pieces (copied from the app's CSS: strategy-modes.css, components.css, bt-progress.css, cs-open-card.css) ── */
.a-h1 { font-size: 20px; font-weight: 600; margin: 0 0 2px; }
.a-sub { color: var(--ds-muted); font-size: 13px; margin: 0; }
.a-h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; }
.a-back { color: var(--ds-accent); font-size: 13px; display: inline-block; margin-bottom: 10px; }
.a-card { background: var(--ds-surface); border: 1px solid var(--ds-border); border-radius: 10px; padding: 16px; position: relative; }
.a-grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.a-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.nar .a-grid4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nar .a-grid3 { grid-template-columns: 1fr; gap: 8px; }
.a-tag { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--ds-border);
  background: color-mix(in srgb, var(--acc) 16%, transparent); font-size: 11px; font-weight: 600; white-space: nowrap; }
.a-btn { min-height: 36px; padding: 0 14px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; border: 1px solid var(--ds-border-strong); background: transparent; color: var(--ds-text); font-size: 13px; font-weight: 500;
  white-space: nowrap; position: relative; }
.a-btn.primary { background: var(--ds-text); color: var(--ds-on-primary); border-color: var(--ds-text); }
.a-btn.off { background: var(--ds-hover); color: var(--ds-muted); border-color: var(--ds-border-strong); }
.a-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 0 7px; border: 1px solid var(--ds-accent);
  color: var(--ds-accent); border-radius: 6px; font-size: 11px; font-weight: 600; }
.a-caps { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--ds-label); }
.a-kv { display: grid; grid-template-columns: auto 1fr; gap: 5px 14px; font-size: 12px; margin: 0; }
.a-kv dt { color: var(--ds-label); }
.a-kv dd { margin: 0; text-align: right; }
.a-hr { border: 0; border-top: 1px solid var(--ds-border); margin: 10px 0; }
.up { color: var(--ds-pnl-up); }
.dn { color: var(--ds-pnl-down); }

/* scene 1: strategy cards (sc-pick) */
.s-pick { padding: 18px 16px 16px; overflow: hidden; display: flex; flex-direction: column; gap: 10px; min-height: 236px; }
.s-pick::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--acc), var(--acc2, var(--acc))); }
.s-pick .t { display: flex; align-items: center; gap: 8px; }
.s-pick .t svg { color: var(--acc); flex: none; }
.s-pick h3 { font-size: 21px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; margin: 0; white-space: nowrap; }
.s-pick .st { font-size: 13px; font-weight: 500; }
.s-pick ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; flex-grow: 1; }
.s-pick li { position: relative; padding-left: 16px; font-size: 12px; line-height: 1.4; }
.s-pick li::before { content: ""; position: absolute; left: 0; top: .65em; width: 9px; height: 2px; background: var(--ds-accent); }
.s-pick .go { color: var(--ds-accent); font-weight: 600; font-size: 13px; }
.s-pick .ring { position: absolute; inset: -1px; border-radius: 10px; border: 1px solid var(--ds-border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; }
.nar .s-pick { min-height: 0; padding: 14px 12px 12px; gap: 6px; }
.nar .s-pick h3 { font-size: 17px; }
.nar .s-pick li { font-size: 11px; padding-left: 13px; }   /* round 8: the phone cards keep their details (no empty half-panel) */
.nar .s-pick li::before { width: 7px; }
.nar .s-pick .go { display: none; }
.nar .s-pick .st { font-size: 12px; }
.acc-spx { --acc: var(--sw-blue); }
.acc-odte { --acc: var(--sw-violet); }
.acc-duo { --acc: var(--sw-blue); --acc2: var(--sw-violet); }
.acc-tsla { --acc: var(--ds-pnl-up); }
.s-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.s-top h1 { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 0; }
.s-top svg { color: var(--acc); }

/* scene 1: setting cards (sm-mode-card) */
.s-mode { display: flex; flex-direction: column; gap: 12px; padding: 16px; }
.s-mode .nm { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; }
.s-radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--ds-field-edge); position: relative; flex: none; }
.s-radio i { position: absolute; inset: 3px; border-radius: 50%; background: var(--acc); transform: scale(0); }
.s-radio b { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--acc); opacity: 0; }
.s-mode dl { margin: 0; padding-top: 10px; border-top: 1px solid var(--ds-border); display: flex; flex-direction: column; gap: 7px; }
.s-mode dl div { display: grid; grid-template-columns: minmax(64px, 1fr) minmax(0, max-content); align-items: baseline; gap: 4px 10px; font-size: 12px; }
.s-mode dt { color: var(--ds-muted); }
.s-mode dd { margin: 0; font-weight: 600; text-align: right; min-width: 0; }
.s-mode .ring { position: absolute; inset: -1px; border-radius: 10px; border: 1px solid var(--acc);
  box-shadow: 0 0 0 1px var(--acc), 0 0 0 5px color-mix(in srgb, var(--acc) 16%, transparent); opacity: 0; pointer-events: none; }
.nar .s-mode { padding: 12px 14px; gap: 8px; }
.nar .s-mode dl div:nth-child(n+3) { display: none; }

/* scene 2: the strategy page's bar + Run Backtest (run-cta; the button is the progress bar, bt-progress.css) */
.s-bar { display: flex; align-items: center; gap: 10px; padding: 14px 16px; }
.s-bar .nm { font-size: 14px; font-weight: 600; white-space: nowrap; }
.s-bar .f { display: flex; flex-direction: column; gap: 2px; font-size: 12px; }
.s-bar .f span { color: var(--ds-label); font-size: 11px; }
.s-bar .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.s-bar .dep { padding: 0 10px; }
.s-run { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; min-width: 0; padding: 0 14px; background: var(--ds-accent); color: var(--ds-on-accent); border: 1px solid var(--ds-accent);
  border-radius: 12px; font-size: 15px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap;
  box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--ds-accent) 60%, transparent); }
.s-run .fill { position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--ds-accent) 82%, var(--ds-text));
  transform-origin: 0 50%; transform: scaleX(0); }
.s-run .lb { display: inline-flex; align-items: center; gap: 8px; }
.s-run .lb2 { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; }
.nar .s-bar { flex-wrap: wrap; gap: 8px 14px; padding: 12px; }
.nar .s-bar .r { margin-left: 0; width: 100%; }
.nar .s-run { flex: 1; min-width: 0; }
.nar .s-bar .f2 { order: 3; }

.s-per span { min-height: 26px; padding: 0 5px; }
.s-dates { margin-top: 8px; font-size: 12px; color: var(--ds-muted); }
.s-tile { padding: 11px 13px; border: 1px solid var(--ds-border); border-radius: 10px; background: var(--ds-surface); }
.s-tile .k { font-size: 11px; font-weight: 500; color: var(--ds-label); text-transform: uppercase; letter-spacing: .3px; margin-bottom: 2px; white-space: nowrap; }
.s-tile .v { font-size: 18px; font-weight: 700; white-space: nowrap; }
.nar .s-tile .v { font-size: 17px; }
.s-chart { padding: 12px 14px 10px; }
.s-chart .hd { font-weight: 600; font-size: 13px; margin-bottom: 8px; display: flex; justify-content: space-between; }
.s-chart .hd span { font-weight: 400; color: var(--ds-label); font-size: 12px; }
.s-plot { position: relative; height: 118px; overflow: hidden; }
.s-plot svg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.s-rev { position: absolute; inset: 0; overflow: hidden; }
.s-rev > div { position: absolute; inset: 0; }
.s-grid line { stroke: var(--ds-border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.s-axis { position: absolute; right: 0; font-size: 10px; color: var(--ds-label); background: var(--ds-surface); padding-left: 4px; line-height: 1; }
.nar .s-plot { height: 128px; }

.s-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.s-tbl th { text-align: right; font-weight: 500; color: var(--ds-label); font-size: 11px; padding: 6px 8px; border-bottom: 1px solid var(--ds-border); white-space: nowrap; }
.s-tbl td { text-align: right; padding: 7px 8px; border-bottom: 1px solid var(--ds-border); white-space: nowrap; }
.s-tbl th:first-child, .s-tbl td:first-child { text-align: left; }
.s-tbl td.o { text-align: left; font-weight: 600; }
.s-tbl th.o { text-align: left; }
.s-tbl tr { position: relative; }
.nar .s-tbl .w { display: none; }
.s-sel { position: absolute; left: 0; right: 0; height: 31px; background: var(--ds-hover); box-shadow: inset 3px 0 0 0 var(--ds-text); opacity: 0; }
.s-det { position: absolute; left: 0; right: 0; z-index: 3; background: var(--ds-surface); border: 1px solid var(--ds-border); border-left: 3px solid var(--ds-text);
  border-radius: 12px; padding: 14px 16px; box-shadow: 0 16px 48px rgba(0, 0, 0, .55); opacity: 0; transform-origin: 50% 0; }
.s-det .hd { font-size: 13px; font-weight: 600; margin-bottom: 10px; letter-spacing: .3px; }
.s-det .cs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.s-det .c { background: var(--ds-bg); border: 1px solid var(--ds-border); border-radius: 8px; padding: 10px 12px; }
.s-det .c .k { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--ds-muted); margin-bottom: 2px; }
.s-det .c .v { font-size: 15px; font-weight: 500; }
.s-det .c .s { font-size: 11px; color: var(--ds-muted); margin-top: 2px; }
.nar .s-det .cs { grid-template-columns: 1fr 1fr; }
.nar .s-det .c:nth-child(3) { display: none; }

/* scene 3: Review and Deploy */
.s-seg { display: inline-flex; border: 1px solid var(--ds-border-strong); border-radius: 6px; overflow: hidden; }
.s-seg span { min-height: 30px; padding: 0 14px; display: inline-flex; align-items: center; font-size: 12px; color: var(--ds-muted); }
.s-seg span.on { background: var(--ds-accent); color: var(--ds-on-primary); font-weight: 500; }
.s-sel-box { display: flex; align-items: center; justify-content: space-between; height: 34px; padding: 0 10px; border: 1px solid var(--ds-field-edge);
  border-radius: 6px; font-size: 12px; background: var(--ds-bg); }
.s-fl { font-size: 12px; font-weight: 500; margin-bottom: 5px; display: block; }
.s-def { font-size: 11px; color: var(--ds-label); display: block; margin-top: 5px; }
.s-ck { display: flex; gap: 10px; align-items: flex-start; font-size: 11.5px; line-height: 1.4; padding: 5px 0; }
.s-box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--ds-field-edge); position: relative; flex: none; margin-top: 1px; }
.s-box i { position: absolute; inset: -1.5px; border-radius: 4px; background: var(--ds-accent); opacity: 0; transform: scale(.6);
  display: flex; align-items: center; justify-content: center; color: var(--ds-on-accent); }
.s-dep { position: relative; }
.s-dep .on { position: absolute; inset: -1px; border-radius: 10px; background: var(--ds-text); color: var(--ds-on-primary);
  display: flex; align-items: center; justify-content: center; opacity: 0; }
.s-ld { display: inline-block; width: 11px; height: 11px; margin-left: 8px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; opacity: 0; }   /* the press: a small loader */
.s-done { position: absolute; left: 50%; top: 50%; z-index: 6; width: 300px; margin: -64px 0 0 -150px; background: var(--ds-surface);
  border: 1px solid var(--ds-border-strong); border-radius: 14px; padding: 22px; text-align: center; box-shadow: 0 16px 48px rgba(0, 0, 0, .55); opacity: 0; }
.s-done .ok { width: 40px; height: 40px; border-radius: 50%; margin: 0 auto 10px; background: color-mix(in srgb, var(--ds-pnl-up) 16%, transparent);
  color: var(--ds-pnl-up); display: flex; align-items: center; justify-content: center; }
.s-done b { display: block; font-size: 16px; }
.s-done span { font-size: 12px; color: var(--ds-muted); }
.nar .s-done { width: 280px; margin-left: -140px; }
.nar .s-rv-set { display: none; }
.nar .s-rv { grid-template-columns: 1fr !important; }

/* scene 3: paper account + open spread card (paper-account-detail.js, cs-open-card.css) */
.s-pa-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.s-pa-h .nm { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.s-paper { font-size: 10px; font-weight: 700; letter-spacing: .06em; padding: 2px 6px; border-radius: 4px; background: var(--ds-hover); color: var(--ds-muted); }
.s-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ds-status-on); }
.s-pa-v { font-size: 24px; font-weight: 700; line-height: 1.2; }
.s-coc { padding: 12px 14px; display: grid; gap: 10px; border-radius: 14px; }
.s-coc .ph { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 14px; flex-wrap: wrap; }
.s-coc .sk { font-size: 15px; font-weight: 600; }
.s-coc .mt { font-size: 12px; color: var(--ds-muted); }
.s-coc .mt b { color: var(--ds-text); font-weight: 600; }
.s-coc .pl { display: flex; align-items: baseline; gap: 6px; }
.s-coc .pl .v { font-size: 17px; font-weight: 700; }
.s-met { border: 1px solid var(--ds-border-strong); border-radius: 10px; padding: 10px 12px; }
.s-met .mh { font-size: 13px; font-weight: 500; }
.s-met .mh b { font-size: 16px; font-weight: 700; }
.s-met .mh .p { color: var(--ds-muted); }
.s-trk { position: relative; height: 26px; margin: 8px 2px 0; }
.s-rail { position: absolute; left: 0; right: 0; top: 9px; height: 8px; border-radius: 4px; }
.s-tick { position: absolute; top: 3px; width: 2px; height: 20px; margin-left: -1px; background: var(--ds-text); }
.s-tick.e { background: var(--ds-border-strong); }
.s-mk { position: absolute; top: 1px; left: 0; width: 12px; height: 24px; margin-left: -6px; border-radius: 4px; background: var(--ds-pnl-up);
  border: 2px solid var(--ds-surface); box-shadow: 0 0 0 1px var(--ds-pnl-up); }
.s-ax { position: relative; height: 16px; font-size: 10.5px; color: var(--ds-muted); }
.s-ax span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.s-ax span b { color: var(--ds-text); font-weight: 600; }
.nar .s-coc .mt .w, .nar .s-ax .ax-s { display: none; }
.nar .s-ax .ax-t { left: 64% !important; }

/* ── Round 8 ── */
/* the footnote (Alex's wording; replaces the badge): one small muted line at the bottom of the panel, always on, centred,
   clear of the panel's edge and of the bottom-right "Skip ↑" (round 9) */
.hiw-stage p { max-width: none; }   /* fullbleed.css caps every <p> at 70ch: that pulled the footnote + captions off centre */
.hiw-foot { position: absolute; left: 76px; right: 76px; bottom: 16px; margin: 0; z-index: 4; text-align: center;
  font-size: 12px; line-height: 1.4; color: var(--st-mute); }
.hiw.scrub .hiw-foot { font-size: 11px; left: 58px; right: 58px; bottom: 14px; }
.hiw-bw .hiw-foot { position: static; margin: 28px 0 0; text-align: left; }
/* the closing line (round 9): alone in the panel at the end, centred, the hero headline font, laid out at full size */
.hiw-close { position: absolute; left: 0; right: 0; z-index: 4; margin: 0; opacity: 0; pointer-events: none; text-align: center;
  font: 400 60px/1.15 var(--serif); letter-spacing: -.02em; color: var(--st-ink); transform-origin: 50% 50%; }
.hiw-close span { display: block; white-space: nowrap; }
.hiw-bw .hiw-close { position: static; opacity: 0; transition: opacity .8s ease-out; margin-top: 48px; font-size: clamp(26px, 5vw, 48px); white-space: normal; }
.hiw-bw .hiw-close span { white-space: normal; }
.hiw-bw .hiw-close.on { opacity: 1; }
