/* Re3val — one stylesheet; system fonts plus the self-hosted Newsreader wordmark face; no external requests. */
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader-semibold-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }

:root {
  --bg: #f6f4ef;
  --surface: #fffdf8;
  --ink: #16191e;
  --muted: #5b6370;
  --rule: #d9d4c7;
  --accent: #14213d;
  --signal: #a8231b;
  --ok: #23613a;
  --note-bg: #ece6d6;
  --brand: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --surface: #161a20;
    --ink: #e8e6e1;
    --muted: #9aa3ae;
    --rule: #2c323b;
    --accent: #c9d3ea;
    --signal: #ff8a7e;
    --ok: #7fd49a;
    --note-bg: #1d222a;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--serif);
}
a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--signal); }
code { font-family: var(--mono); font-size: 0.86em; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 2px; }

/* Pre-launch notice */
.phase { background: var(--accent); color: var(--bg); font: 14px/1.5 var(--sans); padding: 8px 0; }
.phase a { color: inherit; }

/* Masthead */
/* Sticky masthead: stays at the top while the pre-launch banner above it scrolls away. */
.masthead { position: sticky; top: 0; z-index: 20; border-bottom: 3px double var(--rule); background: var(--surface); }
html { scroll-padding-top: 112px; }
.masthead .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; padding-top: 14px; padding-bottom: 12px; }
/* Wordmark: Newsreader (SIL OFL 1.1, /assets/fonts/OFL.txt), self-hosted; the 3 in the signal colour, italic. */
.wordmark { display: inline-flex; flex-direction: column; gap: 5px; color: var(--ink); text-decoration: none; }
.wordmark .wm { font: 700 32px/1 var(--brand); letter-spacing: -0.015em; }
.wordmark .three { color: var(--signal); font-style: italic; font-weight: 600; }
.wordmark .byline { font: 400 13px/1.2 var(--sans); letter-spacing: 0.02em; color: var(--muted); }
.masthead ul, .colophon ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.masthead nav a { font: 600 14px/1.4 var(--sans); text-decoration: none; color: var(--muted); letter-spacing: 0.02em; text-transform: uppercase; }
.masthead nav a:hover, .masthead nav a[aria-current="page"] { color: var(--ink); border-bottom: 2px solid var(--signal); }
/* Phone menu: a <details> disclosure, so it works without JavaScript. Hidden on wider screens. */
.nav-menu { display: none; }
.nav-menu summary { list-style: none; display: flex; align-items: center; gap: 6px; padding: 8px 10px; margin-right: -10px; cursor: pointer; color: var(--ink); font: 600 14px/1 var(--sans); letter-spacing: 0.02em; text-transform: uppercase; }
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.nav-menu .close, .nav-menu[open] .bars { display: none; }
.nav-menu[open] .close { display: block; }
.nav-menu nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 3px double var(--rule); box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12); }
.masthead .nav-menu ul { flex-direction: column; flex-wrap: nowrap; gap: 0; max-width: 1080px; margin: 0 auto; padding: 4px 16px 10px; }
.nav-menu li + li { border-top: 1px solid var(--rule); }
.masthead .nav-menu a { display: block; padding: 13px 0; font-size: 15px; color: var(--ink); }
.masthead .nav-menu a:hover, .masthead .nav-menu a[aria-current="page"] { border-bottom: 0; color: var(--signal); }

main > .wrap { padding-top: 28px; padding-bottom: 56px; min-height: 60vh; display: block; }

/* Prose */
.prose, .document { max-width: 720px; }
.prose h1, .document h1, .record h1 { font-size: clamp(30px, 5vw, 44px); line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 16px; }
.prose h2, .document h2, .record h2 { font-size: 23px; line-height: 1.25; margin: 36px 0 10px; padding-top: 14px; border-top: 1px solid var(--rule); }
.prose h3, .document h3 { font-size: 19px; margin: 26px 0 6px; }
.prose p.lede { font-size: 20px; }
.prose blockquote { margin: 18px 0; padding: 4px 18px; border-left: 3px solid var(--signal); color: var(--muted); }
.prose ul, .prose ol, .document ul, .document ol { padding-left: 1.3em; }
.prose li, .document li { margin: 4px 0; }
.prose hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }
table { border-collapse: collapse; width: 100%; font: 14px/1.45 var(--sans); margin: 16px 0; display: block; overflow-x: auto; }
th, td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--rule); }
.align-right { text-align: right; } .align-center { text-align: center; } .align-left { text-align: left; }
th { font-weight: 700; color: var(--muted); text-transform: uppercase; font-size: 12px; letter-spacing: 0.04em; }
pre { background: var(--note-bg); padding: 12px 14px; overflow-x: auto; font: 13px/1.5 var(--mono); }

/* Home blocks: a heading followed by a list renders as cards */
.prose h2.cards + ul { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.prose h2.cards + ul > li { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--accent); padding: 14px 16px; margin: 0; font-size: 16px; }
/* The homepage's two audiences: side by side on wide screens, agents first; stacked on phones, people first. */
.prose h2.audiences + ul { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prose h2.audiences + ul > li { background: var(--surface); border: 1px solid var(--rule); border-top: 3px solid var(--signal); padding: 16px 18px; margin: 0; font-size: 16px; }
.prose h2.audiences + ul > li > p:first-child, .prose h2.audiences + ul > li > strong:first-child { font: 700 19px/1.3 var(--sans); margin: 0 0 8px; display: block; }
.prose h2.audiences + ul > li > ul { list-style: none; padding: 0; margin: 0; }
.prose h2.audiences + ul > li > ul > li { padding: 7px 0; border-top: 1px solid var(--rule); line-height: 1.45; }
.prose h2.audiences + ul > li > ul > li:last-child { padding-top: 10px; }
@media (max-width: 759px) {
  .prose h2.audiences + ul { grid-template-columns: 1fr; }
  .prose h2.audiences + ul > li:nth-child(2) { order: -1; }
}

/* Welcome page: green binary streams behind the whole main area, stopping at
   the footer. CSS and generated SVG only (no scripts are allowed on this site).
   The area is dark in both themes; a halo behind the text column keeps every
   line at full contrast, and the motion stops under prefers-reduced-motion. */
main.matrix {
  position: relative; overflow: hidden; isolation: isolate;
  background: #040a06; color: #dcefe3;
  --bg: #040a06; --surface: rgba(8, 20, 12, 0.88); --ink: #e4f2e8; --muted: #9cc2aa;
  --rule: #1c4a2b; --accent: #7ff0ad; --signal: #3ddc84; --note-bg: rgba(14, 34, 20, 0.92);
}
main.matrix::before, .matrix-rain { content: ""; position: absolute; left: 0; right: 0; bottom: 0; z-index: -2; background-repeat: repeat; will-change: transform; }
main.matrix::before { top: -720px; background-image: url(/assets/binary-far.svg); animation: ew-drift-far 110s linear infinite; }
.matrix-rain { top: -840px; background-image: url(/assets/binary-near.svg); animation: ew-drift-near 60s linear infinite; }
main.matrix::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(to bottom, rgba(4,10,6,0.55) 0, rgba(4,10,6,0) 160px, rgba(4,10,6,0) calc(100% - 160px), rgba(4,10,6,0.9) 100%);
}
@keyframes ew-drift-far { to { transform: translateY(720px); } }
@keyframes ew-drift-near { to { transform: translateY(840px); } }
@media (prefers-reduced-motion: reduce) { main.matrix::before, .matrix-rain { animation: none; } }
/* The halo: a soft dark field that follows the text column, however long it is. */
main.matrix .prose { background: rgba(4, 10, 6, 0.80); box-shadow: 0 0 70px 50px rgba(4, 10, 6, 0.80); border-radius: 6px; }
main.matrix .prose a { color: var(--accent); }
main.matrix .prose a:hover { color: #ffffff; }
main.matrix .prose strong { color: #ffffff; }
main.matrix .prose h2 { color: #f2fbf5; }
main.matrix > .wrap { padding-top: 8px; padding-bottom: 96px; }
main.matrix .prose h2.cards + ul > li { border-color: var(--rule); border-top-color: var(--signal); backdrop-filter: blur(2px); }
main.matrix .prose h2.audiences + ul > li { border-color: var(--rule); border-top-color: var(--signal); backdrop-filter: blur(2px); }
.hero-inner { padding-top: clamp(48px, 9vw, 104px); padding-bottom: clamp(40px, 7vw, 80px); }
.hero-inner::before {
  content: "01000101 01010111"; content: "01000101 01010111" / "";
  display: block; margin-bottom: 18px; font: 600 13px/1 var(--mono); letter-spacing: 0.22em; color: #3ddc84;
}
.hero .prose { max-width: 700px; }
.hero h1 { color: #f2fbf5; font-size: clamp(36px, 6.4vw, 62px); line-height: 1.04; letter-spacing: -0.02em; margin-bottom: 22px; text-shadow: 0 2px 24px rgba(0,0,0,0.6); }
.hero p { color: #b8d6c3; }
.hero p.lede { color: #dcefe3; }

/* Governing documents */
.doc-source { font: 13px/1.5 var(--sans); color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.document { font-size: 16px; }

/* Records */
.record { max-width: 760px; }
.kicker { font: 700 12px/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--signal); margin: 0 0 8px; }
.dated { background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--accent); padding: 14px 18px; margin: 18px 0 8px; font: 14px/1.5 var(--sans); }
.dated-lede { font-size: 15px; margin: 0 0 10px; }
.dated dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; margin: 0; }
.dated dt { color: var(--muted); }
.dated dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.alert { background: var(--note-bg); border-left: 4px solid var(--signal); padding: 10px 14px; font: 15px/1.5 var(--sans); }
.claims, .sources { padding-left: 0; list-style: none; }
.claims li, .sources li { border-bottom: 1px solid var(--rule); padding: 10px 0; }
.claims li:target, .sources li:target, .quotation:target { background: var(--note-bg); }
.claim-text { margin: 0 0 4px; }
.cid { font: 700 12px/1 var(--mono); color: var(--signal); margin-right: 6px; }
.claim-meta { margin: 2px 0; font: 13px/1.5 var(--sans); color: var(--muted); display: flex; flex-wrap: wrap; gap: 2px 12px; }
.hash { overflow-wrap: anywhere; font-size: 12px; }
.quotation { margin: 12px 0; padding: 10px 14px; border: 1px dashed var(--rule); }
.quotation blockquote { margin: 0 0 6px; font-style: italic; }
.quotation figcaption, .note { font: 13px/1.5 var(--sans); color: var(--muted); }
.history { font: 14px/1.5 var(--sans); }
.ref { font: 12px var(--mono); text-decoration: none; }

/* Drafts and case files */
.draft-banner { border: 2px solid var(--signal); background: repeating-linear-gradient(-45deg, var(--note-bg) 0 14px, transparent 14px 28px); padding: 4px 18px; margin: 14px 0 18px; font: 15px/1.55 var(--sans); }
.draft-banner strong { color: var(--signal); text-transform: uppercase; letter-spacing: 0.04em; }
.principle { font: 16px/1.5 var(--sans); border-left: 4px solid var(--signal); padding: 6px 14px; background: var(--surface); }
.principle span { display: block; font: 700 11px/1.4 var(--sans); text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.findings { padding-left: 0; list-style: none; }
.findings li { padding: 10px 14px; margin: 8px 0; background: var(--surface); border: 1px solid var(--rule); border-left: 4px solid var(--accent); }
.method { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font: 15px/1.5 var(--sans); }
.method dt { color: var(--muted); font-weight: 600; }
.method dd { margin: 0; }
.record h3 { font-size: 17px; margin: 18px 0 4px; }
.record ul { padding-left: 1.2em; }
section.wide { width: min(1048px, calc(100vw - 32px)); }
section.wide table { font-size: 13px; }

/* Colophon */
.colophon { border-top: 3px double var(--rule); background: var(--surface); padding: 22px 0 30px; font: 14px/1.6 var(--sans); color: var(--muted); }
.colophon nav { margin-bottom: 12px; }
.colophon a { color: var(--ink); }

@media (max-width: 560px) {
  body { font-size: 16px; }
  .wordmark .wm { font-size: 27px; }
  .masthead .wrap { padding-top: 10px; padding-bottom: 8px; gap: 6px 16px; }
  .wordmark { gap: 3px; }
  .wordmark .byline { font-size: 12px; }
  html { scroll-padding-top: 84px; }
  .masthead .wrap { flex-wrap: nowrap; }
  .nav-wide { display: none; }
  .nav-menu { display: block; }
  .dated dl { grid-template-columns: 1fr; }
  .dated dt { margin-top: 6px; }
  .method { grid-template-columns: 1fr; }
}
@media print {
  .phase, .masthead nav, .nav-menu, .colophon nav { display: none; }
  .masthead { position: static; }
  body { background: #fff; color: #000; }
}

/* Language row on the homepage (ew-multilingual-interface.md I5) */
.prose p.langrow { font-size: 15px; line-height: 1.9; }
.prose p.langrow a { white-space: nowrap; }
