/*  ────────────────────────────────────────────────────────────────────────
    Fulton County Grand Jury Archive — Lawfare-inspired styling.

    Type: Lora for headlines (transitional serif in the Lawfare family),
    Inter for body and UI. Both are free Google Fonts. Color palette pulls
    from Lawfare's monochrome editorial feel with their accent red.
    ──────────────────────────────────────────────────────────────────────── */

@import url("https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,500;0,600;0,700;1,400&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --bg:           #fbfaf6;
  --bg-elevated:  #ffffff;
  --surface:      #f1ede4;
  --surface-2:    #e6e1d3;
  --ink:          #1a1a1a;
  --ink-soft:     #3b3b3b;
  --ink-muted:    #6c6964;
  --rule:         #d8d3c5;
  --accent:       #a4243b;
  --accent-soft:  #f5e7e9;
  --highlight:    #ffe27a;
  --highlight-strong: #ffc943;

  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --container: 1080px;
  --radius: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #7c1929; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── masthead ────────────────────────────────────────────────── */
.masthead { background: var(--ink); color: #fff; border-bottom: 4px solid var(--accent); }
.masthead-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex; align-items: center; gap: 18px;
  flex-wrap: wrap;
}
.masthead-brand img { height: 26px; display: block; }
.masthead-divider { width: 1px; height: 26px; background: rgba(255,255,255,.25); }
.masthead-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: 0.005em;
}
.masthead-deck {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 16px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 15px;
  line-height: 1.45;
  color: rgba(255,255,255,.78);
}
@media (max-width: 720px) {
  .masthead-deck { font-size: 14px; padding: 0 18px 14px; }
}
.masthead-compact .masthead-inner { padding: 12px 24px; }
.back-link { color: rgba(255,255,255,.85); text-decoration: none; font-size: 14px; font-weight: 500; }
.back-link:hover { color: #fff; }

/* ── lede ────────────────────────────────────────────────────── */
.lede { background: var(--bg); border-bottom: 1px solid var(--rule); }
.lede-inner { max-width: var(--container); margin: 0 auto; padding: 28px 24px 24px; }
.lede p { margin: 0 0 10px; font-family: var(--serif); font-size: 18px; color: var(--ink-soft); }
.lede p:last-child { margin-bottom: 0; font-size: 15px; color: var(--ink-muted); font-family: var(--sans); }

/* ── search bar ──────────────────────────────────────────────── */
.search-bar {
  position: sticky; top: 0; z-index: 5;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--rule);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.search-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex; gap: 16px; align-items: center;
  flex-wrap: wrap;
}
.search-tips {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 12px;
  font-size: 13px;
  color: var(--ink-muted);
}
.search-tips code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  background: var(--surface);
  padding: 1px 6px; border-radius: 4px;
}

/* ── filter chips ────────────────────────────────────────────── */
.filter-strip {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 12px;
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center;
}
.filter-group {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 4px 10px;
  background: var(--surface);
  border-radius: 999px;
}
.filter-group + .filter-group { /* divider */ }
.chip {
  border: 0;
  background: transparent;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: background .12s, color .12s;
}
.chip:hover { background: rgba(0,0,0,.05); }
.chip.is-active {
  background: var(--ink);
  color: #fff;
}
.chip-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0,0,0,.06);
  color: var(--ink-muted);
  font-feature-settings: "tnum";
}
.chip.is-active .chip-count {
  background: rgba(255,255,255,.18);
  color: rgba(255,255,255,.85);
}
.filter-inline {
  display: inline-flex; align-items: center; gap: 8px;
  margin-left: auto;
  font-size: 13px; color: var(--ink-muted);
}
.filter-inline select {
  font-family: var(--sans); font-size: 13px;
  padding: 6px 24px 6px 10px;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%236c6964' d='M5 6 0 0h10z'/></svg>") no-repeat right 10px center;
  appearance: none; -webkit-appearance: none;
  color: var(--ink); cursor: pointer;
}
.dir-subhead { margin: 4px 0 0; font-size: 13px; }
.search-field {
  position: relative;
  flex: 1 1 380px;
  display: flex; align-items: center;
  background: var(--surface);
  border: 1px solid var(--surface-2);
  border-radius: var(--radius);
  transition: border-color .15s, background .15s;
}
.search-field:focus-within {
  background: #fff; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(26,26,26,.08);
}
.search-field input {
  flex: 1;
  border: 0; outline: 0; background: transparent;
  padding: 11px 12px 11px 8px;
  font-family: var(--sans); font-size: 16px; color: var(--ink);
}
.search-icon { color: var(--ink-muted); margin-left: 12px; flex-shrink: 0; }
.clear-btn {
  border: 0; background: transparent;
  color: var(--ink-muted);
  font-size: 22px; line-height: 1; padding: 0 12px; cursor: pointer;
}
.clear-btn:hover { color: var(--ink); }
.filters { display: flex; gap: 12px; flex-wrap: wrap; }
.filter { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-muted); }
.filter select {
  font-family: var(--sans); font-size: 14px;
  padding: 8px 28px 8px 10px;
  border: 1px solid var(--rule); border-radius: var(--radius);
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'><path fill='%236c6964' d='M5 6 0 0h10z'/></svg>") no-repeat right 10px center;
  appearance: none; -webkit-appearance: none;
  color: var(--ink); cursor: pointer;
}

/* ── main columns ────────────────────────────────────────────── */
.main { max-width: var(--container); margin: 0 auto; padding: 32px 24px 56px; }
.muted { color: var(--ink-muted); font-weight: 400; font-size: 0.85em; }
.directory-head, .results-head { margin: 0 0 18px; border-bottom: 1px solid var(--rule); padding-bottom: 10px; }
.directory-head h2, .results-head h2 { margin: 0; font-family: var(--serif); font-weight: 600; font-size: 22px; }
.results-meta { margin: 4px 0 0; color: var(--ink-muted); font-size: 14px; }

/* ── witness list ────────────────────────────────────────────── */
.witness-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.witness-card {
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 18px 20px;
  transition: border-color .15s;
}
.witness-card:hover { border-color: var(--ink); }
.witness-card .row { display: flex; gap: 18px; align-items: baseline; flex-wrap: wrap; }
.witness-card h3 { margin: 0; font-family: var(--serif); font-size: 21px; font-weight: 600; }
.witness-card h3 a { color: var(--ink); text-decoration: none; }
.witness-card h3 a:hover { color: var(--accent); }
.witness-card .role { color: var(--ink-muted); font-size: 14px; }
.witness-card .date {
  font-size: 13px; color: var(--ink-muted);
  font-feature-settings: "tnum"; white-space: nowrap;
}
.witness-card .summary {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-size: 16px; line-height: 1.55;
  color: var(--ink-soft);
}
.witness-card .meta {
  margin: 12px 0 0;
  display: flex; flex-wrap: wrap; gap: 8px;
  font-size: 12px; color: var(--ink-muted);
}
.tag, .badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .01em;
}
.tag { background: var(--surface); color: var(--ink-soft); }
.badge-excerpt { background: #fff3d6; color: #6b4b00; }
.badge-partial { background: var(--accent-soft); color: var(--accent); }
.badge-indexed { background: #e2eedf; color: #1f5c2c; }

/* Metadata-hit result cards (the material's own card matched the query
   on title / name / role / summary / tags rather than body text). */
.result-card-meta {
  border-left: 3px solid var(--ink);
}
.result-card-meta .pageref {
  font-style: italic;
  color: var(--ink-soft);
}

/* Type badges (transcript / proffer / interview / call) */
.badge-type {
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-type.type-transcript { background: #ece6d7; color: #4a3f1f; }
.badge-type.type-proffer    { background: var(--accent-soft); color: var(--accent); }
.badge-type.type-fcda-interview { background: #e1eaf3; color: #1f3a5c; }
.badge-type.type-gbi-interview  { background: #e8e3f1; color: #3d1f5c; }
.badge-type.type-trump-call     { background: #fff3d6; color: #6b4b00; }

/* Format badges (audio / video / mixed) */
.badge-format {
  font-feature-settings: "tnum";
}
.badge-format.format-audio { background: #eaeaea; color: #404040; }
.badge-format.format-video { background: #1a1a1a; color: #fff; }
.badge-format.format-mixed { background: #4a4a4a; color: #fff; }

/* Left-border type accent on cards */
.witness-card.type-proffer        { border-left: 3px solid var(--accent); }
.witness-card.type-fcda-interview { border-left: 3px solid #4a6fa5; }
.witness-card.type-gbi-interview  { border-left: 3px solid #6d4a96; }
.witness-card.type-trump-call     { border-left: 3px solid #c39a2e; }
.witness-card.type-transcript     { border-left: 3px solid #b8aa84; }

/* ── search results ──────────────────────────────────────────── */
.result-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.result-card {
  background: var(--bg-elevated);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 16px 18px;
}
.result-card .head {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; margin-bottom: 6px;
}
.result-card .name a {
  color: var(--ink); font-family: var(--serif);
  font-size: 18px; font-weight: 600; text-decoration: none;
}
.result-card .name a:hover { color: var(--accent); }
.result-card .pageref { font-size: 13px; color: var(--ink-muted); }
.result-card .snippet {
  margin: 0;
  font-family: var(--serif);
  font-size: 15px; line-height: 1.5;
  color: var(--ink-soft);
}
.result-card mark, .passage mark {
  background: var(--highlight);
  padding: 1px 2px; border-radius: 2px;
  color: inherit;
}

/* ── viewer ──────────────────────────────────────────────────── */
.witness-hero { background: var(--bg-elevated); border-bottom: 1px solid var(--rule); }
.witness-hero-inner { max-width: var(--container); margin: 0 auto; padding: 28px 24px; }
.witness-eyebrow {
  margin: 0 0 6px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); font-weight: 600;
}
.witness-hero h1 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: 36px; line-height: 1.15; font-weight: 700;
  letter-spacing: -.005em;
}
.witness-meta { margin: 0; color: var(--ink-muted); font-size: 14px; }
.dot { margin: 0 6px; }
.witness-summary {
  margin: 14px 0 0;
  font-family: var(--serif);
  font-size: 17px; color: var(--ink-soft);
  max-width: 64ch;
}
.indexing-note {
  margin: 16px 0 0;
  padding: 10px 14px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  font-size: 14px;
  color: var(--ink-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.witness-actions { margin: 18px 0 0; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 9px 16px;
  background: var(--ink); color: #fff;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 14px; font-weight: 600;
}
.btn:hover { background: #000; color: #fff; }
.btn-link { font-size: 14px; }
.search-hint {
  font-size: 13px; color: var(--ink-muted);
  background: var(--surface); padding: 8px 12px; border-radius: var(--radius);
}
.search-hint kbd {
  font-family: ui-monospace, monospace; font-size: 11px;
  background: #fff; border: 1px solid var(--rule); padding: 1px 5px; border-radius: 3px;
}

/* mention list */
.passages { background: var(--bg-elevated); border-bottom: 1px solid var(--rule); }
.passages-inner { max-width: var(--container); margin: 0 auto; padding: 24px; }
.passages h2 { margin: 0 0 4px; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.passages-meta { margin: 0 0 14px; color: var(--ink-muted); font-size: 13px; }
.passages-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.passage {
  display: grid;
  grid-template-columns: 90px 1fr;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
}
.passage-link {
  font-feature-settings: "tnum";
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  white-space: nowrap;
}
.passage-link:hover { text-decoration: underline; }
.passage-snippet {
  margin: 0;
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Clip picker for multi-clip recording sessions */
.clip-picker { background: var(--bg-elevated); border-bottom: 1px solid var(--rule); }
.clip-picker-inner { max-width: var(--container); margin: 0 auto; padding: 18px 24px; }
.clip-picker h2 { margin: 0 0 12px; font-family: var(--serif); font-size: 18px; font-weight: 600; }
.clip-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.clip button {
  width: 100%;
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 12px;
  text-align: left;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px 14px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 14px;
  color: var(--ink);
  transition: border-color .12s, background .12s;
}
.clip button:hover { border-color: var(--ink); background: #fff; }
.clip.is-active button {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.clip-no {
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink-muted);
  font-size: 12px; font-weight: 600;
  font-feature-settings: "tnum";
}
.clip.is-active .clip-no { background: rgba(255,255,255,.18); color: rgba(255,255,255,.85); }
.clip-dur { font-size: 12px; color: var(--ink-muted); font-feature-settings: "tnum"; }
.clip.is-active .clip-dur { color: rgba(255,255,255,.7); }

/* PDF / YouTube embed */
.pdf-shell {
  background: #2a2826;
  padding: 0;
}
.pdf-frame {
  display: block;
  width: 100%;
  height: 80vh;
  min-height: 540px;
  border: 0;
  background: #2a2826;
}
.pdf-fallback {
  color: rgba(255,255,255,.85);
  text-align: center;
  padding: 40px 20px;
  font-size: 15px;
}
.pdf-fallback a { color: #fff; }

/* ── footer ──────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--rule);
  padding: 22px 24px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 13px;
  background: var(--bg);
}
.footer p { margin: 4px 0; }
.footer-meta { font-feature-settings: "tnum"; opacity: .7; }

/* ── responsive ──────────────────────────────────────────────── */
@media (max-width: 720px) {
  .masthead-title { font-size: 16px; }
  .masthead-title span { font-size: 13px; }
  .lede-inner { padding: 22px 18px; }
  .search-inner { padding: 12px 18px; }
  .search-tips { padding: 0 18px 10px; }
  .filters { width: 100%; }
  .filter select { font-size: 13px; }
  .main { padding: 22px 18px 42px; }
  .witness-card { padding: 16px; }
  .witness-card h3 { font-size: 19px; }
  .witness-hero h1 { font-size: 28px; }
  .witness-hero-inner { padding: 22px 18px; }
  .passages-inner { padding: 20px 18px; }
  .passage { grid-template-columns: 70px 1fr; gap: 10px; padding: 8px 10px; }
  .pdf-frame { height: 70vh; }
}
