/* Generated by scripts/fonts.ts. Fonts are SIL Open Font License 1.1; see /fonts/licenses/. */
@font-face {
  font-family: "Gemunu Libre";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/gemunu-libre-sinhala-200-800.woff2") format("woff2");
  unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
}
@font-face {
  font-family: "Gemunu Libre";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/gemunu-libre-latin-ext-200-800.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Gemunu Libre";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/gemunu-libre-latin-200-800.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: "Abhaya Libre";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/abhaya-libre-sinhala-400.woff2") format("woff2");
  unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
}
@font-face {
  font-family: "Abhaya Libre";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/abhaya-libre-latin-ext-400.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Abhaya Libre";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/abhaya-libre-latin-400.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: "Abhaya Libre";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/abhaya-libre-sinhala-500.woff2") format("woff2");
  unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
}
@font-face {
  font-family: "Abhaya Libre";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/abhaya-libre-latin-ext-500.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Abhaya Libre";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/abhaya-libre-latin-500.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: "Abhaya Libre";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/abhaya-libre-sinhala-700.woff2") format("woff2");
  unicode-range: U+0964-0965, U+0D81-0DF4, U+1CF2, U+200C-200D, U+25CC, U+111E1-111F4;
}
@font-face {
  font-family: "Abhaya Libre";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/abhaya-libre-latin-ext-700.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Abhaya Libre";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/abhaya-libre-latin-700.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: "Anybody";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
  src: url("/fonts/anybody-latin-ext-100-900.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Anybody";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: swap;
  src: url("/fonts/anybody-latin-100-900.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: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin-ext-200-800.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/atkinson-hyperlegible-next-latin-200-800.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: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-ext-400-900.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Schibsted Grotesk";
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url("/fonts/schibsted-grotesk-latin-400-900.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: "Spline Sans Mono";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/spline-sans-mono-latin-ext-300-700.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-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Spline Sans Mono";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/spline-sans-mono-latin-300-700.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;
}

/* Shared foundation for every variant: reset, accessibility, motion preferences. Variants own all colour and type. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; hanging-punctuation: first last; }
body { margin: 0; min-height: 100svh; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }
a:hover { text-decoration-thickness: 0.12em; }
p, li, dd { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; padding: 0.6rem 1rem; background: Canvas; color: CanvasText; border: 2px solid currentColor; }
.skip:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--focus, Highlight); outline-offset: 3px; border-radius: 2px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .no-print, nav, .skip { display: none !important; }
  body { background: #fff !important; color: #000 !important; }
  a { text-decoration: none; }
}

/* Signal: an instrument panel at night. One signal colour (lime) for what you can act on, cyan for data,
   coral for results that went against me. Anybody's width axis carries the display type. */
:root {
  --bg: #06070b;
  --bg-2: #0a0c13;
  --panel: rgb(17 20 31 / 0.72);
  --panel-solid: #10131d;
  --line: rgb(255 255 255 / 0.08);
  --line-2: rgb(255 255 255 / 0.16);
  --ink: #eef1f6;
  --muted: #a4acbd;
  --dim: #818a9c;
  --signal: #c8f560;
  --signal-ink: #0b1000;
  --cyan: #6be4ff;
  --coral: #ff8a73;
  --violet: #b7a4ff;
  --focus: var(--signal);
  --display: "Anybody", "Schibsted Grotesk", ui-sans-serif, system-ui, sans-serif;
  --body: "Atkinson Hyperlegible Next", ui-sans-serif, system-ui, sans-serif;
  --mono: "Spline Sans Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --sinhala: "Gemunu Libre", "Noto Sans Sinhala", sans-serif;
  --wrap: 76rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  color-scheme: dark;
}

html { background: var(--bg); scroll-behavior: smooth; scroll-padding-top: 5rem; }
body {
  background:
    radial-gradient(60rem 40rem at 85% -10%, rgb(107 228 255 / 0.08), transparent 60%),
    radial-gradient(50rem 36rem at -10% 20%, rgb(200 245 96 / 0.06), transparent 60%),
    var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  font-feature-settings: "ss01";
  overflow-x: clip;
  /* Its own stacking context, so the grid overlay below paints above the body background. */
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  opacity: 0.55;
}
::selection { background: var(--signal); color: var(--signal-ink); }
a { color: inherit; }
a:hover { color: var(--signal); }
kbd { font: 500 0.78em/1 var(--mono); padding: 0.2em 0.45em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 6px; color: var(--muted); background: var(--bg-2); }
[lang="si"] { font-family: var(--sinhala); }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ── HUD ───────────────────────────────────────────────────────────────────────────────────────────── */
.hud {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem var(--gutter);
  background: rgb(6 7 11 / 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.mark { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; margin-right: auto; }
.mark-glyph {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 10px;
  font: 800 0.95rem/1 var(--display);
  font-stretch: 120%;
  color: var(--signal-ink);
  background: var(--signal);
  box-shadow: 0 0 24px rgb(200 245 96 / 0.35);
}
.mark-text { display: grid; line-height: 1.1; }
.mark-name { font: 650 0.95rem/1.1 var(--display); font-stretch: 90%; letter-spacing: 0.01em; }
.mark-native { font-size: 0.82rem; color: var(--dim); }
.nav { display: flex; gap: 0.25rem; }
.nav a {
  font: 500 0.8rem/1 var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}
.nav a:hover, .nav a[aria-current="true"] { color: var(--ink); background: rgb(255 255 255 / 0.06); }
.hud-tools { display: flex; align-items: center; gap: 0.5rem; }
.xp {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0.7rem 0.35rem 0.4rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--bg-2);
  font: 600 0.74rem/1 var(--mono);
  color: var(--ink);
}
.xp:hover { border-color: var(--signal); }
.xp-level { padding: 0.3rem 0.5rem; border-radius: 999px; background: var(--signal); color: var(--signal-ink); }
.xp-bar { position: relative; width: 4.5rem; height: 6px; border-radius: 99px; background: rgb(255 255 255 / 0.1); overflow: hidden; }
.xp-fill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--cyan), var(--signal)); transition: transform 0.8s var(--ease); }
.xp-num { color: var(--muted); min-width: 4.4em; }
.xp.is-bumped { animation: bump 0.6s var(--ease); }
@keyframes bump { 40% { transform: scale(1.08); box-shadow: 0 0 0 6px rgb(200 245 96 / 0.18); } }
.mode { display: flex; padding: 3px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--bg-2); }
.mode button { border: 0; background: none; padding: 0.38rem 0.7rem; border-radius: 999px; font: 600 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.mode button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.palette-open { border: 1px solid var(--line-2); background: var(--bg-2); border-radius: 10px; padding: 0.3rem 0.45rem; }
.palette-open kbd { border: 0; background: none; padding: 0; }
.palette-open:hover { border-color: var(--signal); }
.palette-word { display: none; font: 600 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.05em; padding: 0.2rem 0.25rem; }
@media (pointer: coarse), (max-width: 62rem) { .palette-open kbd { display: none; } .palette-word { display: inline; } }

/* ── Shared type and controls ──────────────────────────────────────────────────────────────────────── */
.level { margin-bottom: 1rem; }
.level-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font: 500 0.75rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--signal);
}
.level-tag::before { content: ""; width: 1.6rem; height: 1px; background: currentColor; }
h2 { font: 750 clamp(2.1rem, 5.2vw, 3.9rem)/0.98 var(--display); font-stretch: 78%; letter-spacing: -0.01em; }
h3 { font: 700 1.25rem/1.2 var(--display); font-stretch: 88%; }
h4 { font: 700 1.15rem/1.25 var(--display); font-stretch: 90%; }
.section-head { display: grid; gap: 0.9rem; max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.2rem); }
.section-intro { color: var(--muted); font-size: 1.1rem; max-width: 40rem; }
.band { padding-block: clamp(4.5rem, 10vw, 8rem); border-top: 1px solid var(--line); position: relative; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.9rem;
  padding: 0 1.25rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgb(255 255 255 / 0.03);
  color: var(--ink);
  font: 600 0.95rem/1 var(--body);
  text-decoration: none;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.btn:hover { border-color: var(--ink); color: var(--ink); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--signal); border-color: var(--signal); color: var(--signal-ink); box-shadow: 0 8px 30px -10px rgb(200 245 96 / 0.6); }
.btn-primary:hover { background: #d8ff7c; border-color: #d8ff7c; color: var(--signal-ink); }
.btn-quiet { border-color: transparent; color: var(--muted); }
.link-btn { border: 0; background: none; padding: 0; color: var(--signal); text-decoration: underline; text-underline-offset: 0.2em; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: transparent;
  font: 500 0.8rem/1 var(--mono);
  color: var(--muted);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.chip:hover { color: var(--ink); border-color: var(--ink); }
.chip[aria-pressed="true"] { color: var(--signal-ink); background: var(--signal); border-color: var(--signal); }
.panel {
  position: relative;
  background: linear-gradient(180deg, rgb(255 255 255 / 0.035), transparent 40%), var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.05), 0 20px 50px -30px rgb(0 0 0 / 0.8);
}
.panel::before, .panel::after {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  border: 1px solid var(--line-2);
  pointer-events: none;
  transition: border-color 0.3s, inset 0.3s var(--ease);
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius); }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius); }
.highlights { padding-left: 1.1rem; display: grid; gap: 0.45rem; color: var(--muted); }
.highlights li::marker { color: var(--signal); }
.noscript-note { color: var(--dim); }
.js .noscript-note { display: none; }

/* ── Hero ──────────────────────────────────────────────────────────────────────────────────────────── */
.hero { position: relative; min-height: min(100svh, 62rem); display: grid; align-items: center; overflow: hidden; isolation: isolate; padding-block: 6rem 5rem; }
.field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; touch-action: pan-y; }
.hero-grid {
  position: absolute;
  inset: auto -20% -10% -20%;
  height: 55%;
  z-index: -2;
  background-image: linear-gradient(rgb(200 245 96 / 0.14) 1px, transparent 1px), linear-gradient(90deg, rgb(200 245 96 / 0.14) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(600px) rotateX(62deg);
  transform-origin: 50% 0;
  mask-image: linear-gradient(to bottom, transparent, #000 30%, transparent 95%);
  animation: travel 9s linear infinite;
}
@keyframes travel { to { background-position: 0 56px, 0 0; } }
.hero-inner { position: relative; display: grid; gap: 1.4rem; max-width: var(--wrap); }
.kicker { display: inline-flex; align-items: center; gap: 0.6rem; font: 500 0.8rem/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--signal); box-shadow: 0 0 0 0 rgb(200 245 96 / 0.6); animation: ping 2.4s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 10px rgb(200 245 96 / 0); } 100% { box-shadow: 0 0 0 0 rgb(200 245 96 / 0); } }
.hero-title {
  font: 800 clamp(2.9rem, 8.6vw, 7.4rem)/0.9 var(--display);
  font-stretch: 72%;
  letter-spacing: -0.02em;
  max-width: 14ch;
  text-shadow: 0 2px 40px rgb(6 7 11 / 0.9);
  animation: widen 1.4s var(--ease) both;
}
@keyframes widen { from { font-stretch: 50%; opacity: 0; letter-spacing: 0.04em; } }
.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 44rem; text-shadow: 0 1px 20px var(--bg); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.4rem; }
.brief {
  max-width: 40rem;
  padding: 0.9rem 1rem 0.9rem 1.1rem;
  border-left: 2px solid var(--signal);
  background: linear-gradient(90deg, rgb(200 245 96 / 0.07), transparent);
  font: 400 0.92rem/1.55 var(--mono);
  color: var(--muted);
}
.hero-hint { position: absolute; bottom: 1.4rem; right: var(--gutter); font: 500 0.72rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }

/* ── Telemetry ─────────────────────────────────────────────────────────────────────────────────────── */
.telemetry { border-top: 1px solid var(--line); background: rgb(10 12 19 / 0.6); }
.tiles.wrap { padding-inline: var(--gutter); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.tile { display: grid; gap: 0.3rem; padding: 1.6rem 1.2rem; border-left: 1px solid var(--line); }
.tile:first-child { border-left: 0; }
.tile-num { font: 750 clamp(2rem, 4vw, 2.8rem)/1 var(--display); font-stretch: 70%; font-variant-numeric: tabular-nums; color: var(--ink); }
.tile:nth-child(3) .tile-num { color: var(--coral); }
.tile-label { font: 500 0.72rem/1.35 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }

/* ── Level 1: claims ───────────────────────────────────────────────────────────────────────────────── */
.scoreboard { display: flex; align-items: center; gap: 1.2rem; padding: 0.9rem 1.2rem 0.9rem 0.9rem; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); width: fit-content; max-width: 100%; flex-wrap: wrap; }
.gauge { position: relative; width: 4.2rem; height: 4.2rem; flex: none; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge circle { fill: none; stroke-width: 9; }
.gauge-track { stroke: rgb(255 255 255 / 0.08); }
.gauge-fill { stroke: var(--signal); stroke-linecap: round; stroke-dasharray: 326.7; stroke-dashoffset: calc(326.7 * (1 - var(--cal, 0))); transition: stroke-dashoffset 1s var(--ease); }
.gauge-num { position: absolute; inset: 0; display: grid; place-items: center; font: 700 1.1rem/1 var(--mono); }
.score-lines { font: 500 0.85rem/1.5 var(--mono); color: var(--muted); }
.score-count { color: var(--ink); font-weight: 700; }
.claims { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr)); gap: 1rem; }
.claim { display: flex; flex-direction: column; gap: 1rem; padding: 1.4rem; transition: border-color 0.3s, transform 0.4s var(--ease); }
.claim:hover { border-color: var(--line-2); }
.claim-top { display: flex; align-items: baseline; gap: 0.7rem; font: 500 0.75rem/1.4 var(--mono); color: var(--dim); letter-spacing: 0.04em; }
.claim-index { color: var(--signal); }
.claim-subject a { text-decoration: none; color: var(--muted); }
.claim-q { font: 650 1.2rem/1.3 var(--body); }
.claim-play { display: grid; gap: 0.8rem; margin-top: auto; }
.dial { display: grid; gap: 0.35rem; }
.dial-input { -webkit-appearance: none; appearance: none; width: 100%; height: 2rem; background: transparent; cursor: ew-resize; }
.dial-input::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, rgb(107 228 255 / 0.4), rgb(200 245 96 / 0.4)); }
.dial-input::-moz-range-track { height: 6px; border-radius: 99px; background: linear-gradient(90deg, rgb(107 228 255 / 0.4), rgb(200 245 96 / 0.4)); }
.dial-input::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%; background: var(--ink); border: 4px solid var(--bg); box-shadow: 0 0 0 2px var(--signal), 0 0 18px rgb(200 245 96 / 0.6); }
.dial-input::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 4px solid var(--bg); box-shadow: 0 0 0 2px var(--signal); }
.dial-ends { display: flex; justify-content: space-between; font: 500 0.72rem/1 var(--mono); color: var(--dim); }
.dial-out { font: 500 0.85rem/1 var(--mono); color: var(--muted); }
.dial-out output { margin-left: 0.4rem; font-size: 1.2rem; font-weight: 700; color: var(--ink); }
.claim-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.claim-answer > summary { cursor: pointer; font: 500 0.85rem/1 var(--mono); color: var(--signal); list-style: none; }
.claim-answer > summary::-webkit-details-marker { display: none; }
.claim-answer > summary::before { content: "▸ "; }
.claim-answer[open] > summary::before { content: "▾ "; }
.answer { display: grid; gap: 0.6rem; padding-top: 0.6rem; }
.figure { font: 800 clamp(2.4rem, 5vw, 3.2rem)/1 var(--display); font-stretch: 70%; color: var(--signal); outline: none; }
[data-polarity="against"] .figure { color: var(--coral); }
.comparison { font: 500 0.85rem/1.4 var(--mono); color: var(--muted); }
.meaning { color: var(--muted); font-size: 0.98rem; }
.against { display: inline-flex; width: fit-content; padding: 0.3rem 0.6rem; border-radius: 6px; font: 600 0.72rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--coral); background: rgb(255 138 115 / 0.1); border: 1px solid rgb(255 138 115 / 0.3); }
.track { position: relative; height: 10px; margin-block: 0.4rem; border-radius: 99px; background: rgb(255 255 255 / 0.07); }
.track span { position: absolute; top: 50%; left: var(--at, 50%); width: 14px; height: 14px; border-radius: 50%; translate: -50% -50%; transition: left 0.9s var(--ease); }
.track-truth { background: var(--signal); box-shadow: 0 0 14px var(--signal); }
[data-polarity="against"] .track-truth { background: var(--coral); box-shadow: 0 0 14px var(--coral); }
.track-guess { background: transparent; border: 2px solid var(--ink); }
.verdict { font: 600 0.9rem/1.4 var(--mono); color: var(--ink); }
.claim.is-open { border-color: rgb(200 245 96 / 0.3); }
.claim[data-polarity="against"].is-open { border-color: rgb(255 138 115 / 0.35); }
.claim[data-verdict="called"] { box-shadow: 0 0 0 1px var(--signal), 0 0 50px -10px rgb(200 245 96 / 0.4); }
.claim.is-animated .figure { animation: decode 0.9s var(--ease); }
@keyframes decode { from { opacity: 0; filter: blur(8px); letter-spacing: 0.3em; } }
[data-mode="skim"] .claim-play, [data-mode="skim"] .scoreboard, [data-mode="skim"] .hero .brief { display: none; }

/* ── Level 2: graph ────────────────────────────────────────────────────────────────────────────────── */
.graph-stage { display: grid; grid-template-rows: auto 1fr; overflow: hidden; }
.graph-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; padding: 0.9rem 1rem; border-bottom: 1px solid var(--line); }
.graph-legend { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.graph-legend .chip[aria-pressed="true"] { background: rgb(255 255 255 / 0.06); color: var(--ink); border-color: var(--line-2); }
.graph-legend .chip[aria-pressed="false"] { opacity: 0.45; }
.swatch { width: 9px; height: 9px; border-radius: 50%; }
.swatch-project { background: var(--signal); }
.swatch-skill { background: var(--cyan); }
.swatch-org { background: var(--violet); }
.graph-count { font: 500 0.78rem/1 var(--mono); color: var(--dim); }
.graph-canvas { width: 100%; height: clamp(26rem, 62vh, 40rem); cursor: grab; touch-action: pan-y; }
.graph-canvas.is-dragging { cursor: grabbing; }
.graph-card {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: min(22rem, calc(100% - 2rem));
  padding: 1rem 1.1rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgb(10 12 19 / 0.9);
  backdrop-filter: blur(10px);
  display: grid;
  gap: 0.45rem;
}
.graph-card h3 { font-size: 1.1rem; }
.graph-card p { font-size: 0.9rem; color: var(--muted); }
.graph-card .graph-card-kind { font: 500 0.7rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.1em; color: var(--signal); }
.graph-card-hint { font: 500 0.8rem/1.4 var(--mono); }
.stack-index { margin-top: 1.4rem; }
.stack-index > summary { cursor: pointer; font: 500 0.85rem/1 var(--mono); color: var(--muted); }
.stack-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); gap: 0.9rem 2rem; margin-top: 1.2rem; }
.stack-list dt { font: 600 0.85rem/1.3 var(--mono); color: var(--cyan); }
.stack-list dd { color: var(--muted); font-size: 0.92rem; }
.stack-list a { text-decoration: none; }

/* ── Level 3: builds ───────────────────────────────────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.5rem; }
.builds { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr)); gap: 1rem; }
.build { --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg; transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)); transition: transform 0.5s var(--ease), border-color 0.3s; will-change: transform; }
.build.is-featured:nth-child(-n + 3) { grid-column: span 1; }
@media (min-width: 64rem) { .build.is-featured:nth-child(1) { grid-column: span 2; } }
.build:hover { border-color: rgb(200 245 96 / 0.35); }
.build:hover::before, .build:hover::after { border-color: var(--signal); }
.build-link {
  position: relative;
  display: grid;
  gap: 0.7rem;
  height: 100%;
  padding: 1.4rem;
  text-decoration: none;
  border-radius: inherit;
  background: radial-gradient(28rem circle at var(--mx) var(--my), rgb(200 245 96 / 0.09), transparent 45%);
  background-size: 100% 100%;
}
.build-link:hover { color: var(--ink); }
.build-meta { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; font: 500 0.72rem/1.2 var(--mono); letter-spacing: 0.05em; text-transform: uppercase; color: var(--dim); }
.state[data-state="active"] { color: var(--signal); }
.state[data-state="shipped"] { color: var(--cyan); }
.build-name { font: 750 1.6rem/1.05 var(--display); font-stretch: 80%; transition: font-stretch 0.5s var(--ease), color 0.3s; }
.build.is-featured:nth-child(1) .build-name { font-size: clamp(1.8rem, 3.4vw, 2.6rem); }
.build:hover .build-name { font-stretch: 100%; color: var(--signal); }
.build-summary { color: var(--muted); }
.build-claim { display: block; padding: 0.7rem 0.8rem; border-radius: 10px; background: rgb(255 255 255 / 0.035); border: 1px solid var(--line); font-size: 0.88rem; color: var(--muted); }
.build-claim-figure { font: 800 1.05rem/1 var(--mono); color: var(--signal); margin-right: 0.3rem; }
.build-stack { margin-top: auto; font: 400 0.76rem/1.5 var(--mono); color: var(--dim); }
.build.is-hidden { display: none; }

/* ── Level 4: log ──────────────────────────────────────────────────────────────────────────────────── */
.log-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
@media (max-width: 56rem) { .log-grid { grid-template-columns: 1fr; } }
.col-title { font: 500 0.8rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); margin-bottom: 1rem; }
.quests { display: grid; gap: 1rem; align-content: start; }
.quest { display: grid; gap: 0.6rem; padding: 1.4rem; }
.quest[data-active] { border-color: rgb(200 245 96 / 0.35); background: linear-gradient(135deg, rgb(200 245 96 / 0.07), transparent 50%), var(--panel); }
.quest-state { font: 500 0.72rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.quest[data-active] .quest-state { color: var(--signal); }
.quest-org { font: 500 0.85rem/1.4 var(--mono); color: var(--cyan); }
.quest-org a { text-decoration: none; }
.timeline { position: relative; display: grid; gap: 1.4rem; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 0.4rem; bottom: 0.4rem; width: 1px; background: var(--line-2); }
.timeline::after { content: ""; position: absolute; left: 4px; top: 0.4rem; bottom: 0.4rem; width: 1px; background: linear-gradient(var(--signal), var(--cyan)); transform-origin: top; transform: scaleY(1); }
.tl-item { position: relative; display: grid; gap: 0.2rem; padding-left: 1.6rem; }
.tl-item::before { content: ""; position: absolute; left: 0; top: 0.35rem; width: 9px; height: 9px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); }
.tl-item[data-kind="role"]::before { border-color: var(--signal); }
.tl-item[data-kind="award"]::before { border-color: var(--violet); background: var(--violet); }
.tl-when { font: 500 0.72rem/1.2 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); }
.tl-title { font-weight: 650; }
.tl-detail { color: var(--muted); font-size: 0.92rem; }

/* ── House rules ───────────────────────────────────────────────────────────────────────────────────── */
.rules { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 1rem; counter-reset: rule; }
.rule { display: grid; gap: 0.6rem; padding: 1.5rem; align-content: start; }
.rule-n { font: 500 0.8rem/1 var(--mono); color: var(--signal); }
.rule-text { font: 750 1.55rem/1.08 var(--display); font-stretch: 78%; transition: font-stretch 0.6s var(--ease); }
.rule:hover .rule-text { font-stretch: 96%; }
.rule-detail { color: var(--muted); }

/* ── Level 5: console ──────────────────────────────────────────────────────────────────────────────── */
.term { overflow: hidden; background: #07090e; font: 400 0.92rem/1.6 var(--mono); }
.term-bar { display: flex; align-items: center; gap: 0.45rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); }
.term-bar span { width: 11px; height: 11px; border-radius: 50%; background: rgb(255 255 255 / 0.12); }
.term-bar span:first-child { background: var(--coral); }
.term-bar span:nth-child(2) { background: #f5cf60; }
.term-bar span:nth-child(3) { background: var(--signal); }
.term-bar p { margin-left: auto; font-size: 0.72rem; color: var(--dim); }
.term-out { max-height: 34rem; min-height: 14rem; overflow-y: auto; padding: 1.1rem 1.2rem; display: grid; gap: 0.9rem; align-content: start; outline: none; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-q { color: var(--ink); }
.term-q::before { content: "› "; color: var(--signal); }
.term-sys { color: var(--muted); }
.term-err { color: var(--coral); }
.term-ok { color: var(--signal); }
.trace[role="list"] { display: grid; gap: 0.25rem; padding: 0.7rem 0.9rem; border: 1px dashed var(--line-2); border-radius: 10px; font-size: 0.8rem; }
.trace li { display: grid; grid-template-columns: 4.5rem 1fr auto; gap: 0.8rem; opacity: 0.25; transition: opacity 0.3s; }
.trace li.is-lit { opacity: 1; }
.trace .t-name { color: var(--cyan); text-transform: uppercase; letter-spacing: 0.08em; }
.trace .t-time { color: var(--dim); }
.trace li.is-miss .t-name { color: var(--coral); }
.cards { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.card { padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 10px; background: rgb(255 255 255 / 0.025); font-family: var(--body); display: grid; gap: 0.35rem; }
.card h3 { font-size: 1.05rem; }
.card h3 a { text-decoration: none; }
.card p { font-size: 0.9rem; color: var(--muted); }
.card .card-meta { font: 500 0.72rem/1.3 var(--mono); color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; }
.card .result-figure { font: 800 1.6rem/1 var(--display); font-stretch: 72%; color: var(--signal); }
.card.is-against .result-figure { color: var(--coral); }
.stumped { padding: 0.9rem 1rem; border-radius: 10px; border: 1px solid rgb(255 138 115 / 0.35); background: rgb(255 138 115 / 0.07); font-family: var(--body); }
.stumped strong { color: var(--coral); }
.term-form { display: flex; align-items: center; gap: 0.6rem; padding: 0.8rem 1.2rem; border-top: 1px solid var(--line); }
.term-prompt { color: var(--signal); white-space: nowrap; }
.term-input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--ink); caret-color: var(--signal); font: inherit; }
.term-input:focus-visible { outline: none; }
.term-form:focus-within { background: rgb(200 245 96 / 0.05); box-shadow: inset 0 0 0 2px var(--signal); }
.term-prompts { display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0 1.2rem 1.1rem; }

/* ── Finale ────────────────────────────────────────────────────────────────────────────────────────── */
.finale { background: radial-gradient(40rem 30rem at 80% 100%, rgb(200 245 96 / 0.08), transparent 70%); }
.finale-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr); gap: 2rem; align-items: end; }
@media (max-width: 52rem) { .finale-grid { grid-template-columns: 1fr; } }
.contact-email { font: 800 clamp(1.7rem, 5vw, 3.6rem)/1 var(--display); font-stretch: 70%; word-break: break-all; }
.contact-email a { text-decoration: none; background: linear-gradient(90deg, var(--ink), var(--ink)) 0 100% / 0 2px no-repeat; transition: background-size 0.5s var(--ease), color 0.3s; }
.contact-email a:hover { color: var(--signal); background-image: linear-gradient(90deg, var(--signal), var(--signal)); background-size: 100% 2px; }
.contact-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1.6rem; font: 500 0.9rem/1 var(--mono); }
.contact-links a { text-decoration: none; color: var(--muted); }
.contact-links a::after { content: " ↗"; color: var(--dim); }
.availability { margin-top: 1.4rem; color: var(--muted); }
.run-card { padding: 1.4rem; display: grid; gap: 1rem; }
.run-title { font: 500 0.75rem/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--signal); }
.run-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.run-stats dt { font: 500 0.7rem/1 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
.run-stats dd { font: 750 1.9rem/1.1 var(--display); font-stretch: 72%; }

/* ── Footer ────────────────────────────────────────────────────────────────────────────────────────── */
.colophon { border-top: 1px solid var(--line); padding-block: 2.2rem 3rem; font: 400 0.82rem/1.7 var(--mono); color: var(--dim); }
.colophon .wrap { display: grid; gap: 0.3rem; }
.colophon a { color: var(--muted); }

/* ── Dialogs, palette, toasts ──────────────────────────────────────────────────────────────────────── */
.sheet {
  width: min(36rem, calc(100% - 2rem));
  max-height: min(42rem, calc(100svh - 3rem));
  padding: 0;
  border: 1px solid var(--line-2);
  border-radius: 18px;
  background: rgb(12 14 22 / 0.96);
  color: var(--ink);
  box-shadow: 0 40px 120px -20px rgb(0 0 0 / 0.9), 0 0 0 1px rgb(200 245 96 / 0.06);
  overflow: hidden;
}
.sheet[open] { animation: sheet-in 0.35s var(--ease); }
@keyframes sheet-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
.sheet::backdrop { background: rgb(3 4 7 / 0.6); backdrop-filter: blur(6px); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.sheet-head h2 { font-size: 1.6rem; }
.sheet-close { border: 1px solid var(--line-2); background: none; border-radius: 999px; padding: 0.4rem 0.8rem; font: 500 0.75rem/1 var(--mono); color: var(--muted); }
.trophies { overflow-y: auto; }
.trophies-summary { padding: 1rem 1.3rem 0; font: 500 0.85rem/1.5 var(--mono); color: var(--muted); }
.trophy-list[role="list"] { display: grid; gap: 0.5rem; padding: 1rem 1.3rem; }
.trophy { display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 0.8rem; align-items: center; padding: 0.7rem 0.8rem; border: 1px solid var(--line); border-radius: 12px; }
.trophy-icon { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; background: rgb(255 255 255 / 0.05); font: 700 0.95rem/1 var(--mono); color: var(--dim); }
.trophy.is-won { border-color: rgb(200 245 96 / 0.3); background: rgb(200 245 96 / 0.04); }
.trophy.is-won .trophy-icon { background: var(--signal); color: var(--signal-ink); }
.trophy-name { font-weight: 650; }
.trophy-desc { font-size: 0.85rem; color: var(--muted); }
.trophy-xp { font: 600 0.75rem/1 var(--mono); color: var(--dim); }
.trophy.is-won .trophy-xp { color: var(--signal); }
.trophies-foot { padding: 0 1.3rem 1.2rem; font-size: 0.85rem; color: var(--dim); }
.palette { align-self: start; margin-top: 12vh; }
.palette-input { width: 100%; padding: 1.1rem 1.3rem; border: 0; border-bottom: 1px solid var(--line); background: none; outline: none; font: 500 1.05rem/1.3 var(--body); color: var(--ink); caret-color: var(--signal); }
.palette-list { list-style: none; margin: 0; padding: 0.5rem; max-height: 22rem; overflow-y: auto; }
.palette-item { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.7rem 0.8rem; border-radius: 10px; cursor: pointer; }
.palette-item[aria-selected="true"] { background: rgb(200 245 96 / 0.12); }
.palette-item[aria-selected="true"] .palette-label { color: var(--signal); }
.palette-kind { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.palette-empty { padding: 1rem; color: var(--dim); font: 500 0.85rem/1.4 var(--mono); }
.palette-foot { display: flex; gap: 0.4rem; align-items: center; padding: 0.7rem 1.2rem; border-top: 1px solid var(--line); font: 500 0.72rem/1 var(--mono); color: var(--dim); }
.palette-foot kbd + kbd { margin-left: -0.15rem; }
.toasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: grid; gap: 0.5rem; justify-items: end; pointer-events: none; }
.toast {
  display: grid;
  grid-template-columns: 2.6rem 1fr;
  gap: 0.8rem;
  align-items: center;
  width: min(22rem, calc(100vw - 2rem));
  padding: 0.8rem 1rem 0.8rem 0.8rem;
  border: 1px solid rgb(200 245 96 / 0.4);
  border-radius: 14px;
  background: rgb(12 14 22 / 0.96);
  box-shadow: 0 20px 50px -10px rgb(0 0 0 / 0.8), 0 0 40px -10px rgb(200 245 96 / 0.4);
  animation: toast-in 0.5s var(--ease), toast-out 0.4s var(--ease) 4.6s forwards;
}
.toast-icon { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 10px; background: var(--signal); color: var(--signal-ink); font: 800 1rem/1 var(--mono); }
.toast-kicker { font: 600 0.68rem/1 var(--mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--signal); }
.toast-title { font-weight: 650; }
.toast-desc { font-size: 0.82rem; color: var(--muted); }
@keyframes toast-in { from { opacity: 0; transform: translateY(16px) scale(0.96); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

/* ── Project pages ─────────────────────────────────────────────────────────────────────────────────── */
.project-wrap { padding-block: clamp(3rem, 8vw, 6rem); }
.project { display: grid; gap: 2.5rem; }
.crumb { font: 500 0.8rem/1 var(--mono); margin-bottom: 1rem; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a::before { content: "← "; }
.project-head h1 { font: 800 clamp(2.6rem, 8vw, 6rem)/0.92 var(--display); font-stretch: 74%; letter-spacing: -0.02em; view-transition-name: project-title; }
.project-head .lede { margin-top: 1.2rem; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(16rem, 22rem); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
@media (max-width: 54rem) { .project-grid { grid-template-columns: 1fr; } }
.project-body { display: grid; gap: 2rem; }
.project-body h2 { font-size: 1.6rem; font-stretch: 86%; margin-bottom: 0.6rem; }
.project-body p { color: var(--muted); max-width: 42rem; }
.project-aside { position: sticky; top: 5.5rem; display: grid; gap: 1.2rem; padding: 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.meta { display: grid; gap: 0.9rem; }
.meta dt { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); margin-bottom: 0.25rem; }
.meta dd { font-size: 0.95rem; }
.links { display: grid; gap: 0.4rem; font: 500 0.88rem/1.3 var(--mono); }
.links a { color: var(--signal); }
.results h2 { margin-bottom: 1rem; }
.result-list { display: grid; gap: 0.8rem; }
.result { padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; background: rgb(255 255 255 / 0.025); display: grid; gap: 0.4rem; }
.result-figure { font: 800 2.2rem/1 var(--display); font-stretch: 70%; color: var(--signal); }
.result[data-polarity="against"] .result-figure { color: var(--coral); }
.result[data-polarity="against"] { border-color: rgb(255 138 115 / 0.3); }
.result-date { font: 500 0.72rem/1 var(--mono); color: var(--dim); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 4rem; }
.pager a { display: grid; gap: 0.3rem; padding: 1.1rem 1.2rem; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; font: 700 1.2rem/1.2 var(--display); font-stretch: 85%; transition: border-color 0.2s; }
.pager a:hover { border-color: var(--signal); }
.pager a span { font: 500 0.7rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.pager a[rel="next"] { text-align: right; grid-column: 2; }

/* ── Résumé ────────────────────────────────────────────────────────────────────────────────────────── */
.resume { max-width: 52rem; margin-inline: auto; padding-block: clamp(3rem, 7vw, 5rem); display: grid; gap: 2.2rem; }
.resume h1 { font: 800 clamp(2.6rem, 7vw, 4.4rem)/0.95 var(--display); font-stretch: 74%; }
.resume-headline { margin-top: 0.8rem; font-size: 1.15rem; color: var(--muted); }
.resume-contact { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; margin-top: 1rem; font: 500 0.85rem/1.4 var(--mono); color: var(--muted); }
.resume h2 { font-size: 0.82rem; font-family: var(--mono); font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal); padding-bottom: 0.6rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; }
.resume-item { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; margin-bottom: 1.2rem; }
.resume-item > :not(h3, .resume-when) { grid-column: 1 / -1; color: var(--muted); }
.resume-item h3 { font-size: 1.1rem; }
.resume-item h3 a { text-decoration: none; }
.resume-when { font: 500 0.78rem/1.6 var(--mono); color: var(--dim); }
.resume ul { padding-left: 1.1rem; color: var(--muted); display: grid; gap: 0.3rem; }
.resume-skills { display: grid; gap: 0.6rem; }
.resume-skills div { display: grid; grid-template-columns: 11rem 1fr; gap: 1rem; }
.resume-skills dt { font: 600 0.85rem/1.5 var(--mono); color: var(--cyan); }
.resume-skills dd { color: var(--muted); }
@media (max-width: 40rem) { .resume-skills div { grid-template-columns: 1fr; gap: 0.1rem; } }

/* ── Motion that needs modern CSS: scroll-driven reveals and cross-document view transitions ───────── */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.35s; }
::view-transition-group(project-title) { animation-duration: 0.5s; animation-timing-function: var(--ease); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .claim, .build, .quest, .rule, .tile { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 40%; }
    .timeline::after { animation: draw linear both; animation-timeline: view(); animation-range: entry 20% exit 60%; }
    .section-head h2 { animation: unfold linear both; animation-timeline: view(); animation-range: entry 10% cover 35%; }
  }
}
@keyframes rise { from { opacity: 0; translate: 0 28px; } }
@keyframes draw { from { transform: scaleY(0); } }
@keyframes unfold { from { font-stretch: 50%; opacity: 0.2; } }

/* ── Small screens ─────────────────────────────────────────────────────────────────────────────────── */
@media (max-width: 62rem) { .nav { display: none; } }
@media (max-width: 34rem) {
  .mark-text { display: none; }
  .xp-bar, .xp-num { display: none; }
  .tile { border-left: 0; border-top: 1px solid var(--line); padding: 1.1rem 0.4rem; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .graph-card { position: static; width: auto; margin: 0 1rem 1rem; }
  .trace li { grid-template-columns: 3.6rem 1fr; }
  .trace .t-time { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-grid { animation: none; }
  .build { transform: none; }
}

@media print {
  :root { --ink: #000; --muted: #222; --dim: #555; --signal: #000; --cyan: #000; --line: #ccc; }
  body::before, .hud, .field, .hero-grid, .colophon { display: none !important; }
  .resume { padding: 0; }
}
