/* ================================================================
   ui_kits/library/library.css
   Distilled stylesheet for the TLC Reference Library UI kit.
   Combines the relevant pieces of style.css + the 2026-05-04
   style-audit so this kit is self-contained and renders without
   loading the production site CSS.
   ================================================================ */

/* -------- fonts -------- */
@font-face {
  font-family: 'Modern Typewriter';
  src: url('/fonts/MODERN_TYPEWRITER.ttf') format('truetype');
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Atkinson Hyperlegible Next';
  src: url('/fonts/AtkinsonHyperlegibleNextVF-Variable.woff2') format('woff2-variations'),
       url('/fonts/AtkinsonHyperlegibleNextVF-Variable.ttf') format('truetype-variations');
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper:        #FFFFCC;
  --paper-ink:    #0A0A0A;
  --black:        #000000;
  --ink:          #050505;
  --midnight:     #000033;
  --red-dark:     #802420;
  --red-bright:   #d94545;
  --gold:         #D69F41;
  --blue:         #1E5188;
  --blue-soft:    #8ab4f8;
  --nav-hover:    #FF2042;
  --rule-light:   var(--paper);
  --rule-soft:    rgba(255,255,204,0.35);
  --rule-paper:   rgba(128, 36, 32,0.25);

  --f-display: "Book Antiqua","Palatino Linotype","Palatino LT STD",Georgia,serif;
  --f-body:    "Palatino Linotype","Book Antiqua",Georgia,serif;
  --f-bookman: "Bookman Old Style","URW Bookman L","Palatino Linotype",serif;
  --f-typewr:  "Modern Typewriter","Courier Prime","Courier New",monospace;
  --f-mono:    "Courier New","Courier Prime",monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--ink); }

body {
  background: var(--ink);
  background-image: url('/assets/site-background-desktop.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  color: var(--paper);
  font-family: var(--f-body);
  font-size: 0.9375rem;
  line-height: 1.55;
  min-height: 100vh;
}

/* ============================================================
   NAV — two-row sticky header (matches live site pattern)
     Row 1: home wordmark (left) + search icon (right) + hamburger (≤980px)
     Row 2: nav tabs (desktop) / right-aligned drawer (mobile)
   ============================================================ */
.nav-shell {
  display: flex; flex-wrap: wrap; align-items: center;
  column-gap: 0.875rem; row-gap: 0;
  padding: 0.25rem 1rem 0;
  position: sticky; top: 0; z-index: 250;
  background: #000;
  border-bottom: 1px solid var(--rule-light);
}
.nav-top { display: contents; }
.nav-home {
  display: inline-flex; align-items: center;
  font-family: var(--f-typewr);
  font-size: 0.875rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--paper); text-decoration: none;
  white-space: nowrap; padding: 0.25rem 0;
  transition: color 140ms ease;
  flex: 0 0 auto; order: 1; cursor: pointer;
}
.nav-home:link, .nav-home:visited, .nav-home:active { color: var(--paper); }
.nav-home:hover { color: var(--gold); }

.nav-tabs {
  display: flex; flex: 0 0 100%; flex-wrap: wrap;
  align-items: center; justify-content: center;
  column-gap: 1.25rem; row-gap: 0.25rem;
  padding: 0.1875rem 0 0.25rem;
  border-top: 1px solid var(--rule-soft);
  margin-top: 0.1875rem; order: 4;
}
.nav-card {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-family: var(--f-typewr); font-size: 0.8125rem;
  letter-spacing: 0.1em; color: var(--paper);
  text-decoration: none; text-transform: uppercase;
  padding: 0.1875rem 0; white-space: nowrap;
  cursor: pointer; transition: color 140ms ease;
}
.nav-card:link, .nav-card:visited, .nav-card:active { color: var(--paper); }
.nav-card:hover { color: var(--gold); }

.dropdown-container { position: relative; display: inline-flex; align-items: center; }
.dropdown-links {
  display: none; position: absolute;
  top: calc(100% + 0.25rem); left: 50%; transform: translateX(-50%);
  flex-direction: column; min-width: 12rem; padding: 0.25rem 0;
  background: #000; border: 1px solid var(--rule-light); z-index: 220;
}
.dropdown-links.open { display: flex; }
.sub-nav-card {
  display: block; padding: 0.5rem 1rem;
  font-family: var(--f-typewr); font-size: 0.75rem;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--paper); text-decoration: none;
  white-space: nowrap; cursor: pointer;
  transition: color 140ms ease, background-color 140ms ease;
}
.sub-nav-card:hover { color: var(--nav-hover); background: rgba(255, 255, 204, 0.04); }

/* Hamburger — hidden at wide, shown ≤980px */
.hamburger {
  display: none; align-items: center; justify-content: center;
  width: 32px; height: 32px; background: transparent; border: 0;
  color: var(--paper); font-size: 1.5rem; line-height: 1;
  cursor: pointer; padding: 0; flex: 0 0 auto;
  margin-left: 0.5rem; transition: color 140ms ease; order: 3;
}
.hamburger:hover { color: var(--gold); }

/* ─── Search — icon-only at rest, expands on click ─── */
.search-wrap {
  margin-left: auto; flex: 0 0 auto;
  position: relative; order: 2;
}
.search-shell {
  display: inline-flex; align-items: center;
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--rule-soft);
  overflow: hidden;
  transition: width 280ms cubic-bezier(.2,.7,.2,1),
              background-color 200ms ease,
              border-color 200ms ease;
}
.search-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent; border: 0;
  color: var(--paper); cursor: pointer;
  flex-shrink: 0; padding: 0;
  transition: color 160ms ease;
}
.search-icon-btn:hover { color: var(--gold); }
.search-icon-btn svg { width: 14px; height: 14px; }
.search-input {
  flex: 1 1 auto; min-width: 0; height: 30px;
  background: transparent; border: 0; outline: 0;
  padding: 0 0.5rem 0 0.25rem;
  font-family: var(--f-typewr); font-size: 0.9375rem;
  letter-spacing: 0.03em;
  color: var(--paper); caret-color: var(--paper);
  opacity: 0; transition: opacity 220ms ease 80ms;
}
.search-input::placeholder {
  color: rgba(255, 255, 204, 0.65);
  font-style: italic; letter-spacing: 0; text-transform: none;
}
.search-clear {
  align-items: center; justify-content: center;
  width: 28px; height: 28px; flex-shrink: 0;
  background: transparent; border: 0;
  color: var(--paper); font-family: var(--f-typewr);
  font-size: 1.125rem; line-height: 1;
  cursor: pointer; margin-right: 0.125rem;
  transition: color 140ms ease;
}
.search-clear:hover { color: var(--gold); }

/* Search open state */
.search-wrap.open .search-shell {
  width: 50vw;
  background: rgba(255, 255, 204, 0.04);
  border-color: var(--rule-soft); cursor: text;
}
.search-wrap.open .search-input { opacity: 1; }
.search-wrap.open .search-clear { display: inline-flex; }
.search-wrap.open .search-icon-btn { cursor: default; }

/* Search results panel */
.search-results {
  position: absolute; top: calc(100% + 6px); right: 0;
  width: 50vw; max-width: calc(100vw - 24px);
  max-height: calc(100vh - 180px); overflow-y: auto;
  background: #000;
  border: 1px solid var(--rule-light);
  box-shadow: 0 18px 36px rgba(0,0,0,0.55);
  z-index: 240; display: none;
}
.search-results.show { display: block; }
.search-results__count {
  padding: 1rem 1.25rem 0.875rem;
  font-family: var(--f-typewr); font-size: 0.875rem;
  color: var(--paper); letter-spacing: 0.04em;
}
.search-results__count em { font-style: normal; color: var(--paper); font-weight: 700; }
.search-results__list { list-style: none; margin: 0; padding: 0 0 0.5rem; }
.search-results__list li {
  padding: 1rem 1.25rem 1.125rem;
  border-top: 1px solid var(--rule-soft);
}
.search-results__list li:hover { background: rgba(255, 255, 204, 0.04); }
.search-results__title {
  font-family: var(--f-typewr); font-size: 0.9375rem;
  font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--paper);
  margin: 0 0 0.375rem; line-height: 1.3;
}
.search-results__excerpt {
  font-family: var(--f-typewr); font-size: 0.875rem;
  color: var(--paper); margin: 0 0 0.5rem; line-height: 1.55;
}
.search-results__excerpt mark,
.search-results__title mark {
  background: rgba(255, 255, 204, 0.18);
  color: var(--paper); padding: 0 0.1875rem; border-radius: 2px;
}
.search-results__path {
  font-family: var(--f-typewr); font-size: 0.75rem;
  color: rgba(255, 255, 204, 0.75); margin: 0;
}
.search-results__foot {
  display: flex; justify-content: flex-end;
  padding: 0.875rem 1.25rem 1rem;
  border-top: 1px solid var(--rule-soft);
}
.search-results__foot a {
  font-family: var(--f-typewr); font-size: 0.75rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--paper); text-decoration: underline;
  text-decoration-color: rgba(255, 255, 204, 0.4);
  text-underline-offset: 3px;
}
.search-results__foot a:hover {
  color: var(--gold); text-decoration-color: var(--gold);
}

/* ─── Mobile ≤980px — hamburger + drawer ─── */
@media (max-width: 980px) {
  .nav-shell { padding-bottom: 0.5rem; }
  .nav-tabs {
    display: none; position: fixed;
    top: 49px; left: 0; right: 0;
    flex-direction: column; align-items: flex-end;
    justify-content: flex-start;
    column-gap: 0; row-gap: 0.375rem;
    margin-top: 0; padding: 0.5rem 0.625rem 0.625rem;
    border-top: 0; background: transparent;
    border-bottom: 0; box-shadow: none;
    z-index: 230; max-height: none; overflow: visible;
  }
  .nav-tabs.open { display: flex; }
  .nav-tabs .nav-card {
    position: relative; width: 220px;
    padding: 0.5rem 1rem; justify-content: center;
    text-align: center; font-size: 0.8125rem;
    letter-spacing: 0.14em;
    background: #000; border: 1px solid var(--paper);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
    transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
  }
  .nav-tabs .nav-card:hover,
  .nav-tabs .nav-card:focus-visible {
    background: #161109; color: var(--gold);
    border-color: var(--gold); outline: none;
  }
  .nav-tabs .nav-card:active { background: #261E0F; }
  .nav-tabs .dropdown-container {
    width: 220px; flex-direction: column; align-items: flex-end;
  }
  .nav-tabs .dropdown-container > .nav-card { width: 100%; }
  .nav-tabs .dropdown-links {
    position: static; transform: none;
    width: auto; min-width: 0; padding: 0.375rem 0 0;
    background: transparent; border: 0; align-items: stretch;
  }
  .nav-tabs .sub-nav-card {
    background: #000; border: 1px solid var(--rule-soft);
    padding: 0.4rem 1rem; margin-bottom: 0.25rem; text-align: center;
  }
  .nav-tabs .sub-nav-card:last-child { margin-bottom: 0; }
  .nav-tabs .sub-nav-card:hover {
    background: #161109; color: var(--nav-hover); border-color: var(--nav-hover);
  }
  .hamburger { display: inline-flex; }
  .search-wrap {
    position: absolute; top: 8px; right: 56px; margin: 0; z-index: 100;
  }
  .search-shell { width: 36px; height: 36px; min-width: 36px; }
  .search-icon-btn { width: 36px; height: 36px; }
  .search-icon-btn svg { width: 16px; height: 16px; }
  .search-wrap.open { right: 8px; }
  .search-wrap.open .search-shell {
    width: calc(100vw - 16px); height: 40px;
    background: #000; border-color: var(--rule-light);
  }
  .hamburger { margin-left: auto; }
}
@media (max-width: 720px) {
  .search-results { width: calc(100vw - 24px); }
  .search-input { font-size: 0.9375rem; }
  .search-results__list li { padding: 0.875rem 0.875rem 1rem; }
  .search-results__count,
  .search-results__foot { padding-left: 0.875rem; padding-right: 0.875rem; }
}

mark { background: rgba(255, 255, 204, 0.18); color: var(--paper); padding: 0 0.1875rem; border-radius: 2px; }

/* ============================================================
   FRAME
   ============================================================ */
.frame { max-width: 1200px; margin: 0 auto; padding: 2rem 2.5rem 4.5rem; }

/* hero banner */
.hero-banner {
  width: min(80vw, 1680px);
  aspect-ratio: 5307 / 2140;
  max-height: 320px;
  background-image: url('/assets/homepage-hero-desktop.webp');
  background-size: cover; background-position: center; background-repeat: no-repeat;
  background-color: #000;
  border-top: 3px solid #fff; border-bottom: 3px solid #fff;
  margin: 0 auto 1rem;
}

/* title block */
.titleblock {
  text-align: center;
  padding: 38px 28px 30px;
}
.titleblock__title {
  font-family: var(--f-typewr); font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  color: #fff; margin: 0; line-height: 1.05;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.titleblock__subtitle {
  font-family: var(--f-typewr); font-weight: 700;
  font-size: clamp(1rem, 1.5vw, 1.5rem);
  color: #fff; margin: 0.5rem 0 0; line-height: 1.12;
  letter-spacing: 0.02em;
}

/* page-toc */
.page-toc {
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 1.5rem; padding: 0.875rem 0 1rem;
  margin: 0 auto 1.5rem; max-width: 980px;
  font-family: var(--f-typewr); font-size: 0.75rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  border-bottom: 1px solid var(--rule-soft);
}
.page-toc a { color: var(--paper); text-decoration: none; cursor: pointer; }
.page-toc a:hover { color: var(--gold); }

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 1px; background: var(--rule-light);
  margin: 0 auto 2rem; max-width: 980px;
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
}
.stats-bar__item {
  background: #000; padding: 1.25rem 1.5rem 1.375rem;
  display: flex; flex-direction: column; gap: 0.375rem;
}
.stats-bar__label {
  font-family: var(--f-typewr); font-size: 0.875rem;
  letter-spacing: 0.03em; color: #fff; line-height: 1.4;
}
.stats-bar__number {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 1.875rem);
  color: var(--gold); line-height: 1; text-align: right;
}

/* ============================================================
   SECTION HEADING
   ============================================================ */
.section-heading {
  font-family: var(--f-typewr); font-weight: 700;
  font-size: 1.5rem;
  color: #fff;
  text-transform: uppercase; letter-spacing: 0.04em;
  line-height: 1.2;
  margin: 2.25rem auto 10px;
  max-width: 820px;
}
.section-heading em,
.section-heading__sub {
  display: block; font-style: italic; font-weight: 400;
  font-size: 0.55em; color: var(--gold);
  margin-top: 0.375rem; letter-spacing: 0.02em;
}

/* ============================================================
   READING CARD
   ============================================================ */
.layout { max-width: 820px; margin: 0 auto; }
.reading-card {
  /* No cream fill behind parchment — transparent pixels in parchment.png
     should reveal the black page background, not a #FFFFCC backdrop. */
  background: transparent url('/assets/parchment.png') center / cover no-repeat;
  color: #000000;
  padding: 10px 1.625rem 1.375rem;
  font-family: var(--f-body); font-size: 14px; line-height: 1.65;
  position: relative; border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.3), 0 2px 0 rgba(0,0,0,0.25);
  margin-bottom: 1.375rem;
}
.reading-card p { margin: 0 0 0.625rem; font-size: 14px; }
.reading-card p:last-child { margin-bottom: 0; }
.reading-card a { color: var(--red-dark); text-decoration: underline; text-underline-offset: 2px; }
.reading-card a:hover { color: var(--red-dark); }
.reading-card p { color: #000000; }
.card-label {
  display: inline-block; font-family: var(--f-mono);
  font-weight: 700; font-size: 0.875rem; line-height: 1;
  letter-spacing: 0.03em; color: var(--blue);
  background: #000; padding: 0.1875rem 0.75rem;
  margin: -20px 0 0.875rem -26px;
  border: 2px solid var(--blue);
}
.card-heading {
  display: block; font-family: var(--f-bookman);
  font-weight: 700; font-style: italic;
  font-size: 1.375rem;
  line-height: 1.2;
  text-decoration: underline;
  letter-spacing: 0.01em;
  color: var(--red-dark);
  margin: 0;
}
.card-subheading {
  font-family: var(--f-bookman);
  font-weight: 700; font-style: italic;
  font-size: 1.125rem;
  line-height: 1.2;
  text-decoration: underline;
  letter-spacing: 0.01em;
  color: #000033;
  margin: 0.375rem 0 0.875rem;
}

/* ── ReadingCard variants — same chassis pattern as bridge-tile variants ── */
/* PARCHMENT — aged paper texture for historical/background content */
.reading-card--parchment {
  background-image: url('/assets/tile-parchment-aged.png');
  background-color: transparent;
  color: #2a1b08;
}
.reading-card--parchment .card-heading {
  font-family: var(--f-typewr);
  font-style: normal;
  font-size: 1.125rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2a1b08;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid rgba(110,20,20,0.55);
  margin-bottom: 0.5rem;
}
.reading-card--parchment .card-subheading { color: #6e1414; }
.reading-card--parchment .card-label {
  color: #6e1414; border-color: #6e1414;
}
.reading-card--parchment p { color: #2a1b08; }

/* COURT — federal-filing chassis for contract/procurement/RFP content */
.reading-card--court {
  background-image: url('/assets/tile-court-bg.png');
  background-position: center 30%;
  background-color: #ece6d8;
  color: #1a1410;
}
.reading-card--court .card-heading {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 900; font-style: normal;
  font-size: 1.25rem;
  text-decoration: none; text-transform: uppercase;
  letter-spacing: 0.04em; color: #0d0d0d;
  line-height: 1.1;
  border-bottom: 2px solid #0d0d0d;
  padding-bottom: 0.375rem;
  margin-bottom: 0.5rem;
}
.reading-card--court .card-subheading { color: #1d3a8a; }
.reading-card--court .card-label {
  color: #1d3a8a; border-color: #1d3a8a;
}
.reading-card--court p { color: #1a1410; }

/* source-list */
.source-list {
  margin: 1rem 0 0; padding-top: 0.625rem;
  border-top: 1px solid var(--rule-paper);
  display: flex; flex-direction: column; gap: 0.5rem;
}
.source-list__heading {
  font-family: var(--f-bookman); font-size: 0.6875rem;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--red-dark); font-weight: 700; margin: 0;
}
.source-cite {
  display: block; text-align: left; background: transparent;
  border: 0; padding: 0 0 0 1rem; margin: 0;
  font-family: var(--f-body); font-size: 0.8125rem;
  line-height: 1.5; color: var(--red-dark); cursor: pointer;
  position: relative; text-decoration: none;
}
.source-cite::before {
  content: "\25B8"; position: absolute; left: 0; top: 1px;
  color: var(--red-dark); font-size: 0.6875rem; line-height: 1.5;
}
.source-cite:hover { color: var(--red-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   QUOTE STRIP
   ============================================================ */
.quote-strip {
  font-family: var(--f-typewr); color: #fff;
  font-size: 0.9375rem; line-height: 1.55;
  padding: 1.375rem 0.75rem 1.5rem 1.75rem;
  margin: 1.375rem 0; background: #000;
  border-top: 1px solid var(--rule-light);
  border-bottom: 1px solid var(--rule-light);
  position: relative;
}
.quote-strip::before {
  content: "\201C"; position: absolute; top: 6px; left: 10px;
  font-family: var(--f-display); color: var(--gold);
  font-size: 2.625rem; line-height: 1; opacity: 0.45;
}
.quote-strip__text { margin: 0 0 0.5rem; text-indent: 1.25rem; }
.quote-strip__attr {
  font-family: var(--f-body); font-style: italic;
  font-size: 0.75rem; color: #fff; text-align: right; margin: 0;
}
.quote-strip__attr::before { content: "— "; }

/* ============================================================
   BRIDGE GRID
   ============================================================ */
.bridge-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 0.875rem; margin: 0.5rem auto 2rem; max-width: 820px;
}
@media (max-width: 980px) {
  .bridge-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .bridge-grid { grid-template-columns: 1fr; }
}
.bridge-tile {
  display: flex; flex-direction: column;
  /* Default tile uses the same aged-parchment texture as the variant family.
     No #FFFFCC fill anywhere — transparent areas reveal the black page bg. */
  background-color: transparent;
  background-image: url('/assets/tile-parchment-aged.png');
  background-size: cover; background-position: center;
  color: var(--paper-ink);
  text-decoration: none; position: relative;
  border-radius: 2px;
  /* Unified drop shadow across every variant so all six tiles read at the
     same visual weight, not just the same bounding box. */
  box-shadow: 0 8px 22px rgba(0,0,0,0.55);
  transition: transform 0.15s, box-shadow 0.15s;
  /* Uniform sizing across every variant — grid columns are 1fr so widths
     match; min-height + shared padding lock height too. Per-variant padding
     overrides removed below to keep the chassis identical. */
  min-height: 200px; cursor: pointer;
  padding: 20px 10px 10px 20px;
}
.bridge-tile:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.65);
}
.bridge-tile .card-heading {
  font-family: var(--f-typewr);
  font-style: normal; font-weight: 700;
  font-size: 0.9375rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none;
  color: var(--red-dark);
  margin-bottom: 0.5rem;
}
.bridge-tile__summary {
  font-family: var(--f-body); font-size: 0.8125rem;
  line-height: 1.55; margin: 0; color: var(--paper-ink);
}
.bridge-tile__arrow {
  position: absolute; bottom: 10px; right: 14px;
  color: var(--red-dark); font-size: 1.25rem; font-family: var(--f-typewr);}

/* ── Parchment variant — for archive/evidence tiles ── */
.bridge-tile--parchment {
  /* Clear the inherited --paper fill so any transparency in the parchment
     texture reveals the black page background, not yellow. */
  background-color: transparent;
  background-image: url('/assets/tile-parchment-aged.png');
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #c9b483;
  color: #2a1b08;
  overflow: hidden;
  /* shadow + padding inherited from .bridge-tile */
}
.bridge-tile--parchment::after {
  /* N01-ES-35362 stamp removed per design feedback */
  content: none;
}
.bridge-tile--parchment::before {
  /* unused on homepage variant — diagonal stamp is now baked into the texture */
  content: none;
}
.bridge-tile--parchment:hover {
  /* hover lift inherited from .bridge-tile */
}
/* Override the red Bookman card-heading on parchment — needs typewriter dark */
.bridge-tile--parchment .card-heading {
  font-family: var(--f-typewr);
  font-style: normal; font-weight: 700;
  font-size: 0.9375rem;
  text-decoration: none; text-transform: uppercase;
  letter-spacing: 0.08em; color: #2a1b08;
  margin: 0 0 0.5rem;
  padding-bottom: 0.375rem;
  border-bottom: 1px solid rgba(110,20,20,0.55);
}
.bridge-tile--parchment .bridge-tile__summary {
  font-family: 'Palatino Linotype','Book Antiqua',serif;
  font-style: normal; color: #2a1b08;
  max-width: 85%;
}
.bridge-tile--parchment .bridge-tile__arrow {
  /* Anchor bottom-right to match the base tile — no left/right flip */
  color: #6e1414;
}

/* ── Court records variant — federal-filing chassis ── */
.bridge-tile--court {
  background-image: url('/assets/tile-court-bg.png');
  background-size: cover; background-position: center 30%;
  background-color: #ece6d8;
  color: #1a1410;
  overflow: hidden;
  /* shadow + padding inherited from .bridge-tile */
}
.bridge-tile--court:hover { /* inherited */ }
.bridge-tile--court .bridge-tile__docket {
  position: absolute; top: 14px; right: 18px;
  font-family: var(--f-typewr);
  font-size: 10px; line-height: 1.4;
  color: #1d3a8a; text-align: right;
  letter-spacing: 0.01em; margin: 0;
}
.bridge-tile--court .bridge-tile__docket b { font-weight: 700; }
.bridge-tile--court .card-heading {
  font-family: 'Helvetica Neue', Arial, sans-serif;
  font-weight: 900; font-size: 1.25rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: #0d0d0d; margin: 0 0 4px;
  line-height: 1; max-width: 70%;
  font-style: normal; text-decoration: none;
}
.bridge-tile--court .bridge-tile__rule {
  height: 2px; background: #0d0d0d;
  margin: 0 0 12px; max-width: 80%;
}
.bridge-tile--court .bridge-tile__summary {
  font-family: var(--f-typewr);
  font-size: 0.75rem; line-height: 1.55;
  color: #1a1410; max-width: 70%;
}
.bridge-tile--court .bridge-tile__arrow { color: #8a1a1a; }

/* ── Archive variant — sepia w/ underline + filebox stamp ── */
.bridge-tile--archive {
  background-image: url('/assets/tile-parchment-aged.png');
  background-size: cover; background-position: center;
  /* Was #c9b483 — kept transparent so no warm-fill bleeds past the
     parchment texture; the texture itself is fully opaque. */
  background-color: transparent;
  color: #2a1b08;
  overflow: hidden;
  /* shadow + padding inherited from .bridge-tile */
}
.bridge-tile--archive:hover { /* inherited */ }
.bridge-tile--archive::after {
  /* N01-ES-35362 stamp removed per design feedback */
  content: none;
}
.bridge-tile--archive .card-heading {
  font-family: var(--f-typewr);
  font-weight: 700; font-size: 1.375rem;
  letter-spacing: 0.02em; color: #1a1410;
  margin: 6px 0 4px; line-height: 1.05;
  font-style: normal; text-decoration: none; text-transform: none;
  padding-bottom: 0; border-bottom: 0;
}
.bridge-tile--archive .bridge-tile__underline {
  height: 1px; background: rgba(110,20,20,0.55);
  margin: 0 0 14px; max-width: 78%;
}
.bridge-tile--archive .bridge-tile__summary {
  font-family: var(--f-typewr);
  font-size: 0.65rem; line-height: 1.7;
  color: #6e1414; letter-spacing: 0.16em;
  text-transform: uppercase;
  border-top: 1px solid rgba(110,20,20,0.45);
  border-bottom: 1px solid rgba(110,20,20,0.45);
  padding: 4px 0; max-width: 60%;
  font-style: normal;
}
.bridge-tile--archive .bridge-tile__filebox {
  /* Moved to top-right — arrow now occupies the bottom-right corner */
  position: absolute;
  top: 12px; right: 14px;
  bottom: auto; left: auto;
  transform: rotate(-4deg);
  font-family: var(--f-typewr);
  font-size: 8.5px; line-height: 1.6;
  color: rgba(110,20,20,0.85);
  letter-spacing: 0.12em; text-transform: uppercase;
  border: 1px solid rgba(110,20,20,0.65);
  padding: 4px 10px; opacity: 0.85;
  text-align: left; pointer-events: none;
}
.bridge-tile--archive .bridge-tile__arrow {
  /* Anchor bottom-right to match the base tile */
  color: #6e1414;
}

/* ── Carbon variant — onionskin / CC duplicate, purple ink ── */
.bridge-tile--carbon {
  background-color: #e8e3d2;
  background-image:
    repeating-linear-gradient(0deg,
      rgba(0,0,0,0) 0,
      rgba(0,0,0,0) 18px,
      rgba(40,30,60,0.025) 18px,
      rgba(40,30,60,0.025) 19px),
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.4), transparent 60%),
    url('/assets/tile-court-bg.png');
  background-size: auto, auto, cover;
  background-blend-mode: multiply, screen, normal;
  color: #2a1f4a;
  overflow: hidden;
  /* shadow + padding inherited from .bridge-tile; drop the extra 1px
     border so the carbon tile reads the same edge as its siblings. */
}
.bridge-tile--carbon:hover { /* inherited */ }
.bridge-tile--carbon .bridge-tile__cc-mark {
  position: absolute; top: 12px; right: 16px;
  font-family: var(--f-typewr);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.4em; color: #4a3a7a;
  border: 1px solid #4a3a7a;
  padding: 2px 6px; opacity: 0.7;
}
.bridge-tile--carbon .card-heading {
  font-family: var(--f-typewr);
  font-weight: 700; font-size: 0.9375rem;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: #2a1f4a; margin: 0 0 8px;
  line-height: 1.2; max-width: 78%;
  font-style: normal; text-decoration: none;
  text-shadow: 0.5px 0 0 rgba(74,58,122,0.4);
  padding-bottom: 0; border-bottom: 0;
}
.bridge-tile--carbon .bridge-tile__summary {
  font-family: var(--f-typewr);
  font-size: 0.75rem; line-height: 1.55;
  color: #2a1f4a; max-width: 78%;
  text-shadow: 0.5px 0 0 rgba(74,58,122,0.3);
  opacity: 0.88; font-style: normal;
}
.bridge-tile--carbon::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 85% 90%, rgba(74,58,122,0.18), transparent 40%);
  pointer-events: none; mix-blend-mode: multiply;
}
.bridge-tile--carbon .bridge-tile__arrow { color: #4a3a7a; }

/* ============================================================
   PULL QUOTE
   ============================================================ */
.pull-quote {
  font-family: var(--f-typewr); font-style: normal;
  font-weight: 400;
  font-size: 0.9375rem; color: #fff;
  letter-spacing: 0.01em;
  margin: 1.5rem auto; max-width: 820px;
  padding: 0.625rem 1.5rem;
  border-left: 3px solid var(--red-dark); line-height: 1.55;
}
.pull-quote__text { margin: 0 0 0.5rem; }
.pull-quote__attr {
  display: block; font-family: var(--f-body);
  font-size: 0.78125rem; font-style: italic;
  font-weight: 400; text-decoration: none;
  text-transform: none; letter-spacing: 0;
  /* Attribution stays white — no cream/gold tint. */
  color: #fff; margin-top: 0.5rem;
}

/* ============================================================
   DOC CARD + DOC ICON — cream citation tab w/ thin maroon border
   ============================================================ */
.doc-icon-row { display: flex; gap: 0.65rem; margin: 1.15rem 0 1rem; flex-wrap: wrap; }
.doc-icon {
  display: inline-flex; align-items: center;
  padding: 0.48rem 0.72rem;
  background: #fff7c9; color: #7f1717;
  border: 1px solid #8a1d1d;
  font-family: 'Modern Typewriter','Courier New',monospace;
  font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.22);
  transition: background 0.15s, color 0.15s, transform 0.15s;
  flex-shrink: 0;
}
.doc-icon::before {
  content: '§';
  color: #8a1d1d;
  margin-right: 0.35rem;
}
.doc-icon:hover {
  background: #f3e8ad;
  color: #5f1111;
  transform: translateY(-1px);
}
.doc-icon__caption {
  white-space: nowrap;
  line-height: 1;
}

/* ============================================================
   DOC LEAF — parchment-leaf doc-card (system default)
   ============================================================ */
.doc-leaf {
  display: block; width: 100%; max-width: 280px;
  background-image: url('/assets/parchment.png');
  background-size: cover; background-position: center;
  background-color: #d9c79a; color: #2a1b08;
  padding: 18px 18px 16px;
  aspect-ratio: 1.4 / 1;
  box-shadow: 0 4px 14px rgba(0,0,0,0.55), inset 0 0 36px rgba(94,55,16,0.25);
  border: 0; text-align: left;
  position: relative; overflow: hidden;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.doc-leaf:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.65), inset 0 0 36px rgba(94,55,16,0.25);
}
.doc-leaf__crest {
  font-family: var(--f-typewr);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: #2a1b08;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(110,20,20,0.45);
}
.doc-leaf__title {
  font-family: var(--f-typewr);
  font-weight: 700; font-size: 17px;
  letter-spacing: 0.04em; text-transform: uppercase;
  color: #2a1b08;
  margin: 12px 0 6px;
  line-height: 1.1;
}
.doc-leaf__excerpt {
  font-family: 'Book Antiqua','Palatino Linotype',serif;
  font-style: italic; font-size: 12px;
  color: #2a1b08; line-height: 1.45;
  margin: 0;
}
.doc-leaf__date {
  position: absolute; bottom: 8px; right: 16px;
  font-family: var(--f-typewr);
  font-size: 9.5px; font-weight: 700;
  letter-spacing: 0.14em; color: #6e1414;
}

/* ============================================================
   REFERENCE LIST
   ============================================================ */
.refs-block { max-width: 820px; margin: 0 auto; }
.refs-filter-bar {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-bottom: 0.75rem;
}
.refs-pill {
  background: transparent; border: 1px solid rgba(255,255,255,0.22);
  color: rgba(255,255,255,0.65);
  font-family: var(--f-typewr); font-size: 11px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 5px 12px; border-radius: 0; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.refs-pill:hover { border-color: rgba(255,255,255,0.55); color: #fff; }
.refs-pill.active {
  background: var(--red-bright);
  border-color: var(--red-bright); color: #fff;
}
.refs-search {
  width: 100%; background: #fff; border: 1px solid #333;
  padding: 9px 13px; font-family: Arial,sans-serif;
  font-size: 14px; color: #000; outline: none;
  border-radius: 0; margin-bottom: 0.5rem;
}
.refs-search:focus { border-color: var(--blue); }
.refs-year-heading {
  font-family: var(--f-typewr); font-size: 1.475rem;
  font-weight: 700; color: #f5f0d8;
  letter-spacing: 0.04em;
  margin: 0;
  padding-bottom: 0;
}
.refs-year-heading:first-child { margin-top: 0; }
.refs-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.ref-item {
  position: relative;
  background: #f8f5e8;
  border: 1px solid #c8bea0;
  border-left: 4px solid #7a1717;
  padding: 5px 10px 10px;
  margin-bottom: 0.65rem;
  color: #111;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.35);
  font-family: 'Book Antiqua', 'Palatino Linotype', Georgia, serif;
}
.ref-item:last-child { margin-bottom: 0; }
.ref-tag-row { margin-bottom: 0.55rem; display: flex; flex-wrap: wrap; gap: 4px; }
.ref-tag {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border: 1px solid #8a1d1d;
  background: #efe5bf;
  color: #681414;
  font-family: 'Modern Typewriter','Courier New',monospace;
  font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  border-radius: 0;
  margin-right: 0;
}
/* Category-specific tints (kept subtle — the maroon border + cream do the work) */
.tag-trial-design    { background: #e4e8ef; color: #1c3a66; border-color: #1c3a66; }
.tag-cognition       { background: #e2ebdf; color: #2a4a32; border-color: #2a4a32; }
.tag-iron-status     { background: #ece1ec; color: #553763; border-color: #553763; }
.tag-policy          { background: #eee1ed; color: #5d2666; border-color: #5d2666; }
.tag-pharmacology    { background: #efe5bf; color: #681414; border-color: #8a1d1d; }
.tag-ethics          { background: #f0dcd9; color: #7a1717; border-color: #7a1717; }
.ref-authors {
  display: block;
  font-family: 'Book Antiqua', 'Palatino Linotype', Georgia, serif;
  font-size: 13px; font-weight: 700;
  color: #111; margin-bottom: 0.35rem;
}
.ref-link {
  display: block;
  font-family: 'Book Antiqua', 'Palatino Linotype', Georgia, serif;
  font-size: 14px; color: #003f7d;
  text-decoration: underline; text-underline-offset: 2px;
  margin-bottom: 0.35rem; line-height: 1.4;
  cursor: pointer;
}
.ref-link:hover { color: #7a1717; }
.ref-journal { font-family: 'Book Antiqua', 'Palatino Linotype', Georgia, serif; font-style: italic; font-size: 14px; color: #111; }
.ref-ids { font-family: 'Book Antiqua', 'Palatino Linotype', Georgia, serif; font-size: 14px; color: #444; letter-spacing: 0.02em; }
.ref-cite-btn {
  position: absolute; top: 0.65rem; right: 0.65rem;
  display: inline-flex; align-items: center; gap: 4px;
  font-family: 'Book Antiqua', 'Palatino Linotype', Georgia, serif;
  font-size: 0.7rem; font-weight: 500;
  padding: 0.2rem 0.45rem;
  border-radius: 0; border: 1px solid #bbb;
  background: #f4f1e7; color: #333;
  cursor: pointer; opacity: 0.75;
  transition: opacity 0.15s, background 0.15s, border-color 0.15s;
}
.ref-cite-btn:hover { opacity: 1; background: #ebe3c9; border-color: #999; color: #111; }
.ref-cite-btn.copied { opacity: 1; border-color: #2d6a4f; color: #2d6a4f; background: #e7ede5; }
.ref-cite-btn svg { width: 10px; height: 10px; }

/* ============================================================
   TIMELINE — court-exhibit chronology, not "SaaS timeline"
   ============================================================ */
.tl { position: relative; max-width: 820px; margin: 0 auto; padding: 0 24px 60px; }
.tl::before {
  content: ''; position: absolute; left: 50%; top: 0; bottom: 0;
  width: 1px;
  background: rgba(230, 220, 185, 0.35);
  transform: translateX(-50%);
}
.tl-event { position: relative; display: flex; align-items: flex-start; margin-bottom: 28px; }
.tl-event.right { flex-direction: row-reverse; }
.tl-card-wrap { width: calc(50% - 44px); flex-shrink: 0; }
.tl-spacer { width: calc(50% - 44px); flex-shrink: 0; }
.tl-dot-col { width: 88px; flex-shrink: 0; display: flex; align-items: flex-start; justify-content: center; padding-top: 20px; }
.tl-dot {
  width: 7px; height: 7px;
  border-radius: 0;
  background: #f6f1df;
  border: 1px solid rgba(255,255,255,0.8);
  outline: 1px solid rgba(0,0,0,0.8);
  box-shadow: none;
}
.tl-dot.policy        { --event-color: #2a3a52; }
.tl-dot.trial         { --event-color: #3d6e6c; }
.tl-dot.publication   { --event-color: #4f4262; }
.tl-dot.contamination { --event-color: #6e1e1c; }
.tl-dot.litigation    { --event-color: #8a5a24; }

.tl-card {
  max-width: 520px;
  background: #f6f1df;
  border: 1px solid #b8ad8f;
  border-left: 5px solid var(--event-color, #7a1717);
  box-shadow: 4px 4px 0 rgba(0,0,0,0.55);
  padding: 1rem 1.15rem;
  position: relative;
  color: #111;
}
.tl-card::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.25), rgba(0,0,0,0.03)),
    radial-gradient(circle at 20% 30%, rgba(0,0,0,0.05), transparent 35%);
  opacity: 0.35;
}
.tl-card.policy        { --event-color: #2a3a52; }
.tl-card.trial         { --event-color: #3d6e6c; }
.tl-card.publication   { --event-color: #4f4262; }
.tl-card.contamination { --event-color: #6e1e1c; }
.tl-card.litigation    { --event-color: #8a5a24; }
.tl-card::before { content: none; }

.tl-date {
  display: block;
  font-family: 'Modern Typewriter','Courier New',monospace;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0 0 6px;
}
.tl-date.policy        { color: #2a3a52; }
.tl-date.trial         { color: #2f5a58; }
.tl-date.publication   { color: #4f4262; }
.tl-date.contamination { color: #6e1e1c; }
.tl-date.litigation    { color: #7a4f20; }
.tl-title {
  display: block;
  font-family: Georgia, 'Palatino Linotype', serif;
  font-size: 0.95rem; line-height: 1.45;
  color: #171717;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: #000; color: #ccc;
  padding: 32px 20px; margin-top: 40px;
  font-size: 13px; line-height: 1.6;
}
.footer-inner {
  max-width: 820px; margin: 0 auto;
  display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between;
}
.footer-col { flex: 1 1 200px; min-width: 180px; }
.footer-col h3 {
  font-family: var(--f-typewr); color: #fff;
  font-size: 14px; text-transform: uppercase;
  margin: 0 0 10px; letter-spacing: 0.04em;
}
.footer-col a { color: var(--blue-soft); text-decoration: none; cursor: pointer; }
.footer-col a:hover { text-decoration: underline; color: #fff; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col ul li { margin-bottom: 6px; }
.footer-bottom {
  max-width: 820px; margin: 20px auto 0;
  padding-top: 16px; border-top: 1px solid #333;
  text-align: center; color: #888; font-size: 12px;
}

/* back-to-top */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px;
  width: 42px; height: 42px;
  background: #bfbaba; color: #130e0e;
  border: solid 4px var(--red-bright);
  border-radius: 50%; font-size: 22px;
  cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  font-family: Arial, 'Helvetica Neue', sans-serif; font-weight: 700; line-height: 1;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; }
.back-to-top:hover { background: #000; color: #fff; }

/* toast */
.cite-toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: #fff; border: 1px solid #2d6a4f;
  color: #2d6a4f; font-size: 0.8rem;
  font-family: Arial,sans-serif; padding: 8px 18px;
  border-radius: 3px; opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 9999; pointer-events: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.cite-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============================================================
   TOC RAIL — sticky-sidebar long-form navigation
   ============================================================ */
.toc-rail {
  position: sticky; top: 16px; align-self: start;
  font-family: "Palatino Linotype", "Book Antiqua", serif;
  font-size: 0.8125rem; letter-spacing: 0.03em; line-height: 1.45;
  max-height: calc(100vh - 32px); overflow-y: auto; padding-right: 0.5rem;
}
.toc-rail__title {
  text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--paper); font-size: 0.75rem; font-weight: 700;
  margin: 0 0 0.75rem; padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--rule);
}
.toc-rail ol { list-style: none; padding: 0; margin: 0; counter-reset: toc-section; }
.toc-rail > ol > li { counter-increment: toc-section; }
.toc-rail > ol > li > a::before {
  content: counter(toc-section, upper-roman) ".";
  display: inline-block; width: 28px;
  color: #8c1918; font-weight: 700;
}
.toc-rail ol ol { margin: 0.25rem 0 0.625rem 1.75rem; font-size: 0.75rem; letter-spacing: 0.02em; text-transform: none; }
.toc-rail li { margin: 0; padding: 0; }
.toc-rail > ol > li + li { margin-top: 0.5rem; }
.toc-rail ol ol li + li { margin-top: 0.125rem; }
.toc-rail a {
  display: block; color: var(--paper); text-decoration: none;
  padding: 0.1875rem 0; text-transform: uppercase;
  transition: color 0.15s;
  border-left: 2px solid transparent; padding-left: 0.5rem; margin-left: -10px;
}
.toc-rail ol ol a { text-transform: none; color: rgba(245,237,228,0.75); }
.toc-rail a:hover { color: var(--gold); }
.toc-rail a.is-current { color: var(--gold); border-left-color: var(--gold); }
.toc-rail__toggle {
  display: none; width: 100%; text-align: left;
  background: #000; border: 1px solid var(--rule); color: #fff;
  font-family: var(--f-typewr); font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 0.75rem 1rem; cursor: pointer;
}
.toc-rail__toggle::after { content: "▾"; float: right; transition: transform 0.2s; }
.toc-rail.is-open .toc-rail__toggle::after { transform: rotate(180deg); }
@media (max-width: 980px) {
  .toc-rail {
    position: sticky; top: 0; max-height: none; margin: 0 0 1.25rem; padding: 0;
    background: #000; z-index: 50; border-bottom: 1px solid var(--rule);
  }
  .toc-rail__toggle { display: block; }
  .toc-rail__title { display: none; }
  .toc-rail > ol {
    display: none; padding: 0.75rem 1rem 1rem; background: #000;
    border-bottom: 1px solid var(--rule); max-height: 60vh; overflow-y: auto;
  }
  .toc-rail.is-open > ol { display: block; }
}

/* ============================================================
   PDF POPUP — singleton draggable modal opened by [data-pdf]
   ============================================================ */
.pdf-popup {
  position: fixed; top: 80px; right: 24px;
  width: 520px; height: 72vh;
  min-width: 320px; min-height: 300px;
  max-width: calc(100vw - 48px); max-height: calc(100vh - 100px);
  background: var(--red); padding: 3px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.65), 0 0 0 1px rgba(0,0,0,0.5);
  display: none; flex-direction: column;
  resize: both; overflow: auto;
  z-index: 200; opacity: 0;
  transform: translateY(8px) scale(0.985);
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.pdf-popup.is-open { display: flex; opacity: 1; transform: translateY(0) scale(1); }

body.pdf-popup-locked { overflow: hidden; padding-right: var(--scrollbar-width, 0px); }
.pdf-popup, .pdf-popup__frame-wrap { overscroll-behavior: contain; }

.pdf-popup__header {
  flex: 0 0 auto; display: flex; align-items: stretch;
  justify-content: space-between; padding: 0;
  cursor: grab; user-select: none;
}
.pdf-popup__header:active { cursor: grabbing; }
.pdf-popup__title {
  flex: 1 1 auto;
  font-family: var(--f-bookman); font-weight: 700;
  font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--paper); padding: 0.75rem 0.875rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.pdf-popup__title svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.85; }
.pdf-popup__actions { display: flex; gap: 0; }
.pdf-popup__btn {
  background: transparent; border: 0;
  border-left: 1px solid rgba(0,0,0,0.25);
  color: var(--paper);
  font-family: var(--f-typewr); font-size: 0.6875rem; letter-spacing: 0.1em;
  padding: 0 0.875rem; cursor: pointer;
  transition: background 0.15s;
  text-decoration: none; display: inline-flex; align-items: center;
}
.pdf-popup__btn:hover { background: var(--red-dark); }
.pdf-popup__btn--close { font-size: 1rem; padding: 0 1rem; }
.pdf-popup__frame-wrap {
  flex: 1 1 auto; background: var(--paper);
  position: relative; overflow: hidden; min-height: 0;
}
.pdf-popup__frame { width: 100%; height: 100%; border: 0; display: block; background: var(--paper); }
.pdf-popup__loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 0.875rem; background: var(--paper); color: var(--red);
  font-family: var(--f-typewr); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase;
  pointer-events: none; transition: opacity 0.25s;
}
.pdf-popup__loading.is-hidden { opacity: 0; }
.pdf-popup__spinner {
  width: 32px; height: 32px;
  border: 3px solid rgba(140,25,24,0.18); border-top-color: var(--red);
  border-radius: 50%; animation: pdf-popup-spin 0.8s linear infinite;
}
@keyframes pdf-popup-spin { to { transform: rotate(360deg); } }
.pdf-popup__footer {
  flex: 0 0 auto; background: var(--red-dark); color: var(--paper);
  font-family: var(--f-typewr); font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase;
  text-align: center; padding: 0.4375rem 0.625rem 0.5625rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 720px) {
  .pdf-popup {
    top: 60px; right: 12px; left: 12px;
    width: auto; height: 78vh; resize: vertical;
  }
}

/* Catalog list shells — parchment backdrop on dark page bg.
   Lifts row-list pages (evidence, congress, nih-records,
   court/pacer, forms, acclpp, tlc-website-archived) out of the
   starfield so meta text reads at sufficient contrast. Matches
   the cream card that `.ref-item` already uses for the homepage
   / references / uploads citation lists. Applies to the
   actual list container; layout wrappers like `.records-shell`,
   `.nih-shell`, `.congress-shell` (just `max-width`) keep their
   transparent shell role and don't get a backdrop. */
.record-list,
.doc-list,
.summary-block,
.reference-list {
  background: #f8f5e8;
  border: 1px solid #c8bea0;
  border-left: 4px solid #7a1717;
  box-shadow: 3px 3px 0 rgba(0,0,0,0.35);
  color: #1a1410;
  padding: 12px 18px;
  margin: 0 0 1.25rem;
}
.record-list h2, .record-list h3,
.summary-block h1, .summary-block h2, .summary-block h3,
.reference-list h2, .reference-list h3 { color: #1a1410; }

.record-list .record-title,
.summary-block .record-title,
.reference-list .archive-item > a:first-child,
.reference-list .resource-item > a:first-child {
  color: #003f7d;
}
.record-list .record-title:visited,
.summary-block .record-title:visited,
.reference-list .archive-item > a:first-child:visited,
.reference-list .resource-item > a:first-child:visited { color: #003f7d; }
.record-list .record-title:hover,
.summary-block .record-title:hover,
.reference-list .archive-item > a:first-child:hover,
.reference-list .resource-item > a:first-child:hover { color: var(--red-dark); }

.record-list .record-meta,
.summary-block .record-meta,
.reference-list .archive-meta,
.reference-list .resource-meta { color: #4a3220; }

.summary-block a,
.summary-block li a,
.reference-list a {
  color: #003f7d;
}
.summary-block a:visited,
.reference-list a:visited { color: #003f7d; }
.summary-block a:hover,
.reference-list a:hover { color: var(--red-dark); }

.record-list .record-item + .record-item,
.summary-block .record-item + .record-item,
.reference-list .archive-item + .archive-item,
.reference-list .resource-item + .resource-item {
  border-top-color: rgba(0,0,0,0.18);
}
