/* Ledger, direction A. One steady night ground; the copy column on the left
   has its own clear space and the scene lives only on the right. */
@property --u { syntax: '<number>'; inherits: true; initial-value: 0; }
@property --g { syntax: '<number>'; inherits: true; initial-value: 0; }

.lg-story {
  --lg-nav: var(--site-nav-height, 88px);
  --bg: #0a0d14;
  --s1: #0f131c;
  --s2: #141925;
  --ink: #f2f3f6;
  --soft: #aab1be;
  --faint: #7e8696;
  --rule: rgba(242, 243, 246, .14);
  --sig: #97a4ff;
  --cop: #d08a5c;
  --n0: #5d6577;
  --n1: #8a92a3;
  --n2: #c6ccd8;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}
.lg-story, .lg-story *, .lg-story *::before, .lg-story *::after { box-sizing: border-box; }
.lg-story { background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
:where(.lg-story) a { color: inherit; }
.lg-story :focus-visible { outline: 2px solid var(--sig); outline-offset: 4px; }

/* The prototype note. */

/* Two columns: copy on the left, the pinned scene on the right. */
.lg-story { position: relative; display: grid; grid-template-columns: minmax(0, 42fr) minmax(0, 58fr); }
.lg-chapters { grid-column: 1; grid-row: 1; min-width: 0; padding: 0 clamp(28px, 3.6vw, 64px) 0 clamp(24px, 5vw, 80px); }
.lg-stage { grid-column: 2; grid-row: 1; position: sticky; top: var(--lg-nav); height: calc(100vh - var(--lg-nav)); height: calc(100svh - var(--lg-nav)); align-self: start; min-width: 0; border-left: 1px solid rgba(242, 243, 246, .07); }
.lg-scene { position: absolute; inset: 0; overflow: hidden; }
.lg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .6s ease; }
.is-live .lg-canvas { opacity: 1; }

/* Chapters. A chapter holds its copy while its scene plays. */
.lg-ch { position: relative; min-height: var(--len, 200vh); padding-top: 20vh; }
.lg-ch:first-child { padding-top: 16vh; }
.lg-copy { position: sticky; top: max(var(--top, 14vh), calc(var(--lg-nav) + 28px)); max-width: 540px; padding-bottom: 40px; }
.lg-ch.is-flow { min-height: 0; padding-bottom: 16vh; }
.lg-ch.is-flow .lg-copy { position: relative; top: auto; }
.lg-kicker { margin: 0 0 22px; font: 500 11px/1.5 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); }
.lg-ch h2 { margin: 0 0 24px; font: 400 clamp(32px, 3vw, 52px)/1.04 var(--sans); letter-spacing: -.045em; color: var(--ink); text-wrap: balance; }
.lg-ch h2.lg-h2-sm { font-size: clamp(26px, 2.3vw, 36px); letter-spacing: -.035em; }
.lg-lede { margin: 0 0 14px; max-width: 46ch; font: 400 clamp(16px, 1.22vw, 18px)/1.6 var(--sans); color: var(--soft); }
.lg-note { margin: 22px 0 0; max-width: 56ch; font: 400 12.5px/1.65 var(--sans); color: var(--faint); }
.lg-note a { color: var(--ink); text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* 03: the four scales. */
.lg-scale { list-style: none; margin: 30px 0 0; padding: 0; border-top: 1px solid var(--rule); counter-reset: sc; }
.lg-scale li { counter-increment: sc; display: grid; grid-template-columns: 132px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); color: var(--soft); transition: color .4s ease; }
.lg-scale li.is-on { color: var(--ink); }
.lg-scale b { font: 500 11px/1.9 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.lg-scale b::before { content: "0" counter(sc) "  "; color: var(--faint); }
.lg-scale li.is-on b::before { color: var(--sig); }
.lg-scale span { font: 400 15px/1.6 var(--sans); }

/* 04: one figure that lands on its value. */
.lg-figure { display: grid; gap: 12px; margin: 30px 0 0; padding-top: 22px; border-top: 1px solid var(--rule); }
.lg-figure strong { font: 300 clamp(64px, 6.6vw, 108px)/.9 var(--sans); letter-spacing: -.055em; font-variant-numeric: tabular-nums; color: var(--sig); }
.lg-figure span { max-width: 34ch; font: 400 16px/1.55 var(--sans); color: var(--soft); }

/* Evidence. */
.lg-proof { margin-top: 6px; border-top: 1px solid var(--rule); }
.lg-proof a { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: end; gap: 6px 26px; padding: 18px 0 20px; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--ink); }
.lg-proof a > span { grid-column: 1 / -1; font: 500 11px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.lg-proof strong { font: 300 clamp(46px, 4.3vw, 70px)/.92 var(--sans); letter-spacing: -.05em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-proof a:first-child strong, .lg-proof a:last-child strong { color: var(--sig); }
.lg-proof a:nth-child(2) strong { color: var(--ink); }
.lg-proof p { margin: 0 0 4px; font: 400 14px/1.55 var(--sans); color: var(--soft); }
.lg-proof a:hover strong { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 8px; }

/* 05: workflows, each a step the scene follows. */
.lg-wfs { margin-top: 30px; border-top: 1px solid var(--rule); }
.lg-wf { position: relative; min-height: 64vh; padding: 26px 0 30px 18px; border-bottom: 1px solid var(--rule); transition: background-color .35s ease; }
.lg-wf::before { content: ""; position: absolute; left: 0; top: 26px; bottom: 30px; width: 2px; background: var(--rule); transition: background-color .35s ease; }
.lg-wf.is-active::before { background: var(--sig); }
.lg-wf h3 { margin: 0 0 16px; display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: baseline; font: 400 clamp(21px, 1.7vw, 26px)/1.2 var(--sans); letter-spacing: -.025em; }
.lg-wf h3 span { font: 500 11px/1 var(--mono); letter-spacing: .14em; color: var(--faint); }
.lg-wf.is-active h3 span { color: var(--sig); }
.lg-wf dl { margin: 0; display: grid; gap: 10px; }
.lg-wf dl div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; }
.lg-wf dt { padding-top: 4px; font: 500 10.5px/1.6 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.lg-wf dd { margin: 0; font: 400 15px/1.6 var(--sans); color: var(--soft); }
.lg-wf dl div:last-child dd { color: var(--ink); }
.lg-ba { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; gap: 14px; margin: 20px 0 0 86px; padding: 14px 16px; background: var(--s1); border: 1px solid rgba(242, 243, 246, .09); }
.lg-ba figure { margin: 0; display: grid; gap: 9px; }
.lg-ba figcaption { font: 400 12.5px/1.45 var(--sans); color: var(--soft); }
.lg-ba figcaption b { display: block; margin-bottom: 2px; font: 500 10px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.lg-ba-to { align-self: center; margin-top: -18px; font: 400 16px/1 var(--sans); color: var(--faint); }
.lg-mini { display: block; width: 100%; max-width: 132px; height: auto; }
.m-n { fill: var(--n0); } .m-n1 { fill: var(--n1); } .m-l { fill: var(--n2); } .m-c { fill: var(--cop); }
.m-s { fill: var(--sig); } .m-t { fill: #818ccb; } .m-co { fill: none; stroke: var(--cop); stroke-width: .6; }
.lg-more { display: inline-flex; gap: 8px; margin: 16px 0 0 86px; font: 500 13.5px/1.4 var(--sans); color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--rule); }
.lg-more:hover { border-color: var(--ink); }

/* 06: the chain, and who it is for. */
.lg-chain { list-style: none; margin: 34px 0 0; padding: 0; display: grid; gap: 14px; max-width: 470px; }
.lg-chain li { position: relative; padding: 16px 18px 18px; background: var(--s1); border: 1px solid rgba(242, 243, 246, .12); cursor: default; transition: border-color .25s ease, background-color .25s ease; }
.lg-chain li + li::before { content: ""; position: absolute; left: 26px; top: -15px; height: 14px; border-left: 1px dashed var(--sig); }
.lg-chain li.is-core { border-color: rgba(151, 164, 255, .55); background: #0d1120; }
.lg-chain li:hover, .lg-chain li:focus-visible { border-color: var(--sig); background: #10152a; outline: none; }
.lg-chain span { display: block; font: 500 10.5px/1.5 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.lg-chain b { display: block; margin: 10px 0 6px; font: 400 20px/1.2 var(--sans); letter-spacing: -.02em; }
.lg-chain p { margin: 0; font: 400 14px/1.55 var(--sans); color: var(--soft); }
.lg-who { list-style: none; margin: 34px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--rule); max-width: 560px; }
.lg-who li { border-bottom: 1px solid var(--rule); }
.lg-who li:nth-child(even) { border-left: 1px solid var(--rule); }
.lg-who a { display: block; height: 100%; padding: 18px 18px 20px; text-decoration: none; }
.lg-who a:hover { background: rgba(151, 164, 255, .06); }
.lg-who b { display: block; margin-bottom: 8px; font: 400 18px/1.25 var(--sans); letter-spacing: -.02em; }
.lg-who span { font: 400 13.5px/1.55 var(--sans); color: var(--soft); }

/* 07 and 08. */
.lg-steps { list-style: none; margin: 30px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--rule); counter-reset: st; }
.lg-steps li { counter-increment: st; padding: 16px 16px 18px 0; }
.lg-steps li + li { padding-left: 16px; border-left: 1px solid var(--rule); }
.lg-steps b { display: block; margin-bottom: 6px; font: 400 16.5px/1.3 var(--sans); }
.lg-steps b::before { content: "0" counter(st); display: block; margin-bottom: 10px; font: 500 10.5px/1.5 var(--mono); letter-spacing: .14em; color: var(--sig); }
.lg-steps span { font: 400 13.5px/1.55 var(--sans); color: var(--soft); }
.lg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 30px; }
.lg-btn { display: inline-flex; align-items: center; gap: 18px; min-height: 50px; padding: 13px 18px; border: 1px solid var(--ink); border-radius: 3px; background: var(--ink); color: var(--bg); font: 500 15px/1.3 var(--sans); text-decoration: none; transition: background-color .2s ease, border-color .2s ease; }
.lg-btn:hover { background: var(--sig); border-color: var(--sig); }
.lg-link { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 500 15px/1.3 var(--sans); text-decoration: none; border-bottom: 1px solid var(--rule); }
.lg-link:hover { border-color: var(--ink); }
.lg-about { margin-top: 30px; padding-top: 16px; border-top: 1px solid var(--rule); }

/* The scene: labels, instrument frame, legend. */
.lg-labels { position: absolute; inset: 0; pointer-events: none; }
.lg-tag {
  position: absolute; left: 0; top: 0; display: flex; align-items: center; gap: 8px;
  padding: 3px 6px; background: rgba(10, 13, 20, .88);
  font: 500 11px/1.35 var(--mono); letter-spacing: .12em; text-transform: uppercase; white-space: nowrap;
  color: var(--ink); opacity: 0; transition: color .25s ease;
}
.lg-tag.is-quiet { color: var(--soft); }
.lg-tag.is-sig, .lg-tag .is-sig { color: var(--sig); }
.lg-tag.is-cop, .lg-tag .is-cop { color: var(--cop); }
.lg-tag.is-lead::before, .lg-tag.is-lead-l::after { content: ""; width: 22px; height: 1px; background: currentColor; flex: 0 0 auto; }
.lg-tag.is-lead { padding-left: 0; }
.lg-tag.is-lead-l { padding-right: 0; }
.lg-tag.is-title { padding: 0 0 2px; background: none; font: 500 13px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--soft); white-space: normal; width: max-content; max-width: 440px; }
.lg-tag.is-ev { display: block; padding: 6px 0 0; background: none; font: 400 12.5px/1.4 var(--sans); letter-spacing: 0; text-transform: none; color: var(--soft); white-space: normal; width: max-content; max-width: 200px; }
.lg-tag.is-ev b { display: block; margin-bottom: 2px; font: 300 30px/1 var(--sans); letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.lg-tag.is-ev.is-row { display: flex; align-items: baseline; gap: 10px; padding: 0; max-width: none; white-space: nowrap; }
.lg-tag.is-ev.is-row b { margin: 0; font-size: 22px; }
.lg-tag.is-axis { padding: 0; background: none; font-size: 10.5px; color: var(--faint); letter-spacing: .08em; }
.lg-tag.is-arrow { padding: 0; background: none; font: 400 17px/1 var(--sans); color: var(--faint); }
.lg-tag.is-lane { font-size: 11px; color: var(--ink); }
.lg-tag.is-lane.is-sig { color: var(--sig); }
.lg-tag.is-pf { color: var(--ink); }
.lg-line { position: absolute; left: 0; top: 0; height: 0; border-top: 1px solid var(--rule); opacity: 0; }
.lg-line.is-pf { border-top: 1px solid var(--ink); }
.lg-line.is-base { border-top-color: rgba(242, 243, 246, .3); }
.lg-story[data-lane="0"] .lg-tag.lane-0, .lg-story[data-lane="1"] .lg-tag.lane-1, .lg-story[data-lane="2"] .lg-tag.lane-2 { color: var(--sig); box-shadow: inset 0 -1px 0 var(--sig); }

.lg-scan { position: absolute; left: 0; top: 0; height: 1px; background: var(--sig); opacity: 0; pointer-events: none; }
.lg-scan span { position: absolute; right: 0; bottom: 6px; padding: 3px 6px; background: rgba(10, 13, 20, .9); font: 500 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--sig); white-space: nowrap; }

.lg-frame i { position: absolute; width: 12px; height: 12px; border-color: rgba(242, 243, 246, .28); border-style: solid; border-width: 0; }
.lg-frame i:nth-child(1) { left: calc(var(--pl) - 18px); top: calc(var(--pt) - 18px); border-left-width: 1px; border-top-width: 1px; }
.lg-frame i:nth-child(2) { right: calc(var(--pr) - 18px); top: calc(var(--pt) - 18px); border-right-width: 1px; border-top-width: 1px; }
.lg-frame i:nth-child(3) { left: calc(var(--pl) - 18px); bottom: calc(var(--pb) - 18px); border-left-width: 1px; border-bottom-width: 1px; }
.lg-frame i:nth-child(4) { right: calc(var(--pr) - 18px); bottom: calc(var(--pb) - 18px); border-right-width: 1px; border-bottom-width: 1px; }
.lg-hud { position: absolute; left: calc(var(--pl, 44px) - 18px); right: calc(var(--pr, 56px) - 18px); top: 26px; display: flex; justify-content: space-between; gap: 18px; font: 500 11px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--faint); pointer-events: none; }
.lg-fig { color: var(--ink); }
.lg-legend { position: absolute; left: calc(var(--pl, 44px) - 18px); right: calc(var(--pr, 56px) - 18px); bottom: 24px; display: flex; flex-wrap: wrap; gap: 8px 20px; font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); pointer-events: none; }
.lg-legend span { display: inline-flex; align-items: center; gap: 8px; }
.lg-legend i { width: 9px; height: 9px; flex: 0 0 auto; background: var(--n0); }
.lg-legend .k-gain, .lg-legend .k-in, .lg-legend .k-done { background: var(--n2); }
.lg-legend .k-loss, .lg-legend .k-exc { background: var(--cop); }
.lg-legend .k-flat, .lg-legend .k-hh { background: var(--n0); }
.lg-legend .k-ok { background: var(--sig); }
.lg-legend .k-tint { background: rgba(151, 164, 255, .3); box-shadow: inset 0 0 0 1px var(--sig); }
.lg-legend .k-part { background: #7d86a8; }
.lg-legend .k-acq { background: rgba(198, 204, 216, .55); }
.lg-legend .k-range { background: none; box-shadow: inset 0 0 0 1px var(--sig); }
.lg-legend .k-cmp { background: none; box-shadow: inset 0 0 0 1px var(--n2); }
.lg-legend .k-ord { height: 3px; width: 12px; background: var(--n2); }
.lg-legend .k-done { opacity: .6; }
.lg-rail { position: absolute; right: 18px; top: 50%; display: grid; gap: 9px; justify-items: end; transform: translateY(-50%); pointer-events: none; }
.lg-rail i { display: block; width: 10px; height: 1px; background: rgba(242, 243, 246, .3); transition: width .35s ease, background-color .35s ease; }
.lg-rail i.is-on { width: 22px; background: var(--sig); }

/* Without WebGL2 or Canvas: a still of the book, drawn in CSS. */
.lg-poster { position: absolute; inset: var(--pt, 84px) var(--pr, 56px) var(--pb, 76px) var(--pl, 44px); display: none;
  background:
    linear-gradient(90deg, var(--bg) 1.6px, transparent 1.6px) 0 0 / 7px 7px,
    linear-gradient(var(--bg) 1.6px, transparent 1.6px) 0 0 / 7px 7px,
    rgba(93, 101, 119, .6); }
.lg-story:not(.is-live) .lg-poster { display: block; }
.lg-story:not(.is-live) .lg-hud, .lg-story:not(.is-live) .lg-rail { display: none; }

/* The plan record: a typeset document, real HTML. */
.lg-record { margin: 40px 0 0; max-width: 468px; color: var(--ink); }
.rec-sheet { padding: 18px 22px 16px; background: var(--s1); border: 1px solid rgba(242, 243, 246, .16); }
.rec-sec + .rec-sec { margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--rule); }
.rec-top { margin: 0; display: flex; justify-content: space-between; font: 500 10.5px/1.4 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--soft); }
.rec-ill { padding: 1px 6px; border: 1px solid var(--cop); color: var(--cop); }
.rec-title { margin: 12px 0 2px; font: 400 26px/1.1 var(--sans); letter-spacing: -.03em; }
.rec-sub { margin: 0; font: 400 13.5px/1.5 var(--sans); color: var(--soft); }
.rec-meta { margin: 12px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rec-meta dt, .lg-record h4, .rec-fp span { font: 500 10px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.rec-meta dd { margin: 2px 0 0; font: 400 13px/1.4 var(--sans); }
.lg-record h4 { margin: 0 0 8px; }
.rec-tbl { width: 100%; border-collapse: collapse; font: 400 12.5px/1.4 var(--sans); font-variant-numeric: tabular-nums; }
.rec-tbl th { padding: 0 0 5px; text-align: left; font: 500 9.5px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--faint); border-bottom: 1px solid var(--rule); }
.rec-tbl td { padding: 4px 8px 4px 0; border-bottom: 1px solid rgba(242, 243, 246, .07); color: var(--ink); }
.rec-tbl td:nth-child(n+2):not(:nth-child(3)), .rec-tbl th:nth-child(n+2):not(:nth-child(3)) { text-align: right; padding-right: 0; }
.rec-tbl:not(.rec-orders) td:nth-child(3), .rec-tbl:not(.rec-orders) th:nth-child(3) { text-align: right; }
.rec-orders td:nth-child(3) { color: var(--soft); padding-left: 10px; }
.rec-orders th:nth-child(3) { padding-left: 10px; }
.rec-orders td:nth-child(2) { text-align: left !important; padding-left: 10px; font: 500 10.5px/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.rec-orders th:nth-child(2) { text-align: left !important; padding-left: 10px; }
.lg-record .is-sell { color: var(--n2) !important; }
.lg-record .is-buy { color: var(--sig) !important; }
.rec-check { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
.rec-stamp { display: grid; gap: 2px; padding: 9px 12px 10px; border: 1.5px solid var(--sig); color: var(--sig); }
.rec-stamp span { font: 500 9.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.rec-stamp b { font: 500 20px/1.15 var(--sans); letter-spacing: -.01em; }
.rec-stamp small { max-width: 16ch; font: 400 11px/1.4 var(--sans); color: var(--soft); }
.rec-limits { list-style: none; margin: 0; padding: 0; font: 400 12.5px/1.4 var(--sans); }
.rec-limits li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-bottom: 1px solid rgba(242, 243, 246, .07); color: var(--soft); }
.rec-limits b { font-weight: 500; color: var(--ink); }
.rec-fp { display: grid; gap: 4px; }
.rec-fp code { font: 400 12.5px/1.4 var(--mono); color: var(--ink); letter-spacing: .02em; }
.rec-fp small { font: 400 11.5px/1.4 var(--sans); color: var(--soft); }

/* Desktop: the record is staged in the scene and unfolds from the lifted cell. */
.lg-record.is-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: 0; }
.lg-stage .lg-record.is-staged { position: absolute; left: 0; top: 0; z-index: 4; width: min(468px, calc(100% - 120px)); max-width: none; margin: 0; transform-origin: 0 0; visibility: hidden; }
.lg-record.is-staged .rec-sheet { background: color-mix(in srgb, var(--sig) calc((1 - var(--g)) * 100%), var(--s1)); border-color: color-mix(in srgb, var(--sig) calc((1 - var(--g)) * 100%), rgba(242, 243, 246, .16)); }
.lg-record.is-staged .rec-sec {
  --k: clamp(0, (var(--u) - .4 - var(--i) * .09) / .2, 1);
  opacity: var(--k);
  transform: perspective(900px) rotateX(calc((1 - var(--k)) * -72deg));
  transform-origin: 50% 0;
}

/* Headlines rise into place as they enter (where supported). */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .lg-ch h2, .lg-figure, .lg-proof a, .lg-ba { animation: lg-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    .lg-record:not(.is-staged) .rec-sec { animation: lg-unfold linear both; animation-timeline: view(); animation-range: entry 0% entry 70%; transform-origin: 50% 0; }
  }
}
@keyframes lg-rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes lg-unfold { from { opacity: .15; transform: perspective(900px) rotateX(-50deg); } to { opacity: 1; transform: none; } }

/* Narrow desktops. */
@media (max-width: 1100px) and (min-width: 761px) {
  .lg-steps { grid-template-columns: 1fr; }
  .lg-steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .lg-ba { margin-left: 0; }
  .lg-more { margin-left: 0; }
}

/* Phone: the scene gets its own band at the top; copy flows beneath it. */
@media (max-width: 760px) {
  .lg-story { font-size: 16px; }
  .lg-story { display: flex; flex-direction: column; }
  .lg-stage { order: -1; position: sticky; top: var(--lg-nav); z-index: 5; width: 100%; height: 40vh; height: 40svh; border-left: 0; border-bottom: 1px solid var(--rule); background: var(--bg); }
  .lg-chapters { padding: 0 20px; }
  .lg-ch, .lg-ch.is-flow { min-height: 0; padding: 7vh 0 var(--pb-m, 22vh); }
  .lg-ch:first-child { padding-top: 5vh; }
  .lg-copy { position: relative; top: auto; max-width: none; }
  .lg-ch h2 { font-size: clamp(30px, 8.6vw, 38px); }
  .lg-ch h2.lg-h2-sm { font-size: 26px; }
  .lg-scale li { grid-template-columns: 104px minmax(0, 1fr); gap: 10px; padding: 11px 0; }
  .lg-scale span { font-size: 14.5px; }
  .lg-figure strong { font-size: 58px; }
  .lg-proof a { grid-template-columns: 1fr; padding: 14px 0 16px; }
  .lg-proof strong { font-size: 46px; }
  .lg-wf { min-height: 58vh; padding-left: 14px; }
  .lg-wf dl div { grid-template-columns: 1fr; gap: 2px; }
  .lg-ba { margin-left: 0; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); }
  .lg-more { margin-left: 0; }
  .lg-who { grid-template-columns: 1fr; }
  .lg-who li:nth-child(even) { border-left: 0; }
  .lg-steps { grid-template-columns: 1fr; }
  .lg-steps li + li { padding-left: 0; border-left: 0; border-top: 1px solid var(--rule); }
  .lg-hud { left: 14px; right: 14px; top: 12px; font-size: 11px; letter-spacing: .12em; }
  .lg-legend { left: 14px; right: 14px; bottom: 8px; gap: 2px 12px; font-size: 11px; letter-spacing: .05em; }
  .lg-legend i { width: 8px; height: 8px; }
  .lg-rail { display: none; }
  .lg-frame { display: none; }
  .lg-tag { font-size: 11px; letter-spacing: .06em; padding: 2px 4px; }
  .lg-tag.is-ev { font-size: 11px; padding-top: 3px; }
  .lg-tag.is-ev b { font-size: 16px; margin-bottom: 1px; }
  .lg-tag.is-ev.is-row b { font-size: 15px; }
  .lg-tag.is-title { font-size: 11px; max-width: 200px; }
  .lg-record { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  .lg-story *, .lg-story *::before, .lg-story *::after { transition: none !important; animation: none !important; }
}

/* Ranges in big numbers: the dash sits between the figures with a clear gap
   on each side, at the height of their middle (Inter's dash sits at the middle
   of lowercase letters, which is low beside lining figures). */
.lg-story .nd { display: inline-block; margin: 0 .1em; transform: translateY(-.07em); }
.lg-story .nx { display: inline-block; margin-left: .06em; transform: translateY(-.03em); }

/* The site's own table and footer styles stop at the plan record. */
.lg-story .lg-record th, .lg-story .lg-record td { background: transparent !important; }
.lg-story .lg-record th { color: var(--faint) !important; }
.lg-story .rec-fp code { background: transparent !important; border: 0 !important; padding: 0 !important; border-radius: 0 !important; color: var(--ink) !important; }

/* While the plan record is open in 08, the figure label and legend step aside. */
.lg-hud, .lg-legend { transition: opacity .3s ease; }
.lg-scene.is-record .lg-hud, .lg-scene.is-record .lg-legend { opacity: 0; }
