/* ─────────────────────────────────────────────
   THIS DAY IN CONSPIRACIES — DOSSIER REDESIGN v2
   Aged vellum · iron-gall ink · oxblood stamp · cork board.
   See data/spec at C:/Users/15627/Documents/MyProject/thisdayinconspiracies/redesign.html
   for the today-page reference and connect-redesign.html for the
   evidence-wall reference.
   ───────────────────────────────────────────── */

:root {
  --paper:       #ede3cc;
  --paper-deep:  #e3d6b8;
  --paper-dark:  #c9b78f;
  --cork:        #8d6a3a;
  --cork-deep:   #5c4423;
  --ink:         #1b1713;
  --ink-soft:    #4a3f32;
  --ink-fade:    #7a6a54;
  --stamp:       #a1291f;
  --stamp-wet:   #7a1e18;
  --string:      #b02a20;
  --string-dark: #741c15;
  --redact:      #0b0a08;
  --marker:      #e8bc3a;
  --thread:      #8a6b3c;
  --rule:        rgba(27,23,19,0.22);

  /* Backwards-compat aliases for any legacy class still referenced */
  --bg:          #ede3cc;
  --bg-paper:    #e3d6b8;
  --accent:      #a1291f;
  --accent-soft: #7a1e18;
  --gold:        #8a6b3c;
  --border:      rgba(27,23,19,0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

body {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 18px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -10%, rgba(180,140,70,0.18), transparent 60%),
    radial-gradient(ellipse 80% 60% at 110% 110%, rgba(90,60,30,0.14), transparent 55%),
    radial-gradient(ellipse 60% 40% at -10% 50%, rgba(120,80,40,0.10), transparent 50%);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ── Paper grain — present on every page ── */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.08  0 0 0 0 0.05  0 0 0 0.35 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.55;
  mix-blend-mode: multiply;
}

/* ── Faint legal-pad rule lines ── */
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 99;
  background-image: repeating-linear-gradient(to bottom,
    transparent 0, transparent 31px,
    rgba(120,90,50,0.06) 31px, rgba(120,90,50,0.06) 32px);
  mix-blend-mode: multiply;
}

a { color: inherit; }

/* ── Perforation strips (top + bottom) ── */
.perforation {
  height: 14px;
  background-image: radial-gradient(circle at 8px 7px, var(--paper) 4px, transparent 4.5px);
  background-size: 16px 14px;
  border-bottom: 1px dashed rgba(27,23,19,0.35);
}
.perforation.bottom { border-bottom: none; border-top: 1px dashed rgba(27,23,19,0.35); }

/* ── Top tape bar with nav ── */
.tape-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 48px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--rule);
  position: relative;
  flex-wrap: wrap;
  gap: 12px;
}
.tape-bar .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--stamp);
  display: inline-block;
  margin-right: 10px;
  vertical-align: middle;
  box-shadow: 0 0 0 3px rgba(161,41,31,0.18);
}
.tape-bar nav a {
  margin-left: 28px;
  text-decoration: none;
  position: relative;
}
.tape-bar nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px; height: 1px;
  background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform .3s;
}
.tape-bar nav a:hover::after { transform: scaleX(1); }

/* ── Masthead ── */
.masthead {
  padding: 72px 48px 32px;
  position: relative;
  max-width: 1480px;
  margin: 0 auto;
}
.masthead-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin-bottom: 24px;
  gap: 24px;
  flex-wrap: wrap;
}
.masthead-top .mid { text-align: center; flex: 1; }
.masthead-top .mid strong {
  color: var(--ink);
  display: block;
  font-size: 13px;
  letter-spacing: 0.3em;
}

h1.title {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  font-weight: 300;
  font-size: clamp(54px, 9.8vw, 156px);
  line-height: 0.86;
  letter-spacing: -0.035em;
  color: var(--ink);
  margin: 0;
  max-width: 14ch;
}
h1.title em {
  font-style: italic;
  font-weight: 400;
  color: var(--stamp);
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
}

.tagline {
  margin-top: 24px;
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 20px;
  color: var(--ink-soft);
  max-width: 640px;
  border-left: 2px solid var(--stamp);
  padding-left: 18px;
}

/* ── DECLASSIFIED stamp ── */
.stamp {
  position: absolute;
  top: 130px;
  right: 60px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--stamp);
  border: 4px double var(--stamp);
  padding: 12px 22px 10px;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 32px;
  transform: rotate(-7deg);
  opacity: 0.88;
  box-shadow: inset 0 0 0 1px rgba(161,41,31,0.4);
  mix-blend-mode: multiply;
  user-select: none;
}
.stamp::before {
  content: "";
  position: absolute; inset: -4px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='60'><filter id='n'><feTurbulence baseFrequency='0.6' numOctaves='3'/><feColorMatrix values='0 0 0 0 1  0 0 0 0 1  0 0 0 0 1  0 0 0 -0.8 0.9'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: screen;
  pointer-events: none;
}
.stamp small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.3em;
  font-weight: 400;
  margin-top: 4px;
  text-align: center;
}
@media (prefers-reduced-motion: no-preference) {
  .stamp { animation: stampIn 1.1s cubic-bezier(.2,.8,.2,1) 0.3s both; }
  @keyframes stampIn {
    0% { opacity: 0; transform: rotate(-18deg) scale(1.6); }
    60% { opacity: 1; transform: rotate(-4deg) scale(0.94); }
    100% { opacity: 0.88; transform: rotate(-7deg) scale(1); }
  }
}

/* ── Pulse indicator (used in tape-bar dot, file-banner LIVE, query-bar status) ── */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(161,41,31,0.7); }
  70% { box-shadow: 0 0 0 14px rgba(161,41,31,0); }
  100% { box-shadow: 0 0 0 0 rgba(161,41,31,0); }
}
.pulse {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--stamp);
  box-shadow: 0 0 0 0 rgba(161,41,31,0.7);
  display: inline-block;
}
@media (prefers-reduced-motion: no-preference) {
  .pulse { animation: pulse 2s infinite; }
}

/* ─────────────────────────────────────────────
   TODAY PAGE
   ───────────────────────────────────────────── */

.file-banner {
  margin: 32px auto 0;
  max-width: 1480px;
  padding: 22px 32px;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-left: 6px solid var(--stamp);
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 48px;
  align-items: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.file-banner .big-date {
  font-family: 'Fraunces', serif;
  font-size: 52px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 400;
  text-transform: none;
  color: var(--ink);
}
.file-banner .big-date .slash { color: var(--stamp); font-style: italic; }
.file-banner .meta-row { display: flex; flex-direction: column; gap: 4px; color: var(--ink-fade); }
.file-banner .meta-row strong { color: var(--ink); font-weight: 500; letter-spacing: 0.1em; }

main.today-main {
  max-width: 1480px;
  margin: 0 auto;
  padding: 72px 48px 120px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 72px;
}

section.today-section { min-width: 0; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 48px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
  gap: 16px;
}
.section-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 42px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.section-head h2 em { font-style: italic; color: var(--stamp); }
.section-head .count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-fade);
}

/* ── File card ── */
.file-card {
  position: relative;
  padding: 36px 40px 40px;
  margin-bottom: 40px;
  background: linear-gradient(180deg, rgba(255,248,228,0.4), rgba(255,248,228,0.1));
  border: 1px solid var(--rule);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 18px 30px -22px rgba(50,30,10,0.35),
    0 2px 0 rgba(100,70,30,0.1);
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
@media (prefers-reduced-motion: no-preference) {
  .file-card {
    opacity: 0;
    animation: revealFile 0.9s cubic-bezier(.2,.8,.2,1) forwards;
  }
  .file-card:nth-of-type(1) { animation-delay: 0.10s; }
  .file-card:nth-of-type(2) { animation-delay: 0.25s; }
  .file-card:nth-of-type(3) { animation-delay: 0.40s; }
  .file-card:nth-of-type(4) { animation-delay: 0.55s; }
  .file-card:nth-of-type(n+5) { animation-delay: 0.70s; }
  @keyframes revealFile {
    from { opacity: 0; transform: translateY(24px) rotate(-0.3deg); }
    to { opacity: 1; transform: translateY(0) rotate(0); }
  }
}

.file-card.featured {
  padding: 48px 56px 52px;
  background-image:
    linear-gradient(180deg, rgba(255,248,228,0.55), rgba(255,248,228,0.12)),
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(161,41,31,0.06), transparent 60%);
  border-top: 3px solid var(--ink);
}
.file-card.featured::after {
  content: "PRIMARY FILE";
  position: absolute;
  top: -11px; left: 48px;
  background: var(--ink);
  color: var(--paper);
  padding: 4px 12px 3px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  font-weight: 700;
}

.file-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-fade);
  padding-bottom: 14px;
  margin-bottom: 24px;
  border-bottom: 1px dashed var(--rule);
  gap: 12px;
  flex-wrap: wrap;
}
.file-strip .case-no { color: var(--ink); font-weight: 500; }
.file-strip .category {
  padding: 3px 9px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  letter-spacing: 0.28em;
}
.file-strip .category.government { background: var(--stamp); }
.file-strip .category.cryptid    { background: #3e5c3a; }
.file-strip .category.space      { background: #2d3e5c; }
.file-strip .category.political  { background: var(--ink); }
.file-strip .category.unexplained{ background: #5c2d5c; }
.file-strip .category.celebrity  { background: #2d3e5c; }
.file-strip .category.ufo        { background: #5c2d5c; }
.file-strip .category.crime      { background: #3a2d14; }

.year-display {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.year-display .year {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  font-size: 92px;
  line-height: 0.85;
  font-weight: 300;
  letter-spacing: -0.04em;
  color: var(--ink);
}
.featured .year-display .year { font-size: 132px; }
.year-display .year em { font-style: italic; color: var(--stamp); }
.year-display .date-abs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-fade);
  border-left: 1px solid var(--rule);
  padding-left: 16px;
  line-height: 1.4;
}

.file-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 36px;
  line-height: 1.1;
  letter-spacing: -0.015em;
  margin-bottom: 20px;
  color: var(--ink);
  max-width: 760px;
}
.featured h3 { font-size: 48px; }
.file-card h3 em { font-style: italic; color: var(--stamp); font-weight: 400; }

.file-card .summary {
  font-family: 'EB Garamond', serif;
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 68ch;
}
.featured .summary { font-size: 21px; }
.file-card .summary::first-letter {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 3.2em;
  line-height: 0.82;
  float: left;
  margin: 4px 10px 0 0;
  color: var(--stamp);
}

/* ── Redaction ── */
.redact {
  display: inline-block;
  background: var(--redact);
  color: var(--redact);
  padding: 0 6px;
  border-radius: 1px;
  cursor: help;
  transition: color .4s, background .4s;
  user-select: none;
}
.redact::selection { background: transparent; }
.redact:hover,
.redact.peek { background: var(--marker); color: var(--ink); }

/* ── Margin theories block ── */
.theories {
  margin-top: 28px;
  padding: 20px 24px;
  background: rgba(232,188,58,0.12);
  border-left: 3px solid var(--marker);
  position: relative;
}
.theories::before {
  content: "MARGIN NOTE";
  position: absolute;
  top: -9px; left: 16px;
  background: var(--paper);
  padding: 0 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--thread);
}
.theories ul { list-style: none; padding: 0; margin: 0; }
.theories li {
  font-family: 'Caveat', cursive;
  font-weight: 600;
  font-size: 22px;
  line-height: 1.35;
  color: var(--ink);
  padding: 6px 0 6px 32px;
  position: relative;
}
.theories li::before {
  content: "→";
  position: absolute; left: 4px; top: 6px;
  color: var(--stamp);
  font-family: 'EB Garamond', serif;
  font-size: 22px;
}

/* ── Entity chips ── */
.entities {
  margin-top: 24px;
  display: flex; flex-wrap: wrap; gap: 8px;
  padding-top: 20px;
  border-top: 1px dashed var(--rule);
}
.entities .chip {
  position: relative;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 4px 10px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  transition: background .25s, color .25s, border-color .25s;
  cursor: help;
}
.entities .chip:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); z-index: 20; }
.entities .chip.bridge {
  background: var(--stamp);
  color: var(--paper);
  border-color: var(--stamp-wet);
  font-weight: 700;
}
/* Implicit bridge — promoted from the VIA tape because the event itself
   doesn't list this entity. Dashed border signals "borrowed context". */
.entities .chip.implicit {
  border-style: dashed;
}

/* Chip role-explanation tooltip: paper card with a tiny arrow above. */
.chip-label { display: inline; }
.chip-blurb {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  max-width: 80vw;
  padding: 12px 14px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 10px 26px rgba(20,10,4,0.38);
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 14.5px;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  z-index: 40;
  pointer-events: none;
  white-space: normal;
}
.chip-blurb strong {
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stamp);
  display: block;
  margin-bottom: 4px;
}
.chip-blurb::before {
  content: "";
  position: absolute;
  top: -7px; left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 12px; height: 12px;
  background: var(--paper);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
/* In-chip blurb stays in the DOM as the HTML source for the overlay —
   we never render it in place because the card's rotate-transform traps
   position:fixed inside the card's box and clips the tooltip. */
.chip-blurb { display: none !important; }

/* Global overlay tooltip — mounted at <body>, escaping any transform
   ancestor. Populated from the hovered chip's stashed blurb HTML. */
#chip-tooltip-overlay {
  position: fixed;
  display: none;
  /* Position is set by JS (positionOverlay) — near the hovered chip,
     clamped to viewport margins. Fall back to center if JS is off. */
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 340px;
  max-width: calc(100vw - 24px);
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: 0 18px 40px rgba(20,10,4,0.5);
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink);
  z-index: 9999;
  pointer-events: none;
}
#chip-tooltip-overlay.active { display: block; }
#chip-tooltip-overlay strong {
  font-family: 'JetBrains Mono', monospace;
  font-style: normal;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stamp);
  display: block;
  margin-bottom: 6px;
}

/* ── Month aside (timeline) ── */
aside.month-col {
  position: sticky;
  top: 40px;
  align-self: start;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding-right: 8px;
}
aside.month-col::-webkit-scrollbar { width: 4px; }
aside.month-col::-webkit-scrollbar-thumb { background: var(--thread); }

aside.month-col h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 28px;
  line-height: 1;
  margin-bottom: 8px;
}
aside.month-col h2 em { font-style: italic; color: var(--stamp); }
aside.month-col .subhead {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-fade);
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

ol.timeline {
  list-style: none;
  position: relative;
  padding-left: 28px;
  margin: 0;
}
ol.timeline::before {
  content: "";
  position: absolute;
  left: 6px; top: 8px; bottom: 8px;
  width: 1px;
  background-image: linear-gradient(to bottom, var(--thread) 50%, transparent 50%);
  background-size: 1px 6px;
}
ol.timeline li {
  position: relative;
  padding: 14px 0;
  border-bottom: 1px dashed var(--rule);
}
ol.timeline li:last-child { border-bottom: none; }
ol.timeline li::before {
  content: "";
  position: absolute;
  left: -28px; top: 22px;
  width: 13px; height: 13px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--ink-soft);
}
ol.timeline li.today::before {
  background: var(--stamp);
  border-color: var(--stamp);
  box-shadow: 0 0 0 4px rgba(161,41,31,0.18);
}
ol.timeline .date {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-fade);
  display: block;
  margin-bottom: 4px;
}
ol.timeline .date .yr { color: var(--stamp); font-weight: 700; }
ol.timeline .t-title {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.01em;
}
ol.timeline li:hover .t-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: var(--stamp);
}

/* ── About section ── */
.about {
  grid-column: 1 / -1;
  margin-top: 96px;
  padding: 60px 56px;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 56px;
  align-items: start;
}
.about::before {
  content: "§ 04";
  position: absolute;
  top: 20px; right: 28px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--thread);
}
.about h2 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 48px;
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.about h2 em { font-style: italic; color: var(--stamp); }
.about p { color: var(--ink-soft); font-size: 18px; line-height: 1.7; max-width: 58ch; margin-bottom: 16px; }
.about .disclaimer {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-fade);
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  margin-top: 24px;
}

/* ── Site footer ── */
footer.site-footer {
  padding: 40px 48px 24px;
  border-top: 1px solid var(--rule);
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-fade);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1480px;
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 16px;
}
footer.site-footer .quote {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--ink-soft);
}

/* ─────────────────────────────────────────────
   CONNECT PAGE — empty state (input form)
   ───────────────────────────────────────────── */

main.connect-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 48px 120px;
}

.connect-form-section {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 40px 0;
  margin-bottom: 48px;
}
.connect-form-section h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 42px;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 8px;
}
.connect-form-section h2 em { font-style: italic; color: var(--stamp); }
.connect-form-section .subhead {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  font-size: 18px;
  color: var(--ink-soft);
  margin-bottom: 36px;
  border-left: 2px solid var(--stamp);
  padding-left: 18px;
}

.connect-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 36px;
  align-items: end;
  margin-bottom: 28px;
}

.connect-field { position: relative; }
.connect-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-fade);
  display: block;
  margin-bottom: 10px;
}

.connect-input {
  width: 100%;
  background: var(--paper-deep);
  border: none;
  border-bottom: 2px solid var(--ink);
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-size: 26px;
  font-weight: 400;
  letter-spacing: -0.01em;
  padding: 8px 0 12px;
  outline: none;
  border-radius: 0;
  transition: border-color .15s;
}
.connect-input::placeholder {
  color: var(--ink-fade);
  font-style: italic;
}
.connect-input:focus { border-bottom-color: var(--stamp); }
.connect-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.connect-cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.connect-cta {
  background: var(--ink);
  color: var(--paper);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  padding: 16px 32px;
  border: none;
  border-radius: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  transition: background .2s;
}
.connect-cta:hover:not(:disabled) { background: var(--stamp); }
.connect-cta:disabled { opacity: 0.5; cursor: not-allowed; }
.connect-cta-hint {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--ink-fade);
  font-size: 16px;
}

/* ── Autocomplete dropdown (paper, not dropshadow) ── */
.ac-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0; right: 0;
  background: var(--paper);
  border: 1px solid var(--ink);
  max-height: 360px;
  overflow-y: auto;
  z-index: 50;
  display: none;
  box-shadow: 0 14px 28px rgba(40,20,8,0.35);
}
.ac-dropdown.open { display: block; }

.ac-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px dashed var(--rule);
  cursor: pointer;
  transition: background .1s;
}
.ac-row:last-child { border-bottom: none; }
.ac-row:hover { background: rgba(161,41,31,0.06); }

.ac-row-main {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
}
.ac-label {
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-size: 17px;
  line-height: 1.2;
}
.ac-meta {
  color: var(--ink-fade);
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.ac-tag {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  flex-shrink: 0;
  font-weight: 700;
  padding: 3px 7px;
}
.ac-tag-file    { background: var(--ink);   color: var(--paper); }
.ac-tag-entity  { background: var(--stamp); color: var(--paper); }
.ac-tag-withheld{ background: var(--redact);color: var(--paper); }

.ac-empty {
  color: var(--ink-fade);
  font-style: italic;
  cursor: default;
  font-family: 'EB Garamond', serif;
  text-align: center;
  padding: 18px 16px;
}
.ac-empty:hover { background: transparent; }

.connect-empty-placeholder {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-fade);
  text-align: center;
  padding: 60px 24px;
  border: 1px dashed var(--rule);
  background: rgba(255,248,228,0.4);
}
.connect-empty-placeholder p { margin-bottom: 8px; }

/* ─────────────────────────────────────────────
   CONNECT PAGE — query state (resolved chain)
   ───────────────────────────────────────────── */

.query-bar {
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 48px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--paper-deep);
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 40px;
  align-items: end;
}
.query-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.query-field .label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-fade);
}
.query-field .value {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-weight: 400;
}
.query-field .value em { font-style: italic; color: var(--stamp); }
.query-field .sublabel {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--ink-fade);
  text-transform: uppercase;
  margin-top: 4px;
}
.query-field .type-chip {
  display: inline-block;
  padding: 2px 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.3em;
  font-weight: 700;
  background: var(--ink);
  color: var(--paper);
  margin-right: 6px;
}
.query-field .type-chip.entity { background: var(--stamp); }
.query-field .type-chip.withheld { background: var(--redact); }

.query-cta-col {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
}
.query-cta-col .status {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stamp);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.query-cta-col button.trace-another-cta {
  font-family: 'JetBrains Mono', monospace;
  background: var(--ink);
  color: var(--paper);
  border: none;
  padding: 14px 24px;
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s;
}
.query-cta-col button.trace-another-cta:hover { background: var(--stamp); }

/* ── Assembly head ── */
.assembly {
  max-width: 1180px;
  margin: 0 auto;
  padding: 56px 48px 20px;
}
.assembly-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--rule);
  flex-wrap: wrap;
  gap: 16px;
}
.assembly-head h2 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 42px;
  letter-spacing: -0.02em;
  line-height: 1;
}
.assembly-head h2 em { font-style: italic; color: var(--stamp); }
.assembly-head .legend {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-fade);
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}
.assembly-head .legend span::before {
  content: "";
  display: inline-block;
  width: 14px; height: 2px;
  background: var(--string);
  vertical-align: middle;
  margin-right: 8px;
}

/* ─────────────────────────────────────────────
   EVIDENCE WALL (cork board)
   ───────────────────────────────────────────── */

.evidence-wall {
  position: relative;
  max-width: 1180px;
  margin: 24px auto 0;
  padding: 80px 48px 120px;
  background:
    radial-gradient(ellipse 90% 50% at 50% 10%, rgba(140,100,50,0.20), transparent 60%),
    linear-gradient(180deg, #b99168 0%, #9a774c 100%);
  background-color: var(--cork);
  border: 14px solid #2a1c0e;
  border-radius: 3px;
  box-shadow:
    inset 0 0 60px rgba(40,20,8,0.4),
    inset 0 0 0 1px rgba(255,240,200,0.06),
    0 30px 60px -30px rgba(30,20,10,0.5);
  overflow: hidden;
}
.evidence-wall::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='280' height='280'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.6' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.4  0 0 0 0 0.25  0 0 0 0 0.1  0 0 0 0.4 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.55;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}
.evidence-wall::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(0,0,0,0.12) 2px, transparent 3px),
    radial-gradient(circle at 88% 82%, rgba(0,0,0,0.12) 2px, transparent 3px),
    radial-gradient(circle at 22% 88%, rgba(0,0,0,0.08) 2px, transparent 3px);
  background-size: 180px 180px, 220px 220px, 260px 260px;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 1;
}

/* SVG string layer */
.string-layer {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 2;
  display: block;
  overflow: visible;
}
.string-layer path.string {
  fill: none;
  stroke: var(--string);
  stroke-width: 3.6;
  stroke-linecap: round;
  filter: url(#stringShadow);
}
@media (prefers-reduced-motion: no-preference) {
  .string-layer path.string.animated {
    animation: drawString 2.4s cubic-bezier(.5,.2,.2,1) forwards;
  }
  @keyframes drawString { to { stroke-dashoffset: 0; } }
}

/* VIA tag layer — sits ABOVE normal pin-cards so the tape always reads on
   top (pin-cards have no explicit z-index, so they stack in root by DOM
   order). Expanded pin-cards at z-index:50 still paint above this layer,
   which is intentional — when a card scales up the user is reading the
   card, not the tape. */
#via-tag-layer {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 4;
}
.via-tag {
  position: absolute;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 18px;
  background: #f5ebd0;
  color: var(--ink);
  padding: 7px 14px 5px;
  border: 1px solid rgba(0,0,0,0.25);
  box-shadow:
    0 4px 10px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.5);
  white-space: nowrap;
  pointer-events: none;
  /* Center the tag on its positioned point (midpoint of the string) so
     it sits ON the string, not hanging below it. */
  transform: translate(-50%, -50%) rotate(var(--rot, -3deg));
  transform-origin: 50% 50%;
  opacity: 1;
}
@media (prefers-reduced-motion: no-preference) {
  .via-tag {
    opacity: 0;
    animation: tagFade 0.6s ease-out forwards;
    animation-delay: var(--delay, 0s);
  }
  @keyframes tagFade {
    from { opacity: 0; transform: translate(-50%, calc(-50% - 6px)) rotate(var(--rot, -3deg)); }
    to   { opacity: 1; transform: translate(-50%, -50%) rotate(var(--rot, -3deg)); }
  }
}
.via-tag .via-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  color: var(--stamp);
  display: block;
  line-height: 1;
  margin-bottom: 3px;
}

/* ── Pinned cards (chain nodes) ── */
.evidence-grid {
  position: relative;
  /* No z-index — we need .pin-card.expanded (z:50) to escape to root
     stacking context so it paints above the VIA tag layer (z:4). */
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: auto;
  gap: 180px 24px;
  padding: 40px 30px;
}

.pin-card {
  position: relative;
  background: var(--paper);
  padding: 28px 30px 24px;
  border: 1px solid rgba(27,23,19,0.3);
  box-shadow:
    0 2px 0 rgba(255,255,255,0.5) inset,
    0 14px 30px -10px rgba(20,10,4,0.5),
    0 2px 6px rgba(20,10,4,0.3);
  transform: rotate(var(--rot, 0deg));
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
  max-width: 520px;
  justify-self: center;
}
.pin-card { cursor: zoom-in; }
.pin-card:hover {
  transform: rotate(0deg) scale(1.02);
  z-index: 10;
  box-shadow:
    0 2px 0 rgba(255,255,255,0.5) inset,
    0 30px 50px -10px rgba(20,10,4,0.6),
    0 4px 10px rgba(20,10,4,0.4);
}
.pin-card.expanded,
.pin-card.expanded:hover {
  /* !important beats the entry animation's forwards-fill transform
     WITHOUT stopping the animation — so removing .expanded does NOT
     restart the animation from its "from" keyframe. Collapse is then
     a normal transition back to rotate(var(--rot)) scale(1). */
  transform: rotate(0deg) scale(1.6) !important;
  z-index: 50;
  cursor: zoom-out;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), box-shadow .3s;
}
/* Scale inward — column-1 cards grow right from their left edge,
   column-2 cards grow left from their right edge. Keeps the expanded
   card within the cork wall no matter which side it started on. */
.pin-card.expanded[data-col="1"] { transform-origin: 0% 50%; }
.pin-card.expanded[data-col="2"] { transform-origin: 100% 50%; }
.pin-card.expanded .summary {
  -webkit-line-clamp: unset;
  display: block;
  overflow: visible;
}
@media (prefers-reduced-motion: no-preference) {
  .pin-card {
    opacity: 0;
    animation: pinCard 0.7s cubic-bezier(.2,.8,.2,1) forwards;
    animation-delay: var(--delay, 0s);
  }
  @keyframes pinCard {
    from { opacity: 0; transform: rotate(var(--rot, 0deg)) translateY(24px) scale(0.94); }
    to { opacity: 1; transform: rotate(var(--rot, 0deg)) translateY(0) scale(1); }
  }
}

/* Paper grain on each card */
.pin-card::before {
  content: "";
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.92' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.08  0 0 0 0 0.05  0 0 0 0.2 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  mix-blend-mode: multiply;
  opacity: 0.6;
  pointer-events: none;
}

/* Thumbtacks (top + bottom — string anchors) */
.pin-card .thumbtack {
  position: absolute;
  top: -8px; left: 50%;
  width: 26px; height: 26px;
  transform: translateX(-50%);
  z-index: 4;
  filter: drop-shadow(2px 4px 3px rgba(0,0,0,0.5));
}
.pin-card .thumbtack.bottom { top: auto; bottom: -8px; }
.pin-card .thumbtack::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff6054 0%, #c02218 55%, #6a1410 100%);
  box-shadow: inset 0 -2px 4px rgba(0,0,0,0.4), inset 2px 3px 4px rgba(255,200,180,0.6);
}
.pin-card .thumbtack::after {
  content: "";
  position: absolute;
  left: 50%; top: 55%;
  width: 2px; height: 8px;
  background: linear-gradient(180deg, #6a6358, #2a2620);
  transform: translateX(-50%);
}

/* Tape strips (decorative) */
.pin-card .tape {
  position: absolute;
  width: 64px; height: 22px;
  background: rgba(230, 220, 180, 0.55);
  border: 1px solid rgba(180,160,110,0.35);
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
  z-index: 3;
  mix-blend-mode: multiply;
}
.pin-card .tape.tl { top: -10px; left: -14px; transform: rotate(-42deg); }
.pin-card .tape.br { bottom: -10px; right: -14px; transform: rotate(-42deg); }

/* Pin-card internal structure */
.pin-card .file-strip {
  font-size: 9.5px;
  padding-bottom: 10px;
  margin-bottom: 14px;
}
.pin-card .file-strip .category { font-size: 9px; padding: 2px 7px; }
.pin-card .year-row {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.pin-card .year {
  font-family: 'Fraunces', serif;
  font-variation-settings: 'opsz' 144, 'SOFT' 100;
  font-size: 62px;
  line-height: 0.85;
  letter-spacing: -0.04em;
  font-weight: 300;
  color: var(--ink);
}
.pin-card .year em { font-style: italic; color: var(--stamp); }
.pin-card .year-row .abs {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-fade);
  border-left: 1px solid var(--rule);
  padding-left: 12px;
  line-height: 1.45;
}
.pin-card h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
  color: var(--ink);
}
.pin-card h3 em { font-style: italic; color: var(--stamp); font-weight: 400; }
.pin-card .summary {
  font-family: 'EB Garamond', serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pin-card .summary::first-letter { float: none; font-size: inherit; margin: 0; color: inherit; }
.pin-card .entities {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--rule);
  display: flex; flex-wrap: wrap;
  gap: 6px;
}
.pin-card .entities .chip { font-size: 9.5px; padding: 3px 7px; }

/* Node number stamp */
.pin-card .node-num {
  position: absolute;
  top: 10px; left: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.28em;
  color: var(--ink-fade);
}

/* Term-tape (FROM / TO masking-tape labels) */
.pin-card .term-tape {
  position: absolute;
  top: -12px; left: -24px;
  width: 92px; height: 32px;
  background: linear-gradient(180deg, rgba(250,238,200,0.85), rgba(230,215,165,0.85));
  border-top: 1px solid rgba(180,160,110,0.45);
  border-bottom: 1px solid rgba(180,160,110,0.45);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: 0.06em;
  color: var(--stamp);
  text-transform: uppercase;
  transform: rotate(-14deg);
  z-index: 7;
  mix-blend-mode: multiply;
}
.pin-card .term-tape::before,
.pin-card .term-tape::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0;
  width: 6px;
  background: inherit;
  opacity: 0.7;
}
.pin-card .term-tape::before { left: -6px; clip-path: polygon(0 25%, 100% 0, 100% 100%, 0 75%); }
.pin-card .term-tape::after  { right: -6px; clip-path: polygon(0 0, 100% 25%, 100% 75%, 0 100%); }
.pin-card .term-tape.end {
  top: auto; left: auto;
  bottom: -12px; right: -24px;
  transform: rotate(-8deg);
  mix-blend-mode: normal;
}

/* Empty pinholes scattered on the cork */
.pinhole {
  position: absolute;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(0,0,0,0.65), rgba(0,0,0,0.35) 70%, transparent 90%);
  box-shadow: 0 1px 1px rgba(255,200,140,0.25);
  z-index: 2;
  pointer-events: none;
}

/* ── Chain footer ── */
.chain-footer {
  max-width: 1180px;
  margin: 36px auto 0;
  padding: 0 48px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--ink-fade);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.chain-footer .alt-path-button {
  color: var(--stamp);
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dotted var(--stamp);
  padding-bottom: 1px;
  cursor: pointer;
}
.chain-footer .alt-path-button:hover { filter: brightness(1.15); border-bottom-style: solid; }
.chain-footer .declassify-hint { opacity: 0.45; font-style: italic; }

/* ─────────────────────────────────────────────
   ERROR STATES (no-path, archive unavailable, self-loop, withheld)
   Restyled in dossier vocabulary
   ───────────────────────────────────────────── */

.error-state {
  max-width: 760px;
  margin: 48px auto;
  padding: 48px 56px;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  border-left: 6px solid var(--stamp);
  position: relative;
}
.error-state .error-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 32px;
  line-height: 1.1;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.error-state .error-title em { font-style: italic; color: var(--stamp); }
.error-state .error-body {
  font-family: 'EB Garamond', serif;
  font-style: italic;
  color: var(--ink-soft);
  font-size: 18px;
  margin-bottom: 18px;
}
.error-state .error-link {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-top: 24px;
}
.error-state .error-link a {
  color: var(--stamp);
  text-decoration: none;
  border-bottom: 1px dotted var(--stamp);
  padding-bottom: 1px;
}
.error-state .error-link a:hover { filter: brightness(1.15); border-bottom-style: solid; }

/* Self-loop note (THE FILE REFERS TO ITSELF) */
.chain-note.self-loop-note {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--stamp);
  text-align: center;
  border: 1px dashed var(--stamp);
  padding: 18px 24px;
  margin: 24px auto;
  max-width: 540px;
}

/* Result region wrapper */
#result-region {
  margin-top: 24px;
}

/* ─────────────────────────────────────────────
   WITHHELD Easter egg (FOIA-mimicry)
   Re-skinned in the new dossier vocabulary
   ───────────────────────────────────────────── */

.withheld-document {
  position: relative;
  max-width: 760px;
  margin: 48px auto;
  background: var(--paper);
  border: 1px solid var(--rule);
  padding: 60px 56px 48px;
  box-shadow:
    0 1px 0 rgba(255,255,255,0.4) inset,
    0 18px 30px -22px rgba(50,30,10,0.45),
    0 2px 0 rgba(100,70,30,0.1);
  overflow: hidden;
}
.withheld-document .classified-stamp-large {
  position: absolute;
  top: 28px; left: 32px;
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--stamp);
  border: 4px double var(--stamp);
  padding: 10px 22px 8px;
  font-size: 22px;
  letter-spacing: 0.3em;
  transform: rotate(-12deg);
  opacity: 0.88;
  text-transform: uppercase;
  mix-blend-mode: multiply;
}
.withheld-document .subject-bar {
  background: var(--redact);
  color: var(--paper);
  margin: 56px -56px 24px;
  padding: 18px 56px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.withheld-document .subject-bar .subject-line {
  display: block;
  margin-bottom: 6px;
}
.withheld-document .subject-bar .subject-line:last-child { margin-bottom: 0; }

.withheld-document .file-meta {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--ink-fade);
  text-transform: uppercase;
  margin-bottom: 24px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--rule);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.withheld-document .exemption-text {
  font-family: 'EB Garamond', serif;
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 18px;
}
.withheld-document .exemption-text strong {
  color: var(--stamp);
  font-weight: 600;
}

.withheld-document .denial-stamp {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  color: var(--stamp);
  border: 4px double var(--stamp);
  padding: 8px 18px 6px;
  font-size: 14px;
  letter-spacing: 0.3em;
  transform: rotate(-4deg);
  margin-top: 18px;
  text-transform: uppercase;
  mix-blend-mode: multiply;
  opacity: 0.88;
}

.withheld-document .operator-quote {
  margin-top: 32px;
  padding-top: 18px;
  border-top: 1px dashed var(--rule);
  font-family: 'Caveat', cursive;
  font-weight: 600;
  color: var(--ink);
  font-size: 22px;
  line-height: 1.4;
}

/* .todays-file-link / .back-to-connect inherit tape-bar nav link styling. */

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */

@media (max-width: 1080px) {
  main.today-main {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  aside.month-col {
    position: static;
    max-height: none;
  }
  .stamp { top: 110px; right: 30px; font-size: 26px; padding: 10px 16px 8px; }
  .featured h3 { font-size: 36px; }
  .featured .year-display .year { font-size: 92px; }
  .about { grid-template-columns: 1fr; gap: 32px; padding: 40px 28px; }
  .query-bar { grid-template-columns: 1fr; gap: 24px; padding: 24px 32px; }
  .evidence-wall { padding: 60px 24px 80px; }
  .evidence-grid { gap: 70px 16px; padding: 14px 12px; }
  .pin-card { max-width: 100%; }
}

@media (max-width: 720px) {
  .tape-bar { padding: 14px 20px; flex-direction: column; gap: 10px; align-items: flex-start; }
  .tape-bar nav a { margin-left: 0; margin-right: 18px; }
  .masthead, .file-banner, main.today-main, main.connect-main, footer.site-footer { padding-left: 20px; padding-right: 20px; margin-left: 0; margin-right: 0; }
  .file-banner { grid-template-columns: 1fr; gap: 16px; }
  .file-card { padding: 24px 22px; }
  .featured { padding: 32px 24px; }
  .year-display .year { font-size: 64px !important; }
  .file-card h3 { font-size: 26px !important; }
  .stamp { top: 80px; right: 20px; font-size: 18px; padding: 8px 12px 6px; }
  h1.title { font-size: 56px !important; }
  .connect-form { grid-template-columns: 1fr; gap: 28px; }
  .connect-input { font-size: 22px; }
  .evidence-grid { grid-template-columns: 1fr; gap: 90px 0; }
  /* JS inline-assigns `grid-column: 2` on alternating cards for the desktop
     zig-zag. On mobile we collapse to a single column, so we have to beat
     those inline styles with !important — otherwise the grid grows an
     implicit 2nd track and half the cards land off-screen. */
  .evidence-grid > .pin-card {
    grid-column: 1 !important;
    grid-row: auto !important;
    max-width: calc(100vw - 48px);
  }
  /* Long VIA labels ("POLITICAL ASSASSINATION + SECOND SHOOTER THEORY")
     overflow a 390px viewport when forced to one line. Allow wrapping,
     clamp the width, and center the text block on the string midpoint. */
  .via-tag {
    white-space: normal;
    text-align: center;
    max-width: calc(100vw - 32px);
    font-size: 16px;
    padding: 6px 12px 4px;
    line-height: 1.15;
  }
  /* Expanded card on mobile: the card is already viewport-fit
     (max-width: calc(100vw - 48px)), so there's no room to scale 1.6x
     like desktop does. Keep the scale at 1.0 and the origin centered,
     just unrotate and let the content (summary, line-clamp) expand in
     place. No overflow, still clearly "opened". */
  .pin-card.expanded,
  .pin-card.expanded:hover {
    transform: rotate(0deg) scale(1) !important;
    transform-origin: 50% 50% !important;
  }
  .withheld-document { padding: 60px 28px 32px; margin: 32px 16px; }
  .withheld-document .subject-bar { margin: 56px -28px 20px; padding: 14px 28px; font-size: 12px; }
}
