/* copy of https://plausibledenial.org/assets/site.css, synced by tools/sync_chrome.py; do not edit by hand */
/* ==========================================================================
   Plausible Denial — design system
   Dark editorial. Off-black ground, off-white serif, oxblood accent.
   ========================================================================== */

:root {
  /* Palette */
  --bg:           #0c0c0d;
  --bg-elev:     #131210;   /* card / panel */
  --bg-elev-2:   #181612;   /* sticky TOC, nav surface */
  --ink:         #e8e3da;   /* primary text — warm off-white */
  --ink-strong:  #f4efe6;   /* headings */
  --ink-muted:   #8a8478;   /* meta, captions */
  --ink-faint:   #5b5650;   /* footnote numbers, dividers labels */
  --rule:        #26221d;   /* hairlines */
  --rule-strong: #3a342c;
  --accent:      #8b1a1a;   /* oxblood */
  --accent-soft: #b14545;
  --warn:        #a8742b;   /* "alleged" badge — amber */
  --ok:          #5a7a4f;   /* "confirmed" badge — moss */
  --redact:      #1a1815;   /* redaction bar fill */

  /* Type */
  --serif: Charter, "Iowan Old Style", "Iowan Old Style BT", Georgia, "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono:  "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 38rem;        /* article body width */
  --container: 1120px;
}

/* Reset --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--ink-strong); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--rule-strong); transition: text-decoration-color .15s, color .15s; }
a:hover { color: var(--accent-soft); text-decoration-color: var(--accent); }
hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

::selection { background: var(--accent); color: var(--ink-strong); }

/* Skip link ----------------------------------------------------------- */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--bg-elev); color: var(--ink-strong);
  padding: .5rem 1rem; border: 1px solid var(--rule-strong);
}
.skip-link:focus { left: 1rem; top: 1rem; z-index: 100; }

/* Layout primitives --------------------------------------------------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header / wordmark --------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--rule);
  padding: 1.25rem 0;
  position: sticky; top: 0; z-index: 20;
  background: rgba(12,12,13,.92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between; gap: 2rem;
}
.wordmark {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-variant: small-caps;
  letter-spacing: .08em;
  color: var(--ink-strong);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  line-height: 1;
  white-space: nowrap;
}
.wordmark:hover { color: var(--ink-strong); border-bottom-color: var(--accent-soft); }

/* Nav ----------------------------------------------------------------- */
.primary-nav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 2rem;
}
.primary-nav .nav-link {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
  /* Keep multi-word labels (e.g. Spanish 'Acerca de') on a single
     line — without this each word wraps independently and breaks the
     row at narrower desktop widths. */
  white-space: nowrap;
}
.primary-nav .nav-link:hover { color: var(--ink-strong); }
.primary-nav .nav-link.is-active { color: var(--ink-strong); border-bottom-color: var(--accent); }

/* Dropdown nav (Entities) ------------------------------------------- */
.primary-nav li { position: relative; }
.primary-nav .nav-dropdown-toggle {
  cursor: default;
  display: inline-flex;
  align-items: center;
  gap: .35em;
  user-select: none;
}
.primary-nav .nav-dropdown-toggle:focus { outline: 2px solid var(--accent); outline-offset: 2px; }
.primary-nav .nav-dropdown-caret {
  font-size: .7em;
  line-height: 1;
  transition: transform .15s ease;
}
.primary-nav .nav-dropdown:hover .nav-dropdown-caret,
.primary-nav .nav-dropdown:focus-within .nav-dropdown-caret {
  transform: translateY(1px);
}
.primary-nav .nav-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 13rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--rule);
  padding: .5rem 0;
  list-style: none;
  z-index: 50;
  flex-direction: column;
  gap: 0;
}
/* Invisible bridge between the parent label and the dropdown panel so
   the cursor can travel through the visible 8px gap without losing
   :hover state. Without this the hover-trigger interrupts mid-traverse
   and the menu closes before the user reaches it. */
.primary-nav .nav-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
}
.primary-nav .nav-dropdown:hover .nav-dropdown-menu,
.primary-nav .nav-dropdown:focus-within .nav-dropdown-menu {
  display: flex;
}
.primary-nav .nav-dropdown-link {
  display: block;
  padding: .55rem 1.1rem;
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  text-decoration: none;
  border-bottom: 0;
  white-space: nowrap;
}
.primary-nav .nav-dropdown-link:hover,
.primary-nav .nav-dropdown-link:focus { color: var(--ink-strong); background: var(--bg-elev-3, var(--bg-elev-2)); outline: none; }
.primary-nav .nav-dropdown-link.is-active { color: var(--ink-strong); }

/* Language switcher — tiny inline EN · ES pair to the right of the
   nav. The active language is a non-clickable span (muted); the
   other language is a link to the equivalent page (uses the page's
   hreflangs or a path-rewrite fallback). */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  margin-left: 1.25rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1;
}
.lang-switch__link {
  color: var(--ink-muted);
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  transition: color .12s ease;
}
.lang-switch__link:hover {
  color: var(--ink-strong);
  border-bottom-color: var(--accent-soft);
}
.lang-switch__link.is-active {
  color: var(--ink-faint);
  pointer-events: none;
  cursor: default;
}
.lang-switch__sep {
  color: var(--ink-faint);
  font-size: .85em;
}

.mobile-menu-toggle {
  display: none; background: none; border: 0; cursor: pointer;
  width: 36px; height: 36px; padding: 6px;
}
.mobile-menu-toggle span {
  display: block; width: 100%; height: 2px;
  background: var(--ink); margin: 5px 0;
}

/* Main / article ------------------------------------------------------ */
.site-main { padding: 3rem 0 5rem; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  color: var(--ink-strong);
  line-height: 1.2;
  margin: 2.5rem 0 1rem;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); margin-top: 0; letter-spacing: -.01em; }
h2 { font-size: 1.7rem; padding-top: 1.5rem; border-top: 1px solid var(--rule); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; font-family: var(--sans); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-muted); }

p { margin: 0 0 1.2rem; }
ul, ol { margin: 0 0 1.5rem; padding-left: 1.4rem; }
li { margin-bottom: .4rem; }

blockquote {
  border-left: 3px solid var(--accent);
  margin: 1.5rem 0; padding: .5rem 0 .5rem 1.25rem;
  color: var(--ink-muted); font-style: italic;
}
code {
  font-family: var(--mono); font-size: .9em;
  background: var(--bg-elev); padding: 1px 5px; border-radius: 3px;
  color: var(--ink-strong);
}

/* Eyebrow / kicker ---------------------------------------------------- */
.eyebrow {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  display: inline-block;
  margin-bottom: .75rem;
}

/* Page intro ---------------------------------------------------------- */
.page-intro {
  max-width: 44rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.page-intro .lede {
  font-size: 1.2rem; line-height: 1.55; color: var(--ink);
}

/* ==========================================================================
   Homepage
   ========================================================================== */
.home-masthead {
  text-align: left;
  padding: 4rem 0 3rem;
  border-bottom: 1px solid var(--rule);
}
.home-masthead h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-variant: small-caps;
  letter-spacing: .04em;
  margin: 0 0 1rem;
}
.home-masthead .tagline {
  font-size: 1.35rem;
  color: var(--ink);
  max-width: 36rem;
  font-style: italic;
}

/* Masthead file index (2026-11-27, concept C): the dossier files as a read-only directory behind the right half of the
   masthead, fading out toward the title. Decorative (aria-hidden in index.php). */
.home-masthead { position: relative; overflow: hidden; min-height: 24rem; display: flex; align-items: center; }
.home-masthead .container { position: relative; z-index: 1; width: 100%; }
.masthead-index {
  position: absolute; top: 1.5rem; bottom: 1rem; right: 0; width: min(64rem, 70vw);
  display: flex; gap: 2.25rem; justify-content: flex-end; padding-right: 1.5rem;
  font-family: var(--mono); font-size: .8rem; line-height: 1.62; white-space: nowrap;
  color: var(--ink-faint); opacity: .8; pointer-events: none; user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 55%), linear-gradient(to bottom, #000 80%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0, #000 55%), linear-gradient(to bottom, #000 80%, transparent 100%);
          mask-composite: intersect;
}
.masthead-index ul { list-style: none; margin: 0; padding: 0; }
.masthead-index .perm, .masthead-index .own { color: var(--rule-strong); }
.masthead-index .own { margin: 0 .5em; }
.masthead-index .redact { color: #2a2621; letter-spacing: -.05em; }
.masthead-index li.hi { color: var(--ink-strong); background: var(--accent); margin: 0 -.4em; padding: 0 .4em; }
.masthead-index li.hi .perm, .masthead-index li.hi .own { color: var(--accent-soft); color: rgba(244, 239, 230, .55); }
/* Narrower desktops: keep only the highlighted column (sorted last) so nothing sits behind the title. */
@media (max-width: 1100px) { .masthead-index ul:not(:has(.hi)) { display: none; } }
@media (max-width: 760px) {
  /* Phones: the index sits under the tagline as a short single column instead of behind the title. */
  .home-masthead { flex-direction: column; align-items: stretch; min-height: 0; padding-bottom: 0; }
  .masthead-index {
    order: 2; position: relative; inset: auto; width: auto; height: auto; margin: 1.25rem 0 0; padding: 0 1.25rem 1rem;
    justify-content: flex-start; font-size: .72rem; opacity: .85;
    -webkit-mask-image: linear-gradient(to top, #000 55%, transparent 100%), linear-gradient(to right, #000 75%, transparent 100%);
            mask-image: linear-gradient(to top, #000 55%, transparent 100%), linear-gradient(to right, #000 75%, transparent 100%);
  }
  /* only the column with the highlighted file, ending one row after it, so the highlight sits in the solid part */
  .masthead-index ul:not(:has(.hi)) { display: none; }
  .masthead-index li.hi + li ~ li { display: none; }
}

.section-title {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .5rem;
  margin: 4rem 0 1.5rem;
  display: flex; justify-content: space-between; align-items: baseline;
}
.section-title a {
  font-size: .75rem; color: var(--ink-faint);
  text-decoration: none; border-bottom: 1px solid var(--rule);
}
.section-title a:hover { color: var(--accent-soft); border-bottom-color: var(--accent); }

/* Featured agency cards */
.agency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.agency-card {
  display: block;
  position: relative;
  padding: 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, transform .15s;
}
.agency-card:hover {
  border-color: var(--accent);
  color: inherit;
}
.agency-card-flag {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
}
.agency-card .agency-card-country {
  font-family: var(--sans);
  font-size: .7rem;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .5rem;
  /* Clamp the meta/eyebrow row to a single line and reserve its height
     so cards align even when sector / manufacturer / parent / lifespan
     values vary in length. Long values ellipsis-truncate. */
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(.7rem * 1.4);
}
/* Sub-unit cards: "↳ <Parent name>" breadcrumb above the title, signalling
   the institutional hierarchy. Rendered on agency entries with a
   `parent_agency:` frontmatter value that resolves to another agency in
   the index (e.g. NSA Tailored Access Operations ↳ National Security Agency).
   Card stays in its alphabetical slot — the breadcrumb is purely a visual
   relationship marker. */
.agency-card .agency-card-parent {
  font-family: var(--sans);
  font-size: .72rem;
  line-height: 1.35;
  color: var(--ink-faint);
  margin: -.15rem 0 .35rem;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}
.agency-card--sub {
  border-left: 2px solid var(--rule-soft, var(--rule));
}
.agency-card .agency-card-name {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--ink-strong);
  line-height: 1.25;
  margin: 0 0 .25rem;
  font-weight: 600;
  /* Clamp + reserve a uniform 2-line title block across all card grids
     so cards align regardless of title length variance (e.g. CIA vs
     Defense Counterintelligence and Security Agency).
     Size reduced from 1.4rem -> 1.15rem on 2026-05-14 for tighter card
     density across dossiers / lexicon / agencies / notorious / adjacency
     / technology / celebrate / country indexes; line-height bumped to
     1.25 so smaller text still has comfortable two-line tracking. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: calc(1.15rem * 1.25 * 2);
}
/* When the title is wrapped in an inner .agency-card-name-text span,
   drop the outer h3's 2-line min-height reservation so the title takes
   its natural 1- or 2-line height. This avoids the original problem
   (empty space between title and acronym on short-title cards) and
   the bottom-align workaround's problem (empty space above the title,
   so titles "float" at different vertical positions). Cards now have
   a consistent rhythm at the top: title → acronym → description.
   Grid alignment is preserved by the description block's own min-height
   clamp; any height difference between cards spills as trailing space
   below the description, which reads naturally.

   Templates without the inner span keep the existing 2-line clamp +
   reserved height behavior (used on agencies, lexicon, dossiers, etc.).
   They can opt into the natural-height pattern by adopting the inner
   span. */
.agency-card .agency-card-name:has(> .agency-card-name-text) {
  display: block;
  -webkit-line-clamp: unset;
  line-clamp: unset;
  -webkit-box-orient: unset;
  min-height: 0;
  overflow: visible;
}
.agency-card .agency-card-name-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.agency-card .agency-card-acronym {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .14em;
  color: var(--ink-muted);
  margin-bottom: .75rem;
}
/* Inline-parens acronym appearing inside the title alongside the agency
   name (the harmonised "Name (ACR)" pattern — adjacency was the
   canonical, applied 2026-05-14 across agencies/country/index/start).
   Lives inside the .agency-card-name-text span so the 2-line clamp
   covers both name and acronym as a single text run. */
.agency-card-name-acronym {
  color: var(--ink-muted);
  font-weight: 400;
}
/* Small "in progress" indicator for stub agency entries — agencies-only
   feature, appended inline after the acronym in the title. */
.agency-card-name-stub {
  color: var(--warn);
  font-size: .7em;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-left: .35em;
}
.agency-card .agency-card-desc {
  font-size: .95rem;
  color: var(--ink);
  line-height: 1.5;
  margin: 0;
  /* Clamp the visible description to 4 lines across all card grids
     (dossiers, agencies, law-enforcement, adjacency, notorious,
     celebrate, technology, home page). Descriptions in the source
     range 500–800+ chars; the clamp gives every card the same
     visual rhythm regardless of source length. min-height reserves
     the same 4-line block on cards with shorter descriptions so
     baselines align across the row. Full text remains in the DOM
     for screen readers and search-index crawls. */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(.95rem * 1.5 * 4);
}

/* Country strip */
.country-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: .25rem 2rem;
  font-family: var(--serif);
  font-size: 1rem;
}
.country-strip a {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .45rem 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.country-strip a:hover { color: var(--accent-soft); }
.country-strip .country-name { flex: 1; }
.country-strip .agency-count {
  color: var(--ink-faint);
  font-size: .85rem;
  font-variant-numeric: tabular-nums;
  font-family: var(--sans);
}

/* Flags --------------------------------------------------------------- */
/* Full-color SVG flags. The hairline outline prevents flags with white
   bands (Japan, Israel, post-2024 Syria, etc.) from melting into the
   dark background. */
.flag {
  display: inline-block;
  width: 28px;
  height: 21px;
  flex-shrink: 0;
  object-fit: cover;
  border: 1px solid var(--rule-strong);
  vertical-align: middle;
  background: var(--bg-elev);
}
.flag-sm { width: 20px; height: 15px; }
.flag-lg { width: 64px; height: 48px; }
.flag-xl { width: 120px; height: 90px; border-width: 1px; }

/* Dossier theme filter chips ------------------------------------------ */
.dossier-themes {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 0 0 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}
.dossier-theme-chip {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .04em;
  padding: .4rem .85rem;
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  color: var(--ink-muted);
  text-decoration: none;
  background: transparent;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
.dossier-theme-chip:hover {
  color: var(--ink-strong);
  border-color: var(--accent-soft);
  text-decoration: none;
}
.dossier-theme-chip.active {
  color: var(--bg);
  background: var(--ink-strong);
  border-color: var(--ink-strong);
}

/* Per-theme intro prose, rendered between chip nav and grid */
.theme-intro {
  max-width: 44rem;
  margin: 0 0 3rem;
  color: var(--ink);
  line-height: 1.7;
}
.theme-intro h2 {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 1rem;
}
.theme-intro p { margin: 0; }

/* Index-page prose footer + homepage intro */
.page-notes,
.home-intro {
  max-width: 44rem;
  margin: 3.5rem 0 1rem;
  color: var(--ink-muted);
  line-height: 1.7;
}
.home-intro {
  margin: 1.5rem 0 3rem;
  font-size: 1.05rem;
  color: var(--ink);
}
.page-notes h2 {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 1rem;
}
.page-notes p:last-child,
.home-intro p:last-child { margin-bottom: 0; }

/* Methodology block on homepage */
.methodology-callout {
  background: var(--bg-elev);
  border-left: 3px solid var(--accent);
  padding: 1.75rem 2rem;
  margin: 4rem 0 1rem;
  max-width: 44rem;
}
.methodology-callout h3 {
  margin: 0 0 .75rem;
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-soft);
}
.methodology-callout p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Agency page
   ========================================================================== */
.agency-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) { .agency-layout { grid-template-columns: 1fr; } }

.agency-article {
  max-width: var(--measure);
  font-size: 1.05rem;
}
.agency-article h2 { scroll-margin-top: 5rem; }
/* Dossier pages read wider on desktop (2026-12-03, David: "mabye we should widen the content area for desktop"). Phones and tablets keep --measure. */
@media (min-width: 1100px) {
  .agency-article.dossier-article { max-width: 46rem; }
  .dossier-article .dossier-video, .dossier-article .entry-figures, .dossier-article .entry-image-credits { max-width: none; }
  .dossier-article .entry-portrait.is-wide.is-banner { max-width: none; }   /* banner spans the full content width (David, 2026-12-03) */
}
.agency-article h3 { scroll-margin-top: 5rem; }

.agency-header {
  margin-bottom: 2.5rem; padding-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.agency-header .breadcrumb {
  font-family: var(--sans); font-size: .8rem;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-muted); margin-bottom: 1rem;
}
.agency-header .breadcrumb a { color: var(--ink-muted); text-decoration: none; }
.agency-header .breadcrumb a:hover { color: var(--accent-soft); }
.agency-header h1 { margin: 0; }
.agency-header .acronym {
  font-family: var(--sans);
  font-size: 1rem;
  letter-spacing: .14em;
  color: var(--ink-muted);
  display: block;
  margin-top: .5rem;
}
.agency-header .description {
  font-size: 1.2rem; color: var(--ink); font-style: italic;
  margin: 1.25rem 0 0;
}

/* Fact box (right rail block on the agency page) */
.agency-facts {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  padding: 1.5rem;
  font-family: var(--sans);
  font-size: .85rem;
  line-height: 1.5;
}
.agency-facts dt {
  font-size: .65rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-top: .9rem;
}
.agency-facts dt:first-child { margin-top: 0; }
.agency-facts dd { margin: .15rem 0 0; color: var(--ink); }
.agency-facts a { color: var(--ink); text-decoration-color: var(--rule-strong); }

/* Channels (public-facing offices + social media) */
.agency-channels {
  margin-top: 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.5rem;
}
.agency-channels h4 {
  margin: 0 0 .5rem;
  padding: 0;
  font-family: var(--sans);
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border: 0;
}
.agency-channels h4 + ul { margin-bottom: 1rem; }
.agency-channels h4 ~ h4 {
  border-top: 1px solid var(--rule);
  padding-top: 1rem;
  margin-top: 0;
}
.agency-channels ul {
  list-style: none; margin: 0; padding: 0;
  font-family: var(--sans); font-size: .85rem;
}
.agency-channels li { margin: 0; }
.agency-channels a {
  display: block;
  padding: .35rem 0;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.agency-channels li:last-child a { border-bottom: 0; }
.agency-channels a:hover { color: var(--accent-soft); }

/* TOC */
.agency-toc {
  position: sticky; top: 5rem;
  background: var(--bg-elev-2);
  border: 1px solid var(--rule);
  padding: 1.25rem 1.25rem 1rem;
  margin-top: 1.5rem;
}
.agency-toc h4 {
  margin: 0 0 .75rem; padding: 0;
  font-family: var(--sans);
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.agency-toc ol {
  list-style: none; margin: 0; padding: 0;
  font-family: var(--sans); font-size: .85rem;
  counter-reset: toc;
}
.agency-toc li { margin: 0; counter-increment: toc; }
.agency-toc a {
  display: block; padding: .35rem 0;
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--rule);
  position: relative; padding-left: 2rem;
}
.agency-toc a::before {
  content: counter(toc, decimal-leading-zero);
  position: absolute; left: 0;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  font-size: .75rem;
  top: .45rem;
}
.agency-toc a:hover { color: var(--accent-soft); }
.agency-toc li:last-child a { border-bottom: 0; }

/* Status badges (confirmed / alleged / disputed) */
.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: .65rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 2px 7px;
  border: 1px solid currentColor;
  vertical-align: middle;
  margin-right: .35rem;
}
.badge.confirmed { color: var(--ok); }
.badge.alleged   { color: var(--warn); }
.badge.disputed  { color: var(--accent-soft); }

/* Redaction styling for [REDACTED] markers in body text */
.redacted {
  background: var(--ink-strong);
  color: var(--redact);
  font-family: var(--mono);
  font-size: .85em;
  letter-spacing: .08em;
  padding: 1px 8px;
  border-radius: 1px;
  font-weight: 700;
  user-select: none;
}

/* Footnote refs / sources list */
sup.fn-ref {
  font-size: .7em;
  vertical-align: super;
  margin-left: 1px;
}
sup.fn-ref a {
  color: var(--accent-soft);
  text-decoration: none;
  font-weight: 600;
  padding: 0 2px;
}
.agency-article ol.sources, .dossier-article ol.sources {
  font-family: var(--sans);
  font-size: .85rem;
  line-height: 1.5;
  padding-left: 1.5rem;
  color: var(--ink-muted);
}
.agency-article ol.sources li, .dossier-article ol.sources li { margin-bottom: .5rem; }
.agency-article ol.sources a, .dossier-article ol.sources a { color: var(--ink); }

/* Editorial-verification audit-summary block.
   Rendered at the bottom of every detail page that has audit-history
   frontmatter (trust_score + audit_summary). Calm, professional, not
   alarming — readers see verification state as a positive disclosure,
   not a warning. Pattern reusable across all detail-page templates. */
.audit-summary {
  margin: 3rem 0 0;
  padding: 1.5rem 1.75rem;
  background: var(--bg-elev);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: .9rem;
  line-height: 1.55;
  color: var(--ink-muted);
}
/* Boosted specificity (`.audit-summary .audit-summary-title`, 0,2,0)
   so this rule wins over `.lexicon-body h2` (0,1,1) when the audit
   summary is rendered inside `.lexicon-body`. Without the boost the
   lexicon body's h2 rule injected a 2.5rem top margin on the
   "Editorial verification" heading, producing visible extra space
   above the title that didn't appear on dossier/agency/notorious pages
   (which have no equivalent body-h2 rule). */
.audit-summary .audit-summary-title {
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 .85rem;
  padding-top: 0;
  border-top: 0;
}
.audit-summary p {
  margin: 0 0 .4rem;
}
.audit-summary p:last-child {
  margin-bottom: 0;
}
.audit-summary-stats {
  color: var(--ink);
  font-size: .95rem;
}
.audit-summary-stats strong {
  color: var(--ink-strong);
  font-weight: 600;
}
.audit-summary-sep {
  color: var(--ink-faint);
  margin: 0 .35rem;
}
.audit-summary-provisional {
  color: var(--ink-muted);
  font-size: .85em;
  font-style: italic;
  text-decoration: none;
  margin-left: .35rem;
  border-bottom: 1px dotted var(--ink-faint);
}
.audit-summary-provisional:hover {
  color: var(--ink-strong);
  border-bottom-color: var(--ink-muted);
}
.audit-summary-detail {
  color: var(--ink);
}
.audit-summary-meta {
  color: var(--ink-muted);
  font-size: .85rem;
}
.audit-summary-link {
  margin-top: .75rem !important;
  font-size: .85rem;
}
.audit-summary-link a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.audit-summary-link a:hover {
  color: var(--accent-soft);
}

/* "Page in progress" stub notice */
.stub-notice {
  background: var(--bg-elev);
  border: 1px dashed var(--rule-strong);
  padding: 1.5rem 1.75rem;
  margin: 2.5rem 0;
  font-size: .95rem;
  color: var(--ink-muted);
}
.stub-notice strong {
  display: block; color: var(--warn); font-family: var(--sans);
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  margin-bottom: .5rem;
}

/* ==========================================================================
   Country index + detail
   ========================================================================== */
.country-detail-header {
  border-bottom: 1px solid var(--rule);
  padding-bottom: 2rem; margin-bottom: 2.5rem;
}
.country-detail-flag {
  display: block;
  margin-bottom: 1.5rem;
}
.country-agency-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

/* Per-jurisdiction subheading shown above each grouped grid on country
   pages with enough agencies to need subdivision (USA), and per-theme
   subheading on /dossiers when the chip filter is "All". Subdued vs
   .section-title — dashed rule + narrower tracking so the eye reads
   it as a sub-level under the parent section heading. */
.country-agency-group-title {
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin: 2.5rem 0 1rem;
  padding-bottom: .35rem;
  border-bottom: 1px dashed var(--rule);
  display: flex;
  align-items: baseline;
  gap: .6rem;
}
.country-agency-group-title:first-of-type {
  margin-top: 1rem;
}
/* When the bucket label is a link (dossiers grouped view — clicking the
   heading drills into the chip-filtered theme page), inherit color + no
   underline; soft accent on hover. */
.country-agency-group-title a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .15s, color .15s;
}
.country-agency-group-title a:hover {
  color: var(--ink-strong);
  border-bottom-color: var(--rule);
}
/* Optional per-group count shown after the label. Lighter weight, no
   tracking, no caps — reads as metadata rather than continuation of
   the heading. */
.country-agency-group-count {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink-faint);
  font-size: .8rem;
}

/* ==========================================================================
   Alpha-index — used on /agencies and /lexicon for letter-grouped references
   ========================================================================== */
.alpha-jumpbar {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  align-items: center;
  margin: 0 0 2rem;
  padding: .75rem 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
}
.alpha-jumpbar a,
.alpha-jumpbar span {
  display: inline-block;
  min-width: 1.75rem;
  padding: .25rem .4rem;
  text-align: center;
  font-family: var(--sans);
  font-size: .85rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  border-radius: 2px;
}
.alpha-jumpbar a {
  color: var(--ink-strong);
  text-decoration: none;
  border-bottom: 0;
  transition: background-color .12s, color .12s;
}
.alpha-jumpbar a:hover,
.alpha-jumpbar a:focus {
  background: var(--bg-elev-2);
  color: var(--accent);
  outline: none;
}
.alpha-jumpbar span {
  color: var(--ink-faint);
  cursor: default;
}
/* Agencies controls row — chip-nav (jurisdiction filters) on the
   left, "View as table →" toggle on the right. Both share a single
   horizontal rule below via the .dossier-themes border-bottom on the
   inner nav; the toggle aligns to the right and stays on the same
   visual line as the chips (or just below, on narrow viewports, via
   flex-wrap on the chip nav inside). */
.agencies-controls {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  margin: 0 0 2.5rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: 1.5rem;
}
.agencies-controls .dossier-themes {
  /* When inside .agencies-controls, drop the chip-nav's own
     border-bottom/margin — the wrapping .agencies-controls owns
     the divider so chips + toggle align under a single rule. */
  margin: 0;
  padding-bottom: 0;
  border-bottom: 0;
  flex: 1 1 auto;
}
.agencies-controls--table {
  /* When the chip nav is hidden (table view), only the toggle
     remains. Push it to the left so it isn't floating in space. */
  justify-content: flex-start;
}
.agencies-view-toggle {
  flex: 0 0 auto;
  align-self: center;
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .04em;
  color: var(--ink-muted);
  text-decoration: none;
  white-space: nowrap;
  padding: .35rem 0;
  border-bottom: 1px solid transparent;
  transition: color .15s, border-color .15s;
}
.agencies-view-toggle:hover,
.agencies-view-toggle:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
  outline: none;
  text-decoration: none;
}
.jurisdiction-section {
  margin: 0 0 2.5rem;
  scroll-margin-top: 1rem;
}
.jurisdiction-section-count {
  color: var(--ink-faint);
  font-weight: 400;
  letter-spacing: .08em;
}

/* ──────────────────────────────────────────────────────────────────
   Agencies table view — dense alternative to the card grid.
   Horizontal scroll on narrow viewports; click-to-sort headers with
   ascending/descending indicators.
   ────────────────────────────────────────────────────────────────── */
.agencies-table-scroll {
  overflow-x: auto;
  margin: 0 0 2rem;
  border: 1px solid var(--rule);
  background: var(--bg-elev);
}
.agencies-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: .88rem;
  line-height: 1.35;
}
.agencies-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  text-align: left;
  font-weight: 600;
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: .7rem .85rem;
  background: var(--bg-elev-2);
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: color .12s, background-color .12s;
}
.agencies-table thead th:hover {
  color: var(--ink-strong);
  background: var(--bg);
}
.agencies-table thead th .sort-indicator {
  display: inline-block;
  margin-left: .25em;
  width: .6em;
  color: var(--ink-faint);
  opacity: .55;
}
.agencies-table thead th .sort-indicator::after {
  content: '↕';
  font-size: .9em;
}
.agencies-table thead th.is-sorted-asc .sort-indicator::after {
  content: '↑';
  opacity: 1;
  color: var(--accent);
}
.agencies-table thead th.is-sorted-desc .sort-indicator::after {
  content: '↓';
  opacity: 1;
  color: var(--accent);
}
.agencies-table thead th.is-sorted-asc,
.agencies-table thead th.is-sorted-desc {
  color: var(--ink-strong);
}
.agencies-table tbody tr {
  border-bottom: 1px solid var(--rule);
  transition: background-color .1s;
}
.agencies-table tbody tr:last-child {
  border-bottom: 0;
}
.agencies-table tbody tr:hover {
  background: var(--bg);
}
.agencies-table td {
  padding: .65rem .85rem;
  vertical-align: middle;
  color: var(--ink);
}
.agencies-table-country {
  white-space: nowrap;
  color: var(--ink-muted);
  font-size: .82rem;
}
.agencies-table-flag {
  vertical-align: -2px;
  margin-right: .45em;
  border: 1px solid var(--rule);
}
.agencies-table-acronym {
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: .04em;
  white-space: nowrap;
}
.agencies-table-name a {
  color: var(--ink-strong);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color .12s, color .12s;
}
.agencies-table-name a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.agencies-table-stub {
  margin-left: .4em;
  color: var(--warn);
  font-size: .72em;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.agencies-table-mandate {
  color: var(--ink-muted);
  white-space: nowrap;
}
.agencies-table-founded,
.agencies-table-status {
  color: var(--ink-muted);
  font-size: .82rem;
}
.alpha-section {
  margin: 0 0 2.5rem;
  scroll-margin-top: 1rem;
}
.alpha-section-heading {
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 1rem;
  padding: 0 0 .5rem;
  border-bottom: 1px solid var(--rule);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-elev-2);
  border-top: 1px solid var(--rule-strong);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  font-size: .9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 2fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
.footer-section h4 {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 .75rem;
  border-bottom: 1px solid var(--rule);
  padding-bottom: .5rem;
}
.footer-section ul {
  list-style: none; margin: 0; padding: 0;
}
.footer-section li { margin: .35rem 0; }
.footer-section a { color: var(--ink-muted); text-decoration: none; }
.footer-section a:hover { color: var(--accent-soft); }
.footer-wordmark {
  font-family: var(--serif);
  font-variant: small-caps;
  letter-spacing: .08em;
  font-size: 1.15rem;
  color: var(--ink-strong);
  text-decoration: none;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
  display: inline-block;
}
.footer-tagline { color: var(--ink-muted); margin-top: .9rem; font-style: italic; font-size: .9rem; }
.footer-statement p { color: var(--ink-muted); font-size: .85rem; line-height: 1.55; margin: 0 0 .75rem; }
/* End-of-file line above the copyright (2026-11-29, footer mockup A): echoes the masthead's file index. */
.footer-eof {
  display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .9rem;
  padding: 0 0 1rem;
  font-family: var(--mono); font-size: .72rem; line-height: 1.6;
  color: var(--ink-faint); opacity: .85;
  user-select: none;
}
.footer-eof .perm, .footer-eof .own, .footer-eof .dot { color: var(--rule-strong); }
.footer-eof .eof { color: var(--accent-soft); }
.footer-eof .cur {
  display: inline-block; width: .55em; height: 1em; margin-left: -.4rem;
  background: var(--accent);
  animation: footer-eof-blink 1.1s steps(1) infinite;
}
@keyframes footer-eof-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .footer-eof .cur { animation: none; } }
.footer-bottom {
  border-top: 1px solid var(--rule);
  padding-top: 1.25rem;
  font-family: var(--sans);
  font-size: .75rem;
  color: var(--ink-faint);
  text-align: center;
}
/* ==========================================================================
   Mobile
   ========================================================================== */
@media (max-width: 720px) {
  .mobile-menu-toggle { display: block; }
  .primary-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg-elev-2);
    border-bottom: 1px solid var(--rule);
    padding: 1rem 1.5rem;
  }
  .primary-nav.is-open { display: block; }
  .primary-nav ul { flex-direction: column; gap: .75rem; }
  .site-header .container { position: relative; flex-wrap: wrap; }
  body { font-size: 17px; }

  /* Language switcher on mobile: sits next to the menu toggle (top-
     right), with the wordmark on the left. Slightly tighter spacing
     than desktop. */
  .lang-switch {
    margin-left: auto;
    margin-right: .75rem;
    padding-left: 0;
    border-left: 0;
    order: 2;             /* between wordmark and toggle */
  }
  .mobile-menu-toggle { order: 3; }

  /* On mobile the dropdown flattens — no hover affordance, items render
     inline beneath the parent label as a nested list. */
  .primary-nav .nav-dropdown-menu {
    display: flex;
    position: static;
    transform: none;
    margin: .5rem 0 0 1rem;
    border: 0;
    padding: 0;
    background: transparent;
    gap: .5rem;
  }
  .primary-nav .nav-dropdown-toggle { cursor: default; }
  .primary-nav .nav-dropdown-caret { display: none; }
  .primary-nav .nav-dropdown-link { padding: 0; }
}

/* ==========================================================================
   Search
   ========================================================================== */
.search-page {
  max-width: 60rem;
  margin: 0 auto;
}

.search-input-wrap {
  position: relative;
  margin-bottom: 2rem;
}

.search-input {
  width: 100%;
  background: var(--bg-elev);
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: 1.4rem;
  line-height: 1.4;
  padding: 1.1rem 1.25rem;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: var(--ink-faint); font-style: italic; }
.search-input:focus { border-bottom-color: var(--accent); }
.search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

.search-empty {
  font-family: var(--sans);
  font-size: .9rem;
  color: var(--ink-muted);
  padding: 1.5rem 0;
  text-align: center;
}
.search-empty a { color: var(--ink); }

.search-result-count {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  border-bottom: 1px solid var(--rule);
  padding-bottom: .5rem;
  margin-bottom: 1rem;
}

.search-result-list {
  display: flex;
  flex-direction: column;
}

.search-result {
  display: block;
  position: relative;
  padding: 1rem 1.25rem;
  border: 1px solid var(--rule);
  border-top: 0;
  background: var(--bg-elev);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, background-color .15s;
}
.search-result:first-child { border-top: 1px solid var(--rule); }
.search-result:hover,
.search-result.is-active {
  border-color: var(--accent);
  border-left: 3px solid var(--accent);
  padding-left: calc(1.25rem - 2px);
  color: inherit;
  background: var(--bg-elev-2);
}

.search-result-type {
  font-family: var(--sans);
  font-size: .65rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: .35rem;
}

.search-result-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--ink-strong);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: .25rem;
}

.search-result-acronym {
  font-family: var(--sans);
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .12em;
  color: var(--ink-muted);
  margin-left: .25rem;
}

/* APT-designation aliases on elite-unit agency entries — shown inline
   after the title only when a search term hits an alias (suppressed
   otherwise to keep the card visually quiet). Same muted register as
   the acronym treatment. */
.search-result-aliases {
  font-family: var(--sans);
  font-size: .78rem;
  font-weight: 400;
  font-style: italic;
  color: var(--ink-muted);
  margin-left: .25rem;
}

.search-result-subtitle {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--ink-muted);
  margin-bottom: .35rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.search-result-flag {
  flex-shrink: 0;
}

.search-result-desc {
  font-family: var(--serif);
  font-size: .95rem;
  color: var(--ink);
  line-height: 1.5;
  margin: 0;
}

.search-result mark {
  background: var(--accent);
  color: var(--ink-strong);
  padding: 0 2px;
  border-radius: 1px;
}

/* Dossier video readout ----------------------------------------------- */
.dossier-video {
  margin: 2rem 0 2.5rem;
  max-width: var(--measure);
}
.dossier-video-player {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
}
.dossier-video-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.dossier-video-caption {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: .6rem 0 0;
}

/* Summary video (YouTube explainer at the foot of a dossier) --------- */
.summary-video { scroll-margin-top: 5rem; }
.summary-video .dossier-video { margin-top: 1rem; }
.summary-video .dossier-video-caption a { margin-left: .5em; }
.summary-video-subscribe {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .9rem;
  margin: 1rem 0 0;
  font-family: var(--sans); font-size: .85rem; color: var(--ink-muted);
}
.yt-subscribe {
  display: inline-block;
  padding: .5rem 1.1rem;
  background: var(--accent); color: var(--ink-strong);
  font-weight: 600; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  text-decoration: none; border-radius: 2px;
}
.yt-subscribe:hover, .yt-subscribe:focus-visible { background: var(--accent-soft); color: var(--ink-strong); }
.summary-video-jump {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  margin: .5rem 0 0;
}
.summary-video-jump a { text-decoration: none; border-bottom: 1px solid var(--rule); }

/* Country readouts (multi-video player on country pages) ------------- */
.country-readouts {
  margin: 0 0 4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
@media (min-width: 900px) {
  .country-readouts { grid-template-columns: 1.6fr 1fr; }
}
.country-readouts-player {
  /* Holds a .toobits-player; the inner player has its own aspect-ratio
   * and chrome so this wrapper is just a positioning hook. Reset
   * .toobits-player's default top margin (the section heading already
   * provides spacing above). */
}
.country-readouts-player .toobits-player {
  margin: 0;
}
.country-readouts-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 540px;
  overflow-y: auto;
  border: 1px solid var(--rule);
  background: var(--bg-elev);
}
.country-readouts-list li { margin: 0; }
.country-readouts-item {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: .9rem;
  padding: .75rem 1rem;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  font-family: var(--serif);
  text-align: left;
  cursor: pointer;
  transition: background .12s, border-color .12s;
}
.country-readouts-item:hover {
  background: var(--bg);
  color: var(--ink-strong);
}
.country-readouts-item.is-active {
  background: var(--bg);
  border-left: 3px solid var(--accent);
  padding-left: calc(1rem - 3px);
}
.country-readouts-item.is-active .country-readouts-acronym { color: var(--accent-soft); }
.country-readouts-num {
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .14em;
  color: var(--ink-faint);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.country-readouts-label {
  display: block;
  flex: 1;
  min-width: 0;                /* allow shrink inside the flex item */
  line-height: 1.35;
  overflow: hidden;            /* truncate long agency names to one line */
  text-overflow: ellipsis;
  white-space: nowrap;
}
.country-readouts-acronym {
  display: inline-block;
  font-family: var(--sans);
  font-size: .7rem;
  letter-spacing: .14em;
  color: var(--ink-muted);
  margin-right: .4rem;
}
.country-readouts-name {
  display: inline;
  font-size: .95rem;
  color: var(--ink);
}

/* Error page ---------------------------------------------------------- */
.error-page-content {
  text-align: center;
  padding: 5rem 0;
}
.error-page-content h1 {
  font-size: 5rem; font-variant: small-caps; letter-spacing: .06em;
  color: var(--accent);
}
.error-page-content p { color: var(--ink-muted); font-size: 1.1rem; }
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .75rem 1.5rem;
  border: 1px solid var(--rule-strong);
  color: var(--ink-strong);
  background: transparent;
}
.btn:hover { border-color: var(--accent); color: var(--ink-strong); }

/* ============================================================= */
/* Start page (/start) — the learning hub                         */
/* ============================================================= */

.start-frame {
  max-width: 44rem;
  margin: 0 0 4rem;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.7;
}
.start-frame p { margin: 0 0 1rem; }
.start-frame p:last-child { margin: 0; color: var(--ink-muted); }

.start-section {
  margin: 4.5rem 0;
}
.start-section > h2 {
  font-family: var(--sans);
  font-size: .9rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 .5rem;
}
.start-section > p {
  max-width: 44rem;
  color: var(--ink-muted);
  margin: 0 0 1.75rem;
}

/* Walks: 3-up grid of country cards */
.start-walks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
}
.start-walk-card {
  display: block;
  padding: 1.5rem 1.5rem 1.25rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s, transform .1s;
}
.start-walk-card:hover {
  border-color: var(--accent-soft);
  text-decoration: none;
}
.start-walk-flag {
  display: block;
  margin: 0 0 .75rem;
  border: 1px solid var(--rule);
}
.start-walk-card h3 {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0 0 .25rem;
  color: var(--ink-strong);
  /* Title takes natural 1- or 2-line height — matches the harmonised
     card-title pattern used by `.agency-card-name:has(> .agency-card-name-text)`
     across the dossiers/agencies/notorious/adjacency/celebrate/technology/
     country indexes and by `.lexicon-card-term` on the lexicon index.
     Long country names still wrap to two lines; short names sit
     immediately above the readout-count tag with no reserved gap. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.start-walk-tag {
  font-family: var(--sans);
  font-size: .7rem;
  line-height: 1.4;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 .75rem;
  min-height: calc(.7rem * 1.4);
}
.start-walk-desc {
  font-size: .95rem;
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0;
  /* 4-line clamp + reserved height matches .agency-card-desc and
     .lexicon-card-short across the rest of the site. */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(.95rem * 1.55 * 4);
}

/* Reading list: numbered, vertical */
.start-reading {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: start-reading;
  max-width: 50rem;
}
.start-reading-item {
  counter-increment: start-reading;
  position: relative;
  padding: 1rem 0 1rem 3rem;
  border-bottom: 1px solid var(--rule);
}
.start-reading-item:last-child { border-bottom: none; }
.start-reading-item::before {
  content: counter(start-reading, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.1rem;
  font-family: var(--sans);
  font-size: .8rem;
  color: var(--ink-faint);
  letter-spacing: .1em;
}
.start-reading-link {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  text-decoration: none;
  color: var(--ink-strong);
  margin-bottom: .35rem;
}
.start-reading-link:hover { color: var(--accent-soft); }
.start-reading-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
}
.start-reading-date {
  font-family: var(--sans);
  font-size: .75rem;
  letter-spacing: .1em;
  color: var(--ink-faint);
  white-space: nowrap;
}
.start-reading-why {
  margin: 0;
  font-size: .95rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* Theme list: simple two-column */
.start-themes {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
  gap: .5rem 2rem;
  max-width: 50rem;
}
.start-themes a {
  display: block;
  padding: .5rem 0;
  font-family: var(--serif);
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--rule);
}
.start-themes a:hover { color: var(--accent-soft); }

.start-deeper {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: 50rem;
}
.start-deeper li {
  padding: .75rem 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink-muted);
  font-size: .95rem;
  line-height: 1.55;
}
.start-deeper li:last-child { border-bottom: none; }
.start-deeper a {
  font-family: var(--serif);
  font-size: 1.05rem;
  color: var(--ink-strong);
  text-decoration: none;
}
.start-deeper a:hover { color: var(--accent-soft); }

.start-cta {
  display: inline-block;
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .75rem 1.25rem;
  border: 1px solid var(--rule-strong);
  color: var(--ink-strong);
}
.start-cta:hover {
  border-color: var(--accent);
  color: var(--ink-strong);
  text-decoration: none;
}

/* ============================================================= */
/* Lexicon — index + entry pages                                  */
/* ============================================================= */

.lexicon-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1rem;
  margin: 0 0 2rem;
}
.lexicon-card {
  display: block;
  position: relative;
  padding: 1.25rem 1.5rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  text-decoration: none;
  color: var(--ink);
  transition: border-color .15s;
}
.lexicon-card:hover {
  border-color: var(--accent-soft);
  text-decoration: none;
}
/* Easter-egg accent: the "Plausible Deniability" lexicon entry on the
   /lexicon index gets the site's oxblood accent colour on its title,
   because that entry is the site's namesake. CSS-only via attribute
   selector — works regardless of base-path prefix because `[href$=...]`
   matches the suffix. Single-entry exception; no other lexicon term
   gets the treatment. */
.lexicon-card[href$="/lexicon/plausible-deniability"] .lexicon-card-term {
  color: var(--accent);
}

.lexicon-card-term {
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.25;
  margin: 0 0 .35rem;
  color: var(--ink-strong);
  /* Title takes natural 1- or 2-line height — same pattern as
     `.agency-card-name:has(> .agency-card-name-text)` (dossiers + tech).
     Long terms still wrap to two lines; short terms sit immediately above
     the short-definition block with no reserved gap. Grid-row alignment
     is maintained by the card-level layout; the short-definition's own
     clamp handles end-of-card alignment. */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.lexicon-card-short {
  font-size: .9rem;
  color: var(--ink-muted);
  line-height: 1.5;
  margin: 0;
  /* Match the .agency-card-desc 4-line clamp for visual parity
     across all listing grids on the site. */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: calc(.9rem * 1.5 * 4);
}

.lexicon-entry {
  max-width: 44rem;
}
.lexicon-body {
  margin: 2rem 0;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.7;
}
.lexicon-body p { margin: 0 0 1.25rem; }
.lexicon-body h2 {
  font-family: var(--sans);
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 2.5rem 0 1rem;
}
.lexicon-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.lexicon-body ul li {
  padding: .5rem 0;
  border-bottom: 1px solid var(--rule);
  font-size: .95rem;
}
.lexicon-body ul li:last-child { border-bottom: none; }


/* ==========================================================================
   Contact form
   ========================================================================== */
.contact-page,
.subscribe-page { max-width: 48rem; }
.contact-wrap { margin-top: 2rem; }

.contact-form .field { margin-bottom: 1.5rem; }
.contact-form label {
  display: block;
  font-family: var(--sans);
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: .5rem;
}
.contact-form label .optional {
  font-weight: 400;
  color: var(--ink-faint);
  text-transform: none;
  letter-spacing: .04em;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .75rem 1rem;
  background: var(--bg-elev);
  border: 1px solid var(--rule-strong);
  border-bottom-width: 2px;
  color: var(--ink-strong);
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.5;
  border-radius: 0;
  transition: border-color .15s ease;
}
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--ink-faint); font-style: italic; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.contact-form textarea { resize: vertical; min-height: 10rem; }
.contact-form .field-hint {
  margin: .5rem 0 0;
  font-family: var(--sans);
  font-size: .8rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.contact-form .honeypot {
  position: absolute;
  left: -5000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form .submit {
  margin-top: .5rem;
  padding: .75rem 2rem;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--ink-strong);
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.contact-form .submit:hover {
  background: var(--accent-soft);
  border-color: var(--accent-soft);
}

.contact-form .form-status {
  margin: 1.25rem 0 0;
  font-family: var(--sans);
  font-size: .85rem;
  color: var(--ink-muted);
  min-height: 1.5em;
}
.contact-form .form-status.ok      { color: var(--ok); }
.contact-form .form-status.err     { color: var(--accent-soft); }
.contact-form .form-status.sending { color: var(--ink-faint); }

/* ──────────────────────────────────────────────────────────────────
   Social-share row — sits at the bottom of every entry page (after
   the audit summary, before the closing </article>). Six monochrome
   icon buttons (X, Bluesky, Facebook, Reddit, Email, Copy link),
   each opening the platform's intent/sharer URL in a new tab. The
   copy-link button is a real <button> wired to a clipboard handler
   in footer.php; on success it briefly swaps the link icon for a
   check and the aria-label for "Copied".
   ────────────────────────────────────────────────────────────────── */
.social-share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .55rem;
  margin: 3rem 0 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.social-share-label {
  font-family: var(--sans);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-right: .35rem;
}
/* Style anchor + button identically so the copy-link <button> picks
   up the same circle treatment as the platform-share <a> elements. */
.social-share-btn,
button.social-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--ink-muted);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
  transition: color .15s, border-color .15s, background-color .15s;
}
.social-share-btn:hover,
.social-share-btn:focus-visible {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--bg-elev);
  outline: none;
  text-decoration: none;
}
.social-share-btn svg {
  display: block;
  /* width/height set inline on the SVG so it survives reset rules */
}
/* Post-copy state on the copy-link button — sticky accent for ~1.5s
   while the JS shows the checkmark, so the affordance reads as a
   completed action rather than a hover artefact. */
.social-share-btn.is-copied {
  color: var(--ok, #6c8e6b);
  border-color: var(--ok, #6c8e6b);
  background: var(--bg-elev);
}

/* Entry images (2026-11-28): header portrait, thumbnail rows under section headings, listing-card thumbnails,
   image credits, lightbox. Markup: includes/entry-images.php; behaviour: assets/lightbox.js. */
.agency-header::after { content: ""; display: table; clear: both; }
.entry-figure { margin: 0; }
.entry-figure a.lb { display: block; border: 1px solid var(--rule); background: var(--bg-elev); cursor: zoom-in; }
.entry-figure a.lb:hover, .entry-figure a.lb:focus-visible { border-color: var(--accent-soft); }
.entry-figure img { display: block; width: 100%; height: auto; }
.entry-portrait { float: right; width: clamp(120px, 24vw, 210px); margin: .25rem 0 1rem 1.75rem; }
.entry-portrait img { aspect-ratio: 4 / 5; object-fit: cover; }
/* Landscape lead image (dossiers, technology): full width between the title and the summary paragraph instead of floated
   (David, 2026-11-28: under the summary it sat right on top of the video player). */
.agency-header:has(.entry-portrait.is-wide) { display: flex; flex-direction: column; }
.entry-portrait.is-wide { order: 10; float: none; width: 62%; max-width: var(--measure); margin: 1.4rem 0 0; }
.agency-header:has(.entry-portrait.is-wide) > .description { order: 20; }
/* Framed 2:1 print, not full width (David, 2026-11-28: the 4:1 strip didn't show enough); full image in the lightbox */
.entry-portrait.is-wide a.lb { padding: 6px; }
.entry-portrait.is-wide img { aspect-ratio: 2 / 1; }
@media (max-width: 600px) { .entry-portrait.is-wide { width: 100%; } }
/* Banner variant: full column width, same height as the framed 2:1 picture (about 3.5:1); the image is cropped, not regenerated */
.entry-portrait.is-wide.is-banner { width: 100%; }
.entry-portrait.is-wide.is-banner img { aspect-ratio: 7 / 2; }
@media (max-width: 600px) { .entry-portrait.is-wide.is-banner img { aspect-ratio: 5 / 2; } }
.entry-portrait figcaption { display: none; }
.entry-figures { display: flex; flex-wrap: wrap; gap: .9rem; margin: .9rem 0 1.6rem; max-width: var(--measure); }
.entry-figures .entry-figure { width: 168px; }
.entry-figures img { height: 118px; object-fit: cover; object-position: 50% 18%; }
.entry-figures figcaption {
  margin-top: .4rem; font-family: var(--sans); font-size: .74rem; line-height: 1.4; color: var(--ink-muted);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
/* Card picture: a 5:2 strip inset inside the card's padding, framed by a 1px rule (David, 2026-11-28, as on the Pirate Codex cards). */
.agency-card-thumb {
  display: block; width: 100%; max-width: 100%; margin: 0 0 1.1rem;
  aspect-ratio: 5 / 2; max-height: 11rem; object-fit: cover; border: 1px solid var(--rule-strong); filter: grayscale(.15);
}
.agency-card:hover .agency-card-thumb { filter: none; }
.agency-card-thumb.is-band { aspect-ratio: 4 / 1; }
/* Agency cards: with a picture on top, the country flag sits beside the country line instead of over the picture's corner. */
.agency-card:has(.agency-card-thumb) .agency-card-flag { position: static; float: right; margin: .1rem 0 0 .6rem; }
.entry-image-credits { margin-top: 2.5rem; font-family: var(--sans); font-size: .8rem; color: var(--ink-muted); max-width: var(--measure); }
.entry-image-credits h2 { font-size: 1rem; }
.entry-image-credits ol { padding-left: 1.2rem; }
.entry-image-credits li { margin-bottom: .35rem; }
.entry-image-credits a { color: var(--ink-muted); }
.entry-image-credits-note { font-style: italic; }
@media (max-width: 560px) {
  .entry-portrait { width: 112px; margin-left: 1rem; }
  .entry-figures { gap: .6rem; }
  .entry-figures .entry-figure { width: calc(50% - .3rem); }
  .entry-figures img { height: 104px; }
}
html.lb-open { overflow: hidden; }
.lb-overlay {
  position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center;
  background: rgba(8, 8, 9, .94); padding: 3rem 4rem;
}
.lb-overlay[hidden] { display: none; }
.lb-figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.lb-figure img { max-width: 100%; max-height: calc(100vh - 10rem); object-fit: contain; box-shadow: 0 0 0 1px var(--rule); }
.lb-figure figcaption {
  margin-top: .9rem; max-width: 52rem; text-align: center; font-family: var(--sans); font-size: .85rem; line-height: 1.5; color: var(--ink-muted);
}
.lb-cap { color: var(--ink-strong, #f4efe6); }
.lb-src { color: var(--ink-muted); }
.lb-close, .lb-prev, .lb-next {
  position: absolute; background: none; border: 0; color: #f4efe6; cursor: pointer; font-size: 2.6rem; line-height: 1; padding: .5rem .8rem; opacity: .75;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover, .lb-close:focus-visible, .lb-prev:focus-visible, .lb-next:focus-visible { opacity: 1; }
.lb-close { top: .6rem; right: .8rem; }
.lb-prev { left: .4rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: .4rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 560px) { .lb-overlay { padding: 3rem .6rem; } .lb-prev, .lb-next { top: auto; bottom: .6rem; transform: none; } }

/* Search result thumbnails (2026-11-28): pages with a portrait or lead image (assets/search.js, search-index.php). */
.search-result.has-thumb { display: grid; grid-template-columns: 128px 1fr; column-gap: 1rem; align-items: start; }
.search-result.has-thumb > :not(.search-result-thumb) { grid-column: 2; }
.search-result-thumb { grid-column: 1; grid-row: 1 / span 4; width: 128px; height: 72px; object-fit: cover; border: 1px solid var(--rule); }
.search-result-thumb.is-tall { width: 72px; height: 90px; justify-self: end; }   /* people: whole portrait, not the eye band */
@media (max-width: 560px) {
  .search-result.has-thumb { grid-template-columns: 88px 1fr; column-gap: .75rem; }
  .search-result-thumb { width: 88px; height: 50px; }
  .search-result-thumb.is-tall { width: 56px; height: 70px; }
}
