/* ============================================================
   Markdown To — landing page

   Direction: the airy edition of the specification sheet.
   Near-white ground, generous air, rounded cards that lift on
   soft shadow rather than sit inside ruled compartments — and,
   still, the inked plate. A dark card is what makes a file read
   as a file, and the file is the whole argument.

   Light is the primary design. The dark block below the tokens
   is the automatic prefers-color-scheme variant, derived from
   it. `specs/specs.css` loads after this file on the
   specification sheets and re-states the same tokens; the two
   registers are one system, so a rule written against --ink-2 or
   --paper-2 behaves correctly on either.

   No arrow glyphs anywhere — the subset fonts have none. Every
   chevron on this page is drawn from two CSS borders.
   ============================================================ */

/* ---------- fonts (self-hosted, latin subset) ---------- */
@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader.woff2") format("woff2-variations"),
       url("assets/fonts/newsreader.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 300 700;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("assets/fonts/plexmono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("assets/fonts/plexmono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("assets/fonts/plexmono-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

/* ============================================================
   Tokens — light first
   ============================================================ */
:root {
  --paper:      #fdfcfa;   /* the page */
  --paper-2:    #f7f5f0;   /* alternating band, recessed tiles */
  --paper-3:    #f1eee6;   /* a track something else sits inside */
  --card:       #ffffff;   /* anything that lifts off the page */

  --ink:        #1b1913;
  --ink-2:      #514b3d;
  /* Tertiary ink is darker than a cream ground would need: on
     near-white the old value fell under 4.5:1 for running text. */
  --ink-3:      #6f6856;

  --rule:       rgba(27, 25, 19, .085);
  --rule-soft:  rgba(27, 25, 19, .045);
  --code-bg:    rgba(27, 25, 19, .045);

  --acc:        #c33c19;          /* vermillion — the second plate */
  --acc-line:   rgba(195, 60, 25, .26);
  /* Tints are solid, not translucent: a tint that composites
     differently over the page and over the alternating band lands
     the vermillion label on one side of 4.5:1 and the other. */
  --tint:       #fcf3f0;
  --acc-soft:   var(--tint);

  --shadow-s:   0 1px 2px rgba(27, 25, 19, .04), 0 4px 12px -8px rgba(27, 25, 19, .14);
  --shadow-m:   0 1px 2px rgba(27, 25, 19, .04), 0 12px 28px -16px rgba(27, 25, 19, .22);
  --shadow-l:   0 2px 4px rgba(27, 25, 19, .05), 0 22px 46px -24px rgba(27, 25, 19, .3);
  /* Every lifted surface carries a hairline as well as a shadow: a
     shadow alone does not separate white from white, and on the
     dark variant it does not separate anything at all. */
  --ring:       inset 0 0 0 1px var(--rule-soft);

  --r:          14px;
  --r-sm:       8px;
  --r-xs:       5px;

  /* The plate is inked in both schemes — it is a photograph of a
     file, not a surface of the page — so its palette barely moves. */
  --plate:      #16150f;
  --plate-2:    #1f1d15;
  --plate-fg:   #e6e0d0;
  --plate-dim:  #918a75;
  --plate-rule: rgba(230, 224, 208, .13);
  /* The page accent is too dark to sit on the plate (3.5:1). The
     plate gets the light vermillion in both schemes. */
  --plate-acc:  #ef7148;

  /* markdown syntax palette (on plate) */
  --t-punct:    #857e6a;
  --t-key:      #d6a44a;
  --t-val:      #b9b19a;
  --t-head:     #e8734b;
  --t-check:    #8fae63;
  --t-field-k:  #83a8c6;
  --t-field-v:  #cfc7b1;
  --t-tag:      #63a49c;
  --t-id:       #8b8471;
  --t-em:       #d9d2be;

  --font-serif: "Newsreader", ui-serif, "Iowan Old Style", Palatino, Georgia, serif;
  --font-mono:  "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wide: 74rem;
  --measure: 40rem;
}

/* ============================================================
   Dark — the automatic variant, derived from the light design
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --paper:      #131209;
    --paper-2:    #1a1811;
    --paper-3:    #232016;
    --card:       #1d1a13;

    --ink:        #efe9d9;
    --ink-2:      #c5bda9;
    --ink-3:      #948c78;

    --rule:       rgba(239, 233, 217, .13);
    /* The hairline does more of the work here: a shadow on
       near-black separates nothing. */
    --rule-soft:  rgba(239, 233, 217, .1);
    --code-bg:    rgba(239, 233, 217, .075);

    --acc:        #ef7148;
    --acc-line:   rgba(239, 113, 72, .34);
    --tint:       #241811;

    --shadow-s:   0 1px 2px rgba(0, 0, 0, .3);
    --shadow-m:   0 2px 4px rgba(0, 0, 0, .34), 0 14px 30px -18px rgba(0, 0, 0, .6);
    --shadow-l:   0 3px 6px rgba(0, 0, 0, .38), 0 24px 50px -24px rgba(0, 0, 0, .72);

    --plate:      #0d0c08;
    --plate-2:    #17150f;
    --plate-rule: rgba(230, 224, 208, .11);
  }
}

/* ============================================================
   Reset + ground
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, pre { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1rem, .96rem + .22vw, 1.14rem);
  line-height: 1.62;
  font-variant-numeric: oldstyle-num;
  overflow-x: hidden;
}

/* Grid and flex items take `min-width: auto`, so one unbreakable
   token inside a plate can widen its column and, through it, the
   page. Every track here may be narrower than its contents; the
   contents scroll inside themselves instead. */
.section__in > *, .demo__grid > *, .panel__grid > *, .agent__grid > *,
.pipe > *, .tiers > *, .board > *, .col__list > *, .foot__in > *,
.grammar > *, .conventions ul > *, .card > * { min-width: 0; }

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

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-color: var(--acc); }
:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
  border-radius: var(--r-xs);
}
/* On the inked plate the page accent is too dark to read as a
   focus ring; the plate's own vermillion is. */
.plate :focus-visible { outline-color: var(--plate-acc); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 300;
  background: var(--ink); color: var(--paper);
  padding: .7rem 1.2rem; border-radius: 100px;
  font-family: var(--font-mono); font-size: .8rem;
  box-shadow: var(--shadow-l);
}
.skip:focus { left: .6rem; top: .6rem; }

/* ============================================================
   Shared type
   ============================================================ */
code, kbd, samp, pre { font-family: var(--font-mono); }
code {
  font-size: .86em;
  letter-spacing: -.005em;
  background: var(--code-bg);
  border-radius: var(--r-xs);
  padding: .1em .3em;
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}
strong, b { font-weight: 600; }

.display {
  font-size: clamp(2.5rem, 1.2rem + 5.4vw, 5.2rem);
  line-height: .96;
  letter-spacing: -.026em;
  font-weight: 400;
  text-wrap: balance;
  max-width: 17ch;
}
.display em {
  font-style: italic;
  color: var(--acc);
  letter-spacing: -.03em;
}
.h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.2vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -.022em;
  font-weight: 400;
  text-wrap: balance;
}
.h3 {
  font-size: 1.14rem;
  line-height: 1.3;
  letter-spacing: -.012em;
  font-weight: 600;
  margin-bottom: .4rem;
}

.eyebrow, .figcap, .plate__bar, .well__bar, .tab, .verbs, .stamp,
.section__no, .pipe__no, .foot__lbl, .tier__tag, .mini, .copy {
  font-family: var(--font-mono);
  font-variant-numeric: lining-nums;
}

/* The stamp keeps its hairline — it is a mark, not a compartment —
   but rounds off with everything else. */
.stamp {
  display: inline-block;
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--acc);
  border: 1px solid var(--acc-line);
  border-radius: 100px;
  padding: .22rem .62rem .18rem;
  background: var(--acc-soft);
}
.stamp--lg { font-size: .68rem; padding: .3rem .78rem .26rem; margin-right: .35rem; }

/* ============================================================
   Topbar
   ============================================================ */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(1.25);
  -webkit-backdrop-filter: blur(10px) saturate(1.25);
  box-shadow: 0 1px 2px rgba(27, 25, 19, .03), 0 10px 26px -22px rgba(27, 25, 19, .5);
}
@media (prefers-color-scheme: dark) {
  .topbar { box-shadow: 0 1px 0 var(--rule-soft); }
}
.topbar__in {
  max-width: var(--wide); margin-inline: auto;
  padding: .72rem clamp(1rem, 4vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand { display: flex; align-items: center; gap: .55rem; text-decoration: none; }
.brand__mark { width: 20px; height: 20px; flex: none; }
.brand__mark--lg { width: 30px; height: 30px; }
.mk-plate { fill: var(--ink); }
.mk-arrow, .mk-bar {
  fill: none; stroke: var(--paper); stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.mk-bar { stroke: var(--acc); stroke-width: 2.2; }
.brand__name {
  font-family: var(--font-mono); font-weight: 600;
  font-size: .82rem; letter-spacing: -.01em;
}
.topnav { display: flex; align-items: center; gap: clamp(.7rem, 1.6vw, 1.5rem); }
.topnav a {
  font-family: var(--font-mono); font-size: .74rem;
  letter-spacing: .01em; color: var(--ink-2);
  text-decoration: none; padding: .25rem 0;
  border-bottom: 1px solid transparent;
  transition: color .2s, border-color .2s;
}
.topnav a:hover { color: var(--ink); border-bottom-color: var(--acc); }
.topnav__gh { color: var(--acc) !important; }
@media (max-width: 720px) {
  .topnav a:not(.topnav__gh) { display: none; }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  max-width: var(--wide); margin-inline: auto;
  padding: clamp(3.2rem, 8vw, 7rem) clamp(1rem, 4vw, 2.5rem) clamp(3rem, 7vw, 5rem);
}
/* Crop marks survive the airier ground: two 1px strokes in the
   margin, the one printer's mark that costs the page nothing. */
.cropmark {
  position: absolute; width: 13px; height: 13px; opacity: .5;
}
.cropmark::before, .cropmark::after {
  content: ""; position: absolute; background: var(--acc);
}
.cropmark::before { left: 0; right: 0; height: 1px; top: 6px; }
.cropmark::after { top: 0; bottom: 0; width: 1px; left: 6px; }
.cropmark--tl { top: 2.1rem; left: clamp(.4rem, 2vw, 1.1rem); }
.cropmark--tr { top: 2.1rem; right: clamp(.4rem, 2vw, 1.1rem); }
@media (max-width: 760px) { .cropmark { display: none; } }

.hero__in { max-width: 58rem; }
.eyebrow {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  font-size: .7rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: clamp(1.4rem, 3.2vw, 2.2rem);
}
.lede {
  margin-top: clamp(1.3rem, 2.6vw, 1.9rem);
  font-size: clamp(1.15rem, .95rem + .9vw, 1.6rem);
  font-style: italic;
  line-height: 1.3;
  color: var(--ink);
  letter-spacing: -.012em;
}
.lede::before {
  content: ""; display: block; width: 3.2rem; height: 2px;
  border-radius: 2px;
  background: var(--acc); margin-bottom: 1rem;
}
.hero__body {
  margin-top: 1.25rem; max-width: var(--measure);
  color: var(--ink-2);
}
.hero__cta { margin-top: 2.1rem; display: flex; gap: .8rem; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font-family: var(--font-mono); font-size: .78rem; letter-spacing: .005em;
  text-decoration: none;
  padding: .72rem 1.3rem;
  border-radius: 100px;
  background: var(--card);
  color: var(--ink-2);
  box-shadow: var(--shadow-s), var(--ring);
  transition: box-shadow .25s cubic-bezier(.2,.8,.3,1),
              transform .25s cubic-bezier(.2,.8,.3,1), color .2s;
}
.btn:hover {
  color: var(--ink);
  box-shadow: var(--shadow-m), var(--ring);
  transform: translateY(-2px);
}
.btn--ink {
  background: var(--ink); color: var(--paper);
  box-shadow: var(--shadow-m);
}
.btn--ink:hover { color: var(--paper); box-shadow: var(--shadow-l); }

/* ============================================================
   Figure caption
   ============================================================ */
.figcap {
  display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap;
  font-size: .7rem; letter-spacing: .04em;
  color: var(--ink-3);
  margin-bottom: 1.1rem;
}
.figcap__no { color: var(--acc); font-weight: 600; letter-spacing: .06em; }
.figcap__txt code { font-size: .95em; background: none; border: 0; padding: 0; color: var(--ink-2); }
.figcap__tag {
  margin-left: auto; text-transform: uppercase; font-size: .6rem;
  letter-spacing: .13em; color: var(--ink-3);
  background: var(--paper-2); border-radius: 100px;
  padding: .18rem .58rem .14rem;
}

/* ============================================================
   The demo — the file beside the app
   ============================================================ */
.demo { margin-top: clamp(2.8rem, 6vw, 5rem); }
.demo__grid {
  display: grid; gap: clamp(1.1rem, 2.4vw, 1.8rem);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 900px) {
  .demo__grid {
    grid-template-columns: minmax(0, 27.5rem) minmax(0, 1fr);
    align-items: stretch;
  }
  .well .board { flex: 1; }
}
.demo__hint {
  margin-top: 1.3rem; font-size: .92rem; color: var(--ink-3);
  max-width: 46rem; line-height: 1.55;
}
.demo__hint em { color: var(--ink-2); }

/* ---------- plate (inked source block) ---------- */
.plate {
  background: var(--plate);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-m);
}
.plate__bar {
  display: flex; align-items: center; gap: .55rem;
  padding: .62rem .95rem;
  font-size: .68rem; letter-spacing: .02em;
  border-bottom: 1px solid var(--plate-rule);
  color: var(--plate-dim);
}
.plate__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--plate-acc); flex: none;
}
.plate__name { color: var(--plate-fg); font-weight: 500; }
.plate__meta { margin-left: auto; font-size: .64rem; letter-spacing: .1em; text-transform: uppercase; }

pre.md, pre.term {
  color: var(--plate-fg);
  font-size: clamp(.72rem, .66rem + .2vw, .8rem);
  line-height: 1.72;
  padding: 1.05rem clamp(.95rem, 2vw, 1.35rem) 1.25rem;
  overflow-x: auto;
  tab-size: 2;
  white-space: pre;
  font-variant-numeric: lining-nums;
  scrollbar-width: thin;
  scrollbar-color: var(--plate-dim) transparent;
}
pre.md:focus-visible { outline-offset: -3px; }
@media (max-width: 560px) {
  pre.md, pre.term { font-size: .66rem; padding-inline: .8rem; }
}

/* markdown token colours */
.md .ln--changed {
  border-radius: 2px;
  animation: flash 1.6s ease-out forwards;
}
@keyframes flash {
  0%   { background: rgba(232, 115, 75, .55); box-shadow: 0 0 0 .3rem rgba(232, 115, 75, .55); }
  70%  { background: rgba(232, 115, 75, .28); box-shadow: 0 0 0 .3rem rgba(232, 115, 75, .28); }
  100% { background: transparent; box-shadow: 0 0 0 .3rem transparent; }
}
.t-punct  { color: var(--t-punct); }
.t-key    { color: var(--t-key); }
.t-val    { color: var(--t-val); }
.t-head   { color: var(--t-head); font-weight: 500; }
.t-box    { color: var(--t-punct); }
.t-box-x  { color: var(--t-check); font-weight: 600; }
.t-done   { color: var(--plate-dim); }
.t-fk     { color: var(--t-field-k); }
.t-fv     { color: var(--t-field-v); }
.t-tag    { color: var(--t-tag); }
.t-id     { color: var(--t-id); }
.t-em     { color: var(--t-em); font-style: italic; }
.t-quote  { color: var(--plate-dim); }

/* terminal plate */
.plate--term pre.term { line-height: 1.68; }
pre.term .p    { color: var(--plate-acc); font-weight: 600; }
pre.term .o    { color: var(--plate-dim); }
pre.term .o em { color: var(--plate-fg); font-style: italic; }
pre.term .ok, pre.term .warn {
  display: inline-block; min-width: 2em;
  font-weight: 600; font-style: normal;
}
pre.term .ok   { color: var(--t-check); }
pre.term .warn { color: var(--t-key); }

.copy {
  margin-left: auto; cursor: pointer;
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--plate-dim);
  border: 1px solid var(--plate-rule); border-radius: 100px;
  padding: .2rem .6rem .16rem;
  transition: color .18s, border-color .18s, background .18s;
}
.copy:hover { color: var(--plate-fg); border-color: var(--plate-fg); }
.copy.is-done { color: var(--t-check); border-color: var(--t-check); }

/* ---------- well (the rendered board) ---------- */
.well {
  background: var(--card);
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-m), var(--ring);
  display: flex; flex-direction: column;
}
.well__bar {
  display: flex; align-items: center; gap: .55rem;
  padding: .75rem 1.1rem;
  font-size: .62rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
  border-bottom: 1px solid var(--rule-soft);
}
.well__name { font-weight: 500; }
.well__actions { margin-left: auto; display: flex; gap: .45rem; }
.mini {
  cursor: pointer;
  font-size: .64rem; letter-spacing: .06em; text-transform: uppercase;
  padding: .36rem .78rem .32rem; border-radius: 100px;
  background: var(--paper-2);
  color: var(--ink-2);
  transition: background .18s, color .18s, box-shadow .18s;
}
.mini:hover { background: var(--ink); color: var(--card); }
.mini--acc { color: var(--acc); background: var(--acc-soft); }
.mini--acc:hover { background: var(--acc); color: var(--card); }

/* Columns are recessed tiles inside the well, separated by air
   rather than by a hairline grid. */
.board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .8rem;
  padding: clamp(.8rem, 1.8vw, 1.1rem);
  min-height: 18rem;
}
@media (max-width: 560px) { .board { grid-template-columns: 1fr; min-height: 0; } }

.col {
  background: var(--paper-2);
  border-radius: var(--r-sm);
  padding: .8rem .75rem 1.1rem;
  transition: background .18s, box-shadow .18s;
}
.col.is-over {
  background: var(--acc-soft);
  box-shadow: inset 0 0 0 1.5px var(--acc-line);
}
.col__head {
  display: flex; align-items: baseline; gap: .4rem;
  font-family: var(--font-mono); font-size: .62rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
  padding: 0 .25rem .65rem;
}
/* No opacity dimming on any of the micro-labels below: --ink-3 at .7
   composites to ~3:1 on these grounds, and the card count, the chip
   and the tab's version are all real information. */
.col__n { margin-left: auto; font-variant-numeric: lining-nums; }
.col__list { display: flex; flex-direction: column; gap: .55rem; min-height: 2.5rem; }

/* A card is dragged, not selected. Without user-select:none a press-and-move on the
   card's text starts a text selection and the browser never fires dragstart — which
   reads as "drag and drop is broken" and is really "the gesture was read as a
   highlight". -webkit-user-drag:element makes the element, not its text, the payload. */
.card {
  display: flex; align-items: flex-start; gap: .55rem;
  background: var(--card);
  border-radius: var(--r-sm);
  padding: .6rem .7rem .65rem;
  box-shadow: var(--shadow-s), var(--ring);
  cursor: grab;
  user-select: none; -webkit-user-select: none; -webkit-user-drag: element;
  transition: transform .18s cubic-bezier(.2,.8,.3,1), box-shadow .18s, opacity .18s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-m), var(--ring); }
.card:active { cursor: grabbing; }
.card.is-done { opacity: .84; }
.card.is-dragging { opacity: .35; cursor: grabbing; }
.card.is-new { animation: land .45s cubic-bezier(.2,.8,.3,1); }
@keyframes land {
  0%   { transform: translateY(-6px) scale(.985); box-shadow: var(--shadow-s), 0 0 0 2.5px var(--acc-line); }
  100% { transform: none; box-shadow: var(--shadow-s), var(--ring); }
}
.card__body {
  flex: 1; cursor: pointer; text-align: left;
  font-size: .88rem; line-height: 1.38;
  padding: 0; letter-spacing: -.005em;
  overflow-wrap: anywhere;
}
.card.is-done .card__body { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--rule); }
.card__meta { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .42rem; }
.chip {
  font-family: var(--font-mono); font-size: .6rem;
  letter-spacing: .01em; line-height: 1.5;
  padding: .16rem .5rem; border-radius: 100px;
  background: var(--paper-2); color: var(--ink-3);
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}
.chip--hi { color: var(--acc); background: var(--acc-soft); }
.chip--tag { background: transparent; box-shadow: inset 0 0 0 1px var(--rule); }
.chip--id { background: transparent; }
.noscript { padding: 1.2rem; font-size: .85rem; color: var(--ink-3); }

/* ============================================================
   Sections — separated by ground colour and air, not by a rule
   ============================================================ */
.section--alt { background: var(--paper-2); }
.section__in {
  max-width: var(--wide); margin-inline: auto;
  padding: clamp(3.4rem, 8vw, 6.5rem) clamp(1rem, 4vw, 2.5rem);
  display: grid; gap: .6rem;
}
@media (min-width: 1000px) {
  .section__in { grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0; }
  .section__no { position: sticky; top: 4.6rem; align-self: start; }
}
/* The § numeral keeps its short vermillion tick. It is a mark on
   the page, not a compartment edge — the one hairline that earns
   its keep. */
.section__no {
  font-size: .68rem; letter-spacing: .1em; color: var(--acc);
  margin-bottom: .4rem;
}
.section__no span {
  display: inline-block;
  border-top: 2px solid var(--acc); padding-top: .35rem;
}
.section__lede {
  margin-top: 1.15rem; max-width: var(--measure);
  color: var(--ink-2);
  font-size: 1.03em;
}

/* ============================================================
   Pipeline — four cards, chevrons floating in the gaps
   ============================================================ */
.pipe {
  --pipe-gap: clamp(1rem, 2.2vw, 1.5rem);
  margin-top: clamp(2.2rem, 4.5vw, 3.2rem);
  display: grid; gap: var(--pipe-gap);
}
@media (min-width: 780px) { .pipe { grid-template-columns: repeat(4, 1fr); } }
.pipe__step {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow-s), var(--ring);
  padding: 1.35rem 1.35rem 1.55rem;
  position: relative;
}
.pipe__step::after {
  content: ""; position: absolute;
  width: 9px; height: 9px;
  border: solid var(--acc); border-width: 1.5px 1.5px 0 0;
}
@media (min-width: 780px) {
  .pipe__step::after {
    right: calc(var(--pipe-gap) / -2 - 4.5px);
    top: 1.9rem; transform: rotate(45deg); z-index: 2;
  }
}
@media (max-width: 779px) {
  .pipe__step::after {
    bottom: calc(var(--pipe-gap) / -2 - 4.5px);
    left: 1.5rem; transform: rotate(135deg); z-index: 2;
  }
}
.pipe__step:last-child::after { display: none; }
.pipe__step:nth-child(1) { --d: 0ms; }
.pipe__step:nth-child(2) { --d: 90ms; }
.pipe__step:nth-child(3) { --d: 180ms; }
.pipe__step:nth-child(4) { --d: 270ms; }
.pipe__no {
  display: block; font-size: .68rem; color: var(--acc);
  letter-spacing: .1em; margin-bottom: .6rem;
}
.pipe__step h3 {
  font-size: 1.06rem; font-weight: 600; letter-spacing: -.012em;
  margin-bottom: .4rem;
}
.pipe__step p { font-size: .92rem; line-height: 1.55; color: var(--ink-2); }

/* ============================================================
   Pull quote — a tinted panel, not a ruled margin
   ============================================================ */
.pull {
  margin-top: clamp(2.4rem, 5vw, 3.6rem);
  background: var(--acc-soft);
  border-radius: var(--r);
  padding: clamp(1.5rem, 4vw, 2.4rem);
  max-width: 52rem;
}
.pull p {
  font-size: clamp(1.35rem, 1rem + 1.7vw, 2.1rem);
  line-height: 1.16; letter-spacing: -.02em;
  text-wrap: balance;
}
.pull em { font-style: italic; color: var(--acc); }
.pull footer {
  margin-top: 1rem; font-size: .93rem; color: var(--ink-2);
  max-width: 42rem; line-height: 1.55;
}

/* ============================================================
   Spec tabs — a segmented control, not a ruled tab strip
   ============================================================ */
.tabs { margin-top: clamp(2rem, 4.2vw, 2.8rem); }
/* Without JS the tabs cannot switch, so the panels simply stack and
   each announces its own spec instead. */
.tabs__list { display: none; }
.js .tabs__list {
  display: flex; flex-wrap: wrap; gap: .3rem;
  width: fit-content; max-width: 100%;
  background: var(--paper-3);
  border-radius: 100px;
  padding: .3rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.1rem);
}
@media (max-width: 420px) { .js .tabs__list { border-radius: var(--r); } }
.panel__spec {
  font-family: var(--font-mono); font-size: .82rem; font-weight: 600;
  margin-bottom: 1.2rem;
}
.panel__spec span { color: var(--acc); }
.js .panel__spec { display: none; }
.tab {
  cursor: pointer;
  font-size: .78rem; letter-spacing: -.005em;
  padding: .5rem 1.05rem;
  color: var(--ink-2);
  border-radius: 100px;
  transition: color .18s, background .18s, box-shadow .18s;
}
.tab:hover { color: var(--ink); }
/* The version reads quieter than the name by colour, not by opacity. */
.tab__ver { color: var(--ink-3); }
.tab[aria-selected="true"] {
  color: var(--ink);
  background: var(--card);
  font-weight: 500;
  box-shadow: var(--shadow-s), var(--ring);
}
.tab[aria-selected="true"] .tab__ver { color: var(--acc); }
.panel[hidden] { display: none; }
.panel + .panel { margin-top: 2.4rem; }
.js .panel + .panel { margin-top: 0; }
.panel__grid { display: grid; gap: clamp(1.3rem, 3vw, 2.4rem); align-items: start; }
@media (min-width: 900px) { .panel__grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); } }
.panel__notes p { color: var(--ink-2); font-size: .98em; }
.panel__notes .h3 { margin-bottom: .5rem; }

/* the distilled grammar, one card per construct */
.grammar {
  margin: 1.3rem 0 1.4rem;
  display: grid; gap: .55rem;
}
.grammar > div {
  display: grid; gap: .25rem .9rem;
  background: var(--card);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-s), var(--ring);
  padding: .8rem .95rem .9rem;
}
@media (min-width: 480px) { .grammar > div { grid-template-columns: 9.5rem minmax(0, 1fr); } }
.grammar dt {
  font-family: var(--font-mono); font-size: .72rem;
  letter-spacing: .02em; color: var(--ink); padding-top: .12rem;
  overflow-wrap: anywhere;
}
.grammar dt code { background: none; border: 0; padding: 0; font-size: 1em; color: var(--acc); }
.grammar dd { margin: 0; font-size: .92rem; color: var(--ink-2); line-height: 1.5; }

.verbs { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; margin-top: 1.1rem; }
.verbs__lbl {
  font-size: .6rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-3); margin-right: .35rem;
}
/* The transparent border is load-bearing: `specs/specs.css` flips
   `border-color` alone to mark a hosted verb. */
.verbs code {
  font-size: .72rem; padding: .24rem .6rem;
  border-radius: 100px;
  border: 1px solid transparent;
  background: var(--card);
  box-shadow: var(--shadow-s), var(--ring);
  color: var(--ink);
}
.verbs code.is-hosted { color: var(--acc); border-color: var(--acc-line); background: var(--acc-soft); }
.verbs--sm { margin-top: .9rem; }
.fineprint { margin-top: 1rem; font-size: .86rem !important; color: var(--ink-3) !important; }
/* --ink-3 over the code chip's own tint lands at 4.4:1 on the dark
   variant; the verb being named is the point of the sentence. */
.fineprint code { color: var(--ink-2); }

/* "Read the full sheet" link under each spec panel and under the shared
   conventions — the only bridge from this page into site/specs/. */
.panel__more { margin-top: 1.5rem; }
.conventions .panel__more { margin-top: 1.6rem; }

.conventions { margin-top: clamp(2.6rem, 5.5vw, 3.8rem); }
.conventions ul {
  margin-top: 1.2rem;
  display: grid; gap: 1rem;
}
@media (min-width: 760px) { .conventions ul { grid-template-columns: 1fr 1fr; gap: 1.1rem; } }
.conventions li {
  font-size: .93rem; line-height: 1.55; color: var(--ink-2);
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow-s), var(--ring);
  padding: 1.1rem 1.25rem 1.2rem;
}
.conventions b { color: var(--ink); }

/* ============================================================
   Agents
   ============================================================ */
.agent__grid {
  margin-top: clamp(2rem, 4.2vw, 3rem);
  display: grid; gap: clamp(1.4rem, 3vw, 2.4rem); align-items: start;
}
@media (min-width: 940px) { .agent__grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr); } }
.agent__points { display: grid; gap: 1rem; }
.agent__points p { font-size: .95rem; line-height: 1.55; color: var(--ink-2); }
.agent__points li {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow-s), var(--ring);
  padding: 1.3rem 1.4rem 1.4rem;
}

/* ============================================================
   Tiers
   ============================================================ */
.tiers {
  margin-top: clamp(2rem, 4.2vw, 2.9rem);
  display: grid; gap: clamp(1rem, 2.4vw, 1.5rem);
}
@media (min-width: 760px) { .tiers { grid-template-columns: 1fr 1fr; } }
.tier {
  background: var(--card);
  border-radius: var(--r);
  box-shadow: var(--shadow-s), var(--ring);
  padding: 1.6rem 1.6rem 1.8rem;
}
/* The metered tier is the tinted card among the white ones — the
   accent doing the work a heading label used to do. */
.tier--hosted { background: var(--acc-soft); }
.tier__tag {
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .8rem;
}
.tier__tag--acc { color: var(--acc); }
.tier p:last-child { font-size: .95rem; color: var(--ink-2); line-height: 1.6; }
.status {
  margin-top: 1.9rem; font-size: .92rem; color: var(--ink-3);
  max-width: 46rem; line-height: 1.7;
}

/* ============================================================
   Footer
   ============================================================ */
.foot {
  background: var(--paper);
  padding: clamp(3rem, 6.5vw, 4.5rem) clamp(1rem, 4vw, 2.5rem) 1.8rem;
}
.foot__in {
  max-width: var(--wide); margin-inline: auto;
  display: grid; gap: 2.2rem;
}
@media (min-width: 760px) { .foot__in { grid-template-columns: minmax(0, 2fr) 1fr 1fr; gap: 2.5rem; } }
.foot__name {
  font-family: var(--font-mono); font-weight: 600; font-size: .86rem;
  margin: .8rem 0 .5rem;
}
.foot__tag { font-size: .95rem; color: var(--ink-3); max-width: 30rem; font-style: italic; line-height: 1.5; }
.foot__lbl {
  font-size: .62rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-3); margin-bottom: .8rem;
}
.foot__links a {
  display: block; font-family: var(--font-mono); font-size: .74rem;
  color: var(--ink-2); text-decoration: none; padding: .2rem 0;
  transition: color .18s;
  overflow-wrap: anywhere;
}
.foot__links a:hover { color: var(--acc); }
/* The one rule left on the page: the line a colophon closes with. */
.foot__rule {
  max-width: var(--wide); margin: 2.8rem auto 0;
  padding-top: 1.1rem; border-top: 1px solid var(--rule-soft);
  display: flex; flex-wrap: wrap; gap: .4rem 1.6rem;
  font-family: var(--font-mono); font-size: .64rem;
  letter-spacing: .04em; color: var(--ink-3);
}
.foot__rule span:last-child { margin-left: auto; }

/* ============================================================
   Reveal
   ============================================================ */
.js .reveal { opacity: 0; transform: translateY(12px); }
.js .reveal.in {
  opacity: 1; transform: none;
  transition: opacity .7s cubic-bezier(.2,.7,.3,1) var(--d, 0ms),
              transform .7s cubic-bezier(.2,.7,.3,1) var(--d, 0ms);
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .01ms !important; }
}
