:root {
  --paper: #f6f4ef;
  --card: #ffffff;
  --ink: #1a1a1a;
  --ink-2: #4a4a48;
  --muted: #6f6d68;
  --line: #e2ded5;
  --accent: #9e1b1f;
  --accent-ink: #ffffff;
  --accent-soft: #f6e3e1;
  --hl: #ffe08a;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #151513; --card: #1e1e1b; --ink: #ecebe6; --ink-2: #c4c2bb; --muted: #95928a;
    --line: #34322d; --accent: #c63a3f; --accent-ink: #ffffff; --accent-soft: #3a1f1e; --hl: #6b5310;
  }
}
:root[data-theme="dark"] {
  --paper: #151513; --card: #1e1e1b; --ink: #ecebe6; --ink-2: #c4c2bb; --muted: #95928a;
  --line: #34322d; --accent: #c63a3f; --accent-ink: #ffffff; --accent-soft: #3a1f1e; --hl: #6b5310;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 var(--sans); }
a { color: var(--accent); text-underline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin: 0.2em 0 0.4em; }
h2 { font-size: 1.35rem; margin: 2rem 0 0.75rem; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }

.disclaimer-bar { background: var(--ink); color: var(--paper); font-size: 0.8rem; text-align: center; padding: 6px 16px; }
.site-header { border-bottom: 1px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; }
@media (max-width: 760px) { .site-header { position: static; } }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 1.5rem; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; background: var(--accent); color: var(--accent-ink); border-radius: 5px; font-size: 1.4rem; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--ink-2); text-decoration: none; padding: 6px 10px; border-radius: 4px; font-size: 0.95rem; font-weight: 500; }
.nav a:hover { background: var(--line); }
.nav a[aria-current] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.nav .nav-cta { background: var(--accent); color: var(--accent-ink); }
.nav .nav-cta:hover { background: var(--accent); filter: brightness(1.1); }
.nav .nav-cta[aria-current] { color: var(--accent-ink); box-shadow: 0 0 0 2px var(--ink); border-radius: 4px; }

.hero, .page-head { padding: 48px 0 24px; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.98rem; font-weight: 600; color: var(--accent); margin: 0; }
.lede { font-size: 1.15rem; color: var(--ink-2); max-width: 680px; }
.stats { display: flex; gap: 40px; flex-wrap: wrap; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); }
.stats div { display: flex; flex-direction: column; }
.stat-n { font-size: 1.8rem; font-weight: 500; }
.stat-l { color: var(--muted); font-size: 0.9rem; }

.db-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.db-controls .search { flex: 1 1 320px; }
input, select, textarea { font: inherit; color: var(--ink); background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.count { color: var(--muted); font-size: 0.9rem; margin: 12px 0 6px; }
.table-wrap { background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
table.cases { width: 100%; border-collapse: collapse; }
.cases th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.cases td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cases tr:last-child td { border-bottom: 0; }
.cases tbody tr:hover { background: var(--paper); }
.cases .num { text-align: right; white-space: nowrap; }
.t-date { white-space: nowrap; color: var(--ink-2); font-size: 0.9rem; }
.case-link { font-weight: 600; color: var(--ink); text-decoration: none; }
.case-link:hover { color: var(--accent); text-decoration: underline; }
.sub { color: var(--muted); font-size: 0.85rem; }
.tag { display: inline-block; font-size: 0.78rem; padding: 2px 8px; border-radius: 99px; background: var(--paper); border: 1px solid var(--line); white-space: nowrap; }
@media (max-width: 760px) {
  .t-loc, .t-ind { display: none; }
  .cases td, .cases th { padding: 10px; }
}

.case { max-width: 780px; padding: 32px 0 48px; }
.crumb { font-size: 0.9rem; color: var(--muted); }
.case-people { color: var(--ink-2); margin-top: -6px; }
.case-facts { display: flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--card); margin: 20px 0; }
.case-facts div { flex: 1 1 180px; padding: 14px 18px; border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.case-facts div:last-child { border-right: 0; }
.case-facts .k { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.case-facts .v { font-size: 1.1rem; font-weight: 500; }
.notice { font-size: 0.88rem; color: var(--ink-2); border-left: 3px solid var(--line); padding: 4px 0 4px 12px; }
.fields { margin: 24px 0; }
.field { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); }
.field dt { font-weight: 600; color: var(--ink-2); }
.field dd { margin: 0; }
@media (max-width: 640px) { .field { grid-template-columns: 1fr; gap: 4px; } }
.phrase-list { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; }
.phrase-list a { display: inline-block; background: var(--accent-soft); color: var(--ink); text-decoration: none; padding: 4px 10px; border-radius: 4px; font-family: var(--serif); }
.badge { font-size: 0.72rem; background: var(--ink); color: var(--paper); padding: 1px 6px; border-radius: 3px; vertical-align: 2px; margin-left: 4px; font-family: var(--sans); }
.related { padding-left: 18px; }

.button { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; padding: 12px 20px; border-radius: 6px; font: 600 1rem var(--sans); text-decoration: none; cursor: pointer; }
.button:hover { filter: brightness(1.08); }
.button:disabled { opacity: 0.6; cursor: wait; }

.flags { columns: 2 340px; column-gap: 32px; padding-bottom: 48px; }
.flag { break-inside: avoid; padding: 14px 0; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.flag:target { background: var(--accent-soft); }
.flag-phrase { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; margin: 0 0 4px; }
.flag-cases { margin: 0; font-size: 0.9rem; color: var(--muted); }

.checker { max-width: 820px; padding-bottom: 48px; }
.result { margin-top: 20px; }
.verdict { font-weight: 600; padding: 12px 16px; border-radius: 6px; background: var(--card); border: 1px solid var(--line); }
.verdict.warn { background: var(--accent-soft); border-color: var(--accent); }
.marked { white-space: pre-wrap; background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 16px; margin: 12px 0; }
mark { background: var(--hl); color: inherit; padding: 0 2px; border-radius: 2px; }
.hit { border-top: 1px solid var(--line); padding: 10px 0; }
.hit b { font-family: var(--serif); font-size: 1.1rem; }

.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 24px; padding-bottom: 48px; }
@media (max-width: 480px) { .charts { grid-template-columns: 1fr; } }
.chart { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 4px 20px 20px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 210px) 1fr 64px; gap: 10px; align-items: center; padding: 5px 0; font-size: 0.9rem; }
.bar-track { height: 14px; }
.bar { display: block; height: 100%; background: var(--accent); border-radius: 0 3px 3px 0; min-width: 2px; }
.bar-val { text-align: right; color: var(--ink-2); }

.report-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; padding-bottom: 56px; }
.report-grid { grid-template-columns: 1.2fr 1fr; }
.report-grid .report-form { order: -1; }
@media (max-width: 860px) { .report-grid { grid-template-columns: 1fr; } .report-grid .report-form { order: 0; } }
.contact-form { margin-bottom: 56px; }
.callout { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 4px 20px 12px; border-radius: 0 8px 8px 0; }
.callout h2 { margin-top: 1rem; }
.report-form { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.report-form label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
.report-form label.check { flex-direction: row; align-items: flex-start; gap: 10px; font-weight: 400; font-size: 0.92rem; }
.report-form label.check input { width: auto; margin-top: 5px; }
.req { font-size: 0.75rem; color: var(--accent); font-weight: 600; }
.hp { position: absolute; left: -9999px; }
.form-status { margin: 0; font-weight: 500; }
.form-status.ok { color: #2f7a3b; }
.form-status.err { color: var(--accent); }

.prose { padding-bottom: 56px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 24px; padding: 28px 0 40px; font-size: 0.9rem; color: var(--ink-2); }
.footer-inner p { max-width: 760px; }
.topic-list { columns: 3 220px; column-gap: 32px; padding-left: 0; list-style: none; }
.topic-list li { padding: 4px 0; break-inside: avoid; }
.bar-label a { color: inherit; }
