:root {
  --bg: #f7f5f0; --surface: #ffffff; --ink: #1b1f1d; --muted: #5b6360; --line: #e2ded5;
  --brand: #164e3f; --brand-ink: #ffffff; --accent: #e8f1ec;
  --good: #1f7a4d; --good-bg: #e3f3ea; --mid: #8a5a00; --mid-bg: #fdf1d8;
  --bad: #a3261b; --bad-bg: #fbe5e2; --none: #555c59; --none-bg: #eceae5;
  --focus: #2f6fdf; --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121514; --surface: #1b1f1d; --ink: #ecefed; --muted: #a3aba7; --line: #2e3431;
    --brand: #7fd1b2; --brand-ink: #0d1a15; --accent: #1f2b26;
    --good: #7fd1a3; --good-bg: #173326; --mid: #f0c36a; --mid-bg: #3a2e14;
    --bad: #f3988e; --bad-bg: #3b1d19; --none: #b5bcb8; --none-bg: #262b29; --focus: #8ab4ff;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121514; --surface: #1b1f1d; --ink: #ecefed; --muted: #a3aba7; --line: #2e3431;
  --brand: #7fd1b2; --brand-ink: #0d1a15; --accent: #1f2b26;
  --good: #7fd1a3; --good-bg: #173326; --mid: #f0c36a; --mid-bg: #3a2e14;
  --bad: #f3988e; --bad-bg: #3b1d19; --none: #b5bcb8; --none-bg: #262b29; --focus: #8ab4ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
.wrap { max-width: 860px; margin: 0 auto; padding: 0 16px; }
a { color: var(--brand); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; }
.skip:focus { left: 8px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.block { display: block; margin-top: 4px; }

.hero { padding: 40px 0 28px; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--accent), transparent); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .01em; margin: 0 0 20px; }
.mark { width: 26px; height: 26px; border-radius: 7px; background: var(--brand); position: relative; }
.mark::after { content: ""; position: absolute; left: 8px; top: 5px; width: 7px; height: 12px; border: solid var(--brand-ink); border-width: 0 3px 3px 0; transform: rotate(45deg); }
h1 { font-size: clamp(1.7rem, 4.6vw, 2.6rem); line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.01em; }
.lede { font-size: 1.1rem; color: var(--muted); max-width: 62ch; margin: 0 0 22px; }
.stat { display: flex; gap: 14px; align-items: center; text-decoration: none; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; max-width: 620px; }
.stat strong { font-size: 2rem; line-height: 1; color: var(--bad); white-space: nowrap; }
.stat .u { text-decoration: underline; color: var(--brand); }
@media (max-width: 480px) { .stat { flex-direction: column; align-items: flex-start; gap: 8px; } }

h2 { font-size: 1.45rem; margin: 40px 0 14px; }
h3 { font-size: 1.05rem; margin: 0 0 6px; }
section { scroll-margin-top: 16px; }

form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
label { display: block; font-weight: 600; font-size: .95rem; margin: 0 0 14px; }
.opt { font-weight: 400; color: var(--muted); font-size: .9rem; }
input, select, textarea {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; color: var(--ink);
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px;
}
textarea { resize: vertical; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .92rem; }
[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 2px var(--bad-bg); }
fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 14px 14px 2px; margin: 0 0 14px; }
legend { font-weight: 700; padding: 0 6px; }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; }
.check input { width: 20px; height: 20px; min-height: 0; margin: 0; flex: none; }
.grid2, .grid3 { display: grid; gap: 0 14px; }
@media (min-width: 640px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: repeat(3, 1fr); } }
details { margin: 0 0 16px; }
summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
button { font: inherit; font-weight: 600; border-radius: 8px; padding: 10px 16px; min-height: 44px; cursor: pointer; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
button.primary { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
button.ghost:hover, .filters button:hover { background: var(--accent); }
.privacy { margin: 14px 0 0; font-size: .9rem; color: var(--muted); }

.card { border-radius: var(--radius); padding: 14px 16px; margin: 0 0 10px; border: 1px solid var(--line); background: var(--surface); border-left: 5px solid var(--mid); }
.card.injection, .card.address { border-left-color: var(--bad); }
.card.ok { border-left-color: var(--good); }
.card p { margin: 0 0 6px; }
.evidence { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .85rem; background: var(--bg); padding: 6px 8px; border-radius: 6px; overflow-wrap: anywhere; }

.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps > li { counter-increment: s; position: relative; padding: 14px 16px 6px 60px; margin: 0 0 10px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.steps > li::before { content: counter(s); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; }
.steps p { margin: 0 0 10px; }
.warn { color: var(--bad); font-weight: 600; }
blockquote { margin: 0 0 10px; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); }

.letter { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 12px; scroll-margin-top: 16px; }
.letter-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.letter textarea { min-height: 260px; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.filters button { padding: 6px 12px; min-height: 36px; font-size: .9rem; }
.filters button[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { font-size: .85rem; color: var(--muted); font-weight: 600; background: var(--bg); }
tbody th { font-weight: 600; min-width: 9em; }
tbody tr:last-child > * { border-bottom: 0; }
q { quotes: "\201C" "\201D"; }
.pill { display: inline-block; font-size: .82rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill.good { color: var(--good); background: var(--good-bg); }
.pill.mid { color: var(--mid); background: var(--mid-bg); }
.pill.bad { color: var(--bad); background: var(--bad-bg); }
.pill.none { color: var(--none); background: var(--none-bg); }
@media (max-width: 600px) {
  thead { display: none; }
  table, tbody, tr, th, td { display: block; }
  tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  th, td { border: 0; padding: 4px 12px; }
}
.about p { max-width: 68ch; }
.share form { margin-top: 8px; }
.share h2 .opt { font-size: .9rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.ok-msg { color: var(--good); font-weight: 600; }
.small { font-size: .88rem; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.savebox { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin: 6px 0 10px; }
.savebox h3 { margin: 0 0 4px; }
.savebox p { margin: 0; max-width: 52ch; }
.topline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0 0 20px; }
.topline .brand { margin: 0; }
.navlink { font-weight: 600; }
.bar { border-bottom: 1px solid var(--line); background: var(--accent); }
.bar .wrap { display: flex; justify-content: space-between; align-items: center; min-height: 60px; gap: 12px; flex-wrap: wrap; }
.bar .brand { margin: 0; text-decoration: none; color: var(--ink); }
.page-h { margin: 28px 0 12px; }
.spaced { margin-top: 24px; }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 0 0 12px; }
.case-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.case-head h2 { margin: 0; font-size: 1.15rem; }
.case .deadline { font-weight: 600; }
.danger { color: var(--bad); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 8px 0; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; }
.tile strong { font-size: 1.8rem; line-height: 1; }
.story { border-left-color: var(--brand); }
.err-msg { color: var(--bad); font-weight: 600; }
.foot { color: var(--muted); font-size: .9rem; padding-top: 24px; padding-bottom: 40px; border-top: 1px solid var(--line); margin-top: 40px; }
