/* /css/print.css: media="print" (§6.12). Paper is light: light tokens, no chrome, no ads, no controls.
   Fallback plates and long descriptions are shown; link URLs are printed; figures and exercises don't split.
   html.print-solutions forces every solution open (for printing worked answers). */

:root, :root[data-theme="dark"] {
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F6F3EC; --ink: #000000; --ink-muted: #444444;
  --rule: #BBBBBB; --grid-minor: #E5E5E5; --c-lab: #2457A6; --c-rocket: #B83C0A; --c-light: #B07A0A;
  --c-light-text: #8A5A00; --c-inv: #0E7568; --c-you: #6D3FC0; --c-ok: #2A752E; --c-bad: #B3261E;
  --shadow: none; --shadow-lift: none; --paper-dot: transparent;
  color-scheme: light;
}
@page { margin: 16mm 14mm; }
html { font-size: 11pt; }
body { background: #fff !important; color: #000; background-image: none !important; }

.site-header, .rail, .rail-backdrop, .rail-toggle, .skip-link, .ad-slot, #consent-root, .consent-banner, .consent-dialog,
.toast-region, .lab-toolbar-wrap, .lab-controls, .lab-lock, .ex-actions, .ex-feedback, .ex-solution-anyway, .we-bar,
.ct-actions, .ct-predict, .ct-console, .ct-after, .code-editor .ce-help, .cp-footer, .reading-progress, .noscript,
.chip-toggle, .theme-toggle, button { display: none !important; }

.page { display: block; padding: 0; }
main { max-width: none; }
.lab-stage > *:not(.fallback):not(.plate-svg):not(svg) { display: none !important; }
.lab-stage > .fallback, .lab-stage > .plate-svg, .lab-stage > svg, .lab-stage [hidden].fallback { display: block !important; }
.lab-stage > svg[hidden], .lab-stage > .plate-svg[hidden] { display: block !important; }
details.long-desc > *, details.deep-dive > *, details.hint > * { display: block !important; }
details.long-desc, details.deep-dive { display: block; }
.worked-example > li[hidden] { display: block !important; }
html.print-solutions details.solution > *, html.print-solutions details.ex-model > * { display: block !important; }
html.print-solutions details.solution[hidden], html.print-solutions details.ex-model[hidden] { display: block !important; }

figure, .exercise, .callout, .recap, .reconcile, .worked-example, .code-task, table, pre { break-inside: avoid; page-break-inside: avoid; }
h1, h2, h3, h4 { break-after: avoid; page-break-after: avoid; }
.sidenote, .sagredo { float: none; width: auto; margin: .6em 0; }
figure.wide, figure.full { width: auto; margin-left: 0; margin-right: 0; }
.exercise, .code-task, figure.lab, .reconcile, .recap { box-shadow: none; }

a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #444; word-break: break-all; }
a[href^="/"]:not(.next-card):not(.rail-link):not(.brand)::after { content: " (" attr(href) ")"; font-size: .8em; color: #444; }
a.ext::after { content: " (" attr(href) ")"; }
.next-card::after { content: none; }
