/* Paper only (linked with media="print"). Two cases.
   1. The printed plan. While #print-root exists it is the one thing on the page: the app is hidden and #print-root
      shows (app.css hides it on screen). Black on white in both themes, no pictures, one day never split across pages.
      Markup (the Plan screen builds it for its Print button and for the browser's own Print, on beforeprint):
        div#print-root.pp > h1.pp-h + section.pp-day > h2 + p.pp-date + table.pp-t
        table.pp-t: colgroup (col.pp-c1 to .pp-c4: the same widths on every day), thead th x 4, then one tr per
        exercise: td exercise, td sets x reps, td target (a strength lift: one td across both), td with span.pp-boxes
        holding one empty span.pp-box per set, five to a line (the lifter writes what they did).
        Optional: p.pp-sub under the h1, p.pp-note in place of a table.
   2. Any other screen (no #print-root): the screen itself as a plain page, black on white in both themes, with the
      rail or tab bar, the fixed bars and the buttons left out.
   Direction comes from <html dir>, and logical properties keep Arabic right to left. */
@page{margin:14mm}
html,body{background:#fff!important;color:#000!important}
body:has(#print-root)>*:not(#print-root){display:none!important}

/* ---------- 2. any screen, as a plain page ---------- */
/* the light palette on white paper whatever the theme: black ink, grey rules, no navy block, no shadows, no rail */
:root{color-scheme:light!important;
  --bg:#fff!important;--surface:#fff!important;--surface-2:#f1f1f1!important;--surface-3:#e0e0e0!important;--ink:#000!important;--muted:#333!important;
  --line:#999!important;--line-soft:#bbb!important;--card-line:#999!important;--line-strong:#555!important;
  --accent:#1b3fc0!important;--accent-ink:#fff!important;--accent-soft:#e7edff!important;--accent-line:#bfcdfb!important;
  --good:#0f7c43!important;--good-ink:#fff!important;--good-soft:#dff3e7!important;
  --warn:#9a4a08!important;--warn-soft:#fdeadb!important;--bad:#c0261a!important;--bad-soft:#fde7e4!important;
  --gold:#c98a0b!important;--gold-soft:#fcf1d4!important;--gold-line:#efd28c!important;--gold-ink:#1f1500!important;--st-high:#0a4e63!important;
  --hero:#fff!important;--hero-2:#fff!important;--hero-ink:#000!important;--hero-muted:#333!important;--hero-line:#999!important;--hero-chip:#f1f1f1!important;
  --hero-cta:#fff!important;--hero-cta-ink:#000!important;
  --m1:#2453f0!important;--m2:#86a0f7!important;--m0:#d3d9e0!important;--sil:#e7ebef!important;
  --fig:#98a3af!important;--fig-far:#c8cfd6!important;--equip:#262c33!important;--equip-far:#8d96a0!important;--equip-soft:#a7b0ba!important;
  --chart-1:#2453f0!important;--chart-2:#e0453c!important;--chart-3:#0f7c43!important;--chart-4:#9a4a08!important;--chart-grid:#ccc!important;
  --seg-on:#fff!important;--knob:#fff!important;--e1:none!important;--e2:none!important;--shadow-knob:none!important;
  --rail-w:0px!important;--tabbar-h:0px!important}
/* bars and charts keep their fills (they are the content); every surface is white, so this costs no ink */
body{-webkit-print-color-adjust:exact;print-color-adjust:exact}
*,*::before,*::after{animation:none!important;transition:none!important}
/* left out on paper: the rail or tab bar, everything fixed over the page, sheets and buttons (rows that open something
   stay: they hold the text). The small exercise pictures stay too, since the rows are laid out around them. */
.tabbar,.rest-bar,.toast,.live-pill,.sheet-backdrop,.fx-confetti,.save-alert,.ob-nav,.wk-nav,.wk-dock,.wk-done-bar,.eff-pick,.lib-cta,.warm-cta,
.btn,.iconbtn,.lg-chev,video{display:none!important}
/* nothing sticks or floats, and the page uses the paper's own margins */
.shell{display:block!important;min-height:0!important;padding:0!important}
/* (the screen's own 16px side padding stays: rows that bleed to the screen edge are built around it) */
.topbar{position:static!important;min-height:0!important;padding-block:0 3mm!important;background:none!important;-webkit-backdrop-filter:none!important;backdrop-filter:none!important;border-block-end:.3mm solid #000!important}
.main{max-width:none!important;padding-block:5mm 0!important}
.wk-steps,.split-side{position:static!important}
.card,.list-group,.note,tr,li{break-inside:avoid;page-break-inside:avoid}
h1,h2,h3{break-after:avoid;page-break-after:avoid}
a{color:inherit!important;text-decoration:none!important}

/* ---------- 1. the printed plan ---------- */
#print-root{display:block;color:#000;background:#fff;font:400 11pt/1.4 "Barlow","Cairo",system-ui,sans-serif;color-scheme:light;
  -webkit-print-color-adjust:exact;print-color-adjust:exact}
#print-root *{color:#000!important;background:none!important;box-shadow:none!important;letter-spacing:normal}
#print-root :is(img,picture,svg,canvas,video,.thumb,.media){display:none!important}
.pp-h{margin:0 0 2mm;font:700 18pt/1.2 "Barlow","Cairo",system-ui,sans-serif}
.pp-sub{margin:0 0 5mm;max-width:none;font-size:10pt}
.pp-day{break-inside:avoid;page-break-inside:avoid;margin:0 0 7mm}
/* the day's name and, on the same line at the far end, "Date:" with a rule to write on */
.pp-day{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:6mm;align-items:baseline}
.pp-day>h2{margin:0 0 2mm;font:700 13pt/1.25 "Barlow","Cairo",system-ui,sans-serif;overflow-wrap:anywhere}
.pp-day>.pp-date{margin:0 0 2mm;max-width:none;font-size:10pt;white-space:nowrap}
.pp-rule{display:inline-block;inline-size:36mm;margin-inline-start:1.5mm;border-block-end:.3mm solid #000}
.pp-day>.pp-t,.pp-day>.pp-note{grid-column:1 / -1}
/* fixed columns, the same on every day, so they line up down the page: exercise, sets, target, write-in boxes */
.pp-t{inline-size:100%;border-collapse:collapse;table-layout:fixed}
.pp-c1{width:33%} .pp-c2{width:17%} .pp-c3{width:15%} .pp-c4{width:35%}
.pp-t th,.pp-t td{padding:1.6mm 2mm;border-block-end:.3mm solid #000;text-align:start;vertical-align:middle;overflow-wrap:anywhere}
.pp-t th{font:700 8pt/1.2 "Barlow","Cairo",system-ui,sans-serif;text-transform:uppercase;border-block-end-width:.5mm}
html[lang="ar"] .pp-t th{text-transform:none;font-size:9pt}
.pp-t tr{break-inside:avoid;page-break-inside:avoid}
.pp-t td:first-child{font-weight:600}
/* one box per set, sized to the number of sets: they share the column (up to 18mm each), five to a line */
.pp-boxes{display:grid;grid-template-columns:repeat(var(--n,3),minmax(0,18mm));gap:1.5mm}
.pp-box{display:block;block-size:8mm;border:.3mm solid #000;border-radius:1mm}
.pp-note{margin:1.5mm 0 0;max-width:none;font-size:9pt}
