/* Site stylesheet: the "Training Run" design.
   Fonts are self-hosted (latin + latin-ext subsets) so every page works
   offline and straight off the filesystem. */

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-mono-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-500-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-500-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-600-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/ibm-plex-sans-600-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-400-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-400-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Serif";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/instrument-serif-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Tokens ──────────────────────────────────────────────────────────────
   "Training Run". Retune these to reskin every page; don't hard-code a
   colour or a font a token already covers. Dark is set twice on purpose:
   once for a visitor whose system is dark and who hasn't chosen, once for
   an explicit choice. assets/theme.js sets data-theme before first paint. */
:root {
  --bg: #F3F0E8;
  --panel: #FBFAF6;
  --ink: #1A1C19;
  --ink2: #3B3F3A;
  --muted: #5E655E;
  --line: #DAD5C8;
  --line2: #C4BEAF;
  --accent: #B8431B;
  --on-accent: #FFFFFF;
  --val: #2F6FA3;
  --grid: #E4DFD3;

  --serif: "Instrument Serif", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --max: 1440px;
  --gutter: 80px;
  --radius: 4px;

  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121412; --panel: #1A1D1A; --ink: #ECE8DD; --ink2: #D2CEC2; --muted: #9AA298;
    --line: #2A302B; --line2: #3D453F; --accent: #EE8A5E; --on-accent: #121412;
    --val: #7FBCD0; --grid: #232924;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121412; --panel: #1A1D1A; --ink: #ECE8DD; --ink2: #D2CEC2; --muted: #9AA298;
  --line: #2A302B; --line2: #3D453F; --accent: #EE8A5E; --on-accent: #121412;
  --val: #7FBCD0; --grid: #232924;
  color-scheme: dark;
}

/* ── Base ────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  transition: background-color .2s, color .2s;
}
a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
img, svg { display: block; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
::selection { background: var(--accent); color: var(--on-accent); }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); }
.serif { font-family: var(--serif); font-weight: 400; }
.accent { color: var(--accent); }
em.accent { font-style: italic; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 14px; background: var(--ink); color: var(--bg); border-radius: var(--radius);
}
.skip:focus { top: 12px; color: var(--bg); }

.noscript-note {
  margin: 24px 0 0; padding: 16px 18px; border: 1px solid var(--line2); border-radius: 6px;
  background: var(--panel); color: var(--ink2); font-size: 15px; line-height: 1.6;
}

/* ── Buttons ─────────────────────────────────────────────────────────── */
.btn {
  height: 52px; padding: 0 24px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: var(--radius);
  font: 500 15px/1 var(--sans); white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, opacity .15s;
}
.btn-sm { height: 48px; padding: 0 20px; font-size: 14px; }
.btn-accent { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.btn-accent:hover { color: var(--on-accent); opacity: .9; }
.btn-ink { background: var(--ink); color: var(--bg); font-weight: 600; border: 0; }
.btn-ink:hover { color: var(--bg); opacity: .88; }
.btn-line { border-color: var(--line2); color: var(--ink); padding: 0 20px; font-weight: 400; }
.btn-line:hover { border-color: var(--accent); }
.btn[disabled] { opacity: .55; cursor: default; }

/* ── Top bar ─────────────────────────────────────────────────────────── */
.topbar { border-bottom: 1px solid var(--line); }
.topbar-inner {
  min-height: 72px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.brand-name { font-family: var(--serif); font-size: 26px; line-height: 1.1; white-space: nowrap; }
.brand-name .short { display: none; }
.brand-run { font-family: var(--mono); font-size: 12px; color: var(--muted); white-space: nowrap; }
.topnav { display: flex; gap: 28px; font-size: 14px; }
.topnav a { white-space: nowrap; padding: 12px 0; }
.topnav a.is-current { color: var(--accent); }
.top-actions { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.theme-btn {
  height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; border: 1px solid var(--line2); border-radius: var(--radius);
  color: var(--ink); font-family: var(--mono); font-size: 12px; cursor: pointer;
}
.theme-btn:hover { border-color: var(--accent); color: var(--accent); }
.theme-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.top-actions .btn { height: 44px; padding: 0 16px; font-size: 14px; }

/* Sub-page bar: back link, name, theme. */
.subbar-inner { display: grid; grid-template-columns: 1fr auto 1fr; }
.subbar-inner .back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 14px; justify-self: start; }
.subbar-inner .brand-name { font-size: 22px; }
.subbar-inner .theme-btn { justify-self: end; }

/* ── Section heads ───────────────────────────────────────────────────── */
.section { padding-top: 140px; scroll-margin-top: 24px; }
.sec-head { display: flex; align-items: baseline; gap: 24px; margin-bottom: 48px; }
.sec-code { font-family: var(--mono); font-size: 13px; color: var(--accent); white-space: nowrap; }
.sec-head h2, .h2 {
  font-family: var(--serif); font-weight: 400; font-size: 56px; line-height: 1;
  text-wrap: balance;
}
.rule-top { border-top: 2px solid var(--ink); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.hero {
  padding-top: 96px; padding-bottom: 80px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px;
  align-items: start;
}
.hero-copy { grid-column: span 7; display: flex; flex-direction: column; gap: 28px; }
.hero-kicker { font-size: 15px; color: var(--muted); }
.hero-title {
  font-family: var(--serif); font-weight: 400; font-size: 84px; line-height: .98;
  letter-spacing: -.01em; text-wrap: balance;
}
.hero-title em { color: var(--accent); }
.hero-pitch { font-size: 20px; line-height: 1.55; color: var(--ink2); max-width: 640px; text-wrap: pretty; }
.hero-summary { font-size: 16px; line-height: 1.6; color: var(--muted); max-width: 640px; text-wrap: pretty; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.hero-actions-sub { display: contents; }

/* The loss curve. */
.loss {
  grid-column: span 5;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  display: flex; flex-direction: column; overflow: hidden;
}
.loss-head {
  height: 44px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.loss-legend { display: flex; gap: 16px; }
.loss-legend span { display: flex; align-items: center; gap: 6px; }
.swatch-train { width: 14px; height: 2px; background: var(--accent); }
.swatch-val { width: 14px; height: 0; border-top: 2px dashed var(--val); }
.loss svg { width: 100%; height: auto; }
.loss .grid line { stroke: var(--grid); stroke-width: 1; }
.loss .axis { fill: var(--muted); font-family: var(--mono); font-size: 10px; }
.loss .val { fill: none; stroke: var(--val); stroke-width: 1.5; stroke-dasharray: 4 4; }
.loss .train { fill: none; stroke: var(--accent); stroke-width: 2.25; stroke-linejoin: round; }
.loss .ck { fill: var(--panel); stroke: var(--accent); stroke-width: 2; }
.loss .ck.is-now { fill: var(--accent); }
.loss .ck-num { fill: var(--ink); font-family: var(--mono); font-size: 11px; }
.loss-caption {
  padding: 4px 18px 18px;
  display: flex; flex-direction: column; gap: 8px;
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.ck-row { display: flex; gap: 12px; line-height: 1.45; }
.ck-row .n { color: var(--ink); width: 22px; flex-shrink: 0; }
.ck-row .d { width: 64px; flex-shrink: 0; }
.ck-row.is-now .n, .ck-row.is-now .d { color: var(--accent); }
.ck-row.is-now .l { color: var(--ink); }

/* ── Summary strip ───────────────────────────────────────────────────── */
.stats {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat { padding: 28px 24px; display: flex; flex-direction: column; gap: 8px; border-right: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { padding-right: 0; border-right: 0; }
.stat-value { font-family: var(--serif); font-size: 52px; line-height: 1; }
.stat-value small { font-size: 24px; color: var(--muted); }
.stat-label { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* ── 01 Experience ───────────────────────────────────────────────────── */
.ckpt {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  padding: 32px 0; border-top: 1px solid var(--line);
}
.ckpt:first-child { border-top: 2px solid var(--ink); }
.ckpt:last-child { border-bottom: 1px solid var(--line); }
.ckpt-meta {
  grid-column: span 3; display: flex; flex-direction: column; gap: 6px;
  font-family: var(--mono); font-size: 13px; line-height: 1.45; color: var(--muted);
}
.ckpt-code { color: var(--ink); font-weight: 600; }
.ckpt.is-latest .ckpt-code { color: var(--accent); }
.ckpt-body { grid-column: span 6; display: flex; flex-direction: column; gap: 14px; }
.ckpt-title { font-size: 24px; font-weight: 500; line-height: 1.3; }
.ckpt-title .org { color: var(--muted); }
.prose-list { padding-left: 18px; display: flex; flex-direction: column; gap: 10px; }
.ckpt-body p, .ckpt-body li { font-size: 16px; line-height: 1.6; color: var(--ink2); }
.ckpt-tags {
  grid-column: span 3; text-align: right;
  font-family: var(--mono); font-size: 12px; line-height: 1.8; color: var(--muted);
}
.ckpt-tags span { display: block; }

/* ── 02 Selected work ────────────────────────────────────────────────── */
.eval {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
  padding: 32px 0; border-top: 1px solid var(--line);
}
.eval:first-child { border-top: 2px solid var(--ink); }
.eval:last-child { border-bottom: 1px solid var(--line); padding-bottom: 40px; }
.eval-main { grid-column: span 8; display: flex; flex-direction: column; gap: 18px; }
.eval-kicker { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.eval-title { font-family: var(--serif); font-weight: 400; font-size: 48px; line-height: 1.05; text-wrap: balance; }
.eval-para { font-size: 16px; line-height: 1.65; color: var(--ink2); text-wrap: pretty; }
.eval-stack { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--muted); }
.eval-actions { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 8px; }
.eval-note { font-size: 13px; color: var(--muted); }
.eval-side {
  grid-column: span 4; display: flex; flex-direction: column;
  border-left: 1px solid var(--line); padding-left: 32px;
}
.metric { padding: 24px 0; display: flex; flex-direction: column; gap: 6px; }
.metric:first-child { padding-top: 8px; }
.metric + .metric { border-top: 1px solid var(--line); }
.metric-value { font-family: var(--serif); font-size: 72px; line-height: 1; }
.metric:first-child .metric-value { color: var(--accent); }
.metric-label { font-size: 14px; line-height: 1.45; color: var(--muted); }

/* ── 03 More projects ────────────────────────────────────────────────── */
.abl { font-size: 15px; }
.abl-row, .abl-head {
  display: grid;
  grid-template-columns: 64px minmax(0, 5fr) minmax(0, 3fr) minmax(0, 2fr) 110px;
  column-gap: 24px;
}
.abl-head {
  padding-bottom: 12px; border-bottom: 2px solid var(--ink);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.abl-head span:last-child { text-align: right; }
.abl-row { position: relative; padding: 22px 0; border-bottom: 1px solid var(--line); align-items: start; }
.abl-run { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
.abl-proj { display: flex; flex-direction: column; gap: 6px; }
.abl-title { font-size: 18px; font-weight: 500; line-height: 1.35; }
.abl-detail { font-size: 14px; line-height: 1.55; color: var(--muted); }
.abl-stack { font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--ink2); padding-top: 3px; }
.abl-result { font-size: 14px; font-weight: 500; line-height: 1.45; color: var(--accent); padding-top: 2px; }
.abl-link { text-align: right; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding-top: 2px; }

/* ── 04 Skills ───────────────────────────────────────────────────────── */
.weights { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; }
.weights-head { grid-column: span 4; display: flex; flex-direction: column; gap: 20px; margin: 0; }
.weights-list { grid-column: span 8; border-top: 2px solid var(--ink); }
.weight {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); column-gap: 24px;
  padding: 20px 0; border-bottom: 1px solid var(--line); font-size: 16px; line-height: 1.6;
}
.weight dt { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 2px; }

/* ── 05 Writing ──────────────────────────────────────────────────────── */
.logs {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 40px; row-gap: 40px;
  border-top: 2px solid var(--ink); padding-top: 28px;
}
.log { display: flex; flex-direction: column; gap: 14px; color: var(--ink); }
.log-label { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.log-label .full { display: inline; }
.log-title { font-family: var(--serif); font-size: 34px; line-height: 1.1; text-wrap: balance; }
.log-summary { font-size: 15px; line-height: 1.6; color: var(--muted); }
.log-more { font-size: 14px; font-weight: 500; color: var(--accent); }
.log:hover .log-title { color: var(--accent); }

/* ── 06 Ask ──────────────────────────────────────────────────────────── */
.ask {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px;
  display: grid; grid-template-columns: minmax(0, 1fr);
}
.ask-head {
  height: 44px; padding: 0 18px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 12px; color: var(--muted);
}
.ask-head .live { display: flex; align-items: center; gap: 8px; }
.ask-head .live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.ask-log {
  padding: 24px 18px; min-height: 180px; max-height: 420px; overflow-y: auto;
  display: flex; flex-direction: column; gap: 18px;
}
.ask-empty { font-size: 16px; line-height: 1.65; color: var(--ink2); max-width: 64ch; }
.msg { display: flex; flex-direction: column; gap: 6px; max-width: 80%; }
.msg-who { font-family: var(--mono); font-size: 11px; color: var(--muted); }
.msg-body { font-size: 15px; line-height: 1.6; color: var(--ink2); white-space: pre-wrap; }
.msg.is-user { align-self: flex-end; text-align: right; }
.msg.is-user .msg-body {
  padding: 10px 14px; border: 1px solid var(--line2); border-radius: var(--radius);
  background: var(--bg); color: var(--ink); text-align: left;
}
.msg.is-bot { align-self: flex-start; padding-left: 14px; border-left: 2px solid var(--accent); }
.ask-thinking { font-family: var(--mono); font-size: 12px; color: var(--accent); }
.ask-foot { padding: 16px 18px 18px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 14px; }
.ask-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  min-height: 36px; padding: 6px 12px;
  background: transparent; border: 1px solid var(--line2); border-radius: var(--radius);
  font-family: var(--mono); font-size: 12px; color: var(--ink2); cursor: pointer; text-align: left;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.ask-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.ask-form .btn { height: 48px; }
.ask-note:empty { display: none; }
.ask-note { font-size: 13px; color: var(--muted); }

/* ── Inputs ──────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 8px; }
.field span { font-size: 14px; font-weight: 500; }
.input {
  width: 100%; height: 48px; padding: 0 14px;
  background: var(--bg); border: 1px solid var(--line2); border-radius: var(--radius);
  color: var(--ink); font: 15px/1.4 var(--sans);
  transition: border-color .15s;
}
textarea.input { height: auto; padding: 12px 14px; resize: vertical; min-height: 120px; }
.input:hover { border-color: var(--muted); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.input::placeholder { color: var(--muted); opacity: .8; }

/* ── 07 Contact ──────────────────────────────────────────────────────── */
.serve { margin-top: 140px; border-top: 1px solid var(--line); background: var(--panel); }
.serve-inner {
  padding-top: 96px; padding-bottom: 96px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start;
}
.serve-copy { grid-column: span 6; display: flex; flex-direction: column; gap: 24px; }
.serve-status { font-size: 14px; color: var(--muted); }
.serve-title { font-family: var(--serif); font-weight: 400; font-size: 72px; line-height: 1; text-wrap: balance; }
.serve-title em { color: var(--accent); }
.serve-body { font-size: 17px; line-height: 1.6; color: var(--ink2); max-width: 540px; }
.serve-links { display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.serve-links a { text-decoration: underline; text-underline-offset: 4px; align-self: flex-start; overflow-wrap: anywhere; }
.serve-form { grid-column: 8 / span 5; display: flex; flex-direction: column; gap: 18px; }
.serve-form .btn { width: 100%; }
.form-note { font-size: 13px; line-height: 1.5; color: var(--muted); }
.form-note:empty { display: none; }
.botcheck { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ── Footer ──────────────────────────────────────────────────────────── */
.foot { border-top: 1px solid var(--line); }
.foot.is-panel { background: var(--panel); }
.foot-inner {
  min-height: 72px; padding-block: 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.foot-inner a { color: var(--muted); }
.foot-inner a:hover { color: var(--accent); }
.foot-tag { font-family: var(--mono); font-size: 12px; }

/* ── Case study ──────────────────────────────────────────────────────── */
.case-hero {
  padding-top: 88px; padding-bottom: 64px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 40px;
}
.case-hero-wrap { border-bottom: 1px solid var(--line); }
.case-kicker {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px;
  font-family: var(--mono); font-size: 13px; color: var(--muted);
}
.case-kicker :first-child { color: var(--accent); }
.case-title {
  grid-column: span 10; font-family: var(--serif); font-weight: 400;
  font-size: 88px; line-height: .98; letter-spacing: -.01em; text-wrap: balance;
}
.case-summary {
  grid-column: span 8; font-family: var(--serif); font-style: italic;
  font-size: 30px; line-height: 1.3; color: var(--ink2); text-wrap: pretty;
}
.case-facts {
  grid-column: 1 / -1; margin-top: 16px;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 24px; row-gap: 28px;
  border-top: 2px solid var(--ink); padding-top: 20px;
}
.case-facts > div { display: flex; flex-direction: column; gap: 6px; }
.case-facts dt { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.case-facts dd { font-size: 15px; line-height: 1.5; }
.case-facts dd.num { font-family: var(--serif); font-size: 44px; line-height: 1; }
.case-facts .is-lead dd.num { color: var(--accent); }

.case-body {
  padding-top: 80px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px;
}
.toc {
  grid-column: span 3; align-self: start; position: sticky; top: 32px;
  display: flex; flex-direction: column; gap: 12px; font-size: 14px;
}
.toc-label { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.toc a { color: var(--muted); }
.toc a:hover, .toc a.is-current { color: var(--accent); }
.case-article { grid-column: 4 / span 7; display: flex; flex-direction: column; gap: 64px; }
.cs-section { display: flex; flex-direction: column; gap: 20px; scroll-margin-top: 32px; }
.cs-h2 {
  display: flex; gap: 16px; align-items: baseline;
  font-family: var(--serif); font-weight: 400; font-size: 40px; line-height: 1.1;
}
.cs-h2 .n { font-family: var(--mono); font-size: 13px; color: var(--accent); }
.cs-section p, .cs-section li { font-size: 18px; line-height: 1.7; color: var(--ink2); text-wrap: pretty; }
.cs-section ul { padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.cs-section ul li { line-height: 1.65; }
.decisions { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.decisions li { padding: 20px 0; border-bottom: 1px solid var(--line); line-height: 1.65; }
.decisions strong { color: var(--ink); font-weight: 600; }
.cs-section.is-outcome {
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 36px;
}

.case-cta-wrap { margin-top: 120px; border-top: 1px solid var(--line); }
.case-cta {
  padding-top: 72px; padding-bottom: 72px;
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; row-gap: 48px;
}
.case-cta-copy { grid-column: span 7; display: flex; flex-direction: column; gap: 20px; align-items: flex-start; }
.case-cta-copy h2 { font-family: var(--serif); font-weight: 400; font-size: 52px; line-height: 1.05; }
.case-cta-copy p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.case-cta-copy .mail-fallback { font-size: 14px; }
.case-cta-copy .mail-fallback a { text-decoration: underline; text-underline-offset: 3px; }
.case-cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.next-link {
  grid-column: 9 / span 4; align-self: end;
  display: flex; flex-direction: column; gap: 8px; padding: 24px 0; border-top: 2px solid var(--ink);
}
.next-link .k { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.next-link .t { font-family: var(--serif); font-size: 30px; line-height: 1.1; }

/* ── Note ────────────────────────────────────────────────────────────── */
.note { max-width: calc(700px + 2 * var(--gutter)); }
.note-article { padding-top: 96px; display: flex; flex-direction: column; gap: 28px; }
.note-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.note-meta :first-child { color: var(--accent); }
.note-title {
  font-family: var(--serif); font-weight: 400; font-size: 68px; line-height: 1;
  letter-spacing: -.01em; text-wrap: balance;
}
.note-lede { font-family: var(--serif); font-style: italic; font-size: 26px; line-height: 1.35; color: var(--ink2); }
.byline {
  padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px;
  font-size: 14px; color: var(--muted);
}
.note-body { display: flex; flex-direction: column; gap: 26px; font-size: 19px; line-height: 1.75; color: var(--ink2); }
.note-body p { text-wrap: pretty; }
.note-body p:first-child::first-letter {
  float: left; font-family: var(--serif); font-size: 84px; line-height: .8;
  padding: 8px 10px 0 0; color: var(--accent);
}
.note-end { margin-top: 72px; display: flex; flex-direction: column; gap: 40px; }
.reply {
  padding: 32px 0; border-top: 2px solid var(--ink);
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
}
.reply-copy { display: flex; flex-direction: column; gap: 6px; font-size: 16px; line-height: 1.5; color: var(--ink2); }
.reply-copy .mail-fallback { font-size: 14px; color: var(--muted); }
.reply-copy .mail-fallback a { text-decoration: underline; text-underline-offset: 3px; }
.more-notes { display: flex; flex-direction: column; }
.more-notes .k { font-family: var(--mono); font-size: 12px; color: var(--muted); padding-bottom: 12px; }
.more-notes a {
  padding: 16px 0; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
}
.more-notes a:last-child { border-bottom: 1px solid var(--line); }
.more-notes .t { font-family: var(--serif); font-size: 26px; line-height: 1.2; }
.more-notes .arrow { color: var(--accent); }
.page-end { padding-bottom: 96px; }

/* ── Scroll reveal ───────────────────────────────────────────────────────
   The hidden state hangs off .reveal-ready, which assets/dom.js adds only
   when motion is welcome — without JavaScript nothing is ever hidden. */
.reveal-ready [data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity .6s cubic-bezier(.2, .7, .2, 1), transform .6s cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--reveal-i, 0) * 65ms);
}
.reveal-ready [data-reveal].is-in { opacity: 1; transform: none; }
.loss .train, .loss .val { stroke-dashoffset: 0; }
.reveal-ready .loss.is-in .train { animation: draw 1.6s cubic-bezier(.3, .6, .2, 1) both; }
@keyframes draw { from { stroke-dasharray: 1200; stroke-dashoffset: 1200; } to { stroke-dasharray: 1200; stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Tablet ──────────────────────────────────────────────────────────── */
@media (max-width: 1180px) {
  :root { --gutter: 48px; }
  .topbar-inner { flex-wrap: wrap; row-gap: 0; }
  .topnav {
    order: 3; width: calc(100% + 2 * var(--gutter)); margin-inline: calc(-1 * var(--gutter));
    padding-inline: var(--gutter); border-top: 1px solid var(--line);
    overflow-x: auto; scrollbar-width: none;
  }
  .topnav::-webkit-scrollbar { display: none; }
  .hero-copy, .loss { grid-column: 1 / -1; }
  .loss { max-width: 680px; }
  .hero-title { font-size: 72px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(2n) { border-right: 0; padding-right: 0; }
  .stat:nth-child(2n + 1) { padding-left: 0; }
  .stat:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .ckpt-meta { grid-column: span 4; }
  .ckpt-body { grid-column: span 8; }
  .ckpt-tags {
    grid-column: 5 / -1; text-align: left; margin-top: 14px;
  }
  .ckpt-tags span { display: inline; }
  .ckpt-tags span + span::before { content: " · "; }
  .eval-main { grid-column: span 7; }
  .eval-side { grid-column: span 5; }
  .metric-value { font-size: 60px; }
  .weights-head { grid-column: 1 / -1; margin-bottom: 40px; }
  .weights-list { grid-column: 1 / -1; }
  .serve-copy { grid-column: span 7; }
  .serve-form { grid-column: 8 / span 5; }
  .serve-title { font-size: 60px; }
  .case-title { grid-column: 1 / -1; font-size: 72px; }
  .case-summary { grid-column: 1 / -1; max-width: 820px; }
  .toc { display: none; }
  .case-article { grid-column: 1 / -1; max-width: 760px; }
  .case-cta-copy { grid-column: 1 / -1; }
  .next-link { grid-column: 1 / span 6; }
}

@media (max-width: 960px) {
  .abl-head { display: none; }
  .abl { border-top: 2px solid var(--ink); }
  .abl-row {
    grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 4px; padding: 16px 0;
    grid-template-areas: "title link" "result result" "stack stack" "detail detail";
  }
  .abl-run { display: none; }
  .abl-proj { display: contents; }
  .abl-title { grid-area: title; font-size: 17px; }
  .abl-detail { grid-area: detail; font-size: 14px; margin-top: 4px; }
  .abl-stack { grid-area: stack; font-size: 11px; line-height: 1.5; color: var(--muted); padding: 0; }
  .abl-result { grid-area: result; font-size: 13px; padding: 0; }
  .abl-link { grid-area: link; font-size: 12px; color: var(--muted); text-decoration: none; padding-top: 4px; }
  /* The whole row is the tap target, as on a native list. */
  .abl-link::after { content: ""; position: absolute; inset: 0; }
  .abl-row:hover .abl-title { color: var(--accent); }
  .logs { grid-template-columns: minmax(0, 1fr); row-gap: 0; padding-top: 0; }
  .log { padding: 24px 0; border-bottom: 1px solid var(--line); gap: 10px; }
  .serve-copy, .serve-form { grid-column: 1 / -1; }
  .serve-inner { row-gap: 40px; }
  .serve-form { max-width: 560px; }
  .case-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ── Phone ───────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  body { font-size: 15px; }
  .topbar-inner { min-height: 64px; gap: 12px; }
  .topnav { display: none; }
  .brand-run { display: none; }
  .brand-name { font-size: 22px; }
  .brand-name .full { display: none; }
  .brand-name .short { display: inline; }
  .theme-btn { width: 44px; padding: 0; justify-content: center; }
  .theme-btn [data-theme-label] { display: none; }
  .top-actions { gap: 8px; }
  .top-actions .btn { padding: 0 14px; }

  .subbar-inner { grid-template-columns: 1fr auto; }
  .subbar-inner .brand-name { display: none; }

  .section { padding-top: 72px; }
  .sec-head { flex-direction: column; gap: 10px; margin-bottom: 24px; }
  .sec-code { font-size: 12px; }
  .sec-head h2, .h2 { font-size: 40px; line-height: 1.02; }

  .hero { padding-top: 44px; padding-bottom: 36px; row-gap: 0; }
  .hero-copy { gap: 20px; }
  .hero-kicker { font-size: 14px; }
  .hero-title { font-size: 52px; line-height: 1; }
  .hero-pitch { font-size: 17px; }
  .hero-summary { font-size: 15px; }
  .hero-actions { flex-direction: column; gap: 10px; margin-top: 0; }
  .hero-actions .btn { width: 100%; }
  .hero-actions-sub { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero-actions-sub .btn { height: 48px; font-size: 14px; }
  .loss { margin-top: 36px; }
  .loss-head { height: 40px; padding: 0 14px; font-size: 11px; }
  .loss-legend { gap: 12px; }
  .loss .grid line { stroke-width: 1.5; }
  .loss .grid line.minor, .loss .axis.minor, .loss .axis.y, .loss .ck-num { display: none; }
  .loss .axis { font-size: 18px; }
  .loss .val { stroke-width: 2.5; stroke-dasharray: 6 6; }
  .loss .train { stroke-width: 3.5; }
  .loss .ck { stroke-width: 3; r: 7px; }
  .loss .ck.is-now { r: 8px; }
  .loss-caption { padding: 4px 14px 16px; }
  .ck-row { gap: 10px; }
  .ck-row .n { display: none; }
  .ck-row .d { width: 58px; }

  .stats { margin-top: 32px; border-bottom: 0; }
  .stat { padding: 20px 12px 20px 0; gap: 6px; border-bottom: 1px solid var(--line); }
  .stat:nth-child(2n) { padding: 20px 0 20px 16px; }
  .stat-value { font-size: 40px; }
  .stat-value small { font-size: 20px; }
  .stat-label { font-size: 13px; line-height: 1.4; }

  .ckpt { display: flex; flex-direction: column; gap: 10px; padding: 22px 0; }
  .ckpt-meta { flex-direction: row; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; font-size: 12px; }
  .ckpt-meta .place { display: none; }
  .ckpt-body { gap: 10px; }
  .ckpt-title { font-size: 20px; }
  .ckpt-body p, .ckpt-body li { font-size: 15px; }
  .ckpt-tags { margin-top: 2px; font-size: 11px; line-height: 1.6; }

  .eval { display: flex; flex-direction: column; gap: 14px; padding: 22px 0; }
  .eval:last-child { padding-bottom: 26px; }
  .eval-main { display: contents; }
  .eval-kicker { font-size: 11px; order: 1; }
  .eval-title { font-size: 32px; order: 2; }
  .eval-side {
    order: 3; border: 0; padding: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
  }
  .metric, .metric:first-child { padding: 0; gap: 4px; }
  .metric + .metric { border: 0; }
  .metric-value { font-size: 44px; }
  .metric-label { font-size: 12px; }
  .eval-para { order: 4; font-size: 15px; line-height: 1.6; }
  .eval-stack { order: 5; }
  .eval-actions { order: 6; margin-top: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .eval-actions .btn { width: 100%; padding: 0 12px; }
  .eval-actions .btn:only-of-type { grid-column: 1 / -1; }
  .eval-actions .eval-note { grid-column: 1 / -1; }

  .weights-head { margin-bottom: 24px; gap: 10px; }
  .weight { display: flex; flex-direction: column; gap: 4px; padding: 14px 0; font-size: 15px; line-height: 1.55; }
  .weight dt { font-size: 12px; padding: 0; }

  .log { padding: 20px 0; gap: 8px; }
  .log-label { font-size: 11px; }
  .log-label .tags { display: none; }
  .log-title { font-size: 27px; }
  .log-summary { font-size: 14px; line-height: 1.55; }

  .ask-head { padding: 0 14px; }
  .ask-head span:last-child { display: none; }
  .ask-log { padding: 18px 14px; }
  .ask-foot { padding: 14px; }
  .msg { max-width: 92%; }
  .ask-form { grid-template-columns: minmax(0, 1fr); }

  .input { font-size: 16px; }
  .serve { margin-top: 72px; }
  .serve-inner { padding-top: 52px; padding-bottom: 52px; display: flex; flex-direction: column; align-items: stretch; gap: 18px; }
  .serve-copy { display: contents; }
  .serve-copy > * { order: 0; }
  .serve-form { order: 1; margin-top: 6px; gap: 14px; }
  .serve-links { order: 2; gap: 0; font-size: 15px; }
  .serve-links a { min-height: 44px; display: flex; align-items: center; }
  .serve-status { font-size: 13px; }
  .serve-title { font-size: 48px; }
  .serve-body { font-size: 15px; }

  .foot-inner { min-height: 0; padding-block: 20px; font-size: 12px; }
  .foot-tag { font-size: 11px; }

  .case-hero { padding-top: 44px; padding-bottom: 40px; row-gap: 24px; }
  .case-kicker { font-size: 12px; }
  .case-title { font-size: 46px; line-height: 1; }
  .case-summary { font-size: 22px; }
  .case-facts { margin-top: 8px; row-gap: 22px; column-gap: 16px; }
  .case-facts dd.num { font-size: 40px; }
  .case-body { padding-top: 48px; }
  .case-article { gap: 48px; }
  .cs-h2 { font-size: 32px; gap: 12px; }
  .cs-section { gap: 16px; }
  .cs-section p, .cs-section li { font-size: 16px; }
  .cs-section.is-outcome { padding: 22px; }
  .case-cta-wrap { margin-top: 72px; }
  .case-cta { padding-top: 48px; padding-bottom: 48px; row-gap: 32px; }
  .case-cta-copy h2 { font-size: 38px; }
  .case-cta-actions { flex-direction: column; align-self: stretch; }
  .case-cta-actions .btn { width: 100%; }
  .next-link { grid-column: 1 / -1; }
  .next-link .t { font-size: 26px; }

  .note-article { padding-top: 44px; gap: 22px; }
  .note-title { font-size: 44px; }
  .note-lede { font-size: 21px; }
  .note-body { font-size: 17px; line-height: 1.7; gap: 22px; }
  .note-body p:first-child::first-letter { font-size: 68px; padding-top: 6px; }
  .note-end { margin-top: 48px; }
  .reply .btn { width: 100%; }
  .more-notes .t { font-size: 22px; }
  .page-end { padding-bottom: 56px; }
}

/* ── Imagery ─────────────────────────────────────────────────────────────
   The status pill, company marks, project drawings and icons.
   Drawings live in assets/art.js and are coloured only from tokens here. */
html, body { overflow-x: clip; }

/* A dot field behind the hero, fading out from behind the chart. */
.hero { position: relative; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -1;
  inset: 0 calc(-1 * var(--gutter));
  background-image: radial-gradient(var(--line2) 1px, transparent 1.3px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 60% 75% at 72% 38%, #000 10%, transparent 72%);
  mask-image: radial-gradient(ellipse 60% 75% at 72% 38%, #000 10%, transparent 72%);
  opacity: .8;
}

.hero-id { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }

.status {
  display: inline-flex; align-items: center; gap: 9px;
  min-height: 30px; padding: 4px 12px;
  background: var(--panel); border: 1px solid var(--line2); border-radius: 999px;
  font-family: var(--mono); font-size: 12px; color: var(--ink2);
}
.status i { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.status i::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1.5px solid var(--accent); animation: pulse 2s ease-out infinite;
}
@keyframes pulse { from { opacity: .9; transform: scale(.5); } to { opacity: 0; transform: scale(1.5); } }

/* Company marks: logos are drawn for white, so their tile stays white. */
.ckpt-head { display: flex; align-items: center; gap: 14px; }
.logo-tile {
  width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center; overflow: hidden;
  background: #FFFFFF; border: 1px solid var(--line); border-radius: 10px;
}
.logo-tile img { width: 38px; height: 38px; object-fit: contain; }

/* Selected work: the drawing leads the side column, the numbers sit under it. */
.eval-main { grid-column: span 7; }
.eval-side { grid-column: span 5; border-left: 0; padding-left: 0; gap: 20px; }
.art {
  margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
}
.art svg { width: 100%; height: auto; }
.eval-metrics { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.eval-metrics .metric, .eval-metrics .metric:first-child { padding: 4px 0 0; }
.eval-metrics .metric + .metric { border-top: 0; border-left: 1px solid var(--line); padding-left: 20px; }
.eval-metrics .metric-value { font-size: 56px; }
.eval-metrics .metric:first-child .metric-value { color: var(--accent); }

.art text { font-family: var(--mono); }
.a-cap { fill: var(--muted); font-size: 10.5px; }
.a-cells .t1 { fill: var(--accent); fill-opacity: .08; }
.a-cells .t2 { fill: var(--accent); fill-opacity: .17; }
.a-cells .t3 { fill: var(--accent); fill-opacity: .28; }
.a-cells .v1 { fill: var(--val); fill-opacity: .13; }
.a-cells .v2 { fill: var(--val); fill-opacity: .24; }
.a-grid path { fill: none; stroke: var(--grid); stroke-width: 1; }
.a-dots circle { fill: var(--ink2); opacity: .8; }
.a-edge { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linecap: square; }
.a-frame { fill: none; stroke: var(--ink); stroke-width: 1.5; }
.a-ring { fill: var(--panel); fill-opacity: .4; stroke: var(--accent); stroke-width: 2; }
.a-lead { fill: none; stroke: var(--accent); stroke-width: 1.2; }
.art .a-note { fill: var(--accent); font-family: var(--serif); font-style: italic; font-size: 18px; }
.a-heat rect { fill: var(--accent); }
.a-grid .a-lane { stroke: var(--line2); stroke-dasharray: 5 5; }
.a-num text { fill: var(--ink); font-size: 11px; font-weight: 600; }
.a-trace { fill: none; stroke: var(--ink); stroke-width: 1.2; opacity: .45; }
.a-fix circle, circle.a-fix { fill: var(--ink); }
.a-sensor path, path.a-sensor { fill: var(--val); }
.a-roller rect { fill: var(--accent); }
.a-roller .a-drum { fill: var(--ink); }
.a-window { fill: var(--bg); stroke: var(--line2); stroke-width: 1.5; }
.a-rule { stroke: var(--line2); }
.a-dot { fill: var(--line2); }
.a-url { fill: var(--panel); stroke: var(--line); }
.a-hero { fill: #1A1C19; }
.a-stripe { fill: var(--accent); opacity: .16; }
.art .a-display { fill: #F3F0E8; font-family: var(--serif); font-size: 42px; letter-spacing: .02em; }
.art .a-display-acc { fill: var(--accent); font-style: italic; }
.a-cta { fill: var(--accent); }
.art .a-cta-t { fill: var(--on-accent); font-family: var(--sans); font-size: 10px; font-weight: 600; }
.a-cards rect { fill: var(--panel); stroke: var(--line); }
.a-bars rect { fill: var(--line2); }
.a-bars-acc rect { fill: var(--accent); opacity: .4; }
.a-donut-bg { fill: var(--panel); stroke: var(--line2); }
.a-donut-track { fill: none; stroke: var(--grid); stroke-width: 10; }
.a-donut { fill: none; stroke: var(--accent); stroke-width: 10; }
.art .a-donut-v { fill: var(--ink); font-family: var(--serif); font-size: 24px; }

/* More projects: an icon tile heads every row. */
.abl-run { display: flex; flex-direction: column; gap: 10px; padding-top: 0; }
.abl-num { font-size: 12px; }
.icon-tile {
  width: 44px; height: 44px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  color: var(--accent); transition: background-color .15s, color .15s, border-color .15s;
}
.icon-tile svg { width: 22px; height: 22px; }
.abl-row:hover .icon-tile { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.case-art { margin-bottom: -16px; }

@media (max-width: 1180px) {
  .eval-metrics .metric-value { font-size: 46px; }
}

@media (max-width: 960px) {
  .abl-row {
    grid-template-columns: 44px minmax(0, 1fr) auto; column-gap: 14px;
    grid-template-areas: "icon title link" "icon result result" "icon stack stack" ". detail detail";
  }
  .abl-run { display: flex; grid-area: icon; }
  .abl-num { display: none; }
  .eval-main { grid-column: span 6; }
  .eval-side { grid-column: span 6; }
}

@media (max-width: 720px) {
  /* The first screen: status up top, one paragraph, the buttons. */
  .hero::before {
    -webkit-mask-image: radial-gradient(ellipse 90% 45% at 80% 12%, #000 10%, transparent 75%);
    mask-image: radial-gradient(ellipse 90% 45% at 80% 12%, #000 10%, transparent 75%);
  }
  .status { font-size: 11px; padding: 4px 10px; white-space: nowrap; }
  .status-lead { display: none; }
  .hero-kicker { font-size: 13px; }
  .hero-summary { display: none; }

  .ckpt-head { gap: 12px; }
  .logo-tile { width: 40px; height: 40px; border-radius: 9px; }
  .logo-tile img { width: 34px; height: 34px; }

  .eval-side { display: contents; }
  .art { order: 3; }
  .eval-metrics { order: 3; }
  .eval-metrics .metric + .metric { padding-left: 16px; }
  .eval-metrics .metric-value { font-size: 44px; }
  .case-art { margin-bottom: 0; }
}
