/* Waypoint Planner - critical chain tools (docs/CRITICAL_CHAIN.md §11.4): the Critical Chain ribbon tab's
   sensitivity box, the Fever Chart / Buffer Report / Network Analysis / Resource Load views, the CCPM dialogs and the tokens the
   Critical Chain Gantt reads for its bars (js/ui/gantt/chart.js, barDecorator). Classes are prefixed wp-cc-. */

:root {
  --wp-cc-chain: #c2410c;
  --wp-cc-chain-progress: #7c2d12;
  --wp-cc-feeding: #0e7490;
  --wp-cc-buffer: #64748b;
  --wp-cc-projected: #6d28d9;
  --wp-cc-green: #2f9e44;
  --wp-cc-yellow: #e0a800;
  --wp-cc-red: #e03131;
  --wp-cc-green-bg: rgba(47, 158, 68, 0.15);
  --wp-cc-yellow-bg: rgba(240, 180, 0, 0.22);
  --wp-cc-red-bg: rgba(224, 49, 49, 0.16);
  --wp-cc-load: #5b8def;
  --wp-cc-load-over-bg: rgba(224, 49, 49, 0.18);
}

/* ---- Ribbon: sensitivity box ---- */
.wp-cc-sens { display: flex; flex-direction: column; gap: 1px; }
.wp-cc-sens-row { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 4px; white-space: nowrap; }
.wp-cc-sens-input.wp-input { width: 44px; height: 20px; padding: 0 4px; font-size: 12px; }
.wp-cc-sens-unit { color: var(--wp-muted); }

/* ---- View layout ---- */
.wp-cc-view { background: var(--wp-bg); }
.wp-cc-scroll { position: relative; flex: 1 1 auto; min-height: 0; overflow: auto; outline: none; }
.wp-cc-page { max-width: 1500px; margin: 0 auto; padding: 14px 16px 24px; }
.wp-cc-stack { display: flex; flex-direction: column; gap: 14px; }
.wp-cc-fever-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 14px; align-items: start; }
/* The Work Resources table has five columns: give the side column room so Status is not cut off at 1280 px. */
.wp-cc-fever-layout.wp-cc-load-layout { grid-template-columns: minmax(0, 1fr) minmax(320px, 450px); }
@media (max-width: 1100px) {
  .wp-cc-fever-layout { grid-template-columns: minmax(0, 1fr); }
}
.wp-cc-card { min-width: 0; padding: 12px 14px; background: var(--wp-panel); border: 1px solid var(--wp-border); border-radius: 8px; box-shadow: var(--wp-shadow-sm); }
.wp-cc-card-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 10px; font-size: 13px; font-weight: 600; }
.wp-cc-card-note { color: var(--wp-muted); font-size: 11.5px; font-weight: 400; }
.wp-cc-card-actions { display: inline-flex; gap: 4px; margin-left: auto; }
.wp-cc-card-body { min-width: 0; }
.wp-cc-chartbox { width: 100%; min-width: 0; overflow: hidden; }
.wp-cc-tselect.wp-input { height: 24px; padding: 0 4px; max-width: 220px; }
.wp-cc-tnumber.wp-input { width: 56px; height: 24px; padding: 0 4px; }
.wp-cc-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 32px 24px; color: var(--wp-muted); text-align: center; }
.wp-cc-empty .wp-icon { color: var(--wp-accent); }
.wp-cc-empty p { max-width: 520px; margin: 0; line-height: 1.5; }
.wp-cc-muted { color: var(--wp-muted); }
.wp-cc-desc { margin: 0 0 8px; color: var(--wp-muted); line-height: 1.45; }
.wp-cc-h3 { margin: 10px 0 6px; font-size: 12px; font-weight: 600; }
.wp-cc-warn { margin: 6px 0 0; color: var(--wp-warning); }
.wp-cc-link { padding: 0; border: 0; background: none; color: var(--wp-accent-strong); text-align: left; cursor: pointer; }
.wp-cc-link:hover { text-decoration: underline; }
.wp-cc-link:focus-visible { outline: none; box-shadow: var(--wp-focus); }
.wp-cc-pick { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; }
.wp-cc-pick .wp-input { max-width: 360px; }

/* ---- Tables ---- */
.wp-cc-tablewrap { max-height: 420px; overflow: auto; border: 1px solid var(--wp-border); border-radius: var(--wp-radius-sm); outline: none; }
.wp-cc-tablewrap:focus-visible { box-shadow: var(--wp-focus); }
.wp-cc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.wp-cc-table th { position: sticky; top: 0; z-index: 1; height: 26px; padding: 0 8px; background: var(--wp-panel-2); border-bottom: 1px solid var(--wp-border-strong); font-weight: 600; text-align: left; white-space: nowrap; }
.wp-cc-table td { max-width: 320px; height: 24px; padding: 2px 8px; overflow: hidden; border-bottom: 1px solid var(--wp-grid-line); text-overflow: ellipsis; white-space: nowrap; }
.wp-cc-table .is-right { text-align: right; }
.wp-cc-table .is-center { text-align: center; }
.wp-cc-table td.is-wrap { min-width: 160px; white-space: normal; }
.wp-cc-table tbody tr:hover { background: var(--wp-hover); }
.wp-cc-table tbody tr.is-selected { background: var(--wp-select); color: var(--wp-select-text); }
.wp-cc-table tr.is-empty td { padding: 14px; color: var(--wp-muted); text-align: center; }
.wp-cc-table input[type="checkbox"] { margin: 0; accent-color: var(--wp-accent); }
.wp-cc-commentcell .wp-input { width: 100%; min-width: 160px; height: 22px; }
.wp-cc-zone-tag { display: inline-block; min-width: 46px; padding: 0 7px; border-radius: 9px; font-size: 11px; line-height: 17px; text-align: center; }
.wp-cc-zone-tag.is-green { background: #e2f4e6; color: #1b6b2c; }
.wp-cc-zone-tag.is-yellow { background: #fdf1c7; color: #7a5600; }
.wp-cc-zone-tag.is-red { background: #fde4e4; color: #a01b1b; }
.wp-cc-trend { display: inline-block; width: 16px; font-weight: 700; text-align: center; }
.wp-cc-trend.is-up { color: var(--wp-cc-red); }
.wp-cc-trend.is-down { color: var(--wp-cc-green); }
.wp-cc-trend.is-flat { color: var(--wp-muted); }
.wp-cc-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; }
.wp-cc-dlg > .wp-cc-facts { margin-bottom: 8px; }
.wp-cc-facts dt { color: var(--wp-muted); }
.wp-cc-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* ---- Charts (SVG) ---- */
.wp-cc-chart { display: block; overflow: visible; font-family: var(--wp-font); print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.wp-cc-zone { stroke: none; }
.wp-cc-zone.is-green { fill: var(--wp-cc-green-bg); }
.wp-cc-zone.is-yellow { fill: var(--wp-cc-yellow-bg); }
.wp-cc-zone.is-red { fill: var(--wp-cc-red-bg); }
.wp-cc-gridline { stroke: var(--wp-grid-line); stroke-width: 1; }
.wp-cc-axis { stroke: var(--wp-border-strong); stroke-width: 1; }
.wp-cc-tick { fill: var(--wp-muted); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.wp-cc-axis-label { fill: var(--wp-muted); font-size: 11px; }
.wp-cc-limit { stroke: var(--wp-cc-red); stroke-width: 1; stroke-dasharray: 5 4; }
.wp-cc-trail { fill: none; stroke: #8a91a3; stroke-width: 1.4; stroke-linejoin: round; opacity: 0.8; }
.wp-cc-trail.is-selected, .wp-cc-history .wp-cc-trail, .wp-cc-fever.is-history .wp-cc-trail { stroke: var(--wp-text); stroke-width: 1.8; opacity: 1; }
.wp-cc-trail-dot { fill: #8a91a3; }
.wp-cc-marker, .wp-cc-point { cursor: pointer; outline: none; }
.wp-cc-marker-dot, .wp-cc-point-dot { stroke: var(--wp-panel); stroke-width: 2; }
.is-green > .wp-cc-marker-dot, .is-green > .wp-cc-point-dot { fill: var(--wp-cc-green); }
.is-yellow > .wp-cc-marker-dot, .is-yellow > .wp-cc-point-dot { fill: var(--wp-cc-yellow); }
.is-red > .wp-cc-marker-dot, .is-red > .wp-cc-point-dot { fill: var(--wp-cc-red); }
.wp-cc-marker.is-selected > .wp-cc-marker-dot, .wp-cc-point.is-selected > .wp-cc-point-dot { stroke: var(--wp-text); stroke-width: 2.5; }
.wp-cc-marker:focus-visible > .wp-cc-marker-dot, .wp-cc-point:focus-visible > .wp-cc-point-dot { stroke: var(--wp-accent); stroke-width: 3; }
.wp-cc-marker-label { fill: var(--wp-text); font-size: 11.5px; font-weight: 600; paint-order: stroke; stroke: var(--wp-panel); stroke-width: 3px; stroke-linejoin: round; }
.wp-cc-point-label { fill: var(--wp-muted); font-size: 10px; paint-order: stroke; stroke: var(--wp-panel); stroke-width: 3px; }
.wp-cc-point.is-latest > .wp-cc-point-label { fill: var(--wp-text); font-weight: 600; }
.wp-cc-overflow { fill: var(--wp-cc-red); }
.wp-cc-line { fill: none; stroke: var(--wp-text); stroke-width: 2; stroke-linejoin: round; }
.wp-cc-tip { max-width: 320px; }
.wp-cc-tip-title { margin-bottom: 2px; font-weight: 600; }
.wp-cc-tip-row { display: flex; gap: 8px; }
.wp-cc-tip-name { flex: 1; opacity: 0.8; }

/* ---- Network Analysis ---- */
.wp-cc-net { display: flex; flex: 1 1 auto; min-height: 0; }
.wp-cc-net-side { display: flex; flex: none; flex-direction: column; gap: 12px; width: 270px; padding: 12px; overflow: auto; background: var(--wp-panel); border-right: 1px solid var(--wp-border); }
.wp-cc-net-main { flex: 1 1 auto; min-width: 0; overflow: auto; }
.wp-cc-cred-box { display: flex; align-items: flex-start; gap: 12px; }
.wp-cc-cred { display: flex; flex: none; flex-direction: column; align-items: center; justify-content: center; width: 84px; height: 84px; box-sizing: border-box; border-radius: 50%; border: 5px solid; }
.wp-cc-cred.is-good { border-color: var(--wp-cc-green); }
.wp-cc-cred.is-fair { border-color: var(--wp-cc-yellow); }
.wp-cc-cred.is-poor { border-color: var(--wp-cc-red); }
.wp-cc-cred-score { font-size: 22px; font-weight: 700; line-height: 1; }
.wp-cc-cred-label { color: var(--wp-muted); font-size: 8.5px; text-transform: uppercase; letter-spacing: 0.02em; }
.wp-cc-cred-parts { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: 11.5px; }
.wp-cc-cred-parts li { display: flex; justify-content: space-between; gap: 6px; }
.wp-cc-cred-parts b { color: var(--wp-danger); font-variant-numeric: tabular-nums; }
.wp-cc-general { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; margin: 0; font-size: 11.5px; }
.wp-cc-general dt { color: var(--wp-muted); }
.wp-cc-general dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.wp-cc-cats { margin: 0; padding: 0; list-style: none; }
.wp-cc-cat { display: flex; align-items: center; gap: 7px; height: 26px; padding: 0 8px; border-radius: var(--wp-radius-sm); cursor: pointer; outline: none; }
.wp-cc-cat:hover { background: var(--wp-hover); }
.wp-cc-cat:focus-visible { box-shadow: var(--wp-focus); }
.wp-cc-cat.is-selected { background: var(--wp-accent-weak); color: var(--wp-accent-strong); font-weight: 600; }
.wp-cc-cat.is-error > .wp-icon { color: var(--wp-danger); }
.wp-cc-cat.is-warning > .wp-icon { color: var(--wp-warning); }
.wp-cc-cat.is-info > .wp-icon { color: var(--wp-accent); }
.wp-cc-cat.is-clear { color: var(--wp-muted); }
.wp-cc-cat.is-clear > .wp-icon { color: var(--wp-success); }
.wp-cc-cat-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-cc-cat-count { min-width: 22px; padding: 0 5px; border-radius: 8px; background: var(--wp-panel-2); font-size: 11px; text-align: center; font-variant-numeric: tabular-nums; }
.wp-cc-chaincard { display: grid; grid-template-columns: minmax(220px, 300px) minmax(0, 1fr); gap: 8px 18px; }
.wp-cc-chaincard > :nth-child(n + 3) { grid-column: 1 / -1; }
.wp-cc-chainlist { max-height: 180px; margin: 0; padding-left: 22px; overflow: auto; }
.wp-cc-chainlist li { line-height: 1.6; }

/* ---- Dialogs ---- */
.wp-cc-dlg .wp-cc-tablewrap { max-height: 240px; }
.wp-cc-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 12px; max-height: 150px; overflow: auto; }
.wp-cc-checklist .wp-dlg-check span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-cc-preview { min-height: 30px; }
.wp-cc-inline { display: inline-flex; align-items: center; gap: 6px; }
.wp-cc-unit { color: var(--wp-muted); white-space: nowrap; }
.wp-cc-zones-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.wp-cc-zonepreview { padding: 4px; background: var(--wp-panel); border: 1px solid var(--wp-border); border-radius: var(--wp-radius-sm); }
.wp-cc-dlg-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.wp-cc-eptable td { overflow: visible; }
.wp-cc-eptable .wp-input { height: 24px; }
.wp-cc-eptable .wp-date-field, .wp-cc-eptable .wp-input.wp-date-input { width: 120px; }
.wp-cc-choice { display: flex; align-items: center; gap: 10px; min-height: 28px; }
.wp-cc-choice > .wp-dlg-check { min-width: 210px; }
.wp-cc-details { display: flex; flex-direction: column; gap: 10px; }
.wp-cc-details-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 24px; }
.wp-cc-dlg-name { margin: 0 0 6px; font-size: 14px; font-weight: 600; }
.wp-cc-notes p { margin: 0; white-space: pre-wrap; }
.wp-cc-inline-form { display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; }

/* ---- Resource Load ---- */
.wp-cc-load-bar { fill: var(--wp-cc-load); }
.wp-cc-load-over { stroke: var(--wp-cc-red); stroke-width: 1; }
.wp-cc-load-hatch-bg { fill: var(--wp-cc-load-over-bg); }
.wp-cc-load-hatch { stroke: var(--wp-cc-red); stroke-width: 2.2; }
.wp-cc-load-cap line { stroke: var(--wp-text); stroke-width: 1.5; stroke-dasharray: 6 4; }
.wp-cc-load-avg line { stroke: var(--wp-cc-projected); stroke-width: 1.5; stroke-dasharray: 2 3; }
.wp-cc-load-reflabel { font-size: 10.5px; font-weight: 600; paint-order: stroke; stroke: var(--wp-panel); stroke-width: 3px; stroke-linejoin: round; }
.wp-cc-load-cap .wp-cc-load-reflabel { fill: var(--wp-text); }
.wp-cc-load-avg .wp-cc-load-reflabel { fill: var(--wp-cc-projected); }
.wp-cc-load-cursor { fill: var(--wp-hover); stroke: var(--wp-border-strong); stroke-width: 1; pointer-events: none; mix-blend-mode: multiply; }
.wp-cc-load-sel { fill: none; stroke: var(--wp-accent); stroke-width: 2; pointer-events: none; }
.wp-cc-load-hit { fill: transparent; pointer-events: all; cursor: pointer; }
.wp-cc-load-plot { outline: none; }
.wp-cc-load-plot:focus-visible .wp-cc-load-hit { stroke: var(--wp-accent); stroke-width: 2; }
.wp-cc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wp-cc-load-legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 6px; color: var(--wp-muted); font-size: 11.5px; }
.wp-cc-load-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.wp-cc-load-swatch { display: inline-block; width: 18px; height: 10px; box-sizing: border-box; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
.wp-cc-load-swatch.is-load { background: var(--wp-cc-load); }
.wp-cc-load-swatch.is-over { border: 1px solid var(--wp-cc-red); background: repeating-linear-gradient(45deg, var(--wp-cc-red) 0 2px, var(--wp-cc-load-over-bg) 2px 5px); }
.wp-cc-load-swatch.is-cap { height: 0; border-top: 2px dashed var(--wp-text); }
.wp-cc-load-swatch.is-avg { height: 0; border-top: 2px dotted var(--wp-cc-projected); }
.wp-cc-load-tag { display: inline-block; min-width: 34px; padding: 0 7px; border-radius: 9px; font-size: 11px; line-height: 17px; text-align: center; }
.wp-cc-load-tag.is-over { background: #fde4e4; color: #a01b1b; font-weight: 600; }
.wp-cc-load-tag.is-ok { background: #e2f4e6; color: #1b6b2c; }
.wp-cc-load-facts dd .wp-cc-load-tag { margin-left: 4px; }
.wp-cc-load-chain.is-chain { color: var(--wp-cc-chain); font-weight: 600; }
.wp-cc-load-chain.is-feeding { color: var(--wp-cc-feeding); }
.wp-cc-load-chain.is-other { color: var(--wp-muted); }

/* ---- Printing ---- */
@media print {
  .wp-cc-tip { display: none !important; }
  #wp-print-root .wp-cc-page { max-width: none; padding: 0; }
  #wp-print-root .wp-cc-card { margin: 0 0 4mm; border-color: #bbb; box-shadow: none; break-inside: avoid; }
  #wp-print-root .wp-cc-tablewrap { max-height: none; overflow: visible; border: 0; }
  #wp-print-root .wp-cc-table th { position: static; }
  #wp-print-root .wp-cc-table td { white-space: normal; }
  #wp-print-root .wp-cc-fever-layout { display: block; }
  #wp-print-root .wp-cc-net { display: block; }
  #wp-print-root .wp-cc-net-side { width: auto; border: 0; }
  #wp-print-root .wp-cc-card-actions { display: none; }
  #wp-print-root .wp-cc-load-cursor { display: none; }
}

/* ---- Plan versions, what-ifs and compare (docs/CRITICAL_CHAIN.md §13.13.6) ---- */
:root {
  --wp-session-whatif: #d97706;
  --wp-session-whatif-bg: #fff4e0;
  --wp-session-whatif-text: #7a3e00;
  --wp-session-view: #2563eb;
  --wp-session-view-bg: #e8f0ff;
  --wp-session-view-text: #163e8f;
}

/* Title pill, status bar item */
.wp-title-session { display: inline-flex; align-items: center; height: 18px; margin-left: 8px; padding: 0 8px; border-radius: 9px; font-size: 10.5px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; max-width: 280px; overflow: hidden; text-overflow: ellipsis; }
.wp-title-session.is-whatif { background: var(--wp-session-whatif); color: #fff; }
.wp-title-session.is-view { background: var(--wp-session-view); color: #fff; }
.wp-sb-session { display: inline-flex; align-items: center; gap: 5px; height: 20px; max-width: 320px; padding: 0 8px; border: 0; border-radius: var(--wp-radius-sm); background: none; color: inherit; font: inherit; font-weight: 600; cursor: pointer; }
.wp-sb-session[hidden] { display: none; }
.is-session-whatif .wp-sb-session { background: var(--wp-session-whatif-bg); color: var(--wp-session-whatif-text); }
.is-session-view .wp-sb-session { background: var(--wp-session-view-bg); color: var(--wp-session-view-text); }
.wp-sb-session span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Banner between the ribbon and the main area; the grid gains a row while it shows */
.wp-app.has-session-banner { grid-template-rows: auto auto auto minmax(0, 1fr) auto; }
.wp-session-banner { display: flex; align-items: center; gap: 8px; min-width: 0; height: 32px; padding: 0 10px; border-bottom: 1px solid var(--wp-border); overflow: hidden; }
.wp-session-banner[hidden] { display: none; }
.wp-session-banner.is-whatif { background: var(--wp-session-whatif-bg); color: var(--wp-session-whatif-text); border-bottom-color: var(--wp-session-whatif); }
.wp-session-banner.is-view { background: var(--wp-session-view-bg); color: var(--wp-session-view-text); border-bottom-color: var(--wp-session-view); }
.wp-session-icon { display: inline-flex; flex: none; }
.wp-session-banner.is-whatif .wp-session-icon { color: var(--wp-session-whatif); }
.wp-session-banner.is-view .wp-session-icon { color: var(--wp-session-view); }
.wp-session-text { display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; white-space: nowrap; }
.wp-session-title { flex: none; font-size: 12.5px; }
.wp-session-sub { min-width: 0; overflow: hidden; text-overflow: ellipsis; opacity: .9; }
.wp-session-fill { flex: 1 1 auto; }
.wp-btn.wp-session-btn { flex: none; display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; white-space: nowrap; }
.wp-session-check { display: inline-flex; flex: none; align-items: center; gap: 4px; height: 24px; padding: 0 6px; border: 0; background: none; color: inherit; cursor: pointer; white-space: nowrap; }
.wp-session-check input { margin: 0; pointer-events: none; accent-color: var(--wp-session-whatif); }
/* A 3 px frame around the view host: any screenshot of a what-if or a version is unmistakable */
.wp-app.is-session-whatif .wp-viewhost { outline: 3px solid var(--wp-session-whatif); outline-offset: -3px; }
.wp-app.is-session-view .wp-viewhost { outline: 3px solid var(--wp-session-view); outline-offset: -3px; }
.wp-app.is-readonly .wp-grid-cell { cursor: default; }

/* Fever chart: the plan's positions and segment breaks */
.wp-cc-ghost { fill: var(--wp-panel); stroke-width: 2; stroke-dasharray: 2 1.5; }
.wp-cc-ghost.is-green { stroke: var(--wp-cc-green); }
.wp-cc-ghost.is-yellow { stroke: var(--wp-cc-yellow); }
.wp-cc-ghost.is-red { stroke: var(--wp-cc-red); }
.wp-cc-ghost-link { stroke: var(--wp-muted); stroke-width: 1; stroke-dasharray: 3 2; }
.wp-cc-seg-break { stroke: var(--wp-muted); stroke-width: 1.2; stroke-dasharray: 2 3; }
.wp-cc-fever.is-hollow .wp-cc-marker-dot { fill: var(--wp-panel) !important; stroke-width: 2.5; }
.wp-cc-fever.is-hollow .is-green > .wp-cc-marker-dot { stroke: var(--wp-cc-green); }
.wp-cc-fever.is-hollow .is-yellow > .wp-cc-marker-dot { stroke: var(--wp-cc-yellow); }
.wp-cc-fever.is-hollow .is-red > .wp-cc-marker-dot { stroke: var(--wp-cc-red); }
.wp-view-segs.wp-cc-scope .wp-view-seg { padding: 0 8px; }
.wp-cc-scopehost { display: inline-flex; }
.wp-cc-table tr.wp-cc-segrow td { height: 20px; background: var(--wp-panel-2); color: var(--wp-muted); font-size: 11px; font-style: italic; }

/* Versions view */
.wp-cc-ver-view { background: var(--wp-bg); }
.wp-cc-ver-body { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; }
.wp-cc-ver-split { display: grid; flex: 1 1 auto; grid-template-columns: minmax(0, 1fr) minmax(300px, 420px); min-width: 0; min-height: 0; }
.wp-cc-ver-list { min-width: 0; min-height: 0; overflow: auto; padding: 8px 10px 16px; outline: none; }
.wp-cc-ver-list:focus-visible { box-shadow: inset var(--wp-focus); }
.wp-cc-ver-side { min-width: 0; min-height: 0; overflow: auto; border-left: 1px solid var(--wp-border); background: var(--wp-panel); }
.wp-cc-ver-seg { margin: 12px 2px 4px; color: var(--wp-muted); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.wp-cc-ver-seg.is-current { color: var(--wp-accent-strong); }
.wp-cc-ver-row { display: flex; gap: 8px; align-items: flex-start; min-width: 0; margin: 0 0 4px; padding: 6px 8px; background: var(--wp-panel); border: 1px solid var(--wp-border); border-radius: 6px; cursor: pointer; user-select: none; }
.wp-cc-ver-row:hover { border-color: var(--wp-border-strong); background: var(--wp-hover); }
.wp-cc-ver-row.is-selected { border-color: var(--wp-accent); background: var(--wp-select); color: var(--wp-select-text); }
.wp-cc-ver-row.is-pseudo { border-style: dashed; }
.wp-cc-ver-row.is-whatif { border-color: var(--wp-session-whatif); background: var(--wp-session-whatif-bg); }
.wp-cc-ver-row.is-figures .wp-cc-ver-name { font-weight: 500; }
.wp-cc-ver-kind { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 12px; background: var(--wp-panel-2); color: var(--wp-muted); }
.wp-cc-ver-kind.tone-build { background: #fde9dd; color: var(--wp-cc-chain); }
.wp-cc-ver-kind.tone-update { background: #e3f1fb; color: #0b6aa2; }
.wp-cc-ver-kind.tone-baseline { background: #ece6fd; color: #5b3cc4; }
.wp-cc-ver-kind.tone-manual { background: #e3f4e8; color: #1b6b2c; }
.wp-cc-ver-kind.tone-restore { background: #fff1d6; color: #8a5a00; }
.wp-cc-ver-kind.tone-whatif { background: var(--wp-session-whatif-bg); color: var(--wp-session-whatif); }
.wp-cc-ver-kind.tone-plan { background: var(--wp-accent-weak); color: var(--wp-accent); }
.wp-cc-ver-main { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.wp-cc-ver-line { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; min-width: 0; }
.wp-cc-ver-line.is-meta { color: var(--wp-muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.wp-cc-ver-row.is-selected .wp-cc-ver-line.is-meta { color: inherit; opacity: .85; }
.wp-cc-ver-line.is-comment { color: var(--wp-muted); font-style: italic; font-size: 11.5px; }
.wp-cc-ver-tag { font-weight: 700; font-variant-numeric: tabular-nums; }
.wp-cc-ver-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-cc-ver-kindlabel, .wp-cc-ver-sub { color: var(--wp-muted); font-size: 11px; }
.wp-cc-ver-badge { padding: 0 6px; border-radius: 8px; background: var(--wp-panel-2); border: 1px solid var(--wp-border); font-size: 10.5px; line-height: 15px; }
.wp-cc-ver-badge.is-current { background: var(--wp-accent-weak); border-color: var(--wp-accent); color: var(--wp-accent-strong); }
.wp-cc-ver-badge.is-open { background: var(--wp-session-view-bg); border-color: var(--wp-session-view); color: var(--wp-session-view-text); }
.wp-cc-ver-badge.is-damaged { background: #fde4e4; border-color: var(--wp-danger); color: #a01b1b; }
.wp-cc-ver-delta { font-weight: 600; }
.wp-cc-ver-delta.is-worse, .wp-cc-ver-sumdelta.is-worse { color: var(--wp-danger); }
.wp-cc-ver-delta.is-better, .wp-cc-ver-sumdelta.is-better { color: var(--wp-success); }
/* One chip per buffer: endpoint name, % used, % chain complete; chips wrap onto more lines when there are many. */
.wp-cc-ver-chips { display: flex; flex-wrap: wrap; gap: 3px 4px; align-items: center; margin-top: 1px; }
.wp-cc-ver-chip { display: inline-flex; align-items: baseline; gap: 5px; max-width: 100%; min-width: 0; padding: 0 7px; border-radius: 8px; font-size: 11px; line-height: 17px; white-space: nowrap; }
.wp-cc-ver-chipname { min-width: 0; max-width: 40ch; overflow: hidden; text-overflow: ellipsis; }
.wp-cc-ver-chippct { font-variant-numeric: tabular-nums; }
.wp-cc-ver-chipchain { opacity: .8; font-variant-numeric: tabular-nums; }
.wp-cc-ver-chip.is-green { background: #e2f4e6; color: #1b6b2c; }
.wp-cc-ver-chip.is-yellow { background: #fdf1c7; color: #7a5600; }
.wp-cc-ver-chip.is-red { background: #fde4e4; color: #a01b1b; }
.wp-cc-ver-more { color: var(--wp-muted); font-size: 10.5px; }
.wp-cc-ver-none { padding: 18px 10px; color: var(--wp-muted); text-align: center; }
.wp-cc-ver-details { padding: 12px 14px 20px; }
.wp-cc-ver-details.is-empty { display: flex; align-items: center; justify-content: center; min-height: 200px; }
.wp-cc-ver-dtitle { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 13.5px; }
.wp-cc-ver-comment { margin: 8px 0; padding: 6px 8px; background: var(--wp-panel-2); border-radius: 6px; white-space: pre-wrap; }
.wp-cc-ver-metrics { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.wp-cc-ver-dactions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 12px; }
.wp-cc-ver-lead { margin: 0 0 8px; line-height: 1.45; }

/* Compare */
.wp-cc-ver-compare { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; }
.wp-cc-ver-cmphead { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--wp-border); background: var(--wp-panel); }
.wp-cc-ver-sidebox { display: inline-flex; align-items: center; gap: 6px; min-width: 0; }
.wp-cc-ver-sidelabel { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 10px; background: var(--wp-accent-weak); color: var(--wp-accent-strong); font-weight: 700; }
.wp-cc-tselect.wp-input.wp-cc-ver-sidepick { max-width: 340px; }
.wp-cc-ver-cmpout { display: flex; flex: 1 1 auto; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; padding: 12px 14px; overflow: auto; }
.wp-cc-ver-wait { padding: 30px; color: var(--wp-muted); text-align: center; }
.wp-cc-ver-sums { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.wp-cc-ver-sum { padding: 8px 10px; background: var(--wp-panel); border: 1px solid var(--wp-border); border-radius: 8px; }
.wp-cc-ver-sumlabel { color: var(--wp-muted); font-size: 11px; }
.wp-cc-ver-sumvals { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; font-weight: 600; font-variant-numeric: tabular-nums; }
.wp-cc-ver-sumvals .is-a { color: var(--wp-muted); font-weight: 500; }
.wp-cc-ver-arrow { color: var(--wp-muted); }
.wp-cc-ver-sumdelta { margin-top: 2px; font-size: 11.5px; font-weight: 600; }
.wp-cc-ver-zones { display: inline-flex; align-items: center; gap: 3px; }
.wp-cc-ver-fevers { display: flex; flex-wrap: wrap; gap: 12px; }
.wp-cc-ver-fevers figure { margin: 0; }
.wp-cc-ver-fevers figcaption { color: var(--wp-muted); font-size: 11.5px; text-align: center; }
.wp-cc-ver-taskcard { display: flex; flex-direction: column; min-height: 320px; }
.wp-cc-ver-taskcard > .wp-cc-card-body { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; }
.wp-cc-ver-tasks { display: flex; flex: 1 1 auto; flex-direction: column; gap: 8px; min-height: 0; }
.wp-cc-ver-tfilters { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wp-cc-ver-kchips { display: flex; flex-wrap: wrap; gap: 4px; }
.wp-cc-ver-kchip { height: 22px; padding: 0 8px; border: 1px solid var(--wp-border); border-radius: 11px; background: var(--wp-panel); color: var(--wp-text); font-size: 11.5px; cursor: pointer; }
.wp-cc-ver-kchip.is-on { border-color: var(--wp-accent); background: var(--wp-accent-weak); color: var(--wp-accent-strong); }
.wp-cc-ver-kcount { color: var(--wp-muted); font-variant-numeric: tabular-nums; }
.wp-cc-ver-search.wp-input { width: 200px; height: 24px; margin-left: auto; }
.wp-cc-ver-table { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--wp-border); border-radius: var(--wp-radius-sm); overflow-x: auto; }
.wp-cc-ver-trow { display: grid; grid-template-columns: 48px minmax(160px, 2fr) 72px minmax(120px, 1.2fr) minmax(140px, 1.2fr) minmax(150px, 1.3fr) minmax(110px, 1fr) minmax(110px, 1fr) 90px minmax(90px, .8fr) minmax(110px, 1fr); min-width: 1240px; height: 28px; align-items: center; border-bottom: 1px solid var(--wp-grid-line); font-variant-numeric: tabular-nums; }
.wp-cc-ver-trow.is-head { position: sticky; top: 0; z-index: 1; background: var(--wp-panel-2); border-bottom-color: var(--wp-border-strong); font-weight: 600; }
.wp-cc-ver-th { height: 28px; padding: 0 6px; border: 0; background: none; color: inherit; font: inherit; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
button.wp-cc-ver-th { cursor: pointer; }
button.wp-cc-ver-th:hover { background: var(--wp-hover); }
.wp-cc-ver-th.is-sorted { color: var(--wp-accent-strong); }
.wp-cc-ver-vp { position: relative; height: 360px; min-width: 1240px; overflow-y: auto; outline: none; }
.wp-cc-ver-vp:focus-visible { box-shadow: inset var(--wp-focus); }
.wp-cc-ver-spacer { position: relative; }
.wp-cc-ver-vp .wp-cc-ver-trow { position: absolute; left: 0; right: 0; cursor: default; }
.wp-cc-ver-vp .wp-cc-ver-trow:hover { background: var(--wp-hover); }
.wp-cc-ver-vp .wp-cc-ver-trow.is-selected { background: var(--wp-select); color: var(--wp-select-text); }
.wp-cc-ver-trow.is-added .c-change { color: var(--wp-success); font-weight: 600; }
.wp-cc-ver-trow.is-removed .c-change { color: var(--wp-danger); font-weight: 600; }
.wp-cc-ver-trow.is-removed .c-name { text-decoration: line-through; }
.wp-cc-ver-td { padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wp-cc-ver-td.c-id { text-align: right; }
.wp-cc-ver-kinds { display: inline-flex; gap: 3px; }
.wp-cc-ver-kind-chip { padding: 0 5px; border-radius: 7px; background: var(--wp-panel-2); border: 1px solid var(--wp-border); font-size: 10.5px; line-height: 14px; }
.wp-cc-ver-na { margin: 0; padding: 18px; color: var(--wp-muted); text-align: center; }
@media (max-width: 1100px) {
  .wp-cc-ver-split { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 40%); }
  .wp-cc-ver-side { border-left: 0; border-top: 1px solid var(--wp-border); }
}
.wp-view-tbtn.is-compact { height: 24px; }

/* Timeline legend of the buffer chips, chip labels */
.wp-cc-ver-legend { display: flex; flex-wrap: wrap; gap: 2px 10px; margin: 0 2px 6px; color: var(--wp-muted); font-size: 11px; }
.wp-cc-ver-legenditem b { color: var(--wp-text); }
.wp-cc-ver-chiplabel { font-weight: 700; }
/* Compare with the summary folded: one line, the task table takes the height */
.wp-cc-ver-folded { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 6px 10px; background: var(--wp-panel); border: 1px solid var(--wp-border); border-radius: 8px; font-variant-numeric: tabular-nums; }
.wp-cc-ver-cmpout.is-folded .wp-cc-ver-vp { height: max(300px, calc(100vh - 360px)); }
.wp-cc-ver-trow { grid-template-columns: 48px minmax(160px, 2fr) 72px minmax(150px, 1.2fr) minmax(140px, 1.2fr) minmax(150px, 1.3fr) minmax(110px, 1fr) minmax(110px, 1fr) 100px minmax(90px, .8fr) minmax(130px, 1fr); }
/* Backstage Info: whose figures these are */
.wp-bs-session { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; padding: 8px 12px; border-radius: 6px; font-weight: 600; }
.wp-bs-session.is-whatif { background: var(--wp-session-whatif-bg); color: var(--wp-session-whatif-text); border: 1px solid var(--wp-session-whatif); }
.wp-bs-session.is-view { background: var(--wp-session-view-bg); color: var(--wp-session-view-text); border: 1px solid var(--wp-session-view); }
.wp-print-session { display: none; }
@media print {
  /* The interactive banner is not printed; printouts carry a plain line under the title instead. */
  .wp-session-banner { display: none !important; }
  .wp-print-session { display: block; margin: 0 0 3mm; padding: 1.5mm 3mm; border: 0.6pt solid #000; font-size: 10pt; font-weight: 700; }
}

/* Re-baseline dialog */
.wp-cc-resets { margin: 8px 0; padding: 8px 12px; background: #fff8e6; border: 1px solid #f0d58a; border-radius: 6px; }
.wp-cc-resets-title { margin-bottom: 4px; font-weight: 700; }
.wp-cc-resets ul { margin: 0; padding-left: 18px; line-height: 1.45; }
.wp-cc-resets li + li { margin-top: 3px; }
.wp-cc-rb-row { display: flex; align-items: center; gap: 8px; }
.wp-cc-rb-row .wp-select { width: auto; min-width: 220px; }
.wp-dlg-ccrebaseline .wp-dlg-body { max-height: calc(100vh - 140px); overflow: auto; }
