/* ============================================================
   KUNGFU KANBAN — landing page
   "INK & TAPE" design system: rice paper, sumi ink, one
   vermillion. Printed rules, hard shadows, hanko seals.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  /* the night dojo — DEFAULT */
  --paper-0: #141210;
  --paper-1: #1C1916;
  --paper-2: #0E0D0B;
  --ink-900: #ECE5D6;
  --ink-600: #BDB4A3;
  --ink-400: #978F80;
  --rule: rgba(236, 229, 214, 0.14);
  --rule-strong: #ECE5D6;
  --accent: #E0524A;
  --accent-ink: #E8776F;
  --accent-wash: rgba(224, 82, 74, 0.10);
  --selection-bg: rgba(224, 82, 74, 0.32);
  --on-accent: #141210;
  /* the ink slab: agent output is always dark, both themes */
  --slab-bg: #1A1714;
  --slab-text: #ECE5D6;
  --slab-rule: rgba(236, 229, 214, 0.14);
  /* belt ranks */
  --belt-todo: #8A8271;
  --belt-queued: #A89B7E;
  --belt-doing: #6FA3D4;
  --belt-review: #C79A6B;
  --belt-done: #ECE5D6;
  /* semantic */
  --success: #7FB08D;
  --error: #E06C5F;
  --warning: #D2A24C;
  --info: #6FA3D4;
  --shadow-hard: rgba(0, 0, 0, 0.85);
  --grain-opacity: 0.04;
  --grain-blend: screen;

  --font-display: 'Bricolage Grotesque';
  --font-body: 'Instrument Sans';
  --font-mono: 'IBM Plex Mono';

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  color-scheme: dark;
}

[data-theme='light'] {
  /* rice paper — the day dojo (opt-in) */
  --paper-0: #F6F2E9;
  --paper-1: #FDFBF5;
  --paper-2: #EDE7D9;
  --ink-900: #1A1714;
  --ink-600: #4A443C;
  --ink-400: #5F594F;
  --rule: rgba(26, 23, 20, 0.16);
  --rule-strong: #1A1714;
  --accent: #C1272D;
  --accent-ink: #A31F24;
  --accent-wash: rgba(193, 39, 45, 0.08);
  --selection-bg: rgba(193, 39, 45, 0.22);
  --on-accent: #FDFBF5;
  --belt-todo: #6E6656;
  --belt-queued: #7A6E52;
  --belt-doing: #2E5E8C;
  --belt-review: #7A5230;
  --belt-done: #1A1714;
  --success: #3E6B4A;
  --error: #8F1D1D;
  --warning: #8A6116;
  --info: #2E5E8C;
  --shadow-hard: rgba(26, 23, 20, 0.92);
  --grain-opacity: 0.05;
  --grain-blend: multiply;
  color-scheme: light;
}

/* ---------- base ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--paper-0);
  color: var(--ink-900);
  font-family: var(--font-body), 'Instrument Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
  position: relative;
}

/* paper grain — one fixed feTurbulence tile */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='1'/%3E%3C/svg%3E");
  opacity: var(--grain-opacity);
  mix-blend-mode: var(--grain-blend);
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display), 'Bricolage Grotesque', sans-serif;
  letter-spacing: -0.01em;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* skip link — visible only when focused */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 60;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  font-size: 0.875rem;
  padding: 10px 16px;
  border-radius: 2px;
}
.skip-link:focus { top: 12px; }

/* anchor targets clear the sticky masthead */
.chapter,
section[id] { scroll-margin-top: 84px; }

::selection { background: var(--selection-bg); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- shared atoms ---------- */

/* the antenna light — vermillion while an agent runs */
.antenna {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rule);
  flex: none;
}
.antenna.lit {
  background: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-ink);
  animation: antenna 2.4s ease-in-out infinite;
}
@keyframes antenna { 50% { opacity: 0.4; } }
@media (prefers-reduced-motion: reduce) {
  .antenna.lit { animation: none; opacity: 1; }
}

/* hanko seals */
.seal {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display), sans-serif;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 8px;
  transform: rotate(-2deg);
  border-radius: 1px;
}
@keyframes stamp {
  from { transform: rotate(-2deg) scale(1.6); opacity: 0; }
  70%  { transform: rotate(-2deg) scale(0.96); opacity: 1; }
  to   { transform: rotate(-2deg) scale(1); }
}

/* buttons — paper gets pressed, not painted */
button, .btn {
  font-family: var(--font-body), sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-900);
  background: var(--paper-1);
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  padding: 8px 16px;
  cursor: pointer;
  transition: background 120ms var(--ease), transform 120ms var(--ease), box-shadow 120ms var(--ease);
}

/* primary: the vermillion stamp-press key — 2px of real travel */
.btn.primary {
  background: var(--accent);
  border-color: var(--accent-ink);
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: 0 2px 0 var(--accent-ink), 0 1px 0 rgba(26, 23, 20, 0.1);
}
.btn.primary:active { transform: translateY(2px); box-shadow: none; }
.btn.primary:hover { filter: brightness(1.06); }

/* ink: filled with ink, paper text */
.btn.ink {
  background: var(--rule-strong);
  color: var(--paper-1);
  border-color: var(--rule-strong);
  box-shadow: 0 1px 0 rgba(26, 23, 20, 0.35);
}
.btn.ink:active { transform: translateY(1px); box-shadow: none; }

/* ghost */
.btn.ghost { background: transparent; border-color: var(--rule); color: var(--ink-600); }
.btn.ghost:hover { border-color: var(--rule-strong); color: var(--ink-900); }

/* mono voice */
.mono, .badge, kbd, code, pre {
  font-family: var(--font-mono), 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
}

/* badges: the machine speaks in small caps mono */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--ink-600);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1px 6px;
  background: var(--paper-1);
}
.badge.model { color: var(--ink-900); border-color: var(--rule-strong); }

/* effort belt stripes */
.stripes { display: inline-flex; gap: 2px; align-items: center; }
.stripes i {
  width: 10px; height: 3px;
  background: var(--rule);
  display: inline-block;
}
.stripes i.on { background: var(--ink-900); }

/* priority: the vermillion square */
.prio-high {
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--accent);
  flex: none;
}

/* running brush: a breathing ink stroke along the bottom edge */
.brush {
  background-image: linear-gradient(90deg, transparent, var(--accent) 40%, var(--accent) 60%, transparent);
  background-size: 200% 2px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  animation: brush 2.2s linear infinite;
}
@keyframes brush {
  from { background-position: 200% 100%; }
  to { background-position: -200% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .brush { animation: none; border-bottom: 2px solid var(--accent); }
}

.theme-toggle {
  width: 30px; height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-600);
  border-radius: 2px;
}
.theme-toggle:hover { border-color: var(--rule-strong); color: var(--ink-900); }

/* ---------- board replica atoms ---------- */
.column {
  background: var(--paper-2);
  border-radius: 4px;
  border-top: 3px solid var(--belt, var(--rule));
  display: flex;
  flex-direction: column;
}
.column[data-status='backlog'] { --belt: var(--belt-todo); }
.column[data-status='queued'] { --belt: var(--belt-queued); }
.column[data-status='running'] { --belt: var(--belt-doing); }
.column[data-status='review'] { --belt: var(--belt-review); }
.column[data-status='done'] { --belt: var(--belt-done); }

.col-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 12px 8px;
}
.col-head .col-name {
  font-family: var(--font-display), sans-serif;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink-900);
}
.col-head .col-count {
  font-family: var(--font-mono), monospace;
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--ink-400);
}
.col-body {
  padding: 4px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card {
  background: var(--paper-1);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 10px 12px;
  box-shadow: 0 1px 0 rgba(26, 23, 20, 0.1);
  position: relative;
}
.card .title {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.4;
  margin-bottom: 7px;
}
.card .title .antenna { margin-right: 6px; vertical-align: 1px; }
.card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
}
.card.running-card { padding-bottom: 12px; }
.card .runword {
  font-family: var(--font-mono), monospace;
  font-size: 10.5px;
  color: var(--accent-ink);
}
.card.done-card > .title, .card.done-card > .meta { opacity: 0.6; }
.card .card-seal {
  position: absolute;
  top: -6px;
  right: 8px;
  font-size: 9px;
  padding: 3px 5px;
}
.card .failword {
  font-family: var(--font-mono), monospace;
  font-size: 10.5px;
  color: var(--error);
}
.card.failed-card { border-left: 3px solid var(--error); }
.card .pr-link {
  font-family: var(--font-mono), monospace;
  font-size: 11px;
  color: var(--accent-ink);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
}

/* ============================================================
   MARKETING — the printed manual
   ============================================================ */
.mkt {
  font-size: 1rem;
  position: relative;
}
.mkt-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* masthead */
.masthead {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--paper-0);
  border-bottom: 3px double var(--rule-strong);
}

/* reading progress — a vermillion ink stroke under the masthead rule */
.scroll-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px; /* sits on the double rule */
  height: 3px;
  pointer-events: none;
}
.scroll-progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.masthead .mkt-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.wordmark {
  font-family: var(--font-display), sans-serif;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.masthead .wordmark { font-size: 22px; display: inline-flex; align-items: center; gap: 8px; }
.masthead nav { display: flex; align-items: center; gap: 20px; font-size: 0.9375rem; }
.masthead nav a:not(.btn) {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 160ms var(--ease);
}
.masthead nav a:not(.btn):hover { background-size: 100% 1px; }

/* hero */
.hero {
  position: relative;
  padding: clamp(64px, 9vw, 120px) 0 0;
  border-bottom: 2px solid var(--rule-strong);
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(260px, 4fr);
  gap: 32px;
  align-items: end;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.75rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 28px;
}
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span {
  display: block;
  animation: rise 480ms var(--ease) both;
  animation-delay: calc(var(--i) * 80ms);
}
@keyframes rise { from { transform: translateY(110%); } }
.hero-sub {
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-600);
  max-width: 560px;
  margin-bottom: 32px;
  animation: fadeup 480ms var(--ease) 300ms both;
}
@keyframes fadeup { from { opacity: 0; transform: translateY(8px); } }
.hero-ctas { display: flex; gap: 12px; margin-bottom: 56px; animation: fadeup 480ms var(--ease) 380ms both; }
.hero-ctas .btn { display: inline-block; padding: 12px 22px; font-size: 1rem; }

.hero-seal {
  display: inline-block;
  font-size: clamp(12px, 1.2vw, 15px);
  padding: 8px 10px;
  animation: stamp 320ms var(--ease) 650ms both;
  margin-left: 18px;
  vertical-align: baseline;
  letter-spacing: 0.04em;
}

.hero-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: -24px; /* the master stands on the rule — the grid breaks once */
  animation: settle 600ms var(--ease) both;
}
@keyframes settle {
  from { transform: translateY(-8px) rotate(-2deg); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.hero-figure img { width: min(300px, 55vw); height: auto; }
.fig-caption {
  font-family: var(--font-mono), monospace;
  font-size: 11.5px;
  color: var(--ink-400);
  text-align: center;
  background: var(--paper-0);
  padding: 3px 10px;
  white-space: nowrap;
  position: relative;
  z-index: 1;
}
@media (max-width: 520px) {
  .fig-caption { white-space: normal; max-width: 240px; }
  /* side-by-side CTAs squeeze into two-line buttons here — stack them instead */
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { text-align: center; }
}

/* the four forms */
.forms-section { border-bottom: 2px solid var(--rule-strong); }
.form-band {
  display: grid;
  grid-template-columns: minmax(140px, 280px) 1fr;
  gap: 24px;
  align-items: center;
  padding: 8px 0 28px;
}
.form-band + .form-band { border-top: 1px solid var(--rule); }
.form-num {
  font-family: var(--font-display), sans-serif;
  font-weight: 800;
  font-size: clamp(96px, 14vw, 180px);
  line-height: 0.9;
  color: var(--paper-2);
  -webkit-text-stroke: 1.5px var(--ink-900);
  margin-top: -20px;
  user-select: none;
}
/* The numeral is decorative (aria-hidden) and drawn hollow — fill matches the
   paper, the stroke carries the shape. It lives in a pseudo-element so
   contrast checkers don't score the intentionally-invisible fill as text. */
.form-num::before { content: attr(data-n); }
@supports not (-webkit-text-stroke: 1px black) {
  .form-num { color: var(--ink-400); }
}
.form-body h3 { font-size: 1.375rem; font-weight: 600; margin-bottom: 8px; }
.form-body p { color: var(--ink-600); max-width: 480px; }

/* live board replica */
.live-band {
  background: var(--paper-2);
  border-bottom: 2px solid var(--rule-strong);
  padding: clamp(56px, 8vw, 96px) 0;
}
.live-band h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; line-height: 1.08; margin-bottom: 32px; }
.live-board {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  font-size: 0.875rem;
}
@media (max-width: 1000px) { .live-board { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .live-board { grid-template-columns: 1fr; } }
.live-board .column { background: var(--paper-0); }

/* features newspaper grid */
.features-section { border-bottom: 2px solid var(--rule-strong); }
.paper-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-left: 1px solid var(--rule);
  border-top: 1px solid var(--rule);
}
@media (max-width: 860px) { .paper-grid { grid-template-columns: 1fr; } }
.paper-cell.wide { grid-column: 1 / -1; }
.paper-cell {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 26px 24px 30px;
}
.kicker {
  font-family: var(--font-mono), monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--accent-ink);
  display: block;
  margin-bottom: 10px;
}
.paper-cell h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; }
.paper-cell p { color: var(--ink-600); font-size: 0.9375rem; }
.footnote {
  display: block;
  margin-top: 12px;
  font-family: var(--font-mono), monospace;
  font-size: 11.5px;
  color: var(--ink-400);
}

/* the ink band — the sensei */
.ink-band {
  background: var(--slab-bg);
  color: var(--slab-text);
  padding: clamp(64px, 9vw, 120px) 0;
  border-bottom: 2px solid var(--rule-strong);
  position: relative;
  z-index: 1;
}
.ink-band .mkt-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) { .ink-band .mkt-inner { grid-template-columns: 1fr; } }
.ink-band h2 { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; line-height: 1.08; margin-bottom: 18px; }
.ink-band p { color: #BDB4A3; font-size: 1.0625rem; line-height: 1.6; max-width: 460px; }
.ladder-demo { display: flex; flex-direction: column; gap: 18px; }
.ladder-demo .rung { display: flex; flex-direction: column; gap: 6px; }
.ladder-demo .bar { height: 14px; border: 1px solid var(--slab-text); }
.ladder-demo .rung:nth-child(1) .bar { background: transparent; width: 45%; }
.ladder-demo .rung:nth-child(2) .bar { background: #6FA3D4; width: 70%; border-color: #6FA3D4; }
.ladder-demo .rung:nth-child(3) .bar { background: var(--slab-text); width: 100%; }
.ladder-demo .rung small {
  font-family: var(--font-mono), monospace;
  font-size: 12px;
  color: #978F80;
}
.ladder-demo .rung b { font-size: 0.9375rem; }

.section-pad { padding: clamp(72px, 10vw, 140px) 0; }
.section-title { font-size: clamp(2rem, 4vw, 3.25rem); font-weight: 800; line-height: 1.08; margin-bottom: 40px; }

/* ============================================================
   THE MANUAL — full setup, printed-docs style
   ============================================================ */
.manual-section { border-bottom: 3px double var(--rule-strong); }
.manual-sub {
  color: var(--ink-600);
  font-size: 1.0625rem;
  max-width: 640px;
  margin: -24px 0 40px;
}
.manual-grid {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}
@media (max-width: 900px) {
  /* minmax(0,…): a bare 1fr's auto minimum lets wide <pre>/<table> content
     blow the track past the viewport and sideways-scroll the whole page */
  .manual-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
.manual-toc {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 104px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1px;
  font-family: var(--font-mono), monospace;
  font-size: 12.5px;
}
@media (max-width: 900px) { .manual-toc { position: static; max-height: none; } }
.manual-toc a {
  color: var(--ink-600);
  padding: 5px 10px;
  border-left: 2px solid var(--rule);
  transition: color 120ms var(--ease), border-color 120ms var(--ease), background 120ms var(--ease);
}
.manual-toc a:hover { color: var(--ink-900); border-left-color: var(--accent); }
.manual-toc a.active {
  color: var(--ink-900);
  border-left-color: var(--accent);
  background: var(--accent-wash);
}
.manual-toc a b { color: var(--ink-400); font-weight: 400; margin-right: 8px; }

.chapter { padding: 36px 0; }
.chapter + .chapter { border-top: 1px solid var(--rule); }
.chapter:first-child { padding-top: 0; }
.chapter h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 14px;
  scroll-margin-top: 88px;
}
.chapter h4 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 22px 0 8px;
}
.chapter p { color: var(--ink-600); max-width: 760px; margin-bottom: 12px; }
.chapter p strong, .chapter li strong { color: var(--ink-900); font-weight: 600; }
.chapter ul, .chapter ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 4px 0 14px;
  max-width: 760px;
}
.chapter li { font-size: 0.9375rem; color: var(--ink-600); padding-left: 18px; position: relative; }
.chapter ul li::before { content: '—'; position: absolute; left: 0; color: var(--ink-400); }
.chapter ol { counter-reset: step; }
.chapter ol li { counter-increment: step; padding-left: 26px; }
.chapter ol li::before {
  content: counter(step) '.';
  position: absolute; left: 0;
  font-family: var(--font-mono), monospace;
  font-size: 12.5px;
  color: var(--accent-ink);
}

/* code: inline chips + the ink slab for blocks */
code {
  font-size: 0.85em;
  background: var(--paper-1);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 1px 5px;
  white-space: nowrap;
}
.chapter pre {
  background: var(--slab-bg);
  color: var(--slab-text);
  font-size: 13px;
  line-height: 1.6;
  border-radius: 4px;
  border: 1px solid var(--slab-rule);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 12px 0 16px;
  max-width: 760px;
  position: relative;
  z-index: 1;
}
pre code { background: none; border: none; padding: 0; white-space: pre; font-size: inherit; }
.chapter pre .c { color: #978F80; } /* comment tint inside slabs */

/* printed tables */
.doc-table {
  width: 100%;
  max-width: 760px;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin: 12px 0 16px;
}
.doc-table th {
  font-family: var(--font-mono), monospace;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
  color: var(--ink-400);
  text-align: left;
  border-bottom: 2px solid var(--rule-strong);
  padding: 8px 12px 8px 0;
}
.doc-table td {
  border-bottom: 1px solid var(--rule);
  padding: 9px 12px 9px 0;
  vertical-align: top;
  color: var(--ink-600);
}
.doc-table td:first-child { color: var(--ink-900); }

/* callout — printed margin note */
.note {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  border-radius: 2px;
  background: var(--paper-1);
  padding: 12px 16px;
  font-size: 0.875rem;
  color: var(--ink-600);
  max-width: 760px;
  margin: 12px 0 16px;
}
.note b { color: var(--ink-900); }
.note.warn { border-left-color: var(--warning); }

/* footer colophon */
.colophon { padding: 48px 0 64px; }
.colophon-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 48px;
  font-family: var(--font-mono), monospace;
  font-size: 12.5px;
}
.colophon-grid a {
  color: var(--ink-600);
  display: block;
  padding: 3px 0;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 160ms var(--ease);
}
.colophon-grid a:hover { background-size: 100% 1px; color: var(--ink-900); }
.colophon-grid b {
  display: block;
  font-family: var(--font-body), sans-serif;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
  color: var(--ink-900);
}
.colophon-bow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.colophon-bow img { width: 48px; height: 48px; }
.colophon-bow p { font-family: var(--font-mono), monospace; font-size: 11.5px; color: var(--ink-400); max-width: 480px; }

/* responsive */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { margin-bottom: -24px; align-self: center; }
  .form-band { grid-template-columns: 1fr; gap: 0; }
  .form-num { font-size: 96px; margin: 0; }
}
@media (max-width: 640px) {
  .masthead nav a:not(.btn) { display: none; }
  /* keep "Build the dojo" on one line: the row only fits if everything slims down */
  .masthead .wordmark { font-size: 18px; }
  .masthead nav { gap: 12px; }
  .masthead nav .btn { white-space: nowrap; padding: 8px 14px; font-size: 0.875rem; }
  /* long inline commands must wrap, not push the page sideways */
  p code, li code, td code { white-space: normal; overflow-wrap: anywhere; }
  .doc-table { display: block; overflow-x: auto; }
}
@media (max-width: 360px) {
  .masthead .wordmark { font-size: 16px; }
  .masthead .wordmark .antenna { display: none; }
  .masthead nav .btn { padding: 8px 10px; }
}
