/* ==========================================================================
   Safety in the Layers — design system
   Dark (default, the brand) + tan light theme. Fluid from phone to 4K TV.
   ========================================================================== */

/* ---------- fonts (self-hosted, variable) ---------- */
@font-face { font-family: "Plus Jakarta Sans Variable"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("/assets/fonts/jakarta-latin.woff2") format("woff2-variations"), url("/assets/fonts/jakarta-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: "Plus Jakarta Sans Variable"; font-style: normal; font-display: swap; font-weight: 200 800; src: url("/assets/fonts/jakarta-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: "Geist Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/assets/fonts/geist-latin.woff2") format("woff2-variations"), url("/assets/fonts/geist-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: "Geist Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/assets/fonts/geist-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: "Geist Variable"; font-style: italic; font-display: swap; font-weight: 100 900; src: url("/assets/fonts/geist-latin-italic.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: "Geist Mono Variable"; font-style: normal; font-display: swap; font-weight: 100 900; src: url("/assets/fonts/geist-mono-latin.woff2") format("woff2-variations"), url("/assets/fonts/geist-mono-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; }

/* ---------- design tokens ---------- */
:root {
  --font-display: "Plus Jakarta Sans Variable", "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-text: "Geist Variable", "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono Variable", "Geist Mono", ui-monospace, "SFMono-Regular", "Cascadia Code", Menlo, Consolas, monospace;

  --step--2: clamp(0.74rem, 0.72rem + 0.08vw, 0.8rem);
  --step--1: clamp(0.84rem, 0.81rem + 0.14vw, 0.92rem);
  --step-0: clamp(1rem, 0.97rem + 0.16vw, 1.09rem);
  --step-1: clamp(1.14rem, 1.08rem + 0.3vw, 1.32rem);
  --step-2: clamp(1.32rem, 1.2rem + 0.55vw, 1.66rem);
  --step-3: clamp(1.6rem, 1.4rem + 0.95vw, 2.2rem);
  --step-4: clamp(1.95rem, 1.6rem + 1.6vw, 3rem);
  --step-5: clamp(2.3rem, 1.75rem + 2.6vw, 4rem);

  --space-2xs: 0.25rem; --space-xs: 0.5rem; --space-s: 0.75rem; --space-m: 1rem;
  --space-l: 1.5rem; --space-xl: 2rem; --space-2xl: 3rem; --space-3xl: 4.5rem;
  --section-y: clamp(3.5rem, 2.5rem + 4vw, 7rem);

  --radius-xs: 6px; --radius-s: 10px; --radius: 14px; --radius-l: 20px; --radius-pill: 999px;
  --container: 74rem; --container-narrow: 50rem; --prose: 42.5rem; --container-xs: 30rem;
  --gutter: clamp(1rem, 0.6rem + 2.4vw, 2.5rem);
  --header-h: 4rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* dark theme (default) */
  color-scheme: dark;
  --bg: #07080a;
  --bg-2: #0b0d10;
  --surface: #0f1215;
  --surface-2: #151a1e;
  --surface-3: #1c2227;
  --line: #22282d;
  --line-2: #323a41;
  --fg: #eceeef;
  --fg-2: #b3b9bf;
  --fg-3: #858c93;
  --accent: #00ece4;
  --accent-ink: #45f1e8;
  --accent-strong: #00ece4;
  --accent-fill: #013b37;
  --accent-soft: rgba(0, 236, 228, 0.1);
  --accent-glow: rgba(0, 236, 228, 0.42);
  --on-accent: #001816;
  --danger: #ff6b6b;
  --danger-line: #f95454;
  --warn: #f5c451;
  --token-bg: #0a0c0e;
  --token-line: #dedfe0;
  --token-fg: #f5f6f7;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset, 0 20px 40px -24px rgba(0, 0, 0, 0.8);
  --focus: #45f1e8;
  --selection: rgba(0, 236, 228, 0.28);
  --code-bg: #0b0e11;
  --grid-dot: rgba(255, 255, 255, 0.045);

  --t-M: #a99cff; --t-B: #00ece4; --t-C: #ffa24c; --t-R: #7cc4ff; --t-L: #9aa3ad; --t-X: #f5d547;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4efe5;
  --bg-2: #efe8db;
  --surface: #faf7f1;
  --surface-2: #fffdf9;
  --surface-3: #f1eadd;
  --line: #e0d7c6;
  --line-2: #cfc3ad;
  --fg: #1b1a17;
  --fg-2: #4b463d;
  --fg-3: #6b6457;
  --accent: #00a79e;
  --accent-ink: #006a64;
  --accent-strong: #00857d;
  --accent-fill: #d3f2ed;
  --accent-soft: rgba(0, 133, 125, 0.09);
  --accent-glow: rgba(0, 167, 158, 0.28);
  --on-accent: #ffffff;
  --danger: #b83a30;
  --danger-line: #d64a3f;
  --warn: #9a6a00;
  --token-bg: #fffcf6;
  --token-line: #1b1a17;
  --token-fg: #1b1a17;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset, 0 18px 36px -26px rgba(60, 45, 20, 0.35);
  --focus: #00857d;
  --selection: rgba(0, 167, 158, 0.22);
  --code-bg: #fbf8f2;
  --grid-dot: rgba(27, 26, 23, 0.05);

  --t-M: #6b55e0; --t-B: #008f87; --t-C: #c2610f; --t-R: #1f73b7; --t-L: #6b6457; --t-X: #9a7a00;
}

/* Big screens and TVs: scale everything proportionally. */
@media (min-width: 1800px) { html { font-size: 112.5%; } }
@media (min-width: 2300px) { html { font-size: 131.25%; } }
@media (min-width: 3000px) { html { font-size: 162.5%; } }
@media (min-width: 3600px) { html { font-size: 187.5%; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1.25rem);
  background: var(--bg);
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.65;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
main { flex: 1 0 auto; outline: none; }
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
::selection { background: var(--selection); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }
hr { border: 0; height: 1px; background: var(--line); margin: var(--space-2xl) 0; }

.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.mono { font-family: var(--font-mono); font-feature-settings: normal; }
.nowrap { white-space: nowrap; }
.icon { flex: none; width: 1.2em; height: 1.2em; }
.link-arrow .icon, .series-card__count .icon, .post-nav__link .icon, .resource__arrow { width: 1em; height: 1em; }
.icon-btn .icon, .socials .icon, .link-btn__icon .icon, .series-card__icon .icon { width: 1.25rem; height: 1.25rem; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: 0.6rem 1rem; border-radius: var(--radius-s);
  background: var(--accent); color: var(--on-accent); font-weight: 600; text-decoration: none;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 0.75rem; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(var(--container-narrow) + 2 * var(--gutter)); }
.container--prose { max-width: calc(var(--prose) + 2 * var(--gutter)); }
.container--xs { max-width: calc(var(--container-xs) + 2 * var(--gutter)); }
.container--wide { max-width: calc(62rem + 2 * var(--gutter)); }
.container--post { max-width: calc(var(--prose) + 16rem + 3rem + 2 * var(--gutter)); }

.section { padding-block: var(--section-y); }
.section--flush-top { padding-top: 0; }
.section--tight { padding-block: clamp(2rem, 1.5rem + 2vw, 3.5rem); }
.section-head { margin-bottom: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); max-width: 44rem; }
.section-head h2 { font-size: var(--step-4); }
.section-head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-l); max-width: none; flex-wrap: wrap; }
.section-lede { margin-top: var(--space-s); color: var(--fg-2); font-size: var(--step-1); line-height: 1.55; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  color: var(--accent-ink);
  margin-bottom: var(--space-xs);
  display: inline-flex; align-items: center; gap: 0.5em;
}
.eyebrow::before { content: ""; width: 0.5em; height: 1.05em; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent-glow); }
.eyebrow a { color: inherit; display: inline-block; padding: 0.55rem 0.15rem; margin: -0.55rem -0.15rem; }

/* ---------- tokens (the brand primitive) ---------- */
.tk {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.08em 0.4em 0.14em;
  border: max(2px, 0.045em) solid var(--token-line);
  border-radius: 0.3em;
  background: var(--token-bg);
  color: var(--token-fg);
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.12;
  white-space: nowrap;
}
.tk--chosen {
  border-color: var(--accent);
  background: var(--accent-fill);
  color: var(--token-fg);
  box-shadow: 0 0 0.9em -0.1em var(--accent-glow), inset 0 0 0.6em rgba(0, 236, 228, 0.12);
}
:root[data-theme="light"] .tk--chosen { color: #04302c; box-shadow: 0 0 0.8em -0.2em var(--accent-glow); }
.tk--stack { position: relative; }
.tk--stack::before, .tk--stack::after {
  content: "";
  position: absolute;
  inset: 0;
  border: inherit;
  border-color: var(--accent);
  border-radius: inherit;
  background: var(--bg);
  z-index: -1;
  opacity: 0.55;
  transform: translate(0.13em, 0.13em);
  transition: transform 0.5s var(--ease), opacity 0.5s var(--ease);
}
.tk--stack::after { opacity: 0.28; transform: translate(0.26em, 0.26em); }

/* brand mark in header/footer */
.brand { display: inline-flex; align-items: center; min-height: 2.75rem; padding-inline: 0.2rem; margin-inline: -0.2rem; text-decoration: none; color: inherit; border-radius: 8px; }
.brand-tokens { display: inline-flex; align-items: center; gap: 0.22em; isolation: isolate; }
.brand-tokens .tk { border-width: 1.5px; padding: 0.05em 0.38em 0.1em; border-radius: 0.34em; }
.brand-tokens--sm { font-size: 0.86rem; }
.brand-tokens--md { font-size: clamp(1.05rem, 0.9rem + 1.2vw, 1.4rem); }
.brand-tokens .tk--chosen { box-shadow: 0 0 0.7em -0.1em var(--accent-glow); }
.brand:hover .tk--chosen { box-shadow: 0 0 1.1em 0 var(--accent-glow); }

/* ---------- buttons, chips, links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 2.9rem; padding: 0.65em 1.2em;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  font-family: var(--font-text); font-weight: 600; font-size: var(--step-0); line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.15s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 0 var(--accent-glow); }
.btn--primary:hover { box-shadow: 0 0 1.6rem -0.2rem var(--accent-glow); background: var(--accent-ink); }
:root[data-theme="light"] .btn--primary { background: var(--accent-strong); }
:root[data-theme="light"] .btn--primary:hover { background: var(--accent-ink); }
.btn--ghost { border-color: var(--line-2); color: var(--fg); background: transparent; }
.btn--ghost:hover { border-color: var(--fg-3); background: var(--surface); }
.btn--sm { min-height: 2.3rem; padding: 0.4em 0.95em; font-size: var(--step--1); }
.btn--block { width: 100%; }
.btn--icon { padding-inline: 0.8em; }

.icon-btn {
  display: inline-grid; place-items: center;
  width: 2.6rem; height: 2.6rem; border-radius: var(--radius-pill);
  border: 1px solid transparent; background: transparent; color: var(--fg-2);
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.icon-btn:hover { background: var(--surface-2); color: var(--fg); border-color: var(--line); }
.x-glyph { font-size: 1.15rem; line-height: 1; font-family: var(--font-text); }

.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.4em;
  min-height: 2rem; padding: 0.25em 0.8em;
  border: 1px solid var(--line-2); border-radius: var(--radius-pill);
  font-family: var(--font-mono); font-size: var(--step--2); letter-spacing: 0.01em;
  color: var(--fg-2); background: transparent; text-decoration: none; white-space: nowrap;
  transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}
a.chip:hover, button.chip:hover { border-color: var(--accent); color: var(--fg); }
.chip.is-active, .chip[aria-current="page"] { border-color: var(--accent); color: var(--fg); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.chip--series { border-color: var(--accent); color: var(--accent-ink); }
.chip--ghost { border-style: dashed; }
.chip--warn { border-color: var(--warn); color: var(--warn); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 0.35em;
  font-weight: 600; color: var(--accent-ink); text-decoration: none;
}
.link-arrow .icon { transition: transform 0.2s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

.pulse {
  display: inline-block; width: 0.55em; height: 0.55em; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow);
  vertical-align: 0.05em;
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 var(--accent-glow); }
  70% { box-shadow: 0 0 0 0.55em rgba(0, 236, 228, 0); }
  100% { box-shadow: 0 0 0 0 rgba(0, 236, 228, 0); }
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header__inner { display: flex; align-items: center; gap: var(--space-l); height: var(--header-h); }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; list-style: none; gap: 0.25rem; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 2.5rem; padding: 0.4rem 0.8rem;
  border-radius: var(--radius-pill); color: var(--fg-2); text-decoration: none; font-weight: 500; font-size: 0.95rem;
  transition: color 0.2s, background-color 0.2s;
}
.site-nav a:hover { color: var(--fg); background: var(--surface); }
.site-nav a[aria-current="page"] { color: var(--fg); background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-2); }
.site-header__actions { display: flex; align-items: center; gap: 0.25rem; }
.theme-toggle__sun { display: none; }
:root[data-theme="light"] .theme-toggle__sun { display: inline; }
:root[data-theme="light"] .theme-toggle__moon { display: none; }
.menu-toggle { display: none; }
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: inline; }

.mobile-menu { border-top: 1px solid var(--line); background: var(--bg); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; }
.mobile-menu__links { list-style: none; padding-block: var(--space-m); }
.mobile-menu__links a {
  display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line);
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; text-decoration: none;
}
.mobile-menu__links a[aria-current="page"] { color: var(--accent-ink); }
.socials--menu { padding-bottom: var(--space-xl); }

@media (max-width: 860px) {
  .site-nav { display: none; }
  .menu-toggle { display: inline-grid; }
  .site-header__actions { margin-left: auto; }
  html:not(.js) .site-nav { display: block; overflow-x: auto; }
}
@media (min-width: 861px) { .mobile-menu { display: none !important; } }
@media (max-width: 380px) { .brand-tokens--sm { font-size: 0.74rem; } }

/* ---------- socials ---------- */
.socials { display: flex; flex-wrap: wrap; gap: 0.35rem; list-style: none; }
.socials a {
  display: inline-flex; align-items: center; gap: 0.5em; min-height: 2.6rem; padding: 0.4rem 0.6rem;
  border-radius: var(--radius-pill); color: var(--fg-2); text-decoration: none; font-weight: 500;
  transition: color 0.2s, background-color 0.2s;
}
.socials a:hover { color: var(--fg); background: var(--surface-2); }
.socials--footer { flex-direction: column; gap: 0; }
.socials--footer a { padding-inline: 0; min-height: 2.3rem; }
.socials--footer a:hover { background: none; color: var(--accent-ink); }
.socials--menu a { border: 1px solid var(--line); padding-inline: 0.9rem; }

/* ---------- hero + next-token widget ---------- */
.hero { position: relative; padding-block: clamp(2rem, 0.5rem + 4.5vw, 4.75rem) clamp(3rem, 2rem + 4vw, 6rem); isolation: isolate; overflow: clip; }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto; height: 80%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(40rem 22rem at 58% 38%, rgba(0, 236, 228, 0.1), transparent 70%),
    radial-gradient(var(--grid-dot) 1px, transparent 1.2px) 0 0 / 22px 22px;
  mask-image: radial-gradient(60% 70% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(60% 70% at 50% 40%, #000 30%, transparent 75%);
}
:root[data-theme="light"] .hero::before {
  background:
    radial-gradient(40rem 22rem at 58% 38%, rgba(0, 167, 158, 0.1), transparent 70%),
    radial-gradient(var(--grid-dot) 1px, transparent 1.2px) 0 0 / 22px 22px;
}
.hero__inner { display: grid; justify-items: center; gap: clamp(2.25rem, 1.4rem + 2.2vw, 3.25rem); text-align: center; }
.hero__copy { max-width: 48rem; display: grid; justify-items: center; gap: 1.25rem; }
.hero__title { font-size: clamp(2.2rem, 1.45rem + 2.7vw, 3.7rem); letter-spacing: -0.03em; line-height: 1.06; }
.hero__lede { font-size: var(--step-1); color: var(--fg-2); line-height: 1.6; max-width: 45rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.hero__status { font-size: var(--step--1); color: var(--fg-3); display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.4em; }

/* The next-token widget, drawn to the brand banner's geometry. All sizes are in em of the
   token font, measured from the banner: token height 1.44, gaps 0.155, cursor 0.22 wide and
   0.22 after the last token, rays 0.31 after the cursor, dropdown 6.28 wide, hanging 0.29
   below the tokens with its right edge 0.16 inside the rays and its arrow on the cursor. */
.lm {
  --lm-size: min(3.6rem, calc((100vw - 2 * var(--gutter)) / 9.7));
  position: relative;
  display: grid;
  justify-items: center;
  font-size: var(--lm-size);
  isolation: isolate;
  max-width: 100%;
}
.lm__stage { display: grid; justify-items: start; max-width: 100%; }
.lm__line { display: flex; flex-wrap: nowrap; align-items: center; gap: 0.155em; padding-right: 1.25em; position: relative; }
/* Token boxes sized like the banner: text 0.94 of the token scale, box 1.44 tall, generous
   side padding, and a square-ish minimum width for short words like "in". (em below = the
   token's own font, which is 0.94 of the widget's.) */
.lm .tk { font-size: 0.94em; letter-spacing: -0.05em; border-width: max(2px, 0.062em); border-radius: 0.234em; padding: 0.104em 0.445em 0.184em; min-width: 2.1em; }
.lm__cursor {
  position: absolute; right: 0.82em; top: 50%;
  width: 0.21em; height: 1.34em; margin-top: -0.67em;
  border-radius: 0.1em; background: var(--accent);
  box-shadow: 0 0 0.3em var(--accent-glow), 0 0 0.8em var(--accent-glow);
  animation: blink 1.1s steps(1, end) infinite;
}
.lm__rays {
  position: absolute; left: calc(100% + 0.31em); top: 50%; width: 0.51em; height: 1.06em; margin-top: -0.53em;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 51 106'%3E%3Cg stroke='%23000' stroke-width='9' stroke-linecap='round'%3E%3Cpath d='M8 30 40 6'/%3E%3Cpath d='M9 53h37'/%3E%3Cpath d='M8 76l32 24'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 51 106'%3E%3Cg stroke='%23000' stroke-width='9' stroke-linecap='round'%3E%3Cpath d='M8 30 40 6'/%3E%3Cpath d='M9 53h37'/%3E%3Cpath d='M8 76l32 24'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 0.12em var(--accent-glow));
}
@keyframes blink { 50% { opacity: 0.25; } }

.lm__panel {
  justify-self: end;
  margin-top: 0.29em;
  margin-right: 0.16em;
  width: 6.28em;
  max-width: 100%;
  padding: 0.03em 0.1em 0.135em;
  border: max(1.5px, 0.028em) solid #626465;
  border-radius: 0.2em;
  background: color-mix(in srgb, var(--bg) 96%, #ffffff);
  position: relative;
  text-align: left;
}
:root[data-theme="light"] .lm__panel { border-color: var(--line-2); background: var(--surface-2); }
.lm__panel::before {
  content: ""; position: absolute; top: -0.235em; right: 0.53em; width: 0.46em; height: 0.46em;
  border-left: max(1.5px, 0.03em) solid rgba(0, 236, 228, 0.75); border-top: max(1.5px, 0.03em) solid rgba(0, 236, 228, 0.75);
  border-top-left-radius: 0.04em; background: inherit; transform: rotate(45deg);
  box-shadow: -0.05em -0.05em 0.25em -0.08em var(--accent-glow);
}
:root[data-theme="light"] .lm__panel::before { border-color: var(--accent); }
.lm__cands { list-style: none; display: grid; gap: 0; padding: 0; margin: 0; }
.lm__cand {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 0.5em;
  min-height: 0.79em; padding: 0.02em 0.38em 0.04em 0.3em;
  border: max(2px, 0.042em) solid transparent; border-radius: 0.16em;
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.015em; line-height: 1.1;
}
.lm__cand.is-chosen {
  min-height: 1.14em; margin-bottom: 0.155em;
  border-color: var(--accent); background: var(--accent-fill);
  box-shadow: 0 0 0.5em 0 var(--accent-glow), inset 0 0 0.4em rgba(0, 236, 228, 0.14);
}
.lm__word { position: relative; font-size: 0.62em; color: var(--token-fg); }
.lm__cand.is-chosen .lm__word { font-size: 0.72em; }
:root[data-theme="light"] .lm__cand.is-chosen .lm__word { color: #04302c; }
.lm__p { font-family: var(--font-display); font-weight: 600; font-size: 0.5em; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.lm__cand.is-chosen .lm__p { color: var(--accent-ink); }
:root[data-theme="light"] .lm__cand.is-chosen .lm__p { color: var(--accent-strong); }
.lm__cand.is-rejected .lm__word { color: #bcb8ba; }
:root[data-theme="light"] .lm__cand.is-rejected .lm__word { color: var(--fg-3); }
.lm__cand.is-rejected .lm__p { color: #f95454; }
:root[data-theme="light"] .lm__cand.is-rejected .lm__p { color: var(--danger); }
.lm__cand.is-rejected .lm__word::after {
  content: ""; position: absolute; left: -0.04em; right: -0.04em; top: 0.6em; height: 0.105em; border-radius: 0.05em;
  background: var(--danger-line); transform-origin: left; transition: transform 0.45s var(--ease);
}
.lm__resample {
  margin-top: 0.9rem; justify-self: end;
  display: inline-flex; align-items: center; gap: 0.4em;
  font-size: 0.74rem; padding: 0.3rem 0.65rem; min-height: 2rem;
  border: 1px solid transparent; border-radius: var(--radius-pill);
  background: transparent; color: var(--fg-3); opacity: 0.75;
  transition: color 0.2s, border-color 0.2s, opacity 0.2s;
}
.lm__resample:hover, .lm__resample:focus-visible { color: var(--accent-ink); border-color: var(--line-2); opacity: 1; }
html:not(.js) .lm__resample { display: none; }

/* Animation stages. With JS (html.js, set before first paint) and motion allowed, the widget
   starts in a "pre" state (tokens hidden, cursor blinking); site.js adds s1..s4 in order,
   then .is-done. Without JS, or with reduced motion, the final state renders as-is. If the
   script never runs, the lm-failsafe animation reveals everything after 4s. */
.lm .lm__tok, .lm .lm__panel, .lm .lm__cand { transition: opacity 0.45s var(--ease), transform 0.55s var(--ease), box-shadow 0.45s var(--ease), border-color 0.35s, background-color 0.35s; }
@keyframes lm-failsafe { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .js .lm[data-lm]:not(.is-done) .lm__tok { opacity: 0; transform: translateY(0.18em); }
  .js .lm[data-lm]:not(.is-done) .lm__panel { opacity: 0; transform: translateY(-0.25em); }
  .js .lm[data-lm]:not(.is-done) .lm__cand { opacity: 0; transform: translateX(-0.2em); }
  .js .lm[data-lm]:not(.is-done) .lm__cand.is-chosen { border-color: transparent; background-color: transparent; box-shadow: none; }
  .js .lm[data-lm]:not(.is-done) .lm__cand.is-chosen .lm__p { color: var(--fg-2); }
  .js .lm[data-lm]:not(.is-done) .lm__cand.is-rejected .lm__word { color: var(--fg); }
  .js .lm[data-lm]:not(.is-done) .lm__cand.is-rejected .lm__p { color: var(--fg-2); }
  .js .lm[data-lm]:not(.is-done) .lm__cand.is-rejected .lm__word::after { transform: scaleX(0); }

  .js .lm[data-lm]:not(.s1):not(.is-done) .lm__tok,
  .js .lm[data-lm]:not(.s1):not(.is-done) .lm__panel,
  .js .lm[data-lm]:not(.s1):not(.is-done) .lm__cand { animation: lm-failsafe 0.5s var(--ease) 4s forwards; }

  .js .lm[data-lm].s1:not(.is-done) .lm__tok { opacity: 1; transform: none; transition-delay: calc(var(--i) * 150ms); }
  .js .lm[data-lm].s2:not(.is-done) .lm__panel { opacity: 1; transform: none; }
  .js .lm[data-lm].s2:not(.is-done) .lm__cand { opacity: 1; transform: none; }
  .js .lm[data-lm].s2:not(.is-done) .lm__cand:nth-child(2) { transition-delay: 120ms; }
  .js .lm[data-lm].s2:not(.is-done) .lm__cand:nth-child(3) { transition-delay: 240ms; }
  .js .lm[data-lm].s3:not(.is-done) .lm__cand.is-rejected .lm__word { color: #bcb8ba; transition: color 0.4s; }
  :root[data-theme="light"].js .lm[data-lm].s3:not(.is-done) .lm__cand.is-rejected .lm__word { color: var(--fg-3); }
  .js .lm[data-lm].s3:not(.is-done) .lm__cand.is-rejected .lm__p { color: #f95454; transition: color 0.4s; }
  :root[data-theme="light"].js .lm[data-lm].s3:not(.is-done) .lm__cand.is-rejected .lm__p { color: var(--danger); }
  .js .lm[data-lm].s3:not(.is-done) .lm__cand.is-rejected .lm__word::after { transform: none; }
  .js .lm[data-lm].s3:not(.is-done) .lm__cand.is-rejected:nth-child(3) .lm__word::after { transition-delay: 160ms; }
  .js .lm[data-lm].s4:not(.is-done) .lm__cand.is-chosen { border-color: var(--accent); background-color: var(--accent-fill); box-shadow: 0 0 0.5em 0 var(--accent-glow), inset 0 0 0.4em rgba(0, 236, 228, 0.14); }
  .js .lm[data-lm].s4:not(.is-done) .lm__cand.is-chosen .lm__p { color: var(--accent-ink); }
}

@media (max-width: 640px) {
  .hero__inner { text-align: left; justify-items: stretch; }
  .lm { justify-items: start; }
  .hero__copy { justify-items: start; }
  .hero__cta { justify-content: flex-start; }
  .hero__status { justify-content: flex-start; }
}

/* ---------- journey ---------- */
.journey { display: grid; gap: var(--space-l); }
.journey__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(9rem, 28%), 1fr)); gap: clamp(0.5rem, 0.3rem + 1vw, 1rem); }
@media (max-width: 480px) { .stat { padding: 0.8rem 0.9rem; } .stat__num { font-size: 1.7rem; } .journey--wide .journey__stats { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: var(--space-m) var(--space-l); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.stat__num { display: block; font-family: var(--font-display); font-weight: 800; font-size: var(--step-4); letter-spacing: -0.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat__label { display: block; margin-top: 0.3rem; font-family: var(--font-mono); font-size: var(--step--2); color: var(--fg-3); }

.progress { position: relative; height: 0.5rem; border-radius: var(--radius-pill); background: var(--surface-2); overflow: hidden; box-shadow: inset 0 0 0 1px var(--line); }
.progress > span { position: absolute; inset: 0 auto 0 0; width: var(--v, 0%); min-width: 0.5rem; border-radius: inherit; background: linear-gradient(90deg, var(--accent-strong), var(--accent)); box-shadow: 0 0 12px var(--accent-glow); transition: width 1s var(--ease); }

.ctx { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(2.75rem, 1fr)); gap: 0.4rem; }
@media (min-width: 700px) { .ctx { grid-template-columns: repeat(13, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .ctx { grid-template-columns: repeat(26, minmax(0, 1fr)); gap: 0.35rem; } .ctx__tok a { min-height: 2.9rem; } }
.ctx__tok a {
  display: grid; place-items: center; min-height: 2.6rem; padding: 0.3rem 0.2rem;
  border: 1.5px solid var(--line-2); border-radius: 0.55rem;
  font-family: var(--font-mono); font-size: var(--step--2); font-weight: 600; color: var(--fg-3);
  text-decoration: none; background: var(--token-bg);
  transition: border-color 0.2s, color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.ctx__tok a:hover { border-color: var(--fg-3); color: var(--fg); transform: translateY(-2px); }
.ctx__tok.is-past a { background: var(--surface-2); color: var(--fg-2); border-color: var(--line-2); }
.ctx__tok.is-past a span { text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-decoration-thickness: 2px; }
.ctx__tok.is-now a { border-color: var(--accent); background: var(--accent-fill); color: var(--fg); box-shadow: 0 0 1.1rem -0.2rem var(--accent-glow); }
:root[data-theme="light"] .ctx__tok.is-now a { color: #04302c; }
.ctx__tok.is-outline a { border-style: dashed; }


.today {
  padding: clamp(1.25rem, 1rem + 1vw, 2rem);
  border: 1px solid var(--line); border-radius: var(--radius-l);
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  box-shadow: var(--shadow);
}
.today__head { display: flex; justify-content: space-between; gap: var(--space-m); font-size: var(--step--1); color: var(--fg-3); margin-bottom: var(--space-s); }
.today__head > span { display: inline-flex; align-items: center; gap: 0.5em; }
.today__title { font-size: var(--step-2); margin-bottom: var(--space-m); }
.today__tasks { list-style: none; display: grid; gap: 0.6rem; margin-bottom: var(--space-l); }
.today__tasks li { display: grid; grid-template-columns: auto 1fr; gap: 0.75rem; align-items: start; color: var(--fg-2); }
.today__rest { display: block !important; }

/* ---------- track tags ---------- */
.track {
  display: inline-grid; place-items: center; flex: none;
  width: 1.55rem; height: 1.55rem; border-radius: 0.4rem;
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700; line-height: 1;
  color: var(--track-c); border: 1.5px solid var(--track-c);
  background: color-mix(in srgb, var(--track-c) 12%, transparent);
  margin-top: 0.05rem;
}
.track--M { --track-c: var(--t-M); } .track--B { --track-c: var(--t-B); } .track--C { --track-c: var(--t-C); }
.track--R { --track-c: var(--t-R); } .track--L { --track-c: var(--t-L); } .track--X { --track-c: var(--t-X); }

/* ---------- series grid ---------- */
.series-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); gap: var(--space-m); }
.series-card {
  display: flex; flex-direction: column; gap: var(--space-s);
  padding: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  border: 1px solid var(--line); border-radius: var(--radius-l);
  background: var(--surface); text-decoration: none; color: inherit;
  transition: border-color 0.25s, transform 0.25s var(--ease), box-shadow 0.25s;
}
.series-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 1.2rem 2.4rem -1.6rem var(--accent-glow); }
.series-card__icon { display: inline-grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 0.7rem; border: 1.5px solid var(--line-2); color: var(--accent-ink); background: var(--token-bg); }
.series-card__title { font-size: var(--step-2); }
.series-card p { color: var(--fg-2); flex: 1; }
.series-card__count { display: inline-flex; align-items: center; gap: 0.4em; font-size: var(--step--1); color: var(--accent-ink); }

/* ---------- post list ---------- */
.post-list { list-style: none; border-top: 1px solid var(--line); }
.post-item { border-bottom: 1px solid var(--line); }
.post-item article { position: relative; padding-block: clamp(1.1rem, 0.9rem + 0.8vw, 1.6rem); display: grid; gap: 0.4rem; }
.post-item__meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: var(--step--2); color: var(--fg-3); }
.post-item__series { color: var(--accent-ink); }
.post-item__title { font-size: var(--step-2); letter-spacing: -0.02em; }
.post-item__title a { text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 0.35s var(--ease); }
.post-item__title a::after { content: ""; position: absolute; inset: 0; }
.post-item:hover .post-item__title a { background-size: 100% 2px; }
.post-item__summary { color: var(--fg-2); max-width: 44rem; }

.empty-state { padding: var(--space-2xl) var(--space-l); border: 1px dashed var(--line-2); border-radius: var(--radius-l); text-align: center; color: var(--fg-2); display: grid; gap: 0.5rem; }
.empty-state .mono { color: var(--accent-ink); }

/* ---------- project cards ---------- */
.project-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: var(--space-m); }
.project-card {
  position: relative; display: grid; align-content: start; gap: var(--space-s);
  padding: clamp(1.25rem, 1rem + 0.8vw, 1.75rem);
  border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface);
  transition: border-color 0.25s, transform 0.25s var(--ease);
}
.project-card:hover { border-color: var(--line-2); transform: translateY(-3px); }
.project-card__meta { display: flex; justify-content: space-between; gap: var(--space-s); font-size: var(--step--2); color: var(--fg-3); align-items: center; }
.project-card__title { font-size: var(--step-2); }
.project-card__title a { text-decoration: none; }
.project-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.project-card__q { color: var(--fg-2); }
.status { display: inline-flex; align-items: center; gap: 0.4em; padding: 0.15em 0.6em; border-radius: var(--radius-pill); border: 1px solid var(--line-2); font-family: var(--font-mono); font-size: var(--step--2); color: var(--fg-2); white-space: nowrap; }
.status::before { content: ""; width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--fg-3); }
.status--in-progress { border-color: color-mix(in srgb, var(--accent) 60%, transparent); color: var(--accent-ink); }
.status--in-progress::before { background: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
.status--live::before, .status--shipped::before, .status--complete::before { background: var(--t-B); }

/* ---------- band + follow ---------- */
.band {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: var(--space-xl);
  padding: clamp(1.5rem, 1rem + 3vw, 3.5rem);
  border-radius: calc(var(--radius-l) + 6px);
  border: 1px solid var(--line-2);
  background:
    radial-gradient(30rem 16rem at 90% 10%, rgba(0, 236, 228, 0.12), transparent 70%),
    linear-gradient(180deg, var(--surface), var(--bg-2));
}
.band h2 { font-size: var(--step-4); max-width: 22ch; }
.band h3 { font-size: var(--step-2); }
.band p { color: var(--fg-2); margin-top: var(--space-s); max-width: 38rem; }
.band__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.band--compact { margin-top: var(--space-2xl); padding: clamp(1.25rem, 1rem + 2vw, 2.25rem); }
@media (max-width: 760px) { .band { grid-template-columns: 1fr; } }

.follow-cta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-l);
  padding: clamp(1.25rem, 1rem + 1.5vw, 2rem);
  border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface);
}
.follow-cta__title { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); letter-spacing: -0.02em; }
.follow-cta p:not(.follow-cta__title) { color: var(--fg-2); margin-top: 0.25rem; }
.follow-cta__actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

/* ---------- page heads ---------- */
.page-head { padding-block: clamp(2.5rem, 1.5rem + 5vw, 6rem) clamp(2rem, 1.5rem + 2.5vw, 3.5rem); }
.page-title { font-size: var(--step-5); letter-spacing: -0.035em; line-height: 1.1; display: flex; flex-wrap: wrap; align-items: center; gap: 0.18em 0.28em; isolation: isolate; }
.page-title .tk { font-size: 0.92em; padding: 0.02em 0.32em 0.1em; }
.page-lede { margin-top: var(--space-l); font-size: var(--step-1); color: var(--fg-2); max-width: 44rem; line-height: 1.6; }
.page-lede a { color: var(--accent-ink); }

/* ---------- blog filters ---------- */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-m); margin-bottom: var(--space-l); }
.filter-bar .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; max-width: 100%; }
.filter-bar .chips::-webkit-scrollbar { display: none; }
.search {
  display: flex; align-items: center; gap: 0.5rem; min-height: 2.5rem; padding: 0 0.9rem;
  border: 1px solid var(--line-2); border-radius: var(--radius-pill); color: var(--fg-3); background: var(--surface);
  flex: 1 1 14rem; max-width: 20rem;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { border: 0; outline: 0; background: transparent; width: 100%; min-width: 0; padding: 0.45rem 0; font-size: 1rem; color: var(--fg); }
.search input::placeholder { color: var(--fg-3); }
.filter-status { font-size: var(--step--2); color: var(--fg-3); min-height: 1.2em; margin-bottom: var(--space-s); }
@media (max-width: 640px) { .search { max-width: none; } }

/* ---------- post ---------- */
.post__header { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem) clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.post__eyebrow { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--space-l); }
.post__title { font-size: var(--step-5); letter-spacing: -0.035em; line-height: 1.08; }
.post__summary { margin-top: var(--space-l); font-size: var(--step-2); line-height: 1.45; color: var(--fg-2); font-family: var(--font-text); font-weight: 400; letter-spacing: -0.01em; }
.post__meta { margin-top: var(--space-l); display: flex; flex-wrap: wrap; gap: 0.3rem 0.6rem; font-size: var(--step--1); color: var(--fg-3); }
.post__cover { margin-bottom: var(--space-2xl); }
.post__cover img { width: 100%; border-radius: var(--radius-l); border: 1px solid var(--line); }
.post__body { display: block; }
.container--post.post__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2xl); }
@media (min-width: 1100px) {
  .container--post.post__body, .page-guide .container--post { display: grid; grid-template-columns: 14rem minmax(0, var(--prose)); gap: 3rem; justify-content: center; }
}
.post__footer { padding-block: var(--space-2xl) var(--section-y); display: grid; gap: var(--space-xl); }

.toc { font-size: var(--step--1); }
.toc__title { font-size: var(--step--2); color: var(--fg-3); margin-bottom: var(--space-s); text-transform: uppercase; letter-spacing: 0.06em; }
.toc ol { list-style: none; display: grid; gap: 0.15rem; border-left: 1px solid var(--line); }
.toc__item a { display: block; padding: 0.3rem 0 0.3rem 0.9rem; margin-left: -1px; border-left: 2px solid transparent; color: var(--fg-3); text-decoration: none; line-height: 1.4; transition: color 0.2s, border-color 0.2s; }
.toc__item--3 a { padding-left: 1.7rem; }
.toc__item a:hover { color: var(--fg); }
.toc__item a.is-active { color: var(--accent-ink); border-left-color: var(--accent); }
@media (min-width: 1100px) { .toc { position: sticky; top: calc(var(--header-h) + 2rem); align-self: start; max-height: calc(100vh - var(--header-h) - 4rem); overflow-y: auto; } }
@media (max-width: 1099px) {
  .toc { padding: var(--space-m) var(--space-l); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); margin-bottom: var(--space-l); }
  .toc ol { border-left: 0; }
  .toc__item a { padding-left: 0; border-left: 0; }
  .toc__item--3 a { padding-left: 1rem; }
}

.paper-card { margin-bottom: var(--space-xl); padding: var(--space-l); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--surface); }
.paper-card__label { display: inline-flex; align-items: center; gap: 0.4em; font-size: var(--step--2); color: var(--accent-ink); text-transform: uppercase; letter-spacing: 0.06em; }
.paper-card__title { margin-top: 0.4rem !important; font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); line-height: 1.3; }
.paper-card__title a { color: var(--fg); }
.paper-card__authors { margin-top: 0.3rem !important; color: var(--fg-2); font-size: var(--step--1); }
.paper-card__meta { margin-top: 0.3rem !important; color: var(--fg-3); font-size: var(--step--2); }

.tag-list { display: flex; flex-wrap: wrap; gap: 0.45rem; list-style: none; }
.share { display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.share__label { font-size: var(--step--2); color: var(--fg-3); margin-right: 0.5rem; text-transform: uppercase; letter-spacing: 0.06em; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-m); }
.post-nav__link { display: grid; gap: 0.35rem; padding: var(--space-m) var(--space-l); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; transition: border-color 0.2s; }
.post-nav__link:hover { border-color: var(--accent); }
.post-nav__link .mono { display: inline-flex; align-items: center; gap: 0.35em; font-size: var(--step--2); color: var(--fg-3); }
.post-nav__link > span:last-child { font-family: var(--font-display); font-weight: 700; line-height: 1.3; }
.post-nav__link--next { text-align: right; justify-items: end; }
@media (max-width: 560px) { .post-nav { grid-template-columns: 1fr; } .post-nav__link--next { text-align: left; justify-items: start; } }
.related__title { font-size: var(--step-2); margin-bottom: var(--space-m); }

/* ---------- prose ---------- */
.prose { font-size: clamp(1.05rem, 1rem + 0.25vw, 1.16rem); line-height: 1.75; color: var(--fg); min-width: 0; }
.prose > * + * { margin-top: 1.15em; }
.prose h2, .prose h3, .prose h4 { position: relative; scroll-margin-top: calc(var(--header-h) + 1.5rem); }
.prose h2 { font-size: var(--step-3); margin-top: 2.2em; letter-spacing: -0.028em; }
.prose h3 { font-size: var(--step-2); margin-top: 1.9em; }
.prose h4 { font-size: var(--step-1); margin-top: 1.6em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 0.7em; }
.h-anchor { margin-left: 0.35em; color: var(--fg-3); text-decoration: none; font-weight: 500; opacity: 0; transition: opacity 0.2s; }
h1:hover .h-anchor, h2:hover .h-anchor, h3:hover .h-anchor, h4:hover .h-anchor, .h-anchor:focus-visible { opacity: 1; }
.prose a { color: var(--accent-ink); text-decoration-color: color-mix(in srgb, var(--accent-ink) 45%, transparent); }
.prose a:hover { text-decoration-color: currentColor; }
.prose a.ext::after { content: "↗"; font-size: 0.72em; margin-left: 0.12em; vertical-align: 0.25em; text-decoration: none; display: inline-block; }
.prose strong { color: var(--fg); font-weight: 650; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li + li { margin-top: 0.45em; }
.prose li::marker { color: var(--accent-ink); }
.prose ol > li::marker { font-family: var(--font-mono); font-size: 0.9em; }
.prose blockquote { margin-inline: 0; padding: 0.2em 0 0.2em 1.2em; border-left: 3px solid var(--line-2); color: var(--fg-2); }
.prose hr { margin: 2.5em auto; width: 6rem; height: 4px; border-radius: 2px; background: repeating-linear-gradient(90deg, var(--line-2) 0 1.4rem, transparent 1.4rem 2.3rem); }
.prose img { border-radius: var(--radius); border: 1px solid var(--line); }
.prose .figure { margin: 1.8em 0; }
.prose figcaption { margin-top: 0.7em; text-align: center; font-family: var(--font-mono); font-size: var(--step--2); color: var(--fg-3); }
.prose code:not(pre code) {
  font-family: var(--font-mono); font-size: 0.86em; padding: 0.12em 0.38em; border-radius: 0.35em;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--fg);
  overflow-wrap: anywhere;
}
.prose kbd { font-family: var(--font-mono); font-size: 0.82em; padding: 0.1em 0.45em; border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 0.3em; background: var(--surface); }
.prose mark { background: var(--accent-soft); color: inherit; padding: 0 0.15em; border-radius: 0.2em; box-shadow: inset 0 -2px 0 var(--accent); }

.code-block { position: relative; margin-block: 1.6em; border: 1px solid var(--line); border-radius: var(--radius); background: var(--code-bg); overflow: hidden; }
.code-block::before { content: attr(data-lang); display: block; padding: 0.55rem 1rem; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: var(--step--2); color: var(--fg-3); letter-spacing: 0.04em; }
.code-block pre { margin: 0; padding: 1rem 1.1rem 1.1rem; overflow-x: auto; font-family: var(--font-mono); font-size: 0.86em; line-height: 1.65; tab-size: 4; }
.code-block code { font-family: inherit; background: none; border: 0; padding: 0; }
.copy-btn {
  position: absolute; top: 0.3rem; right: 0.4rem;
  display: inline-flex; align-items: center; gap: 0.35em; min-height: 1.9rem; padding: 0.2rem 0.6rem;
  border: 1px solid var(--line); border-radius: var(--radius-pill); background: var(--surface);
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--fg-3);
  transition: color 0.2s, border-color 0.2s;
}
.copy-btn:hover { color: var(--fg); border-color: var(--line-2); }
.copy-btn.is-done { color: var(--accent-ink); border-color: var(--accent); }

.table-wrap { overflow-x: auto; margin-block: 1.6em; border: 1px solid var(--line); border-radius: var(--radius); }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.92em; line-height: 1.5; }
.prose th, .prose td { padding: 0.65em 0.9em; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font-family: var(--font-mono); font-size: 0.82em; font-weight: 600; color: var(--fg-2); background: var(--surface); letter-spacing: 0.02em; }
.prose tr:last-child td { border-bottom: 0; }
.prose td { font-variant-numeric: tabular-nums; }

.math-display { overflow-x: auto; overflow-y: hidden; padding: 0.4em 0; margin-block: 1.4em; }
.katex { font-size: 1.08em; }

.callout { margin-block: 1.6em; padding: 1em 1.2em; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--radius); background: var(--accent-soft); }
.callout > * + * { margin-top: 0.6em; }
.callout__title { font-family: var(--font-mono); font-size: var(--step--2); text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent-ink); font-weight: 600; }
.callout--warning, .callout--caution { border-left-color: var(--danger-line); background: color-mix(in srgb, var(--danger-line) 8%, transparent); }
.callout--warning .callout__title, .callout--caution .callout__title { color: var(--danger); }
.callout--important { border-left-color: var(--t-M); background: color-mix(in srgb, var(--t-M) 8%, transparent); }
.callout--important .callout__title { color: var(--t-M); }

.footnotes { margin-top: 3em; padding-top: 1.2em; border-top: 1px solid var(--line); font-size: 0.88em; color: var(--fg-2); }
.footnotes ol { padding-left: 1.2em; }
[data-fn-ref] { font-family: var(--font-mono); font-size: 0.75em; text-decoration: none; padding: 0 0.15em; }

.embed { margin-block: 1.8em; }
.embed__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.embed__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.prose--compact { font-size: var(--step-0); }
.prose--compact > * + * { margin-top: 0.8em; }

/* syntax highlighting (dark) */
.hljs { color: #d6dde3; }
.hljs-comment, .hljs-quote { color: #6c7780; font-style: italic; }
.hljs-keyword, .hljs-selector-tag, .hljs-literal, .hljs-built_in { color: #45f1e8; }
.hljs-string, .hljs-regexp, .hljs-addition, .hljs-attribute { color: #a8e6a1; }
.hljs-number, .hljs-symbol, .hljs-bullet { color: #ffa24c; }
.hljs-title, .hljs-section, .hljs-title.function_ { color: #a99cff; }
.hljs-params, .hljs-variable, .hljs-template-variable { color: #e6e1cf; }
.hljs-type, .hljs-class .hljs-title, .hljs-title.class_ { color: #7cc4ff; }
.hljs-meta, .hljs-doctag { color: #f5d547; }
.hljs-deletion { color: #ff6b6b; }
.hljs-attr, .hljs-name, .hljs-tag { color: #7cc4ff; }
.hljs-emphasis { font-style: italic; } .hljs-strong { font-weight: 700; }
:root[data-theme="light"] .hljs { color: #24292f; }
:root[data-theme="light"] .hljs-comment, :root[data-theme="light"] .hljs-quote { color: #7a7466; }
:root[data-theme="light"] .hljs-keyword, :root[data-theme="light"] .hljs-selector-tag, :root[data-theme="light"] .hljs-literal, :root[data-theme="light"] .hljs-built_in { color: #00736c; }
:root[data-theme="light"] .hljs-string, :root[data-theme="light"] .hljs-regexp, :root[data-theme="light"] .hljs-addition, :root[data-theme="light"] .hljs-attribute { color: #2f7a1f; }
:root[data-theme="light"] .hljs-number, :root[data-theme="light"] .hljs-symbol, :root[data-theme="light"] .hljs-bullet { color: #b3540a; }
:root[data-theme="light"] .hljs-title, :root[data-theme="light"] .hljs-section, :root[data-theme="light"] .hljs-title.function_ { color: #5b43cf; }
:root[data-theme="light"] .hljs-params, :root[data-theme="light"] .hljs-variable, :root[data-theme="light"] .hljs-template-variable { color: #3d3a33; }
:root[data-theme="light"] .hljs-type, :root[data-theme="light"] .hljs-title.class_, :root[data-theme="light"] .hljs-attr, :root[data-theme="light"] .hljs-name, :root[data-theme="light"] .hljs-tag { color: #1f63a3; }
:root[data-theme="light"] .hljs-meta, :root[data-theme="light"] .hljs-doctag { color: #8a6d00; }
:root[data-theme="light"] .hljs-deletion { color: #b83a30; }

/* ---------- roadmap ---------- */
.track-legend { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: var(--space-m) var(--space-xl); margin-bottom: var(--space-2xl); }
.track-legend li { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; align-items: start; }
.track-legend__name { font-weight: 650; }
.track-legend p:not(.track-legend__name) { color: var(--fg-2); font-size: var(--step--1); margin-top: 0.15rem; }

.heat { margin: 0; }
.heat__scroll { overflow-x: auto; padding: var(--space-m); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.heat__grid { --cell: clamp(0.62rem, 0.45rem + 0.45vw, 0.95rem); display: grid; grid-template-columns: 5.2rem repeat(var(--cols), var(--cell)); gap: 3px; width: max-content; }
.heat__corner { grid-column: 1; }
.heat__col-label { font-family: var(--font-mono); font-size: 0.62rem; color: var(--fg-3); height: 1.1rem; white-space: nowrap; overflow: visible; }
.heat__row-label { font-size: 0.72rem; color: var(--fg-2); display: flex; align-items: center; height: var(--cell); padding-right: 0.5rem; }
.heat__cell { width: var(--cell); height: var(--cell); border-radius: 2px; background: color-mix(in srgb, var(--fg) 6%, transparent); }
.heat__cell.lvl-1 { background: color-mix(in srgb, var(--track-c) 55%, transparent); }
.heat__cell.lvl-2 { background: var(--track-c); box-shadow: 0 0 6px color-mix(in srgb, var(--track-c) 50%, transparent); }
.heat__cell.is-past { opacity: 0.55; }
.heat__cell.is-today { outline: 2px solid var(--fg); outline-offset: 1px; opacity: 1; }
.heat__cell--M { --track-c: var(--t-M); } .heat__cell--B { --track-c: var(--t-B); } .heat__cell--C { --track-c: var(--t-C); }
.heat__cell--R { --track-c: var(--t-R); } .heat__cell--L { --track-c: var(--t-L); } .heat__cell--X { --track-c: var(--t-X); }
.heat__cap { margin-top: var(--space-s); font-size: var(--step--2); color: var(--fg-3); max-width: 50rem; }

.phases { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: var(--space-m); counter-reset: phase; }
.phase { padding: var(--space-l); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); display: grid; gap: 0.5rem; align-content: start; }
.phase__n { font-size: var(--step--2); color: var(--accent-ink); }
.phase__title { font-size: var(--step-1); }
.phase p:last-child { color: var(--fg-2); font-size: var(--step--1); }

.week-tools { display: flex; gap: 0.5rem; }
.track-filter { margin-bottom: var(--space-l); }
.chip--track { gap: 0.5em; padding-left: 0.35em; font-size: var(--step--2); }
.chip--track .track { width: 1.25rem; height: 1.25rem; font-size: 0.62rem; margin: 0; }
.chip--track[aria-pressed="false"] { opacity: 0.45; }
.chip--track[aria-pressed="false"] .track { filter: grayscale(1); }

.weeks { display: grid; gap: 0.75rem; }
.week { border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); transition: border-color 0.2s; }
.week[open] { border-color: var(--line-2); }
.week--now { border-color: var(--accent) !important; box-shadow: 0 0 2rem -1.4rem var(--accent-glow); }
.week summary {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: var(--space-m);
  padding: var(--space-m) var(--space-l); cursor: pointer; list-style: none; border-radius: inherit;
}
.week summary::-webkit-details-marker { display: none; }
.week__n { display: grid; place-items: center; width: 3rem; height: 2.4rem; border: 1.5px solid var(--line-2); border-radius: 0.55rem; font-weight: 700; font-size: 0.85rem; background: var(--token-bg); }
.week--now .week__n { border-color: var(--accent); background: var(--accent-fill); }
.week--done .week__n { color: var(--fg-3); }
.week__main { display: grid; gap: 0.1rem; min-width: 0; }
.week__title { font-family: var(--font-display); font-weight: 750; font-size: var(--step-1); line-height: 1.3; }
.week__meta { font-size: var(--step--2); color: var(--fg-3); }
.week__status { font-size: var(--step--2); color: var(--fg-3); white-space: nowrap; }
.week--now .week__status { color: var(--accent-ink); }
.week__chev { width: 0.7rem; height: 0.7rem; border-right: 2px solid var(--fg-3); border-bottom: 2px solid var(--fg-3); transform: rotate(45deg) translateY(-2px); transition: transform 0.25s var(--ease); }
.week[open] .week__chev { transform: rotate(-135deg) translateY(-2px); }
.week__body { padding: 0 var(--space-l) var(--space-l); }
.days { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.day { display: grid; grid-template-columns: 6.5rem 1fr; gap: var(--space-m); padding-block: var(--space-m); border-bottom: 1px solid var(--line); }
.day:last-child { border-bottom: 0; }
.day.is-today { background: linear-gradient(90deg, var(--accent-soft), transparent 60%); margin-inline: calc(-1 * var(--space-l)); padding-inline: var(--space-l); border-radius: var(--radius-s); }
.day__date { font-size: var(--step--1); color: var(--fg-3); padding-top: 0.15rem; }
.day__date span { color: var(--fg-2); font-weight: 600; }
.day.is-today .day__date span { color: var(--accent-ink); }
.tasks { list-style: none; display: grid; gap: 0.55rem; }
.task { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; }
.task__text { color: var(--fg-2); line-height: 1.55; }
.task__text a { color: var(--accent-ink); }
.task__text a.ext::after { content: "↗"; font-size: 0.75em; margin-left: 0.1em; vertical-align: 0.2em; }
.task.is-hidden { display: none; }
.week__posts { margin-top: var(--space-m); padding: var(--space-m); border-radius: var(--radius); background: var(--bg-2); }
.week__posts .mono { font-size: var(--step--2); color: var(--fg-3); margin-bottom: 0.4rem; }
.week__posts ul { list-style: none; display: grid; gap: 0.3rem; }
.week__posts a { color: var(--accent-ink); display: inline-block; padding: 0.35rem 0; }
@media (max-width: 640px) {
  .week summary { grid-template-columns: auto 1fr auto; padding: var(--space-m); gap: 0.75rem; }
  .week__status { display: none; }
  .week__body { padding: 0 var(--space-m) var(--space-m); }
  .day { grid-template-columns: 1fr; gap: 0.45rem; }
  .day.is-today { margin-inline: calc(-1 * var(--space-m)); padding-inline: var(--space-m); }
}

.next-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: var(--space-m); }
.next-card { padding: var(--space-l); border: 1px dashed var(--line-2); border-radius: var(--radius-l); display: grid; gap: 0.6rem; align-content: start; }
.next-card__when { font-size: var(--step--2); color: var(--accent-ink); }
.next-card__title { font-size: var(--step-2); }
.next-card ul { padding-left: 1.1em; color: var(--fg-2); display: grid; gap: 0.4rem; }
.next-card li::marker { color: var(--accent-ink); }

.checkpoints { list-style: none; position: relative; display: grid; gap: var(--space-l); padding-left: 1.6rem; }
.checkpoints::before { content: ""; position: absolute; left: 0.4rem; top: 0.5rem; bottom: 0.5rem; width: 2px; background: linear-gradient(var(--accent), var(--line-2)); border-radius: 2px; }
.checkpoint { position: relative; display: grid; grid-template-columns: 11rem 1fr; gap: var(--space-m); }
.checkpoint::before { content: ""; position: absolute; left: -1.6rem; top: 0.35rem; width: 0.95rem; height: 0.95rem; border-radius: 50%; border: 2px solid var(--accent); background: var(--bg); box-shadow: 0 0 10px var(--accent-glow); }
.checkpoint__by { font-size: var(--step--1); color: var(--fg-3); padding-top: 0.1rem; }
.checkpoint__title { font-family: var(--font-display); font-weight: 800; font-size: var(--step-1); }
.checkpoint p:not(.checkpoint__title):not(.checkpoint__by) { color: var(--fg-2); margin-top: 0.2rem; }
@media (max-width: 640px) { .checkpoint { grid-template-columns: 1fr; gap: 0.2rem; } }

.principles { list-style: none; counter-reset: pr; display: grid; gap: 0; border-top: 1px solid var(--line); }
.principles li { counter-increment: pr; display: grid; grid-template-columns: 3rem 1fr; gap: var(--space-m); padding-block: var(--space-m); border-bottom: 1px solid var(--line); font-size: var(--step-1); line-height: 1.45; }
.principles li::before { content: "0" counter(pr); font-family: var(--font-mono); font-size: var(--step--1); color: var(--accent-ink); padding-top: 0.2rem; }

/* ---------- start here resources ---------- */
.prose--guide h2 { counter-increment: none; }
.resources { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 0.75rem; padding: 0 !important; margin-block: 1.4em 1.8em; }
.resources li + li { margin-top: 0 !important; }
.resource a {
  display: grid; gap: 0.35rem; height: 100%;
  padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--fg) !important; text-decoration: none;
  transition: border-color 0.2s, transform 0.2s var(--ease), background-color 0.2s;
}
.resource a:hover { border-color: var(--accent); transform: translateY(-2px); background: var(--surface-2); }
.resource__top { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.72rem; color: var(--fg-3); line-height: 1.4; }
.resource__tags { display: inline-flex; gap: 0.3rem; flex: none; }
.resource__tags .tag { padding: 0 0.4em; border: 1px solid var(--line-2); border-radius: 0.3rem; text-transform: capitalize; }
.resource__name { font-family: var(--font-display); font-weight: 750; font-size: 1.02rem; line-height: 1.3; letter-spacing: -0.01em; }
.resource__arrow { display: inline; vertical-align: -0.1em; color: var(--accent-ink); }
.resource__desc { font-size: 0.9rem; line-height: 1.5; color: var(--fg-2); }
@media (min-width: 1100px) { .page-guide .container--post { grid-template-columns: 14rem minmax(0, 48rem); } }

/* ---------- projects ---------- */
.projects { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.project { padding-block: clamp(2rem, 1.5rem + 2vw, 3rem); border-bottom: 1px solid var(--line); display: grid; gap: var(--space-m); scroll-margin-top: calc(var(--header-h) + 1rem); }
.project__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; font-size: var(--step--2); color: var(--fg-3); }
.project__meta .status { margin-left: auto; }
.project__title { font-size: var(--step-3); }
.project__q { font-size: var(--step-1); color: var(--fg); font-weight: 500; line-height: 1.5; padding-left: 1rem; border-left: 3px solid var(--accent); }
.project > p:not(.project__q):not(.project__meta) { color: var(--fg-2); }
.project__points { padding-left: 1.2em; display: grid; gap: 0.55rem; color: var(--fg-2); }
.project__points li::marker { color: var(--accent-ink); }
.project__note { display: grid; grid-template-columns: auto 1fr; gap: 0.6rem; padding: var(--space-m); border-radius: var(--radius); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); font-size: var(--step--1); color: var(--fg-2); }
.project__note .icon { color: var(--accent-ink); margin-top: 0.2rem; }
.stack { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.stack li { padding: 0.15em 0.6em; border: 1px solid var(--line-2); border-radius: 0.4rem; font-family: var(--font-mono); font-size: var(--step--2); color: var(--fg-2); }
.project__links { display: flex; flex-wrap: wrap; gap: var(--space-l); }

/* ---------- about ---------- */
.about { display: grid; gap: var(--space-2xl); }
@media (min-width: 960px) { .about { grid-template-columns: 18rem minmax(0, 1fr); gap: clamp(2.5rem, 2rem + 3vw, 5rem); align-items: start; } .about__side { position: sticky; top: calc(var(--header-h) + 2rem); } }
.about__card { display: grid; gap: 0.6rem; padding: var(--space-l); border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface); }
.about__avatar { width: 100%; max-width: 12rem; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-l); border: 1px solid var(--line-2); margin-bottom: var(--space-s); }
.about__name { font-family: var(--font-display); font-weight: 800; font-size: var(--step-2); letter-spacing: -0.02em; }
.about__role { color: var(--fg-2); }
.about__loc { font-size: var(--step--2); color: var(--fg-3); }
.about__buttons { display: grid; gap: 0.5rem; margin-top: var(--space-s); }
.socials--about { margin-top: 0.25rem; }
.about__main { max-width: var(--prose); }
.about__main > .prose p:first-child { font-size: var(--step-2); line-height: 1.45; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em; }
.about__section { margin-top: var(--space-2xl); }
.about__h { font-size: var(--step-2); margin-bottom: var(--space-m); display: flex; align-items: baseline; flex-wrap: wrap; gap: 0.2rem 0.8rem; }
.about__h--sub { margin-top: var(--space-xl); }
.about__updated { font-size: var(--step--2); color: var(--fg-3); font-weight: 400; letter-spacing: 0; }
.about__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 0 var(--space-xl); }
.about__main .about__section > p { color: var(--fg-2); }
.about__main .about__section > p a { color: var(--accent-ink); }
.timeline { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.timeline__item { display: grid; grid-template-columns: 5.5rem 1fr; gap: var(--space-m); padding-block: 0.9rem; border-bottom: 1px solid var(--line); }
.timeline__when { font-size: var(--step--1); color: var(--fg-3); padding-top: 0.1rem; }
.timeline__role { font-weight: 600; }
.timeline__role a { color: var(--accent-ink); }
.timeline__org { font-weight: 400; color: var(--fg-2); }
.timeline__note { color: var(--fg-3); font-size: var(--step--1); margin-top: 0.15rem; }
.facts { list-style: none; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts li { display: grid; gap: 0.1rem; padding-block: 0.7rem; border-bottom: 1px solid var(--line); }
.facts__meta { font-size: var(--step--2); color: var(--fg-3); }

/* ---------- now ---------- */
.now-today { margin-top: var(--space-2xl); }

/* ---------- links page ---------- */
.links-page { padding-block: clamp(2rem, 1.5rem + 3vw, 4rem) var(--section-y); text-align: center; }
.links-page__avatar { width: 6.5rem; height: 6.5rem; border-radius: 50%; margin: 0 auto var(--space-l); border: 2px solid var(--line-2); box-shadow: 0 0 2rem -0.8rem var(--accent-glow); object-fit: cover; }
.links-page__title { display: flex; justify-content: center; }
.links-page__sub { margin-top: var(--space-m); color: var(--fg-2); }
.links-page__status { margin-top: var(--space-s); font-size: var(--step--1); color: var(--fg-3); display: inline-flex; align-items: center; gap: 0.5em; }
.link-buttons { list-style: none; display: grid; gap: 0.7rem; margin-top: var(--space-xl); text-align: left; }
.link-btn {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 0.9rem;
  min-height: 3.8rem; padding: 0.7rem 1rem; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: var(--surface); text-decoration: none;
  transition: border-color 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.link-btn:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 1rem 2rem -1.5rem var(--accent-glow); }
.link-btn--primary { border-color: var(--accent); background: var(--accent-fill); }
.link-btn--primary .link-btn__sub { color: var(--fg-2); }
.post-list h2.post-item__title { font-size: var(--step-2); }
.link-btn__icon { display: grid; place-items: center; width: 2.3rem; height: 2.3rem; border-radius: 0.6rem; border: 1px solid var(--line-2); background: var(--token-bg); color: var(--accent-ink); }
.link-btn__text { display: grid; min-width: 0; }
.link-btn__label { font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.link-btn__sub { font-size: var(--step--2); color: var(--fg-3); font-family: var(--font-mono); }
.link-btn__arrow { color: var(--fg-3); }

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(2.5rem, 2rem + 5vw, 6rem) var(--section-y); }
.notfound .lm-404 { margin-bottom: var(--space-2xl); }
.notfound .lm { --lm-size: min(3rem, calc((100vw - 2 * var(--gutter)) / 9.7)); justify-items: start; }
.notfound__title { font-size: var(--step-4); max-width: 22ch; }
.notfound .hero__cta { justify-content: flex-start; margin-top: var(--space-l); }

/* ---------- footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--line); padding-block: var(--space-2xl) var(--space-xl); background: var(--bg-2); }
.site-footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: var(--space-xl); }
.site-footer__brand p { color: var(--fg-2); margin-top: var(--space-m); max-width: 28rem; font-size: var(--step--1); }
.site-footer__journey { display: inline-flex !important; align-items: center; gap: 0.5em; color: var(--fg-3) !important; font-size: var(--step--2) !important; }
.site-footer__heading { font-family: var(--font-mono); font-size: var(--step--2); text-transform: uppercase; letter-spacing: 0.08em; color: var(--fg-3); margin-bottom: 0.6rem; }
.site-footer nav ul { list-style: none; display: grid; gap: 0; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 2.3rem; color: var(--fg-2); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent-ink); }
.site-footer__meta { margin-top: var(--space-2xl); padding-top: var(--space-l); border-top: 1px solid var(--line); font-size: var(--step--2); color: var(--fg-3); font-family: var(--font-mono); }
@media (max-width: 760px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }

/* ---------- motion + print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .lm__cursor { animation: none; }
}
@media print {
  .site-header, .site-footer, .skip-link, .lm__resample, .share, .follow-cta, .post-nav, .toc, .copy-btn, .filter-bar { display: none !important; }
  :root { --bg: #fff; --fg: #111; --fg-2: #333; --fg-3: #555; --surface: #fff; --line: #ccc; }
  body { background: #fff; color: #111; }
  .prose a.ext::after { content: " (" attr(href) ")"; font-size: 0.8em; }
  .code-block { border-color: #ccc; }
}

/* split section: heading left, content right (wide screens) */
.split { display: grid; gap: var(--space-l); }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(14rem, 20rem) minmax(0, 1fr); gap: clamp(2rem, 1rem + 4vw, 5rem); align-items: start; }
  .split > .section-head { position: sticky; top: calc(var(--header-h) + 2rem); margin-bottom: 0; }
}
.split .section-head .link-arrow { margin-top: var(--space-l); }
