/* ==========================================================================
   Epstein Suite — public records / investigation-archive design system
   One hand-written stylesheet. No framework, no build step.
   Dark editorial "dossier" aesthetic: charcoal paper, off-white ink,
   restrained brass accent, a single signal-red used only for the
   "redacted / highlight" motif. WCAG AA contrast throughout.
   ========================================================================== */

/* --- Fonts: Libre Baskerville (display) loaded with display=swap; body &
   mono are system stacks to keep the page light and fast. -------------------*/
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  /* Surfaces — warm paper, layered white cards (light-first) */
  --bg:        #FAF6EF;   /* warm cream page */
  --bg-1:      #FFFFFF;   /* raised panel */
  --bg-2:      #FFFFFF;   /* card */
  --bg-3:      #F1EADC;   /* hover / input fill */
  --line:      #EAE2D3;   /* hairline rules */
  --line-2:    #DBD0BD;   /* stronger rule */

  /* Ink — warm near-black */
  --ink:       #23201A;   /* primary text */
  --ink-soft:  #4C463B;   /* secondary */
  --ink-dim:   #837B6C;   /* meta / muted */
  --ink-faint: #A69D8B;   /* faintest, placeholders */

  /* Accents */
  --brass:     #B5872E;   /* signature accent — bars, rings, fills */
  --brass-lit: #8A671F;   /* readable dark brass — links/emphasis AND fill bg */
  --brass-ink: #FFF8EA;   /* near-white text on a brass fill */
  --red:       #BE3A45;   /* signal red — "redacted"/highlight ONLY, sparingly */
  --red-soft:  #9A2F38;

  /* Type */
  --serif: 'Libre Baskerville', 'Iowan Old Style', Georgia, 'Times New Roman', serif;
  --sans:  Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

  /* Scale */
  --shell: 1120px;
  --gutter: clamp(1.1rem, 4vw, 2.2rem);
  --radius: 10px;
  --radius-sm: 7px;

  --shadow: 0 1px 2px rgba(63,48,22,.05), 0 16px 38px -24px rgba(63,48,22,.20);
  --shadow-lg: 0 30px 64px -34px rgba(63,48,22,.28);
}

/* --- Reset ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0125rem;
  line-height: 1.65;
  letter-spacing: .002em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;

  /* subtle warm paper wash — no images, no requests */
  background-image:
    radial-gradient(1100px 560px at 82% -8%, rgba(181,135,46,.07), transparent 60%),
    radial-gradient(820px 480px at -8% 2%, rgba(150,120,70,.05), transparent 55%);
  background-attachment: fixed;
}

img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brass-lit); text-decoration: none; }
a:hover { color: var(--brass); }
:focus-visible {
  outline: 2px solid var(--brass-lit);
  outline-offset: 2px;
  border-radius: 3px;
}

/* --- Type ----------------------------------------------------------------- */
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.12; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2rem, 6.4vw, 3.4rem); }
h2 { font-size: clamp(1.4rem, 3.6vw, 2rem); }
h3 { font-size: clamp(1.15rem, 2.4vw, 1.4rem); }
p { color: var(--ink-soft); }
strong { color: var(--ink); }
small { font-size: .82rem; }

.eyebrow {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--brass);
  display: inline-block;
}
.mono { font-family: var(--mono); font-size: .82em; letter-spacing: .01em; }
.muted { color: var(--ink-dim); }
.faint { color: var(--ink-faint); }
.lede { font-size: clamp(1.05rem, 2.2vw, 1.25rem); color: var(--ink-soft); line-height: 1.6; }

/* "Redacted" highlight motif — search/name highlight in snippets */
mark {
  background: linear-gradient(180deg, rgba(181,135,46,.16), rgba(181,135,46,.26));
  color: var(--ink);
  padding: .02em .22em;
  border-radius: 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
  font-weight: 600;
}

/* --- Layout shell --------------------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.shell-narrow { max-width: 760px; }
main { flex: 1 0 auto; padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(3rem, 7vw, 4.5rem); }
.section { margin-top: clamp(2.4rem, 6vw, 3.6rem); }
.stack > * + * { margin-top: 1rem; }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.3rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; }
.section-head .more { font-family: var(--mono); font-size: .78rem; letter-spacing: .04em; }

/* --- Header / nav --------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(252,249,243,.86);
  backdrop-filter: saturate(135%) blur(10px);
  -webkit-backdrop-filter: saturate(135%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__bar { display: flex; align-items: center; gap: 1rem; min-height: 62px; padding-block: .55rem; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--serif); font-weight: 700; font-size: 1.16rem; color: var(--ink); white-space: nowrap; letter-spacing: -.01em; }
.wordmark:hover { color: var(--ink); }
.wordmark__mark {
  width: 38px; height: 38px; border-radius: 50%; flex: 0 0 auto;
  object-fit: cover; object-position: center top;
  background: var(--bg-2);
  border: 1.5px solid var(--brass);
  box-shadow: 0 2px 8px rgba(63,48,22,.18);
}
.wordmark__tag { font-family: var(--mono); font-size: .56rem; letter-spacing: .18em; text-transform: uppercase; color: var(--brass); align-self: flex-start; margin-top: .15rem; }

.nav { margin-left: auto; display: flex; align-items: center; gap: .15rem; }
.nav a { color: var(--ink-soft); font-size: .9rem; padding: .45rem .7rem; border-radius: 7px; font-weight: 500; }
.nav a:hover { color: var(--ink); background: var(--bg-2); }
.nav a[aria-current="page"] { color: var(--brass-lit); }

.header-search { margin-left: .5rem; position: relative; flex: 0 1 230px; min-width: 0; }
.header-search input {
  width: 100%; height: 38px; padding: 0 .8rem 0 2.1rem;
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink); font-size: .88rem; font-family: var(--sans);
}
.header-search input::placeholder { color: var(--ink-faint); }
.header-search input:focus { border-color: var(--brass); background: var(--bg-2); }
.header-search svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--ink-dim); pointer-events: none; }

.nav-toggle { display: none; margin-left: auto; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--ink); width: 42px; height: 38px; border-radius: 8px; cursor: pointer; align-items: center; justify-content: center; }
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .header-search { display: none; }
  .nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-1); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1rem; margin: 0;
    max-height: 0; overflow: hidden; visibility: hidden;
    transition: max-height .25s ease;
  }
  .nav.open { max-height: 70vh; visibility: visible; }
  .nav a { padding: .8rem .4rem; border-bottom: 1px solid var(--line); font-size: 1rem; border-radius: 0; }
  .nav .header-search { display: block; flex: none; margin: .6rem 0 0; }
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--sans); font-weight: 600; font-size: .92rem;
  padding: .7rem 1.15rem; border-radius: 9px; border: 1px solid transparent;
  cursor: pointer; transition: transform .08s ease, background .15s ease, border-color .15s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: linear-gradient(165deg, var(--brass-lit), var(--brass) 60%, #a9842f); color: var(--brass-ink); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.btn-primary:hover { color: var(--brass-ink); filter: brightness(1.05); }
.btn-ghost { background: var(--bg-2); border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { background: var(--bg-3); color: var(--ink); border-color: var(--brass); }
.btn-sm { padding: .5rem .85rem; font-size: .85rem; }
.btn-block { width: 100%; justify-content: center; }

/* --- Search field (the big inputs) ---------------------------------------- */
.field { position: relative; display: flex; }
.field input[type="search"], .field input[type="text"] {
  width: 100%; font-size: 1.05rem; font-family: var(--sans);
  background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 12px;
  color: var(--ink); padding: 1rem 7.5rem 1rem 1.1rem; line-height: 1.3;
}
.field input::placeholder { color: var(--ink-faint); }
.field input:focus { border-color: var(--brass); background: var(--bg-2); box-shadow: 0 0 0 4px rgba(201,162,90,.12); }
.field .btn { position: absolute; right: .45rem; top: 50%; transform: translateY(-50%); }
.field--lg input { padding-block: 1.15rem; font-size: 1.12rem; }

/* --- Hero ----------------------------------------------------------------- */
.hero { padding-block: clamp(2.2rem, 7vw, 4.2rem) clamp(1.4rem, 4vw, 2rem); text-align: center; }
.hero__mascot {
  width: clamp(84px, 14vw, 108px); height: clamp(84px, 14vw, 108px);
  display: block; margin: 0 auto 1.25rem; border-radius: 50%;
  object-fit: cover; object-position: center top; background: var(--bg-2);
  border: 2px solid var(--brass);
  box-shadow: 0 10px 30px -8px rgba(63,48,22,.28);
}
.hero h1 { max-width: 18ch; margin-inline: auto; }
.hero .lede { max-width: 56ch; margin: 1.1rem auto 0; }
.hero__ask { max-width: 680px; margin: 2rem auto 0; text-align: left; }
.hero__or { display: flex; align-items: center; gap: .8rem; max-width: 680px; margin: 1.1rem auto .9rem; color: var(--ink-faint); font-size: .8rem; font-family: var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.hero__or::before, .hero__or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.hero__search { max-width: 680px; margin-inline: auto; }
.stats-line { margin: 1.6rem auto 0; font-family: var(--mono); font-size: .82rem; color: var(--ink-dim); letter-spacing: .03em; }
.stats-line b { color: var(--brass-lit); font-weight: 700; }

/* --- Ask box -------------------------------------------------------------- */
.ask-box { background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 16px; padding: 1.1rem; box-shadow: var(--shadow); }
.ask-box__head { display: flex; align-items: center; gap: .55rem; margin-bottom: .7rem; }
.ask-box__head .eyebrow { margin: 0; }
.ask-box textarea, .ask-box input.ask-input {
  width: 100%; resize: none; font-family: var(--sans); font-size: 1.08rem; line-height: 1.45;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 11px;
  color: var(--ink); padding: .9rem 1rem; min-height: 58px;
}
.ask-box textarea::placeholder, .ask-box input.ask-input::placeholder { color: var(--ink-faint); }
.ask-box textarea:focus, .ask-box input.ask-input:focus { border-color: var(--brass); box-shadow: 0 0 0 4px rgba(201,162,90,.12); }
.ask-box__actions { display: flex; align-items: center; gap: .8rem; margin-top: .8rem; flex-wrap: wrap; }
.ask-box__hint { font-size: .78rem; color: var(--ink-faint); font-family: var(--mono); }

.chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .84rem; font-family: var(--sans); line-height: 1.2;
  padding: .42rem .75rem; border-radius: 999px;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--ink-soft); cursor: pointer;
  transition: border-color .15s, color .15s, background .15s; text-align: left;
}
.chip:hover { border-color: var(--brass); color: var(--ink); background: var(--bg-3); }
.chip--suggest { color: var(--ink-soft); }
.ask-box__suggest { margin-top: .85rem; }
.ask-box__suggest .label { font-family: var(--mono); font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .5rem; display: block; }

/* Answer rendering (JS + server) */
.answer { margin-top: 1.2rem; }
.answer__status { display: flex; align-items: center; gap: .6rem; color: var(--ink-dim); font-family: var(--mono); font-size: .82rem; padding: .6rem 0; }
.answer__status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brass); animation: pulse 1.1s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .3; } 50% { opacity: 1; } }
.answer__body {
  background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--brass);
  border-radius: 12px; padding: 1.1rem 1.25rem; font-size: 1.05rem; line-height: 1.7; color: var(--ink);
}
.answer__body p + p { margin-top: .8rem; }
.answer__ungrounded { border-left-color: var(--ink-faint); color: var(--ink-soft); }
.cite {
  font-family: var(--mono); font-size: .62em; font-weight: 700; vertical-align: super; line-height: 0;
  color: var(--brass-ink); background: var(--brass-lit); border-radius: 4px;
  padding: .12em .3em; margin: 0 .12em; text-decoration: none;
}
.cite:hover { background: var(--brass); color: var(--brass-ink); }
.sources { margin-top: 1.2rem; }
.sources__title { font-family: var(--mono); font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: .7rem; }
.source-card { display: flex; gap: .85rem; padding: .9rem 1rem; background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; }
.source-card + .source-card { margin-top: .6rem; }
.source-card__n { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--brass-lit); color: var(--brass-ink); font-family: var(--mono); font-weight: 700; font-size: .8rem; }
.source-card__body { min-width: 0; }
.source-card__title { font-weight: 600; color: var(--ink); font-size: .96rem; }
.source-card__ref { font-family: var(--mono); font-size: .72rem; color: var(--ink-dim); margin: .15rem 0 .4rem; }
.source-card__excerpt { font-size: .88rem; color: var(--ink-soft); line-height: 1.5; }
.source-card__links { margin-top: .5rem; display: flex; gap: 1rem; flex-wrap: wrap; font-size: .82rem; font-family: var(--mono); }
.answer__error { color: var(--red-soft); font-size: .9rem; padding: .6rem 0; }

/* --- Cards / grids -------------------------------------------------------- */
.grid { display: grid; gap: 1rem; }
.grid--entities { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.grid--releases { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }

.card { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; transition: border-color .15s, transform .1s, background .15s; }
a.card:hover { border-color: var(--brass); background: var(--bg-3); transform: translateY(-2px); }

.entity-card { display: flex; flex-direction: column; gap: .5rem; }
.entity-card__name { display: block; font-family: var(--serif); font-weight: 700; font-size: 1.08rem; color: var(--ink); line-height: 1.2; }
.entity-card__meta { display: block; font-family: var(--mono); font-size: .72rem; color: var(--ink-dim); }
.entity-card__bar { display: block; width: 100%; height: 4px; border-radius: 3px; background: var(--line); overflow: hidden; margin-top: auto; }
.entity-card__bar > span { display: block; height: 4px; border-radius: 3px; background: linear-gradient(90deg, var(--brass), var(--brass-lit)); }

.release-card__name { font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--ink); }
.release-card__src { font-family: var(--mono); font-size: .74rem; color: var(--brass); margin-top: .35rem; }
.release-card__desc { font-size: .9rem; color: var(--ink-soft); margin-top: .6rem; }
.release-card__foot { display: flex; justify-content: space-between; align-items: center; margin-top: .9rem; padding-top: .75rem; border-top: 1px solid var(--line); font-family: var(--mono); font-size: .74rem; color: var(--ink-dim); }

/* --- Tags / pills (entity-type, doc-type, charge status) ------------------ */
.tag { display: inline-flex; align-items: center; gap: .35rem; font-family: var(--mono); font-size: .68rem; letter-spacing: .06em; text-transform: uppercase; padding: .25rem .55rem; border-radius: 6px; background: var(--bg-3); color: var(--ink-dim); border: 1px solid var(--line-2); white-space: nowrap; }
.tag--brass { color: var(--brass-lit); border-color: rgba(201,162,90,.4); background: rgba(201,162,90,.08); }
.tag--status { color: var(--red-soft); border-color: rgba(217,72,91,.4); background: rgba(217,72,91,.08); }

/* --- Filter pills (names, documents) -------------------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.pill { font-family: var(--mono); font-size: .78rem; letter-spacing: .03em; padding: .42rem .8rem; border-radius: 999px; background: var(--bg-2); border: 1px solid var(--line-2); color: var(--ink-soft); transition: .15s; }
.pill:hover { border-color: var(--brass); color: var(--ink); }
.pill[aria-current="true"], .pill.is-active { background: var(--brass-lit); border-color: var(--brass-lit); color: var(--brass-ink); font-weight: 600; }
.alphabet { display: flex; flex-wrap: wrap; gap: .3rem; }
.alphabet a { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 7px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-soft); font-family: var(--mono); font-size: .82rem; }
.alphabet a:hover { border-color: var(--brass); color: var(--ink); }
.alphabet a.is-active { background: var(--brass-lit); border-color: var(--brass-lit); color: var(--brass-ink); font-weight: 700; }

/* --- Document / entity detail pages --------------------------------------- */
.detail-head { padding-bottom: 1.4rem; margin-bottom: 1.6rem; border-bottom: 1px solid var(--line); }
.breadcrumb { font-family: var(--mono); font-size: .74rem; color: var(--ink-dim); margin-bottom: .9rem; display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.breadcrumb a { color: var(--ink-dim); }
.breadcrumb a:hover { color: var(--brass-lit); }
.breadcrumb .sep { color: var(--ink-faint); }
.detail-head h1 { margin-bottom: .6rem; }
.subhead { color: var(--ink-soft); font-size: 1.02rem; }
.subhead b { color: var(--brass-lit); }

.meta-row { display: flex; flex-wrap: wrap; gap: .5rem .9rem; align-items: center; margin-top: .9rem; }
.meta-row .meta { font-family: var(--mono); font-size: .76rem; color: var(--ink-dim); display: inline-flex; gap: .35rem; align-items: center; }
.meta-row .meta b { color: var(--ink-soft); font-weight: 600; }

/* mentions list */
.mention { padding: 1.1rem 0; border-bottom: 1px solid var(--line); }
.mention:first-of-type { border-top: 1px solid var(--line); }
.mention__snippet { font-family: var(--serif); font-size: 1.04rem; line-height: 1.65; color: var(--ink); font-style: italic; }
.mention__snippet::before { content: "“"; color: var(--brass); margin-right: .1em; }
.mention__snippet::after { content: "”"; color: var(--brass); margin-left: .05em; }
.mention__foot { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-top: .7rem; font-size: .82rem; }
.mention__ref { font-family: var(--mono); font-size: .74rem; color: var(--brass); }
.mention__doc { color: var(--ink-soft); font-weight: 600; }
.mention__doc:hover { color: var(--brass-lit); }
.mention__src { font-family: var(--mono); font-size: .74rem; color: var(--ink-dim); margin-left: auto; }

/* OCR text block */
.doc-source-cta { background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 12px; padding: 1.1rem 1.25rem; margin-bottom: 1.6rem; display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.doc-source-cta p { font-size: .9rem; margin: 0; flex: 1 1 320px; }
.ocr {
  background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px;
  padding: 1.4rem clamp(1rem, 3vw, 1.8rem);
  font-family: var(--serif); font-size: 1rem; line-height: 1.8; color: var(--ink-soft);
  white-space: pre-wrap; word-break: break-word; max-width: 72ch;
}
.ocr-note { font-family: var(--mono); font-size: .74rem; color: var(--ink-faint); margin: .9rem 0 .4rem; display: flex; align-items: center; gap: .4rem; }

/* --- Disclaimer banner ---------------------------------------------------- */
.disclaimer {
  display: flex; gap: .85rem; align-items: flex-start;
  background: rgba(201,162,90,.06);
  border: 1px solid rgba(201,162,90,.28); border-left: 3px solid var(--brass);
  border-radius: 11px; padding: .95rem 1.1rem; margin: 1.3rem 0;
}
.disclaimer svg { flex: 0 0 auto; width: 18px; height: 18px; color: var(--brass-lit); margin-top: .15rem; }
.disclaimer p { font-size: .9rem; line-height: 1.55; color: var(--ink-soft); margin: 0; }
.disclaimer strong { color: var(--ink); }
.disclaimer .status-line { margin-top: .4rem; font-size: .84rem; color: var(--ink-dim); font-family: var(--mono); }

/* --- Search results ------------------------------------------------------- */
.result { padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.result__title { font-family: var(--serif); font-size: 1.2rem; font-weight: 700; color: var(--ink); line-height: 1.25; }
.result__title:hover { color: var(--brass-lit); }
.result__meta { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; margin: .4rem 0 .55rem; font-family: var(--mono); font-size: .73rem; color: var(--ink-dim); }
.result__snippet { color: var(--ink-soft); font-size: .96rem; line-height: 1.6; }
.result-count { font-family: var(--mono); font-size: .82rem; color: var(--ink-dim); margin-bottom: .4rem; }

/* matching-entities rail */
.entity-rail { background: var(--bg-1); border: 1px solid var(--line-2); border-radius: 12px; padding: 1.1rem; margin-bottom: 1.6rem; }
.entity-rail h3 { font-size: 1rem; margin-bottom: .8rem; }
.entity-rail__list { display: flex; flex-wrap: wrap; gap: .55rem; }

/* --- Empty / notice states ------------------------------------------------ */
.notice { background: var(--bg-1); border: 1px dashed var(--line-2); border-radius: 12px; padding: 2rem 1.5rem; text-align: center; color: var(--ink-dim); }
.notice h3 { color: var(--ink); margin-bottom: .5rem; }

/* --- Pagination (manual prev/next) ---------------------------------------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.pager a, .pager span { font-family: var(--mono); font-size: .82rem; letter-spacing: .02em; }
.pager .disabled { color: var(--ink-faint); opacity: .5; }
.pager .page-info { color: var(--ink-dim); }
.pager a { display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .9rem; border: 1px solid var(--line-2); border-radius: 8px; background: var(--bg-2); color: var(--ink-soft); }
.pager a:hover { border-color: var(--brass); color: var(--ink); }

/* --- Ads ------------------------------------------------------------------ */
.ad-wrap { margin: 2rem auto; max-width: 100%; text-align: center; }
.ad-wrap__label { font-family: var(--mono); font-size: .6rem; letter-spacing: .22em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .4rem; }
.ad-wrap ins, .ad-wrap .ezoic-ad { display: block; min-height: 90px; }

/* --- Prose pages (about/methodology/sources) ------------------------------ */
.prose { max-width: 70ch; }
.prose h1 { margin-bottom: .4rem; }
.prose h2 { margin-top: 2.2rem; margin-bottom: .7rem; font-size: 1.45rem; }
.prose h3 { margin-top: 1.6rem; margin-bottom: .4rem; }
.prose p { margin-top: .9rem; color: var(--ink-soft); }
.prose ul, .prose ol { margin-top: .9rem; padding-left: 1.3rem; color: var(--ink-soft); }
.prose li { margin-top: .45rem; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--ink); }
.prose .updated { font-family: var(--mono); font-size: .76rem; color: var(--ink-faint); margin-top: .6rem; }
.callout { background: var(--bg-1); border: 1px solid var(--line-2); border-left: 3px solid var(--brass); border-radius: 10px; padding: 1rem 1.2rem; margin: 1.4rem 0; }
.callout p { margin-top: 0; font-size: .94rem; }

/* sources table */
.source-list { margin-top: 1.6rem; display: grid; gap: 1rem; }
.source-row { background: var(--bg-2); border: 1px solid var(--line); border-radius: 11px; padding: 1.1rem 1.25rem; }
.source-row__name { font-family: var(--serif); font-weight: 700; font-size: 1.1rem; color: var(--ink); }
.source-row__meta { font-family: var(--mono); font-size: .74rem; color: var(--ink-dim); margin: .4rem 0; display: flex; flex-wrap: wrap; gap: .3rem .9rem; }
.source-row__desc { font-size: .9rem; color: var(--ink-soft); }

/* --- Footer --------------------------------------------------------------- */
.site-footer { flex-shrink: 0; border-top: 1px solid var(--line); background: #F2EBDD; margin-top: 3rem; padding-block: 2.4rem 2.6rem; }
.site-footer__top { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; align-items: flex-start; }
.site-footer__brand { max-width: 34ch; }
.site-footer__brand .wordmark { margin-bottom: .7rem; }
.site-footer__brand p { font-size: .86rem; color: var(--ink-dim); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 2.5rem; }
.footer-col h4 { font-family: var(--mono); font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-dim); margin-bottom: .7rem; font-weight: 700; }
.footer-col a { display: block; color: var(--ink-soft); font-size: .9rem; padding: .25rem 0; }
.footer-col a:hover { color: var(--brass-lit); }
.site-footer__bottom { margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.site-footer__bottom p { font-size: .8rem; color: var(--ink-faint); line-height: 1.6; }
.site-footer__bottom .disclaim { color: var(--ink-dim); }

/* --- Utilities ------------------------------------------------------------ */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.flow > * + * { margin-top: 1.1rem; }
.center { text-align: center; }
.hidden { display: none !important; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--brass-lit); color: var(--brass-ink); padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100; font-weight: 600; }
.skip-link:focus { left: 0; color: var(--brass-ink); }
