@font-face {
	font-family: "CMU Serif";
	src: url("assets/cmunbx.woff") format("woff");
	font-weight: 700;
	font-display: swap;
}

:root {
	--bg: #000;
	--panel: #141414;
	--panel-2: #0a0a0a;
	--border: #2f2f2f;
	--line: #1f1f1f;
	--text: #e6e6e6;
	--muted: #8d8d8d;
	--faint: #6e6e6e;
	--c1: #ef4444;
	--c2: #f97316;
	--c3: #eab308;
	--c4: #84cc16;
	--c5: #10b981;
	--gutter: clamp(16px, 6.6vw, 96px);
	--title: clamp(44px, 5.3vw, 84px);
	/* Height of the fixed nav: pinned sections keep their content below it. */
	--nav: 90px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
	background: var(--bg);
	color: var(--text);
	font-family: "Source Sans 3", system-ui, sans-serif;
	font-size: 17px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
.serif { font-family: "CMU Serif", Georgia, serif; font-weight: 700; }
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; }
.dim { color: var(--muted); }
.small { font-size: 15px; }
.center { text-align: center; }

#sky { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; display: block; }
main, .foot { position: relative; z-index: 1; }

/* Nav */
.nav {
	position: fixed; top: 0; left: 0; right: 0; z-index: 50;
	display: flex; justify-content: space-between; align-items: center;
	padding: 24px clamp(16px, 3.3vw, 48px);
	transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), background 0.3s, padding 0.3s;
}
.nav.hidden { transform: translateY(-110%); }
/* Once you scroll, the nav becomes a solid bar so content never shows through it. */
.nav.solid { background: #000000e6; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 #1c1c1c; padding-top: 16px; padding-bottom: 16px; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 24px; color: #fff; }
.logo { width: 28px; height: 28px; }
.links { display: flex; align-items: center; gap: 34px; font-size: 16px; color: var(--muted); }
.links a:hover, .links a.on { color: #fff; }
.links a[data-sec] { position: relative; }
.links a[data-sec]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: #fff; transform: scaleX(0); transform-origin: left; transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.2, 1); }
.links a.on::after { transform: scaleX(1); }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; gap: 12px;
	padding: 20px 32px; font-size: 19px; font-weight: 600;
	transition: background 0.2s, color 0.2s, border-color 0.2s;
	will-change: transform;
}
.btn-primary { background: #fff; color: #000; }
.btn-primary:hover { background: #e6e6e6; }
.btn-ghost { border: 1px solid #4a4a4a; color: var(--text); }
.btn-ghost:hover { border-color: #fff; }
.btn-small { padding: 10px 18px; font-size: 15px; background: #fff; color: #000; }
.links .btn-small:hover { color: #000; }
.ico { width: 22px; height: 22px; }
.text-link { font-size: 17px; text-decoration: underline; text-underline-offset: 4px; color: var(--text); }

/* Split text */
.split .w, .wordmark .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.04em 0 0.14em; margin-bottom: -0.14em; }
/* No will-change here: one GPU layer per letter (170+) made Chrome re-sort
   every layer on every frame. The reveal is short, so plain repaints are cheaper. */
.split .ch { display: inline-block; }

/* Hero */
.hero { position: relative; height: 100vh; min-height: 680px; display: flex; flex-direction: column; justify-content: center; }
.hero-vignette {
	position: absolute; left: 50%; top: 56%; width: 86vw; height: 66vh; transform: translate(-50%, -50%);
	background: radial-gradient(closest-side, #000f 0%, #000c 55%, #0000 100%);
	pointer-events: none;
}
.hero-center { position: relative; display: flex; flex-direction: column; align-items: center; gap: 34px; padding-top: 6vh; }
.wordmark { font-size: clamp(110px, 18vw, 300px); line-height: 0.92; color: #fff; letter-spacing: -0.01em; will-change: transform, filter; }
.wordmark .ch { display: inline-block; }
.tagline { font-size: clamp(19px, 1.8vw, 26px); text-align: center; padding: 0 16px; }
.cta-row { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: center; }
.hero-foot {
	position: absolute; left: 0; right: 0; bottom: 28px; padding: 0 clamp(16px, 3.3vw, 48px);
	display: flex; justify-content: space-between; align-items: center; font-size: 15px; color: var(--muted);
}
.scroll-hint { display: flex; align-items: center; gap: 10px; color: var(--text); }
.scroll-hint i { width: 1px; height: 34px; background: linear-gradient(#fff0, #fff); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* Ticker */
.ticker { position: relative; padding: 46px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #000c; overflow: hidden; }
.ticker-row { display: flex; white-space: nowrap; will-change: transform; }
.ticker-row .set { display: flex; flex: none; }
.ticker-row.big { font-size: clamp(32px, 3.4vw, 50px); font-weight: 600; }
.ticker-row.small { font-size: 21px; color: var(--muted); margin-top: 18px; }
.tk { display: inline-flex; align-items: center; gap: 18px; margin-right: 96px; }
.tk svg { width: 30px; height: 30px; flex: none; }
.tk em { font-style: normal; font-family: "JetBrains Mono"; font-size: 0.45em; }
.tf { display: inline-flex; align-items: center; gap: 12px; margin-right: 64px; }
.tf i { width: 10px; height: 10px; flex: none; }

/* Shared section bits */
.title { font-size: var(--title); line-height: 1.02; color: var(--text); text-wrap: balance; }
/* Sized so "measure. plan. teach. practice." always fits on one line. */
.title.big { font-size: min(clamp(46px, 6.4vw, 104px), calc((100vw - 2 * var(--gutter)) / 15.9)); }
.lead { font-size: clamp(18px, 1.45vw, 21px); color: var(--muted); max-width: 34em; }

/* Agent */
.claim { font-size: clamp(30px, 2.8vw, 40px); font-weight: 600; line-height: 1.12; text-wrap: balance; }
.agents li { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-top: 1px solid var(--border); }
.agents b { font-weight: 600; font-size: 18px; }
.agents span { color: var(--muted); font-size: 16px; text-align: right; }
.terminal { background: var(--panel-2); border: 1px solid var(--border); }
.term-bar { display: flex; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--muted); }
.term-body { padding: 28px 28px 32px; font-size: clamp(13px, 1.1vw, 16px); display: flex; flex-direction: column; gap: 18px; min-height: 230px; position: relative; }
.tl { display: flex; gap: 14px; min-height: 1.4em; }
.tl i { color: #5a5a5a; font-style: normal; width: 0.8em; }
.tl.out span { color: var(--muted); }
.caret { position: absolute; width: 9px; height: 18px; background: #fff; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pulse { 50% { opacity: 0.35; } }
.note { font-size: 16px; color: var(--muted); }

/* Method head */

/* Lesson stage */
.window-wrap { width: 1280px; height: 800px; flex: none; transform-origin: 30% 30%; }
.window {
	width: 1280px; height: 800px; display: flex; background: #000; border: 1px solid var(--border);
	box-shadow: 0 60px 160px #ffffff10, 0 0 0 1px #000; transform-origin: 50% 100%; position: relative; overflow: hidden;
	font-size: 14px;
}
.w-side { width: 230px; flex: none; border-right: 1px solid #1c1c1c; padding: 14px 10px; display: flex; flex-direction: column; gap: 6px; }
.dots { display: flex; gap: 8px; padding: 4px 6px 12px; }
.dots i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.dots i:nth-child(2) { background: #febc2e; }
.dots i:nth-child(3) { background: #28c840; }
.w-class { display: flex; align-items: center; gap: 12px; padding: 10px; background: #111; font-weight: 600; }
.w-class b { width: 32px; height: 32px; display: grid; place-items: center; background: #e6e6e6; color: #000; font-size: 13px; }
.w-nav { display: flex; flex-direction: column; padding: 8px 0; }
.w-nav span { padding: 9px 10px; color: #bdbdbd; display: flex; justify-content: space-between; }
.w-nav em { font-style: normal; font-family: "JetBrains Mono"; font-size: 12px; color: var(--muted); }
.w-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.w-actions span { background: #161616; padding: 10px; font-weight: 600; font-size: 13px; text-align: center; }
.w-lessons-h { color: var(--muted); font-size: 13px; font-weight: 600; padding: 16px 10px 6px; }
.w-lesson { padding: 9px 10px; display: flex; flex-direction: column; }
.w-lesson b { font-weight: 500; }
.w-lesson small { color: var(--muted); font-size: 12px; }
.w-lesson.on { background: #161616; }
.w-lesson.on b { font-weight: 600; }
.w-lesson.dim { opacity: 0.6; }
.w-foot { margin-top: auto; padding: 10px; color: var(--muted); font-size: 13px; display: flex; align-items: center; gap: 8px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--c5); }
.dot.live { box-shadow: 0 0 10px #10b981aa; animation: pulse 2s ease-in-out infinite; }
.w-main { flex: 1; display: flex; flex-direction: column; min-width: 0; position: relative; }
.w-top { height: 56px; display: flex; align-items: center; gap: 14px; padding: 0 28px; border-bottom: 1px solid #141414; }
.stepbar { display: flex; gap: 3px; }
.stepbar i { width: 14px; height: 7px; background: #2a2a2a; transition: background 0.25s; }
.stepbar i.done { background: #8d8d8d; }
.stepbar i.cur { background: #fff; width: 22px; }
.w-topic { font-weight: 600; }
.w-body { flex: 1; display: flex; min-height: 0; }
.w-read { flex: 1; padding: 26px 48px; display: flex; flex-direction: column; gap: 16px; font-size: 16px; line-height: 1.75; overflow: hidden; }
.w-read h3 { font-size: 32px; line-height: 1.1; color: #f2f2f2; margin-top: 6px; }
.badge-row { display: flex; align-items: center; gap: 12px; background: #111; padding: 12px 16px; font-size: 14px; }
.badge { background: var(--c5); color: #000; font-weight: 700; padding: 3px 10px; }
.disp { text-align: center; font-size: 17px; }
.key { background: #111; padding: 16px 20px; display: flex; gap: 20px; }
.key b { font-size: 13px; white-space: nowrap; padding-top: 3px; }
.key mark { background: #2a2a2a; color: #fff; padding: 1px 5px; }
.w-turn { width: 420px; flex: none; background: #0b0b0b; border-left: 1px solid #141414; padding: 24px; display: flex; flex-direction: column; gap: 14px; position: relative; }
.turn-h { display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.pill { background: #161616; color: var(--text); padding: 5px 10px; }
.q { font-weight: 600; font-size: 16px; line-height: 1.5; }
.opts { display: flex; flex-direction: column; gap: 2px; }
.opt { display: flex; gap: 14px; padding: 12px 14px; background: #141414; font-size: 13.5px; line-height: 1.45; transition: background 0.3s, color 0.3s; }
.opt i { font-style: normal; font-family: "JetBrains Mono"; font-size: 12px; width: 22px; height: 22px; display: grid; place-items: center; background: #262626; flex: none; }
.opt.ghost { background: transparent; color: var(--muted); }
.opt.pick { background: #e6e6e6; color: #000; font-weight: 600; }
.opt.pick i { background: #000; color: #fff; }
.conf b { font-size: 13px; color: var(--muted); display: block; margin-bottom: 8px; transition: color 0.3s; }
.conf-bars { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; align-items: end; height: 42px; }
.conf-bars i { background: #262626; height: 30%; transition: height 0.3s, background 0.3s; }
.think b { font-size: 13px; color: var(--muted); display: block; margin-bottom: 8px; }
.think-box { background: #000; border: 1px solid #1c1c1c; padding: 12px 14px; height: 74px; font-size: 13.5px; color: #cfcfcf; }
.submit { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 18px 24px; background: #1a1a1a; font-size: 15px; transition: background 0.3s, color 0.3s; }
.submit.go { background: #e6e6e6; color: #000; }
.cursor { position: absolute; width: 24px; height: 24px; left: 0; top: 0; z-index: 5; pointer-events: none; opacity: 0; }
.collapse-node { position: absolute; right: -24px; bottom: -34px; z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: 0; pointer-events: none; }
.collapse-node svg { width: 64px; height: 64px; filter: drop-shadow(0 0 18px #f9731688); }
.collapse-node span { font-weight: 700; font-size: 15px; white-space: nowrap; }
.collapse-node.flyer { position: fixed; left: 0; top: 0; right: auto; bottom: auto; z-index: 40; opacity: 0; transform-origin: 50% 32px; will-change: transform, filter; }
.collapse-node.flyer svg { filter: none; }

/* Graph */
.graph-stage { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.25fr); gap: 3vw; align-items: center; padding: var(--nav) var(--gutter) 2vh; }
.graph-copy { display: flex; flex-direction: column; gap: 36px; container-type: inline-size; }
/* "what you know." (about 8 em wide) must fit the column on one line. */
.graph-copy .title { font-size: min(var(--title), calc(100cqi / 8.2)); }
.legend .ramp { display: flex; gap: 4px; }
.ramp i { width: 44px; height: 6px; }
.ramp i:nth-child(1) { background: var(--c1); } .ramp i:nth-child(2) { background: var(--c2); } .ramp i:nth-child(3) { background: var(--c3); } .ramp i:nth-child(4) { background: var(--c4); } .ramp i:nth-child(5) { background: var(--c5); }
.ramp-l { width: 236px; display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); margin-top: 10px; }
.points li { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; border-top: 1px solid var(--border); }
.points b { font-weight: 600; font-size: 18px; }
.points b.over { color: var(--c2); }
.points span { color: var(--muted); font-size: 16px; }
.graph-box { position: relative; height: calc(100vh - var(--nav) - 4vh); }
#graphSvg { width: 100%; height: 100%; overflow: visible; }
#graphSvg .edge { fill: none; stroke: #ffffff38; stroke-width: 1.3; }
#graphSvg .head { fill: none; stroke: #ffffff70; stroke-width: 1.3; }
#graphSvg .node { cursor: pointer; }
#graphSvg .node .halo { transition: opacity 0.3s; opacity: 0; }
#graphSvg .node:hover .halo, #graphSvg .node.hot .halo { opacity: 0.55 !important; }
#graphSvg text { font-family: "Source Sans 3"; }
#graphSvg .pulse { mix-blend-mode: screen; }
.hover-card {
	position: absolute; width: 240px; padding: 16px; background: var(--panel); border: 1px solid var(--border);
	box-shadow: 0 20px 50px #000; display: flex; flex-direction: column; gap: 10px; pointer-events: none;
	opacity: 0; transform: translateY(6px); transition: opacity 0.2s, transform 0.2s; font-size: 13px; z-index: 3;
}
.hover-card.on { opacity: 1; transform: none; }
.hover-card h4 { font-size: 16px; font-weight: 700; }
.hc-bar { display: flex; gap: 3px; align-items: center; }
.hc-bar i { width: 12px; height: 12px; }
.hc-bar span { color: var(--muted); margin-left: 8px; font-family: "JetBrains Mono"; font-size: 12px; }
.hc-row { display: flex; gap: 12px; }
.hc-row b { width: 58px; color: var(--faint); font-weight: 400; flex: none; }
.hc-hint { color: var(--faint); font-size: 12px; }

/* Classes */
.crop { position: relative; overflow: hidden; border: 1px solid var(--border); background: #000; }
.crop img { position: absolute; display: block; max-width: none; }

/* Ship log */
.ship { padding: 4vh var(--gutter) 16vh; display: flex; flex-direction: column; gap: 56px; }
.ship-head { display: flex; justify-content: space-between; align-items: end; gap: 24px; flex-wrap: wrap; }
.btn-ghost .dim { font-size: 14px; }
.ship-row { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 1fr); gap: 32px; }
.release { background: var(--panel-2); border: 1px solid var(--border); padding: 36px; display: flex; flex-direction: column; gap: 26px; }
.rel-top { display: flex; justify-content: space-between; font-size: 15px; color: var(--muted); }
.rel-top .dot { margin-right: 10px; }
.version { font-size: clamp(72px, 7.2vw, 104px); font-weight: 700; letter-spacing: -0.03em; line-height: 0.95; color: #fff; display: flex; height: 0.95em; overflow: hidden; }
.version .col { display: flex; flex-direction: column; }
.version .col span { height: 0.95em; display: block; }
.assets li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 14px; }
.assets li span:first-of-type { flex: 1; }
.assets .sz { color: var(--muted); font-size: 13px; }
.assets svg { width: 18px; height: 18px; color: var(--text); flex: none; }
.c-head { display: flex; justify-content: space-between; padding-bottom: 18px; font-size: 15px; }
#commits li { display: grid; grid-template-columns: 110px 1fr; gap: 20px; padding: 15px 0; border-top: 1px solid var(--line); font-size: 16px; }
#commits time { font-family: "JetBrains Mono"; font-size: 13px; color: var(--faint); padding-top: 2px; }
#commits b { font-weight: 600; margin-right: 8px; }
#commits span { color: var(--muted); }
.chart { display: flex; flex-direction: column; gap: 16px; }
.bars { height: 180px; display: flex; gap: 4px; align-items: end; }
.bars i { flex: 1; transform-origin: bottom; min-height: 3px; }
.axis { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--faint); }

/* Finale */
.finale { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 44px; text-align: center; padding: 0 16px; }
.final-title { font-size: clamp(56px, 8.4vw, 124px); color: #fff; line-height: 1; }
/* Questions: a constellation, one star per question (faq.js places the stars). */
.faq { position: relative; height: clamp(820px, 100vh, 1000px); }
.faq-head { position: absolute; left: var(--gutter); top: 13.3%; z-index: 2; display: flex; flex-direction: column; gap: 10px; }
.faq-head .title { margin-bottom: 14px; }
.faq-head .dim { font-size: 18px; }
.faq-count { font-size: 15px; color: var(--faint); }
.sq-stage { position: absolute; inset: 0; }
.sq-lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.sq-lines line { stroke: #ffffff2e; stroke-width: 1.2; }
.sq-lines line.read { stroke: #10b98166; stroke-width: 1.4; opacity: 0; transition: opacity 0.8s; }
.sq-lines line.read.on { opacity: 1; }
.sq-comet { position: absolute; left: 0; top: 0; height: 2px; border-radius: 2px; background: linear-gradient(90deg, #fff0, #ffffffd9); transform-origin: right center; opacity: 0; pointer-events: none; z-index: 3; }
.sq { position: absolute; display: flex; align-items: center; translate: -17px -50%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; z-index: 1; }
.sq-dot { position: relative; width: 34px; height: 34px; flex: none; }
.sq-dot > * { position: absolute; left: 50%; top: 50%; translate: -50% -50%; border-radius: 50%; }
.sq .core { width: 8px; height: 8px; background: #5a5a5a; transition: width 0.4s, height 0.4s, background 0.6s; animation: sq-tw 3.4s ease-in-out infinite; }
.sq:nth-child(3n) .core { animation-duration: 4.6s; animation-delay: -1.2s; }
.sq:nth-child(3n + 1) .core { animation-duration: 2.8s; animation-delay: -0.7s; }
@keyframes sq-tw { 50% { opacity: 0.5; } }
.sq .glow { width: 44px; height: 44px; background: radial-gradient(circle, #10b9814d, #10b98100 70%); opacity: 0; transition: opacity 0.6s, width 0.5s, height 0.5s; }
.sq svg { width: 34px; height: 34px; border-radius: 0; rotate: -90deg; overflow: visible; }
.sq circle { fill: none; stroke-width: 2; }
.sq .hring { stroke: #fff; opacity: 0; transition: opacity 0.3s; }
.sq .ring { stroke: var(--c5); stroke-dasharray: 88; stroke-dashoffset: 88; transition: stroke-dashoffset 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.sq-label { margin-left: 1px; font-size: 17px; color: var(--muted); white-space: nowrap; transition: color 0.3s, margin 0.4s; }
.sq:hover .sq-label, .sq:focus-visible .sq-label { color: #fff; }
.sq:hover .hring { opacity: 0.35; }
.sq:focus-visible { outline: none; }
.sq:focus-visible .sq-label { outline: 1px solid #fff; outline-offset: 4px; }
.sq.read .core { width: 10px; height: 10px; background: var(--c5); animation: none; }
.sq.read .glow { opacity: 1; }
.sq.read .sq-label { color: var(--text); }
.sq.on .core { width: 12px; height: 12px; background: #fff; animation: none; }
.sq.on .glow { width: 80px; height: 80px; background: radial-gradient(circle, #ffffff59, #fff0 70%); opacity: 1; }
.sq.on .ring { stroke-dashoffset: 0; }
.sq.on .hring { opacity: 0; }
.sq.on .sq-label { margin-left: 9px; font-size: 19px; font-weight: 600; color: #fff; }
.sq.flip { flex-direction: row-reverse; translate: calc(-100% + 17px) -50%; }
.sq.flip .sq-label { margin: 0 1px 0 0; }
.sq.flip.on .sq-label { margin: 0 9px 0 0; }
/* No box: a soft black glow behind the letters hides the lines under them. */
.sq-answer { position: absolute; width: 340px; margin: 0; font-size: 18px; line-height: 1.5; color: #cfcfcf; opacity: 0; pointer-events: none; z-index: 2; text-shadow: 0 0 4px #000, 0 0 10px #000, 0 0 18px #000; }
.sq-caret { display: inline-block; width: 9px; height: 1.05em; margin-left: 3px; vertical-align: -0.17em; background: var(--text); animation: blink 1s steps(1) infinite; }
.sq-spoken { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 32px clamp(16px, 3.3vw, 48px); border-top: 1px solid var(--line); background: #000; font-size: 15px; color: var(--muted); }
.foot a { color: var(--text); }
.foot nav { display: flex; gap: 32px; }


/* Logos */
.ico-s { width: 16px; height: 16px; flex: none; }
.with-ico { display: inline-flex; align-items: center; gap: 8px; }
.ico-row { display: inline-flex; gap: 6px; margin-right: 4px; }
.agents b { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; }
.agents b .ico { width: 20px; height: 20px; }
.w-foot .ico-s { width: 14px; height: 14px; }
.btn .ico { width: 20px; height: 20px; }

/* Shader canvases */
.chromed { position: relative; }
.chromed .ch { color: transparent; }
.fx-chrome { position: absolute; left: -0.12em; top: -0.12em; width: calc(100% + 0.24em); height: calc(100% + 0.24em); pointer-events: none; }
.shimmer { position: relative; overflow: hidden; isolation: isolate; }
.fx-shimmer { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Problem */
.problem { padding: 18vh var(--gutter) 8vh; display: flex; flex-direction: column; gap: 7vh; }
.prob-head { display: flex; justify-content: space-between; gap: 48px; align-items: end; }
.prob-head .title { flex: none; }
.prob-head .lead { font-size: 17px; max-width: 30em; }
.chats { display: grid; place-items: center; }
.cwin { width: min(820px, 100%); height: 580px; display: flex; flex-direction: column; background: #0a0a0a; border: 1px solid var(--border); font-size: 15px; line-height: 1.5; }
.cw-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--line); font-size: 14px; }
.cw-head b { font-weight: 600; }
.cw-class { display: inline-grid; margin-left: 4px; }
.cw-class > span { grid-area: 1 / 1; transition: opacity 0.35s; }
#classNew { opacity: 0; }
.cw-date { display: flex; align-items: center; gap: 12px; }
.cw-gap { font-size: 12px; color: var(--faint); opacity: 0; }
.cw-chip { font-size: 13px; font-weight: 600; color: #fff; background: #1c1c1c; border: 1px solid #3a3a3a; padding: 4px 10px; min-width: 76px; text-align: center; }
.cw-body { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.cw-layer { position: absolute; inset: 0; padding: 24px 28px; display: flex; flex-direction: column; justify-content: flex-end; gap: 18px; }
.cw-layer.new { justify-content: flex-start; }
.cw-fill { flex: 1; }
.cw-new { display: flex; align-items: center; gap: 14px; font-size: 12px; color: var(--faint); }
.cw-new i { flex: 1; height: 1px; background: #262626; }
.cw-input { display: flex; align-items: center; gap: 12px; padding: 14px 24px; border-top: 1px solid var(--line); color: var(--faint); }
.cw-caret { width: 8px; height: 16px; background: #e6e6e6; animation: blink 1s steps(1) infinite; }
.msg.me { align-self: flex-end; max-width: 400px; background: #1c1c1c; padding: 12px 16px; color: #ededed; }
.msg.ai { max-width: 560px; color: #cfcfcf; display: flex; flex-direction: column; gap: 14px; }
.msg.ai table { border-collapse: collapse; font-size: 12.5px; width: 100%; }
.msg.ai th { font-weight: 600; text-align: left; padding: 7px 10px; background: #141414; border: 1px solid #262626; }
.msg.ai td { padding: 7px 10px; border: 1px solid #262626; color: #6e6e6e; }
.msg.ai td.mono { color: var(--text); }
.ctx { color: var(--muted); font-size: 14px; }
.same { color: var(--text); font-size: 14px; transition: color 0.4s; }
.same.hit { color: var(--c2); }
.fx-forget { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.quotes figure { border-top: 1px solid var(--border); padding-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.quotes blockquote { font-size: 19px; font-weight: 600; line-height: 1.4; color: #f0f0f0; }
.quotes figcaption { font-size: 15px; color: var(--muted); }
.keeps { background: #0a0a0a; border: 1px solid var(--border); padding: 32px; display: flex; flex-direction: column; gap: 26px; }
.keeps h3 { font-size: 22px; font-weight: 700; }
.keep-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.keep { display: flex; flex-direction: column; gap: 10px; }
.fx-strip { width: 100%; height: 4px; display: block; background: #262626; }
.keep b { font-size: 17px; font-weight: 600; }
.keep p { font-size: 15px; color: var(--muted); }

/* About */
.about { padding: 18vh var(--gutter) 6vh; display: flex; flex-direction: column; gap: 56px; }
.who { display: flex; align-items: center; gap: 12px; font-size: 15px; }
.who .ico { width: 22px; height: 22px; }
.about-title { font-size: clamp(40px, 5.6vw, 88px); line-height: 1.05; color: #fff; }
.story { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 80px); max-width: 1180px; }
.story > div { display: flex; flex-direction: column; gap: 22px; }
.story p { font-size: clamp(17px, 1.3vw, 19px); line-height: 1.6; color: #cfcfcf; }
.story p.strong { color: #fff; font-weight: 600; }
.story a { text-decoration: underline; text-underline-offset: 3px; }
.fork { position: relative; width: 100%; aspect-ratio: 1248 / 200; margin-top: 4vh; }
.fork-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fork-svg .up { stroke: #3a3a3a; stroke-width: 2; fill: none; }
.fork-svg .br { stroke: #fff; stroke-width: 2; fill: none; }
.fork-svg .uc { fill: #4a4a4a; }
.fork-svg .gc { fill: #fff; }
.fork-svg .fp { fill: #000; stroke: #fff; stroke-width: 2; }
.fork-svg circle, .fork-svg .tag { transform-box: fill-box; transform-origin: center; }
.fork-svg .tag rect { fill: #fff; }
.fork-svg .tag text { font-family: "JetBrains Mono"; font-size: 15px; font-weight: 600; fill: #000; }
.fx-fork { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; mix-blend-mode: screen; }
.fork-l { position: absolute; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--faint); }
.fork-l b { font-size: 14px; font-weight: 400; color: var(--muted); }
.up-l { left: 0; top: 36%; }
.gs-l { left: 57.7%; top: 81%; }
.gs-l b { color: #fff; }


/* Chat playback */
.typing { display: flex; gap: 5px; padding: 6px 2px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: #6e6e6e; animation: dot 1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dot { 0%, 60%, 100% { opacity: 0.3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
.replay { margin-left: auto; background: none; border: 1px solid #2f2f2f; color: var(--muted); font-size: 12px; padding: 5px 10px; cursor: pointer; opacity: 0; pointer-events: none; transition: opacity 0.4s, color 0.2s, border-color 0.2s; }
.replay.on { opacity: 1; pointer-events: auto; }
.replay:hover { color: #fff; border-color: #6e6e6e; }

/* How it works */
.how { padding: 16vh var(--gutter) 8vh; display: flex; flex-direction: column; gap: 56px; }
.how-row { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: clamp(32px, 4.4vw, 64px); }
.how-copy { display: flex; flex-direction: column; gap: 32px; }
.how-copy .lead { font-size: 17px; }
.how-demo { min-width: 0; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tabs button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 10px; width: 100%; opacity: 0.4; transition: opacity 0.3s; }
.tabs li.on button, .tabs button:hover { opacity: 1; }
.tabs button:focus-visible { outline: 1px solid #fff; outline-offset: 4px; }
.tabs i { display: block; height: 3px; background: #262626; position: relative; overflow: hidden; }
.tabs i::after { content: ""; position: absolute; inset: 0; background: var(--fill, #fff); transform: scaleX(var(--p, 0)); transform-origin: left; }
.tabs b { font-size: 20px; font-weight: 600; }
.tab-desc { color: var(--muted); font-size: 16px; min-height: 3em; margin: 14px 0 24px; }
.stage { position: relative; }
.stage .terminal { position: absolute; left: 0; top: 0; width: 68%; }
.stage .term-body { min-height: 0; }
.stage .window-wrap { position: absolute; left: 64px; top: 96px; }
.stage .window { box-shadow: 0 40px 120px #000, 0 0 0 1px #000; }

/* Classes: three cards */
.classes { padding: 16vh var(--gutter) 8vh; display: flex; flex-direction: column; gap: 48px; }
.classes-head { display: flex; justify-content: space-between; align-items: end; gap: 48px; }
.classes-head .title { flex: none; }
.classes-head .lead { font-size: 17px; max-width: 26em; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.card { display: flex; flex-direction: column; gap: 16px; }
.card figcaption { display: flex; flex-direction: column; gap: 6px; }
.card b { font-size: 18px; font-weight: 600; }
.card span { color: var(--muted); font-size: 15px; }

/* Phone-only bits, hidden on desktop. */
.m-only { display: none; }
.pager { display: none; }
.graph-pan { width: 100%; height: 100%; }

/* Phones: one column, with sideways swipe rows (see design/landing.pen, "Mobile — landing (390)") */
@media (max-width: 860px) {
	:root { --gutter: 20px; --title: 34px; --nav: 64px; }
	.m-only { display: revert; }
	.d-only { display: none; }

	/* Nav: the name and the download button */
	.nav { padding: 14px var(--gutter); }
	.nav.solid { padding-top: 10px; padding-bottom: 10px; }
	.links a:not(.btn) { display: none; }
	.brand { font-size: 22px; }
	.brand .logo { display: none; }

	/* Hero */
	.hero { height: 100svh; min-height: 640px; }
	.hero-center { gap: 22px; padding: 4vh var(--gutter) 0; }
	/* One line, edge to edge: "godspeed" is about 4.6em wide, plus a little room. */
	.wordmark { font-size: calc((100vw - 2 * var(--gutter)) / 4.75); white-space: nowrap; }
	.tagline { font-size: 18px; padding: 0; }
	.cta-row { width: 100%; gap: 12px 40px; }
	.hero .btn-primary, .finale .btn-primary { width: 100%; justify-content: center; padding: 18px; font-size: 18px; }
	.hero .text-link { text-decoration: none; }
	.hero-note { max-width: 300px; font-size: 14px; color: var(--muted); text-align: center; }
	.hero-foot { flex-direction: column; gap: 6px; bottom: 24px; font-size: 14px; text-align: center; }
	.hero-foot .ico-row, .scroll-hint { display: none; }

	/* Ticker */
	.ticker { padding: 22px 0; }
	.ticker-row.big { font-size: 22px; }
	.ticker-row.small { font-size: 15px; margin-top: 10px; }
	.tk { gap: 10px; margin-right: 40px; }
	.tk svg { width: 20px; height: 20px; }
	.tf { margin-right: 36px; }

	/* Sideways swipe rows. They run to the screen edges but snap each card to the gutter. */
	.quotes, .keep-grid, .cards, .w-body {
		position: relative; display: flex; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain;
		scroll-snap-type: x mandatory; scroll-padding: 0 var(--gutter); scrollbar-width: none;
		margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter);
	}
	.quotes::-webkit-scrollbar, .keep-grid::-webkit-scrollbar, .cards::-webkit-scrollbar, .w-body::-webkit-scrollbar { display: none; }
	.quotes > *, .keep-grid > *, .cards > *, .w-body > * { flex: none; scroll-snap-align: start; }
	.pager { display: flex; gap: 6px; margin-top: -14px; }
	.pager button { all: unset; width: 18px; height: 3px; padding: 10px 0; background: #333 content-box; cursor: pointer; transition: width 0.3s, background-color 0.3s; }
	.pager button.on { width: 24px; background-color: #fff; }

	/* The problem */
	.problem { padding: 80px var(--gutter) 48px; gap: 32px; }
	.prob-head { flex-direction: column; align-items: flex-start; gap: 20px; }
	.prob-head .title { flex: initial; }
	.cwin { height: 580px; font-size: 14px; }
	.cw-head { padding: 12px 14px; font-size: 13px; white-space: nowrap; }
	.cw-gap { display: none; }
	.cw-chip { min-width: 0; padding: 4px 8px; }
	.cw-layer { padding: 16px; gap: 14px; }
	.cw-input { padding: 12px 16px; }
	.msg.me { max-width: 88%; }
	.msg.ai table { font-size: 11px; }
	.msg.ai th, .msg.ai td { padding: 6px 7px; }
	.quotes figure { width: calc(100vw - 2 * var(--gutter) - 40px); }
	.quotes blockquote { font-size: 18px; }
	.keeps { background: none; border: 0; padding: 0; gap: 16px; }
	.keeps h3 { font-size: 20px; }
	.keeps .pager { margin-top: 0; }
	.keep { width: 260px; background: #0a0a0a; border: 1px solid var(--border); padding: 18px; }

	/* How it works */
	.how { padding: 80px var(--gutter) 88px; gap: 24px; }
	.how-row { grid-template-columns: 1fr; gap: 36px; }
	.how-copy { gap: 26px; }
	.claim { font-size: 26px; }
	.agents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
	.agents li { flex-direction: column; align-items: center; padding: 18px 0 0; }
	.agents b { flex-direction: column; gap: 10px; font-size: 16px; }
	.agents span, .how-copy .note { display: none; }
	.tabs { gap: 6px; }
	.tabs button { opacity: 1; align-items: center; padding: 11px 0; background: #141414; border: 1px solid var(--border); color: var(--muted); transition: background 0.3s, color 0.3s; }
	.tabs li.on button { background: #fff; border-color: #fff; color: #000; }
	.tabs i { display: none; }
	.tabs b { font-size: 15px; }
	.tab-desc { min-height: 4.35em; margin: 16px 0; }
	.stage .terminal, .cursor, .w-side, .w-topic { display: none; }
	.stage .window-wrap { position: static; width: auto; height: auto; }
	.window { display: block; width: auto; height: auto; overflow: visible; background: none; border: 0; font-size: 14px; }
	.stage .window { box-shadow: none; }
	.w-main { display: block; }
	.w-top { height: auto; gap: 10px; padding: 0 0 12px; border: 0; }
	.stepbar i { width: 10px; height: 5px; }
	.stepbar i.cur { width: 16px; }
	.w-body { align-items: stretch; }
	.w-read, .w-turn { width: calc(100vw - 2 * var(--gutter) - 40px); border: 1px solid var(--border); }
	.w-read { padding: 18px; gap: 12px; font-size: 14px; line-height: 1.6; background: #000; }
	.w-read h3 { font-size: 22px; margin-top: 0; }
	.disp { font-size: 14px; overflow-x: auto; overflow-y: hidden; }
	.key { flex-direction: column; gap: 6px; padding: 12px 14px; }
	.badge-row { flex-wrap: wrap; gap: 8px; padding: 10px 12px; font-size: 12px; }
	.w-turn { gap: 12px; padding: 18px 18px 70px; }
	.q { font-size: 15px; }
	.opt { gap: 12px; padding: 9px 12px; font-size: 13px; }
	.conf-bars { height: 30px; }
	.think-box { height: 58px; padding: 10px 12px; }
	.w-main .pager { margin-top: 12px; }
	.submit { padding: 16px 18px; }
	.collapse-node { right: 12px; bottom: -64px; }

	/* Graph: the map pans inside its box */
	.graph-stage { display: flex; flex-direction: column; align-items: stretch; gap: 24px; min-height: 0; padding: 80px var(--gutter) 48px; }
	.graph-copy { display: contents; }
	.graph-copy .title { font-size: var(--title); }
	.graph-copy .lead { order: 1; }
	.graph-box { order: 2; height: 380px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
	.graph-pan { overflow: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
	.graph-pan::-webkit-scrollbar { display: none; }
	.graph-pan #graphSvg { width: 640px; height: 671px; }
	.legend { order: 3; display: flex; align-items: center; gap: 14px; }
	.ramp i { width: 30px; height: 4px; }
	.ramp-l { display: none; }
	.ramp-s { font-size: 15px; color: var(--muted); }
	.points { order: 4; }
	.points li:nth-child(n + 2) { display: none; }

	/* Classes */
	.classes { padding: 80px var(--gutter) 48px; gap: 28px; }
	.classes-head { flex-direction: column; align-items: flex-start; gap: 20px; }
	.classes-head .title { flex: initial; }
	.card { width: 290px; }

	/* About: the first paragraph, the rest behind "read the whole story" */
	.about { padding: 80px var(--gutter) 48px; gap: 24px; }
	.who, .fork { display: none; }
	.about-title { font-size: var(--title); }
	.story { grid-template-columns: 1fr; gap: 22px; }
	.story p { font-size: 17px; }
	.about:not(.open) .story > div:first-child > p:nth-child(n + 2), .about:not(.open) .story > div:nth-child(2) { display: none; }
	.story-more { all: unset; display: inline-flex; align-items: center; gap: 10px; font-size: 17px; color: var(--text); cursor: pointer; }
	.story-more svg { width: 12px; height: 12px; }
	.about.open .story-more { display: none; }

	/* Ship log: the version and the last three commits */
	.ship { padding: 64px var(--gutter) 48px; gap: 24px; }
	.ship-head .btn-ghost, .rel-top > span:first-child, .release > p, .assets, .c-head, .chart { display: none; }
	.ship-row { grid-template-columns: 1fr; gap: 20px; }
	.release { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 0; padding: 0; background: none; border: 0; }
	.rel-top { display: contents; }
	#relDate { grid-column: 2; grid-row: 1; padding-bottom: 8px; font-size: 14px; }
	.version { grid-column: 1; grid-row: 1; font-size: 52px; }
	#commits li { grid-template-columns: 1fr; gap: 2px; padding: 12px 0; font-size: 15px; }
	#commits li:nth-child(n + 4), #commits .hm { display: none; }
	#commits div { display: flex; gap: 10px; }
	#commits b { flex: none; margin: 0; }
	.ship-more { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 16px; }
	.ship-more svg { width: 12px; height: 12px; }

	/* Questions: one column of stars on a line */
	.faq { height: auto; padding: 64px var(--gutter); }
	.faq-head { position: static; gap: 6px; }
	.faq-head .title { margin-bottom: 10px; }
	.faq-head .dim { font-size: 16px; }
	.faq-count { font-size: 14px; }
	.sq-stage { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; margin-top: 32px; }
	.sq { position: relative; translate: none; text-align: left; }
	.sq-label, .sq.on .sq-label { margin-left: 10px; white-space: normal; }
	.sq.on .sq-label { font-size: 18px; }
	.sq-answer { position: relative; width: auto; margin: -6px 0 4px; padding-left: 44px; font-size: 16px; }

	/* The ending */
	.finale { height: auto; min-height: 600px; gap: 28px; padding: 96px var(--gutter); }
	.final-title { font-size: 56px; }
	.finale .cta-row { width: 100%; gap: 12px 40px; }
	.finale .btn-ghost { gap: 8px; padding: 6px 0; border: 0; font-size: 17px; font-weight: 400; }
	.finale .btn-ghost .ico { width: 16px; height: 16px; }
	.finale .btn-ghost .fx-shimmer { display: none; }
	.foot { flex-direction: column-reverse; align-items: flex-start; gap: 20px; padding: 28px var(--gutter); }
	.foot nav { gap: 28px; }
	.foot nav .ico-s { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.scroll-hint i, .caret, .dot.live, .typing i, .cw-caret { animation: none !important; }
}

html { overflow-x: clip; }
