/* guideprint.css — print stylesheet + on-screen reader styling for the published
   Anchorage Guide artifact and the #view-guides reader.
   Loaded by BOTH the standalone artifact HTML and index.html (#view-guides). Because two
   surfaces share this file, ANY change here requires bumping the ?v= query on every <link>
   that references it (per CLAUDE.md's ?v= bump rule) or stale caches serve mismatched styles.
   Self-contained: no @import, no external/webfonts, only the app's CSS vars with fallbacks. */

/* ---- On-screen reader (scoped under .guide-doc so it never fights the app dark theme) ---- */
.guide-doc{
  --gp-ink:var(--ink,#e9eff8); --gp-dim:var(--dim,#90a4c4);
  --gp-edge:var(--edge,#16233c); --gp-teal:var(--teal,#3fd0c9);
  --gp-serif:ui-serif,Georgia,'Iowan Old Style','Times New Roman',serif;
  --gp-mono:ui-monospace,'SF Mono','JetBrains Mono',Menlo,monospace;
  max-width:72ch; margin:0 auto; color:var(--gp-ink);
  line-height:1.55; font-size:15px;
  font-family:ui-sans-serif,-apple-system,'Segoe UI',Roboto,sans-serif;
}
.guide-doc h1,.guide-doc h2,.guide-doc h3{
  font-family:var(--gp-serif); line-height:1.2; color:var(--gp-ink); font-weight:600;
}
/* Every font-size in this file is ABSOLUTE, on purpose. It used to be a chain of `em` factors off
   one root, which reads well but cannot be checked: `em` COMPOUNDS, so a size is only as big as
   the product of everything above it. Measured in the print cascade, `.78em` on the confidence
   matrix — nested inside `table{.9em}` inside an 11pt root — resolved to 10.296px, and the URL
   suffix `a::after{.8em}` inside that same table resolved to 10.56px. Both were under the 11px
   floor while every declaration looked innocent on its own line, and a floor guard reasoning from
   the root alone computed 11.44px and passed them.
   The cost is that rescaling the document now means editing the sizes rather than one root value.
   That is the trade: a printed briefing's smallest type is provable from the declaration. */
.guide-doc h1{font-size:30px; margin:0 0 .4em}
.guide-doc h2{font-size:22.5px; margin:1.6em 0 .5em; padding-bottom:.25em; border-bottom:1px solid var(--gp-edge)}
.guide-doc h3{font-size:18px; margin:1.3em 0 .4em}
.guide-doc p{margin:.7em 0}
.guide-doc .guide-section,.guide-doc .guide-anchorage{margin:2.2em 0}
.guide-doc a{color:var(--gp-teal); text-decoration:none}
.guide-doc a:hover{text-decoration:underline}
.guide-doc table{width:100%; border-collapse:collapse; margin:1em 0; font-size:13.5px}
.guide-doc th,.guide-doc td{
  padding:6px 10px; border:1px solid var(--gp-edge); text-align:left;
  font-variant-numeric:tabular-nums;
}
.guide-doc th{color:var(--gp-dim); font-weight:600}
.guide-doc .guide-meta,.guide-doc .guide-src{font-family:var(--gp-mono); font-size:12.5px; color:var(--gp-dim)}
.guide-doc .guide-print-footer{display:none}
.guide-doc .confidence-matrix td,.guide-doc .confidence-matrix th{
  font-family:var(--gp-mono); font-size:12px; letter-spacing:.5px; text-align:center;
}

/* ---- Print artifact ---- */
@media print{
  @page{margin:16mm 14mm 20mm}

  /* Hide app chrome */
  #topbar,#tabs,.map-ctrl,.bm-switch,nav,button,.no-print,
  .fchip,.compass,.hud-model{
    display:none !important;
  }

  html,body{
    height:auto !important; overflow:visible !important;
    background:#fff !important; color:#000 !important;
  }

  /* Black-on-white, full-width content, strip dark surfaces */
  .guide-doc,.guide-doc *{
    background:transparent !important; color:#000 !important;
    box-shadow:none !important; text-shadow:none !important;
  }
  .guide-doc{
    max-width:none !important; width:100% !important; margin:0 !important;
    font-size:11pt; line-height:1.4;
  }
  .guide-doc h1{font-size:22pt}
  .guide-doc h2{font-size:16.5pt}
  .guide-doc h3{font-size:13pt}
  .guide-doc table{font-size:10pt}
  .guide-doc .guide-meta,.guide-doc .guide-src{font-size:9pt}
  .guide-doc a{color:#000 !important; text-decoration:none}
  /* the printed URL suffix hangs off links that live INSIDE the source-register table, so as an
     `em` it compounded down to 10.56px — measured, not assumed */
  .guide-doc a[href^="http"]::after{content:" (" attr(href) ")"; font-size:8.5pt; color:#333}

  /* Section / anchorage page breaks; keep atomic blocks intact */
  .guide-section,.guide-anchorage{
    break-before:page; page-break-before:always;
  }
  .guide-doc>.guide-section:first-child,
  .guide-doc>.guide-anchorage:first-child{
    break-before:auto; page-break-before:auto;
  }
  .guide-fig,table,.confidence-matrix,figure{
    break-inside:avoid; page-break-inside:avoid;
  }
  h1,h2,h3{break-after:avoid; page-break-after:avoid}

  /* Tabular figures for data tables */
  table,.guide-doc td,.guide-doc th{
    font-variant-numeric:tabular-nums;
    border-color:#000 !important;
  }
  table{border-collapse:collapse; width:100%}
  th,td{border:1px solid #000 !important; padding:4px 7px}

  /* Monochrome-safe confidence matrix: rely on text labels + border, never color.
     `.guide-doc` prefix is load-bearing. Without it this selector is (0,1,1) and loses to the
     on-screen `.guide-doc .confidence-matrix td` at (0,2,1) — media queries do not add
     specificity — so the print size here was dead code and the matrix printed at the screen
     rule's size instead. With matching specificity, later source order wins in print. */
  .guide-doc .confidence-matrix td,.guide-doc .confidence-matrix th{
    border:1px solid #000 !important; text-align:center;
    font-family:ui-monospace,Menlo,monospace; font-size:8.5pt; letter-spacing:.5px;
    text-transform:uppercase; padding:3px 5px;
  }

  /* Mandatory footer disclaimer repeated on every printed page.
     Sized in POINTS, which is why the type floor originally missed it: 6.5pt is 8.67px, so the
     one line that has to survive a greyscale print of a briefing was the smallest type in the
     document. 9.5pt (12.67px) clears the 11px floor and makes this the LARGEST of the printed
     small-print elements — above the source-register URLs and the confidence matrix at 8.5pt and
     the metadata line at 9pt — while still reading as a footer against 11pt body copy. */
  .guide-print-footer{
    display:block !important; position:fixed; left:0; right:0; bottom:0;
    text-align:center; font-family:ui-monospace,Menlo,monospace;
    font-size:9.5pt; letter-spacing:1.2px; text-transform:uppercase;
    color:#000 !important; border-top:.5pt solid #000; padding:3px 0 2px;
  }
}