:root,
[data-theme="light"] {
  --paper: #f4f5f7;
  --paper-2: #eceef1;
  --paper-blur: rgba(244, 245, 247, 0.92);
  --ink: #0f0f0f;
  --ink-2: #2d2f33;
  --ink-mute: #686c72;
  --rule: rgba(15, 15, 15, 0.1);
  --rule-2: rgba(15, 15, 15, 0.17);
  --hover-bg: rgba(15, 15, 15, 0.028);
  --ink-red: #b42e2e;
  --ink-blue: #1e3f85;
  --note-blue-bg: rgba(30, 63, 133, 0.08);
  --note-blue-rule: rgba(30, 63, 133, 0.2);
  --note-red-bg: rgba(180, 46, 46, 0.08);
  --note-red-rule: rgba(180, 46, 46, 0.2);
}

[data-theme="dark"] {
  --paper: #121418;
  --paper-2: #1a1d22;
  --paper-blur: rgba(18, 20, 24, 0.9);
  --ink: #eceef1;
  --ink-2: #d4d8de;
  --ink-mute: #98a0aa;
  --rule: rgba(237, 235, 229, 0.12);
  --rule-2: rgba(237, 235, 229, 0.22);
  --hover-bg: rgba(237, 235, 229, 0.05);
  --ink-red: #e67878;
  --ink-blue: #8caeff;
  --note-blue-bg: rgba(140, 174, 255, 0.14);
  --note-blue-rule: rgba(140, 174, 255, 0.28);
  --note-red-bg: rgba(230, 120, 120, 0.14);
  --note-red-rule: rgba(230, 120, 120, 0.28);
}

:root {
  --sans: Arial, "Helvetica Neue", Helvetica, sans-serif;
  --mono: Consolas, "Courier New", monospace;
  --ui: Calibri, "Segoe UI", Arial, sans-serif;
  --hand: "Caveat", cursive;

  --t-body: 17px;
  --t-h3: 20px;
  --t-h2: 22px;
  --t-h1: 26px;
  --t-meta: 12px;

  --frame-max: 1280px;
  --frame-pad: 34px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11", "calt";
  transition: background 0.25s ease, color 0.25s ease;
}

::selection {
  background: var(--ink);
  color: var(--paper);
}

.doc-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--paper-blur);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.doc-wrap {
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: 14px var(--frame-pad);
  display: flex;
  align-items: center;
  gap: 24px;
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--ink-2);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.02em;
  line-height: 1;
}

.brand .wm {
  color: var(--ink);
}

.brand .wm.tld {
  color: var(--ink-mute);
  font-weight: 400;
}

.brand .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--ink);
  transform: rotate(45deg);
  margin: 0 6px;
  vertical-align: middle;
  transition: transform 0.25s ease, background 0.25s ease;
}

.brand:hover .dot {
  transform: rotate(135deg);
}

nav.sections {
  margin-left: auto;
  display: flex;
  gap: 22px;
}

nav.sections a {
  color: var(--ink-2);
  text-decoration: none;
}

nav.sections a:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/*
 * Unified dropdown for notes-mode, language, and theme.
 * One component, three uses. Replaces older .pill + .lang markup.
 */
.menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.menu-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  background: transparent;
  color: var(--ink-2);
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  letter-spacing: 0.04em;
  cursor: pointer;
  height: 28px;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.menu-btn:hover,
.menu-btn:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  outline: none;
}

.menu-btn[aria-expanded="true"] {
  border-color: var(--ink);
  color: var(--ink);
}

.menu-btn__label {
  line-height: 1;
  white-space: nowrap;
}

.menu-btn .caret {
  font-size: 8px;
  opacity: 0.55;
  transition: transform 0.18s ease;
}

.menu-btn[aria-expanded="true"] .caret {
  transform: rotate(180deg);
}

.menu-list {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 168px;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 40;
}

.menu.is-open .menu-list {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.menu-item {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  width: 100%;
  background: transparent;
  border: 0;
  color: var(--ink-2);
  text-decoration: none;
  border-radius: 6px;
  font: inherit;
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.menu-item + .menu-item {
  margin-top: 2px;
}

.menu-item:hover,
.menu-item:focus-visible {
  background: var(--hover-bg);
  color: var(--ink);
  outline: none;
}

.menu-item.is-active {
  color: var(--ink);
}

.menu-item.is-active::after {
  content: "\2022";
  margin-left: auto;
  color: var(--ink);
  font-size: 10px;
}

/* "Coming soon" languages: visible in the list but non-navigational */
.menu-item[data-soon] {
  color: var(--ink-mute);
  cursor: default;
}

.menu-item[data-soon]::after {
  content: "soon";
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-mute);
  opacity: 0.7;
}

.menu-item[data-soon]:hover {
  background: transparent;
  color: var(--ink-mute);
}

.menu-item__icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke: currentColor;
}

/* Theme glyph: three SVGs stacked, only the one matching current mode shows */
.theme-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  position: relative;
}

.theme-glyph .glyph {
  width: 15px;
  height: 15px;
  display: none;
}

[data-theme-mode="light"] .theme-glyph .glyph--light,
[data-theme-mode="dark"] .theme-glyph .glyph--dark,
[data-theme-mode="auto"] .theme-glyph .glyph--auto {
  display: inline-block;
}

/* Burger button: hidden on desktop, shown on narrow widths */
.burger {
  display: none;
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  padding: 0;
  width: 34px;
  height: 28px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  cursor: pointer;
  color: var(--ink-2);
  transition: border-color 0.15s ease, color 0.15s ease;
}

.burger:hover,
.burger:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  outline: none;
}

.burger__line {
  display: block;
  width: 14px;
  height: 1.4px;
  background: currentColor;
  border-radius: 999px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.burger[aria-expanded="true"] .burger__line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}

.burger[aria-expanded="true"] .burger__line:nth-child(2) {
  opacity: 0;
}

.burger[aria-expanded="true"] .burger__line:nth-child(3) {
  transform: translateY(-5px) rotate(-45deg);
}

/* Mobile nav drawer — slides down from header when burger is open */
.mobile-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper-blur);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule);
  padding: 8px var(--frame-pad) 14px;
  transform: translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 20;
}

.mobile-nav[data-open="true"] {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav__sections {
  display: flex;
  flex-direction: column;
}

.mobile-nav__sections a {
  padding: 12px 2px;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--ui);
  font-size: 14px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid var(--rule);
  transition: color 0.15s ease, padding 0.15s ease;
}

.mobile-nav__sections a:last-child {
  border-bottom: 0;
}

.mobile-nav__sections a:hover {
  color: var(--ink-blue);
  padding-left: 6px;
}

main {
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: 0 var(--frame-pad);
}

section.page {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  column-gap: 58px;
  padding: 72px 0 104px;
}

section.page + section.page {
  border-top: 1px solid var(--rule);
}

aside.margin {
  position: relative;
  z-index: 1;
}

.col {
  z-index: 1;
}

.version {
  position: absolute;
  top: 18px;
  right: 4px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  opacity: 0.6;
  user-select: none;
}

.eyebrow {
  font-family: var(--ui);
  font-size: var(--t-meta);
  letter-spacing: 0.04em;
  color: var(--ink-mute);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 40px;
}

.eyebrow .num {
  color: var(--ink);
  font-weight: 500;
}

.eyebrow .rule {
  flex: 0 0 56px;
  height: 1px;
  background: var(--rule-2);
}

.eyebrow .caption {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.h1 {
  font-family: var(--ui);
  font-weight: 700;
  font-size: var(--t-h1);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 22px;
  max-width: 20ch;
}

.col {
  max-width: 860px;
}

.body p {
  margin: 0 0 1em;
  color: var(--ink-2);
  max-width: 72ch;
}

.body em {
  font-style: italic;
  color: var(--ink);
}

.body strong {
  font-weight: 500;
  color: var(--ink);
}

.stamp {
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-family: var(--ui);
  font-size: 11.5px;
  letter-spacing: 0.03em;
  color: var(--ink-mute);
}

.stamp span {
  position: relative;
}

.stamp span + span::before {
  content: "\00B7";
  position: absolute;
  left: -14px;
  top: 0;
}

aside.margin {
  padding-top: 64px;
  border-left: 1px solid var(--rule);
  padding-left: 24px;
}

.note {
  --note-rot: 0deg;
  --note-bg: transparent;
  --note-rule: transparent;
  font-family: var(--ui);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.28;
  max-width: 240px;
  color: var(--ink);
  padding: 10px 12px;
  border-radius: 14px;
  transform-origin: top left;
  transform: translateY(0) rotate(var(--note-rot));
  transition:
    opacity 0.22s ease,
    transform 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease,
    filter 0.22s ease;
}

.note + .note {
  margin-top: 16px;
}

.note .label {
  display: block;
  font-family: var(--ui);
  font-weight: 700;
  font-size: 10px;
  color: var(--ink-mute);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.note .label::before {
  content: "-- ";
}

.note.blue {
  color: var(--ink-blue);
  --note-bg: var(--note-blue-bg);
  --note-rule: var(--note-blue-rule);
}

.note.red {
  color: var(--ink-red);
  --note-bg: var(--note-red-bg);
  --note-rule: var(--note-red-rule);
}

.note.t1 {
  --note-rot: -1.2deg;
}

.note.t2 {
  --note-rot: 0.8deg;
}

.note.t3 {
  --note-rot: -1.6deg;
}

.note.t4 {
  --note-rot: 0.4deg;
}

.note.t5 {
  --note-rot: -0.8deg;
}

.annotation-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
  --connector-color: var(--ink-blue);
}

.annotation-layer path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.76;
}

.annotation-layer .tip {
  stroke-width: 1.15;
}

.annotation {
  --accent: var(--ink-blue);
  /* No position: relative — pop-notes are DOM-nested inside annotation but
     must anchor to section.page on desktop (absolute positioning). */
  display: inline;
  cursor: help;
  color: var(--ink);
  outline: none;
  border-bottom: 1px dashed var(--ink-mute);
  padding-bottom: 1px;
  transition: border-color 0.18s ease;
}

.annotation--blue {
  --accent: var(--ink-blue);
}

.annotation--red {
  --accent: var(--ink-red);
}

.annotation__word {
  position: relative;
  display: inline-block;
  z-index: 1;
}

.annotation sup {
  font-family: var(--ui);
  font-size: 10px;
  color: var(--ink-mute);
  margin-left: 2px;
  line-height: 0;
  position: relative;
  top: -0.38em;
  transition: color 0.18s ease;
}

.annotation--ring .annotation__word::after,
.annotation--ring .annotation__word::before,
.annotation--underline .annotation__word::after {
  content: "";
  position: absolute;
  pointer-events: none;
  transition:
    opacity 0.18s ease,
    transform 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.annotation--ring .annotation__word::before,
.annotation--ring .annotation__word::after {
  inset: -0.26em -0.36em -0.18em;
  border: 1.6px solid var(--accent);
  border-radius: 999px;
  opacity: 0;
}

.annotation--ring .annotation__word::before {
  inset: -0.31em -0.32em -0.12em;
  border-width: 1.15px;
  transform: rotate(2.4deg) scale(0.97);
}

.annotation--ring .annotation__word::after {
  transform: rotate(-3.6deg) scale(0.94);
}

.annotation--underline .annotation__word::after {
  left: -0.08em;
  right: -0.08em;
  bottom: -0.11em;
  height: 0.12em;
  background: var(--accent);
  border-radius: 999px;
  opacity: 0;
  transform: rotate(0.9deg) scaleX(0.88);
  transform-origin: left center;
}

.annotation.is-active sup,
.annotation:focus-visible sup {
  color: var(--accent);
}

.annotation.is-active,
.annotation:focus-visible,
body.notes-always .annotation {
  border-bottom-color: var(--ink);
}

.annotation--ring.is-active .annotation__word::before,
.annotation--ring:focus-visible .annotation__word::before,
.annotation.is-active .annotation__word::after,
.annotation:focus-visible .annotation__word::after {
  opacity: 0.95;
}

.annotation--ring.is-active .annotation__word::before,
.annotation--ring:focus-visible .annotation__word::before {
  transform: rotate(2.8deg) scale(1);
}

.annotation--ring.is-active .annotation__word::after,
.annotation--ring:focus-visible .annotation__word::after {
  transform: rotate(-4.2deg) scale(1);
}

.annotation--underline.is-active .annotation__word::after,
.annotation--underline:focus-visible .annotation__word::after,
body.notes-always .annotation--underline .annotation__word::after {
  transform: rotate(0.4deg) scaleX(1);
}

body.notes-always .annotation--ring .annotation__word::before,
body.notes-always .annotation--ring .annotation__word::after,
body.notes-always .annotation--underline .annotation__word::after {
  opacity: 0.95;
}

body.notes-always .annotation--ring .annotation__word::before {
  transform: rotate(2.8deg) scale(1);
}

body.notes-always .annotation--ring .annotation__word::after {
  transform: rotate(-4.2deg) scale(1);
}

@media (hover: hover) {
  .annotation:hover sup {
    color: var(--accent);
  }

  .annotation:hover {
    border-bottom-color: var(--ink);
  }

  .annotation--ring:hover .annotation__word::before,
  .annotation:hover .annotation__word::after {
    opacity: 0.95;
  }

  .annotation--ring:hover .annotation__word::before {
    transform: rotate(2.8deg) scale(1);
  }

  .annotation--ring:hover .annotation__word::after {
    transform: rotate(-4.2deg) scale(1);
  }

  .annotation--underline:hover .annotation__word::after {
    transform: rotate(0.4deg) scaleX(1);
  }
}

.pop-note {
  --pop-rot: 0deg;
  position: absolute;
  width: 168px;
  padding: 0;
  font-family: var(--hand);
  font-weight: 500;
  font-size: 21px;
  line-height: 1.18;
  color: var(--ink);
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transform: translateY(8px) rotate(var(--pop-rot));
  transform-origin: top left;
  transition:
    opacity 0.2s ease,
    transform 0.2s ease,
    visibility 0.2s linear;
}

.pop-note.red {
  color: var(--ink-red);
}

.pop-note.blue {
  color: var(--ink-blue);
}

.pop-note--mobile {
  display: none !important;
}

.pop-note .label {
  display: block;
  font-size: 14px;
  line-height: 1;
  opacity: 0.56;
  margin-bottom: 3px;
}

.pop-note .label::before {
  content: "-- ";
}

.pop-note.is-active,
body.notes-always .pop-note {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) rotate(var(--pop-rot));
}

/* ---------- Hero hover-note positions (side-selection rule) ---------- */
/* Per DESIGN-SYSTEM.md: the pop-note sits on the same gutter as its anchor word. */

#hero .pop-note.n1 {
  /* anchor: "spin-out" — first paragraph, near end → right gutter */
  top: 82px;
  right: -200px;
  --pop-rot: -2.3deg;
}

#hero .pop-note.n2 {
  /* anchor: "AI-assisted execution" — second paragraph, early → left gutter */
  top: 168px;
  left: -220px;
  --pop-rot: 1.6deg;
}

#hero .pop-note.n3 {
  /* anchor: "unicorns" — second paragraph, right side → right gutter */
  top: 296px;
  right: -150px;
  --pop-rot: -1.8deg;
}

#hero .pop-note.n4 {
  /* anchor: "off-switch" — second paragraph, left side → left gutter */
  top: 372px;
  left: -222px;
  --pop-rot: 2.1deg;
}

/* Alias so the JS query for .page__connectors picks up the same overlay
   that .annotation-layer styles already target. */
.page__connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
  z-index: 0;
}

.page__connectors path {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.76;
}

.page__connectors .tip {
  stroke-width: 1.15;
}

/* ---------- Link list (Essay / Manifesto) ---------- */
/* Matches old.html: a plain table-style list with top/bottom rules,
   left meta column, and a hover shift — not bordered cards. */

.links {
  margin-top: 40px;
  border-top: 1px solid var(--rule);
}

.links a {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  align-items: baseline;
  gap: 16px;
  padding: 16px 2px;
  border-bottom: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: background 0.15s ease, padding 0.15s ease;
}

.links a:hover {
  background: var(--hover-bg);
  padding-left: 8px;
}

.links a:focus-visible {
  outline: 2px solid var(--ink-blue);
  outline-offset: 3px;
}

.links .l-tag {
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.links .l-title {
  font-family: var(--sans);
  font-weight: 500;
  font-size: var(--t-h3);
  line-height: 1.3;
  color: var(--ink);
}

.links .l-arrow {
  font-family: var(--mono);
  color: var(--ink-mute);
  transition: transform 0.15s ease, color 0.15s ease;
}

.links a:hover .l-arrow {
  transform: translateX(4px);
  color: var(--ink);
}
/* ---------- Responsive / mobile ---------- */
/* Breakpoint ladder mirrors old.html:
 *   ≤1020px — collapse header nav into burger, hide aside gutter
 *   ≤900px  — stack section grid, margin notes go below body
 *   ≤768px  — hover pop-notes become inline blocks, hidden until tapped
 */

@media (max-width: 1020px) {
  nav.sections {
    display: none;
  }

  .controls {
    margin-left: auto;
  }

  .burger {
    display: inline-flex;
  }

  .doc-wrap {
    gap: 14px;
  }
}

@media (max-width: 900px) {
  section.page {
    grid-template-columns: 1fr;
    column-gap: 0;
    row-gap: 32px;
    padding: 48px 0 80px;
  }

  aside.margin {
    border-left: none;
    border-top: 1px solid var(--rule);
    padding: 24px 0 0;
  }

  .page__connectors,
  .annotation-layer {
    display: none;
  }

  /* Hero pop-notes reset: no longer absolute gutter floaters — flow inline */
  #hero .pop-note.n1,
  #hero .pop-note.n2,
  #hero .pop-note.n3,
  #hero .pop-note.n4 {
    position: static;
    width: auto;
    max-width: 100%;
    top: auto;
    left: auto;
    right: auto;
    --pop-rot: 0deg;
  }
}

@media (hover: none), (max-width: 768px) {
  /* Pops stay collapsed in hover mode; tap (annotation click) reveals,
   * Always-mode renders them all inline permanently. */
  #hero .pop-note {
    position: static;
    display: none;
    visibility: visible;
    opacity: 0;
    width: auto;
    max-width: 100%;
    margin: 6px 0 6px 16px;
    padding: 4px 0 4px 12px;
    border-left: 2px solid currentColor;
    font-size: 19px;
    line-height: 1.25;
    transform: none !important;
  }

  #hero .pop-note.is-active,
  body.notes-always #hero .pop-note {
    display: block;
    opacity: 1;
    transform: none !important;
  }

  /* Make annotations look tappable on touch devices */
  .annotation {
    cursor: pointer;
  }

  .doc-wrap {
    padding-left: 16px;
    padding-right: 16px;
    gap: 10px;
  }

  .controls {
    gap: 6px;
  }

  .menu-btn {
    padding: 5px 9px;
  }

  .stamp {
    font-size: 11px;
    gap: 6px 10px;
  }

  h1.h1,
  h2.h1 {
    font-size: 32px;
    line-height: 1.1;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .menu[data-menu="theme"] .caret,
  .menu[data-menu="notes"] .caret {
    display: none;
  }

  .menu-btn {
    padding: 5px 8px;
  }

  h1.h1,
  h2.h1 {
    font-size: 28px;
  }

  .page {
    padding-left: 16px;
    padding-right: 16px;
  }
}

@media (max-width: 380px) {
  .brand .tld {
    display: none;
  }

  .menu-list {
    min-width: 150px;
  }
}

/* ---------- Projects (section 03) ---------- */
/* Tabbed portfolio: four categories (In the studio / Spun out / Exits / Fails)
   switched via radio+label sibling selectors — zero JS. Each project card
   shows a monogram mark, name, niche tag, short pitch, and a stage pill.
   No surrogate A-01/S-01 codes per Alex's feedback 2026-04-22. */

.project-tabs {
  margin-top: 28px;
}

.project-tabs input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.project-tabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 18px;
}

.project-tabs__nav label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 12px;
  margin-bottom: -1px;
  font-family: var(--ui);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-mute);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.project-tabs__nav label:hover {
  color: var(--ink);
}

.project-tabs__nav label .tab-count {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--ink-mute);
  opacity: 0.7;
  padding: 1px 6px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
}

/* Keyboard focus on hidden radio bubbles up via label */
.project-tabs input:focus-visible + .project-tabs__nav label {
  outline: 2px solid var(--ink-blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Active tab (underline + darkened text) via :checked + for= pairing */
#ptab-studio:checked ~ .project-tabs__nav label[for="ptab-studio"],
#ptab-spinout:checked ~ .project-tabs__nav label[for="ptab-spinout"],
#ptab-exit:checked ~ .project-tabs__nav label[for="ptab-exit"],
#ptab-fail:checked ~ .project-tabs__nav label[for="ptab-fail"] {
  color: var(--ink);
  border-bottom-color: var(--ink);
}

#ptab-studio:checked ~ .project-tabs__nav label[for="ptab-studio"] .tab-count,
#ptab-spinout:checked ~ .project-tabs__nav label[for="ptab-spinout"] .tab-count,
#ptab-exit:checked ~ .project-tabs__nav label[for="ptab-exit"] .tab-count,
#ptab-fail:checked ~ .project-tabs__nav label[for="ptab-fail"] .tab-count {
  color: var(--ink);
  opacity: 1;
  border-color: var(--ink);
}

/* Panels default hidden; only the one matching the checked radio is shown */
.project-tabs__panel {
  display: none;
}

#ptab-studio:checked ~ .project-tabs__panels .project-tabs__panel[data-ptab="studio"],
#ptab-spinout:checked ~ .project-tabs__panels .project-tabs__panel[data-ptab="spinout"],
#ptab-exit:checked ~ .project-tabs__panels .project-tabs__panel[data-ptab="exit"],
#ptab-fail:checked ~ .project-tabs__panels .project-tabs__panel[data-ptab="fail"] {
  display: block;
}

/* --- Project list --- */

.projects {
  border-top: 1px solid var(--rule);
}

.project {
  /* Asymmetric padding so hover can shift content uniformly right:
     padding-left grows by +6, padding-right shrinks by -6 → the whole
     row (including the right-justified stage pill) moves 6px right. */
  padding: 22px 8px 24px 2px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: 44px minmax(160px, 1fr) minmax(0, 1.35fr) auto;
  column-gap: 22px;
  align-items: start;
  transition: background 0.15s ease, padding 0.15s ease;
}

.project:hover {
  background: var(--hover-bg);
  padding-left: 8px;
  padding-right: 2px;
}

.project__mark {
  width: 40px;
  height: 40px;
  border: 1.3px solid var(--rule-2);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
  background: var(--paper);
  margin-top: 2px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.project__mark::before {
  content: attr(data-mark);
}

.project:hover .project__mark {
  border-color: var(--ink);
}

.project__heading {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.project__title {
  margin: 0;
  font-family: var(--ui);
  font-weight: 600;
  font-size: var(--t-h3);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.project__niche {
  display: block;
  font-family: var(--ui);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.project__pitch {
  margin: 0;
  padding-top: 6px;
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.5;
  max-width: 52ch;
}

.project__stage {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--rule-2);
  font-family: var(--ui);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  white-space: nowrap;
  justify-self: end;
  margin-top: 10px;
}

.project__stage--blue {
  color: var(--ink-blue);
  border-color: var(--note-blue-rule);
  background: var(--note-blue-bg);
}

.project__stage--red {
  color: var(--ink-red);
  border-color: var(--note-red-rule);
  background: var(--note-red-bg);
}

.project__stage--mute {
  color: var(--ink-mute);
}

/* Fails panel: de-saturate text as a gentle visual cue that these didn't work */
.project-tabs__panel[data-ptab="fail"] .project__title {
  color: var(--ink-2);
}

.project-tabs__panel[data-ptab="fail"] .project__pitch {
  color: var(--ink-mute);
}

/* ---------- Invest section (04) — full-bleed inverted plate ---------- */
/* This block breaks out of the standard section.page grid so it stands out
   from every other section. No aside. Full-width within main, inverted bg
   via var(--ink) / var(--paper) — auto-flips across themes. Bigger type. */

section.page.page--invest {
  display: block;
  background: var(--ink);
  color: var(--paper);
  margin-left: calc(-1 * var(--frame-pad));
  margin-right: calc(-1 * var(--frame-pad));
  padding: 112px var(--frame-pad) 120px;
  border-top: 0;
  /* Local invert tokens, lightened/darkened against the plate */
  --invert-mute: rgba(244, 245, 247, 0.58);
  --invert-rule: rgba(244, 245, 247, 0.16);
  --invert-hover: rgba(244, 245, 247, 0.08);
}

[data-theme="dark"] section.page.page--invest {
  --invert-mute: rgba(15, 15, 15, 0.58);
  --invert-rule: rgba(15, 15, 15, 0.14);
  --invert-hover: rgba(15, 15, 15, 0.06);
}

section.page.page--invest + section.page {
  border-top: 0;
}

.invest {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
}

.invest .version {
  color: var(--invert-mute);
  opacity: 0.8;
}

.invest__eyebrow {
  font-family: var(--ui);
  font-size: var(--t-meta);
  letter-spacing: 0.04em;
  color: var(--invert-mute);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 32px;
}

.invest__eyebrow .num {
  color: var(--paper);
  font-weight: 500;
}

.invest__eyebrow .rule {
  flex: 0 0 56px;
  height: 1px;
  background: var(--invert-rule);
}

.invest__eyebrow .caption {
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Headline uses the same .h1 token as the rest of the site for consistency */
.invest .h1 {
  color: var(--paper);
  margin-bottom: 22px;
  max-width: 22ch;
}

.invest__lede {
  margin: 0 0 36px;
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.5;
  color: var(--paper);
  opacity: 0.82;
  max-width: 60ch;
}

.invest__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 999px;
  font-family: var(--ui);
  font-size: 13.5px;
  letter-spacing: 0.03em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease,
    border-color 0.18s ease, transform 0.15s ease;
}

.btn__arrow {
  font-family: var(--mono);
  transition: transform 0.18s ease;
}

.btn:hover .btn__arrow {
  transform: translateX(4px);
}

/* Buttons on the invert plate: light fill primary, outlined ghost */
.page--invest .btn--primary {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid var(--paper);
}

.page--invest .btn--primary:hover {
  background: transparent;
  color: var(--paper);
}

.page--invest .btn--ghost {
  background: transparent;
  color: var(--paper);
  border: 1px solid var(--invert-rule);
}

.page--invest .btn--ghost:hover {
  border-color: var(--paper);
  background: var(--invert-hover);
}

.invest__direct {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--t-body);
  color: var(--invert-mute);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
}

.invest__direct a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid var(--invert-rule);
  padding-bottom: 1px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.invest__direct a:hover {
  border-color: var(--paper);
}

.invest__direct .sep {
  opacity: 0.4;
}

/* ---------- Invest plate: left-aligned overrides (matches main.html) ---------- */
/* main.html now puts invest content inside .col.body (no .invest wrapper) so it
   aligns left with every other section. Only color overrides needed for the
   dark plate; layout comes from the standard .col.body + .links patterns. */

.page--invest .version {
  color: var(--invert-mute);
  opacity: 0.8;
  /* Section is full-bleed (extends under main's 34px horizontal padding) but
     version should align with the right edge of main's content area — same
     visual rail as every other section's version. */
  right: calc(var(--frame-pad) + 4px);
}

.page--invest .h1 {
  max-width: 22ch;
}

.page--invest .invest__lede {
  max-width: 60ch;
  margin-bottom: 40px;
  /* Match regular body text styling — pure paper (no opacity dim). */
  color: var(--paper);
  opacity: 1;
}

/* .links on the dark plate — recolor rules, text and arrow to the invert tokens */
.page--invest .links {
  margin-top: 12px;
  border-top-color: var(--invert-rule);
}

.page--invest .links a {
  color: var(--paper);
  border-bottom-color: var(--invert-rule);
}

.page--invest .links a:hover {
  background: var(--invert-hover);
}

.page--invest .links .l-tag {
  color: var(--invert-mute);
}

.page--invest .links .l-title {
  color: var(--paper);
}

.page--invest .links .l-arrow {
  color: var(--invert-mute);
}

.page--invest .links a:hover .l-arrow {
  color: var(--paper);
}

/* ---------- All-essays link (writing section CTA) ---------- */

.all-essays {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  padding: 8px 0;
  font-family: var(--ui);
  font-size: 13.5px;
  letter-spacing: 0.04em;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: gap 0.15s ease, color 0.15s ease;
}

.all-essays:hover {
  gap: 14px;
  color: var(--ink-blue);
  border-bottom-color: var(--ink-blue);
}

.all-essays .arrow {
  font-family: var(--mono);
}

/* ---------- Footer ---------- */

.doc-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper);
  font-family: var(--ui);
}

.doc-footer__wrap {
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: 56px var(--frame-pad) 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 2fr);
  column-gap: 58px;
  row-gap: 36px;
}

.doc-footer__brand-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doc-footer__brand-col .brand {
  font-size: 16px;
}

.doc-footer__tag {
  margin: 0;
  font-family: var(--ui);
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--ink-mute);
  max-width: 38ch;
}

.doc-footer__subscribe {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  padding: 4px 0;
  color: var(--ink-2);
  text-decoration: none;
  font-family: var(--ui);
  font-size: 13.5px;
  line-height: 1.3;
  border-bottom: 1px solid var(--rule-2);
  transition: color 0.15s ease, border-color 0.15s ease, gap 0.15s ease;
}

.doc-footer__subscribe:hover {
  color: var(--ink);
  border-bottom-color: var(--ink);
  gap: 12px;
}

.doc-footer__subscribe .arrow {
  font-family: var(--mono);
  color: var(--ink-mute);
  transition: color 0.15s ease;
}

.doc-footer__subscribe:hover .arrow {
  color: var(--ink);
}

.doc-footer__cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

.doc-footer__col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.doc-footer__h {
  margin: 0 0 10px;
  font-family: var(--ui);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-mute);
  font-weight: 700;
}

.doc-footer__col a {
  color: var(--ink-2);
  text-decoration: none;
  font-family: var(--ui);
  font-size: 13.5px;
  padding: 4px 0;
  line-height: 1.35;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.doc-footer__col a:hover {
  color: var(--ink);
  padding-left: 4px;
}

.doc-footer__col .col-note {
  display: block;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-mute);
  opacity: 0.7;
  margin-left: 4px;
}

.doc-footer__meta {
  border-top: 1px solid var(--rule);
}

.doc-footer__meta-inner {
  max-width: var(--frame-max);
  margin: 0 auto;
  padding: 18px var(--frame-pad);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  color: var(--ink-mute);
  text-transform: uppercase;
}

.doc-footer__meta-inner .sep {
  opacity: 0.5;
}

.doc-footer__meta-inner .to-top {
  margin-left: auto;
  color: var(--ink-mute);
  text-decoration: none;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  padding: 4px 10px;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.doc-footer__meta-inner .to-top:hover {
  border-color: var(--ink);
  color: var(--ink);
}

/* ---------- Responsive tweaks for new blocks ---------- */

@media (max-width: 900px) {
  section.page.page--invest {
    padding: 80px var(--frame-pad) 88px;
  }

  .doc-footer__wrap {
    grid-template-columns: 1fr;
    row-gap: 40px;
  }

  .doc-footer__cols {
    gap: 24px;
  }
}

@media (max-width: 768px) {
  .project-tabs__nav {
    gap: 0;
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .project-tabs__nav::-webkit-scrollbar {
    display: none;
  }

  .project-tabs__nav label {
    padding: 10px 12px 12px;
    white-space: nowrap;
    font-size: 12.5px;
  }

  .project {
    grid-template-columns: 36px 1fr;
    column-gap: 14px;
    row-gap: 10px;
    align-items: start;
  }

  .project__mark {
    width: 34px;
    height: 34px;
    font-size: 12px;
  }

  .project__heading {
    padding-top: 2px;
  }

  .project__pitch {
    grid-column: 2 / -1;
    padding-top: 0;
    max-width: none;
  }

  .project__stage {
    grid-column: 2 / -1;
    justify-self: start;
    margin-top: 0;
    margin-left: 0;
  }

  .project:hover {
    padding-left: 2px;
    background: transparent;
  }

  .project:hover .project__mark {
    border-color: var(--rule-2);
  }

  .invest__cta {
    flex-direction: column;
    align-items: stretch;
  }

  .page--invest .btn {
    justify-content: space-between;
  }

  .invest__direct {
    flex-direction: column;
    gap: 4px;
  }

  .invest__direct .sep {
    display: none;
  }

  .doc-footer__wrap {
    padding: 44px var(--frame-pad) 32px;
  }

  .doc-footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .doc-footer__meta-inner .to-top {
    margin-left: 0;
  }
}

@media (max-width: 480px) {
  section.page.page--invest {
    padding: 64px var(--frame-pad) 72px;
  }

  .invest__lede {
    font-size: 17px;
  }

  /* Keep 2 columns at narrow widths so the footer doesn't stretch into a long
     single-column list; 3 cols of content wrap 2+1 which reads fine. */
  .doc-footer__cols {
    grid-template-columns: 1fr 1fr;
    gap: 20px 16px;
  }
}
