/* the homepage (js/story.js, 11/01 third version): one sticky stage of firm dots, text steps scrolling on the right. Desktop first, 1440 wide.
   The stage is the left 58% on every step but the first screen, which uses the full width. Site tokens only, so dark mode follows.
   Motion is tied to the scroll in js/story.js: the cards, the label groups, the ghost year, the counter and the rule get their opacity
   (and the cards their rise) from the frame loop, so nothing here has a CSS transition that would lag behind the scroll. */
#briefing .st { position: relative; margin-left: calc(-1 * var(--gut)); margin-right: calc(-1 * max(16px, env(safe-area-inset-right, 0px))); --stw: 58%; }
.st-stage { position: sticky; top: var(--st-top, 57px); height: calc(100vh - var(--st-top, 57px)); overflow: hidden; background: var(--bg); z-index: 1; }
.st-stage canvas, .st-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.st-stage svg { pointer-events: none; overflow: visible; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; }
.st-steps { position: relative; z-index: 2; margin-top: calc(var(--st-top, 57px) - 100vh); pointer-events: none; }

/* the first screen */
.st-hero { height: calc(100vh - var(--st-top, 57px)); min-height: 560px; position: relative; text-align: center; padding: 12px 64px 0; }
.st-hero-in { pointer-events: auto; max-width: 940px; margin: 0 auto; display: grid; justify-items: center; gap: 8px; }
.st-hero h1 { font-size: 44px; line-height: 1.04; letter-spacing: -0.035em; }
.st-lede { font-size: 17px; line-height: 1.4; color: var(--ink2); max-width: 940px; }
.st-hero .st-meta { justify-content: center; margin-top: 2px; }
.st-hero .st-found { min-height: 0; margin: 0; }
.st-hero .st-found:empty { display: none; }
/* the line under the search box floats over the top of the map on a plain ground, so finding a firm never moves the map or the title */
.st-hero-in { position: relative; }
.st-hero .st-found { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); width: max-content; max-width: 100%; margin: 0; padding: 1px 10px; background: var(--bg); border-radius: 6px; z-index: 4; }
.st-cue { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); display: grid; justify-items: center; gap: 6px; }
.st-cue::after { content: ""; width: 1px; height: 22px; background: var(--rule); animation: st-cue 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes st-cue { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* the text steps */
.st-step { position: relative; min-height: 135vh; display: flex; align-items: center; padding: 0 76px 0 calc(var(--stw) + 44px); }
.st-card { pointer-events: auto; max-width: 540px; will-change: opacity, transform; }
.st-hero-in { will-change: opacity; }
/* the text stays put beside the pinned chart and crossfades; the page scrolls natively underneath (Connor 11/1: smoother) */
.st:not(.st-still) .st-step .st-card { position: fixed; top: var(--st-top, 57px); bottom: 0; left: calc(var(--stw) + 44px); right: 76px; max-width: 540px; display: flex; flex-direction: column; justify-content: center; pointer-events: none; }
.st:not(.st-still) .st-step .st-card > * { pointer-events: auto; }
/* the last card is pinned by the same rule as the stage, not fixed to the screen: both let go at the same scroll, so the last screen leaves as one piece and the footer arrives under it */
.st-pin { display: contents; }
.st:not(.st-still) .st-pin { display: block; position: absolute; left: calc(var(--stw) + 44px); right: 76px; top: -135vh; bottom: 0; max-width: 540px; pointer-events: none; }
.st:not(.st-still) .st-step .st-pin .st-card { position: sticky; top: var(--st-top, 57px); bottom: auto; left: auto; right: auto; height: calc(100vh - var(--st-top, 57px)); }
.st-pin .st-card h2 { font-size: 34px; }
@media (max-height: 800px) {   /* a short screen: the last card keeps everything on screen */
  .st-pin .st-bridge { margin-bottom: 8px; } .st-pin .st-kick { margin-bottom: 10px; }
  .st-pin .st-card h2 { font-size: 27px; margin-bottom: 10px; } .st-pin .st-card .st-sup { font-size: 16.5px; line-height: 1.42; margin-bottom: 8px; }
  .st-pin .st-find { margin: 4px 0 2px; } .st-pin .st-find input { padding: 9px 14px; } .st-pin .st-found { margin: 2px 0 6px; } .st-pin .st-tabs { margin: 2px 0 10px; }
}
/* nothing on the homepage between the stage and the footer */
main:has(> #briefing.on) { padding-bottom: 0; }
body:has(> main > #briefing.on) footer.site { margin-top: 0; }
.st-bridge { font-size: 15px; line-height: 1.4; color: var(--ink3); margin: 0 0 14px; font-style: italic; }
.st-kick { display: flex; gap: 14px; align-items: baseline; font-size: 12.5px; font-weight: 650; letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); margin-bottom: 16px; }
.st-kick i { font-style: normal; font-weight: 500; letter-spacing: .06em; color: var(--ink3); }
.st-card h2 { font-size: 40px; line-height: 1.1; letter-spacing: -0.028em; margin: 0 0 18px; }
.st-nb { white-space: nowrap; }
.st-card h2 em, .st-hero h1 em { font-style: normal; color: var(--accent-ink); }
.st-sup { font-size: 19px; line-height: 1.5; color: var(--ink2); margin: 0 0 22px; }
.st-sup b { color: var(--ink); font-weight: 650; }
.st-meta { display: flex; gap: 10px; align-items: baseline; }
.st-chip { flex: none; font-size: 10.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--ink2); border: 1px solid var(--rule); border-radius: 999px; padding: 2px 8px; position: relative; top: -1px; cursor: help; }
.st-meta .gh-asof { font-size: 12.5px; line-height: 1.5; color: var(--ink3); margin: 0; }
.st-meta .gh-asof a { color: inherit; text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 2px; }
.st-hero .st-meta .gh-asof { max-width: 760px; text-align: left; }

/* search */
.st-find { position: relative; display: flex; gap: 8px; width: min(540px, 100%); margin: 10px 0 4px; }
.st-find input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 12px 16px; border: 1px solid var(--rule); border-radius: 10px; background: var(--bg); color: var(--ink); outline: none; transition: border-color .2s, box-shadow .2s; }
.st-find input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.st-find .btn { flex: none; }
.st-find ul { list-style: none; margin: 6px 0 0; padding: 4px; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border: 1px solid var(--hair); border-radius: 10px; box-shadow: var(--shadow); z-index: 10; display: none; text-align: left; }
.st-find ul.open { display: block; }
.st-find li { padding: 8px 12px; border-radius: 7px; cursor: pointer; font-size: 14px; display: flex; justify-content: space-between; gap: 12px; }
.st-find li span { color: var(--ink3); font-size: 13px; }
.st-find li:hover, .st-find li.hi { background: var(--surface); }
.st-found { font-size: 14.5px; color: var(--ink2); min-height: 22px; margin: 4px 0 18px; }
.st-found b { color: var(--ink); }
.st-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 22px; }
.st-tabs a { font-size: 14px; padding: 6px 12px; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink2); }
.st-tabs a:hover { color: var(--ink); border-color: var(--ink3); text-decoration: none; }

/* stage furniture */
.st-ghost { position: absolute; font-size: 220px; font-weight: 750; letter-spacing: -0.06em; line-height: .8; color: var(--ink); opacity: 0; pointer-events: none; font-variant-numeric: tabular-nums; }
.st-counter { position: absolute; left: 48px; top: 62px; pointer-events: none; opacity: 0; }
.st-counter b { display: block; font-size: 60px; line-height: 1; font-weight: 750; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; color: var(--ink); }
.st-counter span { display: block; font-size: 14px; color: var(--ink3); margin-top: 8px; }
.st-rule { position: absolute; left: var(--stw); top: 36px; bottom: 30px; width: 1px; background: var(--hair); opacity: 0; }
/* the one tooltip: a small card that js/story.js keeps inside the chart's side of the stage. Its place comes from the frame loop, its fade from here */
.st-tip { position: absolute; left: 0; top: 0; width: max-content; max-width: 320px; pointer-events: none; background: var(--tip); color: var(--tip-ink); font-size: 13px; line-height: 1.4; padding: 10px 12px; border-radius: 8px; box-shadow: 0 6px 20px rgba(0, 0, 0, .24); opacity: 0; transition: opacity .14s ease; z-index: 12; font-variant-numeric: tabular-nums; will-change: transform, opacity; }
.st-tip.on { opacity: 1; }
.st-tip b { display: block; font-weight: 650; line-height: 1.3; text-wrap: balance; }
.st-tip p { margin: 3px 0 0; font-size: 12.5px; opacity: .78; }
.st-tip hr { border: 0; border-top: 1px solid color-mix(in srgb, var(--tip-ink) 28%, transparent); margin: 8px 0; }
.st-tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 14px; margin-top: 6px; font-size: 12.5px; }
.st-tr span:nth-child(odd) { opacity: .82; }
.st-tr span:nth-child(even) { text-align: right; font-weight: 600; white-space: nowrap; }
.st-tip .st-tmore { margin-top: 5px; }
/* the progress line and its step dots sit snug on the left edge, inside the stage, so they leave with it */
.st-prog { position: absolute; left: 4px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 0; z-index: 15; }
.st-prog a { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; }   /* a 20px target around a 6px dot */
.st-prog a::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rule); transition: transform .3s, background .3s; }
.st-prog a:hover::before { background: var(--ink3); }
.st-prog a.on::before { background: var(--accent); transform: scale(1.5); }
.st-prog a:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* the first screen's source line sits at the bottom of the screen, under the map's legend */
.st-hero-src { position: absolute; left: 56px; right: 56px; bottom: 12px; pointer-events: auto; text-align: left; }
.st-hero-src .st-meta { justify-content: flex-start; }
.st-hero-src .gh-asof { max-width: 980px; }
/* with motion on it is pinned like the stage, so it never rides up over the map; it fades with the first screen's text (Connor 11/1) */
/* the cover: title, intro and search alone at the top with room to breathe; the scattered dots sit around them and form the map as the page scrolls */
.st:not(.st-still) .st-hero { height: 340vh; padding-top: max(88px, 20vh); }
.st:not(.st-still) .st-hero-in { gap: 16px; }
.st:not(.st-still) .st-hero h1 { font-size: 64px; line-height: 1.03; }
.st:not(.st-still) .st-hero .st-lede { font-size: 20px; line-height: 1.45; max-width: 700px; }
.st:not(.st-still) .st-hero .st-find { margin-top: 8px; }
.st-hero-go { position: absolute; left: 0; right: 0; top: calc(100vh - var(--st-top, 57px) - 58px); text-align: center; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink3); pointer-events: none; }
.st-still .st-hero-go { display: none; }
.st-fmap { position: absolute; top: 6px; left: 280px; right: 56px; z-index: 3; font-size: 14px; text-align: left; }
.st-still .st-fmap { display: none; }
.st:not(.st-still) .st-hero-src { position: fixed; bottom: 12px; right: auto; max-width: min(980px, calc(100vw - 340px)); z-index: 3; will-change: opacity; }   /* stops short of the prompt at the right, so it stays clickable */
/* the colored line: the page's place in the story, filled from the top as the reader scrolls */
.st-line { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--hair); z-index: 14; pointer-events: none; overflow: hidden; }
.st-line b { position: absolute; inset: 0; background: var(--accent); transform: scaleY(0); transform-origin: top center; will-change: transform; }
.st-still .st-line { display: none; }
.st-stage .st-nm { fill: var(--ink2); font-size: 11px; font-weight: 500; paint-order: stroke; stroke: var(--bg); stroke-width: 3px; stroke-linejoin: round; }
.st-stage .st-nlead { stroke-width: .9; opacity: .9; }
/* the Play button for the year run, top right of the first-screen map (js/story.js places it). Its opacity comes from the frame loop; the hover and press are its own */
.st-play { position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap; color: var(--accent-ink);
  background: var(--bg); border: 1.5px solid var(--accent); border-radius: 999px; padding: 9px 16px 9px 13px; cursor: pointer; opacity: 0; box-shadow: 0 1px 3px rgba(0, 0, 0, .14);
  transition: background .15s, color .15s, box-shadow .15s, transform .12s; }
.st-play:hover { background: var(--accent); color: var(--bg); box-shadow: 0 3px 10px rgba(0, 0, 0, .2); transform: translateY(-1px); }
.st-play:active { background: var(--accent-ink); color: var(--bg); box-shadow: none; transform: translateY(0) scale(.97); }
.st-play:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.st-play i { width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.st-play.on i { width: 10px; height: 12px; border: 0; border-left: 3.5px solid currentColor; border-right: 3.5px solid currentColor; box-sizing: border-box; }

/* the "Pause motion" button: in the site header beside the theme switch, remembered (js/story.js) */
  background: var(--bg); border: 1px solid var(--rule); border-radius: 999px; padding: 6px 11px 6px 10px; cursor: pointer; transition: color .2s, border-color .2s; white-space: nowrap; }

/* the drawing: overlay groups; the frame loop sets their opacity from the scroll */
.st-g { opacity: 0; }
/* the hover: labels that belong to the hit brighten and the others fade; a year's point grows; the guide slides to the year */
.st-g [data-h], .st-g [data-h] text { transition: opacity .15s ease, fill .15s ease; }
.st-g[data-hv] [data-h] { opacity: .5; }
.st-g[data-hv] [data-h][data-hon] { opacity: 1; }
.st-stage .st-g[data-hv] [data-hon] text:not(.st-hi):not(.inv), .st-stage .st-g[data-hv] text[data-hon]:not(.st-hi):not(.inv) { fill: var(--ink); }
.st-stage .st-mdot { transform-box: fill-box; transform-origin: center; transition: transform .15s ease; }
.st-stage .st-g[data-hv] [data-hon] .st-mdot { transform: scale(1.8); }
.st-stage .st-hvg { stroke: var(--ink3); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; transition: opacity .14s ease, transform .12s ease-out; }
.st-stage .st-hvg.on { opacity: 1; }
.st-stage text { fill: var(--ink2); font-size: 13px; }
.st-stage .st-grid { stroke: var(--hair); stroke-width: 1; }
.st-stage .st-zero { stroke: var(--rule); stroke-width: 1; }
.st-stage .st-axis { stroke: var(--rule); stroke-width: 1; }
.st-stage .st-tick { fill: var(--ink3); font-size: 12px; }
.st-stage .st-tick2 { fill: var(--ink3); font-size: 13px; font-weight: 600; }
.st-stage .st-atitle { fill: var(--ink3); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.st-stage .st-ctitle { fill: var(--ink); font-size: 14px; font-weight: 650; }
.st-stage .st-leg { fill: var(--ink3); font-size: 13px; }
.st-stage .st-leg2 { fill: var(--ink2); }
.st-stage .st-cap { fill: var(--ink3); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.st-stage .st-lab { fill: var(--ink); font-size: 14.5px; font-weight: 650; }
.st-stage .st-lab2 { font-size: 16px; }
.st-stage .st-sub { fill: var(--ink3); font-size: 13px; }
.st-stage .st-val { fill: var(--ink); font-size: 13px; font-weight: 650; }
.st-stage .st-val2 { fill: var(--ink); font-size: 15px; font-weight: 700; }
.st-stage .st-val3 { fill: var(--ink3); font-size: 14px; font-weight: 600; }
.st-stage .st-big { fill: var(--ink); font-size: 46px; font-weight: 750; letter-spacing: -0.03em; }
.st-stage .st-big2 { fill: var(--ink); font-size: 34px; font-weight: 750; letter-spacing: -0.025em; }
.st-stage .st-big3 { fill: var(--ink); font-size: 32px; font-weight: 750; letter-spacing: -0.025em; }
.st-stage .st-cell { fill: var(--ink); font-size: 28px; font-weight: 750; letter-spacing: -0.02em; }
.st-stage .st-cell.inv { fill: var(--bg); }
.st-stage .st-hi { fill: var(--accent-ink); }
.st-stage .st-sw { stroke: none; }
.st-stage .st-seg { fill: var(--accent); }
.st-stage .st-seg.alt { fill: var(--seq2); }
.st-stage .st-lead { stroke: var(--ink3); stroke-width: 1; }
.st-stage .st-brk { fill: none; stroke: var(--ink3); stroke-width: 1; }
.st-stage .st-dz.s4 { fill: var(--seq4); } .st-stage .st-dz.s2 { fill: var(--seq2); } .st-stage .st-dz.s1 { fill: var(--seq1); } .st-stage .st-dz.s0 { fill: var(--rule); }
.st-stage .st-card-bg { fill: var(--surface); }
.st-stage .st-end-bg { fill: var(--bg); fill-opacity: .92; stroke: var(--hair); }
.st-stage .st-row { fill: var(--ink); font-size: 13.5px; }
.st-stage .st-rowv { fill: var(--ink); font-size: 13.5px; font-weight: 700; }
.st-stage .st-rowv2 { fill: var(--ink); font-size: 17px; font-weight: 700; }
.st-stage .st-in { fill: var(--bg); font-size: 11.5px; font-weight: 700; }
.st-stage .st-tiny { fill: var(--ink2); font-size: 11.5px; }
.st-stage .st-bar { fill: var(--accent); }
.st-stage .st-p.market { fill: var(--c-market); } .st-stage .st-p.organic { fill: var(--c-organic); } .st-stage .st-p.deals { fill: var(--c-deals); } .st-stage .st-p.other { fill: var(--c-other); }
.st-stage .st-tile { stroke: none; }
.st-stage .st-tile.top { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.st-stage .st-tcode { fill: var(--ink2); font-size: 13px; font-weight: 650; }
.st-stage .st-tpct { fill: var(--ink); font-size: 12.5px; font-weight: 650; }
.st-stage .st-tpct.top { font-size: 15px; font-weight: 750; }
.st-stage .inv { fill: #fff; }
.st-stage .st-b0 { fill: var(--c-market); } .st-stage .st-b1 { fill: var(--accent); }
/* step 1, the rising line: a solid pale area, one crisp line, a point per year */
.st-stage .st-mfill { fill: color-mix(in srgb, var(--accent) 12%, var(--bg)); }
.st-stage .st-mline { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.st-stage .st-mdot { fill: var(--accent); stroke: var(--bg); stroke-width: 2; }
.st-stage .st-mval { fill: var(--ink); font-size: 14px; font-weight: 650; paint-order: stroke; stroke: var(--bg); stroke-width: 3.5px; stroke-linejoin: round; }
.st-stage .st-mval.st-hi { fill: var(--accent-ink); }
.st-stage .st-mval2 { font-size: 18px; font-weight: 750; }
.st-stage .st-sofar { font-size: 13px; font-weight: 600; }
.st-stage .st-legend text { font-size: 13px; }
:root[data-theme="dark"] .st-stage .inv { fill: #141416; }

/* ?still and "Pause motion": final states, no transitions (a device set to reduce motion still gets the motion: Connor's ruling, 11/01) */
.st-still .st-card { opacity: 1; transform: none; }
.st-still .st-cue::after { animation: none; }
.st-stage [data-g="map-full"] .st-zero { stroke: var(--ink2); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: .1 5; }   /* the first screen's zero line is dotted: above it firms gain organic growth, below it they lose (Connor 11/01) */
/* the prompt on the finished map: a reader should never take the map for the end of the page */
.st-more { position: absolute; z-index: 3; right: 56px; bottom: 12px; display: inline-flex; align-items: center; gap: 9px; padding: 8px 2px; border: 0; background: var(--bg); font: inherit; font-size: 15px; font-weight: 600; line-height: 1; color: var(--accent-ink); cursor: pointer; }
.st-more i { width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: st-more 1.5s ease-in-out infinite; }
.st-more:hover span { text-decoration: underline; text-underline-offset: 3px; }
.st-more:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
@keyframes st-more { 0%, 100% { transform: translateY(0) rotate(45deg); } 50% { transform: translateY(5px) rotate(45deg); } }
.st-still .st-more { display: none; }
@media (max-height: 800px) {   /* a short screen: every card keeps its words on screen (the pinned last card has its own, smaller, rules above) */
  .st-card h2 { font-size: 34px; margin-bottom: 14px; } .st-sup { font-size: 17px; line-height: 1.42; margin-bottom: 16px; }
  .st-kick { margin-bottom: 12px; } .st-bridge { margin-bottom: 8px; }
}

/* the hint, fixed at the bottom right of the homepage: "Scroll or press ↓ to preview". It goes once the reader is past the first step. Sits above the "Keep scrolling" line on the map */
.st-hint { position: fixed; z-index: 5; right: 24px; bottom: 64px; padding: 7px 12px; border-radius: 999px; background: var(--bg); border: 1px solid var(--hair); box-shadow: var(--shadow); font-size: 13px; font-weight: 600; color: var(--ink2); pointer-events: none; opacity: 1; transition: opacity .25s ease; }
.st-hint.off { opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility 0s linear .25s; }
.st-scope b { font-weight: 700; color: var(--ink); }
