:root {
  --paper: #f6f3ec;
  --card: #fffdf8;
  --ink: #14213d;
  --ink-2: #3d4a63;
  --muted: #6b7489;
  --line: #e2dccf;
  --line-2: #d3cbbb;
  --accent: #b5651d;
  --accent-ink: #8a4a10;
  --focus: #2f6fdf;
  --ok: #1f7a4d;
  --ok-bg: #e3f2e9;
  --warn: #9a5b00;
  --warn-bg: #fbf0d9;
  --off: #6b6f7a;
  --off-bg: #ecebe7;
  --chip: #efe9dd;
  --shadow: 0 1px 2px rgba(20, 33, 61, .06), 0 6px 24px -12px rgba(20, 33, 61, .18);
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1522;
    --card: #161e2e;
    --ink: #eef0f5;
    --ink-2: #c4cad6;
    --muted: #8f98ab;
    --line: #263148;
    --line-2: #34405a;
    --accent: #e0a24f;
    --accent-ink: #f0bb72;
    --focus: #7aa7ff;
    --ok: #6fd3a0;
    --ok-bg: #12352a;
    --warn: #f0c26a;
    --warn-bg: #3a2c10;
    --off: #a2a7b3;
    --off-bg: #232a38;
    --chip: #1f2838;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 var(--sans); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; outline: none; }
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 2px; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
button, input, select { font: inherit; color: inherit; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.topbar-inner { display: flex; align-items: center; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; white-space: nowrap; }
.brand svg { width: 26px; height: 26px; color: var(--accent); }
.topsearch { flex: 1; display: flex; max-width: 440px; position: relative; }
.topsearch input { width: 100%; height: 38px; border: 1px solid var(--line-2); background: var(--card); border-radius: 10px; padding: 0 40px 0 12px; }
.topsearch button { position: absolute; right: 2px; top: 2px; height: 34px; width: 36px; border: 0; background: none; cursor: pointer; color: var(--muted); }
.topsearch svg { width: 18px; height: 18px; }
.nav { display: flex; gap: 18px; margin-left: auto; font-size: 15px; }
.nav a { text-decoration: none; color: var(--ink-2); white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); text-decoration: underline; }

/* ---------- home ---------- */
.hero { padding: 64px 0 28px; }
.eyebrow { font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-ink); font-weight: 650; margin: 0 0 14px; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: clamp(34px, 6vw, 58px); line-height: 1.04; letter-spacing: -.02em; margin: 0 0 16px; max-width: 14ch; }
.hero .lede { font-size: clamp(17px, 2.2vw, 20px); color: var(--ink-2); max-width: 58ch; margin: 0 0 30px; }

.searchbox { background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); padding: 10px; max-width: 760px; }
.modes { display: flex; gap: 4px; padding: 2px 2px 10px; flex-wrap: wrap; }
.mode { border: 0; background: none; padding: 7px 13px; border-radius: 999px; cursor: pointer; color: var(--ink-2); font-weight: 550; font-size: 15px; }
.mode[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.mode:not([aria-pressed="true"]):hover { background: var(--chip); }
.searchrow { display: flex; gap: 8px; }
.searchrow input { flex: 1; min-width: 0; height: 54px; border: 1px solid var(--line-2); border-radius: 12px; padding: 0 16px; font-size: 18px; background: var(--paper); }
.searchrow input:focus { outline: 2px solid var(--focus); outline-offset: -1px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 54px; padding: 0 24px; border: 0; border-radius: 12px; background: var(--ink); color: var(--paper); font-weight: 650; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { filter: brightness(1.15); }
.btn.small { height: 40px; padding: 0 16px; border-radius: 10px; font-size: 15px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); }
.btn.accent { background: var(--accent); color: #fff; }
.statefilter { display: flex; align-items: center; gap: 10px; padding: 10px 4px 2px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.statefilter select { border: 1px solid var(--line-2); border-radius: 8px; background: var(--paper); padding: 5px 8px; font-size: 14px; }
.examples { margin: 18px 0 0; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
.examples button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; cursor: pointer; color: var(--ink-2); font-size: 14px; }
.examples button:hover { border-color: var(--ink-2); color: var(--ink); }

.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 40px 0 64px; }
.fact { border-top: 2px solid var(--ink); padding-top: 14px; }
.fact b { display: block; font-family: var(--serif); font-size: 30px; font-weight: 600; line-height: 1.1; margin-bottom: 4px; }
.fact span { color: var(--ink-2); font-size: 15px; }

/* ---------- results ---------- */
.results-head { padding: 28px 0 8px; }
.results-head h1 { font-family: var(--serif); font-size: clamp(24px, 4vw, 34px); font-weight: 600; margin: 0 0 6px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.sources { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 0; padding: 0; list-style: none; }
.src { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px 3px 8px; color: var(--ink-2); }
.src i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.src.err i { background: #c0392b; }
.src.err { color: #b0352a; }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 18px 0 12px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; font-size: 14px; cursor: pointer; color: var(--ink-2); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.chip .n { opacity: .65; margin-left: 4px; font-variant-numeric: tabular-nums; }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); margin-left: auto; cursor: pointer; }

.list { display: grid; gap: 10px; margin: 0 0 32px; padding: 0; list-style: none; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; text-decoration: none; transition: border-color .15s, box-shadow .15s, transform .15s; }
a.card:hover { border-color: var(--line-2); box-shadow: var(--shadow); transform: translateY(-1px); }
.card h3 { margin: 0; font-size: 17px; font-weight: 650; line-height: 1.3; overflow-wrap: anywhere; }
.card .meta { grid-column: 1 / -1; display: flex; gap: 6px 14px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.card .meta b { color: var(--ink-2); font-weight: 550; }
.card .hit { grid-column: 1 / -1; font-size: 14px; color: var(--accent-ink); }
.badges { display: flex; gap: 6px; align-items: start; }
.st { font: 700 12px/1 var(--mono); letter-spacing: .04em; background: var(--ink); color: var(--paper); border-radius: 6px; padding: 5px 6px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; border-radius: 999px; padding: 3px 9px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.active { color: var(--ok); background: var(--ok-bg); }
.pill.warning { color: var(--warn); background: var(--warn-bg); }
.pill.inactive, .pill.unknown { color: var(--off); background: var(--off-bg); }

.section-title { font-family: var(--serif); font-size: 22px; font-weight: 600; margin: 34px 0 6px; }
.elsewhere { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin: 14px 0 48px; padding: 0; list-style: none; }
.elsewhere li { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 14px; display: flex; flex-direction: column; gap: 2px; }
.elsewhere a { font-weight: 600; text-decoration: none; }
.elsewhere a:hover { text-decoration: underline; }
.elsewhere small { color: var(--muted); }
.elsewhere .tag { font-size: 11.5px; color: var(--ok); font-weight: 650; }

.empty, .error-box, .loading { background: var(--card); border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--ink-2); margin: 16px 0; }
.error-box { border-style: solid; border-color: #e3b5ae; color: #9b2c20; }
.loading .bar { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 16px auto 0; max-width: 260px; position: relative; }
.loading .bar::after { content: ""; position: absolute; inset: 0; width: 40%; background: var(--accent); border-radius: 3px; animation: slide 1.1s ease-in-out infinite; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.skeleton { height: 86px; border-radius: var(--radius); background: linear-gradient(90deg, var(--card), var(--chip), var(--card)); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; border: 1px solid var(--line); }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- entity ---------- */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 22px; }
.crumbs a { color: var(--muted); }
.entity-head { padding: 10px 0 18px; display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; border-bottom: 1px solid var(--line); }
.entity-head h1 { font-family: var(--serif); font-size: clamp(28px, 4.6vw, 44px); line-height: 1.08; font-weight: 600; margin: 8px 0 12px; letter-spacing: -.015em; overflow-wrap: anywhere; }
.entity-head .badges { flex-wrap: wrap; }
.keyfacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 20px 0; }
.keyfacts div { background: var(--card); padding: 12px 14px; min-width: 0; }
.keyfacts dt { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 3px; }
.keyfacts dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.panel h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 12px; font-weight: 700; display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.panel h2 .count { font-weight: 600; letter-spacing: 0; text-transform: none; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.rows li:first-child { border-top: 0; padding-top: 0; }
.rows .label { font-size: 13px; color: var(--muted); }
.rows .val { font-weight: 600; overflow-wrap: anywhere; }
.rows .sub { color: var(--ink-2); font-size: 15px; overflow-wrap: anywhere; }
.nyc { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 650; color: var(--accent-ink); margin-top: 4px; text-decoration: none; }
.nyc:hover { text-decoration: underline; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 15px; }
.timeline li:first-child { border-top: 0; }
.timeline time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.timeline .d { color: var(--muted); font-size: 13.5px; display: block; overflow-wrap: anywhere; }
.linkbtn { border: 0; background: none; color: var(--accent-ink); font-weight: 650; cursor: pointer; padding: 8px 0 0; }
.note { font-size: 14px; color: var(--ink-2); background: var(--chip); border-radius: 10px; padding: 10px 12px; margin: 0 0 10px; }
.cta { --cta-fg: #f4efe6; background: #14213d; color: var(--cta-fg); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.cta h2 { color: color-mix(in srgb, var(--cta-fg) 70%, transparent); }
.cta p { margin: 0 0 14px; color: color-mix(in srgb, var(--cta-fg) 86%, transparent); font-size: 15px; }
.cta .price { font-family: var(--serif); font-size: 32px; font-weight: 600; color: var(--cta-fg); }
.cta .btn { background: var(--accent); color: #fff; width: 100%; height: 46px; }
@media (prefers-color-scheme: dark) { .cta { background: #22304a; } }
.related-group { margin-bottom: 18px; }
.related-group h3 { font-size: 16px; margin: 0 0 4px; overflow-wrap: anywhere; }
.related-group .hint { font-size: 13.5px; color: var(--warn); margin: 0 0 8px; }
.related-group .list { margin-bottom: 0; }
.related-group .card { padding: 12px 14px; }
.related-group .card h3 { font-size: 15.5px; }
.sources-list { list-style: none; padding: 0; margin: 0; font-size: 14.5px; display: grid; gap: 8px; }
.sources-list a { font-weight: 600; }

/* ---------- coverage / pricing ---------- */
.page-head { padding: 36px 0 12px; }
.page-head h1 { font-family: var(--serif); font-size: clamp(30px, 5vw, 44px); font-weight: 600; margin: 0 0 8px; letter-spacing: -.015em; }
.page-head p { color: var(--ink-2); max-width: 66ch; margin: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); margin: 20px 0 48px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--paper); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
td .yes { color: var(--ok); font-weight: 650; }
td .no { color: var(--muted); }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 24px 0; }
.plan { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; gap: 10px; }
.plan.featured { border: 2px solid var(--ink); }
.plan h2 { margin: 0; font-size: 18px; }
.plan .price { font-family: var(--serif); font-size: 36px; font-weight: 600; }
.plan .price small { font-family: var(--sans); font-size: 15px; color: var(--muted); font-weight: 400; }
.plan p { margin: 0; color: var(--ink-2); flex: 1; }
pre.code { background: var(--ink); color: #e9edf5; border-radius: 12px; padding: 16px; overflow-x: auto; font: 13.5px/1.55 var(--mono); margin: 12px 0 48px; }
@media (prefers-color-scheme: dark) { pre.code { background: #0a0f19; border: 1px solid var(--line); } }

/* ---------- dialog ---------- */
.dialog { border: 0; border-radius: 18px; padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .45); }
.dialog::backdrop { background: rgba(10, 16, 28, .5); backdrop-filter: blur(2px); }
.dialog form { padding: 22px; display: grid; gap: 12px; }
.dialog h2 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 600; }
.dialog p { margin: 0; color: var(--ink-2); font-size: 15px; }
.dialog input { height: 46px; border: 1px solid var(--line-2); border-radius: 10px; padding: 0 12px; background: var(--paper); }
.dialog .actions { display: flex; gap: 8px; justify-content: flex-end; }
.dialog .msg { font-size: 14px; }
.dialog .msg.err { color: #b0352a; }

.footer { border-top: 1px solid var(--line); padding: 22px 0 30px; font-size: 13.5px; color: var(--muted); }
.footer p { margin: 0 0 6px; max-width: 80ch; }

/* ---------- report (print) ---------- */
.report-actions { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
@media print {
  .topbar, .footer, .report-actions, .cta, .linkbtn, .skip { display: none !important; }
  body { background: #fff; color: #000; font-size: 12px; }
  .panel, .keyfacts, .card { break-inside: avoid; box-shadow: none; }
  .grid2 { grid-template-columns: 1fr; }
  a { text-decoration: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  .keyfacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .topbar-inner { gap: 10px; }
  .brand span { display: none; }
  .nav { gap: 12px; font-size: 14px; }
  .topsearch input { height: 36px; }
  .hero { padding: 36px 0 18px; }
  .searchrow { flex-direction: column; }
  .searchrow input { height: 50px; font-size: 17px; }
  .btn { height: 50px; }
  .facts { grid-template-columns: 1fr; gap: 18px; padding: 28px 0 40px; }
  .entity-head { grid-template-columns: 1fr; }
  .card { grid-template-columns: 1fr; padding: 14px; }
  .card .badges { order: -1; }
  .toggle { margin-left: 0; }
  .timeline li { grid-template-columns: 82px 1fr; gap: 8px; }
}
@media (max-width: 400px) {
  .nav a[href="/coverage"] { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* AI: likely the same operator (docs/AI.md) */
.ai-panel { border-style: dashed; }
.ai-badge { font: 600 11px/1 var(--sans); text-transform: uppercase; letter-spacing: .06em; color: var(--warn); background: var(--warn-bg); border-radius: 999px; padding: 4px 8px; vertical-align: middle; }
.ai-label { margin: 0 0 12px; color: var(--ink-2); font-size: 14px; }
.ai-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.ai-row { border-top: 1px solid var(--line); padding-top: 12px; }
.ai-other { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.ai-evidence { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.ai-evidence li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; font-size: 14px; }
.ai-type { font-size: 12px; color: var(--muted); min-width: 110px; }
.ai-val { background: var(--chip); border-radius: 6px; padding: 2px 6px; overflow-wrap: anywhere; }
.ai-sep { color: var(--muted); }
.ai-reason { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.ai-caution { margin: 8px 0 0; padding: 6px 10px; border-left: 3px solid var(--muted); font-size: 14px; }
.ai-foot { margin-top: 8px; color: var(--muted); font-size: 12px; }
.ai-rowlabel { margin: 6px 0 0; font-size: 14px; font-weight: 600; }
.ai-src { display: block; color: var(--muted); font-size: 12px; font-family: inherit; }
.ai-note { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
