/* Yellowstone 2026 — the glovebox copy.
 * Letter, generous margins, one section per page, black on white.
 * Photographs and maps print; app chrome does not.
 */

@page { size: letter; margin: 14mm 13mm 15mm; }

@media print {
  html, body {
    background: #fff !important; color: #000 !important;
    font-family: "Iowan Old Style", Palatino, Georgia, "Times New Roman", serif;
    font-size: 10.2pt; line-height: 1.42; padding: 0 !important; margin: 0 !important;
  }
  /* Every token the screen themes own has to be restated here, or a guide
     printed at 9 PM (night theme is on) comes out of the printer dark. */
  html[data-theme] {
    --ink: #000; --ink2: #222; --ink3: #555; --line: #bbb; --line2: #ddd;
    --paper: #fff; --surface: #fff; --surface2: #f2f2f2;
    --accent: #000; --accent-s: #f2f2f2;
    --sulfur: #555; --sulfur-ink: #333; --sulfur-s: #f2f2f2;
    --sky: #333; --sky-s: #f2f2f2; --forest: #000;
    --shadow: none; --shadow-l: none;
  }

  .topbar, .tabbar, .netbar, .sheet-wrap, .lightbox,
  .screen-only, .btn, .btn-row, .seg, .icobtn, .credit,
  /* screen-only navigation aids: a contents page of hash links and a search
     box are meaningless on paper */
  .jump, .placefilter { display: none !important; }
  /* the floating tab bar's scrim */
  body::after { display: none !important; }

  .view { max-width: none !important; padding: 0 !important; margin: 0 !important; }
  .print-only { display: block !important; }

  /* the preview borrows the app's card chrome; paper does not want it */
  .printdoc .pp {
    background: none !important; border: 0 !important; border-radius: 0 !important;
    box-shadow: none !important; padding: 0 !important; margin: 0 !important;
  }

  a { color: #000 !important; text-decoration: none; }
  a[href^="http"]::after { content: ""; }

  /* ── page sections ───────────────────────────────────────────────── */
  .pp { break-after: page; page-break-after: always; break-inside: auto; }
  .pp:last-child { break-after: auto; page-break-after: auto; }

  .pp h1 {
    font-size: 20pt; line-height: 1.1; letter-spacing: -.01em; margin: 0 0 2mm;
    padding-bottom: 2mm; border-bottom: 1.6pt solid #000;
  }
  .pp h2 {
    font-size: 11.5pt; text-transform: uppercase; letter-spacing: .1em;
    margin: 6mm 0 2mm; padding-bottom: 1mm; border-bottom: .5pt solid #999;
    break-after: avoid; page-break-after: avoid;
  }
  .pp h3 { font-size: 10.5pt; margin: 4mm 0 1.5mm; break-after: avoid; }
  .pp-sub { font-size: 11pt; font-style: italic; color: #333 !important; margin: 0 0 4mm; }
  .pp-head {
    font-size: 12pt; font-weight: 700; margin: 3mm 0; padding: 2.5mm 3mm;
    background: #f2f2f2 !important; border: .5pt solid #999;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .pp-doctrine { font-size: 9.6pt; font-style: italic; margin: 4mm 0; color: #333 !important; }
  .pp-rule {
    font-size: 9.6pt; margin: 3mm 0; padding: 2.5mm 3mm;
    border: .5pt solid #999; border-top: 1.4pt solid #000;
    break-inside: avoid; page-break-inside: avoid;
  }
  .pp-rule strong { text-transform: uppercase; letter-spacing: .06em; font-size: 8.4pt; }
  .pp-insight { font-size: 9.4pt; font-style: italic; color: #333 !important;
    margin: 4mm 0 0; padding-top: 2mm; border-top: .5pt dotted #999; }
  .pp-src { font-size: 8pt; color: #555 !important; margin-top: 5mm; }

  /* cover */
  .pp-cover h1 { font-size: 30pt; border-bottom-width: 2.5pt; }

  /* ── timeline table ──────────────────────────────────────────────── */
  .pp-tl { width: 100%; border-collapse: collapse; margin: 3mm 0; font-size: 9.3pt; }
  .pp-tl thead th {
    text-align: left; font-size: 7.6pt; text-transform: uppercase; letter-spacing: .09em;
    border-bottom: 1pt solid #000; padding: 1.5mm 2mm 1mm;
  }
  .pp-tl thead { display: table-header-group; }
  .pp-tl td { vertical-align: top; padding: 2mm 2mm; border-bottom: .5pt solid #ccc; }
  .pp-tl tr { break-inside: avoid; page-break-inside: avoid; }
  .pp-tl td:first-child { width: 21mm; font-weight: 700; white-space: nowrap; }
  .pp-tl td:nth-child(2) { width: 21mm; font-size: 8.4pt; color: #444 !important; }
  .pp-tl tr.opt td { color: #444 !important; }
  .pp-tl tr.opt td:first-child::after { content: " (opt)"; font-weight: 400; font-size: 7.5pt; }
  .pp-tl ul { margin: 1.5mm 0 0; padding-left: 4mm; font-size: 8.6pt; color: #333 !important; }
  .pp-tl li { margin-bottom: .8mm; }

  /* ── key/value ───────────────────────────────────────────────────── */
  .pp .kv > div {
    display: grid; grid-template-columns: 34mm 1fr; gap: 3mm;
    padding: 1.6mm 0; border-bottom: .4pt solid #ddd;
    break-inside: avoid; page-break-inside: avoid;
  }
  .pp .kv dt { font-size: 8pt; text-transform: uppercase; letter-spacing: .06em;
    font-weight: 700; color: #333 !important; }
  .pp .kv dd { margin: 0; font-size: 9.4pt; }

  /* ── lists ───────────────────────────────────────────────────────── */
  .pp .bullets { margin: 2mm 0; padding: 0; list-style: none; }
  .pp .bullets li { position: relative; padding-left: 4.5mm; margin-bottom: 1.4mm;
    font-size: 9.4pt; break-inside: avoid; }
  .pp .bullets li::before { content: "—"; position: absolute; left: 0; background: none; }

  .pp-checks { list-style: none; margin: 2mm 0; padding: 0; }
  .pp-checks li { position: relative; padding-left: 6mm; margin-bottom: 2mm; font-size: 9.4pt; }
  .pp-checks li::before {
    content: ""; position: absolute; left: 0; top: .6mm;
    width: 3.4mm; height: 3.4mm; border: .7pt solid #000;
  }
  .pp-2col { columns: 2; column-gap: 8mm; }

  .pp-blanks { margin: 3mm 0; }
  .pp-blanks dt { font-size: 8.6pt; text-transform: uppercase; letter-spacing: .06em;
    font-weight: 700; margin-top: 4mm; }
  .pp-blanks dd { margin: 0; min-height: 7mm; border-bottom: .6pt solid #000; font-size: 10pt; }

  /* ── figures ─────────────────────────────────────────────────────── */
  .pp .mapfig { margin: 3mm 0; break-inside: avoid; page-break-inside: avoid; }
  .pp .mapfig img {
    width: 100%; border: .5pt solid #999; border-radius: 0;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .pp-photo img { max-height: 52mm; object-fit: cover; }
  .pp .mapfig figcaption { font-size: 7.6pt; color: #555 !important; margin-top: 1mm; }

  /* keep headings with their content */
  .pp h1, .pp h2, .pp h3, .pp-sub { break-after: avoid; page-break-after: avoid; }
}
