/* ---------- Header / nav ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 50;
}
.site-header .wrap { display: flex; align-items: center; gap: var(--s-4); min-height: 60px; flex-wrap: wrap; }
.brand {
  display: flex; align-items: baseline; gap: var(--s-2);
  font-family: var(--serif); font-weight: 700; font-size: 1.25rem; color: var(--ink); text-decoration: none;
}
.brand strong { font-weight: 700; }
.brand-sub { font-family: var(--sans); font-weight: 400; color: var(--ink-2); }
.brand-mark {
  font-family: var(--mono); font-size: 0.7rem; font-weight: 500; color: var(--card);
  background: var(--teal); padding: 2px 6px; border-radius: 2px; letter-spacing: 0.08em;
}
.nav { margin-left: auto; display: flex; gap: var(--s-1); flex-wrap: wrap; }
.nav a {
  color: var(--ink-2); text-decoration: none; font-size: var(--fs-1); font-weight: 500;
  padding: var(--s-2) var(--s-3); border-radius: var(--radius);
}
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a[aria-current="page"] { color: var(--teal); box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }
.nav-toggle { display: none; }
@media (max-width: 760px) {
  .nav-toggle {
    display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--rule-strong);
    border-radius: var(--radius); padding: 6px 12px; cursor: pointer; color: var(--ink);
  }
  .nav { display: none; width: 100%; margin: 0 0 var(--s-3); flex-direction: column; }
  .nav.open { display: flex; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--teal); }
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); background: var(--card); padding: var(--s-6) 0; font-size: var(--fs-1); color: var(--ink-3); }
.site-footer .wrap { display: grid; gap: var(--s-3); }
.site-footer a { color: var(--ink-2); }

/* ---------- Page head ---------- */
.page-head { padding: var(--s-7) 0 var(--s-4); border-bottom: 1px solid var(--rule); margin-bottom: var(--s-5); }
.page-head .lede { margin-bottom: 0; }
.asof { font-family: var(--mono); font-size: var(--fs-0); color: var(--ink-3); }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-5); box-shadow: var(--shadow); }
.card h3 { margin-bottom: var(--s-2); }
.card-tab {
  display: inline-block; font-family: var(--mono); font-size: var(--fs-0); letter-spacing: 0.06em;
  text-transform: uppercase; background: var(--paper-2); border: 1px solid var(--rule); border-bottom: 0;
  padding: 2px 10px; border-radius: var(--radius) var(--radius) 0 0; color: var(--ink-2);
}
.card-tab + .card { border-top-left-radius: 0; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.75rem;
  line-height: 1; padding: 4px 8px; border-radius: 999px; border: 1px solid currentColor; white-space: nowrap;
  background: var(--card); font-weight: 500;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.badge.c-documented { color: var(--c-documented); }
.badge.c-documented::before { border-radius: 1px; }
.badge.c-corroborated { color: var(--c-corroborated); }
.badge.c-inferred { color: var(--c-inferred); }
.badge.c-inferred::before { background: transparent; border: 2px dotted currentColor; width: 6px; height: 6px; }
.badge.c-lead { color: var(--c-lead); }
.badge.c-lead::before { background: transparent; border: 1.5px solid currentColor; width: 6px; height: 6px; }
.badge.sc-worked { color: var(--ok); background: var(--ok-tint); }
.badge.sc-partial { color: var(--part); background: var(--part-tint); }
.badge.sc-failed { color: var(--fail); background: var(--fail-tint); }
.badge.sc-worked::before { content: "✓"; background: none; width: auto; height: auto; }
.badge.sc-partial::before { content: "◐"; background: none; width: auto; height: auto; }
.badge.sc-failed::before { content: "✕"; background: none; width: auto; height: auto; }
.badge.server { color: var(--ink-2); }
.badge.server::before { display: none; }
.badge.risk { color: var(--risk); background: var(--risk-tint); }
.badge.risk::before { content: "⚑"; background: none; width: auto; height: auto; }

.etype { display: inline-flex; align-items: center; gap: 8px; font-size: var(--fs-1); font-weight: 500; }
.etype .line { display: inline-block; width: 34px; height: 0; border-top-width: 3px; }
.etype.tx { color: var(--tx); } .etype.tx .line { border-top: 3px solid var(--tx); }
.etype.ct { color: var(--ct); } .etype.ct .line { border-top: 3px dashed var(--ct); }
.etype.inf { color: var(--inf); } .etype.inf .line { border-top: 3px dotted var(--inf); }

.hs { font-family: var(--mono); font-size: 0.8rem; background: var(--paper-2); border: 1px solid var(--rule); padding: 1px 6px; border-radius: 2px; }
.id { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-3); word-break: break-all; }

/* ---------- Legend ---------- */
.legend { display: grid; gap: var(--s-4); grid-template-columns: 1fr; font-size: var(--fs-1); }
@media (min-width: 720px) { .legend { grid-template-columns: 1.1fr 1fr; } }
.legend h4, .legend-h { font-family: var(--sans); font-size: var(--fs-0); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: var(--s-2); }
.legend ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.legend li { display: grid; grid-template-columns: auto 1fr; gap: var(--s-3); align-items: start; }
.legend li span:last-child { color: var(--ink-2); }
.legend.compact { grid-template-columns: 1fr; gap: var(--s-3); }
.legend.compact li { grid-template-columns: auto; }
.legend.compact li span:last-child { display: none; }
.legend.compact ul { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }

/* ---------- Hero / home ---------- */
.hero { margin-top: 0; padding: var(--s-4) 0 var(--s-3); }
.hero h1 { max-width: 62rem; }
.hero .lede { font-size: clamp(1.05rem, 1rem + 0.35vw, 1.2rem); max-width: 62rem; margin-bottom: var(--s-4); }
.hero-meta { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); margin-top: var(--s-4); font-size: var(--fs-1); color: var(--ink-3); }

.home { font-size: 1.125rem; } /* projector: ≥18px body */

/* Policy timeline strip */
.timeline { position: relative; display: grid; gap: var(--s-3); grid-template-columns: 1fr; padding: 0; margin: 0; list-style: none; }
@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); gap: var(--s-3); }
  .timeline::before { content: ""; position: absolute; left: 0; right: 0; top: 11px; border-top: 2px solid var(--rule-strong); }
}
.timeline li { position: relative; padding-left: 24px; }
@media (min-width: 900px) { .timeline li { padding-left: 0; padding-top: 30px; } }
.timeline li::before {
  content: ""; position: absolute; left: 4px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--card); border: 2px solid var(--teal);
}
@media (min-width: 900px) { .timeline li::before { left: 0; top: 5px; } }
.timeline li.key::before { background: var(--teal); }
.timeline time { font-family: var(--mono); font-size: var(--fs-0); color: var(--teal); font-weight: 600; display: block; }
.timeline strong { display: block; font-size: var(--fs-1); line-height: 1.35; margin: 2px 0 4px; }
.timeline p { font-size: var(--fs-0); color: var(--ink-2); margin: 0 0 4px; line-height: 1.45; }
.timeline a { font-size: var(--fs-0); }
.timeline .unverified { color: var(--part); font-size: var(--fs-0); font-family: var(--mono); }

/* Stepper */
.stepper { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 980px) { .stepper { grid-template-columns: 22rem 1fr; } }
.step-panel { display: flex; flex-direction: column; gap: var(--s-3); }
.step-nav { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.step-dots { display: flex; gap: 6px; margin: 0; padding: 0; list-style: none; }
.step-dots button {
  width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--rule-strong); background: var(--card);
  font-family: var(--mono); font-size: var(--fs-0); cursor: pointer; color: var(--ink-2);
}
.step-dots button[aria-current="step"] { background: var(--teal); color: #fff; border-color: var(--teal); }
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius);
  border: 1px solid var(--rule-strong); background: var(--card); color: var(--ink); cursor: pointer; font-weight: 500;
  text-decoration: none; font-size: var(--fs-1);
}
.btn:hover { background: var(--paper-2); color: var(--ink); }
.btn.primary { background: var(--teal); border-color: var(--teal); color: #fff; }
.btn.primary:hover { background: var(--teal-2); color: #fff; }
.btn[disabled] { opacity: 0.4; cursor: default; }
.step-body h3 { font-size: 1.5rem; }
.step-body .kicker { font-family: var(--mono); font-size: var(--fs-0); color: var(--teal); text-transform: uppercase; letter-spacing: 0.08em; }
.step-body p { font-size: 1.125rem; }
.step-receipts { font-size: var(--fs-1); color: var(--ink-3); }
.kbd { font-family: var(--mono); font-size: 0.75rem; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 3px; padding: 0 5px; background: var(--card); }

/* Graph */
.graph-frame { position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.graph { width: 100%; height: 520px; }
.graph.tall { height: min(72vh, 680px); }
@media (max-width: 640px) { .graph, .graph.tall { height: 380px; } }
.graph-legend { position: absolute; left: 8px; bottom: 8px; background: rgba(255,255,255,0.94); border: 1px solid var(--rule); border-radius: var(--radius); padding: 6px 10px; font-size: var(--fs-0); display: flex; gap: 12px; flex-wrap: wrap; max-width: calc(100% - 16px); }
.graph-legend .etype { font-size: var(--fs-0); }
.graph-legend .etype .line { width: 22px; }
.graph-tools { position: absolute; right: 8px; top: 8px; display: flex; gap: 4px; }
.graph-tools button { background: var(--card); border: 1px solid var(--rule-strong); border-radius: var(--radius); width: 34px; height: 34px; cursor: pointer; font-size: 1rem; }
.graph-fallback { padding: var(--s-5); color: var(--ink-3); }

/* Explore layout */
.explore { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 1060px) { .explore { grid-template-columns: 1fr 20rem; } }
.explore .filters { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); align-items: flex-start; padding: var(--s-4) var(--s-5); }
.explore .filters fieldset { margin: 0; }
.explore .filters .ff-check { display: flex; flex-wrap: wrap; gap: 0 var(--s-3); }
.explore .filters select { min-width: 12rem; }
.explore .filters .ff-actions { display: flex; flex-direction: column; gap: 4px; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 var(--s-4); }
.filters legend { font-size: var(--fs-0); text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); font-weight: 600; margin-bottom: var(--s-2); }
.filters label { display: flex; align-items: center; gap: var(--s-2); font-size: var(--fs-1); padding: 3px 0; cursor: pointer; }
.filters input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--teal); }
.filters select { width: 100%; padding: 6px; font: inherit; font-size: var(--fs-1); border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--card); }
.side-panel { min-height: 12rem; }
.side-panel h3 { font-size: 1.2rem; }
.side-panel dl { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--s-3); font-size: var(--fs-1); margin: var(--s-3) 0; }
.side-panel dt { color: var(--ink-3); }
.side-panel dd { margin: 0; }
.side-panel ul { padding-left: 1.1rem; font-size: var(--fs-1); }
.flags { display: flex; flex-wrap: wrap; gap: 4px; margin: var(--s-2) 0; }
.flag-chip { font-family: var(--mono); font-size: 0.72rem; background: var(--risk-tint); color: var(--risk); border-radius: 2px; padding: 2px 6px; }
.receipts { display: flex; flex-wrap: wrap; gap: 4px; }
.receipts a { font-family: var(--mono); font-size: 0.78rem; background: var(--teal-tint); color: var(--teal-2); padding: 2px 6px; border-radius: 2px; text-decoration: none; }
.receipts a:hover { text-decoration: underline; }

/* List view of edges */
.edge-list { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.edge-list li { background: var(--card); border: 1px solid var(--rule); border-left-width: 4px; border-radius: var(--radius); padding: var(--s-3); font-size: var(--fs-1); }
.edge-list li.tx { border-left-color: var(--tx); }
.edge-list li.ct { border-left-color: var(--ct); border-left-style: dashed; }
.edge-list li.inf { border-left-color: var(--inf); border-left-style: dotted; }
.edge-list .edge-head { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: 4px; }
.edge-list .rel { font-family: var(--mono); font-size: var(--fs-0); color: var(--ink-3); }

/* Verdict */
.verdict { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 900px) { .verdict { grid-template-columns: repeat(3, 1fr); } }
.verdict .col { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid; border-radius: var(--radius); padding: var(--s-4) var(--s-5); }
.verdict .col.detected { border-top-color: var(--teal); }
.verdict .col.suggested { border-top-color: var(--inf); border-top-style: dashed; }
.verdict .col.not-visible { border-top-color: var(--ink-3); border-top-style: dotted; }
.verdict h3 { font-size: 1.15rem; display: flex; gap: 8px; align-items: center; }
.verdict ul { padding-left: 1.1rem; margin: 0; display: grid; gap: var(--s-3); font-size: var(--fs-1); }
.verdict .receipts { margin-top: 4px; }
.headline { font-family: var(--serif); font-size: clamp(1.2rem, 1.05rem + 0.7vw, 1.5rem); line-height: 1.4; max-width: 56rem; border-left: 4px solid var(--teal); padding-left: var(--s-4); }

/* Feedback block */
.feedback { background: var(--teal-tint); border: 1px solid #C4DCDA; border-radius: var(--radius); padding: var(--s-5); }
.feedback ol { margin: 0; padding-left: 1.3rem; display: grid; gap: var(--s-2); }

/* Passport card */

/* Rubric & scorecard */
.result-detected { color: var(--teal); font-weight: 600; }
.result-suggested { color: var(--inf); font-weight: 600; }
.result-not_visible { color: var(--ink-3); font-weight: 600; }
.scorebar { display: flex; height: 14px; border-radius: 2px; overflow: hidden; border: 1px solid var(--rule); margin: var(--s-2) 0 var(--s-3); }
.scorebar span { display: block; height: 100%; }
.scorebar .w { background: var(--ok); }
.scorebar .p { background: repeating-linear-gradient(45deg, var(--part), var(--part) 4px, #d9a24a 4px, #d9a24a 8px); }
.scorebar .f { background: var(--fail); }
.score-counts { display: flex; gap: var(--s-4); flex-wrap: wrap; font-size: var(--fs-1); }

/* Replay */
.replay { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-4); counter-reset: rp; }
.replay > li { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.replay .rp-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2); padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--rule); background: var(--paper); }
.replay .rp-id { font-family: var(--mono); font-weight: 600; color: var(--teal); }
.replay .rp-q { font-family: var(--serif); font-size: 1.15rem; padding: var(--s-3) var(--s-4) 0; margin: 0; }
.replay .rp-grid { display: grid; grid-template-columns: 1fr; gap: 0; }
@media (min-width: 900px) { .replay .rp-grid { grid-template-columns: 1fr 1fr 1fr; } }
.replay .rp-grid > div { padding: var(--s-3) var(--s-4); font-size: var(--fs-1); }
.replay .rp-label { display: block; font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 4px; }
.replay pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-family: var(--mono); font-size: 0.78rem; background: var(--paper-2); padding: var(--s-2); border-radius: 2px; }
.replay > li:target { box-shadow: var(--focus); }

.searchbox { width: 100%; padding: 10px 12px; font: inherit; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--card); }
.log-table td { font-size: var(--fs-1); }
.log-table td.mono, .log-table td code { white-space: nowrap; }
.log-table tr:target td { background: #FFF6D6; }

.callout { border: 1px solid var(--rule); border-left: 4px solid var(--inf); background: var(--card); padding: var(--s-3) var(--s-4); border-radius: var(--radius); font-size: var(--fs-1); }
.callout.teal { border-left-color: var(--teal); }

.toc { display: flex; flex-wrap: wrap; gap: var(--s-2); margin: var(--s-4) 0 0; padding: 0; list-style: none; }
.toc a { font-size: var(--fs-1); }

.case-meta { display: flex; flex-wrap: wrap; gap: var(--s-2); align-items: center; margin-bottom: var(--s-3); }
.steps-list { counter-reset: st; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-3); }
.steps-list li { counter-increment: st; position: relative; padding-left: 2.6rem; }
.steps-list li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--teal); color: #fff; font-family: var(--mono); display: grid; place-items: center; font-size: var(--fs-0); }

/* ===================== Iteration 1.1: plain-language home ===================== */
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: var(--s-5); }
.hero-ctas .btn { font-size: 1rem; padding: 10px 18px; }

.facts { display: grid; gap: var(--s-3); grid-template-columns: 1fr; margin-top: 0; }
@media (min-width: 560px) { .facts { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .facts { grid-template-columns: repeat(4, 1fr); } }
.fact { background: var(--ink); color: #fff; border-radius: var(--radius); padding: var(--s-4) var(--s-5); display: flex; flex-direction: column; gap: 6px; }
.fact .v { font-family: var(--serif); font-size: clamp(2rem, 1.6rem + 1.4vw, 2.7rem); font-weight: 700; line-height: 1; color: #9FD8D3; }
.fact .l { font-size: 1rem; line-height: 1.4; }
.fact .s { font-family: var(--mono); font-size: 0.72rem; color: #C9C7BE; margin-top: auto; }
.fact .s a { color: #C9C7BE; }

.explain { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 900px) { .explain { grid-template-columns: repeat(3, 1fr); } }
.explain .card { display: flex; flex-direction: column; gap: var(--s-2); }
.explain .num { font-family: var(--mono); font-size: var(--fs-0); color: var(--teal); letter-spacing: 0.08em; text-transform: uppercase; }
.explain h3 { font-size: 1.3rem; }
.explain p { margin: 0; color: var(--ink-2); }
.explain svg { width: 100%; height: 90px; margin-bottom: var(--s-2); }

.diagram { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-4); box-shadow: var(--shadow); }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram-key { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); margin-top: var(--s-3); font-size: var(--fs-1); }

.case-cards { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .case-cards { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .case-cards { grid-template-columns: repeat(3, 1fr); } }
.case-card { background: var(--card); border: 1px solid var(--rule); border-top: 5px solid var(--teal); border-radius: var(--radius); padding: var(--s-4) var(--s-5); display: flex; flex-direction: column; gap: var(--s-2); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .12s ease, box-shadow .12s ease; }
.case-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(26,26,26,.09); color: var(--ink); }
.case-card .cc-top { display: flex; justify-content: space-between; gap: var(--s-2); align-items: baseline; font-family: var(--mono); font-size: var(--fs-0); color: var(--ink-3); }
.case-card h3 { font-size: 1.25rem; margin: 0; }
.case-card p { font-size: var(--fs-1); color: var(--ink-2); margin: 0; }
.case-card .cc-num { display: flex; gap: var(--s-2); align-items: baseline; margin-top: auto; padding-top: var(--s-2); border-top: 1px solid var(--rule); }
.case-card .cc-num strong { font-family: var(--serif); font-size: 1.7rem; color: var(--teal); }
.case-card .cc-num span { font-size: var(--fs-0); color: var(--ink-2); }
.case-card .cc-go { font-size: var(--fs-1); color: var(--teal); font-weight: 600; }
.pattern { display: inline-block; font-family: var(--mono); font-size: 0.72rem; padding: 2px 8px; border-radius: 2px; background: var(--paper-2); border: 1px solid var(--rule); color: var(--ink-2); width: fit-content; }
.pattern.rerouting-pattern { background: var(--risk-tint); color: var(--risk); border-color: #F3C3BE; }
.pattern.complete-trail { background: var(--tx-tint); color: var(--tx); border-color: #C3D3EF; }
.pattern.trail-not-started { background: var(--paper-2); color: var(--ink-2); }
.pattern.contrast-legitimate { background: var(--ok-tint); color: var(--ok); border-color: #BEDFCB; }
.pattern.trail-goes-dark { background: var(--inf-tint); color: var(--inf); border-color: #EBD3A8; }
.case-card.p-rerouting-pattern { border-top-color: var(--risk); }
.case-card.p-complete-trail { border-top-color: var(--tx); }
.case-card.p-trail-not-started { border-top-color: var(--ink-3); }
.case-card.p-contrast-legitimate { border-top-color: var(--ok); }
.case-card.p-trail-goes-dark { border-top-color: var(--inf); }

.case-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 var(--s-4); padding: 0; list-style: none; }
.case-tabs button, .case-tabs a { font: inherit; font-size: var(--fs-1); padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--card); color: var(--ink-2); cursor: pointer; text-decoration: none; }
.case-tabs [aria-selected="true"], .case-tabs [aria-current="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.glossary { display: grid; gap: var(--s-3) var(--s-6); grid-template-columns: 1fr; margin: 0; }
@media (min-width: 820px) { .glossary { grid-template-columns: 1fr 1fr; } }
.glossary div { border-top: 1px solid var(--rule); padding-top: var(--s-2); }
.glossary dt { font-weight: 600; }
.glossary dd { margin: 2px 0 0; color: var(--ink-2); font-size: var(--fs-1); }

.conf-table td:first-child { white-space: nowrap; }
.why { font-size: var(--fs-0); color: var(--ink-2); font-style: italic; }
.keynums { display: grid; gap: var(--s-3); grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); margin: var(--s-4) 0; }
.keynum { border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-3); background: var(--paper); }
.keynum strong { display: block; font-family: var(--serif); font-size: 1.8rem; color: var(--teal); line-height: 1.1; }
.keynum span { font-size: var(--fs-0); color: var(--ink-2); line-height: 1.4; display: block; }
.mini-graph { height: 480px; }
.section-intro { max-width: 46rem; color: var(--ink-2); font-size: 1.05rem; }

.result-absent { color: var(--ok); font-weight: 600; }

/* ===================== Graph v2 ===================== */
.graph-frame { background: #FFFFFF; background-image: radial-gradient(rgba(26,26,26,.06) 1px, transparent 1px); background-size: 18px 18px; }
.graph-tools { z-index: 5; }
.graph { position: relative; z-index: 1; }
.graph-bands, .graph-flow { position: absolute; left: 0; top: 0; pointer-events: none; }
.graph-bands { z-index: 0; }
.graph-flow { z-index: 2; }
.graph-tools button { font-size: 1.1rem; line-height: 1; display: grid; place-items: center; }
.graph-tools button:hover { background: var(--paper-2); }
.graph-tip { position: absolute; z-index: 6; max-width: 260px; pointer-events: none; background: var(--ink); color: #fff; font-size: var(--fs-0); line-height: 1.45; padding: 8px 10px; border-radius: var(--radius); box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.graph-tip .muted { color: #C9C7BE; }
.graph-key { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: var(--fs-0); margin-top: var(--s-2); color: var(--ink-2); }
.graph-key .etype { font-size: var(--fs-0); }
.graph-key .etype .line { width: 22px; }
.lg-node { display: inline-flex; align-items: center; gap: 6px; }
.lg-node::before { content: ""; width: 16px; height: 11px; border-radius: 3px; border: 1.5px solid #9DB8E0; background: #EAF1FB; }
.lg-parent::before { background: #EFE7F8; border-color: var(--ct); border-width: 2px; }
.lg-officer::before { background: #fff; border: 1.5px dashed var(--ct); }
.lg-transit_plant::before { background: var(--teal); border-color: var(--teal); }
.lg-us_buyer::before { background: #fff; border: 2px solid var(--ink); }
.lg-merged::before { background: #fff; border: 4px double var(--ink-3); width: 14px; height: 9px; }
.graph-toggles { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); font-size: var(--fs-1); margin-bottom: var(--s-2); }
.graph-toggles label { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.graph-toggles input { width: 17px; height: 17px; accent-color: var(--teal); }
.graph-legend { display: none; }

/* Q / A / why block */
.qa { display: grid; gap: var(--s-3); grid-template-columns: 1fr; margin: var(--s-4) 0; }
@media (min-width: 900px) { .qa { grid-template-columns: 1fr 1.3fr 1fr; } }
.qa > div { border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-4); background: var(--card); }
.qa .qa-label { display: block; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 6px; }
.qa .q { border-left: 4px solid var(--ink); font-family: var(--serif); font-size: 1.15rem; line-height: 1.4; }
.qa .a { border-left: 4px solid var(--teal); }
.qa .w { border-left: 4px solid var(--ct); }
.answer-pill { display: inline-block; font-family: var(--mono); font-size: 0.8rem; font-weight: 600; padding: 2px 10px; border-radius: 999px; margin-bottom: 6px; background: var(--teal); color: #fff; }
.answer-pill.Partly { background: var(--inf); }
.answer-pill.Not-yet { background: var(--ink-3); }
.answer-pill.No { background: var(--risk); }
.case-card .cc-q { font-family: var(--serif); font-size: 1rem; color: var(--ink); }
@media (min-width: 1060px) { .explore { grid-template-columns: 1fr; } }
.graph.xtall { height: min(80vh, 780px); }
@media (max-width: 640px) { .graph.xtall { height: 440px; } }
.drawer { position: absolute; z-index: 7; right: 12px; top: 56px; width: min(360px, calc(100% - 24px)); max-height: calc(100% - 70px); overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,.16); padding: var(--s-4); }
.drawer[hidden] { display: none; }
.drawer-close { position: sticky; top: 0; float: right; border: 1px solid var(--rule-strong); background: var(--card); border-radius: 50%; width: 30px; height: 30px; cursor: pointer; font-size: 1.1rem; line-height: 1; }
@media (max-width: 760px) { .drawer { position: static; width: auto; max-height: none; box-shadow: none; margin-top: var(--s-3); } .graph-frame { overflow: visible; } }
.flag-chip { word-break: break-all; }

/* ===================== Iteration 1.3 ===================== */
/* Nav: seven items need the collapsed menu earlier */
@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; margin-left: auto; background: none; border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 6px 12px; cursor: pointer; color: var(--ink); }
  .nav { display: none; width: 100%; margin: 0 0 var(--s-3); flex-direction: column; }
  .nav.open { display: flex; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--teal); }
}
.nav a { white-space: nowrap; }

/* Map */
.map-section { width: min(100vw - 32px, 108rem); margin-left: calc(50% - min(50vw - 16px, 54rem)); }
.map-section > .eyebrow, .map-section > h2, .map-section > .section-intro { max-width: 60rem; }
.map-wrap { display: grid; gap: var(--s-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .map-wrap { grid-template-columns: minmax(0, 1fr) 24rem; } }
.map-frame { position: relative; background: #F4F6F6; border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.map-svg { display: block; width: 100%; height: auto; }
.map-sea, .map-sphere { fill: #EEF3F3; }
.map-sphere { stroke: var(--rule); stroke-width: 0.6; }
.map-grat { fill: none; stroke: #FFFFFF; stroke-width: 0.5; }
.map-country { fill: #DEDBD1; stroke: #FFFFFF; stroke-width: 0.5; }
.map-country.involved { fill: #C9C4B6; }
.map-flow { fill: none; stroke-width: 1.8; opacity: 0.55; transition: opacity .25s; }
.map-flow.t-planned { stroke-dasharray: 6 5; }
.map-flow.t-owner { stroke-dasharray: 2 4; stroke-linecap: round; }
.map-flow.off { opacity: 0; pointer-events: none; }
.route-leg { fill: none; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.route-leg.t-planned { stroke-dasharray: 9 7; }
.route-leg.t-owner { stroke-dasharray: 1 7; stroke-width: 4; }
.route-head { stroke: #fff; stroke-width: 2.5; filter: drop-shadow(0 0 6px rgba(15, 94, 92, .55)); }
.map-pt { transition: opacity .25s; }
.map-pt.off { opacity: 0.28; }
.map-pt .dot { stroke: #fff; stroke-width: 2; }
.map-pt.k-origin .dot { fill: var(--ct); }
.map-pt.k-plant .dot { fill: var(--teal); }
.map-pt.k-plant { cursor: pointer; }
.map-pt.k-plant.planned .dot { fill: #FFFFFF; stroke: var(--teal); stroke-width: 3; }
.map-pt.k-buyers .dot { fill: var(--ink); }
.map-pt.k-plant:hover .dot, .map-pt.k-plant:focus .dot, .map-pt.active .dot { stroke: #E0A100; stroke-width: 4; }
.map-pt:focus { outline: none; }
.map-num { font-family: var(--mono); font-size: 11.5px; font-weight: 600; fill: #fff; text-anchor: middle; pointer-events: none; }
.map-pt.planned .map-num { fill: var(--teal); }
.map-label { display: none; font-family: var(--sans); font-size: 15px; font-weight: 600; fill: var(--ink); paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; pointer-events: none; }
.map-pt.on-route .map-label { display: block; }
.map-pt .pulse { fill: #E0A100; opacity: 0; pointer-events: none; transform-box: fill-box; transform-origin: center; }
.map-pt.pulsing .pulse { animation: map-pulse 1.3s ease-out infinite; }
@keyframes map-pulse { 0% { opacity: .55; transform: scale(.8); } 100% { opacity: 0; transform: scale(3); } }
@media (prefers-reduced-motion: reduce) { .map-pt.pulsing .pulse { animation: none; opacity: .3; transform: scale(1.8); } }
.map-cap { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; gap: var(--s-3); align-items: center; justify-content: space-between; background: rgba(26, 26, 26, .92); color: #fff; border-radius: var(--radius); padding: 10px 14px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
.map-cap[hidden] { display: none; }
.mc-text { display: grid; gap: 2px; min-width: 0; }
.mc-case, .mc-prog { font-family: var(--mono); font-size: 0.72rem; color: #C9C7BE; }
.mc-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.02rem; }
.mc-btns { display: flex; gap: 6px; flex: none; }
.mc-btns button { background: transparent; color: #fff; border: 1px solid #8B8A83; border-radius: var(--radius); padding: 5px 10px; font-size: var(--fs-0); cursor: pointer; }
.mc-btns button:hover { background: rgba(255,255,255,.14); }
@media (max-width: 640px) { .map-cap { position: static; flex-direction: column; align-items: stretch; border-radius: 0; } }
.ms-stage { display: inline-block; flex: none; font-family: var(--mono); font-size: 0.66rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 1px 6px; border-radius: 3px; background: var(--tx-tint); color: var(--tx); }
.ms-stage.s-mine { background: #F3E9DA; color: #6E4A0E; }
.ms-stage.s-processing { background: var(--teal-tint); color: var(--teal-2); }
.ms-stage.s-output { background: #DDF0E4; color: #17603A; }
.ms-stage.s-owner, .ms-stage.s-contract { background: var(--ct-tint); color: var(--ct); }
.ms-stage.s-also { background: var(--paper-2); color: var(--ink-2); }
.map-tools { position: absolute; top: 12px; right: 12px; z-index: 3; display: flex; gap: 6px; }
.map-tools button { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; background: var(--card); color: var(--ink); border: 1px solid var(--rule); border-radius: var(--radius); padding: 5px 10px; font-size: var(--fs-0); font-weight: 600; cursor: pointer; box-shadow: var(--shadow); }
.map-tools button[hidden] { display: none; }
.map-tools button:hover { background: var(--paper-2); }
@media (max-width: 979px) { .map-wrap:not(.expanded) .map-tools { display: none; } } /* the map is already full width here */
html.map-open { overflow: hidden; }
.map-wrap.expanded { position: fixed; inset: 0; z-index: 60; padding: var(--s-3); background: var(--paper); grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
.map-wrap.expanded .map-frame { grid-area: 1 / 1; min-height: 0; background: #EEF3F3; }
.map-wrap.expanded .map-svg { height: 100%; }
.map-wrap.expanded .map-side { grid-area: 1 / 1; justify-self: end; z-index: 2; display: none; flex-direction: column; width: min(24rem, calc(100% - 24px)); min-height: 0; margin: 58px 12px 12px 0; contain: size; }
.map-wrap.expanded.list-open .map-side { display: flex; }
.map-wrap.expanded .map-cap { position: absolute; flex-direction: row; border-radius: var(--radius); }
.map-wrap.expanded.list-open .map-cap { right: calc(24rem + 24px); }
.map-side { position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); min-height: 24rem; }
@media (min-width: 980px) { .map-side { display: flex; flex-direction: column; min-height: 0; contain: size; } }
.ms-head { display: flex; flex-direction: column; padding: var(--s-3) var(--s-4); border-bottom: 1px solid var(--rule); font-size: var(--fs-1); }
.ms-head span { font-size: var(--fs-0); }
.ms-list { list-style: none; margin: 0; padding: 0; overflow: auto; flex: 1; position: relative; }
.ms-item { border-bottom: 1px solid var(--rule); }
.ms-item:last-child { border-bottom: 0; }
.ms-row { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: 9px var(--s-3); cursor: pointer; font-size: var(--fs-1); color: var(--ink); }
.ms-row:hover { background: var(--paper-2); }
.ms-item.open .ms-row { background: var(--teal-tint); font-weight: 600; position: sticky; top: 0; z-index: 2; }
.ms-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff; font-family: var(--mono); font-size: 0.72rem; flex: none; }
.ms-t { flex: 1; min-width: 0; line-height: 1.3; }
.ms-chev { width: 8px; height: 8px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); flex: none; margin-right: 4px; transition: transform .15s; }
.ms-item.open .ms-chev { transform: rotate(-135deg); }
.ms-body { padding: var(--s-2) var(--s-3) var(--s-3); }
.ms-steps { list-style: none; margin: 0 0 var(--s-2); padding: 0; display: grid; gap: 2px; }
.ms-step { display: grid; gap: 3px; width: 100%; text-align: left; background: none; border: 0; border-left: 3px solid var(--rule); padding: 6px 8px; cursor: pointer; color: var(--ink-2); opacity: .72; transition: opacity .2s, border-color .2s, background .2s; }
.ms-step:hover { opacity: 1; background: var(--paper); }
.ms-step.done { opacity: 1; border-left-color: var(--teal); }
.ms-step.now { opacity: 1; border-left-color: #E0A100; background: #FFF9E8; color: var(--ink); }
.ms-top { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: var(--fs-1); color: var(--ink); line-height: 1.3; }
.ms-text { font-size: var(--fs-0); line-height: 1.45; }
.ms-gap { font-size: var(--fs-0); font-weight: 600; color: var(--part); }
.ms-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-family: var(--mono); font-size: 0.7rem; color: var(--ink-3); }
.ms-conf::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: var(--ink-3); }
.ms-conf.c-documented::before { background: var(--c-documented); }
.ms-conf.c-corroborated::before { background: var(--c-corroborated); }
.ms-conf.c-inferred::before { background: var(--c-inferred); }
.ms-conf.c-lead::before { background: var(--c-lead); }
.ms-more { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--paper); }
.ms-more summary { cursor: pointer; font-size: var(--fs-1); font-weight: 600; color: var(--teal); padding: 8px 10px; }
.ms-more-body { padding: 0 10px 10px; font-size: var(--fs-1); }
.ms-more-body p { margin-bottom: var(--s-2); line-height: 1.45; }
.ms-more-body .qa-label { display: block; font-family: var(--mono); font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 2px; }
.mc-facts { display: grid; grid-template-columns: auto 1fr; gap: 4px var(--s-3); font-size: var(--fs-1); margin: var(--s-2) 0 var(--s-3); }
.mc-facts dt { color: var(--ink-3); }
.mc-facts dd { margin: 0; }
.mc-links { display: flex; flex-wrap: wrap; gap: var(--s-3); font-size: var(--fs-1); font-weight: 600; margin: 0; }
.map-key { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-0); color: var(--ink-2); }
.map-key span { display: inline-flex; align-items: center; gap: 6px; }
.mk { display: inline-block; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--rule); }
.mk-origin { background: var(--ct); } .mk-plant { background: var(--teal); } .mk-buyers { background: var(--ink); }
.ml { display: inline-block; width: 26px; height: 0; border-top: 2.5px solid var(--tx); }
.ml-planned { border-top: 2.5px dashed var(--ink-3); } .ml-owner { border-top: 2.5px dotted var(--ct); } .ml-output { border-top-color: var(--teal); }

/* Simple case cards */
.case-card.simple { gap: var(--s-2); }
.case-card.simple p { font-size: 1rem; color: var(--ink); line-height: 1.5; }
.case-card.simple .cc-go { margin-top: auto; padding-top: var(--s-2); }

.gloss-wrap summary { cursor: pointer; font-weight: 600; margin-bottom: var(--s-3); }
.linkish { background: none; border: 0; padding: 0; color: var(--teal); font: inherit; font-size: var(--fs-1); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

/* Check a Buyer */
.buyer-picker, .q-picker { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; margin-bottom: var(--s-5); }
.bp-label { font-weight: 600; }
.bp-select { min-width: 18rem; padding: 9px 10px; font: inherit; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--card); }
.bp-quick { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.bp-quick button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.buyer-summary { display: grid; gap: var(--s-4); grid-template-columns: 1fr; align-items: end; padding-bottom: var(--s-4); border-bottom: 2px solid var(--ink); margin-bottom: var(--s-4); }
@media (min-width: 860px) { .buyer-summary { grid-template-columns: 1fr auto; } }
.buyer-summary h2 { margin-bottom: 4px; }
.buyer-summary p { margin: 0; }
.bs-stats { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.bs-stats > div { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-3) var(--s-4); min-width: 8.5rem; }
.bs-stats strong { display: block; font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: var(--teal); }
.bs-stats span { font-size: var(--fs-0); color: var(--ink-2); }
.bs-stats .warn strong { color: var(--risk); }
.sup-list { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.sup-card { background: var(--card); border: 1px solid var(--rule); border-left: 5px solid var(--rule-strong); border-radius: var(--radius); padding: var(--s-4) var(--s-5); box-shadow: var(--shadow); }
.sup-card.risk { border-left-color: var(--risk); }
.sup-card.clear { border-left-color: var(--ok); }
.sup-head { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; align-items: flex-start; }
.sup-head h3 { margin: 0 0 2px; font-size: 1.2rem; }
.sup-flag { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sup-flag .label { font-size: var(--fs-0); color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-family: var(--mono); }
.sup-flag strong { font-family: var(--serif); font-size: 1.3rem; }
.sup-card.risk .sup-flag strong { color: var(--risk); }
.sup-card.clear .sup-flag strong { color: var(--ok); }
.sup-facts { display: grid; grid-template-columns: 9.5rem 1fr; gap: 6px var(--s-4); margin: var(--s-3) 0; font-size: var(--fs-1); }
@media (max-width: 600px) { .sup-facts { grid-template-columns: 1fr; } }
.sup-facts dt { color: var(--ink-3); }
.sup-facts dd { margin: 0; }
.sup-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; margin: 0; font-size: var(--fs-1); }
.sup-receipts { font-size: var(--fs-0); color: var(--ink-3); }

/* Due diligence */
.screen-table td { font-size: var(--fs-1); vertical-align: middle; }
.yn { font-weight: 700; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-0); font-family: var(--mono); }
.yn.yes { background: var(--risk-tint); color: var(--risk); }
.yn.no { background: var(--ok-tint); color: var(--ok); }
.screen-cards { display: grid; gap: var(--s-4); margin-top: var(--s-5); }
.screen-card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; scroll-margin-top: 80px; }
.sc-head { display: flex; justify-content: space-between; gap: var(--s-4); flex-wrap: wrap; padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--rule); background: var(--paper); }
.sc-head h3 { margin: 0; }
.sc-verdict { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sc-verdict span { font-family: var(--mono); font-size: var(--fs-0); text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.sc-verdict strong { font-family: var(--serif); font-size: 1.5rem; }
.sc-verdict.yes strong { color: var(--risk); }
.sc-verdict.no strong { color: var(--ok); }
.sc-body { display: grid; gap: var(--s-5); grid-template-columns: 1fr; padding: var(--s-4) var(--s-5); }
@media (min-width: 900px) { .sc-body { grid-template-columns: 1fr 1.2fr; } }
.sc-body h4 { font-family: var(--sans); font-size: var(--fs-0); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: var(--s-3) 0 4px; }
.sc-body h4:first-child { margin-top: 0; }
.sc-body p, .sc-body ul { font-size: var(--fs-1); margin-top: 0; }
.sc-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; }
.chain { list-style: none; margin: 0 0 var(--s-2); padding: 0; }
.chain-box { border: 1px solid var(--rule-strong); border-left: 4px solid var(--ct); border-radius: var(--radius); padding: 6px 10px; background: #fff; }
.chain li:last-child .chain-box { border-left-color: var(--teal); background: var(--teal-tint); }
.chain-box strong { display: block; font-size: var(--fs-1); }
.chain-box span { font-size: var(--fs-0); color: var(--ink-3); }
.chain-link { font-family: var(--mono); font-size: var(--fs-0); color: var(--ct); padding: 3px 0 3px 18px; }
.q-out { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-5); box-shadow: var(--shadow); }
.q-list { padding-left: 1.3rem; display: grid; gap: var(--s-3); }
.q-list li { padding-left: 4px; }
.q-tag { display: block; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 2px; }
.q-tag.r-detected { color: var(--risk); } .q-tag.r-suggested { color: var(--inf); } .q-tag.case { color: var(--teal); } .q-tag.r-absent { color: var(--ok); }
.q-actions { display: flex; gap: var(--s-2); align-items: center; flex-wrap: wrap; }
.watch-list { display: grid; gap: var(--s-4); grid-template-columns: 1fr; }
@media (min-width: 900px) { .watch-list { grid-template-columns: repeat(3, 1fr); } }
.watch-card { background: var(--card); border: 1px solid var(--rule); border-top: 4px solid var(--ink-3); border-radius: var(--radius); padding: var(--s-4); box-shadow: var(--shadow); }
.watch-card h3 { font-size: 1.1rem; margin: 0 0 6px; }
.watch-card h4 { font-family: var(--sans); font-size: var(--fs-0); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); margin: var(--s-3) 0 4px; }
.watch-card ul { font-size: var(--fs-1); padding-left: 1.1rem; margin: 0; }
.wc-dates { display: grid; grid-template-columns: auto 1fr; gap: 2px var(--s-3); font-size: var(--fs-1); margin: var(--s-2) 0 0; }
.wc-dates dt { color: var(--ink-3); } .wc-dates dd { margin: 0; }
@media print { .site-header, .site-footer, #screening, #watch, .page-head, .callout, .q-picker, .q-actions { display: none !important; } }

/* Explore v3 */
.ex-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: var(--s-2); }
.ex-tabs button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: var(--fs-0); padding: 3px 10px 3px 4px; border-radius: 999px; border: 1px solid var(--rule-strong); background: var(--card); color: var(--ink-2); cursor: pointer; }
.ex-tabs button span { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--paper-2); font-family: var(--mono); font-size: 0.72rem; color: var(--ink-2); }
.ex-tabs button:hover { border-color: var(--ink-3); color: var(--ink); }
.ex-tabs button[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.ex-tabs button[aria-selected="true"] span { background: var(--teal); color: #fff; }
.exc-q { font-family: var(--serif); font-size: 1.1rem; line-height: 1.4; }
.exc-a { font-size: var(--fs-1); }
/* Explore: controls, graph and side panel */
@media (max-width: 640px) { .ex-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .ex-tabs button { flex: none; white-space: nowrap; } }
.wrap.wide { max-width: 108rem; }
.page-head.compact { padding: var(--s-3) 0 var(--s-2); border-bottom: 0; margin-bottom: 0; }
.page-head.compact h1 { font-size: clamp(1.5rem, 1.3rem + .6vw, 1.85rem); margin-bottom: 2px; }
.page-head.compact .eyebrow { display: none; }
.page-head.compact .lede { font-size: var(--fs-1); max-width: none; margin-bottom: 0; }
.ex-bar { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); align-items: center; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 8px var(--s-3); margin-bottom: var(--s-2); }
.ex-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ex-h { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); margin-right: 2px; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule-strong); border-radius: 999px; padding: 3px 10px; font-size: var(--fs-0); cursor: pointer; background: var(--card); }
.chip:hover { border-color: var(--ink-3); }
.chip input { width: 14px; height: 14px; margin: 0; accent-color: var(--teal); }
.chip .etype { font-size: var(--fs-0); }
.chip .etype .line { width: 18px; }
.chip-risk { font-weight: 600; color: var(--risk); border-color: var(--risk); }
.chip-risk input { accent-color: var(--risk); }
.chip-risk:has(input:checked) { background: var(--risk-tint); box-shadow: 0 0 0 1px var(--risk); }
.ex-sel select { font: inherit; font-size: var(--fs-0); padding: 4px 6px; border: 1px solid var(--rule-strong); border-radius: var(--radius); background: var(--card); max-width: 13rem; }
.ex-count { font-size: var(--fs-0); }
.ex-view .graph-toggles { margin: 0; gap: 4px 12px; font-size: var(--fs-0); order: 1; }
.ex-view .graph-tools { position: static; order: 3; }
.ex-view .graph-tools button { width: 28px; height: 28px; font-size: .95rem; }
.ex-view .graph-toggles input { width: 14px; height: 14px; }
.ex-reset { order: 2; padding: 3px 10px; font-size: var(--fs-0); }
.ex-note { font-size: var(--fs-0); color: var(--ink-2); margin: 0 0 var(--s-2); }
.ex-stage { display: grid; gap: var(--s-3); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1000px) { .ex-stage { grid-template-columns: minmax(0, 1fr) 25rem; } }
.ex-stage .graph-key { grid-column: 1 / -1; margin-top: 0; order: 3; }
.ex-stage .graph.xtall { height: clamp(480px, 74vh, 820px); }
.ex-panel { padding: var(--s-4); overflow: auto; min-width: 0; }
@media (min-width: 1000px) { .ex-panel { position: sticky; top: 72px; align-self: start; height: clamp(480px, calc(100vh - 88px), 820px); } }
.ex-panel .drawer-close { position: sticky; top: 0; float: right; z-index: 1; }
.ex-panel > p, .ex-panel > ul { font-size: var(--fs-1); }
.ex-panel > h3:not(.ep-h) { font-size: 1.25rem; padding-right: 2.2rem; }
.ex-panel dl { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px var(--s-3); font-size: var(--fs-1); margin: 0 0 var(--s-3); }
.ex-panel dt { color: var(--ink-3); }
.ex-panel dd { margin: 0; overflow-wrap: anywhere; }
.ex-panel > ul { padding-left: 1.1rem; }
.tl-single { display: inline-block; margin-left: 6px; font-family: var(--mono); font-size: .68rem; color: var(--part); border: 1px solid var(--part); border-radius: 3px; padding: 0 4px; }

/* The Trace: page guide */
.page-guide { display: grid; gap: var(--s-2); grid-template-columns: 1fr; margin-top: var(--s-6); }
@media (min-width: 560px) { .page-guide { grid-template-columns: 1fr 1fr; } .pg:last-child { grid-column: span 2; } }
@media (min-width: 1000px) {
  .page-guide { grid-template-columns: repeat(12, 1fr); }
  .pg { grid-column: span 3; }
  .pg:nth-child(n+5), .pg:last-child { grid-column: span 4; }
}
.pg { display: grid; align-content: start; gap: 2px; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 10px 14px; text-decoration: none; color: var(--ink-2); font-size: var(--fs-0); line-height: 1.4; }
.pg strong { font-family: var(--serif); font-size: 1.05rem; color: var(--teal); }
.pg:hover { border-color: var(--teal); background: var(--teal-tint); color: var(--ink); }
.pg.here { border-left: 3px solid var(--teal); }

/* Check a Buyer: direction compare */
.dir-compare { display: grid; gap: var(--s-3); grid-template-columns: 1fr; margin-bottom: var(--s-4); }
@media (min-width: 820px) { .dir-compare { grid-template-columns: 1fr 1fr; } }
.dir-card { position: relative; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-3) var(--s-4); }
.dir-card.here { border: 2px solid var(--teal); background: var(--teal-tint); }
.dir-card h2 { font-size: 1.1rem; margin: 4px 0 var(--s-2); }
.dir-card p { font-size: var(--fs-1); margin: var(--s-2) 0 0; }
.dir-tag { font-family: var(--mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.07em; color: var(--ink-3); }
.dir-card.here .dir-tag { color: var(--teal-2); font-weight: 600; }
.dir-flow { display: flex; align-items: center; gap: 0; }
.dn { flex: none; border: 1.5px solid var(--ink-3); background: #fff; border-radius: 5px; padding: 3px 9px; font-size: var(--fs-0); font-weight: 600; }
.dn.start { background: var(--teal); border-color: var(--teal); color: #fff; }
.dn.owner { border-color: var(--ct); color: var(--ct); }
.dir-flow i { flex: 1; min-width: 18px; height: 2px; background: var(--tx); position: relative; }
.dir-flow i::after { content: ""; position: absolute; right: -1px; top: -4px; border-left: 8px solid var(--tx); border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.dir-flow i.back::after { right: auto; left: -1px; border-left: 0; border-right: 8px solid var(--tx); }

/* Case Files */
.cf-list { display: grid; gap: var(--s-2); margin-top: var(--s-4); }
.cf-item { background: var(--card); border: 1px solid var(--rule); border-radius: 6px; box-shadow: var(--shadow); scroll-margin-top: 74px; overflow: clip; }
.cf-item.open { border-color: var(--teal); }
.cf-head { margin: 0; font: inherit; }
.cf-row { display: flex; gap: var(--s-4); align-items: center; width: 100%; text-align: left; background: none; border: 0; padding: var(--s-3) var(--s-4); cursor: pointer; color: var(--ink); }
.cf-row:hover { background: var(--paper); }
.cf-item.open .cf-row { background: var(--teal-tint); }
.cf-n { font-family: var(--serif); font-size: 1.7rem; font-weight: 700; color: var(--teal); flex: none; width: 2.4rem; }
.cf-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.cf-title { font-family: var(--serif); font-size: 1.2rem; font-weight: 600; line-height: 1.25; }
.cf-sub { font-size: var(--fs-1); color: var(--ink-2); line-height: 1.4; }
.cf-side { flex: none; display: grid; justify-items: end; gap: 3px; }
.cf-place { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }
.cf-chev { width: 10px; height: 10px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); flex: none; margin: 0 4px; transition: transform .15s; }
.cf-item.open .cf-chev { transform: rotate(-135deg); }
@media (max-width: 640px) { .cf-side { display: none; } .cf-row { gap: var(--s-2); } }
.cf-body { padding: var(--s-4) var(--s-5) var(--s-5); border-top: 1px solid var(--rule); }
.cf-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3); font-size: var(--fs-1); }
.cf-open { margin-left: auto; }
.cf-plain { max-width: 56rem; }
.cf-h { margin-top: var(--s-6); padding-top: var(--s-3); border-top: 1px solid var(--rule); }
.cf-more { margin-top: var(--s-3); border: 1px solid var(--rule); border-radius: var(--radius); }
.cf-more > summary { cursor: pointer; font-weight: 600; padding: 10px 14px; }
.cf-more > :not(summary) { margin: 0 14px 14px; }

/* Method */
.m-more { margin-top: var(--s-3); border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.m-more > summary { cursor: pointer; font-weight: 600; padding: 10px 14px; }
.m-more > summary h3 { display: inline; font-size: 1.05rem; font-family: var(--sans); margin: 0; }
.m-more > :not(summary) { margin: 0 14px 14px; }
.m-more[open] > summary { border-bottom: 1px solid var(--rule); margin-bottom: 12px; }
#replay { display: grid; gap: 6px; }
.rp-case { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); scroll-margin-top: 74px; }
.rp-case[open] { border-color: var(--teal); }
.rp-case > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; cursor: pointer; padding: 9px 14px; list-style: none; }
.rp-case > summary::-webkit-details-marker { display: none; }
.rp-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--teal); color: #fff; font-family: var(--mono); font-size: 0.72rem; flex: none; }
.rp-t { font-weight: 600; flex: 1; min-width: 12rem; }
.rp-c { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-3); }
.rp-body { padding: 0 14px 12px; display: grid; gap: 6px; }
.rp-step > summary { cursor: pointer; font-weight: 600; font-size: var(--fs-1); padding: 5px 0; }
.rp-step .replay { margin-top: var(--s-2); }

.ep-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-2); margin-bottom: var(--s-3); }
.ep-stats div { background: var(--paper-2); border-radius: var(--radius); padding: 8px 10px; display: grid; gap: 2px; }
.ep-stats b { font-family: var(--serif); font-size: 1.5rem; line-height: 1; color: var(--teal); }
.ep-stats span { font-size: 0.72rem; line-height: 1.25; color: var(--ink-2); }
.ep-hint { font-size: var(--fs-1); color: var(--ink-2); }
.ep-h { font-family: var(--mono); font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em; color: var(--teal); margin: var(--s-3) 0 var(--s-1); }
.ep-list { list-style: none; margin: 0; padding: 0; }
.ep-list button { display: flex; gap: 6px; align-items: baseline; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--rule); padding: 5px 4px; font-size: var(--fs-1); cursor: pointer; color: var(--ink); }
.ep-list button:hover { background: var(--paper-2); }
.ep-list button > span:not(.ep-flag) { flex: 1; min-width: 0; }
.ep-list small { color: var(--ink-3); flex: none; }
.ep-flag { color: var(--risk); }
.ep-case { font-size: var(--fs-1); line-height: 1.45; border-bottom: 1px solid var(--rule); padding-bottom: var(--s-3); margin-bottom: var(--s-3); display: grid; gap: var(--s-2); }
.ep-case .exc-q { font-family: var(--serif); font-weight: 600; }
.ep-case .qa-label { display: block; font-family: var(--mono); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-3); margin-bottom: 4px; }
.verify-list { max-width: 56rem; display: grid; gap: var(--s-2); }
/* Timeline: readable grid instead of one cramped row */
@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(auto-fill, minmax(15.5rem, 1fr)) !important; gap: var(--s-4) var(--s-5); }
  .timeline::before { display: none; }
  .timeline li { padding-top: 0; padding-left: 24px; border-top: 1px solid var(--rule); padding-top: var(--s-3); }
  .timeline li::before { left: 0; top: calc(var(--s-3) + 4px); }
}
.checked { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; font-family: var(--mono); font-size: 0.72rem; color: var(--ok); background: var(--ok-tint); border: 1px solid #BEDFCB; border-radius: 999px; padding: 2px 9px; }
.checked .receipts a { font-size: 0.68rem; }
.cc-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: var(--s-2); }
.case-card.simple .cc-go { margin-top: 0; padding-top: 0; }
.scan { margin-top: var(--s-6); }
.scan-table td { font-size: var(--fs-1); vertical-align: top; }
.yn.unk { background: var(--paper-2); color: var(--ink-2); }
.warn-text { color: var(--risk); }
.diy { max-width: 58rem; display: grid; gap: var(--s-3); padding-left: 1.3rem; }
.diy code { font-size: 0.82em; background: var(--paper-2); padding: 0 4px; border-radius: 2px; }
.diy-prompt { margin-top: var(--s-4); max-width: 58rem; }
.diy-prompt summary { cursor: pointer; font-weight: 600; }
.diy-prompt pre { white-space: pre-wrap; background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s-4); font-size: 0.82rem; }

.oq { list-style: none; padding: 0; display: grid; gap: var(--s-2); }
.oq li { border-left: 3px solid var(--inf); padding-left: var(--s-3); }
.oq span { display: block; font-size: var(--fs-0); color: var(--ink-2); margin-top: 2px; }
.legend-h { margin: 0 0 var(--s-2); }
