/* Resource planning workbench — OCU Group Brand Book, May 2025 v1.
   Light document ground, Bright Grey (navy) text at alpha, Old Brick red as the one accent,
   Regent Grey / Brass / Grey Goose as the secondary series. Arial only (the brand's text
   face; Magistral Condensed is reserved for OCU Studio logo work and is NOT used here).
   Square corners, no shadows, sentence-case headings. Token names are kept from the
   previous AEC skin (--green, --lime, --olive) so nothing else had to change:
     --green        page ground        --green-raised  the app card (white)
     --lime         Old Brick #9C1924  --olive         Regent Grey #8497B0
     --olive-deep   Bright Grey #333F50  --white       strong text = Bright Grey */

:root {
  --green: #f0f0f0;
  --green-raised: #ffffff;
  --lime: #9c1924;
  --olive: #8497b0;
  --olive-deep: #333f50;
  --white: #333f50;

  --t-data: rgba(51, 63, 80, 0.85);
  --t-body: rgba(51, 63, 80, 0.72);
  --t-label: rgba(51, 63, 80, 0.55);
  --t-dim: rgba(51, 63, 80, 0.45);
  --t-sub: rgba(51, 63, 80, 0.42);

  --rule-row: rgba(51, 63, 80, 0.14);
  --rule-div: rgba(51, 63, 80, 0.16);
  --rule-head: rgba(51, 63, 80, 0.28);
}

* { box-sizing: border-box; }

/* The `hidden` attribute only sets `display: none` from the UA stylesheet, so ANY author rule
   that sets display — and .tbl, .heat, .kanban, .pane and .boot all do — silently beats it.
   The symptom was every pane's content stacking on screen at once: the demand heatmap sitting
   above the projects board. One rule fixes it for good; without it, hiding anything is a lie. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--green);
  color: var(--t-body);
  font-family: Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

.app {
  background: var(--green-raised);
  border: 1px solid var(--rule-div);
  margin: 0 auto;
  max-width: 1720px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------- shell bars ---------- */

.bar { border-bottom: 1px solid var(--rule-div); }

.identity {
  background: #333f50;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 10px 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
/* the OCU ellipse (permitted "ellipse only" use) on a white ground; the gap keeps its clear space */
.mark { height: 34px; width: auto; display: block; }
.boot-logo { height: 64px; width: auto; display: block; margin-bottom: 18px; }
.brand-name { font-size: 15px; font-weight: 700; color: #fff; }
.brand-sub { font-size: 15px; color: rgba(255, 255, 255, 0.7); }
.health {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.78);
}
.health .stale { color: #f6f19e; font-weight: 700; }   /* Light Tan reads on navy; red does not */
.ghost-btn {
  font-size: 13px;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: none;
  color: #fff;
  cursor: pointer;
}
.ghost-btn:hover { color: #fff; border-color: #fff; background: rgba(255, 255, 255, 0.12); }

/* tabs */
.tabs { display: flex; overflow: hidden; }
.tabs button {
  flex: 1;
  cursor: pointer;
  border: 0;
  border-bottom: 3px solid transparent;
  background: none;
  padding: 11px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.tabs button:hover { background: rgba(51, 63, 80, 0.07); }
.tabs .num { font-size: 11px; letter-spacing: 0.1em; color: var(--t-dim); }
.tabs .label { font-size: 15px; font-weight: 700; color: var(--t-body); }
.tabs button.on { background: rgba(156, 25, 36, 0.12); border-bottom-color: var(--lime); }
.tabs button.on .label { color: var(--lime); }

/* filters */
.filters {
  background: #f0f0f0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 26px;
  background: rgba(51, 63, 80, 0.04);
  flex-wrap: wrap;
}
.filter-label {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(51, 63, 80, 0.5);
  margin-right: 4px;
}
.filter-note { font-size: 14px; color: rgba(51, 63, 80, 0.6); }
.filter-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  padding: 7px 15px;
  border: 1px solid var(--rule-head);
  background: none;
  color: rgba(51, 63, 80, 0.75);
}
.chip:hover { border-color: var(--lime); color: var(--white); }
.chip.on { background: var(--lime); border-color: var(--lime); color: var(--green); }
/* the month window reads as selected but is a readout, not a toggle */
#monthWindow.on {
  background: rgba(156, 25, 36, 0.14);
  border-color: var(--lime);
  color: var(--lime);
}

/* ---------- pane ---------- */

.pane { padding: 18px 24px 22px; display: flex; flex-direction: column; gap: 16px; }

.pane-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.pane-title { display: flex; flex-direction: column; gap: 5px; }
.eyebrow {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}
.pane-title h1 { margin: 0; font-size: 26px; font-weight: 700; color: var(--white); }
.pane-sub { margin: 0; font-size: 15px; line-height: 1.45; color: rgba(51, 63, 80, 0.78); max-width: 70ch; }
.scope { text-align: right; display: flex; flex-direction: column; gap: 3px; }
.scope-label { font-size: 13px; color: var(--t-label); }
.scope-value { font-size: 24px; font-weight: 700; color: var(--white); }
.scope-note { font-size: 14px; color: var(--lime); }

/* ---------- shared chart ---------- */

.chart { margin: 0; position: relative; }
.chart-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid var(--rule-div);
  border-bottom: 1px solid var(--rule-div);
}
.chart-key { display: flex; flex-direction: column; gap: 3px; padding-right: 16px; }
.chart-key .t { font-size: 16px; font-weight: 700; color: var(--white); }
.chart-key .u { font-size: 13px; color: var(--t-label); }
.chart-key .n { font-size: 13px; color: var(--lime); }

.plot { position: relative; height: 150px; cursor: ew-resize; }
.bars {
  position: absolute;
  inset: 0;
  display: grid;
  gap: 4px;
  align-items: end;
}
.bars .col { display: flex; flex-direction: column-reverse; height: 100%; justify-content: flex-start; }
.bars .col span { display: block; width: 100%; }
.cap-rule { position: absolute; left: 0; right: 0; border-top: 1px dashed rgba(51, 63, 80, 0.5); z-index: 1; }
.cap-label { position: absolute; right: 0; font-size: 12px; color: var(--t-label); z-index: 1; }
.brush {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(156, 25, 36, 0.09);
  border-left: 2px solid var(--lime);
  border-right: 2px solid var(--lime);
  pointer-events: none;
  z-index: 2;
}
.today { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(51, 63, 80, 0.45); z-index: 1; }
.today::after {
  content: "today";
  position: absolute;
  top: -2px;
  left: 4px;
  font-size: 11px;
  color: var(--t-label);
}
.months { display: grid; grid-template-columns: 150px 1fr; padding-top: 6px; }
.months .row { display: grid; gap: 4px; }
.months span, .months .mo {
  text-align: center; font-size: 12px; color: rgba(51, 63, 80, 0.5);
  background: none; border: 0; padding: 0; cursor: pointer; font: inherit;
}
.months .mo.in { color: var(--lime); }
.months .mo.focus { color: var(--white); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.bars .col.focus { outline: 2px solid var(--lime); outline-offset: 1px; }

/* ---------- generic table ---------- */

.tbl { display: flex; flex-direction: column; }
.tbl .hd, .tbl .rw { display: grid; gap: 10px; align-items: center; }
.tbl .hd { padding: 0 8px 7px; border-bottom: 1px solid var(--rule-head); }
.tbl .hd span {
  font-size: 12px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--t-label);
}
.tbl .rw { padding: 7px 8px; border-bottom: 1px solid var(--rule-row); }
.tbl .rw:nth-child(odd) { background: #f7f7f8; }   /* the site's grey bands, at table scale */
.tbl .cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tbl .cell.r { align-items: flex-end; text-align: right; }
.tbl .v { font-size: 15px; color: var(--t-data); }
.tbl .cell.name .v { font-size: 15px; font-weight: 700; color: var(--white); }
.tbl .cell.fig .v { font-size: 18px; font-weight: 700; color: var(--white); }
.tbl .sub { font-size: 11px; color: var(--t-sub); }
.tbl .cell.fig .sub { color: var(--lime); }
.tbl .short { color: var(--lime); font-weight: 700; }
.tbl .track { height: 5px; width: 100%; background: rgba(51, 63, 80, 0.14); }
.tbl .track span { display: block; height: 5px; }
.tbl .none { color: var(--t-dim); }

/* ---------- demand heatmap ---------- */

.heat { display: flex; flex-direction: column; gap: 6px; }
.heat .grid { display: grid; gap: 3px; }
.heat .hd { font-size: 12px; color: rgba(51, 63, 80, 0.5); text-align: center; }
.heat .hd.in { color: var(--lime); }
.heat .rl { display: flex; flex-direction: column; gap: 2px; }
.heat .rl .n { font-size: 14px; color: var(--white); }
.heat .rl .c { font-size: 11px; color: var(--t-sub); }
.heat .cell { padding: 5px 0; text-align: center; font-size: 13px; color: var(--t-data); }
.heat .cell.hot { color: var(--white); }
.heat .hd.focus { color: var(--white); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.heat .hd.have, .heat .cell.have { color: var(--white); font-weight: 600; }

.role-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 16px; }
.role-bar .filter-label, .role-bar .filter-note { font-size: 12px; color: rgba(51, 63, 80, 0.55); }
.heat .cell.have.seeded { color: rgba(51, 63, 80, 0.55); font-weight: 400; }
.heat .cell.short { outline: 1px solid var(--lime); color: var(--white); }
.heat .cell.go { cursor: pointer; }

.tabs .planner { opacity: 0.62; }
.tabs .planner.on { opacity: 1; }
.tabs .gap { margin-left: 22px; }

.tile.warn .n { color: var(--lime); }
.tiles { margin: 4px 0 10px; }

.drill {
  position: fixed; right: 20px; top: 120px; width: min(380px, calc(100vw - 40px));
  max-height: calc(100vh - 160px); overflow: auto;
  background: var(--panel, #16352a); border: 1px solid var(--rule-row);
  padding: 16px 18px; z-index: 20;
}
.drill header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.drill .drill-tot { margin: 4px 0 0; font-size: 18px; color: var(--white); font-weight: 700; }
.drill .drill-note { margin: 0 0 12px; font-size: 13px; color: rgba(51, 63, 80, 0.7); line-height: 1.4; }
.peak-link {
  background: none; border: 0; padding: 0; font: inherit; color: var(--lime);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}

.register { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 20px; }
.register .reg-src { margin: 0; font-size: 13px; color: rgba(51, 63, 80, 0.65); max-width: 80ch; }
.register .reg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }
.register .reg-item { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border: 1px solid var(--rule-row); }
.register .reg-item .n { font-size: 14px; color: var(--white); }
.register .reg-item .c { font-size: 11px; color: var(--t-sub); }
.register .reg-item input {
  width: 100%; box-sizing: border-box; margin-top: 4px; padding: 6px 8px;
  background: transparent; border: 1px solid var(--rule-row); color: var(--white); font: inherit;
}
.register .reg-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.register .chip.file { cursor: pointer; }

/* ---------- footnote ---------- */

.footnote {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(51, 63, 80, 0.6);
  max-width: 100ch;
  border-top: 1px solid var(--rule-row);
  padding-top: 16px;
}

/* ---------- boot ---------- */

.boot { padding: 90px 26px 110px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.boot h1 { margin: 0; font-size: 44px; line-height: 1.08; font-weight: 700; color: var(--white); }
.boot-lede { margin: 0; font-size: 19px; line-height: 1.5; color: rgba(51, 63, 80, 0.78); max-width: 62ch; }
.boot-note { margin: 0; font-size: 14px; color: var(--t-label); }
.primary-btn {
  margin-top: 8px;
  cursor: pointer;
  border: 0;
  background: var(--lime);
  color: var(--green);
  font-size: 16px;
  font-weight: 700;
  padding: 13px 26px;
}
.primary-btn:hover { background: var(--white); }
.primary-btn:disabled { opacity: 0.6; cursor: default; }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  max-width: 70ch;
  background: var(--green-raised);
  border: 1px solid var(--lime);
  color: var(--t-data);
  font-size: 14px;
  line-height: 1.5;
  padding: 14px 18px;
  z-index: 50;
}
.toast strong { color: var(--white); }

@media (max-width: 1100px) {
  .tabs { flex-wrap: wrap; }
  .tabs button { flex: 1 0 25%; }
}

/* Month window controls. The drag on a chart is the fast path, but four of the eight tabs
   have no chart, so the window needs explicit controls that work everywhere. */
.month-ctl { display: inline-flex; align-items: stretch; }
.month-ctl .step {
  cursor: pointer;
  border: 1px solid var(--rule-head);
  background: none;
  color: rgba(51, 63, 80, 0.75);
  font-size: 11px;
  padding: 0 10px;
  line-height: 1;
}
.month-ctl .step:hover:not(:disabled) { border-color: var(--lime); color: var(--lime); }
.month-ctl .step:disabled { opacity: 0.3; cursor: default; }
.month-ctl .chip { border-left: 0; border-right: 0; min-width: 148px; text-align: center; }
#winPresets .chip { padding: 7px 12px; }
.chart-key .hint { font-size: 12px; color: var(--t-dim); }

/* ---------- projects dropdown ---------- */
/* Turning a project off is a what-if. It never touches P6 and never touches the bundle. */
.dd { position: relative; }
.dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 40;
  width: 380px;
  max-height: 60vh;
  overflow: auto;
  background: var(--green-raised);
  border: 1px solid var(--rule-head);
  padding: 8px 0;
}
.dd-menu .grp {
  padding: 10px 14px 6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-label);
  border-top: 1px solid var(--rule-row);
}
.dd-menu .grp:first-child { border-top: 0; }
.dd-menu .it {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 7px 14px;
  border: 0;
  background: none;
  cursor: pointer;
  text-align: left;
  font-size: 14px;
  color: var(--t-data);
}
.dd-menu .it:hover { background: rgba(51, 63, 80, 0.07); }
.dd-menu .it .bx {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border: 1px solid var(--rule-head);
}
.dd-menu .it.on .bx { background: var(--lime); border-color: var(--lime); }
.dd-menu .it.off { color: var(--t-dim); }
.dd-menu .it .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-menu .it .vl { font-size: 12px; color: var(--t-sub); }
.dd-menu .act {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--rule-row);
}
.dd-menu .act button {
  cursor: pointer;
  font-size: 13px;
  padding: 5px 12px;
  border: 1px solid var(--rule-head);
  background: none;
  color: var(--t-body);
}
.dd-menu .act button:hover { border-color: var(--lime); color: var(--lime); }

/* ---------- 11 · projects kanban ---------- */
.kanban { display: grid; gap: 14px; align-items: start; }
.kcol { border: 1px solid var(--rule-div); display: flex; flex-direction: column; min-height: 140px; }
.kcol.over { border-color: var(--lime); background: rgba(156, 25, 36, 0.06); }
.kcol-h {
  padding: 12px 14px;
  border-bottom: 1px solid var(--rule-div);
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.kcol-h .n { font-size: 16px; font-weight: 700; color: var(--white); }
.kcol-h .m { font-size: 12px; color: var(--t-label); }
.kcol-h .sw { height: 3px; width: 34px; margin-bottom: 4px; }
.kcards { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.kcard {
  border: 1px solid var(--rule-row);
  background: rgba(51, 63, 80, 0.04);
  padding: 10px 12px;
  cursor: grab;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.kcard:hover { border-color: var(--rule-head); }
.kcard.off { opacity: 0.38; }
.kcard.off .kname { text-decoration: line-through; }
.kcard.drag { opacity: 0.4; }
/* a twin bid set aside — still on the board, not in the plan */
.kcard.shadow { opacity: 0.55; border-style: dashed; }

/* People tab — HR's view: by-trade block, starting-soon list, data questions */
.people { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.people .rail-label { margin-top: 14px; }
.people .people-list { display: flex; flex-direction: column; }
.people .people-q { margin: 0; padding-left: 18px; color: var(--t-sub); font-size: 13px; line-height: 1.5; }
.people .people-q li { margin: 4px 0; }
.people .people-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
/* role views: who is reading decides the landing tab and the For-you strip */
.bar.identity { flex-wrap: wrap; gap: 10px 18px; }
.chips.roles { display: flex; gap: 6px; align-items: center; }
.chips.roles .lbl { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); margin-right: 4px; }
.chips.roles .chip { border-color: rgba(255, 255, 255, 0.4); color: rgba(255, 255, 255, 0.85); padding: 4px 11px; font-size: 13px; }
.chips.roles .chip:hover { border-color: #fff; color: #fff; }
.chips.roles .chip.on { background: var(--lime); border-color: var(--lime); color: #fff; }
.tabs button.home .label::after { content: " ·"; color: var(--lime); }
.foryou { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin: 0 0 18px; }
.foryou .fy { text-align: left; border: 1px solid var(--rule-row); border-left: 3px solid var(--lime); background: rgba(51, 63, 80, 0.04); padding: 10px 12px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.foryou .fy:hover { border-color: var(--rule-head); }
.foryou .fy .k { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-sub); }
.foryou .fy .v { font-size: 20px; font-weight: 700; color: var(--white); line-height: 1.1; }
.foryou .fy .n { font-size: 13px; color: var(--t-body); }
.foryou .fy .a { font-size: 12px; color: var(--lime); margin-top: 2px; }
/* decision rail: after the first five cards, one-line heads only */
.rail .xcard.mini { padding: 6px 10px; gap: 2px; }
.rail .xcard.mini .head { font-size: 13px; }
.rail .rail-more-label { margin-top: 10px; }
@media (max-width: 1100px) { .people .people-pair { grid-template-columns: 1fr; } }
.reg-item.inline { display: inline-flex; align-items: center; gap: 10px; margin-left: 8px; vertical-align: middle; }
.reg-item.inline input { width: 80px; }
.reg-stale { border-left: 2px solid var(--lime); padding-left: 10px; }
.reg-stale .chip { margin-left: 6px; }
/* months before today: recorded actuals only — dimmed so stale plan is not read as history */
.heat .hd.past, .heat .cell.past { opacity: 0.38; }

/* ---------- print: an A4 landscape report, not a screenshot ----------
   A title block (logo, report, scope, month, basis, data dates, printed date) replaces the
   app chrome; colours print exactly (the charts and heat cells are backgrounds); cards sit
   in two columns; rows, cards and tiles never split across pages; a footer repeats on every
   page. Old Brick / Bright Grey / the greys, from the brand book. */
.print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 11mm 12mm 13mm; }
  html, body, .app, .pane { background: #fff !important; color: #333f50 !important; }
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; text-shadow: none !important; }
  .app { max-width: none; border: 0; min-height: 0; }
  .bar.identity, .bar.tabs, .bar.filters, #rebuildBtn, #printBtn, .health-pop, .drill, .kanban-bar,
  .toast, .tip, .chart .hint, .chart .brush, .rail-more-label, [data-hire-csv], [data-people-csv],
  .reg-actions, .reg-stale, .boot, .pane-head { display: none !important; }
  .print-head { display: block !important; }
  .print-foot { display: flex !important; }
  .pane { padding: 0; gap: 5mm; font-size: 9.5pt; }
  .print-head { border-bottom: 2px solid #333f50; padding-bottom: 3mm; margin-bottom: 1mm; break-after: avoid; }
  .print-head .ph-row { display: flex; align-items: flex-start; gap: 6mm; }
  .print-head .ph-mark { height: 16mm; width: auto; flex: 0 0 auto; }
  .print-head .ph-title { flex: 1 1 auto; min-width: 0; }
  .print-head .ph-eyebrow { font-size: 8.5pt; letter-spacing: 0.14em; text-transform: uppercase; color: #9c1924; margin-bottom: 1mm; }
  .print-head h1 { margin: 0 0 1.5mm; font-size: 20pt; line-height: 1.1; color: #333f50; }
  .print-head .ph-sub { font-size: 10pt; line-height: 1.4; color: #333f50; max-width: 120ch; }
  .print-head .ph-scope { text-align: right; flex: 0 0 auto; display: flex; flex-direction: column; gap: 0.5mm; padding-left: 6mm; border-left: 1px solid #d1d1d1; }
  .print-head .ph-scope .k { font-size: 8pt; color: #7f7f7f; text-transform: uppercase; letter-spacing: 0.1em; }
  .print-head .ph-scope .v { font-size: 20pt; font-weight: 700; color: #333f50; }
  .print-head .ph-scope .n { font-size: 9pt; color: #9c1924; }
  .print-head .ph-meta { display: flex; flex-wrap: wrap; gap: 2mm 8mm; margin-top: 3mm; font-size: 8.5pt; color: #333f50; }
  .print-head .ph-meta b { color: #7f7f7f; font-weight: 700; text-transform: uppercase; font-size: 7.5pt; letter-spacing: 0.08em; margin-right: 1mm; }
  .print-foot { position: fixed; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 8mm;
    font-size: 7.5pt; color: #7f7f7f; border-top: 1px solid #d1d1d1; padding-top: 1.5mm; background: #fff; }
  body { padding-bottom: 8mm; }
  /* fixed reading order on paper: title block, For-you strip, tiles, chart, then the rest as on screen */
  .print-head { order: -10; } .foryou { order: -9; } .tiles { order: -8; margin: 0 0 2mm; } .chart { order: -7; }
  .tiles { display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 4mm !important; }
  .tiles .tile { width: auto !important; }
  .tile { background: #f0f0f0 !important; padding: 2.5mm 4mm; break-inside: avoid; }
  .tbl .hd, .rail-label, .print-head { break-after: avoid; }
  .tbl { break-before: auto; }
  .tile .k { font-size: 7.5pt; } .tile .v { font-size: 16pt; } .tile .n { font-size: 8.5pt; }
  .foryou { margin-bottom: 2mm; } .foryou .fy { background: #f0f0f0 !important; border-left-color: #9c1924 !important; break-inside: avoid; }
  .foryou .fy .v { font-size: 14pt; } .foryou .fy .a { display: none; }
  .chart { break-inside: avoid; }
  .chart .plot { border-bottom: 1px solid #d1d1d1; }
  .chart-key .t { font-size: 10pt; } .chart-key .u, .chart-key .n { font-size: 8pt; }
  .months .mo { font-size: 7.5pt; }
  .tbl .hd { border-bottom: 1px solid #333f50; padding: 0 2mm 1.5mm; }
  .tbl .hd span { font-size: 7.5pt; color: #7f7f7f; }
  .tbl .rw { padding: 1.6mm 2mm; border-bottom: 1px solid #e3e3e3; break-inside: avoid; }
  .tbl .rw:nth-child(odd) { background: #f5f5f5 !important; }
  .tbl .v { font-size: 9.5pt; } .tbl .cell.name .v { font-size: 9.5pt; } .tbl .cell.fig .v { font-size: 11pt; }
  .tbl .sub { font-size: 7.5pt; color: #7f7f7f; }
  .tbl .short, .v.short, .scope-note { color: #9c1924 !important; }
  .peak-link { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: none; }
  .heat .grid { gap: 1px; }
  .heat .cell { font-size: 8pt; padding: 1.2mm 0; border: 1px solid #e3e3e3; }
  .heat .hd { font-size: 7.5pt; }
  .heat .rl .n { font-size: 8.5pt; } .heat .rl .c { font-size: 7pt; }
  .brief { display: block; }
  .brief .brief-main { margin-bottom: 4mm; }
  .drive-wrap { overflow: visible; }
  .drive { font-size: 8.5pt; width: auto !important; max-width: 100%; border-collapse: collapse; }
  .drive th, .drive td { padding: 1.2mm 2mm; }
  .drive th.job, .drive td.job { width: 62mm; max-width: 62mm; }
  .drive td.job .n { font-size: 8.5pt; } .drive td.job .m, .drive th.job .m { font-size: 7pt; }
  .drive thead th.rot { height: 22mm; vertical-align: bottom; } .drive thead th.rot span { font-size: 7.5pt; }
  .drive td { border-bottom: 1px solid #e3e3e3; }
  .brief .rail, .rail { display: grid !important; grid-template-columns: 1fr 1fr; gap: 3mm 5mm; align-items: start; }
  .rail .rail-label { grid-column: 1 / -1; margin-top: 0; }
  .xcard { border: 1px solid #d1d1d1; padding: 2.5mm 3mm; break-inside: avoid; background: #fff !important; }
  .xcard .tag { font-size: 7pt; color: #9c1924; } .xcard .head { font-size: 10pt; } .xcard .body { font-size: 8.5pt; line-height: 1.4; } .xcard .act { display: none; }
  .xcard.mini { padding: 1.5mm 3mm; }
  .people, .register { margin-top: 2mm; gap: 2mm; }
  .rail-label { font-size: 8pt; color: #9c1924; margin-top: 4mm; break-after: avoid; }
  .reg-src, .people-q, .drill-note { font-size: 8.5pt; line-height: 1.4; color: #333f50; }
  .people .people-pair { gap: 5mm; }
  .reg-grid { display: none; }
  .footnote { font-size: 8pt; line-height: 1.4; color: #7f7f7f; border-top: 1px solid #d1d1d1; padding-top: 2mm; max-width: none; }
  .kanban { gap: 3mm; } .kcard { break-inside: avoid; }
  .scen-bar, .scen input, .scen .chip { display: none !important; }
}
.kcard .kname { font-size: 14px; font-weight: 700; color: var(--white); line-height: 1.3; }
.kcard .kmeta { font-size: 12px; color: var(--t-sub); display: flex; gap: 8px; flex-wrap: wrap; }
.kcard .kfig { font-size: 13px; color: var(--lime); }
.kcard .moved { color: var(--lime); }
.kempty { padding: 16px 14px; font-size: 13px; color: var(--t-dim); }

/* ---------- kanban control bar: quick keeps, year bands, sort ---------- */
.kanban-bar { display: flex; flex-direction: column; gap: 14px; }
.krow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.klbl { font-size: 13px; color: var(--t-label); }

.yrs { display: flex; gap: 10px; flex-wrap: wrap; }
.yr {
  cursor: pointer;
  border: 1px solid var(--rule-head);
  background: none;
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
  min-width: 132px;
}
.yr:hover { border-color: var(--lime); }
.yr .y { font-size: 16px; font-weight: 700; color: var(--white); }
.yr .c { font-size: 12px; color: var(--t-label); }
.yr .v { font-size: 13px; color: var(--lime); }
.yr .of { color: var(--t-sub); }
/* every project in the year is off */
.yr.off { opacity: 0.42; }
.yr.off .y { text-decoration: line-through; }
.yr.off .v { color: var(--t-dim); }
/* some on, some off — the band must not read as either state */
.yr.part { border-left: 3px solid var(--lime); }

/* ---------- 01 · briefing + exception rail ---------- */
.brief {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 22px;
  align-items: start;
}
.brief-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; overflow: hidden; }
.brief-lead {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--white);
  max-width: 46ch;
}
.drivers { display: flex; flex-direction: column; }
.drow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--rule-row);
}
.drow .n { font-size: 15px; color: var(--white); }
.drow .m { font-size: 12px; color: var(--t-sub); }
.drow .v { font-size: 16px; font-weight: 700; color: var(--white); text-align: right; }
.drow .track { margin-top: 5px; }

.drive-wrap { overflow-x: auto; max-width: 100%; }
.drive {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}
.drive th, .drive td {
  border-bottom: 1px solid var(--rule-row);
  padding: 8px 5px;
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
  vertical-align: middle;
}
.drive th.job, .drive td.job {
  text-align: left;
  font-weight: 400;
  min-width: 168px;
  padding-left: 0;
}
.drive thead th.rot {
  height: 128px;
  width: 36px;
  vertical-align: bottom;
  text-align: left;
  font-weight: 600;
  font-size: 12px;
  color: var(--t-label);
  padding: 0 3px 8px;
}
.drive thead th.rot span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  display: inline-block;
}
.drive thead th.rot.hot span { color: var(--lime); }
.drive td.go { cursor: pointer; }
.drive td.go:hover { outline: 1px solid var(--lime); color: var(--lime); }
.drive td.hot { color: var(--lime); }
.drive .n { font-size: 14px; color: var(--white); }
.drive .m { font-size: 11px; color: var(--t-sub); }
.drive-more { margin: 10px 0 0; }

.rail { display: flex; flex-direction: column; gap: 12px; }
.rail-label {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lime);
}
.xcard {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px;
  background: var(--green);
  border: 0;
  border-left: 3px solid var(--lime);
  text-align: left;
  cursor: pointer;
  color: inherit;
  width: 100%;
}
.xcard:hover { background: rgba(156, 25, 36, 0.08); }
.xcard .tag {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--t-label);
}
.xcard .head { font-size: 16px; line-height: 1.35; font-weight: 700; color: var(--white); }
.xcard .body { font-size: 14px; line-height: 1.45; color: var(--t-body); }
.xcard .act { font-size: 14px; color: var(--lime); margin-top: 2px; }
.rail-empty { font-size: 14px; color: var(--t-dim); }

/* ---------- 12 · scenarios ---------- */
.scen { display: flex; flex-direction: column; gap: 18px; }
.scen-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.scen-pair { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--rule-div); }
.scen-col { padding: 20px 22px; display: flex; flex-direction: column; gap: 6px; }
.scen-col + .scen-col { border-left: 1px solid var(--rule-div); background: rgba(156, 25, 36, 0.07); }
.scen-col .k { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--t-label); }
.scen-col.on .k { color: var(--lime); }
.scen-col .t { font-size: 22px; font-weight: 700; color: var(--white); }
.scen-col .s { font-size: 14px; color: var(--t-body); }
.tiles { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.tile { padding: 18px 20px; background: var(--green); display: flex; flex-direction: column; gap: 5px; }
.tile .k { font-size: 13px; color: var(--t-label); }
.tile .v { font-size: 28px; font-weight: 700; color: var(--white); }
.tile .n { font-size: 14px; color: var(--lime); }
.scen-name {
  font-family: inherit;
  font-size: 14px;
  padding: 7px 12px;
  border: 1px solid var(--rule-head);
  background: var(--green);
  color: var(--t-data);
  min-width: 220px;
}
.scen-name:focus { outline: 1px solid var(--lime); border-color: var(--lime); }

/* ---------- hover tooltip + hot column ---------- */
.tip {
  position: fixed;
  z-index: 60;
  transform: translate(-50%, calc(-100% - 10px));
  background: var(--green);
  border: 1px solid var(--lime);
  color: var(--t-data);
  font-size: 13px;
  padding: 8px 12px;
  pointer-events: none;
  white-space: nowrap;
}
.tip strong { color: var(--white); margin-right: 8px; }
.bars .col.hot { outline: 1px solid var(--lime); outline-offset: 1px; }
.heat .cell.on { outline: 1px solid var(--lime); }

/* ---------- data-health popover ---------- */
.health { position: relative; }
#dataHealth { cursor: pointer; }
#dataHealth:hover { color: var(--white); }
.health-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 45;
  width: 420px;
  background: var(--green-raised);
  border: 1px solid var(--rule-head);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.health-pop p { margin: 0; font-size: 14px; line-height: 1.45; color: var(--t-body); }
.health-pop .k { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--lime); }

/* ---------- project card what-if controls ---------- */
.kctl { display: flex; align-items: center; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.kctl button {
  cursor: pointer;
  font-size: 12px;
  padding: 3px 8px;
  border: 1px solid var(--rule-head);
  background: none;
  color: var(--t-body);
}
.kctl button:hover { border-color: var(--lime); color: var(--lime); }
.kctl button.on { background: var(--lime); border-color: var(--lime); color: var(--green); }
.kctl .slip { font-size: 12px; color: var(--lime); min-width: 72px; }

.tbl .rw { cursor: default; }
.tbl .rw.go { cursor: pointer; }
.tbl .rw.go:hover { background: rgba(51, 63, 80, 0.04); }

@media (max-width: 1100px) {
  .brief { grid-template-columns: 1fr; }
  .scen-pair, .tiles { grid-template-columns: 1fr; }
}
