/* ============================================================
   Lighthouse - M36 "the page files cleanly": print / save-as-PDF brief.
   Linked with media="print" as the LAST stylesheet in every <head> so it
   wins the cascade over each page's inline <style> block (the documented
   inline-cascade trap). Zero effect on screen rendering.

   Every page prints as a typed brief: paper-white, ink-dark, the same
   three brand faces (Rajdhani display · IBM Plex Sans body · JetBrains
   Mono data). Chrome, canvases, beams, motes and decorative SVGs are
   suppressed; headings, body copy, the dossier text content and form
   labels print.

   This sheet also IMPLEMENTS the snap final-state contract in CSS:
   print runs no JS, so every entrance/scrub-gated element is forced to
   its resolved state below - an unscrolled or mid-scroll Cmd+P must
   never emit opacity-0 holes or half-resolved scrub frames.
   ============================================================ */

/* ---------- light token seed ----------
   The dark :root tokens in base.css are re-valued for paper - the first
   concrete seed of the light-theme exploration on the branding follow-up
   list. Component CSS keeps reading the same custom properties. */
:root {
  --canvas: #ffffff;
  --canvas-2: #ffffff;
  --surface: #ffffff;
  --surface-2: #ffffff;
  --text-primary: #141416;
  --text-secondary: #2c2c2f;
  --text-tertiary: #55555a;
  --text-dim: #6d6d72;
  --marigold: #a98c08;        /* deep gold holds contrast on paper */
  --marigold-hover: #a98c08;
  --marigold-soft: #a98c08;
  --marigold-deep: #8a7206;
  --periwinkle: #4a5c9f;      /* ink periwinkle for labels on white */
  --status-ok: #1e7a52;
  --hair: rgba(20, 20, 22, 0.16);
  --hair-strong: rgba(20, 20, 22, 0.34);
}

/* ---------- paper ---------- */
@page { margin: 18mm 16mm; }
html, body { background: #ffffff !important; overflow: visible !important; }
body { color: var(--text-secondary); }
p { orphans: 3; widows: 3; }

/* ---------- zero motion: print is the ultimate settled frame ---------- */
*, *::before, *::after { animation: none !important; transition: none !important; }

/* ---------- final-state contract (mirrors the reduce/?snap overrides) ----------
   Entrance- and scrub-gated elements are painted resolved. */
.reveal, .reveal *,
.gcbox > .edge, .gcbox > .corner, .gcbox > .gcinner,
.wr .word > i, .iie-h1 .word > i,
.iie-eyebrow, .iie-sub, .iie-kicker, .iie-cta,
.r2, .r3,
.dd-row, .dd-verdict,
.cover .seclabel, .cover .lead, .cover .actions,
.ftl-final,
[data-resolve] .uc-card, [data-resolve] .fmn-row,
[data-resolve] .ldr-row, [data-resolve] .led-row,
.fw-lane, .fw-ret, .fw-lab, .fly-iso,
.tb-triad, .apps-ledger, .dos-outputs, .work-outro, .rec-card, .ftl-eyebrow {
  opacity: 1 !important; transform: none !important;
}
/* D130 draft: flywheel lanes print settled (mirror of the ms-lane treatment) */
.fw-lane, .fw-ret { stroke-dashoffset: 0 !important; animation: none !important; }
.dd-rule::after { transform: scaleX(1) !important; }
.tb-principles li::before { width: 34px !important; }
.wwd-aff { opacity: 1 !important; }
.wwd-neg span { opacity: 0.62 !important; }
.didx-head::before, .seg input:checked + label::before, .nbx-card::before { transform: scaleX(1) !important; }

/* ---------- suppressed: chrome, light instruments, decorative art ---------- */
.tbar, .mnav, .mburger, .skip-link,
canvas,
.iie-dots, .iie-dots2, .iie-beamfb, .iie-beam-glow, .iie-beam-v, .iie-tag,
.iie-right, .hr-stage, .hresolve,
.beamfb, .veil, .wwd-sweep,
.enr-lane, .ftl-lane, .ftl-read,
.fviz, .wviz, .glyph, .dg, .method-svg, .sa-visual,
.iie-lockup, .lht-lockup, .sh-unveil-lockup, .res-feat .glyph, .fw-fig,
.nbx-switch, .nbx-view--before, .nbx-open, .nbx-x {
  display: none !important;
}
/* (.prb-ic retired with the CP6 numeric-ref restyle; .iie-lockup/.lht-lockup are
   white SVGs, invisible on paper — the footer prints the ink lockup instead) */

/* ---------- heroes flatten to typed headers (no viewport-height padding) ---------- */
.iie { min-height: 0 !important; height: auto !important; display: block !important; padding: 34px 0 10px !important; }
.iie-grid { display: block !important; }
.cover { min-height: 0 !important; display: block !important; padding: 34px 0 10px !important; overflow: visible !important; }
.page-hero { padding: 34px 0 10px !important; overflow: visible !important; }
.close { min-height: 0 !important; display: block !important; padding: 24px 0 10px !important; }
.sa-grid { grid-template-columns: 1fr !important; } /* visual suppressed in print; copy spans the measure */

/* ---------- scrub runways collapse to content (no dead dark bands) ---------- */
.enrich { height: auto !important; padding-bottom: 24px !important; }
.enrich .enr-pin { position: static !important; min-height: 0 !important; overflow: visible !important; }
.ftl { height: auto !important; }
.ftl-pin { position: static !important; padding: 24px 0 !important; }
.problem { height: auto !important; }
.prob-layout, .prob-head-in, .problem .folder { position: static !important; transform: none !important; }

/* ---------- accordions file open: a brief withholds nothing ---------- */
.didx-panel { grid-template-rows: 1fr !important; }
.didx-pin { overflow: visible !important; }
.didx-head .x { display: none !important; }          /* Sealed/Open toggle chrome */
.didx-body { grid-template-columns: 1fr !important; } /* diagram column is suppressed */
.lhm-panel { grid-template-rows: 1fr !important; }    /* missions docket (D147) */
.lhm-x { display: none !important; }

/* ---------- finding record prints the full LightHouse read (a brief withholds nothing) ---------- */
.nbx-view--after { opacity: 1 !important; transform: none !important; visibility: visible !important; }
.nbx-src { grid-template-rows: 1fr !important; }  /* D160: the disclosed source prints */
.nbx-rowbtn { border-bottom-color: var(--hair) !important; }
.nbx-fill { transform: scaleX(1) !important; background: rgba(20,20,22,0.35) !important; }
.nbx-meter { background: rgba(20,20,22,0.10) !important; }

/* ---------- actuators and fields print as bordered ink ---------- */
.btn { background: transparent !important; color: var(--text-primary) !important; border: 1px solid var(--hair-strong) !important; }
input, select, textarea {
  background: #ffffff !important; color: var(--text-primary) !important;
  border: 1px solid var(--hair-strong) !important;
}
.seg, .seg label { border-color: var(--hair-strong) !important; }
.filebox, .form-status { background: #ffffff !important; border-color: var(--hair-strong) !important; }

/* ---------- the dossier artifact: the metaphor made literal ---------- */
.dos-doc { background: #ffffff !important; border: 1px solid var(--hair-strong) !important; }
.dd-row { border-bottom-color: var(--hair) !important; }
.dd-verdict { color: var(--marigold) !important; border-color: var(--marigold) !important; }
/* evidence marks survive the ink pass: redaction bars + colored pins */
.dd-redact { background: rgba(20, 20, 22, 0.18) !important; }
.dd-redact, .dd-pin, .nbx-fill, .nbx-meter, .kicker .tick,
.didx-head::before, .seg input:checked + label::before, .tb-principles li::before, .dd-rule::after {
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.dd-pin { box-shadow: none !important; }
/* archival caption: reuses the artifact's existing aria-label verbatim - no new copy */
.dos-doc::after {
  content: attr(aria-label);
  display: block; margin-top: 16px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em;
  color: var(--text-tertiary);
}

/* ---------- page-break discipline ---------- */
h1, h2, h3, .seclabel, .kicker { break-after: avoid; break-inside: avoid; }
.dd-row, .dos-doc, .gcbox, .folder, .field, .didx-item, .uc-card, .fmn-row,
.ldr-row, .led-row, .fly-stage, .qcard, .bdo-card, .lhteaser, .lhm-rows li, .lhm-doc, .f-read, .sh-decision-grid article,
.res-register li, .res-note-grid article, .res-standard-grid, .res-close .wrap,
.nbx-card, .res-item, .ft, .form-status, .close .wrap, footer { break-inside: avoid; }

/* ---------- footer files the brief: lockup above the existing © line ----------
   (image asset only - the ink variant already ships in handoff/site/brand/) */
footer, #pagefoot { border-top: 1px solid var(--hair-strong) !important; }
footer .wrap::before, #pagefoot .wrap::before {
  content: ''; display: block; width: 165px; height: 27px; margin: 4px 0 12px;
  background: url('./brand/silent-harbor-lockup-horizontal-ink.svg') no-repeat left center / contain;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
footer .links, #pagefoot .links { display: none !important; } /* nav chrome; links elsewhere keep their text, no URL dumps */
