/* =====================================================================================
   The stage: a fixed 1920×1080 canvas. Every size here is in stage pixels; stage.js scales
   the whole canvas into its box. Base styles are always the *finished* state and entrance
   animations run from hidden towards it, so a frozen copy of a scene looks complete.
   ===================================================================================== */

.stage-fit { position: relative; width: 100%; height: 100%; overflow: hidden; container-type: size; }

.stage {
    --ease-out: cubic-bezier(.16, 1, .3, 1);
    --ease-move: cubic-bezier(.76, 0, .18, 1);
    --speed: 1;
    --lead: 420ms;
    --stagger: 85ms;
    --wait: 1;
    position: absolute; left: 50%; top: 50%;
    width: 1920px; height: 1080px;
    transform-origin: 0 0;
    transform: scale(var(--scale, .5)) translate(-50%, -50%);
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 24px; line-height: 1.4;
    text-align: left;
    -webkit-font-smoothing: antialiased;
    isolation: isolate;
}
.stage.motion-calm { --speed: 1.35; --stagger: 70ms; }
.stage.motion-energetic { --speed: .78; --stagger: 70ms; }

.stage *, .stage *::before, .stage *::after { box-sizing: border-box; }
.stage h1, .stage h2, .stage h3, .stage h4, .stage h5, .stage p, .stage ul, .stage figure, .stage blockquote { margin: 0; padding: 0; }
.stage h1, .stage h2, .stage h3, .stage h4, .stage h5 { font-family: var(--font-head); text-wrap: balance; }
.stage p { text-wrap: pretty; }
.stage ul { list-style: none; }
.stage .icon { width: 1em; height: 1em; flex: none; }

.scene-host, .ghost-host, .morph-host, .scene, .chrome { position: absolute; inset: 0; }
.scene-host { z-index: 2; }
.ghost-host { z-index: 3; pointer-events: none; }
.morph-host { z-index: 4; pointer-events: none; }
.chrome { z-index: 5; pointer-events: none; }
.scene.built { --lead: 60ms; --wait: 0; }

.stage-logo { position: absolute; max-height: 54px; max-width: 240px; }
.stage-logo.pos-top-left { left: 120px; top: 22px; }
.stage-logo.pos-top-right { right: 80px; top: 40px; }
.stage-logo.pos-bottom-left { left: 120px; bottom: 28px; }
.stage-logo.pos-bottom-right { right: 80px; bottom: 28px; }
.stage-footer { position: absolute; left: 120px; bottom: 36px; font-size: 18px; color: var(--muted); letter-spacing: .02em; }
.stage-logo.pos-bottom-left ~ .stage-footer { left: auto; right: 80px; }

/* ---- backdrop ------------------------------------------------------------------------ */

.backdrop { position: absolute; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.backdrop .layer { position: absolute; inset: -20%; transition: transform calc(1500ms * var(--speed)) var(--ease-move); }
.backdrop .far { transform: translate3d(calc(var(--cx) * -70px), calc(var(--cy) * -110px), 0) scale(var(--cz)); }
.backdrop .near { transform: translate3d(calc(var(--cx) * -190px), calc(var(--cy) * -230px), 0) scale(var(--cz)); }
.backdrop .vignette { position: absolute; inset: 0; background: radial-gradient(130% 100% at 50% 40%, transparent 55%, color-mix(in srgb, var(--bg) 85%, black) 130%); opacity: .7; }
.mode-light .backdrop .vignette { opacity: .25; }

/* Camera x grows without bound, so blobs are placed to drift through rather than away. */
.blob { position: absolute; border-radius: 50%; width: 1100px; height: 1100px; opacity: .34; background: radial-gradient(circle, var(--tint) 0%, transparent 66%); animation: drift 22s ease-in-out infinite alternate; }
.mode-light .blob { opacity: .22; }
.b1 { --tint: var(--primary); left: -4%; top: -22%; }
.b2 { --tint: var(--secondary); right: -6%; top: 24%; animation-delay: -7s; }
.b3 { --tint: var(--accent); left: 26%; bottom: -36%; width: 900px; height: 900px; opacity: .24; animation-delay: -13s; }
.b4 { --tint: var(--primary); right: -30%; bottom: -10%; width: 800px; height: 800px; opacity: .2; animation-delay: -3s; }
@keyframes drift { from { translate: -60px -30px; scale: .94; } to { translate: 90px 60px; scale: 1.1; } }

.backdrop-aurora .far, .backdrop-aurora .near { transform: translate3d(calc(sin(var(--cx) * 1.3rad) * 220px), calc(var(--cy) * -170px), 0) scale(var(--cz)); }
.backdrop-aurora .near { transform: translate3d(calc(sin(var(--cx) * 1.9rad) * -300px), calc(var(--cy) * -260px), 0) scale(var(--cz)); }

.backdrop-grid .near { inset: -60% -20%; transform: none; }
.gridlines {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 96px 96px;
    background-position: calc(var(--cx) * -190px) calc(var(--cy) * -240px);
    transition: background-position calc(1500ms * var(--speed)) var(--ease-move);
    mask-image: radial-gradient(60% 50% at 50% 50%, black 20%, transparent 80%);
}

.backdrop .stars { position: absolute; inset: 0; width: 100%; height: 100%; }

.backdrop-waves .far { transform: translate3d(calc(sin(var(--cx) * 1.3rad) * 200px), calc(var(--cy) * -150px), 0); }
.backdrop-waves .near { inset: auto 0 0 0; height: 420px; transform: translate3d(0, calc(var(--cy) * -60px), 0); }
.waves { position: absolute; left: calc(var(--cx) * -60px); bottom: -40px; width: 3840px; height: 420px; max-width: none; transition: left calc(1500ms * var(--speed)) var(--ease-move); }
.wave { opacity: .12; animation: swell 24s linear infinite; }
.w1 { fill: var(--primary); }
.w2 { fill: var(--secondary); animation-duration: 34s; }
.w3 { fill: var(--accent); animation-duration: 18s; }
@keyframes swell { to { translate: -1920px 0; } }

/* ---- layouts ------------------------------------------------------------------------- */

.page { position: absolute; inset: 0; padding: 76px 120px 96px; display: flex; flex-direction: column; gap: 36px; }
.head { max-width: 1440px; }
.kicker { font-size: 22px; line-height: 28px; margin-bottom: 12px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb, var(--accent) 80%, var(--text)); }
.title { font-size: 66px; line-height: 1.15; letter-spacing: -.015em; font-weight: 700; }
.head .subtitle { font-size: 28px; line-height: 40px; margin-top: 14px; color: var(--muted); max-width: 1300px; }
.body { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 32px 40px; width: 1680px; align-content: center; }

.hero { position: absolute; inset: 0; padding: 90px 160px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.hero-logo { max-height: 120px; max-width: 520px; margin-bottom: 56px; }
.hero .display { font-size: 116px; max-width: 1560px; }
.hero .display.long { font-size: 88px; }
.hero .subtitle { font-size: 36px; color: var(--muted); margin-top: 30px; max-width: 1200px; }
.byline { margin-top: 46px; font-size: 24px; color: var(--muted); letter-spacing: .04em; }
.hero .body { margin-top: 54px; }
.hero .bullets { width: fit-content; max-width: 1200px; margin: 0 auto; text-align: left; }

.statement { position: absolute; inset: 0; padding: 90px 160px; display: flex; flex-direction: column; justify-content: center; }
.statement .display { font-size: 104px; max-width: 1520px; }
.statement .display.long { font-size: 78px; }
.statement .subtitle { font-size: 34px; color: var(--muted); margin-top: 28px; max-width: 1150px; }
.statement .body { margin-top: 50px; width: 1600px; }
.section-number { font-family: var(--font-head); font-size: 220px; line-height: .9; font-weight: 800; color: transparent; -webkit-text-stroke: 3px var(--primary); margin-bottom: 30px; }

.display { line-height: 1.06; letter-spacing: -.03em; font-weight: 750; }
.hero .display .mk-title { background: linear-gradient(100deg, var(--text) 45%, color-mix(in srgb, var(--primary) 55%, var(--text))); -webkit-background-clip: text; background-clip: text; }

.mk-title { display: inline-block; }
.w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .04em .12em; margin: 0 -.04em -.12em; }
.w > span { display: inline-block; }

.anchor-row { display: flex; align-items: center; gap: 22px; height: 48px; margin-bottom: 22px; }
.anchor-chip { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 22px; border-radius: 999px; background: color-mix(in srgb, var(--primary) 22%, var(--surface)); border: 1px solid color-mix(in srgb, var(--primary) 60%, transparent); font-weight: 650; font-size: 21px; font-family: var(--font-head); }
.anchor-chip .icon { font-size: 24px; }
.crumb { color: var(--muted); font-size: 19px; }
.crumb::before { content: "‹"; margin-right: 12px; }

/* ---- shared surfaces ----------------------------------------------------------------- */

.element { min-width: 0; display: flex; flex-direction: column; justify-content: center; position: relative; }
.element-body { min-height: 0; display: flex; flex-direction: column; justify-content: center; }
.element-title { font-size: 28px; line-height: 38px; height: 54px; font-weight: 650; }
.element-note { height: 40px; padding-top: 12px; font-size: 19px; color: var(--muted); display: flex; gap: 18px; justify-content: space-between; }
.element-note .source { margin-left: auto; font-style: italic; opacity: .85; }

.panel, .card, .stat, .option, .stage-step, .moment-card, .tree-node, .callout {
    background: color-mix(in srgb, var(--surface) 84%, transparent);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 24px 60px -36px rgba(0, 0, 0, .55);
}

.badge { display: inline-flex; align-items: center; justify-content: center; width: 68px; height: 68px; flex: none; border-radius: calc(var(--radius) * .7); font-size: 36px; background: color-mix(in srgb, var(--series, var(--primary)) 22%, transparent); color: color-mix(in srgb, var(--series, var(--primary)) 62%, var(--text)); }
.badge.small { width: 48px; height: 48px; font-size: 26px; }

.node { transition: opacity .5s ease, filter .5s ease, translate .6s var(--ease-out), scale .6s var(--ease-out), border-color .4s, box-shadow .4s; }
.node.dim, .element.dim { opacity: .34; filter: saturate(.4); }
.element { transition: opacity .5s ease, filter .5s ease; }
.node.hot { scale: 1.045; z-index: 2; border-color: var(--series, var(--primary)); box-shadow: 0 0 0 2px var(--series, var(--primary)), 0 34px 80px -30px color-mix(in srgb, var(--series, var(--primary)) 70%, transparent); }
.bullets .node.hot { box-shadow: none; scale: 1.025; transform-origin: left center; }
.dive { cursor: pointer; }
.dive:hover { translate: 0 -8px; border-color: var(--series, var(--primary)); }
.stage .done { position: absolute; right: 18px; top: 18px; width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--good); color: var(--bg); font-size: 24px; }

/* ---- cards --------------------------------------------------------------------------- */

.cards { display: grid; gap: 32px; align-items: stretch; }
.card { position: relative; padding: 38px 34px; display: flex; flex-direction: column; gap: 14px; min-height: var(--card-height, 270px); overflow: hidden; }
.card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--series); }
.card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: auto; padding-bottom: 20px; }
.card-number { font-family: var(--font-head); font-size: 30px; font-weight: 700; color: var(--muted); opacity: .75; }
.card.visited .card-number { visibility: hidden; }
.card-value { font-family: var(--font-head); font-size: 56px; line-height: 1.05; font-weight: 750; }
.card-value.long { font-size: 38px; }
.cards.dense .card-value.long { font-size: 32px; }
.card h4 { font-size: 36px; line-height: 1.15; font-weight: 700; }
.card p { font-size: 23px; color: var(--muted); }
.cards.dense { gap: 22px; }
.cards.dense .card { padding: 30px 24px; }
.cards.dense .card h4 { font-size: 29px; }
.cards.dense .card p { font-size: 20px; }
.card.visited { background: color-mix(in srgb, var(--surface) 55%, transparent); }

/* ---- tree ---------------------------------------------------------------------------- */

.tree { position: relative; }
.tree-edges { position: absolute; left: 0; top: 0; overflow: visible; }
.edge { fill: none; stroke: color-mix(in srgb, var(--primary) 65%, transparent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 1; transition: opacity .4s; }
.edge.level-2 { stroke: var(--line); stroke-width: 2; }
.edge.off { opacity: 0; }
.tree-root { position: absolute; display: flex; align-items: center; justify-content: center; gap: 22px; padding: 18px 30px; border-radius: var(--radius); background: linear-gradient(125deg, var(--primary), color-mix(in srgb, var(--secondary) 80%, var(--primary))); color: var(--on-primary); box-shadow: 0 30px 80px -30px var(--primary); text-align: center; z-index: 1; }
.tree-root .badge { background: color-mix(in srgb, var(--on-primary) 18%, transparent); color: var(--on-primary); }
.tree-root h4 { font-size: 36px; line-height: 1.15; font-weight: 750; }
.tree-radial .tree-root { flex-direction: column; gap: 12px; }
.tree-node { position: absolute; display: flex; gap: 18px; padding: 22px; overflow: visible; background: color-mix(in srgb, var(--surface) 94%, transparent); }
.tree-node h5 { font-size: 27px; line-height: 1.2; font-weight: 700; }
.tree-node p { font-size: 19px; line-height: 1.35; color: var(--muted); margin-top: 8px; }
.tree-value { font-family: var(--font-head); font-size: 34px; font-weight: 750; margin-top: 6px; }
.tree-down .tree-node.level-1 { flex-direction: column; align-items: center; text-align: center; justify-content: flex-start; border-top: 4px solid var(--series); }
.tree-radial .tree-node, .tree-right .tree-node { align-items: center; border-left: 5px solid var(--series); }
.tree-right .tree-node { padding: 12px 22px; }
.tree-right .tree-node p { margin-top: 2px; }
.tree-node.level-2 { padding: 8px 16px; align-items: center; justify-content: center; border-radius: calc(var(--radius) * .55); text-align: center; }
.tree-node.level-2 h5 { font-size: 20px; font-weight: 600; }
.tree-node.level-2 .tree-value { font-size: 20px; margin: 0; }
.tree-node .done { right: -12px; top: -12px; }

/* ---- pictures used as icons ----------------------------------------------------------- */

/* Shown exactly as delivered: vendor icons may not be recolored. */
.stage .icon-img { width: 1.3em; height: 1.3em; object-fit: contain; }
.badge:has(.icon-img) { background: color-mix(in srgb, var(--text) 7%, transparent); }
.badge .icon-img { animation: pop .6s cubic-bezier(.34, 1.8, .64, 1) both; animation-delay: calc(var(--lead) + .2s + var(--i, 0) * var(--stagger)); }
.rv.off .badge .icon-img { animation: none; }

/* ---- diagrams ------------------------------------------------------------------------- */

.diagram { position: relative; }
.diagram-zone { position: absolute; border: 2px dashed color-mix(in srgb, var(--series) 45%, var(--line)); border-radius: var(--radius); background: color-mix(in srgb, var(--series) 5%, transparent); transition: opacity .5s; }
.zone-title { position: absolute; left: 0; right: 0; top: 14px; display: flex; gap: 10px; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: color-mix(in srgb, var(--series) 55%, var(--text)); white-space: nowrap; }
.diagram-zone.dim { opacity: .4; }
.diagram-wires { position: absolute; left: 0; top: 0; overflow: visible; }
.wire { fill: none; stroke: color-mix(in srgb, var(--primary) 70%, var(--muted)); stroke-width: 2.5; stroke-linecap: round; }
.wire.dashed { stroke-dasharray: 9 8; }
.arrowhead { fill: color-mix(in srgb, var(--primary) 70%, var(--muted)); }
.wire-flow { fill: none; stroke: var(--accent); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 0 30; animation: flow 1.1s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -30; } }
.wire-group { transition: opacity .5s; }
.wire-group.dim { opacity: .16; }
.wire-group.lit .wire { stroke-width: 4; stroke: var(--accent); }
.wire-group.rv.on .wire.draw { stroke-dasharray: 1; animation: stroke calc(.9s * var(--speed)) var(--ease-out) both; animation-delay: calc((var(--lead) + 450ms + var(--i) * 70ms) * var(--wait)); }
.wire-group.rv.on .wire.dashed, .wire-group.rv.on .wire-flow { animation-delay: 0s; }
.diagram-node { position: absolute; display: flex; gap: 14px; align-items: center; padding: 12px 16px; border-radius: calc(var(--radius) * .6); border: 1px solid var(--line); border-left: 4px solid var(--series); background: color-mix(in srgb, var(--surface) 96%, transparent); box-shadow: 0 20px 44px -30px rgba(0, 0, 0, .6); }
.diagram-node .badge { width: 52px; height: 52px; font-size: 30px; }
.diagram-node h5 { font-size: 21px; line-height: 1.2; font-weight: 700; }
.diagram-node p { font-size: 16px; line-height: 1.3; color: var(--muted); margin-top: 4px; }
.diagram-text { min-width: 0; overflow-wrap: anywhere; }
.diagram-node.tight { padding: 6px 12px; }
.diagram-node.tight .badge { width: 40px; height: 40px; font-size: 24px; }
.diagram-node.tight h5 { font-size: 18px; }
.diagram.stacked .diagram-node { flex-direction: column; justify-content: center; text-align: center; gap: 6px; padding: 8px; border-left-width: 1px; border-top: 4px solid var(--series); }
.diagram.stacked .diagram-node h5 { font-size: 18px; }
.diagram.stacked .diagram-node p { display: none; }
.diagram.stacked .diagram-node .badge { width: 46px; height: 46px; }
.diagram-node .done { right: -12px; top: -12px; }
.rv.on.diagram-node { animation: enter calc(.85s * var(--speed)) var(--ease-out) both; animation-delay: calc((var(--lead) + var(--i) * 70ms) * var(--wait)); }
.wire-label { position: absolute; translate: -50% -50%; max-width: 170px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--muted); font-size: 15px; line-height: 1.3; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .5s; }
.wire-label.dim { opacity: .2; }
.wire-label.lit { color: var(--text); border-color: var(--accent); }

/* ---- plans ---------------------------------------------------------------------------- */

.plan { padding: 22px 30px 18px; --name: 400px; }
.plan-legend { display: flex; gap: 32px; height: 48px; align-items: flex-start; font-size: 19px; color: var(--muted); }
.plan-legend span { display: flex; gap: 10px; align-items: center; transition: opacity .4s; }
.plan-legend i { width: 18px; height: 18px; border-radius: 5px; }
.plan-head, .plan-row { display: flex; }
.plan-head { height: 40px; border-bottom: 1px solid var(--line); }
.plan-name { width: var(--name); flex: none; padding-right: 18px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
.plan-name b { font-size: 21px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-name small { font-size: 16px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan.dense .plan-name b { font-size: 18px; }
.plan-columns, .plan-grid { display: grid; grid-template-columns: repeat(var(--columns), minmax(0, 1fr)); flex: 1; }
.plan-columns span { text-align: center; font-size: 18px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.plan-columns span.now { color: var(--accent); font-weight: 800; }
.plan-rows { position: relative; }
.plan-grid { position: absolute; left: var(--name); right: 0; top: 0; bottom: 0; }
.plan-grid i { border-left: 1px solid var(--line); }
.plan-grid i.now { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.plan-row { position: relative; align-items: stretch; }
.plan-row.node.hot { scale: 1.012; box-shadow: none; }
.plan-track { flex: 1; position: relative; }
.plan-bar { position: absolute; top: 18%; bottom: 18%; display: flex; align-items: center; justify-content: center; padding: 0 12px; border-radius: 9px; background: var(--series); color: #fff; font-size: 17px; font-weight: 650; white-space: nowrap; overflow: hidden; text-shadow: 0 1px 3px rgba(0, 0, 0, .45); transform-origin: left center; }
.plan-bar.planned { background: color-mix(in srgb, var(--series) 30%, transparent); border: 2px dashed var(--series); color: var(--text); text-shadow: none; }
.plan-bar.risk { box-shadow: 0 0 0 3px var(--bad); }
.plan-milestone { position: absolute; top: 50%; width: 28px; height: 28px; translate: -50% -50%; rotate: 45deg; border-radius: 6px; background: var(--series); box-shadow: 0 0 0 3px var(--bg); }
.plan-value { position: absolute; top: 50%; translate: 26px -50%; font-size: 17px; white-space: nowrap; }
.plan-value.before { translate: calc(-100% - 26px) -50%; }
.rv.on.plan-row .plan-bar { animation: grow-x calc(.9s * var(--speed)) var(--ease-out) both; animation-delay: calc((var(--lead) + 200ms + var(--i) * 80ms) * var(--wait)); }
.rv.on.plan-row .plan-milestone { animation: appear .6s var(--ease-out) both; animation-delay: calc((var(--lead) + 500ms + var(--i) * 80ms) * var(--wait)); }
.rv.on.plan-row.node { animation: fade .6s ease both; animation-delay: calc((var(--lead) + var(--i) * 70ms) * var(--wait)); }

/* ---- bullets ------------------------------------------------------------------------- */

.bullets { display: flex; flex-direction: column; gap: 34px; }
.bullets li { display: flex; gap: 28px; align-items: flex-start; }
.bullets h4 { font-size: 33px; line-height: 1.25; font-weight: 650; padding-top: 4px; }
.bullets p { font-size: 23px; color: var(--muted); margin-top: 6px; }
.bullets.dense { gap: 18px; }
.bullets.dense .badge { width: 52px; height: 52px; font-size: 28px; }
.bullets.dense h4 { font-size: 27px; padding-top: 0; }
.bullets.dense p { font-size: 20px; margin-top: 2px; }

/* ---- stats --------------------------------------------------------------------------- */

.stats { display: grid; gap: 28px; }
.stat { position: relative; padding: 38px 40px; display: flex; flex-direction: column; gap: 10px; overflow: hidden; }
.stat .badge { margin-bottom: 14px; }
.stat-label { font-size: 23px; color: var(--muted); font-weight: 600; }
.stat-value { font-family: var(--font-head); line-height: 1.08; font-weight: 760; letter-spacing: -.02em; white-space: nowrap; }
.stat p { font-size: 20px; color: var(--muted); }
.delta { display: flex; align-items: center; gap: 10px; font-size: 23px; font-weight: 650; }
.delta .icon { font-size: 26px; }
.tone-good .delta, .delta.tone-good { color: var(--good); }
.delta.tone-bad { color: var(--bad); }
.delta.tone-neutral { color: var(--muted); }
.stats.stacked { gap: 22px; }
.stats.dense { gap: 16px; }
.stats.dense .stat { padding: 18px 30px; gap: 2px; }
.stats.dense .stat-label { font-size: 20px; }
.stats.dense .delta { font-size: 19px; }
.stats.dense p { font-size: 18px; }

/* ---- timeline ------------------------------------------------------------------------ */

.timeline { display: grid; grid-template-columns: repeat(var(--count), minmax(0, 1fr)); gap: 28px; position: relative; }
.timeline-line { position: absolute; left: 0; right: 0; top: 76px; height: 4px; border-radius: 4px; background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent)); transform-origin: left center; }
.moment { display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.moment-label { height: 48px; font-family: var(--font-head); font-size: 28px; font-weight: 700; white-space: nowrap; }
.moment-dot { width: 28px; height: 28px; margin: 16px 0 40px; border-radius: 50%; background: var(--series); border: 5px solid var(--bg); box-shadow: 0 0 0 3px var(--series); position: relative; }
.moment-card { align-self: stretch; padding: 28px 22px; min-height: 230px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.moment-card h4 { font-size: 28px; line-height: 1.2; }
.moment-card p { font-size: 20px; color: var(--muted); }
.moment.node.hot { box-shadow: none; }

/* ---- process ------------------------------------------------------------------------- */

.process { display: flex; align-items: stretch; gap: 14px; }
.stage-step { flex: 1; min-width: 0; padding: 36px 28px; display: flex; flex-direction: column; gap: 14px; min-height: 340px; border-bottom: 5px solid var(--series); }
.step-number { margin-top: auto; font-family: var(--font-head); font-size: 22px; font-weight: 700; color: var(--muted); }
.stage-step h4 { font-size: 30px; line-height: 1.2; }
.stage-step p { font-size: 20px; color: var(--muted); }
.connector { display: flex; align-items: center; color: var(--muted); font-size: 40px; flex: none; }

/* ---- comparison ---------------------------------------------------------------------- */

.comparison { display: grid; gap: 36px; align-items: stretch; }
.option { padding: 38px 40px; display: flex; flex-direction: column; gap: 18px; min-height: 380px; }
.option-head { display: flex; align-items: center; gap: 18px; }
.option h4 { font-size: 36px; line-height: 1.2; }
.option-value { font-family: var(--font-head); font-size: 64px; line-height: 1.05; font-weight: 760; }
.option > p { font-size: 22px; color: var(--muted); }
.option ul { display: flex; flex-direction: column; gap: 14px; margin-top: 8px; }
.option li { display: flex; gap: 16px; align-items: flex-start; font-size: 23px; }
.option li .icon { font-size: 28px; margin-top: 2px; color: var(--muted); }
.option.tone-good { border-color: var(--good); background: color-mix(in srgb, var(--good) 9%, var(--surface)); }
.option.tone-good li .icon { color: var(--good); }
.option.tone-bad li .icon { color: var(--bad); }

/* ---- table, quote, text, callout, picture -------------------------------------------- */

.table-panel { padding: 20px 36px; overflow: hidden; }
.stage table { width: 100%; border-collapse: collapse; font-size: 26px; font-variant-numeric: tabular-nums; }
.stage th { text-align: left; padding: 20px 16px; font-size: 19px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--line); }
.stage td { padding: 24px 16px; border-bottom: 1px solid var(--line); }
.stage tbody tr:last-child td { border-bottom: 0; }
.stage th.figures, .stage td.figures { text-align: right; }
.stage table.dense { font-size: 22px; }
.stage table.dense td { padding: 15px 16px; }
.stage tr.marked { background: color-mix(in srgb, var(--primary) 20%, transparent); font-weight: 700; }

.quote { position: relative; padding: 20px 0 20px 80px; }
.quote-mark { position: absolute; left: -8px; top: -112px;font-size: 200px; line-height: 1; font-family: Georgia, serif; color: var(--primary); }
.quote blockquote { font-family: var(--font-head); font-size: 50px; line-height: 1.3; font-weight: 500; text-wrap: balance; }
.quote blockquote.long { font-size: 36px; }
.quote figcaption { margin-top: 28px; font-size: 24px; color: var(--muted); }
.quote figcaption::before { content: "— "; }

.prose h3 { font-size: 38px; line-height: 1.2; margin-bottom: 22px; }
.prose p { font-size: 28px; line-height: 1.55; color: color-mix(in srgb, var(--text) 82%, var(--muted)); margin-bottom: 20px; }

.callout { padding: 48px 46px; display: flex; flex-direction: column; gap: 20px; border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 20%, var(--surface)), color-mix(in srgb, var(--surface) 85%, transparent) 70%); }
.callout .badge { --series: var(--accent); }
.callout h3 { font-size: 38px; line-height: 1.2; }
.callout p { font-size: 26px; line-height: 1.5; }

.picture { height: 100%; width: 100%; overflow: hidden; border-radius: var(--radius); }
.el-image .element-body { flex: 1; }
.picture img { width: 100%; height: 100%; object-fit: cover; display: block; }
.picture.fit-contain img { object-fit: contain; }
.picture-missing { height: 100%; display: flex; flex-direction: column; gap: 18px; align-items: center; justify-content: center; font-size: 26px; color: var(--muted); border: 2px dashed var(--line); border-radius: var(--radius); }
.picture-missing .icon { font-size: 64px; }
.picture-waiting { height: 100%; display: flex; align-items: center; justify-content: center; font-size: 96px; color: color-mix(in srgb, var(--primary) 55%, transparent); background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, var(--surface)), color-mix(in srgb, var(--secondary) 12%, var(--surface))); }

/* ---- charts -------------------------------------------------------------------------- */

.chart-panel { padding: 27px; overflow: hidden; }
.chart { display: block; overflow: visible; }
.chart-empty { color: var(--muted); text-align: center; padding: 80px; }
.legend { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 0 34px; align-items: center; font-size: 21px; line-height: 30px; color: var(--muted); }
.legend span { display: flex; align-items: center; gap: 11px; white-space: nowrap; }
.legend i { width: 18px; height: 18px; border-radius: 5px; }
.chart text { fill: var(--text); font-family: var(--font-body); }
.chart .tick { fill: var(--muted); font-size: 19px; font-variant-numeric: tabular-nums; }
.chart .category { fill: var(--muted); font-size: 22px; }
.chart .category.small { font-size: 18px; }
.chart .category.tiny { font-size: 16px; }
.chart .value { font-size: 23px; font-weight: 650; }
.chart .value.big { font-size: 30px; }
.chart .value.small { font-size: 18px; }
.chart .ring-total { font-size: 62px; font-weight: 760; font-family: var(--font-head); }
.gridline { stroke: var(--grid); stroke-width: 1; }
.gridline.baseline { stroke: color-mix(in srgb, var(--muted) 60%, transparent); }
.column, .slice { transition: opacity .5s; }
.slice { stroke: var(--surface); stroke-width: 2; }
.mark-dim { opacity: .38; }
.chart .category.mark-hot, .chart .value.mark-hot { fill: var(--text); font-weight: 800; }
.column:hover, .ring:hover { filter: brightness(1.18); }
.line { fill: none; stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.area { opacity: .14; }
.dot { stroke: var(--surface); stroke-width: 3; }
.focus-line { stroke: var(--muted); stroke-width: 1; }
.link { stroke: var(--muted); stroke-width: 1; }
.ring { fill: none; transition: opacity .5s; }
.gauge-track { fill: none; stroke: color-mix(in srgb, var(--primary) 18%, transparent); stroke-linecap: round; }
.gauge-fill { fill: none; stroke-linecap: round; }
.web { fill: none; stroke: var(--grid); stroke-width: 1; }
.radar-shape { fill-opacity: .14; stroke-width: 3; stroke-linejoin: round; }

/* ---- reveal and entrance ------------------------------------------------------------- */

.rv.off { opacity: 0 !important; pointer-events: none; }

/* Travel direction of whatever enters; set by the way the scene was reached. */
.scene { --ex: 0px; --ey: 90px; --es: 1; }
.scene.tr-rise.back { --ey: -90px; }
.scene.tr-pan { --ex: 420px; --ey: 0px; }
.scene.tr-pan.back { --ex: -420px; }
.scene.tr-expand { --ey: 130px; --lead: 280ms; }
.scene.tr-rise.fwd, .scene.tr-rise.back, .scene.tr-morph, .scene.tr-fade { --lead: 250ms; }
.scene.tr-expand.back, .scene.tr-collapse { --ey: 260px; --lead: 480ms; }
.scene.tr-collapse.back { --ey: 130px; --lead: 420ms; }
.scene.tr-zoom { --ey: 0px; --es: .72; }
.scene.tr-zoom.back { --es: 1.25; }
.scene.tr-fade, .scene.tr-morph { --ey: 28px; }
.scene.tr-intro { --ey: 60px; --lead: 150ms; }
/* Heading lines are stacked tightly: they only settle a little, or they would cross each other. */
.scene .head .anim { --ey: 22px; --es: 1; }

.anim, .rv.on.node {
    animation: enter calc(.85s * var(--speed)) var(--ease-out) both;
    animation-delay: calc((var(--lead) + var(--i, 0) * var(--stagger)) * var(--wait));
}
.rv.off .anim { animation-name: none; }
@keyframes enter { from { opacity: 0; transform: translate(var(--ex), var(--ey)) scale(var(--es)); } }

.w > span { animation: word calc(.95s * var(--speed)) var(--ease-out) both; animation-delay: calc(var(--lead) * .7 + var(--i) * 55ms); }
@keyframes word { from { transform: translateY(115%) rotate(4deg); opacity: 0; } }
.kicker.anim { animation-name: enter, tracking; }
@keyframes tracking { from { letter-spacing: .55em; } }

.badge .icon path { stroke-dasharray: 1; animation: stroke 1.2s var(--ease-out) both; animation-delay: calc(var(--lead) + .25s + var(--i, 0) * var(--stagger)); }
@keyframes stroke { from { stroke-dashoffset: 1; } }

/* Tree: branches sprout out of the hub, then the connectors reach for them. */
.rv.on.tree-node { animation-name: sprout; animation-duration: calc(1s * var(--speed)); animation-delay: calc((var(--lead) + 130ms + var(--i) * var(--stagger)) * var(--wait)); }
@keyframes sprout { from { opacity: 0; transform: translate(var(--fx), var(--fy)) scale(.2); } 25% { opacity: 1; } }
.edge.rv.on { animation: stroke calc(.9s * var(--speed)) var(--ease-out) both; animation-delay: calc((var(--lead) + 300ms + var(--i) * var(--stagger)) * var(--wait)); }
.tree-root.anim { animation-name: root; }
@keyframes root { from { opacity: 0; transform: scale(.6); } }

.timeline-line.anim { animation-name: unroll; animation-duration: calc(1.5s * var(--speed)); }
@keyframes unroll { from { transform: scaleX(0); } }
.moment-dot { animation: pop .6s cubic-bezier(.34, 1.8, .64, 1) both; animation-delay: calc((var(--lead) + 250ms + var(--i) * var(--stagger)) * var(--wait)); }
.stage .done { animation: pop .6s cubic-bezier(.34, 1.8, .64, 1) both; animation-delay: calc(var(--lead) + .5s); }
@keyframes pop { from { transform: scale(0); } }

/* Chart marks. --i orders them; revealing a hidden chart restarts all of these. */
.chart .grow-y, .chart .grow-x, .chart .grow-center, .chart .grow-center-both {
    animation: grow-y calc(1.1s * var(--speed)) var(--ease-out) both;
    animation-delay: calc(var(--lead) + 250ms + var(--i, 0) * 70ms);
}
.chart .grow-x { animation-name: grow-x; }
.chart .grow-center { animation-name: grow-x; }
.chart .grow-center-both { animation-name: grow-both; }
@keyframes grow-y { from { transform: scaleY(0); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes grow-both { from { transform: scale(0); opacity: 0; } }
.chart .draw { stroke-dasharray: 1; animation: stroke calc(1.8s * var(--speed)) cubic-bezier(.45, 0, .2, 1) both; animation-delay: calc(var(--lead) + 250ms + var(--i, 0) * 110ms); }
.chart .draw-once { stroke-dasharray: 1; animation: stroke calc(.75s * var(--speed)) cubic-bezier(.4, .1, .3, 1) both; animation-delay: calc(var(--lead) + 200ms + var(--i, 0) * 190ms); }
.chart .pop { transform-box: fill-box; transform-origin: center; animation: appear .6s var(--ease-out) both; animation-delay: calc(var(--lead) + 450ms + var(--i, 0) * 80ms); }
@keyframes appear { from { opacity: 0; transform: translateY(14px) scale(.8); } }
.chart .area { animation: fade 1.4s ease both; animation-delay: calc(var(--lead) + 900ms + var(--i, 0) * 200ms); }
@keyframes fade { from { opacity: 0; } }

.rv.off .chart *, .rv.off .badge .icon path { animation: none !important; }

/* ---- control by stage.js -------------------------------------------------------------- */

/* Frozen: departing copies, thumbnails and the instant of measuring. */
.is-ghost, .is-ghost *, .measuring, .measuring *, .is-static .stage, .is-static .stage * {
    animation: none !important;
    transition: none !important;
}
.is-ghost, .is-ghost * { pointer-events: none !important; }

/* A morph target is brought in by script, so neither it nor its ancestors may animate. */
.stage [data-mkin], .stage [data-mkpath] { animation: none !important; }

.morph-surface, .morph-text { position: absolute; left: 0; top: 0; margin: 0; transform-origin: 0 0; }
.morph-surface { overflow: hidden; }
.morph-text { display: block; }

.blackout-stage { position: absolute; inset: 0; background: #000; }

@media (prefers-reduced-motion: reduce) {
    .stage { --speed: .4; --stagger: 20ms; }
    .scene { --ex: 0px !important; --ey: 0px !important; --es: 1 !important; }
    .blob, .wave { animation: none; }
}
