/* ============================================================
 * FIELDNOTE — long-form components within the Recurse design system
 * ------------------------------------------------------------
 * Every rule is scoped under ``.fieldnote`` so a post document can be
 * rendered INSIDE the app shell (marketing layout, real nav/footer)
 * without its base styles leaking onto the surrounding chrome. Token
 * blocks (:root/.dark) stay global — they are variables only.
 *
 * Extends Recurse's shared site tokens to long-form posts and use-case pages:
 *   - neutral inverse surfaces with the Recurse purple accent
 *   - the site's display/sans fonts and JetBrains Mono for eyebrows,
 *     section numbers, traces, and every measured value
 *   - figures live on shared inverse panels with shared hairlines
 *   - data colors come from the same semantic palette as the site
 *
 * Article layout and palette: app/blog/article.css.
 * Authoring instructions: content/blog/README.md.
 * ============================================================ */

/* ---- tokens ----
 * Scoped to .fieldnote, not :root. Three of these names (--muted,
 * --accent, --card) also exist in the app's design system with
 * different meanings, so declaring them globally repainted the site
 * chrome on any page that loads this file — the nav's bg-muted pill
 * turned into fieldnote's muted *text* colour.
 */
.fieldnote {
  --bg: var(--surface-inverse);
  --well: var(--surface-inverse-raised);
  --ink: var(--fg-inverse);
  --body: var(--muted-inverse);
  --muted: var(--muted-inverse);
  --line: var(--line-inverse);
  --accent: var(--accent-bright);
  --accent-strong: var(--accent-bright);
  --accent-text: var(--accent-fg);
  --hl-bg: var(--accent);
  --hl-ink: var(--accent-fg);
  --card: var(--surface-inverse-raised);

  --panel: var(--bar-bg);
  --panel-mid: var(--surface-inverse-raised);
  --panel-line: var(--line-inverse);
  --panel-grid: var(--line-inverse-soft);
  --panel-ink: var(--bar-fg);
  --panel-dim: var(--muted-inverse);

  --s1: var(--accent-bright);
  --s2: var(--data-blue);
  --s3: var(--warning);
  --s4: var(--success);
  --s2-band: rgba(95, 168, 232, 0.16);

  /* status - the mv2 trace colors; always icon + word */
  --ok: var(--success);
  --bad: var(--danger);
  --review: var(--warning);

  --sans: var(--font-sans), system-ui, sans-serif;
  --mono: var(--font-mono), ui-monospace, monospace;
}

/* ---- base ---- */
.fieldnote * { box-sizing: border-box; }
html { scroll-behavior: smooth; }
.fieldnote {
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  padding: 0 24px 96px;
}

/* Links to posts whose release day has not arrived. The route handler
 * strips the href and marks them; the affordance lives here rather than
 * in an injected <style>, because the page hosts a document's <body>
 * only — anything appended to </head> never reaches the browser. */
.fieldnote a[data-unpublished] { pointer-events: none; cursor: default; opacity: 0.55; }
.fieldnote a[data-unpublished] small::after { content: " · coming soon"; }
.fieldnote a[data-unpublished] .meta::after { content: " · coming soon"; }

/* `main` in a standalone file; `.doc` once hosted, where the layout owns
 * the <main> landmark and this element is demoted (see document.ts). Both
 * must keep the measure, the centring and the section counter. */
.fieldnote :is(main, .doc) { max-width: 720px; margin: 0 auto; counter-reset: sec; }
.fieldnote a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  border-radius: 2px;
  transition: text-decoration-color 0.2s;
}
.fieldnote a:hover { text-decoration-color: var(--accent); }
.fieldnote a:focus-visible, .fieldnote summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .fieldnote * { transition: none !important; animation: none !important; }
}

/* ================= C1 - post header ================= */
.fieldnote header.post, .fieldnote header.uc { padding: 76px 0 12px; }
.fieldnote .eye {
  font: 500 11px var(--mono);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.58;
  margin: 0 0 26px;
}
.fieldnote h1 {
  font-size: clamp(40px, 6.4vw, 66px);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.05em;
  color: var(--ink);
  margin: 0 0 22px;
  text-wrap: balance;
}
.fieldnote .standfirst {
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  margin: 0 0 22px;
  max-width: 570px;
  text-wrap: pretty;
}
.fieldnote .proofline {
  font: 500 10.5px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 26px;
}
.fieldnote .byline {
  font: 400 12px var(--mono);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

/* ================= C17 - header banner ================= */
.fieldnote figure.hero {
  width: min(940px, calc(100vw - 48px));
  margin: 30px 0 0 50%;
  transform: translateX(-50%);
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  overflow: hidden;
}
.fieldnote figure.hero svg, .fieldnote figure.hero img { display: block; width: 100%; height: auto; }
.fieldnote figure.hero img.pixel { image-rendering: pixelated; }

/* ================= C2 - prose ================= */
.fieldnote h2 {
  counter-increment: sec;
  font-size: clamp(28px, 3.8vw, 40px);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.045em;
  color: var(--ink);
  margin: 72px 0 18px;
  text-wrap: balance;
}
/* The closing call to action is not a numbered section of the argument. */
.fieldnote footer h2 { counter-increment: none; }
.fieldnote footer h2::before { content: none; }
.fieldnote h2::before {
  content: counter(sec, decimal-leading-zero) " /";
  display: block;
  font: 500 10.5px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0.46;
  margin-bottom: 14px;
}
.fieldnote .mline {
  font: 500 12px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 34px 0 10px;
}
.fieldnote h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); margin: 32px 0 10px; }
.fieldnote p { margin: 0 0 18px; max-width: 640px; }
.fieldnote .lead { font-size: 19px; line-height: 1.6; }
.fieldnote .punch { font-weight: 600; color: var(--ink); max-width: 620px; }
.fieldnote strong { color: var(--ink); font-weight: 600; }
.fieldnote ol { padding-left: 22px; margin: 0 0 18px; }
.fieldnote ol li { margin-bottom: 8px; max-width: 600px; }
.fieldnote ul { list-style: none; padding: 0; margin: 22px 0; max-width: 640px; }
.fieldnote ul li { padding: 10px 0; margin: 0; border-top: 1px solid var(--line); }
.fieldnote ul li:last-child { border-bottom: 1px solid var(--line); }
.fieldnote ul li b { color: var(--ink); font-weight: 600; }
.fieldnote code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--well);
  color: var(--ink);
  padding: 0.125rem 0.375rem;
  border-radius: 0.375rem;
}

/* ================= C3 - quotes ================= */
.fieldnote blockquote { margin: 26px 0; padding: 2px 0 2px 22px; border-left: 2px solid var(--accent); max-width: 560px; }
.fieldnote blockquote p { margin: 0 0 6px; font-size: 18px; color: var(--ink); }
.fieldnote blockquote cite { font: 400 11.5px var(--mono); font-style: normal; letter-spacing: 0.04em; color: var(--muted); }
.fieldnote .pull {
  margin: 44px 0;
  font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.04em;
  color: var(--ink);
  max-width: 22ch;
  text-wrap: balance;
}
.fieldnote .pull b { font-weight: inherit; background: var(--hl-bg); color: var(--hl-ink); padding: 0 0.12em; }

/* ================= C4 - callout ================= */
.fieldnote .callout { margin: 26px 0; padding: 20px 24px; background: var(--well); border-radius: 16px; max-width: 640px; }
.fieldnote .callout .callout-tag {
  font: 500 10.5px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  display: block;
  margin-bottom: 8px;
}
.fieldnote .callout p { max-width: none; }
.fieldnote .callout p:last-child { margin-bottom: 0; }
.fieldnote ul.callouts { border: none; max-width: 640px; }
.fieldnote ul.callouts li { display: flex; gap: 16px; align-items: baseline; padding: 12px 0; }
.fieldnote ul.callouts b {
  font: 500 10.5px var(--mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

/* ================= C6 - the instrument panel ================= */
.fieldnote figure.panel {
  margin: 32px 0;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 18px;
  padding: 24px 28px 20px;
  color: var(--panel-ink);
  font-family: var(--mono);
}
.fieldnote figure.panel.wide { width: min(940px, calc(100vw - 48px)); margin-left: 50%; transform: translateX(-50%); }
.fieldnote .panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font: 500 10px var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.fieldnote .panel-head .fig { color: var(--s1); }
.fieldnote .panel-head .ctx { color: var(--panel-dim); }
.fieldnote .panel-title { font: 600 13.5px var(--mono); color: var(--panel-ink); margin: -8px 0 18px; }
.fieldnote figure.panel figcaption {
  font: 400 11.5px/1.7 var(--mono);
  color: var(--panel-dim);
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--panel-grid);
}
.fieldnote figure.panel figcaption b { color: var(--panel-ink); font-weight: 500; }
.fieldnote figure.panel code { background: var(--panel-mid); color: var(--panel-ink); }
.fieldnote .scroll { overflow-x: auto; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.2) transparent; }

/* ================= C5 - stat row ================= */
.fieldnote .stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 2px; }
.fieldnote .stat { background: var(--panel-mid); border-radius: 10px; padding: 16px 16px 13px; }
.fieldnote .stat b {
  display: block;
  font-size: 26px;
  font-weight: 600;
  color: var(--s1);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  font-family: var(--sans);
}
.fieldnote .stat span { font-size: 10.5px; color: var(--panel-dim); line-height: 1.5; display: block; margin-top: 5px; letter-spacing: 0.04em; }
/* semantic stat colors: caught = bad, iterations = review, shipped = ok */
.fieldnote .stat.bad b { color: var(--bad); }
.fieldnote .stat.review b { color: var(--review); }
.fieldnote .stat.info b { color: var(--s2); }
.fieldnote .stat.ok b { color: var(--ok); }

/* ================= C10 - chips & legend ================= */
.fieldnote .legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 11px; color: var(--panel-dim); margin: 0 0 16px; }
.fieldnote .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.fieldnote .chip {
  display: inline-block;
  font-size: 10.5px;
  letter-spacing: 0.04em;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  padding: 2px 10px;
  color: var(--panel-dim);
  margin: 0 4px 4px 0;
}
.fieldnote .chip.status { border: none; font-weight: 500; padding-left: 9px; }
.fieldnote .chip.ok { background: rgba(127, 199, 154, 0.14); color: var(--ok); }
.fieldnote .chip.review { background: rgba(245, 193, 61, 0.13); color: var(--review); }
.fieldnote .chip.bad { background: rgba(232, 144, 127, 0.14); color: var(--bad); }
.fieldnote .chip.ok::before { content: "✓ "; }
.fieldnote .chip.bad::before { content: "✕ "; }
.fieldnote .chip.review::before { content: "◔ "; }

/* ================= C7 - bar chart ================= */
.fieldnote .plot {
  position: relative;
  height: 190px;
  display: grid;
  grid-auto-flow: column;
  align-items: end;
  gap: 22px;
  padding: 0 6px;
  border-bottom: 1px solid var(--panel-line);
  background: repeating-linear-gradient(to top, transparent 0 47px, var(--panel-grid) 47px 48px);
}
.fieldnote .grp { display: flex; align-items: flex-end; gap: 2px; height: 100%; }
.fieldnote .bar { flex: 1 1 24px; min-width: 14px; max-width: 36px; background: var(--s1); border-radius: 4px 4px 0 0; position: relative; }
.fieldnote .bar.s2 { background: var(--s2); }
.fieldnote .bar.s3 { background: var(--s3); }
.fieldnote .bar.s4 { background: var(--s4); }
.fieldnote .bar .v {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  color: var(--panel-ink);
  font-variant-numeric: tabular-nums;
  opacity: 0;
  transition: opacity 120ms;
}
.fieldnote .bar:hover .v, .fieldnote .bar.show .v { opacity: 1; }
.fieldnote .refline { position: absolute; left: 0; right: 0; border-top: 1.5px dashed rgba(242, 244, 238, 0.4); }
.fieldnote .reftag {
  position: absolute;
  right: 6px;
  transform: translateY(-125%);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--panel-dim);
  background: var(--panel);
  padding: 0 4px;
  border-radius: 3px;
}
.fieldnote .axis {
  display: grid;
  grid-auto-flow: column;
  gap: 22px;
  padding: 8px 6px 0;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--panel-dim);
  text-align: center;
}

/* ================= C8 - track chart ================= */
.fieldnote .tracks { display: grid; gap: 12px; }
.fieldnote .track { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; }
.fieldnote .track .feat { font-size: 11px; color: var(--panel-dim); letter-spacing: 0.04em; }
.fieldnote .rail { position: relative; height: 22px; background: var(--panel-mid); border-radius: 8px; }
.fieldnote .band { position: absolute; top: 3px; bottom: 3px; background: var(--s2-band); border: 1px solid var(--s2); border-radius: 6px; }
.fieldnote .dot {
  position: absolute;
  top: 50%;
  width: 10px;
  height: 10px;
  transform: translate(-50%, -50%);
  background: var(--s1);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--panel);
}
.fieldnote .dot.out { background: var(--bad); }
.fieldnote .dot.out::after {
  content: "out of band";
  position: absolute;
  left: 14px;
  top: -2px;
  font-size: 10px;
  color: var(--bad);
  white-space: nowrap;
}

/* ================= C9 - data table ================= */
.fieldnote table.data { border-collapse: collapse; width: 100%; font-size: 12.5px; }
.fieldnote table.data th, .fieldnote table.data td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--panel-grid);
  font-variant-numeric: tabular-nums;
}
.fieldnote table.data th { font-size: 10px; letter-spacing: 0.13em; text-transform: uppercase; color: var(--panel-dim); font-weight: 500; }
.fieldnote table.data td { color: var(--panel-ink); }
.fieldnote table.data tr:last-child td { border-bottom: none; }
.fieldnote table.data .num { text-align: right; }
.fieldnote details.tbl summary { cursor: pointer; font-size: 11.5px; color: var(--panel-dim); padding: 10px 0 2px; list-style: none; }
.fieldnote details.tbl summary::before { content: "▸ "; color: var(--s1); }
.fieldnote details.tbl[open] summary::before { content: "▾ "; }

/* ================= C16 - run trace (the mv2 signature) ================= */
.fieldnote .trace { font: 400 12.5px/2.1 var(--mono); }
.fieldnote .trace .row { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fieldnote .trace .k { display: inline-block; width: 7.5em; color: var(--s1); }
.fieldnote .trace .r { color: var(--panel-ink); }
.fieldnote .trace .dim { color: var(--panel-dim); }
.fieldnote .trace .ok { color: var(--ok); }
.fieldnote .trace .bad { color: var(--bad); }

/* ================= C11 - process strip ================= */
.fieldnote .flow { display: flex; flex-wrap: wrap; gap: 26px 30px; }
.fieldnote .flow .step { position: relative; flex: 1 1 140px; min-width: 130px; background: var(--panel-mid); border-radius: 10px; padding: 14px 16px; }
.fieldnote .flow .step b {
  display: block;
  font: 500 10.5px var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--s1);
  margin-bottom: 6px;
}
.fieldnote .flow .step span { font-size: 11px; color: var(--panel-dim); line-height: 1.55; display: block; }
.fieldnote .flow .step:not(:last-child)::after {
  content: "→";
  position: absolute;
  right: -23px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--panel-dim);
  font-size: 14px;
}
.fieldnote .flow.loop .step:last-child::after {
  content: "⟲";
  position: absolute;
  right: -23px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--s1);
  font-size: 15px;
}
/* color-keyed loop stages */
.fieldnote .flow .step.k1 { box-shadow: inset 0 2px 0 var(--s1); }
.fieldnote .flow .step.k1 b { color: var(--s1); }
.fieldnote .flow .step.k2 { box-shadow: inset 0 2px 0 var(--s2); }
.fieldnote .flow .step.k2 b { color: var(--s2); }
.fieldnote .flow .step.k3 { box-shadow: inset 0 2px 0 var(--s3); }
.fieldnote .flow .step.k3 b { color: var(--s3); }
.fieldnote .flow .step.k4 { box-shadow: inset 0 2px 0 var(--s4); }
.fieldnote .flow .step.k4 b { color: var(--s4); }

/* ================= C12 - layer stack ================= */
.fieldnote .stack { display: grid; gap: 2px; }
.fieldnote .stack .layer {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: baseline;
  background: var(--panel-mid);
  border-radius: 10px;
  padding: 13px 16px;
}
.fieldnote .stack .layer .no { font-size: 10.5px; color: var(--panel-dim); letter-spacing: 0.1em; }
/* Card, layer and author titles are component labels, not sections of
 * the document. As <h4> they injected 33 entries into the heading
 * outline and produced h2 -> h4 skips on every content page; as <p> they
 * style identically and leave the outline to real section headings. */
.fieldnote .stack .layer :is(h4, .h4) { margin: 0; font: 600 12.5px var(--mono); color: var(--panel-ink); }
.fieldnote .stack .layer p { margin: 4px 0 0; font-size: 11px; color: var(--panel-dim); max-width: none; line-height: 1.55; }
.fieldnote .stack .layer .measure {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--panel-dim);
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.fieldnote .stack .layer.kept { box-shadow: inset 2px 0 0 var(--ok); }
.fieldnote .stack .layer.lost { box-shadow: inset 2px 0 0 var(--bad); opacity: 0.72; }

/* ================= C13 - card grid ================= */
.fieldnote .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr)); gap: 2px; counter-reset: card; }
.fieldnote .card { background: var(--panel-mid); border-radius: 10px; padding: 16px; }
.fieldnote .card :is(h4, .h4) { margin: 0 0 6px; font: 600 12.5px var(--mono); color: var(--panel-ink); }
.fieldnote .card p { margin: 0; font-size: 11.5px; line-height: 1.6; color: var(--panel-dim); max-width: none; }
.fieldnote .cards.numbered .card::before {
  counter-increment: card;
  content: counter(card, decimal-leading-zero);
  display: block;
  font-size: 10px;
  letter-spacing: 0.13em;
  color: var(--panel-dim);
  margin-bottom: 10px;
  font-family: var(--mono);
}
.fieldnote .cards.numbered .card:nth-child(1)::before { color: var(--s1); }
.fieldnote .cards.numbered .card:nth-child(2)::before { color: var(--s2); }
.fieldnote .cards.numbered .card:nth-child(3)::before { color: var(--s3); }
.fieldnote .card.win { box-shadow: inset 0 2px 0 var(--ok); }
.fieldnote .card.lose { box-shadow: inset 0 2px 0 var(--bad); }
.fieldnote .card .big {
  font-size: 26px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  display: block;
  margin: 2px 0 6px;
  font-family: var(--sans);
}
.fieldnote .card.win .big { color: var(--ok); }
.fieldnote .card.lose .big { color: var(--bad); }
.fieldnote .card .ver {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--s2);
  border: 1px solid var(--panel-line);
  border-radius: 5px;
  padding: 2px 7px;
  margin-bottom: 10px;
}

/* ================= C14 - domain media ================= */
.fieldnote .gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; }
.fieldnote .shot { margin: 0; }
.fieldnote .shot svg, .fieldnote .shot img { width: 100%; height: auto; display: block; border-radius: 10px; }
.fieldnote .shot img { image-rendering: pixelated; }
.fieldnote .shot figcaption { font-size: 10.5px; color: var(--panel-dim); line-height: 1.55; margin-top: 9px; border: none; padding: 0; }
.fieldnote .shot figcaption b {
  display: block;
  margin-bottom: 3px;
  font-size: 10px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-weight: 500;
}
.fieldnote .shot.rejected figcaption b { color: var(--bad); }
.fieldnote .shot.accepted figcaption b { color: var(--ok); }

.fieldnote .board { display: grid; grid-template-columns: repeat(12, 22px); gap: 2px; width: max-content; margin: 0 auto; }
.fieldnote .board i { width: 22px; height: 22px; border-radius: 5px; background: var(--panel-mid); position: relative; }
.fieldnote .board i.c1 { background: var(--s1); }
.fieldnote .board i.c2 { background: var(--s2); }
.fieldnote .board i.c3 { background: var(--s3); }
.fieldnote .board i.c4 { background: var(--s4); }
.fieldnote .board i.goal::after { content: ""; position: absolute; inset: 6px; border-radius: 50%; background: var(--panel); opacity: 0.85; }
.fieldnote .board i.void { background: transparent; }

.fieldnote .mount {
  display: grid;
  place-items: center;
  min-height: 220px;
  border: 1.5px dashed var(--panel-line);
  border-radius: 12px;
  font-size: 11.5px;
  color: var(--panel-dim);
  text-align: center;
  line-height: 1.8;
  letter-spacing: 0.04em;
}

/* ================= C15 - series footer + CTA ================= */
.fieldnote footer.post { margin-top: 88px; padding-top: 26px; border-top: 1px solid var(--line); }
.fieldnote .series-nav { display: flex; gap: 14px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.fieldnote .series-nav a {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px 20px;
  color: inherit;
  flex: 1 1 250px;
  text-decoration: none;
  transition: border-color 0.25s, transform 0.25s;
}
.fieldnote .series-nav a:hover { border-color: var(--ink); transform: translateY(-2px); }
.fieldnote .series-nav small {
  display: block;
  font: 500 9.5px var(--mono);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}
.fieldnote .series-nav span { font-size: 15.5px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.fieldnote .cta-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 0 0 24px; }
.fieldnote .button {
  height: 46px;
  display: inline-flex;
  align-items: center;
  padding: 0 21px;
  border-radius: 999px;
  background: var(--accent-strong);
  color: var(--accent-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}
.fieldnote .button:hover { filter: brightness(1.05); }
/* Contrast is stated, not dimmed. `opacity` blends the inherited colour
 * toward whatever is behind it, so the effective ratio depends on the
 * ground and cannot be reasoned about: this rule measured 3.94:1 on the
 * page and 3.4:1 on the accent band, both below the 4.5 AA floor, while
 * every token it inherited from passes on its own. */
.fieldnote .textlink { color: var(--muted); text-decoration: none; font-size: 13px; }
.fieldnote .textlink:hover { color: var(--ink); }
.fieldnote .footer-note {
  font: 400 10px var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

/* series list — the use-case "read the series" block */
.fieldnote .series-list { display: grid; gap: 14px; margin: 40px 0 0; }
/* Three-across variant: the entry point to a series reads as a choice of
 * routes, so the posts sit side by side rather than as a reading order.
 * Breaks the 720px measure the same way a wide panel does. */
.fieldnote .series-list.cols {
  width: min(940px, calc(100vw - 48px));
  margin-left: 50%;
  transform: translateX(-50%);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.fieldnote .series-list.cols a {
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 10px;
}
@media (max-width: 760px) {
  .fieldnote .series-list.cols { grid-template-columns: minmax(0, 1fr); }
}
.fieldnote .series-list a {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  align-items: baseline;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 24px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s, transform 0.25s;
}
.fieldnote .series-list a:hover { border-color: var(--ink); transform: translateY(-2px); }
.fieldnote .series-list .no { font: 500 11px var(--mono); letter-spacing: 0.1em; color: var(--muted); }
.fieldnote .series-list h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--ink); }
.fieldnote .series-list p { margin: 0 0 10px; font-size: 14px; line-height: 1.6; color: var(--muted); max-width: none; }
.fieldnote .series-list .meta {
  font: 500 9.5px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  opacity: 0.8;
}

.fieldnote .hero-inner { position: relative; z-index: 1; max-width: 840px; margin: 0 auto; }
.fieldnote .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 5px 14px;
  margin: 0 0 26px;
  font: 500 10.5px var(--mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent-strong) 10%, transparent);
}
.fieldnote .hero-badge::before { content: "◆"; font-size: 8px; }
.fieldnote .hero-dek {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.55;
  color: var(--muted);
  /* 704 in the 840px hero leaves ~8% of side margin, down from ~13%.
   * Post heroes are unaffected: .page-hero.split sets its own measure. */
  max-width: 704px;
  margin: 0 auto 26px;
  text-wrap: pretty;
}
.fieldnote .hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px 20px;
  font: 400 12px var(--mono);
  color: var(--muted);
}
.fieldnote .hero-meta .sep { opacity: 0.4; }
/* ================= C18b - level-design visual argument ================= */
.fieldnote figure.level-design-transition.is-dark {
  background: var(--code-bg);
  border: 1px solid rgb(255 255 255 / 16%);
  color: var(--code-text);
  margin: 88px 0 108px 50%;
  overflow: hidden;
  position: relative;
  transform: translateX(-50%);
  width: min(1120px, calc(100vw - 48px));
}
.fieldnote .level-design-transition-head {
  align-items: center;
  color: var(--code-muted);
  display: flex;
  font: 500 10px var(--mono);
  letter-spacing: .16em;
  padding: 15px 16px 10px;
  text-transform: uppercase;
}
.fieldnote svg.level-design-visual {
  background: var(--code-bg);
  border-block: 1px solid rgb(255 255 255 / 14%);
  display: block;
  height: auto;
  overflow: visible;
  width: 100%;
}
.fieldnote .level-design-transition figcaption {
  color: var(--code-muted);
  font: 400 15px/1.6 var(--sans);
  margin: 0 auto;
  max-width: 720px;
  padding: 24px 18px 28px;
}
.fieldnote .level-design-transition figcaption b {
  color: var(--code-text);
  display: block;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: -.02em;
  margin-bottom: 4px;
}
.fieldnote .ld-viz-fallback,
.fieldnote .ld-viz-note,
.fieldnote .ld-viz-title {
  fill: var(--code-text);
  font: 700 12px Helvetica, Arial, sans-serif;
  letter-spacing: 0;
}
.fieldnote :is(.ld-viz-note, .ld-viz-title).is-accent { fill: var(--code-text); }
.fieldnote .ld-viz-note.is-dead { fill: var(--code-text); }
.fieldnote .ld-viz-contour {
  stroke: #91b2c8;
  stroke-opacity: .22;
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
}
.fieldnote .ld-viz-trace {
  fill: none;
  stroke: var(--code-string);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.fieldnote .ld-viz-trace.is-explored { opacity: .82; stroke: var(--code-muted); stroke-width: 1; }
.fieldnote .ld-viz-iterate { fill: var(--code-string); }
.fieldnote .ld-viz-iterate.is-explored { fill: var(--code-muted); opacity: .82; }
.fieldnote .ld-viz-step {
  fill: none;
  stroke: var(--code-muted);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.fieldnote .ld-viz-step.is-origin,
.fieldnote .ld-viz-step.is-dead { stroke: var(--code-string); }
.fieldnote .ld-viz-step.is-selected { stroke: var(--code-string); }
.fieldnote .ld-viz-vector {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}
.fieldnote .ld-viz-vector-frame {
  fill: var(--code-bg);
  stroke: rgb(255 255 255 / 22%);
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
}
.fieldnote .ld-viz-cell-frame {
  fill: var(--code-bg);
  stroke: rgb(255 255 255 / 28%);
  stroke-width: .7;
  vector-effect: non-scaling-stroke;
}
.fieldnote .ld-viz-histogram-bar { fill: var(--code-flag); }
.fieldnote .ld-viz-candidate {
  fill: var(--code-key);
  opacity: .48;
}
.fieldnote .ld-viz-candidate.is-selected {
  fill: var(--code-string);
  opacity: 1;
  stroke: var(--code-bg);
  stroke-width: .8;
  vector-effect: non-scaling-stroke;
}
.fieldnote .ld-viz-dimension-label {
  fill: var(--code-text);
  font: 400 10px Helvetica, Arial, sans-serif;
}
.fieldnote .ld-viz-focus-label {
  fill: var(--code-string);
  font: 700 12px Helvetica, Arial, sans-serif;
}

.fieldnote .level-design-reading {
  border-top: 1px solid var(--line);
  margin: 74px 0 80px 50%;
  padding-top: 24px;
  transform: translateX(-50%);
  width: min(1040px, calc(100vw - 48px));
}
.fieldnote .level-design-reading-head {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 26px;
}
.fieldnote .level-design-reading-kicker {
  color: var(--accent);
  font: 500 10px var(--mono);
  letter-spacing: .13em;
  margin: 0;
  text-transform: uppercase;
}
.fieldnote .level-design-reading-head h3 {
  font-size: clamp(25px, 3.2vw, 36px);
  margin: 0;
  text-align: right;
}
.fieldnote .level-design-reading-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fieldnote .level-design-reading-card {
  border: 1px solid var(--line);
  border-radius: 17px;
  color: inherit;
  display: grid;
  grid-template-columns: 1fr auto;
  overflow: hidden;
  position: relative;
  text-decoration: none;
  transition: border-color .25s ease, transform .25s ease;
}
.fieldnote .level-design-reading-card:has(.level-design-reading-main:hover) { border-color: var(--ink); transform: translateY(-4px); }
.fieldnote .level-design-reading-main { color: inherit; display: grid; grid-column: 1 / -1; grid-template-columns: 1fr auto; text-decoration: none; }
.fieldnote .level-design-reading-repo {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--ink);
  display: flex;
  font: 600 12px var(--sans);
  gap: 8px;
  grid-column: 1 / -1;
  padding: 12px 18px;
  text-decoration: none;
  transition: background .2s ease;
}
.fieldnote .level-design-reading-repo:hover { background: var(--surface-2, rgba(255, 255, 255, .04)); }
.fieldnote .level-design-reading-repo span { white-space: nowrap; }
.fieldnote .level-design-reading-repo small { color: var(--muted); font: 500 10px var(--mono); margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fieldnote .level-design-reading-repo svg { flex: 0 0 auto; }
.fieldnote .level-design-reading-main img {
  aspect-ratio: 1;
  display: block;
  grid-column: 1 / -1;
  object-fit: cover;
  width: 100%;
}
.fieldnote .level-design-reading-main span {
  color: var(--muted);
  font: 500 9.5px var(--mono);
  grid-column: 1 / -1;
  letter-spacing: .1em;
  padding: 18px 18px 0;
  text-transform: uppercase;
}
.fieldnote .level-design-reading-main h3 {
  align-self: end;
  font-size: 19px;
  line-height: 1.08;
  margin: 9px 0 0;
  padding: 0 10px 20px 18px;
}
.fieldnote .level-design-reading-main i {
  align-self: end;
  color: var(--accent);
  font-style: normal;
  padding: 0 18px 20px 0;
}
.fieldnote .level-design-reading-all { display: flex; justify-content: flex-end; margin-top: 22px; }

@media (max-width: 760px) {
  .fieldnote .level-design-transition-head { align-items: flex-start; flex-direction: column; gap: 6px; }
  .fieldnote .level-design-reading-head { align-items: flex-start; flex-direction: column; gap: 10px; }
  .fieldnote .level-design-reading-head h3 { text-align: left; }
  .fieldnote .level-design-reading-grid { grid-template-columns: 1fr; }
  .fieldnote .level-design-reading-main { grid-template-columns: 140px minmax(0, 1fr) auto; }
  .fieldnote .level-design-reading-main img { aspect-ratio: 1; grid-column: 1; grid-row: 1 / 3; height: 140px; width: 140px; }
  .fieldnote .level-design-reading-main span { align-self: end; grid-column: 2 / -1; padding-top: 20px; }
  .fieldnote .level-design-reading-main h3 { grid-column: 2; padding-bottom: 20px; }
  .fieldnote .level-design-reading-main i { grid-column: 3; }
}
@media (max-width: 520px) {
  .fieldnote figure.level-design-transition,
  .fieldnote .level-design-reading { width: calc(100vw - 28px); }
  .fieldnote .level-design-reading-card { grid-template-columns: 104px 1fr auto; }
  .fieldnote .level-design-reading-main h3 { font-size: 17px; }
}

/* ================= C19 - author ================= */
.fieldnote .author-row { display: inline-flex; align-items: center; gap: 10px; }
.fieldnote .avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-strong);
  color: var(--accent-text);
  font: 700 11px var(--mono);
  letter-spacing: 0;
  flex: none;
}
.fieldnote .author-card {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 16px;
  margin: 64px 0 0;
}
.fieldnote .author-card .avatar { width: 46px; height: 46px; font-size: 15px; }
.fieldnote .author-card .who { flex: 1; }
.fieldnote .author-card :is(h4, .h4) {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.fieldnote .author-card .role {
  font: 500 10.5px var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.fieldnote .author-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: none;
}

/* The hero is a full-bleed panel; the article needs air under it rather
 * than butting the first paragraph against the panel edge. */
/* Demoted to .doc once hosted — see document.ts. */
.fieldnote .page-hero + :is(main, .doc) { padding-top: 60px; }
@media (max-width: 860px) {
  .fieldnote .page-hero + :is(main, .doc) { padding-top: 40px; }
}

/* The byline avatar may be an image (an agent's mark) or a monogram.
 * Pixel marks are square: a circular crop takes the antenna and the
 * head's corners with it, so image avatars get a soft square instead. */
.fieldnote img.avatar { object-fit: cover; background: var(--panel); border-radius: 7px; }
.fieldnote .author-card img.avatar { border-radius: 12px; }

/* The layer stack was sized for a two-digit number and a short chip.
 * Posts put a label in .no ("03 · Progression") and a full sentence in
 * .measure, which overflowed the panel and collided with the copy. */
.fieldnote .stack .layer {
  grid-template-columns: 118px minmax(0, 1fr);
  grid-template-areas: "no body" ". meas";
  gap: 0 14px;
  align-items: start;
  padding: 15px 18px 14px;
}
.fieldnote .stack .layer .no {
  grid-area: no;
  white-space: nowrap;
  padding-top: 1px;
  font-size: 10px;
}
/* The middle cell is the only child element without a class of its own. */
.fieldnote .stack .layer > div { grid-area: body; min-width: 0; }
.fieldnote .stack .layer .measure {
  grid-area: meas;
  margin-top: 12px;
  padding: 9px 0 0;
  border: 0;
  border-top: 1px solid var(--panel-line);
  border-radius: 0;
  max-width: none;
  white-space: normal;
  text-align: left;
  line-height: 1.55;
  letter-spacing: 0;
}
.fieldnote .stack .layer .measure::before {
  content: "MEASURED";
  /* Overridable: the slot holds a measurement in a post, but other
   * pages use it for a precondition or a status. */
  display: block;
  margin-bottom: 3px;
  font-size: 9px;
  letter-spacing: 0.14em;
  color: var(--s1);
}
.fieldnote .stack .layer .measure[data-label]::before { content: attr(data-label); }
@media (max-width: 760px) {
  .fieldnote .stack .layer {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "no" "body" "meas";
    gap: 6px 0;
  }
}

/* ================= C21 - annotated board =================
 * A real level rendered from its audit record, with numbered pins so a
 * list of criteria can point at the part of the board each one is about.
 * The board is an inline <svg class="lvl">; only the frame is styled here.
 */
.fieldnote .hyp-board { display: grid; grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 26px; align-items: start; }
.fieldnote .hyp-board .board-wrap { min-width: 0; }
.fieldnote svg.lvl {
  display: block;
  width: 100%;
  max-width: 312px;
  height: auto;
  overflow: visible;
}
/* Same renderer without the annotation layer, shown on its own. */
.fieldnote svg.lvl.plain { max-width: 340px; margin: 6px auto 0; }
@media (max-width: 760px) {
  .fieldnote .hyp-board { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .fieldnote .hyp-board svg.lvl { max-width: 100%; }
}
.fieldnote .hyp-board ol.hyp-legend { list-style: none; padding: 0; margin: 0; max-width: none; }
.fieldnote .hyp-board ol.hyp-legend li {
  display: flex; gap: 11px; align-items: baseline;
  padding: 9px 0; margin: 0; border: 0;
  font: 400 12px/1.6 var(--sans); color: var(--panel-dim); max-width: none;
}
.fieldnote .hyp-board ol.hyp-legend li + li { border-top: 1px solid var(--panel-grid); }
.fieldnote .hyp-board ol.hyp-legend b {
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--panel-ink); color: var(--panel);
  display: grid; place-items: center; font: 700 10px var(--mono);
}
.fieldnote .hyp-board ol.hyp-legend em { color: var(--panel-ink); font-style: normal; font-weight: 600; }
@media (max-width: 760px) {
  .fieldnote .hyp-board { grid-template-columns: 1fr; gap: 18px; }
}

/* ================= C24 - RNA inverse-folding study ================= */
.fieldnote .rna-use-case-hero { overflow: hidden; }
.fieldnote .rna-problem { scroll-margin-top: 76px; }
.fieldnote .rna-fold-story { display: grid; gap: 3px; }
.fieldnote .rna-story {
  min-width: 0;
  padding: 20px;
  background: var(--panel-mid);
  border-radius: 12px;
}
.fieldnote .rna-story.forward { box-shadow: inset 3px 0 0 var(--ok); }
.fieldnote .rna-story.inverse { box-shadow: inset 3px 0 0 var(--review); }
.fieldnote .rna-story-title { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.fieldnote .rna-story-title span {
  color: var(--s1);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.fieldnote .rna-story-title strong { color: var(--panel-ink); font: 600 12px/1.45 var(--mono); text-align: right; }
.fieldnote .rna-forward-path {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto 210px;
  align-items: center;
  gap: 18px;
  margin: 18px 0;
}
.fieldnote .rna-known,
.fieldnote .rna-search-space,
.fieldnote .rna-candidate-fan > div {
  min-width: 0;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--panel-line);
  border-radius: 9px;
}
.fieldnote .rna-known span,
.fieldnote .rna-search-space small { display: block; margin-bottom: 9px; color: var(--panel-dim); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.fieldnote .rna-known code,
.fieldnote .rna-candidate-fan code { display: block; padding: 0; overflow: hidden; color: var(--panel-ink); background: none; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
.fieldnote .rna-oracle { position: relative; color: var(--panel-ink); text-align: center; }
.fieldnote .rna-oracle b,
.fieldnote .rna-oracle small { display: block; }
.fieldnote .rna-oracle b { padding: 8px 12px; border: 1px solid var(--s1); border-radius: 999px; font: 600 10px var(--mono); }
.fieldnote .rna-oracle small { margin-top: 5px; color: var(--panel-dim); font-size: 8px; }
.fieldnote .rna-oracle i { position: absolute; right: -17px; top: 4px; color: var(--s1); font-style: normal; }
.fieldnote .rna-mini-diagram { display: grid; min-height: 190px; place-items: center; }
.fieldnote .rna-mini-diagram svg { display: block; width: min(100%, 190px); height: auto; overflow: visible; }
.fieldnote .rna-inverse-path {
  display: grid;
  grid-template-columns: 190px minmax(150px, .8fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  margin: 18px 0;
}
.fieldnote .rna-search-space { text-align: center; }
.fieldnote .rna-search-space b,
.fieldnote .rna-search-space span { display: block; }
.fieldnote .rna-search-space b { color: var(--review); font: 600 clamp(15px, 2vw, 20px)/1.25 var(--mono); }
.fieldnote .rna-search-space span { margin-top: 10px; color: var(--s1); font-size: 20px; }
.fieldnote .rna-search-space sup { font-size: .62em; }
.fieldnote .rna-candidate-fan { display: grid; gap: 7px; }
.fieldnote .rna-candidate-fan > div { position: relative; }
.fieldnote .rna-candidate-fan > div::before { content: ""; position: absolute; left: -17px; top: 50%; width: 16px; border-top: 1px solid var(--panel-line); }
.fieldnote .rna-candidate-fan span { display: block; margin-top: 5px; color: var(--panel-dim); font-size: 9px; }
.fieldnote .rna-candidate-fan span.bad { color: var(--bad); }
.fieldnote .rna-candidate-fan span.ok { color: var(--ok); }
.fieldnote .rna-why { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 14px 16px; border-radius: 9px; }
.fieldnote .rna-why.ok { background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
.fieldnote .rna-why.hard { background: color-mix(in srgb, var(--review) 10%, var(--panel)); }
.fieldnote .rna-why strong { color: var(--panel-ink); font: 600 11px/1.45 var(--mono); }
.fieldnote .rna-why p { margin: 0; color: var(--panel-dim); font-size: 11px; line-height: 1.55; }

.fieldnote figure.panel.rna-loop-story {
  overflow: hidden;
  padding: 0;
}
.fieldnote .rna-loop-story-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  color: var(--panel-ink);
}
.fieldnote .rna-loop-story-bar > span { display: flex; align-items: center; }
.fieldnote .rna-loop-story-label { gap: 9px; font: 500 12px/1.2 var(--mono); }
.fieldnote .rna-loop-story-label > i { color: var(--s1); font-style: normal; }
.fieldnote .rna-loop-story-label small { margin-left: 2px; color: var(--panel-dim); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.fieldnote .rna-loop-status { color: var(--panel-dim); font: 500 8px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.fieldnote .rna-loop-status.is-done { color: var(--ok); }
.fieldnote .rna-loop-toggle {
  min-height: 27px;
  margin-left: 12px;
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 6px;
  background: transparent;
  color: var(--panel-ink);
  cursor: pointer;
  font: 500 9px/1 var(--mono);
}
.fieldnote .rna-loop-toggle:hover { border-color: var(--s1); color: var(--panel-ink); }
.fieldnote .rna-loop-stage {
  padding: 24px 28px 18px;
  background-color: var(--panel);
  background-image: radial-gradient(color-mix(in srgb, var(--s1) 16%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
}
.fieldnote .rna-loop-stage > .panel-title { margin: 0; }
.fieldnote .rna-loop-graph {
  position: relative;
  height: 430px;
  max-width: 600px;
  margin: 24px auto 8px;
}
.fieldnote .rna-loop-graph > svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.fieldnote .rna-loop-graph > svg > path {
  fill: none;
  stroke: var(--panel-line);
  stroke-width: 1.5;
  opacity: .7;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  transition: opacity .25s ease, stroke .25s ease;
}
.fieldnote .rna-loop-graph > svg > path.is-active { stroke: var(--s1); stroke-width: 1.8; opacity: 1; }
.fieldnote .rna-loop-graph > svg > path.is-evidence { stroke-dasharray: 7 5; }
.fieldnote .rna-loop-graph > svg > path.is-done { stroke: var(--ok); }
.fieldnote .rna-loop-graph marker path { fill: none; stroke: context-stroke; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.fieldnote .rna-loop-node,
.fieldnote .rna-loop-center {
  position: absolute;
  z-index: 1;
  display: grid;
  place-content: center;
  width: 31.6667%;
  height: 21.8605%;
  padding: 10px;
  background: var(--panel-mid);
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  text-align: center;
  transition: background .25s ease, border-color .25s ease, box-shadow .25s ease, opacity .25s ease;
}
.fieldnote .rna-loop-node.n1 { left: 50%; top: 0; transform: translateX(-50%); }
.fieldnote .rna-loop-node.n2 { right: 0; top: 50%; transform: translateY(-50%); }
.fieldnote .rna-loop-node.n3 { bottom: 0; left: 50%; transform: translateX(-50%); }
.fieldnote .rna-loop-node.n4 { left: 0; top: 50%; transform: translateY(-50%); }
.fieldnote .rna-loop-node span,
.fieldnote .rna-loop-node strong,
.fieldnote .rna-loop-node small,
.fieldnote .rna-loop-center span,
.fieldnote .rna-loop-center strong,
.fieldnote .rna-loop-center small { display: block; }
.fieldnote .rna-loop-node span,
.fieldnote .rna-loop-center span {
  margin-bottom: 6px;
  color: var(--s1);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.fieldnote .rna-loop-node strong,
.fieldnote .rna-loop-center strong { color: var(--panel-ink); font: 600 11.5px/1.35 var(--mono); }
.fieldnote .rna-loop-node small,
.fieldnote .rna-loop-center small { margin-top: 4px; color: var(--panel-dim); font-size: 9px; line-height: 1.4; }
.fieldnote .rna-loop-center { left: 50%; top: 50%; width: 29%; height: auto; min-height: 118px; transform: translate(-50%, -50%); border-color: color-mix(in srgb, var(--s1) 58%, transparent); background: color-mix(in srgb, var(--s1) 10%, var(--panel)); }
.fieldnote .rna-loop-center.nested { border-radius: 50%; }
.fieldnote .rna-loop-graph.outer .rna-loop-node { box-shadow: inset 0 2px 0 var(--s1); }
.fieldnote .rna-loop-node.is-active { background: var(--s1); border-color: var(--s1); box-shadow: 0 0 0 4px color-mix(in srgb, var(--s1) 15%, transparent); }
.fieldnote .rna-loop-node.is-evidence { background: var(--review); border-color: var(--review); }
.fieldnote .rna-loop-node.is-done { background: var(--ok); border-color: var(--ok); }
.fieldnote .rna-loop-node.is-active span,
.fieldnote .rna-loop-node.is-active strong,
.fieldnote .rna-loop-node.is-active small,
.fieldnote .rna-loop-node.is-evidence span,
.fieldnote .rna-loop-node.is-evidence strong,
.fieldnote .rna-loop-node.is-evidence small,
.fieldnote .rna-loop-node.is-done span,
.fieldnote .rna-loop-node.is-done strong,
.fieldnote .rna-loop-node.is-done small { color: #0e0d0c; }
.fieldnote .rna-loop-center.is-evidence { background: color-mix(in srgb, var(--review) 22%, var(--panel)); border-color: var(--review); }
.fieldnote .rna-loop-center.is-done { background: color-mix(in srgb, var(--ok) 18%, var(--panel)); border-color: var(--ok); }
.fieldnote .rna-loop-readout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 18px;
  background: color-mix(in srgb, var(--panel) 92%, var(--s1));
  border-top: 1px solid var(--panel-line);
}
.fieldnote .rna-loop-readout > span { font: 500 9px/1.3 var(--mono); }
.fieldnote .rna-loop-count { color: var(--s1); letter-spacing: .12em; }
.fieldnote .rna-loop-readout p { max-width: none; margin: 0; color: var(--panel-ink); font: 500 10.5px/1.5 var(--mono); }
.fieldnote .rna-loop-score { display: flex; align-items: center; gap: 7px; color: var(--panel-dim); white-space: nowrap; }
.fieldnote .rna-loop-score i { width: 8px; height: 8px; border-radius: 50%; background: var(--panel-line); }
.fieldnote .rna-loop-score.is-active { color: var(--panel-ink); }
.fieldnote .rna-loop-score.is-active i { background: var(--s1); }
.fieldnote .rna-loop-score.is-evidence i { background: var(--review); }
.fieldnote .rna-loop-score.is-done { color: var(--ok); }
.fieldnote .rna-loop-score.is-done i { background: var(--ok); }
.fieldnote figure.panel.rna-loop-story figcaption { margin: 0; padding: 16px 28px 20px; border-top: 1px solid var(--panel-grid); }

.fieldnote .rna-fold-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 3px;
}
.fieldnote .rna-fold-card {
  min-width: 0;
  padding: 18px;
  background: var(--panel-mid);
  border-radius: 10px;
}
.fieldnote .rna-fold-card.target { box-shadow: inset 0 2px 0 var(--s2); }
.fieldnote .rna-fold-card.rejected { box-shadow: inset 0 2px 0 var(--bad); }
.fieldnote .rna-fold-card.accepted { box-shadow: inset 0 2px 0 var(--ok); }
.fieldnote .rna-card-kicker {
  margin-bottom: 8px;
  color: var(--s1);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.fieldnote .rna-fold-card .h4 { margin: 0 0 5px; color: var(--panel-ink); font: 600 12.5px var(--mono); }
.fieldnote .rna-fold-card > p:not(.h4) { min-height: 38px; margin: 0; color: var(--panel-dim); font-size: 11px; line-height: 1.55; }
.fieldnote .rna-diagram { display: grid; min-height: 250px; place-items: center; }
.fieldnote .rna-diagram svg { display: block; width: min(100%, 270px); height: auto; overflow: visible; }
.fieldnote code.rna-dot-bracket {
  display: block;
  margin: 0 0 12px;
  padding: 9px;
  overflow-wrap: anywhere;
  color: var(--panel-ink);
  background: var(--panel);
  border-radius: 7px;
  font-size: 9.5px;
  line-height: 1.45;
}
.fieldnote .rna-key {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 16px;
  color: var(--panel-dim);
  font-size: 10px;
}
.fieldnote .rna-key span { display: inline-flex; align-items: center; gap: 6px; }
.fieldnote .rna-key i { width: 10px; height: 10px; border-radius: 50%; }
.fieldnote .rna-key i.a { background: var(--bad); }
.fieldnote .rna-key i.c { background: var(--s2); }
.fieldnote .rna-key i.g { background: var(--review); }
.fieldnote .rna-key i.u { background: var(--ok); }
.fieldnote .rna-key i.wanted,
.fieldnote .rna-key i.competing { width: 16px; height: 2px; border-radius: 0; }
.fieldnote .rna-key i.wanted { background: var(--ok); }
.fieldnote .rna-key i.competing { background: var(--bad); }
.fieldnote .rna-key i.changed { background: transparent; border: 2px solid var(--s1); }

.fieldnote .rna-cohort {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 5px;
  margin-top: 18px;
}
.fieldnote .rna-cohort span {
  display: grid;
  min-height: 42px;
  place-items: center;
  color: var(--ok);
  background: color-mix(in srgb, var(--ok) 14%, var(--panel-mid));
  border: 1px solid color-mix(in srgb, var(--ok) 32%, transparent);
  border-radius: 7px;
  font-size: 10px;
}
.fieldnote .rna-cohort span.miss {
  color: var(--review);
  background: color-mix(in srgb, var(--review) 14%, var(--panel-mid));
  border-color: color-mix(in srgb, var(--review) 48%, transparent);
  box-shadow: 0 0 0 1px var(--review);
}

.fieldnote .rna-trajectory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.fieldnote .rna-trajectory-grid article { min-width: 0; padding: 18px; background: var(--panel-mid); border-radius: 10px; }
.fieldnote .rna-chart-head { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.fieldnote .rna-chart-head span,
.fieldnote .rna-chart-head strong { display: block; }
.fieldnote .rna-chart-head span { color: var(--panel-dim); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.fieldnote .rna-chart-head strong { margin-top: 4px; color: var(--panel-ink); font: 600 12.5px var(--mono); }
.fieldnote .rna-chart-head > b { padding: 3px 9px; border-radius: 999px; font-size: 10px; font-weight: 500; }
.fieldnote .rna-chart-head > b.bad { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.fieldnote .rna-chart-head > b.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, transparent); }
.fieldnote svg.rna-chart { display: block; width: 100%; height: auto; margin-top: 14px; overflow: visible; }
.fieldnote .rna-chart .grid { fill: none; stroke: var(--panel-grid); stroke-width: 1; }
.fieldnote .rna-chart .line { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.fieldnote .rna-chart .line.control { stroke: var(--bad); }
.fieldnote .rna-chart .line.treatment { stroke: var(--ok); }
.fieldnote .rna-chart .points.control { fill: var(--bad); }
.fieldnote .rna-chart .points.treatment { fill: var(--ok); }
.fieldnote .rna-chart .axis-labels { fill: var(--panel-dim); font: 10px var(--mono); text-anchor: middle; }
.fieldnote .rna-trajectory-grid article > p { margin: 8px 0 0; color: var(--panel-dim); font: 10px/1.5 var(--mono); }
.fieldnote .rna-change {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  gap: 2px;
  margin-top: 3px;
}
.fieldnote .rna-change > * { padding: 13px 15px; background: var(--panel-mid); }
.fieldnote .rna-change span { color: var(--s1); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.fieldnote .rna-change strong { color: var(--panel-ink); font: 500 10.5px/1.5 var(--mono); }

@media (max-width: 820px) {
  .fieldnote .rna-forward-path,
  .fieldnote .rna-inverse-path,
  .fieldnote .rna-fold-grid,
  .fieldnote .rna-trajectory-grid,
  .fieldnote .rna-change { grid-template-columns: 1fr; }
  .fieldnote .rna-story-title { align-items: flex-start; flex-direction: column; gap: 6px; }
  .fieldnote .rna-story-title strong { text-align: left; }
  .fieldnote .rna-oracle { width: fit-content; margin: 0 auto; }
  .fieldnote .rna-oracle i { inset: auto auto -20px 50%; transform: rotate(90deg); }
  .fieldnote .rna-candidate-fan > div::before { display: none; }
  .fieldnote .rna-diagram { min-height: 220px; }
}
@media (max-width: 560px) {
  .fieldnote .rna-use-case-hero { padding-top: 88px; }
  .fieldnote .rna-use-case-hero .hero-badge {
    justify-content: center;
    max-width: 100%;
    line-height: 1.4;
    text-align: center;
    white-space: normal;
  }
  .fieldnote .rna-story { padding: 15px; }
  .fieldnote .rna-why { grid-template-columns: 1fr; gap: 6px; }
  .fieldnote .rna-loop-story-label small { display: none; }
  .fieldnote .rna-loop-stage { padding: 20px 16px 14px; }
  .fieldnote .rna-loop-graph { height: 500px; }
  .fieldnote .rna-loop-node, .fieldnote .rna-loop-center { padding: 7px; }
  .fieldnote .rna-loop-center span { font-size: 8px; letter-spacing: .04em; }
  .fieldnote .rna-loop-node strong, .fieldnote .rna-loop-center strong { font-size: 10px; }
  .fieldnote .rna-loop-readout { align-items: start; grid-template-columns: auto 1fr; }
  .fieldnote .rna-loop-score { grid-column: 2; }
  .fieldnote figure.panel.rna-loop-story figcaption { padding-inline: 16px; }
  .fieldnote .rna-cohort { grid-template-columns: repeat(5, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .fieldnote .rna-loop-toggle { display: none; }
  .fieldnote .rna-loop-node,
  .fieldnote .rna-loop-center,
  .fieldnote .rna-loop-graph > svg > path { transition: none; }
}

/* Source-code links: the button under the hero meta and inside field-report cards. */
.fieldnote .hero-repo { margin: 22px auto 0; max-width: 704px; }
.fieldnote .repo-button {
  align-items: center;
  background: var(--ink);
  border-radius: 999px;
  color: var(--paper, #0e0d0c);
  display: inline-flex;
  flex: 0 0 auto;
  font: 600 13px var(--sans);
  gap: 9px;
  padding: 9px 16px 9px 13px;
  text-decoration: none;
  transition: transform .2s ease, filter .2s ease;
}
.fieldnote .repo-button:hover { filter: brightness(1.08); transform: translateY(-1px); }
.fieldnote .repo-button span { white-space: nowrap; }
.fieldnote .repo-button small { font: 500 10.5px var(--mono); min-width: 0; opacity: .7; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fieldnote .repo-button svg { flex: 0 0 auto; }
.fieldnote .fieldnote-tag-code { border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) {
  .fieldnote .repo-button { max-width: 100%; }
}

/* Subtitles: the game or system a post is about, set in mono under the title. */
.fieldnote .hero-subtitle {
  color: var(--post-hue, var(--accent));
  font: 500 12px var(--mono);
  letter-spacing: .12em;
  margin: -8px 0 22px;
  text-transform: uppercase;
}
.fieldnote .fieldnote-card-subtitle {
  color: var(--accent);
  font: 500 10.5px var(--mono);
  letter-spacing: .12em;
  margin: -6px 0 10px;
  text-transform: uppercase;
}
.fieldnote .level-design-reading-main h3 small {
  color: var(--accent);
  display: block;
  font: 500 9.5px var(--mono);
  letter-spacing: .12em;
  margin-top: 6px;
  text-transform: uppercase;
}
