/* ===========================================================================
   THE IRAN LEDGER — print
   Audit item 8: the primary audience prints. A beautiful screen that prints
   broken is a failed product.

   Black on white. The ledger intact — stamps and OPEN GAP marks survive as
   ink, not as colour. Source URLs printed after external links, so a printed
   exhibit is still citable. No navigation, no toolbars, no controls.
   =========================================================================== */
@page {
  margin: 16mm 14mm 18mm;
}

html, body {
  background: #FFFFFF !important;
  color: #000000 !important;
  font-size: 10.5pt;
  line-height: 1.45;
}

/* Furniture that has no meaning on paper. */
.skip-link,
.mainnav,
.subnav,
.filters,
.filter-reset,
.toggle-gaps,
.btn-copy,
.btn-quiet,
.sort-btn .arrow,
.rail,
.toc,
.masthead-asof,
.diagram-legend { display: none !important; }

/* The masthead becomes a document header: identity, once, at the top. */
.masthead { border-block-end: 1pt solid #000; padding-block-end: 6pt; }
.masthead-inner { display: block; padding-block: 0 6pt; }
.wordmark { font-size: 17pt; color: #000 !important; text-decoration: none; }
.wordmark-sub { font-size: 8.5pt; color: #000 !important; margin-block-start: 2pt; }
.masthead-org { font-size: 7.5pt; color: #000 !important; letter-spacing: 0.08em; }

.docket-bar { background: none !important; border-block-end: 0.5pt solid #000; }
.docket-inner { padding-block: 4pt; display: block; }
.docket, .docket-no, .docket-title, .docket-asof { color: #000 !important; font-size: 8pt; }

/* The Redaction band cannot be printed as a solid black plate. It becomes
   what it always was: a rule and its text. */
.site-footer,
.firewall {
  background: none !important;
  color: #000 !important;
  border-block-start: 1pt solid #000;
  padding-block: 8pt;
}
.site-footer *, .firewall * { color: #000 !important; }
.footer-grid { display: block; }
.footer-index, .footer-meta ul { display: none; }
.footer-sub, .footer-org, .footer-privacy, .footer-asof { font-size: 8pt; }
.firewall .lane { border-inline-start: 0.5pt solid #000; }
.lane-tag { border: 0.5pt solid #000; }

/* Type. */
h1, h2, h3, .section-heading, .sub-heading, .wi-title, .item-title, .memorial-name {
  color: #000 !important;
  page-break-after: avoid;
  break-after: avoid;
}
.section-heading { border-block-end: 1pt solid #000; font-size: 14pt; margin-block: 16pt 8pt; }
.page-header { padding-block: 10pt 8pt; border-block-end: 0.5pt solid #000; }
.page-header h1 { font-size: 20pt; line-height: 1.2; }
.eyebrow, .callout-label, .exhibit-kicker, .variance-label { color: #000 !important; }
.prose, .explainer, .report-section p, .report-section li { max-inline-size: none; }
.page-body { padding-block: 10pt 0; }

/* Black on white means black on white: every colour token collapses to ink.
   The struck stamp is the one exception and is re-asserted below. */
body, body * { color: #000 !important; }

/* The ledger, intact — and inside the page box. The screen layout sizes nine
   columns in px, which is ~25% wider than an A4 content area; every fixed
   width is released here so the table lays itself out to the paper. */
.ledger-wrap, .table-wrap { overflow: visible !important; border-color: #000 !important; }
.ledger, .data-table {
  inline-size: 100% !important;
  max-inline-size: 100% !important;
  min-inline-size: 0 !important;
  font-size: 7.8pt;
  table-layout: auto;
}
.ledger .lg-name, .ledger .lg-meta, .ledger .lg-j, .ledger .lg-gap, .ledger .lg-n,
.data-table th, .data-table td {
  min-inline-size: 0 !important;
  max-inline-size: none !important;
  inline-size: auto !important;
  white-space: normal;
}
.ledger .lg-name { font-size: 8pt; line-height: 1.25; }
.ledger .lg-meta { font-size: 7pt; line-height: 1.25; }
.ledger tbody td, .ledger tbody th { padding: 3pt 4pt; }
.ledger thead th { padding: 4pt; font-size: 6.6pt; }
/* Body cells hold one token and must not break it; the column heading may
   wrap, or "OPEN GAPS" overruns its own rule. */
.ledger tbody .lg-gap { font-size: 7pt; white-space: nowrap; }
.ledger thead .lg-gap { white-space: normal; }
.stamp, .gapmark { min-inline-size: 0 !important; padding: 1.5pt 3pt; font-size: 6.8pt; }
.gapmark { letter-spacing: 0.06em; }
.ledger thead th, .data-table thead th {
  color: #000 !important;
  background: none !important;
  border-block-end: 1pt solid #000;
  position: static !important;
}
/* A repeated header must carry its labels on every page. Chromium does not
   repaint the injected sort button in a repeated <thead>, so the label is
   printed from the cell's own data-label instead. With JavaScript disabled
   there is no button and no data-label, and the cell's own text prints. */
.sort-btn { display: none !important; }
.ledger thead th::before, .data-table thead th::before { content: attr(data-label); }
/* The docket numeral is a screen scan aid. On paper the rows are already in
   order, and the column is 20mm this table cannot spare. */
.ledger .lg-n { display: none !important; }
.ledger caption, .data-table caption { color: #000 !important; background: none !important; }
.ledger tbody td, .ledger tbody th,
.data-table tbody td, .data-table tbody th { border-block-end: 0.4pt solid #666; }
.data-table tbody tr:nth-child(even) { background: none !important; }
.ledger .lg-n { border-inline-end: 0.4pt solid #000; }
.ledger .lg-name, .ledger thead th { position: static !important; }

/* Stamps print as struck ink; OPEN GAP prints as the hollow seal. */
.stamp, .stamp * {
  background: #000 !important;
  color: #FFFFFF !important;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.stamp-partial { background: none !important; color: #000 !important; box-shadow: none; border: 0.5pt solid #000; }
.gapmark { color: #000 !important; }
.gapmark::before { border: 0.8pt solid #000; animation: none !important; clip-path: none !important; }
.strip { border-color: #000 !important; }
.strip-cell { border-inline-start-color: #000 !important; color: #000 !important; }
.strip-designated { background: #000 !important; color: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.strip-gap { box-shadow: inset 0 0 0 0.8pt #000; color: #000 !important; }
.strip-partial { background: none !important; box-shadow: inset 0 -1pt 0 0 #000; }

/* Chips, badges, callouts: outline only, no fills to eat toner. */
.callout, .dossier-box, .variance, .lane-card, .shelf-card, .profile-side, .diagram-wrap {
  background: none !important;
  border: 0.5pt solid #000 !important;
}
.badge, .pill, .tier-tag {
  background: none !important;
  color: #000 !important;
  border: 0.5pt solid #000 !important;
}
.v-tick { background: #000 !important; }
.bracket-end, .bracket-tick-rail::before, .bracket-tick-rail::after { color: #000 !important; }

/* Citability: external source URLs are printed after the link text. Internal
   cross-references are left as text — 788 relative paths would drown the
   page and none of them is a citation. */
a { color: #000 !important; text-decoration: underline; }
a[href^="http"]::after {
  content: " <" attr(href) ">";
  font-family: var(--font-mono);
  font-size: 7.5pt;
  word-break: break-all;
  font-weight: 400;
}
.src-item a::after { font-size: 7pt; }

/* Keep rows and evidence blocks whole across page breaks. */
tr, .memorial-entry, .watch-item, .item, .shelf-card, .callout, .variance {
  page-break-inside: avoid;
  break-inside: avoid;
}
thead { display: table-header-group; }
tfoot { display: table-footer-group; }

/* Nothing moves on paper. */
*, *::before, *::after {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
  transform: none !important;
  clip-path: none !important;
}
