/* Front of the Pile print styles. The brand is paper; this makes every page a takeaway.
   Loaded on every page with media="print". Nothing here affects the screen. */
@page { margin: 18mm 16mm; }
html, body { background: #fff !important; color: #000 !important; font-size: 11.5pt; line-height: 1.5; }
body { overflow: visible !important; }

/* chrome, controls and anything interactive */
nav, footer, .cta, .btn, .reset, .pulse, .nav-right, .nav-cta, .az, .go,
button, form, input, select, textarea, [data-pulse], [data-notify-banner], .copybtn, .file-actions,
.spec-tab, .panel { display: none !important; }

/* layout */
.wrap { max-width: none !important; padding: 0 !important; margin: 0 !important; }
header { padding: 0 0 6mm !important; }
h1 { font-size: 22pt !important; line-height: 1.1 !important; margin: 0 0 4mm !important; }
h2 { font-size: 14pt !important; margin: 8mm 0 2mm !important; page-break-after: avoid; }
h3 { page-break-after: avoid; }
p, li, dd { orphans: 3; widows: 3; }
.kicker, .meta, .sub, .standfirst { color: #333 !important; }

/* boxes keep their edges but drop tints; never split across pages */
.box, .box2, .q, .card, .fixes, .verdict, .trust, .gate, figure, .diagram, .scalefig, .calc, .result, .file {
  page-break-inside: avoid; break-inside: avoid;
  background: #fff !important; box-shadow: none !important;
}
.box, .box2, .q, .card, .fixes, .verdict, .trust, .gate { border: 1.5px solid #000 !important; border-radius: 4px !important; }
.card::before { display: none !important; }

/* diagrams: full width, no scroll frame, no swipe hint */
.dscroll { overflow: visible !important; }
.dscroll::after, .swipe { display: none !important; }
svg { max-width: 100% !important; height: auto !important; }

/* links: keep the text, add the address for anything off-site */
a { color: #000 !important; text-decoration: none !important; }
a[href^="http"]:not([href*="frontofthepile.com.au"])::after {
  content: " (" attr(href) ")"; font-size: 8.5pt; color: #444; word-break: break-all;
}
.trust a::after { content: none; }
.trust dd a { text-decoration: underline !important; }

/* tools: print the state, not the controls */
.opts .opt { border: 1px solid #999 !important; background: #fff !important; }
.opt input:checked ~ .dot { background: #000 !important; }
.gates .gate.clear { border-color: #000 !important; }
.gates .gate.query, .gates .gate.missing { border-style: dashed !important; }
.readout, .cardnote { border-top: 1px dashed #999 !important; }

/* glossary: one entry per line block */
.gl dt { page-break-after: avoid; }
.gl dt .form { color: #000 !important; }

/* a discreet source line on every printed page */
main::after, .wrap::after {
  content: "frontofthepile.com.au \2014 general information, not legal advice. Check the date on the page: rules change.";
  display: block; margin-top: 10mm; padding-top: 3mm; border-top: 1px solid #000;
  font-size: 8.5pt; color: #333;
}
