/* Print view: a white, simplified layout for printing or saving as a PDF.
   Turned on by the small footer toggle (remembered for this browser tab only),
   and applied automatically when the browser's own Print command is used.
   Every rule is scoped to html.print-mode, so normal pages are untouched. */

.print-bar, .print-masthead { display: none; }
.print-toggle { background: none; border: 1px solid #3a3d44; color: #9a968d; font: 500 12px/1 var(--font-ui); padding: 6px 10px; border-radius: 4px; cursor: pointer; }
.print-toggle:hover { color: #e6e2d8; border-color: #5a5d64; }

/* ---------- Screen preview: the page sits on a sheet of paper */
html.print-mode { background: #d9d6cf; }
html.print-mode body { background: #fff; color: #111; max-width: 8.5in; margin: 0 auto; box-shadow: 0 0 0 1px rgba(0,0,0,.08), 0 6px 30px rgba(0,0,0,.14); font-size: 14px; }
html.print-mode, html.print-mode * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
html.print-mode *, html.print-mode *::before, html.print-mode *::after { transition: none !important; animation: none !important; }
html.print-mode .wrap { padding: 0 28px; }

html.print-mode .print-bar { display: block; position: sticky; top: 0; z-index: 60; background: var(--ink); color: var(--bone); font: 14px/1.35 var(--font-ui); }
.print-bar .wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
.print-bar .pb-text { margin-right: auto; }
.print-bar .pb-hint { display: block; color: #b9b5ab; font-size: 12.5px; }
.print-bar button { font: 700 14px/1 var(--font-ui); padding: 10px 14px; border-radius: 6px; cursor: pointer; }
.print-bar .pb-save { background: var(--brass-bright); color: var(--ink); border: 0; }
.print-bar .pb-exit { background: none; color: var(--bone); border: 1px solid #5a5d64; }
.print-bar .pb-exit:hover { border-color: var(--bone); }

/* ---------- Simplified header: a newspaper-style masthead replaces the site header */
html.print-mode .print-masthead { display: block; text-align: center; padding: 22px 28px 12px; border-bottom: 3px double #111; }
.print-masthead .pm-brand { font: 700 24px/1.1 var(--font-display); letter-spacing: .01em; }
.print-masthead .pm-edition { font: 700 11px/1 var(--font-ui); letter-spacing: .24em; text-transform: uppercase; color: #444; margin-top: 7px; }
.print-masthead .pm-meta { font: 11px/1.3 var(--font-ui); color: #555; margin-top: 8px; overflow-wrap: anywhere; }

html.print-mode :is(.banner, .site-header, .skip, .program-tabs, .nav-toggle, .print-toggle, .year-picker, .pager, .chips, .gm-btn, .road-more, .as-more, .explore, .more, .ws-screen) { display: none !important; }
html.print-mode .site-footer .wrap > div:not(.legal) { display: none; }

/* ---------- Colour blocks become white with a program-coloured rule */
html.print-mode body[data-program] { background: #fff; }
html.print-mode .program-band { background: #fff; color: #111; border-bottom: 4px solid var(--p-primary); border-radius: 0; }
html.print-mode .program-band::before, html.print-mode .program-band::after { display: none; }
html.print-mode .program-band .wrap { padding-top: 16px; padding-bottom: 14px; }
html.print-mode .program-band .logo { width: 64px; height: 64px; filter: none; box-shadow: none; background: none; padding: 0; clip-path: none; border-radius: 0; }
html.print-mode .program-band h1 { color: var(--p-primary); font-size: 40px; }
html.print-mode .program-band .eyebrow, html.print-mode .program-band .sub { opacity: 1; color: #333; }
html.print-mode .masthead { background: #fff; color: #111; border-bottom: 4px solid var(--p-primary, #111); }
html.print-mode .masthead::before, html.print-mode .masthead::after { display: none; }
html.print-mode .masthead * { color: #111; }
html.print-mode .page-head { background: #fff; padding: 20px 0 14px; }
html.print-mode h2.section:has(+ .explore) { display: none; }
/* Front page "Road to" section: dark panel becomes paper */
html.print-mode .road { background: #fff; color: #111; padding: 22px 0; border-top: 3px double #111; }
html.print-mode .road .kicker { color: var(--brass); }
html.print-mode .phases li { color: #555; }
html.print-mode .phases li.now { color: #111; }
html.print-mode .phases li::before, html.print-mode .phases .dot { background: #cfcabd; }
html.print-mode .phases .dot { border-color: #fff; }
html.print-mode .phases-big .ph-desc, html.print-mode .phases-big li.now .ph-desc { color: #555; }
html.print-mode .teaser h3, html.print-mode .t-name a { color: #111; }
html.print-mode :is(.t-sum, .t-meta) { color: #555; }
html.print-mode .teaser li { border-top-color: #e2ded3; }
html.print-mode .teaser.locked { background: #fff; border-top-color: #bbb; }
html.print-mode main { padding-bottom: 20px; }

/* ---------- Cards stay whole; shapes are simplified */
html.print-mode :is(.stat, .coach-card, .program-card, .bgame, .leader, .teaser, .aw-card, .callout, .facts, .depth-unit, .sd-split, .rw-card, .player-head, figure, blockquote) { break-inside: avoid; page-break-inside: avoid; }
html.print-mode :is(.stat, .program-card, .coach-card, .aw-card, .teaser) { clip-path: none; box-shadow: none; background: #fff; border: 1px solid #c9c4b8; }
html.print-mode :is(h1, h2, h3, h4) { break-after: avoid; page-break-after: avoid; }
html.print-mode h2.section { margin-top: 26px; }
html.print-mode a { text-decoration: none; color: inherit; }

/* ---------- Tables fit the page width and repeat their headers */
html.print-mode .table-wrap { overflow: visible; border: 0; border-radius: 0; background: none; }
html.print-mode table.data { font-size: 12px; }
html.print-mode table.data thead { display: table-header-group; }
html.print-mode table.data th { background: none !important; color: #111; border-bottom: 1.5px solid #111; position: static; padding: 6px 7px; white-space: normal; }
html.print-mode table.data td, html.print-mode table.data tbody th { padding: 5px 7px; }
html.print-mode table.data tr { break-inside: avoid; page-break-inside: avoid; }
html.print-mode table.data :is(tr.hl td, tr.hl th) { background: #f1ede2 !important; }
html.print-mode .bracket { overflow: visible; grid-template-columns: repeat(var(--rounds), minmax(0, 1fr)); gap: 8px; }

/* ---------- Footer: just the disclaimer line */
html.print-mode .site-footer { background: #fff; color: #555; border-top: 1px solid #111; }
html.print-mode .site-footer .wrap { padding-top: 12px; padding-bottom: 16px; display: block; }
html.print-mode .site-footer .legal { border-top: 0; padding-top: 0; color: #555; font-size: 11px; }

/* ---------- Print editions: season recaps, the Records Book and player cards */
html.print-mode body.print-edition .stat-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
html.print-mode body.print-edition .stat-grid .stat:first-child { grid-column: auto; }
html.print-mode body.print-edition .stat { padding: 10px 12px; }
html.print-mode body.print-edition .stat .n { font-size: 28px; }
html.print-mode body.print-edition h2.section { border-bottom: 1px solid #111; padding-bottom: 4px; font-size: 20px; }

/* ---------- Actual printing */
@media print {
  @page { margin: 0.5in; }
  .print-bar { display: none !important; }
  html.print-mode { background: #fff; }
  html.print-mode body { max-width: none; margin: 0; box-shadow: none; font-size: 10.5pt; }
  html.print-mode .wrap { padding: 0; max-width: none; }
  html.print-mode .print-masthead { padding: 0 0 10px; }
  /* Without scripts, still drop the site chrome */
  .banner, .site-header, .program-tabs, .skip { display: none !important; }
}

/* Pale-on-dark text in the Road sections */
html.print-mode .road p, html.print-mode .road-page-head p { color: #333; }
html.print-mode .lock { color: #555; }
html.print-mode .lock b, html.print-mode .teaser.locked h3 { color: #111; }

/* League Almanac conference grid: let school names wrap so 11 columns fit a page */
html.print-mode table.data.matrix :is(td, th) { padding: 4px 4px; font-size: 11px; white-space: normal; }
html.print-mode table.data.matrix .team { display: inline-flex; white-space: normal; align-items: flex-start; gap: 3px; }
html.print-mode table.data.matrix .team span { max-width: none; overflow: visible; line-height: 1.15; }
html.print-mode table.data.matrix .tlogo { width: 13px; height: 13px; }
