/* F1 Uitzendbriefing — paper. Whatever page is on screen prints on its own, without the app around it.
   Large type (she reads it on set), black on white, team colours kept as light tints.
   The Teams page follows "Teamoverzicht race Bakoe - PRINT v7": uppercase title, one-line summary,
   per team a right-aligned label in the team tint with a rule above, ▲▼● per driver, dashes below. */

@page{size:A4;margin:13mm 14mm 15mm 14mm;
  @bottom-right{content:counter(page);font:700 13pt "Inter",Arial,sans-serif;color:#000}}

:root,:root[data-theme="dark"]{
  --bg:#fff; --surface:#fff; --surface-2:#fff; --ink:#000; --muted:#333; --line:#9aa3ad; --line-2:#9aa3ad;
  --accent:#000; --accent-soft:#fff; --live:#000; --ok:#000; --info:#000; --info-soft:#fff; --mark:#FFE600;
  color-scheme:light;
}
html{font-size:12.5pt}
*{-webkit-print-color-adjust:exact;print-color-adjust:exact;box-shadow:none!important;animation:none!important;transition:none!important}
body{background:#fff;color:#000;line-height:1.38}
.app{display:block;min-height:0}
.topbar,.nav,.chat,dialog,.toast,.banner,.tools,.seg,.searchrow,.no-print,.dback,
button.btn,.btn,.linkbtn,label.use,input,select,textarea,.chev,.mapctrl,.drop,.warnbox,.intro,.notebox,.ch-in,audio{display:none!important}
.print-only{display:block!important}
.main{padding:0!important}
.page{max-width:none;margin:0}
.page:not(.on){display:none!important}
.scr{display:none!important}
a{color:#000;text-decoration:none}
.card,.tile,.story,.team,ul.rows,.stories,.facts,.stats,.sp-items,.tw,.board,.day,.sx,.up,.qa,.out,.srcl,.tsum,.dhero,.le{background:#fff!important;border:0!important;border-radius:0!important;padding-left:0!important;padding-right:0!important}
.mono{font-family:inherit}

/* print header: title and a small line with the GP and time */
.ph{display:block;margin:0 0 3mm}
.ph h1{font-size:20pt;font-weight:800;text-transform:uppercase;letter-spacing:0;line-height:1.15}
.ph .sub{color:#000;font-size:11pt}
.pstamp{display:block!important;font-size:9.5pt;color:#444;margin:0 0 4mm}
h2.h{font-size:13.5pt;margin:5mm 0 2mm;break-after:avoid;border-bottom:1.2pt solid #000;padding-bottom:1mm}
h2.h small{color:#333}
p,li{orphans:3;widows:3}

/* generic blocks */
.card+.card{margin-top:3mm}
.card h3,.cardh h3{font-size:13pt;break-after:avoid}
.grid2,.tsplit,.setgrid{display:block!important}
.tiles{display:grid!important;grid-template-columns:repeat(3,1fr)!important;gap:2mm 5mm;margin-bottom:4mm}
.tile{padding:0!important;border-top:1.2pt solid #000!important;padding-top:1mm!important;min-height:0}
.tile .tv{font-size:15pt;white-space:normal}
.tile .tl,.tile .ts{color:#000}
.why{background:#fff;border-left:2pt solid #000;padding:0 0 0 3mm}
.tag,.pill,.pb,.st,.pst,.chip{border:.8pt solid #000!important;color:#000!important;background:#fff!important}
.src,.note,.meta,.muted,.warn{color:#333!important}
.src a[href]::after{content:none}
.cites{display:none!important}
ul.rows,.stories,.sp-items{border-top:.8pt solid #9aa3ad!important}
.rowi,.stories li,.sp-items li,.heads li,.le,.sx,.story,.f,.csec,.day,.up,.qa{break-inside:avoid}
.rowi{display:block;border-top:.6pt solid #c3c9cf}
.rowi summary{display:grid;grid-template-columns:8mm 1fr;min-height:0;padding:1.5mm 0}
.rd{padding:0 0 2mm 8mm}
details:not([open])>.rd{display:block}
.topgrid{display:block}
.story{padding:0 0 3mm!important;margin-bottom:2mm;border-bottom:.6pt solid #c3c9cf!important}
.story .sn{color:#000}
.story.used,.rowi.used{opacity:1}
table.tb th{color:#000;border-bottom:1pt solid #000}
table.tb td{padding:1.2mm 2mm;border-bottom:.5pt solid #c3c9cf}
table.tb tr.nl td{color:#000}
.facts{display:grid!important;grid-template-columns:repeat(3,1fr)!important;border-top:1.2pt solid #000!important}
.facts div{padding:1.5mm 2mm 1.5mm 0}
.dsec>h3{color:#000;font-size:11pt;border-bottom:1pt solid #000;padding-bottom:.5mm}
.cmap{max-height:95mm;width:auto;max-width:100%;background:#fff}
.mapinfo{display:none}
.board{container-type:normal}
.br{grid-template-columns:9mm 44mm 13mm 11mm 20mm 18mm 20mm 1fr!important;grid-template-areas:"pos drv gain stops gap int last ty"!important;padding:1mm 0!important;border-top:.5pt solid #c3c9cf}
.br .c-stops,.br .c-int,.br .c-last{display:block!important}
.br .c-stops{grid-area:stops}.br .c-int{grid-area:int}.br .c-last{grid-area:last}
.br.p1 .c-pos span{background:#000}
.bside{display:block}
.evl{max-height:none}
.tdetail:not(:empty)+.tlist,.tsplit.sel .tlist{display:none!important}
.tsplit.sel .tdetail{position:static;max-height:none;overflow:visible}
.cm{break-inside:avoid;border:.6pt solid #999!important;background:#fff!important}

/* ---------- Teamoverzicht (as the PDF) ---------- */
.page.teams .ph .sub{display:none}
.tsum{font-size:13pt;line-height:1.35;margin:0 0 3mm!important;padding:0!important}
.team{margin:0!important;break-inside:avoid;border-top:1pt solid #6b7580!important;padding:1.2mm 0 1.5mm!important}
.team:first-of-type{border-top:0!important}
.team-h{display:table;width:auto;margin:0 0 .8mm auto;min-height:0;border:0!important;background:color-mix(in srgb,var(--tc) 22%,#fff)!important;padding:.3mm 2.2mm!important;font-size:14.5pt;font-weight:800}
.team-h::before{content:none}
.team-h .tn,.team-h .tp{display:inline;font-size:14.5pt;font-weight:800}
.team-h .tp::before{content:" · "}
.team-h .tp small{display:none}
.team-b{padding:0!important}
.drow{padding:.3mm 0 .3mm 6mm!important;line-height:1.36}
.drow .mk{left:0;top:.3mm;width:5mm;height:calc(1rem*1.36);justify-content:flex-start;color:#000!important;font-size:11pt}
.subl{margin:0 0 0 6mm}
.subl li{font-size:12.5pt;padding-left:4.5mm;margin-top:.3mm}
.subl li::before{color:#000}
.tstory{padding:.3mm 0 .3mm 6mm!important}
.tstory .mk{left:0;top:.3mm;height:calc(1rem*1.38);justify-content:flex-start;color:#000!important}
.tnotes{margin:0 0 0 12mm!important;border:0!important;padding:0!important}
.tnotes .subl{margin:0}
.tnotes .subl li{padding-left:4.5mm}
.tnotes .subl li::before{content:"–"}
.dn{background:var(--tc)!important;border-color:color-mix(in srgb,var(--tc) 78%,#000);text-shadow:none}
mark,.hl,.mtag{background:#FFE600!important;color:#000;font-weight:700}
/* names are in normal case on screen; on paper in capitals, as on the reference print-out */
.caps{text-transform:uppercase}
.drow .dl{font-weight:700}
.scr-l .dl{font-weight:400} /* Prep script: only the head is bold, as on v7 */
/* What is folded away on screen prints unfolded (app.js opens every details before printing): the summary a
   tap shows under a news line. The pseudo-element keeps it open when a print starts without that event.
   Statman's English original under a Dutch stat stays off the paper: the Dutch line is what she reads. */
details::details-content{content-visibility:visible}
.lmo{display:block;margin:.4mm 0 .8mm;padding:0 0 0 2.5mm!important;border-left:1.2pt solid #9aa3ad;border-radius:0;background:#fff!important;font-size:11pt;line-height:1.3;color:#000}
.smo{display:none!important}
.lmd>summary .dl::after{display:none}

/* ---------- Prep ---------- */
#pg-spiek{line-height:1.3}
#pg-spiek .sp-block{margin:0}
#pg-spiek h2.h{margin:3mm 0 1.2mm}
#pg-spiek .sp-items li{padding:.7mm 0!important}
table.pen th:nth-child(3),table.pen td:nth-child(3){white-space:nowrap}
/* start grid and standings: two columns instead of a full-width table */
.plist{columns:2;column-gap:9mm;list-style:none;margin:0;padding:0;border-top:.8pt solid #9aa3ad;break-inside:avoid}
.plist.rows2{columns:auto;display:grid!important;grid-template-columns:1fr 1fr;column-gap:9mm;break-inside:auto}
.plist li{break-inside:avoid;display:grid;grid-template-columns:7mm minmax(0,1fr) auto;gap:0 2mm;align-items:baseline;padding:.8mm 0;border-bottom:.5pt solid #c3c9cf}
.plist li.nl{font-weight:700}
.plist .v{text-align:right;font-variant-numeric:tabular-nums}
.plist .v small{font-size:10.5pt;color:#333}

/* ---------- Rundown (page and the rundown block on the Prep) ---------- */
.rdlist .rdi{display:grid;grid-template-columns:10mm minmax(0,1fr);gap:0 2mm;align-items:baseline;padding:.7mm 0!important;break-inside:avoid}
.rdx{color:#000}

/* ---------- Weather card (Weer page and the Prep) ---------- */
.day{border-top:.8pt solid #9aa3ad!important;padding:1.5mm 0!important}
svg.wx{width:13mm;height:13mm}
.wxp span{color:#000}
.wbar{border:.5pt solid #9aa3ad}

/* The qualifying tables (Na Q1, Na Q2, Na Kwali): on paper each driver is one line of data (position, driver,
   time or gap, fastest sector) with his note full width underneath, instead of a narrow fourth column. */
.team:has(.qtab){break-inside:auto}
table.qtab,.qtab tbody{display:block;width:100%}
.qtab tr{display:grid;grid-template-columns:13mm max-content 1fr;column-gap:3mm;align-items:baseline;break-inside:avoid;padding:.9mm 0;border-bottom:.5pt solid #c3c9cf}
.qtab tr:last-child{border-bottom:0}
.qtab td{display:block;padding:0!important;border:0!important;white-space:normal}
.qtab .qp{white-space:nowrap}
.qtab .qp .mk{color:#000!important}
.qtab .qn{font-weight:700;white-space:nowrap}
.qtab .qt{color:#000;white-space:nowrap}
.qtab .qs{display:inline;margin-left:2.5mm;color:#000;font-weight:700}
.qtab .qx,.qtab td[colspan]{grid-column:2 / -1;font-size:12.5pt;line-height:1.32}
.qtab .qx:empty{display:none}
