:root {
  --paper: #eceef0;
  --surface: #f7f8f9;
  --ink: #18222c;
  --muted: #56626e;
  --rule: #c9ced4;
  --bronze: #8a5820;
  --verdigris: #2c6a55;
  --oxide: #9b3324;
  --code-bg: #e2e6ea;
  --measure: 68ch;
  --wide: 72rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f151b;
    --surface: #161e26;
    --ink: #e3e8ed;
    --muted: #9aa6b2;
    --rule: #2a3540;
    --bronze: #d19a5b;
    --verdigris: #6ebfa0;
    --oxide: #e27a66;
    --code-bg: #1b252f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f151b;
  --surface: #161e26;
  --ink: #e3e8ed;
  --muted: #9aa6b2;
  --rule: #2a3540;
  --bronze: #d19a5b;
  --verdigris: #6ebfa0;
  --oxide: #e27a66;
  --code-bg: #1b252f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
}
a { color: var(--bronze); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--bronze); outline-offset: 3px; border-radius: 2px; }
code, pre, kbd { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.86em; }
:not(pre) > code { background: var(--code-bg); padding: 0.08em 0.32em; border-radius: 3px; }
pre {
  background: var(--code-bg);
  padding: 1rem 1.15rem;
  overflow-x: auto;
  line-height: 1.5;
  border-radius: 4px;
  margin: 0;
}

.wrap { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

/* header */
.top { border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; padding-top: 0.9rem; padding-bottom: 0.9rem; }
.mark { font-weight: 800; font-variation-settings: "wdth" 125; text-decoration: none; color: var(--ink); letter-spacing: 0.01em; font-size: 1.05rem; }
.top nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }
.theme { background: none; border: 1px solid var(--rule); color: var(--muted); border-radius: 4px; padding: 0.2rem 0.55rem; font: inherit; font-size: 0.85rem; cursor: pointer; }

/* type scale (1.25) */
h1, h2, h3 { line-height: 1.12; margin: 0; }
h1 {
  font-size: clamp(2.1rem, 5.4vw, 3.9rem);
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.012em;
  max-width: 20ch;
}
h2 { font-size: clamp(1.5rem, 3vw, 2.05rem); font-weight: 750; font-variation-settings: "wdth" 110; margin-bottom: 0.9rem; }
h3 { font-size: 1.12rem; font-weight: 700; }
p { margin: 0 0 1rem; max-width: var(--measure); }
.lede { font-size: clamp(1.1rem, 1.9vw, 1.3rem); color: var(--muted); max-width: 58ch; margin-top: 1.25rem; }

section { padding: 3.5rem 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: 0; }

/* hero */
.hero { padding: 3.5rem 0 3rem; }
.facts { color: var(--muted); font-size: 0.95rem; margin-top: 1.25rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 650;
  padding: 0.62rem 1.05rem; border-radius: 4px; border: 2px solid var(--bronze);
}
.btn.primary { background: var(--bronze); color: var(--paper); }
.btn.secondary { color: var(--bronze); }

/* the wall: a real corpus contract, framed in bronze */
.wall {
  margin-top: 2.75rem;
  border: 6px solid var(--bronze);
  border-radius: 2px;
  background: var(--surface);
}
.wall-head { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; justify-content: space-between; align-items: baseline; padding: 0.75rem 1rem; border-bottom: 1px solid var(--rule); }
.wall-head strong { font-variation-settings: "wdth" 110; }
.wall-head span { color: var(--muted); font-size: 0.9rem; }
.contract { display: grid; grid-template-columns: 1fr; }
@media (min-width: 860px) { .contract { grid-template-columns: repeat(3, 1fr); } }
.contract > div { padding: 1rem; border-top: 1px solid var(--rule); min-width: 0; }
@media (min-width: 860px) { .contract > div { border-top: 0; border-left: 1px solid var(--rule); } .contract > div:first-child { border-left: 0; } }
.contract h3 { margin-bottom: 0.35rem; }
.contract p { font-size: 0.93rem; color: var(--muted); margin-bottom: 0.65rem; }
.contract pre { font-size: 0.8rem; background: var(--code-bg); }
.verdict { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; padding: 0.75rem 1rem; border-top: 1px solid var(--rule); font-size: 0.95rem; }
.ok { color: var(--verdigris); font-weight: 700; }
.no { color: var(--oxide); font-weight: 700; }

/* what stays in */
.stays { display: grid; gap: 1.75rem 3rem; grid-template-columns: 1fr; margin: 1.5rem 0 0; }
@media (min-width: 860px) { .stays { grid-template-columns: 1fr 1fr; } }
.stays dt { font-weight: 750; font-size: 1.12rem; font-variation-settings: "wdth" 108; margin-bottom: 0.3rem; }
.stays dd { margin: 0; color: var(--muted); max-width: 52ch; }

/* diagram */
.diagram { margin-top: 1.5rem; background: var(--surface); border: 1px solid var(--rule); border-radius: 4px; padding: 1rem; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram figcaption { color: var(--muted); font-size: 0.92rem; margin-top: 0.75rem; max-width: var(--measure); }

/* tables */
.table-scroll { overflow-x: auto; margin-top: 1.25rem; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--rule); vertical-align: top; }
thead th { font-weight: 650; color: var(--muted); border-bottom: 2px solid var(--ink); }
.score td:last-child, .score th:last-child { white-space: nowrap; }
.big { font-weight: 800; font-variation-settings: "wdth" 112; font-size: 1.15rem; }
.pass { color: var(--verdigris); font-weight: 650; }
.fail { color: var(--oxide); font-weight: 700; }
.na { color: var(--muted); }
.evidence th[scope="row"] { font-weight: 600; }
@media (min-width: 720px) { .evidence th[scope="row"] { min-width: 18rem; } }
@media (max-width: 719px) { th, td { padding: 0.5rem 0.4rem; } .evidence th[scope="row"] a { word-break: break-all; } }
.evidence th[scope="row"] a { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.84rem; }
.what { display: block; font-weight: 400; color: var(--muted); font-size: 0.9rem; margin-top: 0.15rem; }
.src { display: block; font-family: "JetBrains Mono", monospace; font-size: 0.72rem; color: var(--muted); opacity: 0.8; margin-top: 0.2rem; }
.group th { padding-top: 1.4rem; font-size: 1.05rem; font-weight: 750; font-variation-settings: "wdth" 110; border-bottom: 1px solid var(--ink); }
.sev { color: var(--muted); font-size: 0.88rem; }
.sev-critical { color: var(--ink); }
.mut .list { color: var(--muted); font-size: 0.88rem; }

.cols { display: grid; gap: 2rem; grid-template-columns: 1fr; }
@media (min-width: 860px) { .cols { grid-template-columns: 1fr 1fr; } }
.edges li { margin-bottom: 0.6rem; max-width: var(--measure); }
.host { font-size: 0.82rem; white-space: pre-wrap; }

footer { border-top: 1px solid var(--rule); padding: 2rem 0 3rem; color: var(--muted); font-size: 0.92rem; }
footer p { max-width: none; }
.myth { font-style: italic; }
