/* The presentation as slides: one full view per step, ← → between them.
   style.css has the shared parts (panes, highlighting, the explorer, the contract graph). */
body.deck-page { overflow: hidden; height: 100vh; }
html { scroll-behavior: auto; }
.bands { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bands svg { width: 100%; height: 100%; }
#progress { transition: width .6s cubic-bezier(.2,.8,.2,1); }
#docs-link { position: fixed; top: 16px; right: 22px; z-index: 60; font: 500 13px var(--mono); background: #0d0e12cc; border: 1px solid var(--line); padding: 6px 12px; border-radius: 999px; backdrop-filter: blur(6px); }

/* ───────── slides ───────── */
#deck { position: fixed; inset: 0 0 54px 0; z-index: 1; perspective: 1600px; }
.slide { position: absolute; inset: 0; padding: 54px 5.5vw 22px; max-width: none; margin: 0; overflow: hidden;
  opacity: 0; pointer-events: none; transform: translateX(9%) rotateY(-7deg) scale(.94); filter: blur(10px);
  transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1), filter .7s; transform-origin: 50% 50%; }
.slide.past { transform: translateX(-9%) rotateY(7deg) scale(.94); }
.slide.now { opacity: 1; pointer-events: auto; transform: none; filter: none; }
.slide .fx { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); transition-delay: 0s; }
.slide.now .fx { opacity: 1; transform: none; transition-delay: calc(var(--d, 0s) + .15s + var(--i, 0) * 90ms); }
.slide h2 { font-size: clamp(34px, 4vw, 58px); max-width: 24ch; }
.slide h2.small { font-size: clamp(28px, 2.9vw, 44px); max-width: 30ch; }
.slide .lede { margin-top: 14px; font-size: clamp(16px, 1.25vw, 20px); max-width: 76ch; }
.slide .kicker { margin-bottom: 12px; }

/* the wipe between slides: strata sweeping across */
#wipe { position: fixed; inset: 0; z-index: 30; pointer-events: none; }
#wipe i { position: absolute; left: 0; right: 0; height: 25%; transform: translateX(-101%); }
#wipe i:nth-child(1) { top: 0; background: #1d2033; } #wipe i:nth-child(2) { top: 25%; background: #2a2540; }
#wipe i:nth-child(3) { top: 50%; background: #3a2c3c; } #wipe i:nth-child(4) { top: 75%; background: #5e3f33; }
#wipe.go i { animation: wipe .75s cubic-bezier(.7,0,.3,1) forwards; }
#wipe.back i { animation-name: wipeback; }
#wipe.go i:nth-child(2) { animation-delay: .04s; } #wipe.go i:nth-child(3) { animation-delay: .08s; } #wipe.go i:nth-child(4) { animation-delay: .12s; }
@keyframes wipe { 0% { transform: translateX(-101%); } 45%, 55% { transform: translateX(0); opacity: .55; } 100% { transform: translateX(101%); opacity: 0; } }
@keyframes wipeback { 0% { transform: translateX(101%); } 45%, 55% { transform: translateX(0); opacity: .55; } 100% { transform: translateX(-101%); opacity: 0; } }

/* ───────── the bottom bar ───────── */
#hud { position: fixed; left: 0; right: 0; bottom: 0; height: 54px; z-index: 50; display: flex; align-items: center; gap: 20px; padding: 0 22px; background: linear-gradient(transparent, #0d0e12 40%); }
#hud .where { min-width: 260px; font: 13px var(--mono); color: var(--muted); display: flex; gap: 10px; align-items: baseline; }
#hud .where b { color: var(--text); font: 600 14px var(--display); letter-spacing: -.01em; }
#dots { flex: 1; display: flex; justify-content: center; gap: 6px; align-items: center; }
#dots button { width: 9px; height: 9px; border-radius: 5px; border: 0; padding: 0; background: var(--line2); cursor: pointer; transition: width .4s, background .3s; position: relative; }
#dots button.on { width: 46px; background: #8ea2ff40; overflow: hidden; }
#dots button.on::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(var(--p, 1)); transition: transform .5s; }
#dots button.done { background: #8ea2ff88; }
#dots button .tip { position: absolute; bottom: 18px; left: 50%; transform: translateX(-50%); white-space: nowrap; font: 12px var(--mono); color: var(--text); background: var(--panel); border: 1px solid var(--line2); padding: 2px 8px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .2s; }
#dots button:hover .tip { opacity: 1; }
#hud .ctl { min-width: 260px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; font: 12.5px var(--mono); color: var(--muted); }
#hud .ctl button { font: 600 16px var(--sans); width: 38px; height: 32px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); color: var(--text); cursor: pointer; transition: border-color .2s, transform .15s; }
#hud .ctl button:hover { border-color: var(--accent); transform: translateY(-1px); }
#hud .ctl button:disabled { opacity: .35; cursor: default; transform: none; }
#hud-sub { margin-right: 8px; display: flex; gap: 4px; align-items: center; }
#hud-sub i { width: 6px; height: 6px; border-radius: 50%; background: var(--line2); transition: background .3s, transform .3s; }
#hud-sub i.on { background: var(--accent2); transform: scale(1.3); }
#hud-sub i.done { background: #f0b45c88; }
kbd { font: 600 12px var(--mono); border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 6px; padding: 1px 7px; color: var(--text); background: var(--panel); }

/* ───────── layout inside a slide ───────── */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 30px; height: 100%; }
.split.wide-right { grid-template-columns: minmax(380px, 36%) minmax(0, 1fr); }
.split > .col { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.slide .pane .body { max-height: none; }
.code-pane { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 16px; }
.code-pane .body { flex: 1; overflow: auto; }
.pane.term { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 14px; }
.pane.term .body { flex: 1; overflow: auto; }
.say { min-height: 0; margin-top: 4px; }
.say h3 { font-size: clamp(22px, 1.9vw, 30px); margin: 6px 0 8px; }
.say p { font-size: 16px; }
.slide.now .say > * { animation: sayin .6s cubic-bezier(.2,.8,.2,1) both; }
.slide.now .say > *:nth-child(2) { animation-delay: .06s; } .slide.now .say > *:nth-child(3) { animation-delay: .12s; }
@keyframes sayin { from { opacity: 0; transform: translateX(-18px); filter: blur(4px); } }

/* hero */
#hero { display: flex; flex-direction: column; justify-content: center; }
#hero .inner { max-width: 1500px; margin: 0 auto; width: 100%; }
#hero h1 { font-size: clamp(80px, 13vw, 200px); line-height: .9; letter-spacing: -.05em; }
#hero h1 .l { display: inline-block; opacity: 0; transform: translateY(60px) rotate(4deg); }
#hero.now h1 .l { animation: rise 1.1s cubic-bezier(.2,.8,.2,1) forwards; }
#hero .tag { font-family: var(--display); font-size: clamp(24px, 2.6vw, 38px); max-width: 26ch; line-height: 1.2; margin-top: 28px; }
#hero .tag .dim { color: var(--muted); }
#hero .cue { margin-top: 50px; font: 13px var(--mono); color: var(--muted); display: flex; gap: 8px; align-items: center; }

/* problem cards, one per step */
.problems { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; background: none; border: 0; }
.problems .card { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 24px 22px 26px; opacity: .12; transform: translateY(30px) scale(.97); filter: blur(3px); transition: all .7s cubic-bezier(.2,.8,.2,1); }
.problems .card.in { opacity: 1; transform: none; filter: none; }
.problems .card.cur { border-color: var(--accent2); box-shadow: 0 0 60px -20px var(--accent2); }
.problems .card .fix { opacity: 0; transform: translateY(8px); transition: all .6s .45s; }
.problems .card.in .fix { opacity: 1; transform: none; }
.problems .n { font: 600 12px var(--mono); color: var(--bad); letter-spacing: .1em; }
.problems h3 { margin: 10px 0 8px; font-size: 20px; }
.problems p { margin: 0; color: var(--muted); font-size: 15px; }
.problems p b { color: var(--bad); font-size: 1.15em; }
.problems .fix { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line2); font-size: 14.5px; color: var(--text); }
.problems .fix::before { content: "Strata → "; color: var(--ok); font-family: var(--mono); font-size: 12.5px; }

/* ───────── the codebase graph ───────── */
.graph { position: relative; min-height: 0; height: 100%; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(ellipse at 30% 20%, #8ea2ff0d, transparent 60%), #0f1116cc; overflow: hidden; }
.graph svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.graph .legend { position: absolute; left: 16px; bottom: 12px; display: flex; gap: 14px; font: 11.5px var(--mono); color: var(--muted); z-index: 2; }
.graph .legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; background: var(--c); vertical-align: 0; }
.graph .collabel { position: absolute; top: 12px; transform: translateX(-50%); font: 600 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.gnode { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 9px; font: 12.5px var(--mono); white-space: nowrap;
  background: var(--bg2); border: 1px solid var(--line2); color: var(--text); z-index: 1;
  transition: left .9s cubic-bezier(.2,.8,.2,1), top .9s cubic-bezier(.2,.8,.2,1), border-color .4s, box-shadow .4s, background .4s, opacity .5s, filter .5s; }
.gnode .kd { font: 600 9.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); }
.gnode .st { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); flex: none; transition: background .4s, box-shadow .4s; }
.gnode.k-type .nm { color: var(--ty); } .gnode.k-trait .nm { color: var(--kw); } .gnode.k-fn .nm { color: var(--fn); } .gnode.k-test .nm { color: var(--muted); } .gnode.k-impl .nm { color: #c3c2bb; }
.gnode.pass .st { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.gnode.fuzzed .st, .gnode.assumed .st { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.gnode.fail { border-color: var(--bad); background: #2a1416; box-shadow: 0 0 34px -6px var(--bad); }
.gnode.fail .st { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.gnode.hole { border-color: var(--hole); box-shadow: 0 0 34px -8px var(--hole); }
.gnode.hole .st { background: var(--hole); box-shadow: 0 0 10px var(--hole); animation: pulse 1.2s infinite; }
.gnode.changed { border-color: var(--accent2); animation: ping 1.4s cubic-bezier(.2,.8,.2,1) 2; }
.gnode.focus { border-color: var(--accent); box-shadow: 0 0 0 3px #8ea2ff40, 0 0 40px -6px var(--accent); z-index: 3; }
.gnode.dim { opacity: .22; filter: grayscale(.6); }
.gnode.pop { animation: pop .55s cubic-bezier(.2,1.6,.4,1) both; }
.gnode.gone { opacity: 0; transform: translate(-50%, -50%) scale(.6); }
.gnode .cex[data-side=right] { left: auto; right: 0; transform: none; }
.gnode .cex[data-side=left] { left: 0; transform: none; }
.gnode .cex { position: absolute; top: 100%; left: 50%; transform: translateX(-50%); margin-top: 8px; white-space: normal; width: max-content; max-width: 300px; font: 11.5px/1.45 var(--mono); color: #ffc2c2; background: #2a1416; border: 1px solid #ff6b6b66; border-radius: 8px; padding: 6px 9px; animation: pop .5s both; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 #f0b45ccc; } 100% { box-shadow: 0 0 0 18px #f0b45c00; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -50%) scale(.3); } }
.graph path.e { stroke: #3a3f4d; stroke-width: 1.2; fill: none; transition: stroke .4s, opacity .4s; }
.graph path.e.dim { opacity: .15; }
.graph path.e.focus { stroke: #8ea2ffaa; stroke-width: 1.6; }
.graph path.e.lit { stroke: var(--accent2); stroke-width: 1.8; stroke-dasharray: 5 6; animation: dash .8s linear infinite; }
.graph path.e.bad { stroke: var(--bad); }
.graph.shake { animation: shake .5s; }
@keyframes shake { 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(3px); } }

.stage { position: relative; }
.code-card { position: absolute; right: 18px; bottom: 18px; width: min(560px, 62%); max-height: 56%; z-index: 4; display: flex; flex-direction: column; opacity: 0; transform: translateY(20px) scale(.97); transition: opacity .5s, transform .5s; pointer-events: none; box-shadow: 0 30px 80px -20px #000, 0 0 0 1px #f0b45c33; }
.code-card.on { opacity: 1; transform: none; pointer-events: auto; }
.code-card .bar { color: var(--accent2); }
.code-card .body { overflow: auto; font-size: 12.5px; }
#contracts .code-card { position: relative; right: auto; bottom: auto; width: auto; max-height: none; margin-top: 18px; flex: 1; min-height: 0; }
.stamp { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) rotate(-8deg) scale(2.5); z-index: 6; font: 700 54px var(--display); letter-spacing: .04em; text-transform: uppercase; padding: 6px 26px; border: 5px solid currentColor; border-radius: 14px; opacity: 0; pointer-events: none; }
.stamp.bad { color: var(--bad); } .stamp.ok { color: var(--ok); }
.stamp.on { animation: stamp .55s cubic-bezier(.2,1.4,.4,1) forwards; }
@keyframes stamp { to { opacity: .92; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } }

/* typing: lines that arrive */
.ln { display: block; min-height: 1.6em; animation: lnin .25s ease-out both; }
@keyframes lnin { from { opacity: 0; transform: translateX(-6px); background: #f0b45c22; } }
.caret::after { content: "▍"; color: var(--accent2); animation: blink 1s steps(1) infinite; }

/* structural diffs */
#diffs .tabs { margin-top: 20px; }
#diffs .vs { margin-top: 16px; height: calc(100% - 270px); }
#diffs .vs .side { display: flex; flex-direction: column; min-height: 0; }
#diffs .vs .side .pane { flex: 1; min-height: 0; }
#diffs .vs .side .pane .body { max-height: none; overflow: auto; }
.big-n { font: 600 28px var(--display); letter-spacing: -.02em; margin-left: auto; text-transform: none; }
.side.old .big-n { color: var(--bad); } .side.new .big-n { color: var(--ok); }
.flip { animation: flip .5s cubic-bezier(.2,.8,.2,1); }
@keyframes flip { from { opacity: 0; transform: translateY(14px) scale(.98); filter: blur(4px); } }

/* proof */
#proof .explorer { margin-top: 18px; padding: 20px 24px 22px; }
#proof .grid2 { margin-top: 8px; }
#proof .grid2 .body { height: calc(100vh - 610px); min-height: 160px; overflow: auto; }
.axis.flash { animation: flash .8s; }
@keyframes flash { 30% { filter: drop-shadow(0 0 20px var(--bad)); } }

/* verdicts */
#math-verify { flex: 1; overflow: auto; }
#verdicts .split > .col > .pane { flex: 1; min-height: 0; display: flex; flex-direction: column; margin-top: 16px; }

/* contracts */
#contracts .cgraph { height: 42%; min-height: 240px; border: 1px solid var(--line); border-radius: 18px; background: #0f1116cc; margin: 0; }
#contracts .cgraph .node { font-size: 15px; padding: 12px 18px; }
#contracts .say h3 { margin-top: 4px; }

/* merge */
#merge .lanes { margin-top: 10px; }
#merge .lanes svg { height: 170px; }
.three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; height: calc(100% - 420px); }
.three .pane { display: flex; flex-direction: column; opacity: .15; transform: translateY(16px); filter: blur(2px); transition: all .6s cubic-bezier(.2,.8,.2,1); }
.three .pane.in { opacity: 1; transform: none; filter: none; }
.three .pane .body { flex: 1; overflow: auto; }
.lanes .anim { opacity: 0; transition: opacity .6s; }
.lanes .anim.in { opacity: 1; }
.lanes path.draw { stroke-dasharray: 1200; stroke-dashoffset: 1200; transition: stroke-dashoffset 1.4s ease; }
.lanes path.draw.in { stroke-dashoffset: 0; }

/* tiles: what's new */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; }
.tiles button { text-align: left; font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 20px; cursor: pointer; opacity: 0; transform: translateY(40px) rotateX(30deg); transition: border-color .2s, box-shadow .2s; }
.slide.now .tiles button { animation: tile .8s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: calc(.4s + var(--i) * 70ms); }
@keyframes tile { to { opacity: 1; transform: none; } }
.tiles button:hover { border-color: var(--accent); box-shadow: 0 0 40px -14px var(--accent); }
.tiles b { display: block; font: 600 17px var(--display); margin-bottom: 6px; }
.tiles span { color: var(--muted); font-size: 14px; }
.tiles .pr { display: block; margin-top: 10px; font: 11.5px var(--mono); color: var(--faint); }

/* feature slides */
.feature { display: flex; flex-direction: column; }
.feature .split { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); flex: 1; min-height: 0; height: auto; margin-top: 4px; }
.feature .say { min-height: 3.4em; }
.feature .say .lede { margin: 10px 0 0; }
.feature .outs { margin-top: 16px; }
.feature .code-pane .body { font-size: 13px; }
.feature .outs { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.feature .outs .pane { flex: none; max-height: 100%; display: flex; flex-direction: column; animation: flip .5s cubic-bezier(.2,.8,.2,1) both; }
.feature .outs .pane .body { overflow: auto; }
.feature .outs .pane.old { opacity: .45; }
.feature .outs .pane.bad { box-shadow: 0 0 0 1px #ff6b6b66, 0 30px 80px -30px #ff6b6b55; }
.feature .points { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 12px; }
.feature .points li { position: relative; padding: 16px 18px 16px 40px; color: var(--muted); font-size: 15.5px; background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; animation: flip .6s cubic-bezier(.2,.8,.2,1) both; }
.feature .points li:nth-child(2) { animation-delay: .15s; }
.feature .points li::before { content: "▸"; position: absolute; left: 18px; top: 16px; color: var(--accent2); }
.feature .points li b { color: var(--text); }
.feature .code-pane .body .hot { background: #f0b45c1f; box-shadow: inset 3px 0 0 var(--accent2); display: block; }

/* facts */
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 26px; }
.facts div { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; opacity: .1; transform: scale(.96); transition: all .6s cubic-bezier(.2,.8,.2,1); }
.facts div.in { opacity: 1; transform: none; }
.facts b { display: block; font: 600 26px var(--display); letter-spacing: -.02em; color: var(--accent); }
.facts span { color: var(--muted); font-size: 14px; }
#engine .split { height: calc(100% - 140px); }
#engine .code-pane { flex: none; }

/* in progress */
.wip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.wip .card { grid-column: span 2; }
.wip .card:nth-child(4) { grid-column: 2 / span 2; }
.wip .card { background: var(--bg2); border: 1px dashed var(--line2); border-radius: 16px; padding: 18px 16px; display: flex; flex-direction: column; min-height: 0; opacity: .1; transform: translateY(30px); filter: blur(3px); transition: all .7s cubic-bezier(.2,.8,.2,1); }
.wip .card.in { opacity: 1; transform: none; filter: none; }
.wip .card.cur { border-color: var(--accent2); border-style: solid; box-shadow: 0 0 60px -24px var(--accent2); }
.wip .br { font: 11.5px var(--mono); color: var(--accent2); }
.wip h3 { font-size: 18px; margin: 8px 0 8px; }
.wip p { color: var(--muted); font-size: 13.5px; margin: 0 0 10px; }
.wip pre { margin: auto 0 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: 12px/1.55 var(--mono); overflow: auto; white-space: pre-wrap; }

/* levels, start */
#levels .levels { margin-top: 26px; height: calc(100% - 250px); }
#levels .levels .pane { display: flex; flex-direction: column; min-height: 0; }
#levels .levels .pane .body { flex: 1; overflow: auto; }
#start .cmds { margin-top: 30px; }
#start footer { margin-top: 30px; color: var(--faint); font-size: 13px; }

@media (max-width: 1100px) {
  .split, .split.wide-right, .feature .split { grid-template-columns: 1fr; overflow: auto; }
  .problems, .tiles { grid-template-columns: 1fr 1fr; }
  .wip { grid-template-columns: 1fr 1fr; height: auto; }
}
.pane.shake { animation: shake .5s; }
.lanes svg { width: 100%; display: block; }
.lanes .lane-label { font: 600 12px var(--mono); fill: var(--muted); }
.lanes circle { fill: var(--bg); stroke-width: 2.5; }
.lanes .commit text { font: 12px var(--mono); fill: var(--text); }
@keyframes nodeping { 0% { transform: translate(-50%, -50%) scale(1); } 40% { transform: translate(-50%, -50%) scale(1.08); } 100% { transform: translate(-50%, -50%) scale(1); } }

/* explanations arriving sentence by sentence */
.sent { opacity: 0; filter: blur(5px); display: inline; animation: sent .8s cubic-bezier(.2,.8,.2,1) forwards; animation-delay: var(--t, 0ms); }
@keyframes sent { to { opacity: 1; filter: none; } }
.say .who { font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .1em; display: inline-flex; gap: 8px; align-items: center; color: var(--accent2); }

/* three ideas */
.ideas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 30px; }
.idea { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; padding: 22px 22px 20px; display: flex; flex-direction: column; min-height: 400px;
  opacity: .1; transform: translateY(30px) scale(.97); filter: blur(3px); transition: all .7s cubic-bezier(.2,.8,.2,1); }
.idea.in { opacity: 1; transform: none; filter: none; }
.idea.cur { border-color: var(--accent); box-shadow: 0 0 70px -24px var(--accent); }
.idea .n { font: 600 13px var(--mono); color: var(--accent2); letter-spacing: .1em; }
.idea h3 { font-size: 24px; margin: 8px 0 10px; }
.idea p { color: var(--muted); font-size: 15.5px; margin: 0 0 16px; min-height: 6.5em; }
.idea p b { color: var(--text); }
.idea pre { margin: auto 0 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font: 12px/1.6 var(--mono); overflow: hidden; white-space: pre-wrap; }
.idea pre .term-line { min-height: 0; }
.fixes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.fixes button { text-align: left; font: inherit; background: transparent; border: 1px dashed var(--line2); border-radius: 12px; padding: 12px 16px; cursor: pointer; color: var(--text);
  opacity: 0; transform: translateY(20px); transition: opacity .6s, transform .6s, border-color .2s; transition-delay: calc(var(--i) * 140ms); }
.fixes.in button { opacity: 1; transform: none; }
.fixes button:hover { border-color: var(--accent); }
.fixes .p { display: block; color: var(--muted); font-size: 14px; text-decoration: line-through; text-decoration-color: #ff6b6b88; }
.fixes .f { display: block; color: var(--ok); font: 600 14px var(--mono); margin-top: 4px; }

/* structural changes: first the wall of text, then the change */
#diffs { display: flex; flex-direction: column; }
#diffs .lede { min-height: 3.3em; }
.bigdiff { display: none; flex: 1; min-height: 0; justify-content: center; margin-top: 10px; }
.bigdiff .pane { width: min(1100px, 100%); display: flex; flex-direction: column; box-shadow: 0 0 120px -40px #ff6b6b55; }
.bigdiff .body { flex: 1; overflow: hidden; font-size: 15px; line-height: 1.55; -webkit-mask-image: linear-gradient(transparent, #000 8%, #000 92%, transparent); }
.bigdiff .count { font-size: 15px; padding: 3px 12px; }
#diffs.big .bigdiff { display: flex; animation: flip .6s cubic-bezier(.2,.8,.2,1); }
#diffs.big .diffview { display: none; }
.diffview { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: flip .6s cubic-bezier(.2,.8,.2,1); }
#diffs .diffview .tabs { margin-top: 6px; align-self: flex-start; }
#diffs .diffview .vs { flex: 1; min-height: 0; height: auto; margin-top: 14px; }

/* contracts: a node nobody knows about yet */
.cgraph .node.unknown { border-style: dashed; color: var(--muted); }
.cgraph .node .badge:empty { display: none; }

/* a feature, briefly: text on the side */
.feature .split { grid-template-columns: minmax(340px, 34%) minmax(0, 1fr); height: 100%; }
.feature .side-text { justify-content: center; padding-bottom: 40px; }
.feature .side-text h2 { margin-bottom: 6px; }
.feature .side-text .lede { font-size: clamp(17px, 1.3vw, 21px); line-height: 1.6; }
.feature .code-pane { margin-top: 0; }
.feature .outs { flex: none; max-height: 46%; margin-top: 14px; }
.feature .outs .pane { min-height: 0; }
.say h3 { line-height: 1.2; }
.feature .split > .col:last-child { justify-content: center; }
.feature .code-pane { flex: 0 1 auto; }
.feature .outs { flex: 0 1 auto; max-height: 52%; }
#signature .say, .feature .side-text .say { margin-top: 12px; }

/* how an agent works today: files, and an agent moving between them */
.split.today { grid-template-columns: minmax(380px, 38%) minmax(0, 1fr); }
.files { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; height: calc(100% - 40px); }
.file { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; transition: border-color .3s, box-shadow .3s; }
.file.here { border-color: var(--accent); box-shadow: 0 0 40px -12px var(--accent); }
.file .fname { font: 500 11.5px var(--mono); color: var(--muted); margin-bottom: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file .lines { display: flex; flex-direction: column; gap: 5px; }
.file .lines i { display: block; height: 5px; border-radius: 3px; background: #2c303b; transition: background .3s, box-shadow .3s; }
.file .lines i.hit { background: var(--hole); box-shadow: 0 0 10px var(--hole); }
.file .lines i.edit { background: var(--accent2); }
.file .lines i.bad { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.file .lines i.add { background: var(--ok); }
.file .lines i.extra { animation: lnin .3s both; }
.agent { position: absolute; left: 50%; top: 50%; z-index: 3; transform: translate(-50%, -50%); transition: left .45s cubic-bezier(.4,0,.2,1), top .45s cubic-bezier(.4,0,.2,1), opacity .4s; display: flex; align-items: center; gap: 6px; pointer-events: none; }
.agent i { width: 18px; height: 18px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px #8ea2ff33, 0 0 30px var(--accent); animation: pulse 1.2s infinite; }
.agent span { font: 600 11px var(--mono); color: var(--accent); background: #0d0e12cc; padding: 1px 6px; border-radius: 6px; }
.agent.away { opacity: 0; }
.caption.illus { font-size: 12.5px; color: var(--faint); margin-top: 10px; text-align: right; }
#today .pane.term .body { font-size: 12.5px; }

/* text → tokens → tree → graph */
.astage { position: relative; height: 100%; border: 1px solid var(--line); border-radius: 18px; background: radial-gradient(ellipse at 30% 20%, #8ea2ff0d, transparent 60%), #0f1116cc; overflow: hidden; }
.astage > div { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .6s, transform .6s; transform: scale(.97); }
.astage[data-show=tokens] > .tokens, .astage[data-show=tree] > .tree, .astage[data-show=graph] > .graph, .astage[data-show=rendered] > .rendered { opacity: 1; pointer-events: auto; transform: none; }
.astage > .graph { border: 0; background: none; border-radius: 0; }
.tokens { padding: 40px 44px; font: 17px/1.9 var(--mono); }
.tok { display: inline-block; white-space: pre; transition: all .5s cubic-bezier(.2,.8,.2,1); transition-delay: calc(var(--i) * 12ms); }
.tok.k { color: var(--kw); } .tok.t { color: var(--ty); } .tok.f { color: var(--text); } .tok.nm { color: var(--num); } .tok.s { color: var(--str); } .tok.c { color: var(--com); font-style: italic; } .tok.p { color: #c3c2bb; }
.tokens.chips { line-height: 2.3; }
.tokens.chips br { display: none; }
.tokens.chips .tok { margin: 3px 3px; padding: 1px 8px; border-radius: 7px; background: #ffffff0e; box-shadow: inset 0 0 0 1px #ffffff1c; }
.tokens.chips .tok.ws, .tokens.chips .tok.c { width: 0; padding: 0; margin: 0; opacity: 0; font-size: 0; box-shadow: none; }
.tree svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.tree path { fill: none; stroke: #4a5060; stroke-width: 1.5; stroke-dasharray: 300; stroke-dashoffset: 300; animation: draw .6s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.tnode { position: absolute; transform: translate(-50%, -50%); font: 500 13px var(--mono); padding: 4px 10px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line2); white-space: nowrap; animation: pop .5s cubic-bezier(.2,1.6,.4,1) both; }
.tnode.k-def { color: var(--fn); border-color: var(--accent); font-weight: 600; }
.tnode.k-type { color: var(--ty); } .tnode.k-param { color: var(--text); } .tnode.k-result { color: var(--muted); }
.tnode.k-contract { color: var(--kw); } .tnode.k-body { color: var(--muted); font-style: italic; }
.tnode.k-op { color: var(--accent2); font-weight: 600; } .tnode.k-field, .tnode.k-call { color: var(--fn); } .tnode.k-num { color: var(--num); } .tnode.k-kw { color: var(--kw); }
.rendered { padding: 50px 56px; font: 18px/1.8 var(--mono); white-space: pre; }
.astage.shake { animation: shake .5s; }
.split .col > h2 + .say { margin-top: 12px; }

/* a new section: its title, then out of the way */
#sect { position: fixed; inset: 0; z-index: 40; pointer-events: none; display: flex; align-items: center; justify-content: center; }
#sect span { font: 600 clamp(48px, 7vw, 110px)/1 var(--display); letter-spacing: -.03em; color: var(--text); opacity: 0; text-shadow: 0 0 80px #8ea2ff55; }
#sect.on span { animation: sect 1.7s cubic-bezier(.7,0,.2,1) forwards; }
@keyframes sect {
  0% { opacity: 0; transform: translateY(30px) scale(.9); filter: blur(12px); }
  25% { opacity: 1; transform: none; filter: none; }
  60% { opacity: 1; transform: none; filter: none; }
  100% { opacity: 0; transform: translate(-30vw, -44vh) scale(.18); filter: blur(2px); }
}
.slide.intro .fx { --d: 1.35s; }
.part-title { font: 600 11.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent2); margin: 4px 0 8px; display: block; }
#start .links { grid-template-columns: repeat(4, 1fr); margin-top: 26px; }
