/* Legal coverage page. */

:root {
  --bg: #11141a;
  --surface: #171b22;
  --surface-2: #1c212a;
  --border: #262b35;
  --text: #e9e8e4;
  --text-muted: #8b92a0;
  --text-dim: #565d6b;
  --brass: #b08d57;
  --brass-dim: #8a6f45;
  --signal: #6b93b5;
  --pass: #6f9e6f;
  --mixed: #b08d57;
  --fail: #b57a7a;
  --serif: 'Spectral', Georgia, serif;
  --sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Light mode is opt-in only, per visit, never remembered — matching the other
   two pages. No localStorage, no prefers-color-scheme. */
html[data-theme="light"] {
  --bg: #f6f4ef;
  --surface: #ffffff;
  --surface-2: #eeebe3;
  --border: #ddd7c9;
  --text: #201d19;
  --text-muted: #5b5548;
  --text-dim: #8a8375;
  --brass: #9c7a3f;
  --brass-dim: #b08d57;
  --signal: #3d6a8f;
  --pass: #4a7a4a;
  --mixed: #8a6a2f;
  --fail: #9c5555;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

a { color: inherit; }

/* ---------- header / footer ---------- */

header { border-bottom: 1px solid var(--border); padding: 18px 0; }
header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.mark { font-family: var(--serif); font-size: 20px; letter-spacing: -0.01em; text-decoration: none; }
.mark span { color: var(--brass); }
/* Painted through the PNG's alpha so one file is right in both themes — see the
   long note in css/chat.css for why the artwork cannot be used as-is. */
.mark-img {
  display: block; width: 160px; height: 46px;
  background: var(--text);
  -webkit-mask: url('/img/zerowitness-mark.png') no-repeat center / contain;
  mask: url('/img/zerowitness-mark.png') no-repeat center / contain;
}

nav { display: flex; align-items: center; gap: 22px; }
nav a { color: var(--text-muted); text-decoration: none; font-size: 13.5px; }
nav a:hover { color: var(--text); }

.theme-switch {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; color: var(--text-dim); padding: 0;
}
.theme-switch-track {
  width: 30px; height: 16px; border-radius: 8px;
  background: var(--surface-2); border: 1px solid var(--border);
  position: relative; display: inline-block;
}
.theme-switch-thumb {
  position: absolute; top: 1px; left: 1px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--brass); transition: transform .16s ease;
}
html[data-theme="light"] .theme-switch-thumb { transform: translateX(14px); }
.theme-icon { flex-shrink: 0; }

.footer-mark {
  /* inline-block so the link shrink-wraps the mark. Left inline it lays out as
     a full-width box and a click on empty footer navigates home from nowhere
     near the logo — the same bug the rail's brand already had. */
  display: inline-block;
  opacity: 0.75;
}
.footer-mark:hover { opacity: 1; }
.footer-mark:focus-visible { outline: 2px solid var(--brass-dim); outline-offset: 3px; border-radius: 2px; }
/* Smaller than the header's, and it inherits the same alpha-mask treatment, so
   it takes --text in both themes with no second asset. */
.footer-mark .mark-img { width: 118px; height: 34px; }

footer { border-top: 1px solid var(--border); padding: 30px 0 44px; margin-top: 60px; }
footer .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; color: var(--text-dim); font-size: 13px;
}
.footer-right { display: flex; align-items: center; gap: 24px; }
.footer-link { color: var(--text-muted); text-decoration: none; }
.footer-link:hover { color: var(--text); }

/* ---------- intro ---------- */

.intro { padding: 56px 0 34px; }
.intro h1 {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(30px, 4.4vw, 44px); line-height: 1.18;
  letter-spacing: -0.015em; margin-bottom: 18px;
}
.lede { max-width: 66ch; color: var(--text-muted); font-size: 16px; }
.standfirst {
  margin-top: 18px; color: var(--text-dim); font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ---------- the caveats, deliberately above the table ---------- */

.caveat-band { padding: 8px 0 14px; }
.caveat-band .wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 2px solid var(--brass-dim);
  border-radius: 6px; padding: 20px 26px; max-width: 1080px;
}
.caveat-band h2 {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--brass); margin-bottom: 12px;
}
.caveat-band ul { list-style: none; display: grid; gap: 9px; }
.caveat-band li {
  color: var(--text-muted); font-size: 14px; padding-left: 16px; position: relative; max-width: 90ch;
}
.caveat-band li::before {
  content: ''; position: absolute; left: 0; top: 10px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--border);
}
.caveat-band strong { color: var(--text); font-weight: 600; }


/* ---------- coverage page ----------
   Tokens, header, footer, intro and caveat band are copied from benchmarks.css
   rather than shared — the standing arrangement for these pages. Two tokens are
   added here and defined in BOTH themes: --next and --wont. */
:root { --next: #6b93b5; --wont: #8b92a0; }
html[data-theme="light"] { --next: #3d6a8f; --wont: #5b5548; }

.block { padding: 44px 0 0; scroll-margin-top: 16px; }
.block h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; letter-spacing: -0.01em; text-wrap: balance; }
.block h3 { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin: 26px 0 10px; }
.h2-gap { margin-top: 34px; }
.sub { color: var(--text-muted); font-size: 14.5px; max-width: 76ch; margin: 10px 0 16px; }
.foot { color: var(--text-dim); font-size: 12.5px; margin-top: 10px; max-width: 80ch; }
.block-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.counts { color: var(--text-dim); font-size: 13px; font-variant-numeric: tabular-nums; }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { border-bottom: 1px solid var(--border); padding: 10px 12px; text-align: left; vertical-align: top; }
thead th {
  color: var(--text-dim); font-weight: 500; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.05em; background: var(--surface-2); white-space: nowrap;
}
tbody th { font-weight: 500; color: var(--text); }
tbody tr:last-child > * { border-bottom: none; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.src { color: var(--text-dim); font-size: 12.5px; }
td a, .sub a { color: var(--brass); text-decoration: none; }
td a:hover { text-decoration: underline; }
.cite { display: block; color: var(--text-dim); font-size: 11.5px; font-weight: 400; margin-top: 1px; }
.t-summary { min-width: 760px; }
.t-cases { min-width: 620px; }
.t-cases tr.is-cliff td:last-child { color: var(--mixed); }
.t-rules { min-width: 520px; }
.t-courts { min-width: 680px; }
.t-courts th[scope="row"] { width: 32%; }
.t-courts td:nth-child(2) { width: 50%; }

/* The group heading sits inside the table so it scrolls with it and a filtered
   view still says which kind of court a row is. */
tr.grp th {
  background: var(--surface-2); color: var(--brass); font-size: 12px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; padding: 9px 12px;
}
.grp-n { float: right; color: var(--text-dim); text-transform: none; letter-spacing: 0; font-weight: 400; font-variant-numeric: tabular-nums; }
tbody[hidden] { display: none; }
tr.court[hidden] { display: none; }

.sets { list-style: none; display: grid; gap: 3px; margin-top: 7px; }
.sets li { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; border-bottom: 1px dotted var(--border); padding-bottom: 2px; }
.sets li:last-child { border-bottom: none; }
.sets .n { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.why { color: var(--text-muted); font-size: 12.5px; margin-top: 6px; max-width: 60ch; }

/* Status is carried in words as well as colour — the colour is a second
   signal, never the only one. */
.st {
  display: inline-block; font-size: 10.5px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; padding: 2px 7px; border-radius: 3px; border: 1px solid currentColor;
  white-space: nowrap; line-height: 1.5;
}
.st-held { color: var(--pass); }
.st-partial { color: var(--mixed); }
.st-next { color: var(--next); }
.st-not { color: var(--fail); }
.st-none, .st-wont { color: var(--wont); }

.gaps { list-style: none; display: grid; gap: 10px; }
/* A block with the chip hung in the left gutter, not a grid: the prose after
   the bold lead is a bare text node, and in a grid it became an item of its own
   and wrapped under the chip. */
.gaps > li {
  position: relative; padding-left: 8.25rem;
  color: var(--text-muted); font-size: 14px; max-width: 92ch;
}
.gaps > li > .st { position: absolute; left: 0; top: 2px; }
.gaps > li strong { color: var(--text); font-weight: 600; }
.gaps details { margin-top: 6px; }
.gaps summary { cursor: pointer; color: var(--brass); font-size: 13px; }
.states { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: 8px 20px; margin-top: 14px; }
.states li { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 14px; min-width: 0; }
.states .st { flex: none; }
.plain { list-style: none; display: grid; gap: 4px; margin-top: 8px; font-size: 13px; }
.plain .lbl { display: inline-block; min-width: 5.5rem; color: var(--text-dim); font-variant-numeric: tabular-nums; }

.facts { list-style: none; display: grid; gap: 8px; }
.facts li { color: var(--text-muted); font-size: 14px; padding-left: 14px; position: relative; max-width: 88ch; }
.facts li::before { content: ''; position: absolute; left: 0; top: 10px; width: 4px; height: 4px; border-radius: 50%; background: var(--brass-dim); }
.facts strong { color: var(--text); font-weight: 600; }

.filters { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 4px 0 12px; }
.filters[hidden] { display: none; }
.filters label { display: inline-flex; align-items: center; gap: 7px; color: var(--text-dim); font-size: 12px; }
.filters select, .filters input[type="search"] {
  background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 4px;
  padding: 6px 9px; font: 500 12.5px/1 var(--sans);
}
.filters input[type="search"] { width: 210px; }
.filters input::placeholder { color: var(--text-dim); }
.filters select:focus-visible, .filters input:focus-visible, .gaps summary:focus-visible, td a:focus-visible { outline: 2px solid var(--brass-dim); outline-offset: 1px; }
.shown { color: var(--text-dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.empty-note { color: var(--text-dim); font-size: 13px; margin-top: 12px; }

.method p { color: var(--text-muted); font-size: 14.5px; max-width: 76ch; margin-top: 12px; }
.cta p { color: var(--text-muted); font-size: 14.5px; max-width: 66ch; margin: 10px 0 18px; }
.cta-row { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta-btn { display: inline-block; background: var(--brass); color: #14161b; text-decoration: none; font-weight: 600; font-size: 14px; padding: 11px 20px; border-radius: 4px; }
.cta-btn:hover { background: var(--brass-dim); }
.cta-link { color: var(--brass); text-decoration: none; font-weight: 600; font-size: 14px; }
.cta-link:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .mark-img { width: 104px; height: 30px; }
  .wrap { padding: 0 18px; }
  .intro { padding: 38px 0 24px; }
  .caveat-band .wrap { padding: 16px 18px; }
  footer .wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .footer-right { flex-direction: column; align-items: flex-start; gap: 8px; }
  nav { gap: 12px; }
  nav a { font-size: 12.5px; }
  .theme-icon { display: none; }
  .gaps > li { padding-left: 0; }
  .gaps > li > .st { position: static; display: table; margin-bottom: 4px; }
  .filters input[type="search"] { width: 100%; }
  .filters label:has(input) { flex: 1 1 100%; }
}

/* ── Accessibility utilities ─────────────────────────────────────────────
   Added 9 Sep 2026 with the <main> landmarks and chat.html's h1.

   EVERY COLOUR HERE CARRIES A var() FALLBACK ON PURPOSE. These same two rules
   go into three stylesheets that deliberately do not share a :root, and this
   repo has already paid for that once: --brass-dim existed in index.css and not
   chat.css, and an undefined custom property invalidates the whole declaration
   rather than falling back, so a button computed to transparent and every focus
   ring went invisible. A literal fallback cannot fail that way. */

/* The first focusable thing in the document, and off-screen until it is
   focused — so it costs a sighted visitor nothing and saves a keyboard one a
   full pass through the navigation on every load. Not display:none, which
   would take it out of the focus order and defeat the point entirely. */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
}
.skip-link:focus {
  left: 10px;
  top: 10px;
  padding: 10px 14px;
  background: var(--surface, #16181d);
  color: var(--text, #e9e8e4);
  border: 1px solid var(--brass, #b08d57);
  border-radius: 8px;
  font: 500 14px/1.2 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  text-decoration: none;
}

/* Announced, never drawn. clip-path is the modern half and clip the legacy one;
   both are kept because dropping either loses a browser somebody still uses. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The search phrase above the headline, and both are real visible text. See the
   long note on `.h1-kicker` in index.css for why it sits INSIDE the <h1> rather
   than being a second heading or a hidden one. */
.h1-kicker {
  display: block;
  font: 600 11px/1.4 var(--sans);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 12px;
}
