/* Projects workspace (/app/project-planning/*), 2026-10-15 redesign.
   One ERP-style module surface: a module bar with the shared project scope,
   grouped screen tabs, a compact page head, KPI strip, dense registers whose
   rows open a popup, and an SVG Gantt. Every rule is scoped under .pm-ws so
   nothing here can reach another module. Colours are tokens only: the CWG
   groundwork tokens resolve inside the portal, the generic paper/ink tokens
   are the fallback for other profiles. */

.pm-ws{
  --pm-ink:var(--ink);
  --pm-mute:var(--ink-mute,var(--ink));
  --pm-faint:var(--ink-faint,var(--ink));
  --pm-paper:var(--paper);
  --pm-surface:var(--paper-2,var(--paper));
  --pm-line:var(--hairline);
  --pm-line-soft:color-mix(in srgb,var(--hairline) 55%,var(--pm-surface));
  --pm-accent:var(--baobab);
  --pm-accent-soft:color-mix(in srgb,var(--baobab) 12%,var(--pm-surface));
  --pm-red:var(--baobab);
  --pm-red-soft:color-mix(in srgb,var(--baobab) 14%,var(--pm-surface));
  --pm-amber:var(--signal-amber);
  --pm-amber-soft:color-mix(in srgb,var(--cwg-ochre,var(--signal-amber)) 30%,var(--pm-surface));
  --pm-green:var(--signal-grass);
  --pm-green-soft:color-mix(in srgb,var(--cwg-green,var(--signal-grass)) 18%,var(--pm-surface));
  --pm-highlight:var(--cwg-ochre,var(--signal-amber));
  --pm-display:var(--cwg-display,var(--font-ui));
  --pm-body:var(--cwg-body,var(--font-ui));
  --pm-row:34px;
  font-family:var(--pm-body);
  color:var(--pm-ink);
  background:var(--pm-surface);
  font-size:13.5px;
  line-height:1.45;
}

/* ---------- module bar ---------- */
.pm-ws .pm-dash{display:grid;gap:20px;min-width:0}
.pm-ws .pm-dash-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;align-items:start}
.pm-ws .pm-dash .pm-panel{min-width:0;overflow:hidden}
.pm-ws .pm-dash-health{padding:12px}
.pm-ws .pm-dash-health-head,.pm-ws .pm-dash-health-row{display:grid;grid-template-columns:minmax(120px,1.1fr) repeat(5,minmax(0,1fr));gap:8px;padding:10px 0;border-bottom:1px solid var(--pm-line)}
.pm-ws .pm-dash-health-head{color:var(--pm-mute);font-size:12px}
.pm-ws .pm-dash-health-row>a{min-width:0;overflow-wrap:anywhere;color:inherit;text-decoration:none}
.pm-ws .pm-dash-signal{display:flex;flex-direction:column;gap:6px;padding:10px;border-radius:3px;border-top:3px solid var(--pm-line);background:var(--pm-paper);font-size:12px}
.pm-ws .pm-dash-signal[data-rag="red"]{border-color:var(--pm-red);background:var(--pm-red-soft)}
.pm-ws .pm-dash-signal[data-rag="amber"]{border-color:var(--pm-amber);background:var(--pm-amber-soft)}
.pm-ws .pm-dash-signal[data-rag="green"]{border-color:var(--pm-green);background:var(--pm-green-soft)}
.pm-ws .pm-dash-card{display:block;padding:16px;border-top:1px solid var(--pm-line);text-decoration:none;color:inherit;min-width:0}
.pm-ws .pm-dash-card h4{margin:0 0 12px;font-size:14px;overflow-wrap:anywhere}
.pm-ws .pm-dash-budget,.pm-ws .pm-dash-trend{display:block;width:100%;height:auto}
.pm-ws .pm-dash-axis{fill:var(--pm-mute);font-size:12px;font-family:var(--pm-body)}
.pm-ws .pm-dash-bar{fill:var(--pm-mute)}
.pm-ws .pm-dash-bar[data-series="actual"]{fill:var(--pm-green)}
.pm-ws .pm-dash-bar[data-series="forecast"]{fill:var(--pm-amber)}
.pm-ws .pm-dash-line{fill:none;stroke:var(--pm-green);stroke-width:3}
.pm-ws .pm-dash-line[data-series="planned"]{stroke:var(--pm-mute);stroke-dasharray:7 5}
.pm-ws .pm-dash-dot{fill:var(--pm-green)}
.pm-ws .pm-dash-dot[data-series="planned"]{fill:var(--pm-mute)}
.pm-ws .pm-dash-roadmap{overflow-x:auto;padding:16px;max-width:100%}
.pm-ws .pm-dash-months{display:flex;min-width:max-content;gap:16px}
.pm-ws .pm-dash-month{width:240px;border-top:3px solid var(--pm-line);padding-top:8px}
.pm-ws .pm-dash-month h4{margin:0 0 12px}
.pm-ws .pm-dash-milestone{display:flex;flex-direction:column;gap:4px;margin:8px 0;padding:10px;background:var(--pm-paper);color:inherit;text-decoration:none;overflow-wrap:anywhere;white-space:normal}
.pm-ws .pm-dash-milestone[data-late="true"]{border-left:3px solid var(--pm-red)}
.pm-ws .pm-dash-risk{display:grid;grid-template-columns:2fr 1fr 1fr;gap:16px;border-top:1px solid var(--pm-line);padding:12px 16px;text-decoration:none;color:inherit;overflow-wrap:anywhere}
.pm-ws .pm-dash-note{padding:0 16px;color:var(--pm-mute);font-size:12px}
.pm-ws .pm-dash a:hover{outline:1px solid var(--pm-line);outline-offset:-1px}
@media(max-width:760px){
 .pm-ws .pm-dash-columns{grid-template-columns:minmax(0,1fr)}
 .pm-ws .pm-dash-health-head{display:none}
 .pm-ws .pm-dash-health-row{grid-template-columns:repeat(2,minmax(0,1fr))}
 .pm-ws .pm-dash-health-row>.pm-primary{grid-column:1/-1}
 .pm-ws .pm-dash-risk{grid-template-columns:minmax(0,1fr);gap:4px}
}
.pm-ws .pm-bar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;padding:12px 24px 0}
.pm-ws .pm-bar-title{font-family:var(--pm-display);font-size:20px;font-weight:600;letter-spacing:-0.01em;margin:0;color:var(--pm-ink)}
.pm-ws .pm-scope{display:inline-flex;align-items:center;gap:8px}
.pm-ws .pm-scope-label{font-size:12.5px;color:var(--pm-mute)}
.pm-ws .pm-scope-select{font:inherit;font-size:13px;color:var(--pm-ink);background:var(--pm-surface);border:1px solid var(--pm-line);border-radius:var(--cwg-control-radius,3px);padding:5px 28px 5px 10px;min-width:280px;max-width:420px}
.pm-ws .pm-scope-select:focus-visible{outline:2px solid var(--pm-ink);outline-offset:1px}
.pm-ws .pm-bar-spring{flex:1}
.pm-ws .pm-bar-link{font-size:13px;color:var(--pm-ink);text-decoration:none;padding:5px 10px;border-radius:var(--cwg-control-radius,3px)}
.pm-ws .pm-bar-link:hover{background:var(--pm-paper)}
.pm-ws .pm-bar-link[aria-current="page"]{background:var(--pm-paper);font-weight:600}

/* ---------- slim top bar + sectioned sidebar ---------- */
.pm-ws .pm-top{border-bottom:1px solid var(--pm-line);padding-bottom:10px}
.pm-ws .pm-ico{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round}
.pm-ws .pm-bar-link{display:inline-flex;align-items:center;gap:6px}
.pm-ws .pm-rail-toggle{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:1px solid var(--pm-line);border-radius:var(--cwg-control-radius,3px);background:var(--pm-surface);color:var(--pm-mute);cursor:pointer}
.pm-ws .pm-rail-toggle:hover{color:var(--pm-ink);background:var(--pm-paper)}
.pm-ws .pm-rail-toggle:focus-visible{outline:2px solid var(--pm-ink);outline-offset:1px}
.pm-ws .pm-frame{display:grid;grid-template-columns:240px minmax(0,1fr);min-height:0}
.pm-ws .pm-frame[data-collapsed]{grid-template-columns:56px minmax(0,1fr)}
.pm-ws .pm-frame-body{min-width:0}
.pm-ws .pm-side{position:sticky;top:0;align-self:start;max-height:100vh;overflow-y:auto;display:flex;flex-direction:column;gap:14px;padding:14px 10px 24px;border-right:1px solid var(--pm-line);background:var(--pm-paper);min-height:100%}
.pm-ws .pm-side-group{display:flex;flex-direction:column;gap:1px}
.pm-ws .pm-side-label{margin:0 0 4px;padding:0 10px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--pm-mute)}
.pm-ws .pm-side-link{position:relative;display:flex;align-items:center;gap:10px;padding:7px 10px;border-radius:var(--cwg-control-radius,3px);font-size:13.5px;color:var(--pm-mute);text-decoration:none;white-space:nowrap}
.pm-ws .pm-side-link:hover{color:var(--pm-ink);background:var(--pm-surface)}
.pm-ws .pm-side-link[aria-current="page"]{color:var(--pm-ink);font-weight:600;background:var(--pm-accent-soft)}
.pm-ws .pm-side-link[aria-current="page"]::before{content:"";position:absolute;left:-10px;top:6px;bottom:6px;width:3px;border-radius:0 2px 2px 0;background:var(--pm-accent)}
.pm-ws .pm-side-link[aria-current="page"] .pm-ico{stroke:var(--pm-accent)}
.pm-ws .pm-side-link:focus-visible{outline:2px solid var(--pm-ink);outline-offset:-2px}
.pm-ws .pm-side-text{overflow:hidden;text-overflow:ellipsis}
/* Icon rail: labels stay in the accessibility tree, only hidden visually. */
.pm-ws .pm-frame[data-collapsed] .pm-side{padding-left:8px;padding-right:8px;gap:8px}
.pm-ws .pm-frame[data-collapsed] .pm-side-link{justify-content:center;padding:8px 0}
.pm-ws .pm-frame[data-collapsed] .pm-side-link[aria-current="page"]::before{left:-8px}
.pm-ws .pm-frame[data-collapsed] :is(.pm-side-text,.pm-side-label){position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.pm-ws .pm-frame[data-collapsed] .pm-side-group+.pm-side-group{border-top:1px solid var(--pm-line);padding-top:8px}

/* ---------- page body + head ---------- */
.pm-ws .pm-body{padding:18px 24px 40px;display:flex;flex-direction:column;gap:16px;min-width:0}
.pm-ws .pm-head{display:flex;align-items:flex-start;gap:16px;flex-wrap:wrap}
.pm-ws .pm-head-text{flex:1;min-width:240px}
.pm-ws .pm-head-title{font-family:var(--pm-display);font-size:22px;font-weight:600;letter-spacing:-0.01em;line-height:1.2;margin:0;color:var(--pm-ink)}
.pm-ws .pm-head-meta{margin:4px 0 0;font-size:13px;color:var(--pm-mute)}
.pm-ws .pm-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pm-ws .pm-btn{display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:13px;line-height:1;padding:8px 14px;border-radius:var(--cwg-control-radius,3px);border:1px solid var(--pm-line);background:var(--pm-surface);color:var(--pm-ink);cursor:pointer;text-decoration:none;white-space:nowrap}
.pm-ws .pm-btn:hover{background:var(--pm-paper)}
.pm-ws .pm-btn:disabled{opacity:.5;cursor:default}
/* R7-004: the record popup's file picker uses the house button, not the browser's grey one. */
.pm-ws .pm-file{font:inherit;font-size:13px;color:var(--pm-ink)}
.pm-ws .pm-file::file-selector-button{font:inherit;font-size:13px;padding:8px 14px;margin-right:8px;border-radius:var(--cwg-control-radius,3px);border:1px solid var(--pm-line);background:var(--pm-surface);color:var(--pm-ink);cursor:pointer}
.pm-ws .pm-file::file-selector-button:hover{background:var(--pm-paper)}
.pm-ws .pm-btn:focus-visible{outline:2px solid var(--pm-ink);outline-offset:1px}
.pm-ws .pm-btn--primary{background:var(--pm-accent);border-color:var(--pm-accent);color:var(--pm-surface);font-weight:600}
.pm-ws .pm-btn--primary:hover{background:color-mix(in srgb,var(--pm-accent) 85%,var(--pm-ink))}
.pm-ws .pm-btn--quiet{border-color:transparent;background:transparent;color:var(--pm-mute)}
.pm-ws .pm-btn--quiet:hover{color:var(--pm-ink);background:var(--pm-paper)}
.pm-ws .pm-notice{margin:0;padding:10px 14px;border-radius:var(--cwg-panel-radius,6px);background:var(--pm-amber-soft);color:var(--pm-ink);font-size:13px}
.pm-ws .pm-notice--bad{background:var(--pm-red-soft)}
.pm-ws .pm-notice--ok{background:var(--pm-green-soft)}
.pm-ws .pm-import-row--bad{background:var(--pm-red-soft)}
.pm-ws .pm-import-cell--bad{box-shadow:inset 0 -2px 0 var(--pm-red)}

/* ---------- KPI strip ---------- */
.pm-ws .pm-kpis{display:flex;flex-wrap:wrap;gap:1px;background:var(--pm-line);border:1px solid var(--pm-line);border-radius:var(--cwg-panel-radius,6px);overflow:hidden}
.pm-ws .pm-kpi{flex:1 1 140px;background:var(--pm-surface);padding:12px 16px;display:flex;flex-direction:column;gap:2px;text-decoration:none;color:inherit;min-width:0}
.pm-ws a.pm-kpi:hover,.pm-ws button.pm-kpi:hover{background:var(--pm-paper)}
.pm-ws button.pm-kpi{border:0;font:inherit;text-align:left;cursor:pointer;border-radius:0}
.pm-ws .pm-kpi-label{font-size:12.5px;color:var(--pm-mute)}
.pm-ws .pm-kpi-value{font-size:22px;font-weight:600;font-variant-numeric:tabular-nums;letter-spacing:-0.01em;color:var(--pm-ink);overflow-wrap:anywhere}
.pm-ws .pm-kpis-wide{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr))}
.pm-ws .pm-kpi-sub{font-size:12px;color:var(--pm-faint)}
.pm-ws .pm-kpi[data-tone="red"] .pm-kpi-value{color:var(--pm-red)}
.pm-ws .pm-kpi[data-tone="amber"] .pm-kpi-value{color:var(--pm-amber)}

/* ---------- toolbar + filter chips ---------- */
.pm-ws .pm-toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.pm-ws .pm-chips{display:inline-flex;align-self:flex-start;border:1px solid var(--pm-line);border-radius:var(--cwg-control-radius,3px);overflow:hidden}
.pm-ws .pm-mention-list{display:flex;flex-direction:column;max-width:100%;max-height:240px;overflow:auto;margin-top:4px;border:1px solid var(--pm-line);border-radius:var(--cwg-control-radius,3px);background:var(--paper)}
.pm-ws .pm-mention-list .ds-menu-item{overflow-wrap:anywhere}
.pm-ws .pm-mention-list .ds-menu-item[aria-selected="true"]{background:var(--paper-2)}
.pm-ws .pm-chip{font:inherit;font-size:12.5px;padding:6px 12px;border:0;border-right:1px solid var(--pm-line);background:var(--pm-surface);color:var(--pm-mute);cursor:pointer}
.pm-ws .pm-chip:last-child{border-right:0}
.pm-ws .pm-chip:hover{color:var(--pm-ink)}
.pm-ws .pm-chip[aria-pressed="true"]{background:var(--pm-ink);color:var(--pm-surface)}
.pm-ws .pm-chip:focus-visible{outline:2px solid var(--pm-ink);outline-offset:-2px}
.pm-ws .pm-check{display:inline-flex;align-items:center;gap:6px;font-size:12.5px;color:var(--pm-mute)}
.property-editor-fields .pm-check{display:inline-flex;align-items:center;gap:6px;grid-column:1/-1}
/* Boolean fields: checkbox sits right before its label, like .pm-check. */
.property-editor-fields .property-editor-field:has(>input[type="checkbox"]){display:flex;flex-direction:row-reverse;justify-content:flex-end;align-items:center;gap:6px}
.property-editor-fields .property-editor-field>input[type="checkbox"]{width:auto;margin:0}
.pm-ws .pm-search{font:inherit;font-size:13px;padding:6px 10px;border:1px solid var(--pm-line);border-radius:var(--cwg-control-radius,3px);background:var(--pm-surface);color:var(--pm-ink);min-width:220px}
.pm-ws .pm-count{font-size:12.5px;color:var(--pm-faint)}

/* ---------- registers ---------- */
.pm-ws .pm-table-wrap{border:1px solid var(--pm-line);border-radius:var(--cwg-panel-radius,6px);overflow:auto;background:var(--pm-surface);max-width:100%}
.pm-ws .pm-table{width:100%;border-collapse:separate;border-spacing:0;font-size:13px}
.pm-ws .pm-table th{position:sticky;top:0;z-index:1;background:var(--pm-paper);color:var(--pm-mute);font-weight:500;font-size:12.5px;text-align:left;padding:8px 12px;border-bottom:1px solid var(--pm-line);white-space:nowrap}
.pm-ws .pm-table th.pm-num{text-align:right}
/* The shared portal table skins (uppercase micro-caps, ruled columns) stop at the module edge. */
.pm-ws .pm-table thead th,.pm-ws .pm-table tfoot td{text-transform:none;letter-spacing:normal;font-family:var(--pm-body)}
.pm-ws .pm-table th,.pm-ws .pm-table td{border-left:0;border-right:0;border-top:0}
.pm-ws .pm-table{border:0}
.pm-ws .pm-table td{padding:7px 12px;border-bottom:1px solid var(--pm-line-soft);vertical-align:middle;height:var(--pm-row)}
.pm-ws .pm-table tbody tr:last-child td{border-bottom:0}
.pm-ws .pm-table tbody tr.pm-row:hover td{background:color-mix(in srgb,var(--pm-paper) 70%,var(--pm-surface))}
.pm-ws .pm-table tr.pm-row{cursor:pointer}
.pm-ws .pm-table tr.pm-row:focus-visible td{outline:none;background:var(--pm-accent-soft)}
.pm-ws .pm-table tr.pm-row--void td{color:var(--pm-faint)}
.pm-ws .pm-table .pm-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.pm-ws [data-phone-only]{display:none}
/* r42: the portfolio grid fits a 1440px screen; headers and the milestone/finish cells wrap instead of clipping "Uncommitted (NAD)". */
.pm-ws .pm-table.pm-portfolio-table thead th{white-space:normal;vertical-align:bottom}
.pm-ws .pm-table.pm-portfolio-table td.pm-nowrap{white-space:normal;min-width:7.5rem}
.pm-ws .pm-table .pm-nowrap{white-space:nowrap}
.pm-ws .pm-table .pm-primary{font-weight:500;color:var(--pm-ink);min-width:200px}
.pm-ws .pm-table .pm-sub{display:block;font-size:12px;color:var(--pm-faint);margin-top:1px}
.pm-ws .pm-table .pm-group td{background:var(--pm-paper);font-weight:600;padding-top:9px;padding-bottom:9px;border-bottom:1px solid var(--pm-line);cursor:default}
.pm-ws .pm-table .pm-group .pm-sub{display:inline;margin:0 0 0 10px;font-weight:400}
.pm-ws .pm-table .pm-total td{background:var(--pm-paper);font-weight:600;border-top:1px solid var(--pm-line)}
.pm-ws .pm-table .pm-empty-cell{padding:28px 16px;text-align:center;color:var(--pm-mute)}
.pm-ws .pm-sort{font:inherit;color:inherit;background:none;border:0;padding:0;cursor:pointer;display:inline-flex;align-items:center;gap:4px}
.pm-ws .pm-sort:hover{color:var(--pm-ink)}
.pm-ws .pm-sort[data-dir="asc"]::after{content:"\2191"}
.pm-ws .pm-sort[data-dir="desc"]::after{content:"\2193"}
.pm-ws .pm-link{color:var(--pm-accent);text-decoration:none}
.pm-ws .pm-link:hover{text-decoration:underline}
.pm-ws .pm-mute{color:var(--pm-mute)}
.pm-ws .pm-late{color:var(--pm-red);font-weight:500}

/* status + health */
.pm-ws .pm-status{display:inline-block;font-size:12px;line-height:1;padding:4px 8px;border-radius:999px;background:var(--pm-paper);color:var(--pm-ink);white-space:nowrap}
.pm-ws .pm-status[data-tone="green"]{background:var(--pm-green-soft)}
.pm-ws .pm-status[data-tone="amber"]{background:var(--pm-amber-soft)}
.pm-ws .pm-status[data-tone="red"]{background:var(--pm-red-soft);color:var(--pm-red)}
.pm-ws .pm-status[data-tone="grey"]{color:var(--pm-mute)}
.pm-ws .pm-health{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.pm-ws .pm-health::before{content:"";width:9px;height:9px;border-radius:50%;background:var(--pm-faint);flex:none}
.pm-ws .pm-health[data-tone="green"]::before{background:var(--pm-green)}
.pm-ws .pm-health[data-tone="amber"]::before{background:var(--pm-highlight)}
.pm-ws .pm-health[data-tone="red"]::before{background:var(--pm-red)}
.pm-ws .pm-demo{display:inline-block;margin-left:6px;font-size:10px;padding:0 4px;border:1px solid var(--pm-line);border-radius:3px;background:transparent;color:var(--pm-mute);vertical-align:1px;font-weight:400;letter-spacing:.02em;opacity:.75}

/* progress meter: a native <progress>, so the width needs no inline style */
.pm-ws .pm-meter-wrap{display:inline-flex;align-items:center;gap:8px}
.pm-ws .pm-meter{appearance:none;-webkit-appearance:none;width:72px;height:6px;border:0;border-radius:3px;background:var(--pm-line-soft);overflow:hidden;flex:none}
.pm-ws .pm-meter::-webkit-progress-bar{background:var(--pm-line-soft);border-radius:3px}
.pm-ws .pm-meter::-webkit-progress-value{background:var(--pm-accent);border-radius:3px}
.pm-ws .pm-meter::-moz-progress-bar{background:var(--pm-accent);border-radius:3px}
.pm-ws .pm-meter-pct{font-variant-numeric:tabular-nums;font-size:12.5px;color:var(--pm-mute);min-width:34px}

/* ---------- panels (My work, reporting) ---------- */
.pm-ws .pm-stk-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0 0 16px}
.pm-ws .pm-stk-axis-y,.pm-ws .pm-stk-axis-x{grid-column:1 / -1;font-size:12px;color:var(--pm-mute)}
.pm-ws .pm-stk-axis-x{text-align:right}
.pm-ws .pm-stk-quad{border:1px solid var(--pm-line);border-radius:6px;padding:10px 12px;min-height:84px}
.pm-ws .pm-stk-quad-title{margin:0 0 6px;font-size:13px;font-weight:600}
.pm-ws .pm-stk-names{margin:0;padding-left:18px;font-size:13px}
.pm-ws .pm-stk-names .pm-link{vertical-align:top;font:inherit;background:none;border:0;padding:4px 0;min-height:24px;cursor:pointer;text-align:left}
.pm-ws .pm-grid-2{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,560px),1fr));gap:16px;align-items:start}
.pm-ws .pm-panel{border:1px solid var(--pm-line);border-radius:var(--cwg-panel-radius,6px);background:var(--pm-surface);overflow:hidden}
.pm-ws .pm-panel-head{display:flex;align-items:baseline;flex-wrap:wrap;gap:10px;padding:10px 14px;background:var(--pm-paper);border-bottom:1px solid var(--pm-line)}
.pm-ws .pm-panel-title{font-size:14px;font-weight:600;margin:0}
.pm-ws .pm-panel-count{font-size:12.5px;color:var(--pm-mute)}
.pm-ws .pm-panel-spring{flex:1}
.pm-ws .pm-panel .pm-table-wrap{border:0;border-radius:0}
.pm-ws .pm-panel-body{padding:12px 14px}
.pm-ws .pm-panel-empty{padding:14px;color:var(--pm-mute);font-size:13px;margin:0}
.pm-ws .pm-clear{font-size:13px;color:var(--pm-mute);margin:0}

/* ---------- reporting ---------- */
.pm-ws .pm-report{display:flex;flex-direction:column;gap:12px}
.pm-ws .pm-report-body{display:flex;flex-direction:column;gap:8px}
.pm-ws .pm-report-h{font-size:13px;font-weight:600;margin:10px 0 0;color:var(--pm-ink)}
.pm-ws .pm-report-body .pm-table-wrap{margin:0}
.pm-ws .pm-report-body .property-record-note{margin:0;font-size:13px;color:var(--pm-mute)}
.pm-ws .pm-group-toggle{min-height:44px;padding:8px 6px;margin:-8px 0;color:inherit;font-weight:inherit}
.pm-ws .pm-health-ok{color:var(--pm-green);font-weight:500}

/* ---------- Gantt ---------- */
/* Grid pane: sized for WBS + name + dates + TF/FF + %, drag its right edge to resize; rows scroll sideways rather than squeeze the name below 160px. */
.pm-ws .pm-gantt{display:grid;grid-template-columns:auto minmax(0,1fr);border:1px solid var(--pm-line);border-radius:var(--cwg-panel-radius,6px);overflow:hidden;background:var(--pm-surface)}
.pm-ws .pm-gl{border-right:1px solid var(--pm-line);width:660px;min-width:320px;max-width:70vw;resize:horizontal;overflow-x:auto;overflow-y:hidden}
.pm-ws .pm-gl-head,.pm-ws .pm-gl-row{display:grid;grid-template-columns:40px minmax(160px,1fr) 92px 92px 44px 32px 32px 40px;align-items:center;column-gap:8px;box-sizing:border-box;padding:0 12px;width:100%;min-width:min-content}
.pm-ws .pm-gl-head{height:48px;align-items:end;padding-bottom:8px;background:var(--pm-paper);border-bottom:1px solid var(--pm-line);font-size:12.5px;color:var(--pm-mute);font-weight:500}
.pm-ws .pm-gl-row{height:32px;border:0;border-bottom:1px solid var(--pm-line-soft);background:transparent;font:inherit;font-size:13px;color:var(--pm-ink);text-align:left;cursor:pointer}
.pm-ws button.pm-gl-row:hover{background:color-mix(in srgb,var(--pm-paper) 70%,var(--pm-surface))}
.pm-ws button.pm-gl-row:focus-visible{outline:2px solid var(--pm-ink);outline-offset:-2px}
.pm-ws .pm-gl-row--group{background:var(--pm-paper);font-weight:600}
.pm-ws .pm-gl-row--ms{cursor:default;color:var(--pm-mute)}
.pm-ws .pm-gl-row[data-late="true"] .pm-gl-cell:nth-child(4){color:var(--pm-red);font-weight:500}
.pm-ws .pm-gl-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding-left:18px}
.pm-ws .pm-gl-head .pm-gl-name,.pm-ws .pm-gl-row--group .pm-gl-name{padding-left:0}
.pm-ws .pm-gl-cell{font-variant-numeric:tabular-nums;white-space:nowrap;font-size:12.5px}
.pm-ws .pm-gl-pct{text-align:right}
.pm-ws .pm-gl-float[data-negative="true"]{color:var(--pm-red);font-weight:600}
.pm-ws .pm-gl-toggle{display:inline-block;width:18px;color:var(--pm-mute)}
.pm-ws .pm-gl-diamond{margin-right:6px;font-size:10px;color:var(--pm-ink)}
.pm-ws .pm-gl-row--ms[data-late="true"] .pm-gl-diamond{color:var(--pm-red)}
.pm-ws .pm-gantt-chart{overflow-x:scroll;overflow-y:hidden;scrollbar-width:auto;scrollbar-color:var(--pm-mute) var(--pm-paper);position:relative}
/* Edge shades say there is more timeline off-screen on that side. */
.pm-ws .pm-gantt-chart[data-more-left="true"]{box-shadow:inset 14px 0 10px -10px color-mix(in srgb,var(--pm-ink) 35%,transparent)}
.pm-ws .pm-gantt-chart[data-more-right="true"]{box-shadow:inset -14px 0 10px -10px color-mix(in srgb,var(--pm-ink) 35%,transparent)}
.pm-ws .pm-gantt-chart[data-more-left="true"][data-more-right="true"]{box-shadow:inset 14px 0 10px -10px color-mix(in srgb,var(--pm-ink) 35%,transparent),inset -14px 0 10px -10px color-mix(in srgb,var(--pm-ink) 35%,transparent)}
.pm-ws .pm-gantt-svg{display:block}
.pm-ws .pm-g-head{fill:var(--pm-paper)}
.pm-ws .pm-g-head-line{stroke:var(--pm-line)}
.pm-ws .pm-g-head-text{fill:var(--pm-mute);font-size:11.5px;font-family:var(--pm-body)}
.pm-ws .pm-g-head-major{fill:var(--pm-ink);font-size:12px;font-weight:600;font-family:var(--pm-body)}
.pm-ws .pm-g-col{stroke:var(--pm-line-soft)}
.pm-ws .pm-g-row-line{stroke:var(--pm-line-soft)}
.pm-ws .pm-g-group-band{fill:var(--pm-paper)}
.pm-ws .pm-g-nonwork{fill:var(--pm-paper);opacity:.7}
.pm-ws .pm-g-today{stroke:var(--pm-red);stroke-width:1.5}
.pm-ws .pm-g-today-label{fill:var(--pm-red);font-size:11px;font-weight:600;font-family:var(--pm-body)}
.pm-ws .pm-g-bar{fill:color-mix(in srgb,var(--pm-accent) 26%,var(--pm-surface));stroke:var(--pm-accent);stroke-width:1}
.pm-ws .pm-g-done{fill:var(--pm-accent)}
.pm-ws .pm-g-bar--late{fill:var(--pm-red-soft);stroke:var(--pm-red)}
.pm-ws .pm-g-done--late{fill:var(--pm-red)}
.pm-ws .pm-g-bar--complete{fill:var(--pm-green-soft);stroke:var(--pm-green)}
.pm-ws .pm-g-done--complete{fill:var(--pm-green)}
.pm-ws .pm-g-summary{fill:var(--pm-ink)}
.pm-ws .pm-g-baseline{fill:var(--pm-faint)}
.pm-ws .pm-g-bar--critical{stroke:var(--pm-ink);stroke-width:2}
.pm-ws .pm-gl-row[data-critical="true"] .pm-gl-name{font-weight:600}
.pm-ws .pm-g-ms{fill:var(--pm-ink);stroke:var(--pm-surface);stroke-width:1}
.pm-ws .pm-g-ms--late{fill:var(--pm-red)}
.pm-ws .pm-g-ms--done{fill:var(--pm-green)}
.pm-ws .pm-g-dep{fill:none;stroke:var(--pm-mute);stroke-width:1.2}
.pm-ws .pm-g-arrow{fill:var(--pm-mute)}
.pm-ws .pm-g-label{fill:var(--pm-mute);font-size:11.5px;font-family:var(--pm-body)}
.pm-ws .pm-g-hit{fill:transparent;cursor:pointer}
.pm-ws .pm-g-hit:hover{fill:color-mix(in srgb,var(--pm-accent) 7%,transparent)}
.pm-ws .pm-g-hit:focus-visible{outline:none;fill:var(--pm-accent-soft)}
.pm-ws .pm-legend{display:flex;gap:16px;flex-wrap:wrap;font-size:12.5px;color:var(--pm-mute)}
.pm-ws .pm-legend-key{display:inline-flex;align-items:center;gap:6px}
.pm-ws .pm-legend-swatch{display:inline-block;width:18px;height:8px;border-radius:2px;background:color-mix(in srgb,var(--pm-accent) 26%,var(--pm-surface));border:1px solid var(--pm-accent)}
.pm-ws .pm-legend-swatch[data-tone="late"]{background:var(--pm-red-soft);border-color:var(--pm-red)}
.pm-ws .pm-legend-swatch[data-tone="done"]{background:var(--pm-green-soft);border-color:var(--pm-green)}
.pm-ws .pm-legend-swatch[data-tone="ms"]{width:9px;height:9px;transform:rotate(45deg);background:var(--pm-ink);border:0;border-radius:0}
.pm-ws .pm-legend-swatch[data-tone="critical"]{border:2px solid var(--pm-ink)}
.pm-ws .pm-legend-swatch[data-tone="baseline"]{height:4px;background:var(--pm-faint);border:0}
.pm-ws .pm-legend-swatch[data-tone="today"]{width:2px;height:12px;background:var(--pm-red);border:0;border-radius:0}

/* ---------- popup body helpers (popups render outside .pm-ws) ---------- */
.pm-dl{display:grid;grid-template-columns:minmax(120px,max-content) 1fr;gap:6px 16px;margin:0 0 12px;font-size:13px}
.pm-dl > div{display:contents}
.pm-dl dt{color:var(--ink-mute,var(--ink))}
.pm-dl dd{margin:0;color:var(--ink)}
/* BUG-C2R13-02: on phones the Activity feed stacks "user · time" over a full-width action line. */
/* Phones: cost lines stack name, then cost code, status and amount, so Amount stays visible (C15-01). */
@media (max-width:600px){.pm-table[data-stack] thead{display:none}.pm-table[data-stack] tr{display:flex;flex-wrap:wrap;gap:2px 12px;padding:8px 12px;border-bottom:1px solid var(--pm-line-soft)}.pm-table[data-stack] td{border:0;padding:0;height:auto;min-height:0;overflow-wrap:anywhere}.pm-table[data-stack] td:first-child{flex-basis:100%}.pm-table[data-stack] td.pm-num{margin-left:auto}.pm-table[data-stack] td[data-label]:not(:first-child)::before{content:attr(data-label) ": ";color:var(--pm-mute)}.pm-ws [data-phone-only]{display:flex;gap:8px;align-items:center;margin:0 0 8px}}
@media (max-width:600px){section[aria-label="Activity"] .pm-dl{grid-template-columns:1fr;gap:2px 0}section[aria-label="Activity"] .pm-dl dd{margin-bottom:8px}}
.pm-popup-actions{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}

/* ---------- phone ---------- */
@media (max-width:760px){
  .pm-ws .pm-bar{padding:10px 14px 0;gap:10px}
  .pm-ws .pm-scope{width:100%}
  .pm-ws .pm-scope-select{min-width:0;width:100%;max-width:none}
  .pm-ws .pm-check:has(> .pm-date-field){display:grid;grid-template-columns:3em 1fr;width:100%}
  .pm-ws .pm-rail-toggle{display:none}
  .pm-ws .pm-top{padding-bottom:8px;border-bottom:0}
  .pm-ws .pm-frame,.pm-ws .pm-frame[data-collapsed]{display:block}
  .pm-ws .pm-side,.pm-ws .pm-frame[data-collapsed] .pm-side{position:sticky;top:0;z-index:2;flex-direction:row;gap:2px;max-height:none;min-height:0;overflow-x:auto;overflow-y:hidden;padding:4px 14px;border-right:0;border-bottom:1px solid var(--pm-line);scrollbar-width:none}
  .pm-ws .pm-side-group,.pm-ws .pm-frame[data-collapsed] .pm-side-group+.pm-side-group{flex-direction:row;border-top:0;padding-top:0}
  .pm-ws .pm-side-group+.pm-side-group{border-left:1px solid var(--pm-line);padding-left:4px;margin-left:2px}
  .pm-ws .pm-side-label,.pm-ws .pm-frame[data-collapsed] .pm-side-label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
  .pm-ws .pm-side-link,.pm-ws .pm-frame[data-collapsed] .pm-side-link{padding:8px 10px;gap:6px;justify-content:flex-start}
  .pm-ws .pm-frame[data-collapsed] .pm-side-text{position:static;width:auto;height:auto;clip-path:none}
  .pm-ws .pm-side-link[aria-current="page"]::before,.pm-ws .pm-frame[data-collapsed] .pm-side-link[aria-current="page"]::before{left:10px;right:10px;top:auto;bottom:-4px;width:auto;height:3px;border-radius:2px 2px 0 0}
  .pm-ws .pm-body{padding:14px 14px 32px}
  .pm-ws .pm-head-title{font-size:19px}
  .pm-ws .pm-grid-2{grid-template-columns:minmax(0,1fr)}
  /* Phone: a narrow name column with the WBS toggles stays put while the chart scrolls sideways. */
  .pm-ws .pm-gantt{grid-template-columns:132px minmax(0,1fr)}
  .pm-ws .pm-gl{width:auto;min-width:0;max-width:none;resize:none;overflow:visible}
  .pm-ws .pm-gl-head,.pm-ws .pm-gl-row{grid-template-columns:minmax(0,1fr);padding:0 6px;min-width:0}
  .pm-ws .pm-gl-cell{display:none}
  .pm-ws .pm-gl .pm-gl-row[data-depth] .pm-gl-name{padding-left:24px}
  .pm-ws .pm-gl-row--group{position:relative}
  .pm-ws .pm-gl-row--group::after{content:"";position:absolute;left:0;right:0;top:-6px;bottom:-6px}
  .pm-ws .pm-search{min-width:0;flex:1 1 100%}
  .pm-ws .pm-chips{flex-wrap:wrap;max-width:100%}
  .pm-ws .pm-stage:not(:last-child)::after{display:none}
}

/* ---------- work breakdown + drag to reschedule ---------- */
.pm-ws .pm-gl-row[data-depth="1"] .pm-gl-name{padding-left:34px}
.pm-ws .pm-gl-row[data-depth="2"] .pm-gl-name{padding-left:50px}
.pm-ws .pm-gl-row[data-depth="3"] .pm-gl-name{padding-left:66px}
.pm-ws .pm-gl-row[data-depth="4"] .pm-gl-name{padding-left:82px}
.pm-ws .pm-gl-row[data-summary="true"] .pm-gl-name{font-weight:600}
.pm-ws .pm-table td[data-depth="1"]{padding-left:28px}
.pm-ws .pm-table td[data-depth="2"]{padding-left:44px}
.pm-ws .pm-table td[data-depth="3"]{padding-left:60px}
.pm-ws .pm-table td[data-depth="4"]{padding-left:76px}
.pm-ws .pm-g-done,.pm-ws .pm-g-baseline,.pm-ws .pm-g-label{pointer-events:none}
.pm-ws .pm-g-bar[data-drag="ready"]{cursor:grab;touch-action:none}
.pm-ws .pm-g-bar[data-drag="active"]{cursor:grabbing;stroke-width:2;touch-action:none}
.pm-ws .pm-g-grip{fill:transparent;cursor:ew-resize;touch-action:none}
.pm-ws .pm-g-grip:hover{fill:color-mix(in srgb,var(--pm-ink) 25%,transparent)}

/* ---------- cost control ---------- */
.pm-ws .pm-stages{display:flex;flex-wrap:wrap;gap:0;margin:0;padding:12px 14px;list-style:none;counter-reset:pm-stage}
.pm-ws .pm-stage{counter-increment:pm-stage;display:flex;align-items:center;gap:8px;padding:6px 18px 6px 0;font-size:13px;color:var(--pm-faint)}
.pm-ws .pm-stage::before{content:counter(pm-stage);display:inline-grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1px solid var(--pm-line);font-size:12px}
.pm-ws .pm-stage:not(:last-child)::after{content:"";width:28px;height:1px;background:var(--pm-line);margin-left:10px}
.pm-ws .pm-stage[data-state="done"]{color:var(--pm-mute)}
.pm-ws .pm-stage[data-state="done"]::before{background:var(--pm-green-soft);border-color:var(--pm-green)}
.pm-ws .pm-stage[data-state="current"]{color:var(--pm-ink);font-weight:600}
.pm-ws .pm-stage[data-state="current"]::before{background:var(--pm-accent);border-color:var(--pm-accent);color:var(--pm-surface)}
.pm-ws .pm-avail{display:block;width:100%;height:18px;margin:2px 0 6px}
.pm-ws .pm-avail-track{fill:var(--pm-line-soft)}
.pm-ws .pm-avail-fill{fill:var(--pm-green)}
.pm-ws .pm-avail-fill[data-state="warn"]{fill:var(--pm-amber)}
.pm-ws .pm-avail-fill[data-state="block"]{fill:var(--pm-red)}
.pm-ws .pm-avail-mark{stroke:var(--pm-ink);stroke-width:1.5;vector-effect:non-scaling-stroke}
.pm-ws .pm-avail-note{margin:0 0 12px;font-size:13px;color:var(--pm-mute)}
.pm-ws .pm-avail-note[data-state="block"]{color:var(--pm-red);font-weight:600}
.pm-ws .pm-curve-wrap{overflow-x:auto;margin-top:14px}
.pm-ws .pm-curve{display:block;width:100%;min-width:720px;height:auto}
.pm-ws .pm-curve-grid{stroke:var(--pm-line-soft);stroke-width:1}
.pm-ws .pm-curve-axis{fill:var(--pm-faint);font-size:11px;font-variant-numeric:tabular-nums}
.pm-ws .pm-curve-bac{stroke:var(--pm-mute);stroke-width:1;stroke-dasharray:4 4}
.pm-ws .pm-curve-pv{fill:none;stroke:var(--pm-accent);stroke-width:2}
.pm-ws .pm-curve-now{stroke:var(--pm-ink);stroke-width:1;stroke-dasharray:2 3}
.pm-ws .pm-curve-ev{fill:var(--pm-green);stroke:var(--pm-surface);stroke-width:1.5}
.pm-ws .pm-curve-ac{fill:var(--pm-amber);stroke:var(--pm-surface);stroke-width:1.5}
.pm-ws .pm-curve-recorded{fill:var(--pm-surface);stroke:var(--pm-green);stroke-width:2.5}
.pm-ws .pm-curve-evline{fill:none;stroke:var(--pm-green);stroke-width:2}
.pm-ws .pm-curve-acline{fill:none;stroke:var(--pm-amber);stroke-width:2}
.pm-ws .pm-curve-forecast{fill:none;stroke:var(--pm-amber);stroke-width:2;stroke-dasharray:6 5}
.pm-ws .pm-trend-cpi{fill:none;stroke:var(--pm-accent);stroke-width:2}
.pm-ws .pm-trend-spi{fill:none;stroke:var(--pm-green);stroke-width:2}
.pm-ws .pm-trend-ref{stroke:var(--pm-ink);stroke-width:1;stroke-dasharray:4 4}
.pm-ws .pm-legend-swatch[data-tone="fc"]{height:0;border:0;border-top:2px dashed var(--pm-amber)}
.pm-ws .pm-legend-swatch[data-tone="cpi"]{height:3px;background:var(--pm-accent);border:0}
.pm-ws .pm-legend-swatch[data-tone="spi"]{height:3px;background:var(--pm-green);border:0}
.pm-ws .pm-legend-swatch[data-tone="pv"]{height:3px;background:var(--pm-accent);border:0}
.pm-ws .pm-legend-swatch[data-tone="ev"]{width:10px;height:10px;border-radius:50%;background:var(--pm-green);border:0}
.pm-ws .pm-legend-swatch[data-tone="ac"]{width:10px;height:10px;border-radius:50%;background:var(--pm-amber);border:0}
.pm-ws .pm-legend-swatch[data-tone="rec"]{width:10px;height:10px;border-radius:50%;background:var(--pm-surface);border:2px solid var(--pm-green)}
.pm-ws .pm-legend-swatch[data-tone="bac"]{height:0;border:0;border-top:1px dashed var(--pm-mute)}

/* ---------- resource load ---------- */
.pm-ws .pm-load td[data-load="some"]{background:var(--pm-green-soft)}
.pm-ws .pm-load td[data-load="high"]{background:var(--pm-amber-soft)}
.pm-ws .pm-load td[data-load="over"]{background:var(--pm-red-soft);color:var(--pm-red);font-weight:600}
.pm-ws .pm-load th[data-now="true"]{color:var(--pm-ink);font-weight:600}

@media print{
  .pm-ws .wbs-dictionary{break-before:page}
  .pm-ws .wbs-dictionary .pm-panel-head{display:none}
  .pm-ws .wbs-dictionary .pm-table{font-size:10pt}
  .pm-ws:has(.wbs-dictionary-print) .pm-body > :not(.wbs-dictionary-print){display:none}
  .pm-ws:has(.wbs-dictionary-print) .wbs-dictionary-print{display:block;break-before:auto}
  .pm-ws .wbs-dictionary .pm-table caption{position:static;width:auto;height:auto;clip-path:none;overflow:visible;font-size:16pt;text-align:left;padding:0 0 10px}
  .pm-ws .wbs-dictionary .pm-table th,.pm-ws .wbs-dictionary .pm-table td{font-size:12pt;white-space:pre-wrap;overflow-wrap:anywhere}
  .pm-ws .pm-bar,.pm-ws .pm-side,.pm-ws .pm-head-actions,.pm-ws .pm-toolbar{display:none}
  .pm-ws .pm-table-wrap,.pm-ws .pm-gantt{overflow:visible}
  /* Unclipped, the scrolled timeline paints left over the task grid; print the window on screen instead. */
  .pm-ws .pm-gantt-chart{overflow:hidden;box-shadow:none}
  /* Screen viewport constraints and grid rows must not reserve or clip printed pages. */
  html:has(.pm-ws),html:has(.pm-ws) body,html:has(.pm-ws) body :has(.pm-ws),html:has(.pm-ws) .pm-ws,html:has(.pm-ws) .pm-ws :has([data-report-content]){height:auto;min-height:0;max-height:none;overflow:visible;position:static;display:block}
  /* Board-pack content must wrap on paper and flow through every page, not stay in the screen scroller. */
  .pm-ws .pm-body{padding-bottom:0}
  .pm-ws .pm-table{table-layout:fixed;width:100%}
  .pm-ws .pm-table :is(th,td){white-space:normal;overflow-wrap:anywhere;word-break:normal}
  .pm-ws .pm-table .pm-num{overflow-wrap:anywhere}
  .pm-ws .pm-kpi-value{white-space:normal;overflow:visible;text-overflow:clip}
  .pm-ws .pm-dash-health-row,.pm-ws .pm-dash-month,.pm-ws .pm-dash-card,.pm-ws .pm-panel-head,.pm-ws tr{break-inside:avoid;page-break-inside:avoid}
  .pm-ws .pm-dash-roadmap,.pm-ws .pm-dash-months{overflow:visible;min-width:0}
  .pm-ws .pm-dash-months{flex-wrap:wrap}
  .pm-ws .pm-top{display:none}
  .pm-ws .pm-report,.pm-ws .pm-report-body{display:block}
  /* PDF export of Schedule and Cost control: landscape pages, colours kept, header stamp, grid header repeats per page. */
  @page{size:A4 landscape;margin:10mm}
  .pm-ws{print-color-adjust:exact;-webkit-print-color-adjust:exact}
  .pm-ws .pm-print-stamp{display:block}
  .pm-ws .pm-gl-head{position:static}
  .pm-ws .pm-gl-row,.pm-ws .pm-curve,.pm-ws .pm-legend,.pm-ws tr{break-inside:avoid}
  .pm-ws thead{display:table-header-group}
  /* The hidden rail kept its grid column and squeezed the page into 220px: no task grid, clipped KPI tiles. */
  .pm-ws .pm-frame,.pm-ws .pm-frame[data-collapsed]{display:block}
  /* Print pages are narrower than the 760px phone breakpoint, which hides the task grid; bring it back. */
  .pm-ws .pm-gantt{grid-template-columns:52% minmax(0,1fr)}
  .pm-ws .pm-gl{width:auto;min-width:0;max-width:none;resize:none;overflow:visible}
  .pm-ws .pm-gl-head,.pm-ws .pm-gl-row{min-width:0}
  .pm-ws .pm-gl{font-size:10px}
  /* A PDF reader cannot hover a cut name (R7-001): wrap to two lines inside the 32px row. */
  .pm-ws .pm-gl-name{white-space:normal;overflow:visible;text-overflow:clip;line-height:1.1}
  .pm-ws .pm-gl{display:block}
  .pm-ws .pm-gl-head,.pm-ws .pm-gl-row{grid-template-columns:40px minmax(0,1fr) 76px 76px 32px 28px 28px 40px;column-gap:6px;padding:0 8px}
  .pm-ws .pm-schedule-hint,.pm-ws .pm-schedule-hint ~ .pm-notice{display:none}
  /* The schedule legend lives in a toolbar; print the legend, not the buttons beside it. */
  .pm-ws .pm-toolbar:has(> .pm-legend){display:block}
  .pm-ws .pm-toolbar:has(> .pm-legend) > :not(.pm-legend){display:none}
  .pm-ws .pm-kpi{padding:8px 10px}
  .pm-ws .pm-kpi-value{font-size:15px;overflow:visible;text-overflow:clip}
  /* R32-002: fixed layout forces the table into its card on paper; headers carried their own 12.5px size and nowrap. */
  .pm-ws .pm-table{table-layout:fixed;width:100%;font-size:9.5px}
  .pm-ws .pm-table th,.pm-ws .pm-table td{white-space:normal;overflow-wrap:anywhere;padding:4px 5px;font-size:9.5px}
  /* R32-001: a repeated tfoot printed the total alone on a page; print it once, glued to the last project rows. */
  .pm-ws .pm-table tfoot{display:table-row-group}
  .pm-ws .pm-table tbody,.pm-ws .pm-table tfoot{break-inside:avoid}
  .pm-ws .pm-table .pm-total{break-before:avoid}
  .pm-ws .pm-table-wrap:has(.pm-total){break-inside:avoid}
  /* R32-003: paper cannot scroll; drop the hint and wrap every month of the roadmap onto the page. */
  .pm-ws .pm-screen-only{display:none}
  .pm-ws .pm-panel-count .pm-print-stamp{display:inline;font-size:inherit}
  .pm-ws .pm-dash-roadmap{overflow:visible}
  .pm-ws .pm-dash-months{flex-wrap:wrap;min-width:0}
  .pm-ws svg{display:block}
  .pm-ws .pm-gantt,.pm-ws .pm-kpis,.pm-ws svg,.pm-ws .pm-dash-health-row{break-inside:avoid}
}
.pm-ws .pm-print-stamp{display:none;margin:0;font-size:12px;color:var(--pm-mute)}

.pm-ws .pm-schedule-hint{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:10px 14px;margin:12px 0;border:1px solid var(--pm-line);border-radius:var(--cwg-panel-radius,6px);background:var(--pm-surface);color:var(--pm-ink)}
/* After the screen rule above so it wins (R7-002): no hints or buttons on paper. */
@media print{.pm-ws .pm-schedule-hint,.pm-ws .pm-btn{display:none}}
.pm-ws .pm-g-task:hover .pm-g-grip{fill:var(--pm-ink);stroke:var(--pm-surface);stroke-width:1}
.pm-ws .pm-g-move-handle{fill:var(--pm-ink);opacity:0;pointer-events:none}
.pm-ws .pm-g-task:hover .pm-g-move-handle{opacity:1}
.pm-ws .pm-legend-swatch[data-tone="dependency"]{height:0;border:0;border-top:1px solid var(--pm-mute)}
.pm-ws .pm-gl-row[data-selected="true"]{background:var(--pm-paper);outline:1px solid var(--pm-ink);outline-offset:-1px}
.pm-ws .pm-gl-row .gsp-input{min-width:0;width:100%;height:28px;padding:2px;box-sizing:border-box}
.pm-ws .pm-g-link-handle{fill:var(--pm-surface);stroke:var(--pm-ink);stroke-width:2;cursor:crosshair;touch-action:none}
.pm-ws .pm-g-grip{fill:var(--pm-ink);opacity:.55}
.pm-ws .pm-g-dep{stroke-width:3;cursor:pointer;pointer-events:stroke}
.pm-ws .pm-g-arrow{cursor:pointer}
.pm-ws .pm-heatmap{margin:0 0 16px}
.pm-ws .pm-heatmap-grid{display:grid;gap:4px;max-width:520px}
.pm-ws .pm-heatmap-row{display:grid;grid-template-columns:72px repeat(5,minmax(0,1fr));gap:4px;align-items:center}
.pm-ws .pm-heatmap-axis{font-size:12px;color:var(--pm-mute);text-align:center}
.pm-ws .pm-heatmap-cell{min-height:40px;border:1px solid transparent;border-radius:6px;font-weight:600;cursor:pointer;background:var(--pm-green-soft)}
.pm-ws .pm-heatmap-cell[data-tone="amber"]{background:var(--pm-amber-soft)}
.pm-ws .pm-heatmap-cell[data-tone="red"]{background:var(--pm-red-soft);color:var(--pm-red)}
.pm-ws .pm-heatmap-cell[aria-pressed="true"]{border-color:currentColor;outline:2px solid var(--pm-red)}
.pm-ws .pm-hist-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(260px,1fr));gap:12px;padding:12px}
.pm-ws .pm-hist-list>.pm-panel-count{grid-column:1/-1;margin:0}
.pm-ws .pm-hist{margin:0;display:grid;gap:4px}
.pm-ws .pm-hist-svg{width:100%;height:auto;display:block}
.pm-ws .pm-hist-cap{stroke:var(--pm-ink);stroke-width:1;stroke-dasharray:3 2}
.pm-ws .pm-hist-over{fill:var(--pm-red)}
.pm-ws .pm-hist-label{font-size:7px;fill:var(--pm-mute);text-anchor:middle}
.pm-ws .pm-hist-s0{fill:color-mix(in srgb,var(--pm-ink) 40%,var(--pm-surface))}
.pm-ws .pm-hist-s1{fill:var(--pm-green)}
.pm-ws .pm-hist-s2{fill:var(--pm-amber)}
.pm-ws .pm-hist-s3{fill:var(--pm-accent-soft)}
.pm-ws .pm-hist-s4{fill:var(--pm-green-soft)}
.pm-ws .pm-hist-s5{fill:var(--pm-faint)}
.pm-ws .pm-hist-wide{grid-column:1/-1;min-width:0}

/* Schedule board: one column per status, cards open the task popup and drag between columns. */
.pm-board{display:grid;grid-template-columns:repeat(4,minmax(14rem,1fr));gap:var(--ds-space-3,0.75rem);overflow-x:auto;align-items:start}
.pm-board-col{min-height:8rem}
.pm-board-card{display:flex;flex-direction:column;gap:0.25rem;width:100%;text-align:left;font:inherit;color:inherit;background:var(--ds-surface,transparent);border:1px solid var(--ds-border,currentColor);border-radius:var(--ds-radius,0.5rem);padding:0.625rem;margin-top:0.5rem;cursor:grab}
.pm-board-card:focus-visible{outline:2px solid var(--ds-focus,currentColor);outline-offset:2px}

/* BUG-C08: shared Projects date field. Text shows "15 Oct 2026"; the native picker sits behind the calendar button. */
.pm-date-field{position:relative;display:flex;flex-wrap:wrap;align-items:center;gap:4px;min-width:0}
.pm-date-field-error{flex-basis:100%}
.pm-date-field > .gsp-input,.pm-date-field > .pm-scope-select{flex:1 1 0;min-width:0}
.pm-date-field-button{flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:40px;min-height:40px;padding:0}
.pm-date-field-picker{position:absolute;right:0;bottom:0;width:40px;height:1px;opacity:0;pointer-events:none;border:0;padding:0}
/* Baseline task snapshot (BUG-R17-REG-01): phones stack each task as label/value pairs. */
@media(max-width:600px){.pm-baseline-snapshot .property-register-table thead{display:none}.pm-baseline-snapshot .property-register-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);border-bottom:1px solid var(--hairline);padding:6px 0}.pm-baseline-snapshot .property-register-table td{display:block;min-width:0;border:0;overflow-wrap:anywhere}.pm-baseline-snapshot .property-register-table td::before{display:block;content:attr(data-label);font-size:11px;color:var(--ink-mute)}.pm-baseline-snapshot .property-register-table td:first-child{grid-column:1/-1;font-weight:600}}

/* R33: print keeps each heading with its first card, and the board pack table wraps inside fixed columns. */
@media print{
  /* BUG-001 r33b: never avoid breaks inside a block taller than a page (it blanks page 1); keep only headings and small units together. */
  .pm-ws :is(h2,h3,h4),.pm-ws .pm-head-meta,.pm-ws .pm-panel-head{break-after:avoid;page-break-after:avoid}
  .pm-ws .pm-panel-head,.pm-ws .pm-dash-card{break-inside:avoid;page-break-inside:avoid}
  .pm-ws .pm-panel:has(.pm-curve),.pm-ws .pm-panel:has(.pm-curve) .pm-kpis,.pm-ws .pm-panel:has(.pm-curve) .pm-curve,.pm-ws .pm-panel:has(.pm-curve) .pm-table-wrap{break-inside:avoid;page-break-inside:avoid}
  .pm-ws .pm-panel:has(.pm-curve) thead{display:table-header-group}
  .pm-ws .pm-portfolio-table{table-layout:fixed;width:100%;font-size:10px}
  .pm-ws .pm-portfolio-table :is(th,td){white-space:normal;overflow-wrap:anywhere;padding:4px 6px;vertical-align:top}
  .pm-ws .pm-portfolio-table th:nth-child(1){width:16%}
  .pm-ws .pm-portfolio-table th:nth-child(2){width:12%}
  .pm-ws .pm-portfolio-table th:nth-child(3){width:13%}
  .pm-ws .pm-portfolio-table th:nth-child(4){width:15%}
  .pm-ws .pm-portfolio-table th:nth-child(5){width:9%}
  .pm-ws .pm-portfolio-table th:nth-child(n+6){width:8.75%}
  /* BUG-002 r33c: .pm-table .pm-num kept nowrap, so "Committed (NAD)" clipped and "Uncommitted (NAD)" ran past the card. */
  .pm-ws .pm-table.pm-portfolio-table :is(th,td){white-space:normal;overflow-wrap:break-word;word-break:normal}
  .pm-ws .pm-table.pm-portfolio-table .pm-num{font-size:9px;overflow-wrap:anywhere}
  /* The 72px meter plus its % overran the progress column into Next milestone. */
  .pm-ws .pm-portfolio-table td:nth-child(3){padding-right:10px}
  .pm-ws .pm-portfolio-table .pm-meter-wrap{display:flex;flex-wrap:wrap;gap:4px;max-width:100%}
  .pm-ws .pm-portfolio-table .pm-meter{width:44px;flex:0 1 44px}
  .pm-ws .pm-portfolio-table .pm-meter-pct{font-size:9.5px;min-width:0}
  /* Trend charts split across pages: the panel's overflow:hidden clipped the moved card, leaving an empty box and a cut chart. */
  .pm-ws .pm-panel{overflow:visible;min-height:0}
  .pm-ws .pm-dash-card{min-height:0}
  .pm-ws .pm-dash-trend{height:46mm;width:100%}
  /* 80px of screen bottom padding spilled onto a blank last page. */
  .shell:has(.pm-ws) > .body,.pm-ws .pm-body{padding-bottom:0}
}

/* R34: a short checkbox list (calendar weekdays) wraps instead of scrolling in a 160px box; Sat was cut off at 390px. */
.pm-ws .property-agreement-options{flex-direction:row;flex-wrap:wrap;column-gap:14px;max-height:none;overflow:visible}
@media print{
  /* BUG-002 r36: a cash-flow card is taller than a page; keep tiles with the chart and the monthly table whole instead of splitting them. */
  .pm-ws section[aria-label="Cash flow"] .pm-kpis{break-after:avoid;page-break-after:avoid}
  .pm-ws section[aria-label="Cash flow"] :is(.pm-kpis,.pm-curve,.pm-table-wrap){break-inside:avoid;page-break-inside:avoid}
  /* Keep first report content on page one. Hidden shell chrome and avoid-break rules must not reserve a blank page. */
  .pm-ws:has(.pm-report) .pm-body{padding-top:0}
  .pm-ws:has(.pm-report) .pm-report{break-before:auto;page-break-before:auto}
  .pm-ws:has(.pm-report) .pm-report-keep{break-before:auto;page-break-before:auto;break-inside:auto;page-break-inside:auto}
  .pm-ws:has(.pm-report) .pm-report-project{break-inside:auto;page-break-inside:auto}
}
