:root {
  --paper: #f6f3ec;
  --ink: #142033;
  --muted: #5c564c;
  --mustard: #c8962e;
  --navy: #142033;
  --display: "Unbounded", "Segoe UI", sans-serif;
  --serif: "Source Serif 4", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.6;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  overflow-x: hidden;
}
a { color: var(--ink); }
:focus-visible { outline: 2px solid var(--mustard); outline-offset: 3px; }
.skip { position: absolute; left: 1rem; top: 0; transform: translateY(-120%); background: var(--mustard); color: var(--navy); padding: 0.55rem 0.8rem; z-index: 5; }
.skip:focus { transform: none; }
.ribbon { background: var(--navy); color: #f6f3ec; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.55rem 1rem; align-items: center; padding: 0.75rem 1rem; width: 100%; }
.ribbon a { color: #f6f3ec; text-decoration: none; font-family: var(--display); font-size: 1.15rem; line-height: 1.25; padding: 0.1rem 0; }
.tab { background: var(--mustard); color: var(--navy); font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 0.45rem 0.7rem; margin: 0; }
.stage, .list, .doc, .colophon { width: min(1000px, calc(100% - 2rem)); margin-inline: auto; }
.stage { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 1.4rem; padding: 1.5rem 0 0.5rem; align-items: center; }
.stage > :only-child { grid-column: 1 / -1; }
.kicker { margin: 0 0 0.4rem; font-family: var(--mono); color: #6d4d12; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.75rem; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; letter-spacing: -0.03em; line-height: 1.15; text-wrap: balance; scroll-margin-top: 1rem; }
h1 { font-size: clamp(2rem, 4.2vw, 3.4rem); margin: 0 0 0.7rem; }
h2 { font-size: 1.45rem; margin: 1.5rem 0 0.45rem; }
h3 { font-size: 1.15rem; margin: 1rem 0 0.3rem; }
.dek { font-size: 1.15rem; }
img { max-width: 100%; height: auto; display: block; }
.stage img, .doc img { width: 100%; object-fit: cover; }
.stage img { aspect-ratio: 4 / 3; border-bottom: 6px solid var(--mustard); }
.doc img { aspect-ratio: 4 / 3; border-bottom: 6px solid var(--navy); }
figcaption { color: var(--muted); font-size: 0.98rem; margin-top: 0.5rem; }
.list { padding: 0.4rem 0 1.5rem; display: grid; gap: 0.55rem; }
.list a {
  display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; align-items: center;
  background: #fff; text-decoration: none; min-height: 44px; padding: 0.7rem 0.8rem;
  box-shadow: 4px 4px 0 var(--navy);
  touch-action: manipulation;
}
.list a:hover { box-shadow: 4px 4px 0 var(--mustard); }
.pill { font-family: var(--mono); background: var(--navy); color: #f6f3ec; padding: 0.25rem 0.4rem; }
.list strong { display: block; font-family: var(--display); font-size: 1.05rem; font-weight: 500; }
.list span span { color: var(--muted); }
.doc { padding: 1.2rem 0 2rem; }
.box { background: #fff; border-top: 4px solid var(--mustard); padding: 0.8rem 0.9rem; margin: 0.8rem 0; }
.tape { background: var(--navy); color: #f6f3ec; padding: 0.85rem; margin: 1rem 0; }
.tape header { display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; margin-bottom: 0.55rem; }
.tape p { margin: 0; font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--mustard); }
.copy { min-height: 44px; background: var(--mustard); color: var(--navy); border: 0; font: 500 0.9rem/1 var(--display); padding: 0.45rem 0.7rem; cursor: pointer; touch-action: manipulation; }
.copy:hover { filter: brightness(1.05); }
pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-family: var(--mono); font-size: 0.9rem; line-height: 1.5; }
table { width: 100%; border-collapse: collapse; margin: 0.8rem 0; font-variant-numeric: tabular-nums; background: #fff; }
th, td { text-align: left; vertical-align: top; padding: 0.55rem 0.65rem; border-bottom: 1px solid #e4dccb; }
th { font-family: var(--mono); font-size: 0.82rem; font-weight: 500; }
.banner { margin-top: 1.3rem; background: #fff; padding: 0.9rem 1rem; box-shadow: 6px 6px 0 var(--mustard); }
.banner h2 { margin-top: 0; }
.slot { font-family: var(--mono); color: #8a6414; margin: 0.45rem 0 0; }
.colophon { display: flex; flex-wrap: wrap; gap: 0.45rem 1rem; border-top: 1px solid var(--navy); padding: 0.8rem 0 calc(1rem + env(safe-area-inset-bottom)); color: var(--muted); }
.colophon p { margin: 0; }
#copy-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
@media (max-width: 800px) {
  .stage { grid-template-columns: 1fr; }
  .ribbon, .tape header { flex-direction: column; align-items: flex-start; }
  .list a { grid-template-columns: auto minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
