/* chancechrisman.com
   The Lasertally design system, carried over on purpose: white, one blue,
   slate greys, sharp corners, Inter and JetBrains Mono, a faint drafting grid.
   Drawings are blue linework on white, the way a CAM preview looks. */

@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-latin.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  --base: #ffffff;
  --panel: #f8fafc;
  --edge: #e2e8f0;
  --edge-soft: #eef2f7;
  --accent: #2563eb;
  --accent-deep: #1d4ed8;
  --accent-soft: #eff6ff;
  --accent-edge: #dbeafe;
  --ink: #0b1220;
  --dim: #475569;
  --quiet: #64748b;
  --faint: #94a3b8;
  /* Chart palette, checked for colour-blind separation and 3:1 contrast on white. */
  --series-1: #2563eb;
  --series-2: #0891b2;
  --series-3: #db2777;
  --r: 2px;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --math: "STIX Two Math", "Cambria Math", "Latin Modern Math", math, serif;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --shadow-sm: 0 1px 3px rgba(11, 18, 32, 0.09);
  --shadow-md: 0 14px 40px -18px rgba(11, 18, 32, 0.22);
  --shadow-lg: 0 32px 70px -24px rgba(11, 18, 32, 0.22), 0 0 0 1px rgba(11, 18, 32, 0.06);
  --gut-l: clamp(40px, 7vw, 104px);
  --gut-r: clamp(20px, 5vw, 56px);
  --spine-x: calc(var(--gut-l) * 0.42);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--base); }
html.motion { scroll-behavior: smooth; }
body {
  margin: 0;
  background: transparent;
  color: var(--dim);
  font: 400 17px/1.65 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
/* Drafting grid, quiet enough to read as paper rather than decoration. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(15, 23, 42, 0.045) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(90deg, rgba(15, 23, 42, 0.045) 1px, transparent 1px) 0 0 / 120px 120px,
    linear-gradient(rgba(15, 23, 42, 0.022) 1px, transparent 1px) 0 0 / 24px 24px,
    linear-gradient(90deg, rgba(15, 23, 42, 0.022) 1px, transparent 1px) 0 0 / 24px 24px;
  mask-image: linear-gradient(to bottom, #000 0, rgba(0, 0, 0, 0.6) 70%, rgba(0, 0, 0, 0.35));
}
::selection { background: var(--accent-edge); color: var(--ink); }
img { max-width: 100%; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
code { font-family: var(--mono); font-size: 0.86em; }
h1, h2, h3 { margin: 0; color: var(--ink); }
p { margin: 0 0 1em; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r); font-weight: 600; }
.skip:focus { top: 12px; color: #fff; }

.wrap { position: relative; max-width: 1240px; margin-inline: auto; padding-inline: var(--gut-l) var(--gut-r); }

/* Eyebrow: a short blue rule, then mono capitals, as on lasertally.app. */
.kicker { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; font: 500 12px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.6; flex: none; }
.kicker .num { color: var(--ink); }
.label { font: 500 11px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--quiet); margin: 0 0 10px; }

/* ------------------------------------------------------------ top bar */
.topbar { position: fixed; inset: 0 0 auto; z-index: 50; background: rgba(255, 255, 255, 0.84); -webkit-backdrop-filter: saturate(180%) blur(14px); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.topbar.scrolled { border-bottom-color: var(--edge); }
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; max-width: 1240px; margin: 0 auto; padding-inline: var(--gut-r); }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 650; letter-spacing: -0.01em; font-size: 15px; }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-mark { width: 20px; height: 20px; fill: none; stroke: var(--accent); stroke-width: 2.2; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { position: relative; color: var(--dim); font-size: 14px; font-weight: 500; padding: 8px 12px; text-decoration: none; transition: color 0.2s; }
.nav a:hover { color: var(--ink); text-decoration: none; }
.nav a.on { color: var(--ink); }
.nav a.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: var(--accent); }
.nav a.nav-cta { margin-left: 10px; color: #fff; background: var(--ink); border-radius: var(--r); padding: 9px 16px; font-weight: 600; }
.nav a.nav-cta:hover { background: #1e293b; color: #fff; }
.nav a.nav-cta::after { display: none; }

/* ------------------------------------------------------------ buttons */
.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 1px solid var(--edge); border-radius: var(--r); background: var(--base); color: var(--ink); font-size: 15px; font-weight: 600; text-decoration: none; box-shadow: var(--shadow-sm); transition: border-color 0.2s, background 0.2s, color 0.2s; overflow-wrap: anywhere; }
.btn:hover { border-color: var(--faint); color: var(--ink); text-decoration: none; }
.btn-hot { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-hot:hover { background: #1e293b; border-color: #1e293b; color: #fff; }
.btn-blue { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-blue:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: #fff; }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; color: var(--dim); }
.btn-ghost:hover { color: var(--ink); border-color: transparent; }

/* ------------------------------------------------------------ hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: 112px 0 80px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr); gap: clamp(32px, 5vw, 72px); align-items: center; width: 100%; }
h1 { font-size: clamp(3.3rem, 6.6vw, 6.4rem); line-height: 0.95; letter-spacing: -0.045em; font-weight: 800; margin: 0 0 28px; }
.lead { font-size: clamp(1.12rem, 1.6vw, 1.32rem); line-height: 1.55; color: var(--dim); max-width: 31em; }
.lead a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.sub { font-size: 15px; color: var(--quiet); max-width: 36em; }
.creds { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 30px 0 0; padding: 0; font: 500 12px/1.6 var(--mono); color: var(--quiet); }
.creds li { position: relative; padding-left: 13px; white-space: nowrap; }
.creds li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; background: var(--accent); }
.creds b { color: var(--ink); font-weight: 600; }

.hero-sheet { margin: 0; }
.sheet-frame { position: relative; padding: 12px; background: var(--base); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow-lg); }
.corner { display: none; }
.nest { display: block; width: 100%; height: auto; overflow: visible; }
.nest .sheet { fill: var(--panel); stroke: var(--edge); stroke-width: 1; }
.nest .sheet-grid { color: rgba(15, 23, 42, 0.06); }
.nest .cut { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linejoin: round; transition: stroke 1.2s ease, stroke-width 1.2s ease; }
.nest .plan { fill: none; stroke: #cbd5e1; stroke-width: 0.8; stroke-dasharray: 3 3; }
.nest .cut.hot { stroke: var(--accent); stroke-width: 1.8; transition: none; }
.nest .cut.cold { stroke: var(--accent-deep); stroke-width: 1.2; }
.nest .part .outer { transition: fill 1s ease; }
.nest .part.free .outer { fill: rgba(37, 99, 235, 0.06); }
.nest .rapid { fill: none; stroke: var(--faint); stroke-width: 0.7; stroke-dasharray: 4 4; }
.nest .head { display: none; }
html.motion .nest .head { display: inline; }
.nest .head-glow { fill: rgba(37, 99, 235, 0.14); }
.nest .head-core { fill: var(--accent-deep); }
.hero-sheet figcaption { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; margin-top: 16px; font: 400 12px/1.5 var(--mono); color: var(--quiet); }
.readout b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.readout-note { flex-basis: 100%; }
.rerun { font: 500 11px/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); background: transparent; border: 0; padding: 4px 0; cursor: pointer; }
.rerun:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }

/* ------------------------------------------------------------ spine: the toolpath down the page */
.spine-frame { display: none; }
html.motion .spine-frame { display: block; position: absolute; left: 0; right: 0; top: 0; height: 0; pointer-events: none; z-index: 1; }
.spine-wrap { height: 100%; }
.spine { position: absolute; top: 0; bottom: 0; left: var(--spine-x); width: 2px; margin-left: -1px; }
.spine-plan { position: absolute; top: 0; bottom: 0; left: 0.5px; width: 1px; background: var(--edge); }
.spine-cut { position: absolute; inset: 0; transform-origin: top; transform: scaleY(0); background: var(--accent); will-change: transform; }

.pierce { display: none; }
html.motion .pierce { display: block; position: absolute; top: 1px; left: calc(var(--spine-x) - var(--gut-l) - 7px); width: 14px; height: 14px; border-radius: 50%; border: 1px solid #cbd5e1; background: var(--base); z-index: 2; transition: border-color 0.4s; }
html.motion .pierce::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); transform: scale(0); transition: transform 0.4s var(--ease); }
html.motion .pierce.lit { border-color: var(--accent); }
html.motion .pierce.lit::after { transform: scale(1); }

.head-fixed { display: none; }
html.motion .head-fixed { display: block; position: fixed; z-index: 3; left: 0; top: 0; width: 0; height: 0; pointer-events: none; opacity: 0; transition: opacity 0.3s; will-change: transform; }
html.motion .head-fixed.on { opacity: 1; }
.hf-glow { position: absolute; width: 18px; height: 18px; left: -9px; top: -9px; border-radius: 50%; background: rgba(37, 99, 235, 0.14); }
.hf-core { position: absolute; width: 8px; height: 8px; left: -4px; top: -4px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--base); }

/* ------------------------------------------------------------ chapters */
main { position: relative; }
.chapter { position: relative; padding: clamp(104px, 15vh, 168px) 0 clamp(40px, 6vh, 72px); }
.chapter-head { position: relative; max-width: 880px; margin-bottom: clamp(40px, 6vh, 64px); }
h2 { font-size: clamp(2.2rem, 4.8vw, 3.9rem); line-height: 1.04; letter-spacing: -0.04em; font-weight: 780; margin-bottom: 24px; }
h2 em, h1 em { font-style: normal; color: var(--accent); }
.intro { font-size: clamp(1.05rem, 1.3vw, 1.18rem); line-height: 1.65; color: var(--dim); max-width: 41em; }
.intro a, .station-copy a { font-weight: 500; }

html.motion [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
html.motion [data-reveal].in { opacity: 1; transform: none; }

/* drawing frames shared by the figures */
.drawing { position: relative; margin: 0; background: var(--base); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow-md); overflow: hidden; }
.drawing-bar { display: flex; justify-content: space-between; gap: 12px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--edge-soft); font: 500 10.5px/1.3 var(--mono); letter-spacing: 0.14em; color: var(--quiet); }
.drawing svg { display: block; width: 100%; height: auto; }
.dims path { fill: none; stroke: var(--faint); stroke-width: 0.5; }
.dims .arrow { fill: var(--faint); stroke: none; }
.dims text { fill: var(--quiet); font: 500 7px var(--mono); letter-spacing: 0.04em; }

/* 01: flat pattern, quoted step by step */
.scrolly { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr); gap: clamp(28px, 5vw, 72px); }
.scrolly-fig { position: sticky; top: 100px; align-self: start; }
.flat svg { padding: 10px 6px 0; }
.flat .bends path { fill: none; stroke: var(--series-3); stroke-width: 0.9; stroke-dasharray: 7 3; }
.flat .bends text { fill: var(--series-3); font: 600 5.6px var(--mono); letter-spacing: 0.08em; }
.flat .contour { fill: none; stroke: var(--ink); stroke-width: 1; stroke-linejoin: round; }
.flat .contour-hot { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linejoin: round; stroke-dasharray: 1 1; stroke-dashoffset: 0; }
.flat .pierce-tags circle { fill: var(--accent); }
.flat .pierce-tags text { fill: #fff; font: 700 6px var(--mono); text-anchor: middle; }
.flat .pierce-tags g, .flat .bends, .flat .contour-hot, .flat .contour { transition: opacity 0.5s var(--ease), transform 0.5s var(--ease), stroke-dashoffset 1.6s var(--ease), stroke 0.6s; }
.flat .pierce-tags g { transform-box: fill-box; transform-origin: center; }
.flat[data-step="0"] .pierce-tags g { opacity: 0; transform: scale(0.3); }
.flat[data-step="1"] .pierce-tags g { transition-delay: calc(var(--i, 0) * 90ms); }
.flat[data-step="0"] .contour-hot, .flat[data-step="1"] .contour-hot { stroke-dashoffset: 1; }
.flat[data-step="0"] .bends, .flat[data-step="1"] .bends, .flat[data-step="2"] .bends { opacity: 0; }
.flat[data-step="0"] .contour, .flat[data-step="1"] .contour { stroke: var(--faint); }
.tally { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.4fr) minmax(0, 0.8fr); border-top: 1px solid var(--edge-soft); }
.tally div { padding: 12px 14px; border-right: 1px solid var(--edge-soft); }
.tally div:last-child { border-right: 0; }
.tally span { display: block; font: 500 10px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--quiet); }
.tally b { font: 600 clamp(1.1rem, 2vw, 1.5rem)/1.2 var(--mono); color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tally b span { display: inline; font: inherit; letter-spacing: 0; text-transform: none; color: inherit; }
.scrolly-steps { list-style: none; margin: 0; padding: 0; }
.step { min-height: 68vh; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
html.motion .step { opacity: 0.35; transition: opacity 0.5s; }
html.motion .step.active { opacity: 1; }
.step-n { font: 500 11px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.step h3 { font-size: clamp(1.6rem, 2.5vw, 2.1rem); letter-spacing: -0.03em; line-height: 1.12; font-weight: 750; margin-bottom: 14px; }
.step p { max-width: 30em; }
.step .fine { font-size: 15px; color: var(--quiet); }
.eq { font-family: var(--math); font-size: 1.28em; color: var(--ink); margin: 6px 0 18px; }
math[display="block"] { text-align: left; }

/* 02: master sketch */
.cad-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.8fr); gap: clamp(28px, 4vw, 56px); align-items: start; }
.sketch svg { padding: 4px 10px 0; }
.sketch .cl path { fill: none; stroke: var(--series-2); stroke-width: 0.9; stroke-dasharray: 16 4 3 4; opacity: 0.8; }
.sketch .geo path { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1 1; stroke-dashoffset: calc(1 - min(1, max(0, (var(--p, 1) - var(--s, 0)) * 2.2))); }
.sketch .cmarks path { stroke: var(--series-3); stroke-width: 1.2; fill: none; }
.sketch .dims { opacity: min(1, max(0, (var(--p, 1) - 0.55) * 4)); }
.sketch .dims text { font-size: 10px; }
.sketch .dims path { stroke-width: 0.7; }
.sketch figcaption { padding: 14px 16px 16px; border-top: 1px solid var(--edge-soft); display: grid; gap: 8px; }
.sketch figcaption code { display: block; color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-edge); padding: 7px 10px; border-radius: var(--r); overflow-wrap: anywhere; }
.sketch figcaption span { color: var(--quiet); font-size: 14px; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; }
.facts li { padding: 22px 0; border-top: 1px solid var(--edge); }
.facts li:last-child { border-bottom: 1px solid var(--edge); }
.big { display: block; font: 780 clamp(2.3rem, 4.2vw, 3.3rem)/1 var(--sans); letter-spacing: -0.045em; color: var(--ink); margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.facts span { color: var(--quiet); font-size: 15px; }

/* 03: math */
.phase { margin: 0 0 clamp(48px, 7vh, 80px); }
.phase-canvas { position: relative; aspect-ratio: 1200 / 700; background: var(--base); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow-md); overflow: hidden; }
.phase-canvas canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.phase-eq { position: absolute; left: 16px; bottom: 16px; padding: 10px 16px 8px; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.phase-eq .eq { margin: 0 0 4px; font-size: 1.1em; }
.phase-eq .eq + .eq { margin-bottom: 8px; }
.phase-t { font: 500 11px/1 var(--mono); color: var(--quiet); letter-spacing: 0.06em; }
.phase-t b { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }
.phase figcaption { margin-top: 12px; font-size: 14px; color: var(--quiet); max-width: 60em; }
.legend { position: absolute; top: 14px; left: 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 8px 12px; list-style: none; background: rgba(255, 255, 255, 0.92); border: 1px solid var(--edge); border-radius: var(--r); font: 500 12px/1.3 var(--mono); color: var(--dim); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; }
.sw.s1 { background: var(--series-1); }
.sw.s2 { background: var(--series-2); }
.sw.s3 { background: var(--series-3); height: 4px; }
.math-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.9fr); gap: clamp(24px, 4vw, 48px); align-items: start; }
.bom { background: var(--base); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow-sm); overflow: hidden; }
.bom table { width: 100%; border-collapse: collapse; font-size: 15px; }
.bom th { text-align: left; font: 500 10px/1.3 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--quiet); padding: 10px 14px; border-bottom: 1px solid var(--edge); }
.bom td { padding: 9px 14px; border-bottom: 1px solid var(--edge-soft); color: var(--dim); }
.bom tr:last-child td { border-bottom: 0; }
.bom td:nth-child(1), .bom td:nth-child(2) { font: 500 13px/1.4 var(--mono); color: var(--quiet); white-space: nowrap; }
.bom td:nth-child(2) { color: var(--accent); }
.bom tbody tr:hover { background: var(--panel); }
.bom tbody tr:hover td:nth-child(3) { color: var(--ink); }
.degree { padding: 26px; background: var(--base); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow-sm); }
.degree-name { font-size: 1.55rem; font-weight: 750; color: var(--ink); letter-spacing: -0.03em; line-height: 1.15; margin-bottom: 8px; }
.kv { margin: 18px 0 26px; display: grid; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--edge-soft); }
.kv dt { font: 500 11px/1.6 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--quiet); }
.kv dd { margin: 0; text-align: right; color: var(--ink); }
.certs { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.certs li { position: relative; padding-left: 20px; color: var(--dim); }
.certs li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 7px; height: 7px; background: var(--accent); }

/* 04: Lasertally pipeline */
.pipeline { position: relative; }
.pipeline-pin { padding: 8px 0 24px; }
.pipeline-head { display: flex; align-items: center; gap: 24px; margin-bottom: 26px; }
.pipeline-head .kicker { margin: 0; white-space: nowrap; }
.pipeline-progress { flex: 1; height: 2px; background: var(--edge); overflow: hidden; display: none; }
.pipeline-progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.pipeline-track { list-style: none; margin: 0 auto; padding: 0 var(--gut-r) 0 var(--gut-l); max-width: 1240px; display: grid; gap: clamp(48px, 8vh, 88px); }
.station { display: grid; grid-template-columns: minmax(0, 0.62fr) minmax(0, 1.38fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.station-n { font: 500 12px/1 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.station-copy h3 { font-size: clamp(1.7rem, 2.8vw, 2.4rem); letter-spacing: -0.035em; line-height: 1.08; font-weight: 780; margin-bottom: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; }
.chips span { font: 500 12px/1 var(--mono); letter-spacing: 0.03em; color: var(--dim); background: var(--panel); border: 1px solid var(--edge); border-radius: var(--r); padding: 7px 10px; }
.shot { margin: 0; background: var(--base); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow-lg); }
.shot img { display: block; width: 100%; height: auto; }
.shot-tall { justify-self: center; width: min(100%, 320px); }

@media (min-width: 1000px) {
  html.motion .pipeline { height: 400vh; }
  html.motion .pipeline-pin { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; overflow: hidden; padding: 80px 0 32px; }
  html.motion .pipeline-progress { display: block; }
  html.motion .pipeline-head { width: 100%; }
  html.motion .pipeline-track { display: flex; gap: 0; max-width: none; margin: 0; padding: 0; will-change: transform; }
  html.motion .station { flex: 0 0 100vw; padding: 0 max(var(--gut-r), calc((100vw - 1240px) / 2 + var(--gut-r))) 0 max(var(--gut-l), calc((100vw - 1240px) / 2 + var(--gut-l))); }
  html.motion .shot-wide img { max-height: 68vh; width: auto; max-width: 100%; margin: 0 auto; }
  html.motion .shot-wide { width: fit-content; max-width: 100%; justify-self: center; }
  html.motion .shot-tall img { max-height: 68vh; width: auto; }
  html.motion .shot-tall { width: auto; }
}

.proof { list-style: none; margin: clamp(56px, 9vh, 96px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0 28px; }
.proof li { padding: 22px 0 6px; border-top: 2px solid var(--ink); }
.proof b { display: block; font: 780 clamp(2rem, 3.4vw, 2.9rem)/1 var(--sans); letter-spacing: -0.045em; color: var(--ink); margin-bottom: 10px; font-variant-numeric: tabular-nums; }
.proof span { display: block; color: var(--quiet); font-size: 14.5px; line-height: 1.55; }
.stack { margin-top: 48px; display: grid; gap: 4px; justify-items: start; }
.stack .chips { margin: 0 0 22px; }

/* 05: Notex */
.notex-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4.5vw, 56px); }
.note-window { margin: 0; max-width: 940px; background: var(--base); border: 1px solid var(--edge); border-radius: 10px; box-shadow: var(--shadow-lg); overflow: hidden; }
.note-bar { display: flex; align-items: center; gap: 14px; padding: 10px 14px; background: var(--panel); border-bottom: 1px solid var(--edge); }
.dots { display: inline-flex; gap: 7px; }
.dots i { width: 11px; height: 11px; border-radius: 50%; background: #d7dde5; }
.note-tabs { display: flex; gap: 2px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.note-tabs::-webkit-scrollbar { display: none; }
.note-tabs [role="tab"] { flex: none; display: inline-flex; align-items: center; gap: 8px; font: 500 12px/1 var(--mono); color: var(--quiet); background: transparent; border: 1px solid transparent; border-radius: var(--r); padding: 7px 10px; cursor: pointer; transition: color 0.2s, background 0.2s, border-color 0.2s; }
.note-tabs [role="tab"]:hover { color: var(--ink); }
.note-tabs [role="tab"][aria-selected="true"] { color: var(--ink); background: var(--base); border-color: var(--edge); box-shadow: var(--shadow-sm); }
.score { flex: none; font: 600 11px/1 var(--mono); color: var(--accent-deep); background: var(--accent-soft); border: 1px solid var(--accent-edge); padding: 3px 6px; border-radius: var(--r); }
.note-view { position: relative; height: min(74vh, 700px); overflow-y: auto; background: var(--base); overscroll-behavior: contain; }
html.motion .note-view { overflow: hidden; }
.note-view::after { content: ""; position: sticky; display: block; bottom: 0; height: 56px; margin-top: -56px; background: linear-gradient(rgba(255, 255, 255, 0), var(--base)); pointer-events: none; }
.note-scroll { will-change: transform; }
.note-scroll img { display: block; width: 100%; height: auto; }
.note-scroll .zoom { display: block; cursor: zoom-in; }
.note-scroll[hidden] { display: none; }
.note-window figcaption { padding: 12px 16px 14px; border-top: 1px solid var(--edge-soft); font-size: 14px; color: var(--quiet); }
.note-cap { margin: 0 0 4px; max-width: 62em; }
.note-hint { display: none; }
.notex-points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(20px, 3vw, 40px); }
.notex-points li { padding: 20px 0; border-top: 1px solid var(--edge); }
.notex-points li b { display: block; font-size: 1.1rem; color: var(--ink); letter-spacing: -0.02em; margin-bottom: 6px; }
.notex-points li span { color: var(--quiet); }
.notex-points li code { color: var(--accent-deep); }
.notex-points li.chips { grid-column: 1 / -1; border-bottom: 1px solid var(--edge); margin: 0; padding: 20px 0; }

/* 06: models */
.models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.card { padding: clamp(20px, 2.6vw, 30px); background: var(--base); border: 1px solid var(--edge); border-radius: var(--r); box-shadow: var(--shadow-sm); transition: border-color 0.25s, box-shadow 0.25s; }
.card:hover { border-color: #cbd5e1; box-shadow: var(--shadow-md); }
.card h3 { font-size: 1.28rem; letter-spacing: -0.025em; font-weight: 720; margin-bottom: 10px; }
.card p { margin: 0; }
.card .tags { font: 500 11.5px/1.5 var(--mono); color: var(--accent); letter-spacing: 0.03em; margin-bottom: 12px; }
.card-feature { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 48px); align-items: center; }
.elo { margin: 0; }
.elo svg { display: block; width: 100%; height: auto; }
.elo .axes path { fill: none; stroke: #cbd5e1; stroke-width: 1; }
.elo .axes .mid { stroke: var(--edge); stroke-dasharray: 3 4; }
.elo .ticks text { fill: var(--quiet); font: 500 10px var(--mono); }
.elo .curve { fill: none; stroke: url(#elo-split); stroke-width: 2.4; }
.elo .stop-dog { stop-color: var(--series-3); }
.elo .stop-fav { stop-color: var(--series-1); }
.elo .region-fav { fill: var(--series-1); opacity: 0.12; }
.elo .region-dog { fill: var(--series-3); opacity: 0.12; }
.elo .rlabel { fill: var(--dim); font: 600 11px var(--sans); }
.elo .marker circle { stroke: var(--base); stroke-width: 2.5; }
.elo .marker.fav circle { fill: var(--series-1); }
.elo .marker.dog circle { fill: var(--series-3); }
.elo .marker.even circle { fill: var(--quiet); }
.eq-sm { font-size: 1.06em; margin: 8px 0 6px; }
.elo figcaption { font-size: 14px; color: var(--quiet); }
.elo figcaption b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }

/* 07: experience */
.timeline { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--edge); }
.timeline li { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; padding: 30px 0; border-bottom: 1px solid var(--edge); }
.when { font: 500 12px/1.9 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--quiet); margin: 0; }
.timeline h3 { font-size: 1.28rem; letter-spacing: -0.025em; font-weight: 720; margin-bottom: 2px; }
.org { color: var(--accent); font-size: 14.5px; font-weight: 500; margin-bottom: 10px; }
.timeline li p:last-child { margin: 0; max-width: 48em; }

/* 08: contact, as a drawing title block */
.contact .chapter-head { margin-bottom: 48px; }
.titleblock { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--base); border: 1px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.tb-cell { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; min-width: 0; box-shadow: 1px 0 0 var(--edge), 0 1px 0 var(--edge); }
.tb-email, .tb-product { grid-column: span 2; }
.tb-cell span { font: 500 10px/1.2 var(--mono); letter-spacing: 0.14em; text-transform: uppercase; color: var(--quiet); }
.tb-cell b, .tb-cell a { font-size: 15px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.tb-cell a:hover { color: var(--accent); }
.tb-name b { font-size: 19px; letter-spacing: -0.02em; }

.foot { padding: 64px 0 40px; }
.foot-in { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font: 500 12px/1.4 var(--mono); color: var(--quiet); border-top: 1px solid var(--edge); padding-top: 22px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .nav a:not(.nav-cta) { display: none; }
}
@media (max-width: 900px) {
  body { font-size: 16.5px; }
  .topbar-in { height: 58px; }
  .hero { padding-top: 96px; align-items: flex-start; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-sheet { order: 2; }
  h1 { font-size: clamp(3rem, 14vw, 5.2rem); }
  .scrolly { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .scrolly-fig { top: 66px; z-index: 2; background: var(--base); padding: 6px 0 10px; }
  .flat .drawing-bar { padding: 7px 10px; }
  .tally div { padding: 8px 10px; }
  .step { min-height: 62vh; justify-content: flex-end; padding-bottom: 12vh; }
  .cad-grid, .math-grid, .notex-grid, .card-feature { grid-template-columns: minmax(0, 1fr); }
  .station { grid-template-columns: minmax(0, 1fr); }
  .proof { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 20px; }
  .models { grid-template-columns: minmax(0, 1fr); }
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .titleblock { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tb-name, .tb-email, .tb-product, .tb-avail { grid-column: 1 / -1; }
  .notex-points { grid-template-columns: minmax(0, 1fr); }
  .phase-canvas { aspect-ratio: 1 / 1.05; }
  .note-view { height: 64vh; }
  .note-hint { display: block; }
}
@media (max-width: 520px) {
  .kicker { font-size: 11px; letter-spacing: 0.12em; }
  .btn { min-height: 44px; padding: 0 16px; font-size: 14.5px; }
  .tally b { font-size: 1.05rem; }
  .bom td, .bom th { padding: 8px 10px; }
  .bom table { font-size: 14px; }
  .phase-eq { left: 10px; bottom: 10px; padding: 8px 12px 6px; }
  .legend { top: 10px; left: 10px; font-size: 11px; gap: 4px 12px; padding: 6px 10px; }
  .proof { grid-template-columns: minmax(0, 1fr); }
  .note-bar .dots { display: none; }
  .note-bar { padding: 8px 6px; }
  .note-tabs [role="tab"] { padding: 7px 8px; gap: 6px; font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .topbar, .head-fixed, .spine-frame, .pierce { display: none !important; }
  body::before { display: none; }
  html.motion [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* 404 */
.nf { min-height: 100vh; display: flex; align-items: center; }
