/* Recursive AI — design system
   Paper, ink, one red. Newsreader (display), Schibsted Grotesk (text),
   IBM Plex Mono (names of real things, labels). All SIL OFL 1.1, self-hosted.

   Red is reserved: "Available", the one call to action, focus. Nothing else. */

@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-opsz-normal.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("/assets/fonts/newsreader-latin-opsz-italic.woff2") format("woff2");
  font-weight: 200 800; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("/assets/fonts/schibsted-grotesk-latin-arrows-wght.woff2") format("woff2");
  font-weight: 400 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("/assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}

:root {
  --paper: #F6F1E7;
  --paper-deep: #EEE7D8;
  --paper-hi: #FBF8F1;
  --ink: #1A1815;
  --ink-2: #39342D;
  --ink-3: #6B6357;
  --ink-4: #8E8576;   /* NON-TEXT ONLY (borders, underlines, strokes): 3.2:1 meets AA for UI parts, not for text. Text uses --ink-3 or darker. */
  --rule: #D9CFBD;
  --rule-strong: #1A1815;
  --red: #A3321A;
  --red-deep: #7E2412;

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: "Schibsted Grotesk", ui-sans-serif, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1200px;
  --gutter: clamp(20px, 4.5vw, 56px);
  --gap: clamp(24px, 3vw, 48px);
  --section: clamp(80px, 9vw, 136px);   /* the one vertical rhythm between sections */
  --head-gap: clamp(36px, 4vw, 56px);    /* section label → content */

  --t-body: 16px;
  --t-small: 14px;
  --t-label: 11.5px;
  --t-lede: clamp(19px, 1.55vw, 22px);
  --t-h3: clamp(20px, 1.65vw, 24px);
  --t-h2: clamp(25px, 2.25vw, 32px);   /* section headings: never display-sized */
  --t-h1: clamp(32px, 3.5vw, 50px);     /* home hero */
  --t-h1-page: clamp(32px, 3.3vw, 48px);

  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.6;
  font-feature-settings: "kern", "liga";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, ul, ol, dl, dd, figure, pre, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--paper); }
a { color: inherit; text-decoration: none; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 1px; }
code, kbd, samp, pre { font-family: var(--mono); font-size: .92em; }

.wrap {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 50;
  background: var(--ink); color: var(--paper);
  padding: 10px 16px; font-size: 14px; font-weight: 600;
}
.skip:focus { top: 12px; }

/* Arrows: Plex Mono and Newsreader lack them; always set in the sans. */
.ar { font-family: var(--sans); font-weight: 400; }

/* ---------- Mark & wordmark ---------- */
.mark { width: 28px; height: 28px; flex: none; color: var(--ink); }
.mark .m-line { fill: none; stroke: currentColor; stroke-width: 4.5; }
.mark .m-core { fill: var(--red); }

.wordmark {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--ink);
  padding-block: 6px;
}
.wordmark__type {
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 520;
  font-variation-settings: "opsz" 30;
  letter-spacing: -0.012em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark .m-core { transition: transform .45s var(--ease); transform-origin: 54.5px 54.5px; }
.wordmark:hover .m-core { transform: scale(.72); }

/* ---------- Masthead ---------- */
.masthead { border-bottom: 1px solid var(--rule-strong); background: var(--paper); position: relative; z-index: 20; }
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 32px; min-height: 76px;
}
.nav__list { display: flex; align-items: center; gap: 4px clamp(18px, 2.1vw, 30px); }
.nav__list a {
  position: relative;
  display: inline-block;
  font-size: 15px; font-weight: 470; color: var(--ink-2);
  padding-block: 8px;
  transition: color .2s ease;
}
.nav__list a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__list a:hover { color: var(--ink); }
.nav__list a:hover::after { transform: scaleX(1); }
.nav__list a[aria-current="page"] { color: var(--ink); font-weight: 560; }
.nav__list a[aria-current="page"]::after { transform: scaleX(1); }
.nav__toggle { display: none; }

@media (max-width: 820px) {
  .masthead__inner { min-height: 64px; }
  .js .nav__toggle {
    display: inline-flex; align-items: center; gap: 10px;
    font: 500 12px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
    color: var(--ink); background: none; border: 1px solid var(--ink);
    padding: 9px 12px 8px; cursor: pointer; border-radius: 0;
  }
  .nav__toggle-icon { position: relative; width: 12px; height: 8px; }
  .nav__toggle-icon::before, .nav__toggle-icon::after {
    content: ""; position: absolute; left: 0; right: 0; height: 1.5px; background: currentColor;
    transition: transform .3s var(--ease), top .3s var(--ease);
  }
  .nav__toggle-icon::before { top: 0; }
  .nav__toggle-icon::after { top: 6.5px; }
  .nav__toggle[aria-expanded="true"] .nav__toggle-icon::before { top: 3.25px; transform: rotate(45deg); }
  .nav__toggle[aria-expanded="true"] .nav__toggle-icon::after { top: 3.25px; transform: rotate(-45deg); }

  .js .nav__panel {
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--rule-strong);
    padding: 8px var(--gutter) 28px;
    height: calc(100vh - 64px); height: calc(100dvh - 64px); overflow-y: auto;
    visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity .25s ease, transform .3s var(--ease), visibility 0s linear .3s;
  }
  .js .nav[data-open] .nav__panel {
    visibility: visible; opacity: 1; transform: none;
    transition: opacity .25s ease, transform .3s var(--ease);
  }
  .js .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .js .nav__list li { border-bottom: 1px solid var(--rule); }
  .js .nav__list a {
    display: flex; justify-content: space-between; align-items: baseline;
    font-family: var(--serif); font-size: 26px; font-weight: 400;
    font-variation-settings: "opsz" 36; letter-spacing: -0.01em;
    color: var(--ink); padding-block: 14px 12px;
  }
  .js .nav__list a::after { display: none; }
  .js .nav__list a[aria-current="page"]::before {
    content: ""; order: 2; width: 7px; height: 7px; background: var(--ink); align-self: center;
  }
  /* Without JS: a compact wrapped row under the wordmark. */
  html:not(.js) .masthead__inner { flex-wrap: wrap; padding-block: 14px; gap: 6px 24px; }
  html:not(.js) .nav__list { flex-wrap: wrap; gap: 0 18px; }
}

/* ---------- Section label system (one, everywhere) ---------- */
.label {
  font-family: var(--mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-3);
  line-height: 1.4;
}
.section { padding-top: var(--section); }
.section--last { padding-bottom: 0; } /* the footer's top margin closes every page */
.section-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 24px;
  border-top: 1px solid var(--rule-strong);
  padding-top: 14px;
  margin-bottom: var(--head-gap);
}
.section-head .more { font-size: 14px; }
.section-head--table { margin-bottom: 0; padding-bottom: 14px; }

/* ---------- Type ---------- */
.display {
  font-family: var(--serif);
  font-weight: 360;
  font-variation-settings: "opsz" 72;
  letter-spacing: -0.026em;
  line-height: 1.0;
  text-wrap: balance;
}
.h2 {
  font-family: var(--serif);
  font-weight: 380;
  font-variation-settings: "opsz" 60;
  font-size: var(--t-h2);
  line-height: 1.06;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.h3 {
  font-family: var(--serif);
  font-weight: 420;
  font-variation-settings: "opsz" 40;
  font-size: var(--t-h3);
  line-height: 1.1;
  letter-spacing: -0.014em;
}
.lede {
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 22;
  font-size: var(--t-lede);
  line-height: 1.5;
  color: var(--ink);
  max-width: 34em;
  text-wrap: pretty;
}
.body { color: var(--ink-2); max-width: 38em; text-wrap: pretty; }
.body + .body { margin-top: 1em; }
.body a, .lede a, .inline-link {
  color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--rule);
  text-decoration-thickness: 1px; text-underline-offset: .2em;
  transition: text-decoration-color .2s ease;
}
.body a:hover, .lede a:hover, .inline-link:hover { text-decoration-color: var(--ink); }
.name { font-family: var(--mono); font-weight: 500; letter-spacing: -0.01em; }

/* ---------- Links, tags, buttons ---------- */
.more {
  display: inline-flex; align-items: baseline; gap: 8px;
  font-size: 15px; font-weight: 560; color: var(--ink);
  border-bottom: 1px solid var(--rule);
  padding-bottom: 3px;
  white-space: nowrap;
  transition: border-color .2s ease;
}
.more .ar { display: inline-block; transition: transform .3s var(--ease); }
.more:hover { border-color: var(--ink); }
.more:hover .ar { transform: translateX(4px); }
.more--ext:hover .ar { transform: translate(2px, -2px); }

.tag {
  display: inline-flex; align-items: center; gap: 7px;
  font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 5px 7px 4px;
  border: 1px solid var(--ink-4);
  white-space: nowrap;
}
.tag--live { color: var(--red); border-color: currentColor; }
.tag--live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor;
}
.state { font-size: 14px; color: var(--ink-3); white-space: nowrap; }
.state--live { color: var(--red); font-weight: 560; display: inline-flex; align-items: center; gap: 8px; }
.state--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.button {
  display: inline-flex; align-items: center; gap: 12px;
  font: 600 15px/1 var(--sans);
  background: var(--ink); color: var(--paper);
  padding: 16px 22px; border: 0; border-radius: 0; cursor: pointer;
  transition: background .2s ease;
}
.button .ar { transition: transform .3s var(--ease); }
.button:hover { background: var(--red); }
.button:hover .ar { transform: translateX(4px); }

/* ---------- Hero (home): headline, sub and email read as one compact block ---------- */
.hero { padding-block: clamp(44px, 5.5vw, 88px) 0; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(120px, 13vw, 184px);
  gap: var(--gap);
  align-items: end;
}
.hero__text { max-width: 46rem; }
.hero__title { font-size: var(--t-h1); line-height: 1.06; letter-spacing: -0.022em; max-width: 15em; }
.hero__fig { width: 100%; height: auto; color: var(--ink); }
.hero__fig rect { fill: none; stroke: currentColor; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.hero__fig .core { fill: var(--red); stroke: none; }
.hero__sub {
  margin-top: clamp(16px, 1.6vw, 22px);
  font-family: var(--serif);
  font-weight: 400;
  font-variation-settings: "opsz" 22;
  font-size: var(--t-lede);
  line-height: 1.45;
  color: var(--ink-2);
  max-width: 34em;
  text-wrap: pretty;
}

/* ---------- What we're building: three columns ---------- */
.section-head--title { display: block; padding-top: 18px; margin-bottom: clamp(24px, 2.6vw, 34px); }
.ship__body { display: grid; justify-items: start; gap: 24px; max-width: 44rem; }
.make__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: calc(var(--gap) * 2);
}
.col { display: flex; flex-direction: column; align-items: flex-start; position: relative; }
.col + .col::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--gap) * -1);
  border-left: 1px solid var(--rule);
}
.col__head { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-bottom: 12px; }
.col__head .tag { order: -1; }
.col__body { color: var(--ink-2); max-width: 26em; text-wrap: pretty; }
.col__feature {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule);
  width: 100%; font-size: 15px; color: var(--ink-2); text-wrap: pretty;
}
.col__feature .name { color: var(--ink); }
.col__foot { padding-top: 20px; }

/* ---------- Split sections ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--gap);
  align-items: start;
}
.split__body { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.split__title { max-width: 9.5em; }

/* ---------- Devlog components (contract: DEVLOG-STYLE-CONTRACT.md §4) ---------- */
.counts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 32px; border-top: 1px solid var(--rule);
}
.counts > div { padding-top: 16px; padding-right: 12px; display: flex; flex-direction: column-reverse; gap: 8px; }
.counts > div + div { padding-left: 16px; border-left: 1px solid var(--rule); }
.counts dd {
  font-family: var(--serif); font-weight: 340;
  font-variation-settings: "opsz" 72;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: clamp(34px, 3.4vw, 48px); line-height: 1; letter-spacing: -0.02em;
}
.counts dt { font: 500 var(--t-label)/1.2 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
.wins { width: 100%; border-top: 1px solid var(--rule); counter-reset: win; }
.wins li {
  counter-increment: win;
  display: grid; grid-template-columns: 2.6em minmax(0, 1fr); gap: 8px;
  padding-block: 15px 14px; border-bottom: 1px solid var(--rule);
  color: var(--ink-2); line-height: 1.5;
}
.wins li::before {
  content: counter(win, decimal-leading-zero);
  font: 400 12px/2 var(--mono); color: var(--ink-3);
}
.wins__project { display: block; font: 500 var(--t-label)/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }

/* ---------- CTA ---------- */
.cta__inner { max-width: 50rem; }
.cta .section-head { padding-top: 0; margin-bottom: clamp(26px, 2.8vw, 38px); }
.cta__q {
  font-family: var(--serif); font-weight: 380;
  font-variation-settings: "opsz" 40;
  font-size: clamp(20px, 1.8vw, 26px); line-height: 1.3; letter-spacing: -0.01em;
  color: var(--ink); text-wrap: balance;
}
.cta__actions { margin-top: clamp(20px, 2.2vw, 30px); display: flex; flex-wrap: wrap; align-items: center; gap: 20px 32px; }
.cta__email {
  display: inline-flex; align-items: baseline; gap: .4em;
  font-family: var(--serif); font-weight: 400;
  font-variation-settings: "opsz" 60;
  font-size: clamp(22px, 2.1vw, 30px); line-height: 1.15; letter-spacing: -0.014em;
  color: var(--ink);
  padding-bottom: .08em;
  background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 100% / 100% 1px;
  transition: background-size .35s var(--ease), color .2s ease;
  overflow-wrap: anywhere;
}
.cta__email .ar { font-size: .62em; color: var(--red); display: inline-block; transition: transform .35s var(--ease); }
.cta__email:hover { color: var(--red); background-image: linear-gradient(var(--red), var(--red)); }
.cta__email:hover .ar { transform: translateX(6px); }

/* ---------- Page header (interior pages) ---------- */
.page-head { padding-block: clamp(48px, 6vw, 96px) 0; }
.page-head__eyebrow { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(20px, 2.4vw, 32px); flex-wrap: wrap; }
.page-head__eyebrow a.label:hover { color: var(--ink); }
.page-head__title { font-size: var(--t-h1-page); max-width: 13em; }
.page-head__lede {
  margin-top: clamp(16px, 1.8vw, 24px);
  font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 24;
  font-size: clamp(19px, 1.6vw, 23px); line-height: 1.45; letter-spacing: -0.004em;
  color: var(--ink-2); max-width: 30em; text-wrap: balance;
}
.page-head__meta { margin-top: clamp(28px, 3vw, 40px); display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

/* ---------- Catalog (APIs, tools, languages) ---------- */
.cat { border-top: 1px solid var(--rule); }
.cat__group + .cat__group { margin-top: clamp(48px, 5vw, 72px); }
.cat__group-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 0; padding-bottom: 14px; border-bottom: 1px solid var(--rule-strong); }
.cat__item {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) 8.5rem;
  gap: 8px var(--gap);
  align-items: baseline;
  padding-block: 20px 19px;
  border-bottom: 1px solid var(--rule);
}
.cat__item .name { font-size: 16px; color: var(--ink); }
.cat__item .name .ar { color: var(--ink-3); padding-inline: .2em; }
.cat__desc { color: var(--ink-2); max-width: 34em; }
.cat__item > :last-child { justify-self: end; }
a.cat__item { transition: background-color .2s ease; }
a.cat__item:hover { background: var(--paper-hi); }
a.cat__item:hover .name { text-decoration: underline; text-underline-offset: .25em; text-decoration-thickness: 1px; }

/* ---------- Feature grid (points) ---------- */
.points { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--gap); border-top: 1px solid var(--rule); }
.points--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.point { padding-block: 26px 30px; border-bottom: 1px solid var(--rule); }
.point__title { font-family: var(--serif); font-weight: 450; font-variation-settings: "opsz" 30; font-size: 22px; line-height: 1.2; letter-spacing: -0.01em; margin-bottom: 10px; }
.point p { color: var(--ink-2); max-width: 32em; }

/* ---------- Code & diff ---------- */
.code {
  background: var(--paper-hi);
  border: 1px solid var(--rule);
  font-family: var(--mono); font-size: 13.5px; line-height: 1.7;
  overflow-x: auto;
}
.code__bar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 10px 16px 9px; border-bottom: 1px solid var(--rule);
}
.code pre { padding: 16px 0; margin: 0; font-size: inherit; white-space: normal; }
.code pre > span { display: block; padding-inline: 16px; white-space: pre; }
.code .c { color: var(--ink-3); }
.code .k { color: var(--ink); }
.code .v { color: var(--ink-2); }
.code .chg { background: #F1E1D3; box-shadow: inset 2px 0 0 var(--red); }
.code .chg .v { color: var(--ink); }
.diff { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.cmd {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--ink); color: var(--paper);
  font-family: var(--mono); font-size: 14px;
  padding: 14px 16px;
}
.cmd code { font-size: inherit; white-space: nowrap; overflow-x: auto; }
.cmd code::before { content: "$ "; color: var(--ink-4); }
.copy {
  font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  color: var(--paper); background: none; border: 1px solid #5a544b; padding: 6px 8px 5px; cursor: pointer;
  transition: border-color .2s ease;
}
.copy:hover { border-color: var(--paper); }

/* ---------- Link list (outbound) ---------- */
.links { display: flex; flex-wrap: wrap; gap: 14px 32px; }

/* ---------- Notify form ---------- */
.notify { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--gap); align-items: start; }
.notify__form { display: flex; gap: 0; max-width: 34rem; width: 100%; }
.notify__input {
  flex: 1; min-width: 0;
  font: 400 17px/1.2 var(--sans); color: var(--ink);
  background: var(--paper-hi);
  border: 1px solid var(--ink); border-right: 0; border-radius: 0;
  padding: 15px 16px;
}
.notify__input::placeholder { color: var(--ink-3); }
.notify__input:focus { outline: none; box-shadow: inset 0 0 0 1px var(--ink); }
.notify__input:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.notify__note { margin-top: 14px; font-size: var(--t-small); color: var(--ink-3); }
.notify__status { margin-top: 14px; font-size: 15px; color: var(--ink); min-height: 1.5em; }

/* ---------- Person (about) ---------- */
.facts { border-top: 1px solid var(--rule); }
.facts li { display: grid; grid-template-columns: 9.5em minmax(0, 1fr); gap: 4px var(--gap); padding-block: 16px 15px; border-bottom: 1px solid var(--rule); }
.facts .name { font-size: 14px; }
.facts p { color: var(--ink-2); }

/* ---------- Footer ---------- */
.colophon { margin-top: var(--section); border-top: 1px solid var(--rule-strong); background: var(--paper-deep); }
.colophon__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 3.5fr) minmax(0, 3.5fr);
  gap: 36px var(--gap); padding-block: clamp(44px, 5vw, 64px) 36px;
}
.colophon__brand .wordmark { margin-bottom: 14px; }
.colophon__brand p { color: var(--ink-2); max-width: 26em; font-size: 15px; text-wrap: balance; }
.colophon h2 { margin-bottom: 14px; }
.colophon ul li + li { margin-top: 6px; }
.colophon ul a { font-size: 15px; color: var(--ink-2); transition: color .2s ease; }
.colophon ul a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .22em; text-decoration-thickness: 1px; }
.colophon__base {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 24px;
  padding-block: 18px 22px; border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--ink-3);
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .points--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .make__grid { grid-template-columns: 1fr; }
  .col + .col::before { display: none; }
  .col { padding-block: 28px 32px; border-top: 1px solid var(--rule); }
  .col:first-child { border-top: 0; padding-top: 0; }
  .col:last-child { padding-bottom: 0; }
  .col__foot { padding-top: 18px; }
  .split, .notify { grid-template-columns: 1fr; gap: 28px; }
  .split__title { max-width: 14em; }
  .cat__item { grid-template-columns: minmax(0, 1fr) auto; padding-block: 18px 17px; }
  .cat__item .cat__desc { grid-column: 1 / -1; grid-row: 2; }
  .cat__item > :last-child { grid-column: 2; grid-row: 1; }
  .colophon__grid { grid-template-columns: 1fr 1fr; }
  .colophon__brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__fig { display: none; }   /* the masthead mark sits right above it */
  .diff, .points, .points--3 { grid-template-columns: 1fr; }
  .facts li { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  :root { --t-body: 16px; }
  .section-head { flex-wrap: wrap; gap: 8px 16px; }
  .counts > div + div { padding-left: 12px; }
  .notify__form { flex-direction: column; gap: 10px; }
  .notify__input { border-right: 1px solid var(--ink); }
  .notify__form .button { justify-content: center; }
  .colophon__base { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .masthead, .colophon, .nav__toggle { display: none; }
  body { background: #fff; }
}

/* ---------- Long-form prose (research articles) ---------- */
.article__title { max-width: 18em; font-size: clamp(32px, 3.4vw, 50px); line-height: 1.06; }
.article__meta {
  margin-top: clamp(22px, 2.4vw, 32px);
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  font: 500 var(--t-label)/1.4 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3);
}
.article__body { margin-top: clamp(40px, 4.5vw, 64px); padding-top: clamp(32px, 3.5vw, 48px); border-top: 1px solid var(--rule-strong); }
.prose {
  max-width: 38rem;
  font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 18;
  font-size: clamp(18px, 1.4vw, 20px); line-height: 1.62; color: var(--ink);
  text-wrap: pretty; hyphens: manual;
}
.prose > * + * { margin-top: 1.05em; }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }
.prose code { font-size: .8em; background: var(--paper-deep); padding: .08em .25em; margin-inline: .05em; border-radius: 2px; }
.prose a { text-decoration: underline; text-decoration-color: var(--ink-4); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.prose a:hover { text-decoration-color: var(--ink); }
.prose ul, .prose ol { padding-left: 0; }
.prose li { position: relative; padding-left: 1.4em; }
.prose li + li { margin-top: .6em; }
.prose ul > li::before { content: ""; position: absolute; left: .2em; top: .78em; width: .5em; height: 1px; background: var(--ink); }
.prose ol { counter-reset: p; }
.prose ol > li { counter-increment: p; }
.prose ol > li::before { content: counter(p) "."; position: absolute; left: 0; font: 400 .72em/2.2 var(--mono); color: var(--ink-3); }

/* ---------- Research index ---------- */
.notes { border-top: 1px solid var(--rule-strong); }
.note {
  display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 10px var(--gap);
  padding-block: clamp(26px, 2.8vw, 36px); border-bottom: 1px solid var(--rule);
}
.note__meta { display: flex; flex-direction: column; gap: 4px; padding-top: .45em; }
.note__title { font-family: var(--serif); font-weight: 400; font-variation-settings: "opsz" 40; font-size: clamp(24px, 2.3vw, 32px); line-height: 1.12; letter-spacing: -0.014em; max-width: 22em; text-wrap: balance; }
.note__title a { background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; transition: background-size .35s var(--ease); }
.note__title a:hover { background-size: 100% 1px; }
.note__sum { margin-top: 12px; color: var(--ink-2); max-width: 40em; text-wrap: pretty; }
@media (max-width: 720px) {
  .note { grid-template-columns: 1fr; }
  .note__meta { flex-direction: row; gap: 12px; padding-top: 0; }
}

/* ---------- 404 ---------- */
.lost { padding-block: clamp(64px, 10vw, 152px) 0; }
.lost__grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(150px, 17vw, 240px); gap: var(--gap); align-items: end; }
.lost__fig { width: 100%; height: auto; color: var(--ink); }
.lost__fig rect { fill: none; stroke: currentColor; stroke-width: 1.25; vector-effect: non-scaling-stroke; }
.lost__fig .gone { stroke-dasharray: 4 5; stroke: var(--ink-4); }
.lost__links { margin-top: clamp(40px, 4.5vw, 64px); }
@media (max-width: 720px) { .lost__grid { grid-template-columns: 1fr; } .lost__fig { width: 96px; order: -1; } }

/* ---------- Notify: interests + status ---------- */
.notify__status:empty { display: none; }
.notify__status[data-tone="ok"] { color: var(--ink); }
.notify__status[data-tone="ok"]::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--ink); margin-right: 10px; vertical-align: .12em; }
.notify__status[data-tone="error"] { color: var(--ink); }
.notify__status[data-tone="error"]::before { content: ""; display: inline-block; width: 7px; height: 7px; background: var(--red); margin-right: 10px; vertical-align: .12em; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- /apis/: catalog rows double as Notify-me toggles ---------- */
.nobr { white-space: nowrap; }
.cat__hint { margin-bottom: clamp(28px, 3vw, 40px); }
.cat__item--pick { cursor: pointer; }
.cat__item--pick:hover { background: var(--paper-hi); }
.cat__item--pick:target { background: var(--paper-hi); box-shadow: inset 2px 0 0 var(--ink); }
.pick { position: relative; display: inline-flex; width: 20px; height: 20px; }
.pick input { position: absolute; inset: -12px; width: calc(100% + 24px); height: calc(100% + 24px); margin: 0; opacity: 0; cursor: pointer; }
.pick__box {
  width: 20px; height: 20px; border: 1px solid var(--ink-3); background: var(--paper-hi);
  display: grid; place-items: center; transition: background .15s ease, border-color .15s ease;
}
.pick__box::after {
  content: ""; width: 10px; height: 5px; border-left: 1.75px solid var(--paper); border-bottom: 1.75px solid var(--paper);
  transform: translateY(-1px) rotate(-45deg) scale(.4); opacity: 0; transition: transform .2s var(--ease), opacity .15s ease;
}
.cat__item--pick:hover .pick__box { border-color: var(--ink); }
.pick input:checked + .pick__box { background: var(--ink); border-color: var(--ink); }
.pick input:checked + .pick__box::after { opacity: 1; transform: translateY(-1px) rotate(-45deg) scale(1); }
.pick input:focus-visible + .pick__box { outline: 2px solid var(--red); outline-offset: 3px; }
.cat__item--pick:has(input:checked) .name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .25em; }
.copy[data-copied] { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.copy[data-copied]::before { content: "✓ "; font-family: var(--sans); }

.cat__item:target { background: var(--paper-hi); box-shadow: inset 2px 0 0 var(--ink); }
html { scroll-padding-top: 32px; }

/* ---------- Quiet contact (secondary pages; the big CTA is homepage-only) ---------- */
.quiet-contact { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--rule); width: 100%; color: var(--ink-3); font-size: 15px; }
.quiet-contact a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--ink-4); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.quiet-contact a:hover { text-decoration-color: var(--ink); }
.contact-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 28px; }
.contact-email {
  font-family: var(--serif); font-weight: 420; font-variation-settings: "opsz" 30;
  font-size: clamp(21px, 1.9vw, 26px); letter-spacing: -0.01em; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--ink-4); text-decoration-thickness: 1px; text-underline-offset: .2em;
  transition: text-decoration-color .2s ease; overflow-wrap: anywhere;
}
.contact-email:hover { text-decoration-color: var(--ink); }

/* Code on narrow screens: wrap with a hanging indent instead of clipping. */
@media (max-width: 600px) {
  .code { font-size: 12.5px; }
  .code pre > span { white-space: pre-wrap; overflow-wrap: anywhere; padding-left: 32px; text-indent: -16px; }
  .cmd { font-size: 13px; }
}

/* ---------- Article: reading column + sticky aside (measure unchanged) ---------- */
.article__grid { display: grid; grid-template-columns: minmax(0, 38rem); gap: 0; }
.article__aside { margin-top: clamp(48px, 5vw, 72px); padding-top: 22px; border-top: 1px solid var(--rule); max-width: 38rem; display: grid; gap: 28px; }
.article__facts { display: grid; grid-template-columns: repeat(3, minmax(0, auto)); justify-content: start; gap: 8px 40px; }
.article__facts > div { display: flex; flex-direction: column; gap: 4px; }
.article__facts dd { font-size: 15px; color: var(--ink-2); }
.article__facts a { text-decoration: underline; text-decoration-color: var(--ink-4); text-decoration-thickness: 1px; text-underline-offset: .2em; }
.article__facts a:hover { text-decoration-color: var(--ink); }
.article__next {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: end;
  padding: 18px 20px 20px; background: var(--paper-hi); border: 1px solid var(--rule);
  transition: border-color .2s ease;
}
.article__next .label { grid-column: 1 / -1; }
.article__next-title { font-family: var(--serif); font-weight: 420; font-variation-settings: "opsz" 30; font-size: 21px; line-height: 1.2; letter-spacing: -0.01em; color: var(--ink); text-wrap: balance; }
.article__next .ar { transition: transform .3s var(--ease); }
.article__next:hover { border-color: var(--ink); }
.article__next:hover .ar { transform: translateX(4px); }
.article__links { display: flex; flex-wrap: wrap; gap: 12px 24px; }
@media (min-width: 1100px) {
  .article__grid { grid-template-columns: minmax(0, 38rem) minmax(0, 1fr); column-gap: clamp(56px, 7vw, 120px); align-items: start; }
  .article__body { grid-column: 1; }
  .article__aside {
    grid-column: 2; grid-row: 1; position: sticky; top: 32px;
    margin-top: clamp(40px, 4.5vw, 64px); padding-top: clamp(32px, 3.5vw, 48px); padding-left: clamp(28px, 3vw, 40px);
    border-top: 1px solid var(--rule-strong); border-left: 1px solid var(--rule); max-width: 22rem; align-self: start;
  }
  .article__facts { grid-template-columns: 1fr; gap: 16px; }
}

/* ---------- Hero: the email is the primary action (one CTA) ---------- */
.make { padding-top: clamp(64px, 6.5vw, 104px); }   /* hero → first section: tighter than the standard rhythm */
/* Home: short sections, so a third less air between them than the site rhythm. */
.page-home { --section: clamp(54px, 6vw, 92px); }
.page-home .make { padding-top: clamp(44px, 4.4vw, 68px); }
.hero__cta { margin-top: clamp(22px, 2.2vw, 30px); display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }
.hero__email {
  display: inline-grid; grid-template-columns: auto auto; column-gap: 14px; row-gap: 6px; align-items: baseline;
  color: var(--ink);
}
.hero__email-label { grid-column: 1 / -1; }
.hero__email-addr {
  font-family: var(--serif); font-weight: 420; font-variation-settings: "opsz" 40;
  font-size: clamp(19px, 1.6vw, 23px); line-height: 1.15; letter-spacing: -0.01em;
  padding-bottom: 3px;
  background: linear-gradient(var(--ink), var(--ink)) no-repeat 0 100% / 100% 1.5px;
  transition: color .2s ease, background-image .2s ease;
  overflow-wrap: anywhere;
}
.hero__email .ar { color: var(--red); font-size: clamp(17px, 1.4vw, 20px); transition: transform .35s var(--ease); }
.hero__email:hover .hero__email-addr { color: var(--red); background-image: linear-gradient(var(--red), var(--red)); }
.hero__email:hover .ar { transform: translateX(5px); }
.hero__email:focus-visible { outline-offset: 6px; }

/* ---------- Home: what we built this week ---------- */
.week .section-head--title { margin-bottom: 14px; }
.week__intro { color: var(--ink-2); max-width: 40em; }
.week__intro-live { display: none; }
.week[data-state="live"] .week__intro-live { display: inline; }
.week__live { display: none; }
.week[data-state="live"] .week__live { display: block; }
.week__range { margin-top: clamp(22px, 2.4vw, 32px); margin-bottom: 12px; font-size: 15px; font-weight: 500; color: var(--ink-2); }
.highlights { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: calc(var(--gap) * 2); }
.highlights li { padding-top: 14px; border-top: 1px solid var(--rule); }
.highlights__project { margin-bottom: 6px; font-size: 15px; line-height: 1.4; }
.highlights__name { font-weight: 600; color: var(--ink); }
.highlights__kind { color: var(--ink-2); }
.highlights__text { color: var(--ink); text-wrap: pretty; }
.week__more { margin-top: clamp(28px, 3vw, 40px); }
@media (max-width: 800px) {
  .highlights { grid-template-columns: 1fr; }
  .highlights li { padding-block: 14px 16px; }
}

.rhythm { margin: 32px 0 0; padding-top: 16px; border-top: 1px solid var(--rule); }
.rhythm figcaption { margin-bottom: 14px; }
.rhythm__days { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 8px; }
.rhythm__day { display: grid; grid-template-rows: auto 112px auto; gap: 8px; text-align: center; }
.rhythm__n { font: 400 11.5px/1 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; min-height: 1em; }
.rhythm__track { position: relative; border-bottom: 1px solid var(--ink); }
.rhythm__bar {
  position: absolute; left: 18%; right: 18%; bottom: 0; height: var(--h);
  background: var(--ink-2); transform-origin: bottom; transition: height .6s var(--ease);
}
.rhythm__day.is-peak .rhythm__bar { background: var(--ink); }
.rhythm__day.is-peak .rhythm__n { color: var(--ink); font-weight: 500; }
.rhythm__day.is-empty .rhythm__track { border-bottom-style: dashed; border-bottom-color: var(--ink-4); }
.rhythm__dow { font: 500 var(--t-label)/1 var(--mono); letter-spacing: .09em; color: var(--ink-3); }

.wins__project { color: var(--ink-3); }
.projchips { display: flex; flex-wrap: wrap; gap: 8px; }
.projchips li {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 7px 10px 6px; border: 1px solid var(--rule); background: var(--paper-hi);
  font-size: 14px; color: var(--ink);
}
.projchips__n { font: 400 12px/1 var(--mono); color: var(--ink-3); font-variant-numeric: tabular-nums; }

@media (max-width: 800px) {
  .rhythm__day { grid-template-rows: auto 88px auto; }
}
@media (prefers-reduced-motion: reduce) { .rhythm__bar { transition: none; } }
.projchips__name { color: var(--ink); }

/* ---------- /apis/: tick box leads each row; the whole row is the label ---------- */
.cat__item--pick { grid-template-columns: 20px minmax(0, 3fr) minmax(0, 7fr); gap: 8px 20px; }
.cat__item--pick .cat__desc { padding-left: calc(var(--gap) - 20px); }
.cat__item--pick > .pick, .cat__item--pick > .state { align-self: start; margin-top: 3px; }
.cat__item--pick > :last-child { justify-self: stretch; }
.cat__hint { color: var(--ink-2); font-size: 15px; }
.page-head__note { margin-top: 10px; color: var(--ink-2); font-size: 16px; max-width: 40em; }
@media (max-width: 800px) {
  .cat__item--pick { grid-template-columns: 20px minmax(0, 1fr); column-gap: 14px; }
  .cat__item--pick > .pick, .cat__item--pick > .state { grid-column: 1; grid-row: 1; }
  .cat__item--pick .name { grid-column: 2; grid-row: 1; }
  .cat__item--pick .cat__desc { grid-column: 2; grid-row: 2; padding-left: 0; }
}
