/* Wave 2 W3 (13 Sept 2026) - "every page printable, nicely" + the Reports tab.
   ONE generic print mechanism for every tab except Roadmap (its own one-page .rmp sheet, print-roadmap.css)
   and Capacity (the live tab's @media print path in app.css): buildPrintSheet(key) in js/app.js builds a
   <div class="psheet psheet-<portrait|landscape> psheet-<key>"> from render<Tab>Print(), appends it to <body>
   for the print only, adds body.print-sheet, prints, and removes both on afterprint.
   Named pages give each orientation its own @page (mixed-orientation print recipe, 12 Sept). Every size inside
   the sheet is in em so the fit step (width is the hard rule - a sheet may run to more pages, never clips) scales
   the whole sheet with one font-size. .ps-body styles are shared with the Reports tab ON SCREEN (same HTML).
   Page breaks: small units (an initiative, a table block, a problem line) never split; a goal or a team may run
   across a page, its heading always stays with what follows. Nothing here touches app.css / shell.css /
   wave2.css / print-roadmap.css. */
@page psp{size:A4 portrait;margin:12mm}
@page psl{size:A4 landscape;margin:10mm}
.psheet{display:none}
body.print-sheet{background:#fff;margin:0;padding:0}
body.print-sheet #appShell,body.print-sheet #authGate,body.print-sheet #cfgBanner,body.print-sheet .dlg-wrap{display:none !important}
body.print-sheet .psheet{display:block}
.psheet{box-sizing:border-box;margin:0 auto;padding:0;background:#fff;color:#144265;
  font-family:Quicksand,"Segoe UI",system-ui,-apple-system,sans-serif;font-size:11.5px;line-height:1.3;font-weight:500;
  -webkit-print-color-adjust:exact;print-color-adjust:exact}
.psheet *{box-sizing:border-box}
.psheet-portrait{page:psp;width:186mm}
.psheet-landscape{page:psl;width:277mm}
@media print{body.print-sheet{height:auto;overflow:visible}}
/* the head every sheet shares: mark, plan name, sub line, "Printed <date>" */
.ps-head{display:flex;align-items:center;gap:.9em;margin:0 0 .9em 0;padding:0 0 .6em 0;border-bottom:2px solid #E3EBE2;break-inside:avoid;break-after:avoid}
.ps-mark{width:3.2em;height:2em;flex:none;border-radius:.4em;overflow:hidden;display:block}
.ps-title{flex:1;min-width:0}
.psheet h1,.rep-view h1{font-size:1.6em;font-weight:700;margin:0;line-height:1.15;color:#144265;letter-spacing:-.01em;text-transform:none}
.ps-sub{font-size:.95em;color:#5C717F;margin-top:.15em}
.ps-meta{font-size:.9em;color:#5C717F;text-align:right;flex:none;line-height:1.3}
/* ---- shared body styles (the sheet AND the Reports tab on screen) ---- */
.ps-body{color:#144265}
.ps-body section{margin:0 0 1em 0}
.ps-avoid{break-inside:avoid;page-break-inside:avoid}
.ps-body h2{font-size:1.3em;font-weight:700;margin:0 0 .35em 0;letter-spacing:0;line-height:1.2;color:#144265;break-after:avoid}
.ps-body h3{font-size:1.08em;font-weight:700;margin:.2em 0 .3em 0;color:#144265;break-after:avoid}
.ps-body h4{font-size:1em;font-weight:700;margin:.5em 0 .25em 0;color:#144265;break-after:avoid}
.ps-body p{margin:.25em 0}
.ps-body ul{margin:.2em 0 .4em 1.3em;padding:0}
.ps-body li{margin:.12em 0}
.ps-muted,.psheet .muted,.rep-view .muted{color:#5C717F}
.ps-small,.psheet .small,.rep-view .small{font-size:.86em}
.ps-none{color:#5C717F;font-style:italic;margin:.2em 0}
.ps-goal{border-left:.4em solid #57A163;padding:.1em 0 .1em .8em}
.ps-goal-head{display:flex;align-items:center;gap:.5em;break-after:avoid}
.ps-dot{width:.75em;height:.75em;border-radius:50%;display:inline-block;flex:none;vertical-align:middle}
/* W0 rule carried to paper: the success statement at the goal title's own size and weight */
.ps-goal-title{font-size:1.3em;font-weight:700;line-height:1.2}
.ps-success{display:flex;align-items:baseline;gap:.5em;margin:.15em 0 .5em 0;line-height:1.25;break-after:avoid}
.ps-label{font-size:.72em;color:#5C717F;text-transform:uppercase;letter-spacing:.04em;font-weight:700;flex:none}
.ps-success-text{font-size:1.3em;font-weight:700;line-height:1.2}
.ps-init{margin:.5em 0 .5em 0;padding:.45em .7em;background:#F7FBE9;border-radius:.7em}
.ps-init-title{font-weight:700;font-size:1.05em}
.ps-num{color:#5C717F;font-weight:700;margin-right:.35em}
.ps-phase{margin:.3em 0 0 0}
.ps-phase-label{font-weight:700}
.ps-steps{list-style:none;margin:.15em 0 .2em .2em !important;padding:0}
.ps-steps li{padding-left:1.1em;text-indent:-1.1em}
.ps-steps li::before{content:'\2022';display:inline-block;width:1.1em;text-indent:0;color:#5C717F}
.ps-body table{border-collapse:collapse;width:100%;margin:.3em 0 .5em 0;table-layout:auto;border-bottom:1px solid #E3EBE2}
.ps-body thead{display:table-header-group}
.ps-body tr{break-inside:avoid;page-break-inside:avoid}
.ps-body th,.ps-body td{border:1px solid #E3EBE2;padding:.28em .45em;font-size:.95em;vertical-align:top;text-align:left;line-height:1.28;color:#144265;font-weight:500}
/* no background on td here, ever: it would out-rank the Gantt heat classes (.heat-g/.heat-a/.heat-r) and print them white (13 Sept run 2 caught it) */
.ps-body tr:last-child td{border-bottom:1px solid #E3EBE2}
.ps-body th{background:#F3F8EC;text-transform:uppercase;font-size:.74em;letter-spacing:.04em;color:#5C717F;font-weight:700}
.ps-body th.num,.ps-body td.num{text-align:right;white-space:nowrap}
.ps-body td.ps-wrap{white-space:normal}
.ps-body td.nowrap{white-space:nowrap}
.ps-body tr.ps-total td{font-weight:700;background:#F3F8EC}
.ps-body .rag{font-size:.88em;padding:.1em .6em .1em .45em;gap:.35em}
.ps-body .rag-closed{font-size:.78em;padding:0 .5em}
.ps-body .tl{width:.7em;height:.7em}
.ps-body .badge{font-size:.85em;padding:.1em .7em}
.ps-badge{display:inline-block;padding:.05em .6em;border-radius:999px;font-size:.8em;font-weight:700;white-space:nowrap;vertical-align:.05em}
.ps-badge-ok{background:#DDEBE4;color:#1C7346}
.ps-badge-warn{background:#FBEBD0;color:#8A5507}
.ps-badge-plain{background:#EEF1F2;color:#40555F}
.ps-badge-none{background:transparent;color:#5C717F;border:1px solid #E3EBE2}
.ps-tick{color:#1C7346;font-weight:700}
.ps-done{color:#5C717F;text-decoration:line-through}
.ps-ok{color:#1C7346}
.ps-bad,.ps-body td.ps-bad{color:#B3261E;font-weight:700}
.ps-stats{display:flex;gap:.7em;flex-wrap:wrap;margin:.3em 0 .5em 0}
.ps-stat{background:#F3F8EC;border-radius:.9em;padding:.5em .9em;min-width:10em;flex:1 1 10em}
.ps-stat-label{font-size:.72em;color:#5C717F;text-transform:uppercase;letter-spacing:.04em;font-weight:700}
.ps-stat-val{font-size:1.35em;font-weight:700;line-height:1.25}
.ps-stat-val .ps-small{display:block;font-size:.6em;font-weight:600;line-height:1.3}
.ps-good{background:#DDEBE4;color:#1C7346;border-radius:.8em;padding:.45em .8em;margin:.3em 0;font-weight:600;break-inside:avoid}
.ps-prob{background:#FDE7E3;color:#8E1F17;border-radius:.8em;padding:.45em .8em;margin:.3em 0;font-weight:600;break-inside:avoid}
.ps-cols{display:flex;gap:1.2em;align-items:flex-start}
.ps-cols>div{flex:1 1 0;min-width:0}
.ps-block{margin:0 0 .7em 0}
.ps-kv th{width:11em;text-transform:none;font-size:.95em;letter-spacing:0;color:#5C717F;background:#F7FBE9}
.ps-swatches{display:inline-flex;gap:.3em;vertical-align:middle;margin-left:.4em}
.ps-sw{display:inline-flex;align-items:center;justify-content:center;width:2.2em;height:1.5em;border-radius:999px;border:2px solid;font-size:.8em;font-weight:700}
.ps-init-block{border-left:.4em solid #57A163;padding:.05em 0 .05em .8em;margin:0 0 1em 0;break-inside:avoid;page-break-inside:avoid} /* an initiative never strands its heading at a page foot */
.ps-row-head{display:flex;align-items:baseline;gap:1em;flex-wrap:wrap;break-after:avoid}
.ps-row-head h2{margin:0}
.ps-phase-block{margin:.2em 0 .4em 0}
.ps-phases-line{margin:.1em 0 .1em 0}
.ps-total-line{margin-top:.6em;font-size:1.05em}
.ps-phase-list{list-style:none;margin:.2em 0 0 0 !important;padding:0}
.ps-phase-list li{margin:.15em 0}
.ps-term-h{padding:.25em .6em;border-radius:.6em}
.ps-lens{margin:0 0 .2em 0}
/* a report reads one term / one goal per page on paper; on screen they simply follow each other */
.psheet .rep-break{break-before:page;page-break-before:always}
/* the Gantt sheet: the live table's row builders, laid out to the sheet width (sticky columns off, em sizes) */
.psheet .gantt-wrap{overflow:visible;border:0;border-radius:0;background:transparent}
.psheet table.gantt{width:100%;border-collapse:collapse;border-spacing:0;min-width:0;margin:0;table-layout:fixed} /* every week column the same width */
.psheet .gantt th,.psheet .gantt td{border:1px solid #E3EBE2;padding:0}
.psheet .gantt tr{break-inside:avoid}
.psheet .gantt th.rowh,.psheet .gantt td.rowh{position:static;min-width:0;max-width:none;width:15em;padding:.2em .4em;font-size:.95em;line-height:1.2;text-align:left;text-transform:none;letter-spacing:0;color:#144265;font-weight:600;background:#fff}
.psheet .gantt .term-h{font-size:.9em;padding:.2em 0;text-align:center;text-transform:none;letter-spacing:0;color:#144265;font-weight:700}
.psheet .gantt .wk-h{min-width:0;max-width:none;width:auto;font-size:.75em;padding:.15em 0;text-align:center;color:#5C717F;text-transform:none;letter-spacing:0}
.psheet .gantt td.wk{min-width:0;max-width:none;width:auto;height:1.9em;font-size:.85em;text-align:center;position:relative;vertical-align:middle}
.psheet .gantt .stepdot{width:.4em;height:.4em}
.psheet .chart-key{font-size:.9em;color:#5C717F;margin:.3em 0 .4em 0;display:flex;gap:1em;flex-wrap:wrap}
.psheet .chart-key span{display:inline-flex;align-items:center;gap:.35em}
.psheet .chart-key .dot{width:.75em;height:.75em;border-radius:50%;display:inline-block}
.psheet .over-dot{color:#dd4c2f;font-size:.8em}
/* ---- Reports tab on screen ---- */
.rep-switch{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0 0 14px 0}
.rep-switch .btn.active{background:var(--side);border-color:var(--side);color:#fff}
.rep-view{background:#fff;border-radius:var(--radius);box-shadow:var(--shadow);padding:26px 30px;font-size:13.5px;overflow-x:auto}
.rep-view .ps-head{margin-bottom:14px}
.rep-view .rep-term,.rep-view .rep-goal{margin-bottom:26px}
@media (max-width:1100px){.rep-view{padding:18px 20px}.rep-view .ps-cols{flex-direction:column}.rep-view .ps-cols>div{width:100%}}
/* sidebar icons for the two wave-2 tabs (the tab bar masks --tab-icon; a tab without one shows a solid block).
   The Measures line belongs to W1 - keep whichever copy lands first, they draw the same thing. */
#tabs button[data-tab="measures"]{--tab-icon:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='8.5'/><circle cx='12' cy='12' r='4.5'/><circle cx='12' cy='12' r='1'/></svg>")}
#tabs button[data-tab="reports"]{--tab-icon:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M6 3h9l4 4v14H6z'/><path d='M15 3v4h4'/><path d='M9 12h7M9 15.5h7M9 9h3'/></svg>")}
/* merge W3 + W2: the Allocate sheet carries a goal head with the goal total, as the tab does */
.ps-goal-tot{margin:.6em 0 .2em 0;font-size:1.05em}
/* W7 (13 Sept): the Plan sheet as a tree with due dates; the Allocate sheet's later-phases line */
.ps-tree-phase{margin:.35em 0 .15em 0;padding-left:.2em}
.ps-due{font-weight:700;background:#EAF7DF;border-radius:999px;padding:0 .55em;white-space:nowrap}
.ps-who{margin:.08em 0}
.ps-who .ps-label{margin-right:.25em}
.ps-sep{color:#5C717F;margin:0 .2em}
.ps-later{margin:.15em 0 .1em 0}
.ps-neutral{background:#EEF1F2;color:#40525E;border-radius:.8em;padding:.45em .8em;margin:.3em 0;font-weight:600;break-inside:avoid} /* reviewer fix: absence, not an all-clear */
