/* forensics.jessmac.me. Shares tokens.css and maint.css (inlined by tools/build-subdomains.py).
   Dark "evidence table" hero, light paper for everything you read or fill in. */
:root {
  --table: #14112b;
  --uv: #a58bff;
  --uv-deep: #3b2a86;
  --on-dark: #efeaff;
  --muted-dark: #aaa4cc;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
}
.wrap { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.mono { font-family: var(--mono); font-size: .92em; }

/* ---------- Hero ---------- */
.hero {
  position: relative; isolation: isolate; display: flex; flex-direction: column;
  min-height: min(92vh, 860px); background: var(--table); color: var(--on-dark); overflow: hidden;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image: linear-gradient(rgba(165, 139, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(165, 139, 255, .07) 1px, transparent 1px);
  background-size: 72px 72px;
}
.table { position: absolute; inset: 0; z-index: -1; --x: 70%; --y: 50%; --r: 210px; }
.table::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle calc(var(--r) * 1.5) at var(--x) var(--y), rgba(165, 139, 255, .2), transparent 70%);
}
.trail { position: absolute; inset: 0; width: 100%; height: 100%; }
.trail.faint { color: rgba(165, 139, 255, .2); }
.trail.lit {
  color: var(--uv);
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0, #000 30%, transparent 100%);
  mask-image: radial-gradient(circle var(--r) at var(--x) var(--y), #000 0, #000 30%, transparent 100%);
  filter: drop-shadow(0 0 6px rgba(165, 139, 255, .85));
}
.edge { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-dasharray: 3 9; animation: flow 3s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -24; } }
.node circle { fill: var(--table); stroke: currentColor; stroke-width: 2.4; }
.lbl { fill: currentColor; font: 500 15px var(--mono); text-anchor: middle; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 0; position: relative; z-index: 2; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; text-decoration: none; color: var(--on-dark); }
.brand svg { width: 30px; height: 30px; }
.nav { display: flex; gap: 28px; font-size: 16px; font-weight: 500; }
.nav a { color: var(--on-dark); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--uv); }
.hero :focus-visible { outline-color: var(--uv); }

.hero-copy { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 0 96px; }
.hero h1 { margin: 0; max-width: 9ch; font: 800 clamp(76px, 13vw, 180px)/.84 var(--display); }
.lead { margin: 28px 0 0; max-width: 34ch; font-size: 21px; line-height: 1.5; color: var(--muted-dark); }
.actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.btn {
  display: inline-block; padding: 14px 24px; border: 0; border-radius: 4px; cursor: pointer;
  font: 600 16px var(--body); text-decoration: none; background: var(--ink); color: var(--paper); transition: background .15s;
}
.btn:hover { background: #0d1626; }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-uv { background: var(--uv); color: #14112b; }
.btn-uv:hover { background: #bba9ff; }
.btn-line { background: transparent; color: var(--on-dark); box-shadow: inset 0 0 0 2px var(--on-dark); }
.btn-line:hover { background: rgba(239, 234, 255, .1); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.btn-ghost:hover { background: var(--panel); }

/* ---------- Paper ---------- */
.paper { background: var(--paper); }
.demo { margin: 0; padding: 10px 14px; background: var(--halt); border-radius: 4px; font-weight: 600; transform: translateY(18px); }
.demo[hidden] { display: none; }
.sec { padding: clamp(56px, 8vw, 104px) 0; border-top: 1px solid var(--line); scroll-margin-top: 8px; }
.paper main > .sec:first-of-type { border-top: 0; }
.sec h2 { margin: 0 0 14px; font: 800 clamp(44px, 5.5vw, 72px)/.92 var(--display); }
.sec-intro { margin: 0 0 28px; max-width: 60ch; color: var(--ink-2); }
.sec-intro a, .small-body a, .never a { font-weight: 600; }
.h3 { margin: 28px 0 10px; font: 700 28px/1 var(--display); }
.small { margin: 14px 0 0; font-size: 15px; color: var(--ink-2); }
.small-body { margin: 0; max-width: 52ch; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; }
.two-help { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }

.field {
  width: 100%; padding: 12px 14px; font: 500 17px var(--body); color: var(--ink);
  background: #fff; border: 2px solid var(--ink); border-radius: 4px;
}
textarea.field { resize: vertical; line-height: 1.5; }
.field.mono { font-size: 15px; }
.field::placeholder { color: var(--ink-2); }
.field[aria-invalid="true"] { border-color: var(--down); }

/* ---------- Feed ---------- */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0 0 28px; }
.kpis[hidden] { display: none; }
.kpis div { padding: 16px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.kpis dt { font-size: 15px; color: var(--ink-2); }
.kpis dd { margin: 4px 0 0; font: 800 clamp(34px, 4.4vw, 52px)/1 var(--display); }
.feed-tools { display: grid; gap: 12px; margin-bottom: 20px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 8px 14px; font: 600 15px var(--body); color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ledger-wrap { overflow-x: auto; }
.ledger { width: 100%; border-collapse: collapse; font-size: 16px; }
.ledger[hidden] { display: none; }
.ledger th { padding: 10px 12px; text-align: left; font-size: 14px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid var(--ink); white-space: nowrap; }
.ledger td { padding: 14px 12px; vertical-align: top; border-bottom: 1px solid var(--line); }
.ledger .num { text-align: right; }
.ledger td.num { font: 700 22px/1.2 var(--display); white-space: nowrap; }
.ledger td.name { font-weight: 600; min-width: 200px; }
.ledger td.date { white-space: nowrap; color: var(--ink-2); }
.ledger .sub { display: block; font-size: 14px; font-weight: 400; color: var(--ink-2); }
.ledger a { font-weight: 600; }
.feed-state { margin: 18px 0 0; color: var(--ink-2); }
.feed-state:empty { display: none; }
.feed-state a { font-weight: 600; }
.more { margin: 24px 0 0; text-align: center; }
.more [hidden] { display: none; }

/* ---------- Cases ---------- */
.cases { list-style: none; margin: 0; padding: 0; }
.case { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 28px; padding: 28px 0; border-top: 1px solid var(--line); }
.case:last-child { border-bottom: 1px solid var(--line); }
.stamp { display: inline-block; padding: 6px 12px 4px; border: 2px solid currentColor; border-radius: 4px; font: 800 24px/1 var(--display); transform: rotate(-3deg); }
.s-open { background: var(--halt); color: var(--ink); border-color: var(--ink); }
.s-reported { color: var(--ink); }
.s-closed { color: var(--up); }
.s-sample { color: var(--ink-2); border-style: dashed; }
.case-id { display: block; margin-top: 14px; font: 500 14px var(--mono); color: var(--ink-2); }
.case-date { display: block; margin-top: 4px; font-size: 14px; color: var(--ink-2); }
.case h3 { margin: 0 0 8px; font: 800 clamp(30px, 3.6vw, 42px)/1 var(--display); }
.case p { margin: 0; max-width: 62ch; }
.flow { list-style: none; counter-reset: step; display: flex; flex-wrap: wrap; gap: 10px 32px; margin: 18px 0; padding: 0; }
.flow li { counter-increment: step; position: relative; padding: 9px 12px 9px 38px; background: var(--panel); border: 1px solid var(--line); border-radius: 4px; font-size: 15px; }
.flow li::before { content: counter(step); position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--ink); color: var(--paper); font: 600 12px var(--body); }
.flow li + li::after { content: ""; position: absolute; left: -22px; top: 50%; width: 14px; border-top: 2px solid var(--ink-2); }
.facts { display: flex; flex-wrap: wrap; gap: 6px 22px; font-size: 15px; color: var(--ink-2); }
.links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 12px 0 0; padding: 0; list-style: none; font-weight: 600; }

/* ---------- Verify ---------- */
.checker { display: flex; gap: 8px; }
.result { margin-top: 16px; padding: 14px 16px; border-left: 6px solid var(--ink-2); border-radius: 4px; background: var(--panel); }
.result[hidden] { display: none; }
.result b { display: block; margin-bottom: 2px; }
.result.ok { background: #dcefe6; border-left-color: var(--up); }
.result.bad { background: #f6dcd9; border-left-color: var(--down); }
.result.warn { background: #faedc4; border-left-color: #b8921a; }
.official { margin: 0; }
.official div { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.official div:last-child { border-bottom: 1px solid var(--line); }
.official dt { color: var(--ink-2); }
.official dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.never { margin: 0; padding-left: 20px; max-width: 52ch; }
.never li { margin: 6px 0; }

/* ---------- Help form ---------- */
.panel { align-self: start; padding: 26px; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; }
.form { display: grid; gap: 18px; }
.form label { display: block; margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.opt { font-weight: 400; color: var(--ink-2); }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.warn { margin: 0; padding: 12px 14px; background: #f6dcd9; border-left: 6px solid var(--down); border-radius: 4px; }
.tiers { margin: 0; padding: 0; border: 0; display: grid; gap: 10px; }
.tiers legend { padding: 0; margin-bottom: 8px; font-size: 15px; font-weight: 600; }
.form .tier { display: flex; gap: 12px; align-items: flex-start; margin: 0; padding: 14px; border: 2px solid var(--line); border-radius: 6px; cursor: pointer; font-weight: 400; }
.tier:has(input:checked) { border-color: var(--ink); background: #fff; }
.tier input { margin-top: 5px; }
.tier b { display: block; font-weight: 700; }
.form .check { display: flex; gap: 12px; align-items: flex-start; margin: 0; font-weight: 400; }
.form .check[hidden] { display: none; }
.check input { flex: none; width: 20px; height: 20px; margin-top: 3px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.err { margin: 6px 0 0; min-height: 0; font-size: 14px; font-weight: 600; color: var(--down); }
.err:empty { display: none; }
.form-msg { margin: 0; font-weight: 600; }
.form-msg:empty { display: none; }
.form-msg.bad { color: var(--down); }
.done h3 { margin: 0 0 10px; font: 800 44px/1 var(--display); }
.done .refbox { display: inline-block; margin: 8px 0 14px; padding: 10px 14px; background: var(--ink); color: var(--paper); border-radius: 4px; font: 500 22px var(--mono); letter-spacing: .06em; }
.done p { margin: 0 0 12px; max-width: 50ch; }

/* ---------- Method + footer ---------- */
.method { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 56px; margin: 0; }
.method div { padding: 18px 0; border-top: 1px solid var(--line); }
.method dt { font: 700 28px/1 var(--display); }
.method dd { margin: 6px 0 0; max-width: 46ch; color: var(--ink-2); }
.foot { padding: 28px 0 56px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink-2); }
.foot p { margin: 0; max-width: 72ch; }

@media (max-width: 860px) {
  .nav a:not(.keep) { display: none; }
  .two, .two-help { grid-template-columns: 1fr; gap: 40px; }
  .case { grid-template-columns: 1fr; gap: 14px; }
  .kpis { grid-template-columns: 1fr; }
  .method { grid-template-columns: 1fr; }
  .row2 { grid-template-columns: 1fr; }
  .hero-copy { padding-bottom: 72px; }
  .flow { flex-direction: column; gap: 22px; }
  .flow li + li::after { left: 50%; top: -18px; width: 0; height: 14px; border-top: 0; border-left: 2px solid var(--ink-2); }
  /* Feed rows become stacked entries on phones. */
  .ledger thead { position: absolute; left: -9999px; }
  .ledger, .ledger tbody, .ledger tr, .ledger td { display: block; width: 100%; }
  .ledger tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .ledger td { padding: 3px 0; border: 0; }
  .ledger td.num { text-align: left; font-size: 28px; }
  .ledger td[data-label]::before { content: attr(data-label) ": "; color: var(--ink-2); font-weight: 400; }
  .ledger td.name::before, .ledger td.num::before { content: none; }
}
@media (max-width: 520px) {
  .checker { flex-direction: column; }
  .panel { padding: 18px; }
}
.foot p + p { margin-top: 12px; }
.foot p + p a { margin-right: 16px; }
