/* Project Scheduler: page-specific layer.
   Tokens and shared components come from ../dark.css, ../light.css, ../shared.css.
   The table is styled after the Rent vs Own Sensitivity table and the Cost of
   Living detailed view: bordered cells on the input tint, headings centred,
   units in .th-unit. Here every editable cell is a borderless input that fills
   its cell, as in a spreadsheet. */

.container{max-width:1600px;}
.btn-back{text-decoration:none;display:inline-flex;align-items:center;}
h1{font-size:1.85rem;margin:0 0 4px;}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.tip-wrap{display:inline-flex;align-items:center;gap:4px;}

/* ── The project: Quick Start, name, start, the note on privacy ── */
.project-card{margin-bottom:18px;}
.quick-start-row{display:flex;align-items:center;gap:10px;padding:10px 16px;border-bottom:1px solid var(--border);flex-wrap:wrap;}
.quick-start-label{display:inline-flex;align-items:center;gap:5px;font-weight:700;font-size:.82rem;color:var(--muted);white-space:nowrap;flex-shrink:0;}
.quick-start-label .tico{width:1.05em;height:1.05em;}
.quick-start-btns{display:flex;gap:6px;flex-wrap:wrap;}
.quick-start-btn{background:var(--input-bg);border:1.5px solid var(--border);border-radius:var(--radius-md);color:var(--muted);padding:5px 11px;font-size:.78rem;font-weight:600;cursor:pointer;font-family:inherit;transition:color var(--motion-fast),background-color var(--motion-fast),border-color var(--motion-fast);}
.quick-start-btn:hover{border-color:var(--accent);color:var(--text);}
.quick-start-btn.active{border-color:var(--accent2);color:var(--text);background:color-mix(in srgb,var(--accent2) 15%,transparent);}
.btn-clear{margin-left:auto;width:auto;padding:0 8px;font-size:.8rem;font-weight:600;}
.project-fields{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,2.2fr);gap:12px 16px;padding:12px 16px 14px;align-items:end;}
.pf-field{display:flex;flex-direction:column;gap:5px;min-width:0;}
.pf-label{font-size:.78rem;font-weight:700;color:var(--muted);display:inline-flex;align-items:center;gap:4px;}
.pf-field .txt-input{width:100%;}
.privacy-note{margin:0;display:flex;align-items:flex-start;gap:7px;color:var(--muted);font-size:.8rem;line-height:1.45;padding:8px 10px;border-radius:var(--radius-md);background:var(--bg-subtle);border:1px solid var(--border);}
.privacy-note .tico{width:15px;height:15px;flex-shrink:0;margin-top:1px;color:var(--accent);}
.privacy-note strong{color:var(--text);}

/* ── The summary ── */
.metrics{grid-template-columns:repeat(6,minmax(0,1fr));}
.metric .value{font-size:1.25rem;}
.metric .sub{margin-top:4px;color:var(--muted);font-size:.74rem;line-height:1.35;}
.metric.is-bad .value{color:var(--negative-em);}
.metric.is-crit .value{color:var(--gold);}
.metric .label .tip-wrap{gap:4px;}

/* ── The workspace ── */
.workspace{margin-bottom:18px;}
/* Sticky over the table while it scrolls, so it is solid: rows never show through. */
.toolbar{position:sticky;top:0;z-index:50;display:flex;align-items:center;flex-wrap:wrap;gap:10px 18px;padding:10px 14px;margin-bottom:12px;background:var(--panel);}
/* Every group keeps its own width (the site's *{min-width:0} would let a
   label shrink under the buttons beside it); the row wraps instead. */
.tb-group{display:flex;align-items:center;gap:8px;flex:0 0 auto;}
.tb-label{flex:0 0 auto;font-size:.78rem;font-weight:700;color:var(--muted);white-space:nowrap;cursor:default;}
.toolbar .seg-group{flex:0 0 auto;}
.toolbar .seg-group .seg-btn{padding:6px 13px;font-size:.8rem;}
.seg-group.ps-seg{display:inline-flex;width:auto;}
.seg-group.ps-seg .seg-btn{flex:0 0 auto;font-family:inherit;}
.tb-files{margin-left:auto;flex-wrap:nowrap;gap:8px;}
/* The schedule's start: a date picker that moves the whole schedule. */
.tb-start .tb-label{cursor:pointer;}
.txt-input.tb-date{width:auto;min-width:142px;padding:6px 10px;font-size:.82rem;font-variant-numeric:tabular-nums;}
.txt-input.tb-date:disabled{opacity:.55;cursor:not-allowed;}
.tb-dpick{display:inline-block;}
.tb-dpick .sdate-face{width:150px;}
.tb-files .btn-theme{padding:7px 12px;font-size:.8rem;display:inline-flex;align-items:center;gap:6px;}
.tb-files .btn-theme .ico{width:15px;height:15px;}
.tb-summary{display:none;font-size:.8rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;}
.tb-summary strong{color:var(--text);font-family:'DM Mono',monospace;font-weight:500;}
.tb-summary .bad{color:var(--negative-em);}
.tb-full{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;padding:0;border-radius:var(--radius-sm);border:1px solid var(--accent-strong);background:var(--accent-strong);color:var(--text-inv);font-family:inherit;font-size:1.1rem;cursor:pointer;flex-shrink:0;}
.tb-full:hover{background:var(--accent);border-color:var(--accent);}
.tb-full:focus-visible{outline:2px solid var(--accent);outline-offset:2px;}
.tb-full .zf-close,.workspace.is-full .tb-full .zf-open{display:none;}
.workspace.is-full .tb-full .zf-close{display:block;}

.view-card{padding:16px 18px 18px;}
.view-card[hidden]{display:none;}
.detail-head{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 12px;margin-bottom:10px;}
.detail-head h2,.detail-head h3{margin:0;}
.detail-head h3{font-size:1rem;}
.row-tools{display:flex;align-items:center;gap:2px;flex-wrap:wrap;}
.row-tools .btn-sm{margin-right:6px;}
.row-tools .btn-bare{min-width:32px;height:32px;font-size:1.05rem;}
.row-tools .btn-bare .tico,.row-tools .btn-bare .ico{width:17px;height:17px;}
.rt-sep{width:1px;height:20px;background:var(--border);margin:0 6px;}
.h-sub{font-weight:500;color:var(--muted);font-size:.85em;}

/* Full screen: the toolbar and the open view fill the window. */
html.ws-full-open{overflow:hidden;scrollbar-gutter:auto;}
.workspace.is-full{position:fixed;inset:0;z-index:1000;margin:0;display:flex;flex-direction:column;background:var(--bg);
  padding:max(10px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left));}
.workspace.is-full .toolbar{position:static;flex:0 0 auto;margin-bottom:10px;}
.workspace.is-full .tb-summary{display:block;flex:1 1 200px;}
.workspace.is-full .view-card{flex:1 1 auto;min-height:0;display:flex;flex-direction:column;}
.workspace.is-full .view-card[hidden]{display:none;}
.workspace.is-full .table-card .sheet-wrap:not(.res-wrap){flex:1 1 auto;max-height:none;min-height:120px;}
.workspace.is-full .table-card{overflow:auto;}
.workspace.is-full .stage-wrap{flex:1 1 auto;min-height:0;}
.workspace.is-full .stage{max-height:none;height:100%;}
.workspace.is-full .hover-box{flex:0 0 auto;}

/* ── The sheet ── */
.sheet-wrap{overflow:auto;max-height:min(72vh,760px);border:1px solid var(--border);border-radius:var(--radius-md);background:var(--panel);}
@supports not selector(::-webkit-scrollbar){.sheet-wrap,.stage{scrollbar-width:thin;scrollbar-color:var(--scrollbar-thumb) transparent;}}
table.dt{border-collapse:separate;border-spacing:0;font-size:.84rem;font-family:'DM Sans',sans-serif;font-variant-numeric:tabular-nums;}
table.sheet{width:max-content;min-width:100%;}
.dt th{padding:9px 10px;background:var(--input-bg);border-right:1px solid var(--border);border-bottom:1px solid var(--border);white-space:normal;text-align:center;vertical-align:middle;font-size:.78rem;font-weight:700;color:var(--text);line-height:1.25;}
.dt td{padding:0;border-right:1px solid var(--border);border-bottom:1px solid var(--border);vertical-align:middle;height:32px;background:var(--panel);}
/* A cell's colour is its --bg, always solid, and a row under the pointer is
   tinted over it. The site's own tr:hover td swaps the colour for a near-clear
   wash, which made the frozen #, WBS and name cells see-through: the columns
   scrolling under them showed. Every rule below that colours a cell sets --bg. */
.sheet{--row-hover:rgba(141,187,255,0.06);}
body.light .sheet{--row-hover:rgba(90,145,232,0.05);}
.sheet td{--bg:var(--panel);background:var(--bg);}
.sheet tbody tr:hover > td{background:linear-gradient(var(--row-hover),var(--row-hover)),var(--bg);}
.dt th:last-child,.dt td:last-child{border-right:none;}
.dt tbody tr:last-child td{border-bottom:none;}
/* The heading rows stay in view; they are painted over the panel so rows do not show through.
   The first names the groups (Actual, Plan, Links, Calculated), the second the columns under
   them; #, WBS, Task name and Resources run down both. */
.sheet{--th-group:30px;}
.sheet thead th{position:sticky;top:0;z-index:3;background:color-mix(in srgb,var(--text) 4.5%,var(--panel));}
.sheet thead tr.th-groups th{height:var(--th-group);}
.sheet thead tr.th-groups th.g-head{padding:0 10px;font-size:.7rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);}
.sheet thead tr.th-groups th.g-head .tip-wrap{justify-content:center;}
/* A group's name stays in sight while any of its columns is, just clear of the frozen ones. */
.sheet{--frozen:366px;}
.sheet thead th.g-head > .tip-wrap{position:sticky;left:calc(var(--frozen) + 10px);right:10px;}
.sheet thead tr.th-cols th{top:var(--th-group);}
.sheet thead th.g-out{background:color-mix(in srgb,var(--text) 6%,var(--panel));}
/* A group starts at a heavier rule. */
.sheet .c-g{border-left:2px solid var(--border);}
.th-unit{display:block;font-weight:500;color:var(--muted);font-size:.72rem;margin-top:2px;}
/* #, WBS and the name stay put as the sheet scrolls sideways. */
.sheet .c-num{position:sticky;left:0;z-index:2;width:38px;min-width:38px;text-align:center;color:var(--muted);font-family:'DM Mono',monospace;font-size:.74rem;}
.sheet .c-wbs{position:sticky;left:38px;z-index:2;width:58px;min-width:58px;font-family:'DM Mono',monospace;font-size:.78rem;color:var(--muted);padding:0 8px;}
.sheet .c-name{position:sticky;left:96px;z-index:2;min-width:250px;width:270px;box-shadow:inset -1px 0 0 var(--border);}
.sheet thead .c-num,.sheet thead .c-wbs,.sheet thead .c-name{z-index:4;}
.sheet .c-date{min-width:132px;width:136px;}
.sheet .c-dur{min-width:82px;width:86px;}
.sheet .c-ms{min-width:78px;width:80px;text-align:center;}
.sheet .c-link{min-width:150px;width:170px;}
.sheet .c-res{min-width:200px;width:230px;}
.sheet .c-pct{min-width:92px;width:96px;}
.sheet .c-pct .unit-wrap .cell{padding-right:26px;}
.sheet .c-wt{min-width:78px;}
.sheet .c-out{min-width:112px;padding:0 10px;font-family:'DM Mono',monospace;font-size:.78rem;white-space:nowrap;color:var(--text);text-align:right;}
.sheet td.c-out{--bg:var(--bg-subtle);}
.sheet .c-float{min-width:86px;}
.sheet .c-status{min-width:150px;padding:0 8px;text-align:left;}
.sheet thead .c-status{text-align:center;}

/* A cell's input fills it, as a spreadsheet cell does. */
.cell{display:block;width:100%;height:32px;margin:0;padding:0 9px;border:0;border-radius:0;background:transparent;color:var(--text);font:inherit;font-size:.84rem;outline:none;}
.cell.num{text-align:right;font-family:'DM Mono',monospace;font-size:.8rem;}
.cell.date{font-variant-numeric:tabular-nums;}
/* A date cell is a text box the reader types the day in (day first, read on
   Enter or leaving it), showing it as the page writes dates (3 Mar 2027) or,
   blank, the schedule's date in italics. Its calendar button opens the
   browser's picker, a hidden date field under the button. */
.dpick{position:relative;display:block;}
.dpick .cell.date{padding-right:28px;}
.dpick .dnat{position:absolute;right:0;top:0;width:26px;height:100%;min-width:0;margin:0;padding:0;border:0;opacity:0;pointer-events:none;}
/* A touch screen: the date field over the whole cell, so a tap opens the phone's own picker. */
@media (pointer:coarse){.dpick .dnat{left:0;width:100%;pointer-events:auto;z-index:1;-webkit-appearance:none;appearance:none;}}
.dcal{position:absolute;right:3px;top:50%;transform:translateY(-50%);width:22px;height:22px;display:inline-flex;align-items:center;justify-content:center;padding:0;border:0;border-radius:5px;background:none;color:var(--muted);opacity:.45;cursor:pointer;}
.dpick:hover .dcal,.dpick:focus-within .dcal{opacity:.85;}
.dcal:hover{opacity:1;color:var(--text);background:var(--input-bg);}
.dcal .ico{width:14px;height:14px;}
body:not(.light) input[type=date]{color-scheme:dark;}
.pf-date{display:block;}
.pf-date .sdate-face{font-weight:500;}
.pf-date .sdate-face::placeholder{font-weight:400;}
.cell::placeholder{color:var(--muted);opacity:.85;font-style:italic;}
/* DM Mono has no italic: the slant the browser makes up leans a figure out of
   its cell, and the cell's edge cuts it (a 0 read as ℓ). A figure's hint is in
   DM Sans, whose italic is a real one. */
.cell.num::placeholder,.pk-q::placeholder{font-family:'DM Sans',sans-serif;}
.cell:focus{box-shadow:inset 0 0 0 2px var(--accent);background:var(--panel);}
td.is-err .cell,td.is-err .ro{box-shadow:inset 0 0 0 1.5px var(--negative);background:var(--negative-bg);}
td.is-warn .cell{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--warning-text) 70%,transparent);}
td.is-err .cell:focus,td.is-warn .cell:focus{box-shadow:inset 0 0 0 2px var(--accent);}
.ro{display:block;padding:0 9px;line-height:32px;color:var(--muted);font-size:.82rem;white-space:nowrap;}
.ro.num{text-align:right;font-family:'DM Mono',monospace;font-size:.8rem;}
.c-ms input[type=checkbox]{width:16px;height:16px;accent-color:var(--accent);cursor:pointer;margin:0;vertical-align:middle;}
.c-ms .ro{text-align:center;}
/* A Finish that is a deadline wears a flag; a missed one goes red. */
.date-wrap{position:relative;}
.dl-flag{position:absolute;right:26px;top:50%;transform:translateY(-50%);font-size:.72rem;color:var(--muted);pointer-events:none;}
.date-wrap.has-dl .cell.date{padding-right:40px;}
.date-wrap .cell.date:focus ~ .dl-flag{visibility:hidden;}
.date-wrap.is-late .dl-flag{color:var(--negative-em);}
.date-wrap.is-late .cell.date{color:var(--negative-em);font-weight:600;}

/* The name: indented by its level, a phase folds. */
.name-cell{display:flex;align-items:center;padding-left:calc(var(--lvl,0) * 16px + 4px);}
.name-cell .cell{padding-left:4px;}
.fold{flex:0 0 20px;width:20px;height:22px;padding:0;border:0;background:transparent;color:var(--muted);cursor:pointer;font-size:.8rem;line-height:1;border-radius:4px;transition:transform var(--motion-fast),color var(--motion-fast);}
.fold:hover{color:var(--accent-strong);background:var(--input-bg);}
.fold.is-closed{transform:rotate(-90deg);}
.fold-gap{flex:0 0 20px;}
.sheet tr.is-parent .cell[data-f="name"]{font-weight:700;}
.sheet tr.is-parent td{--bg:color-mix(in srgb,var(--text) 3%,var(--panel));}
.sheet tr.is-parent td.c-out{--bg:color-mix(in srgb,var(--text) 5%,var(--bg-subtle));}
.sheet tr.is-sel td{--bg:color-mix(in srgb,var(--accent) 7%,var(--panel));}
.sheet tr.is-sel td.c-out{--bg:color-mix(in srgb,var(--accent) 9%,var(--bg-subtle));}
.sheet tr.is-sel td.c-num{--bg:var(--accent-strong);color:var(--text-inv);}
.sheet tr.is-crit td.c-wbs{box-shadow:inset 3px 0 0 var(--gold);}
.sheet tr.is-crit td.c-float{color:var(--gold);font-weight:600;}
.sheet tr.is-late td.c-float{color:var(--negative-em);}

/* Status chips. */
.chips{display:flex;flex-wrap:wrap;gap:4px;padding:4px 0;}
.chip{display:inline-flex;align-items:center;gap:3px;padding:2px 7px;border-radius:999px;font-size:.7rem;font-weight:700;white-space:nowrap;border:1px solid transparent;line-height:1.35;}
.chip.crit{color:var(--gold);border-color:color-mix(in srgb,var(--gold) 45%,transparent);background:color-mix(in srgb,var(--gold) 10%,transparent);}
.chip.late,.chip.over,.chip.err{color:var(--negative-em);border-color:var(--negative-border);background:var(--negative-bg);}
.chip.warn{color:var(--warning-text);background:var(--warning-bg);}
.chip.ok{color:var(--muted);border-color:var(--border);}

.btn-add{display:inline-block;margin-top:10px;background:transparent;border:1px dashed var(--border);border-radius:var(--radius-sm);padding:6px 13px;font-size:.8rem;font-weight:600;color:var(--muted);cursor:pointer;font-family:inherit;white-space:nowrap;transition:color var(--motion-fast),border-color var(--motion-fast);}
.btn-add:hover{border-color:var(--accent-strong);color:var(--accent-strong);}

/* Pickers: Predecessors, Successors and Resources as chips, a search after them. */
.pk{display:flex;flex-wrap:wrap;align-items:center;gap:3px;min-height:32px;padding:3px 4px;cursor:text;}
.pk-chips{display:contents;}
.pk .pk-in{flex:1 1 56px;min-width:56px;width:auto;height:24px;padding:0 4px;font-size:.8rem;}
.pk.has-chips .pk-in::placeholder{opacity:0;}
.pk.has-chips .pk-in:focus::placeholder{opacity:.85;}
.pk .pk-in:focus{box-shadow:none;background:transparent;}
.pk:focus-within{box-shadow:inset 0 0 0 2px var(--accent);background:var(--panel);}
.pk-chip{display:inline-flex;align-items:center;gap:1px;height:22px;max-width:100%;padding:0 1px 0 0;border:1px solid var(--border);border-radius:999px;background:var(--input-bg);font-size:.76rem;line-height:1;white-space:nowrap;}
.pk-lab{display:inline-flex;align-items:center;gap:4px;height:100%;padding:0 3px 0 8px;border:0;border-radius:999px 0 0 999px;background:none;color:var(--text);font:inherit;cursor:pointer;}
.pk-lab:hover,.pk-lab:focus-visible{color:var(--accent-strong);}
.pk-code{font-family:'DM Mono',monospace;font-size:.76rem;font-weight:500;}
.pk-res .pk-code{font-family:'DM Sans',sans-serif;font-weight:600;padding-left:8px;overflow:hidden;text-overflow:ellipsis;max-width:110px;}
.pk-tag{font-family:'DM Mono',monospace;font-size:.68rem;font-weight:600;color:var(--accent-strong);background:color-mix(in srgb,var(--accent) 12%,transparent);padding:2px 5px;border-radius:999px;}
.pk-chip .pk-x{width:20px;height:20px;min-width:20px;padding:0;border-radius:50%;}
.pk-chip .pk-x .ico{width:12px;height:12px;}
.pk-q{height:18px;margin-left:5px;padding:0 4px;border:1px solid var(--border);border-radius:6px;background:var(--panel);color:var(--text);font-family:'DM Mono',monospace;font-size:.74rem;text-align:right;outline:none;min-width:0;}
.pk-q::placeholder{color:var(--muted);font-style:italic;}
.pk-q:focus{border-color:var(--accent);}
.pk-u{font-size:.68rem;color:var(--muted);margin:0 1px 0 2px;}
td.is-err .pk{box-shadow:inset 0 0 0 1.5px var(--negative);background:var(--negative-bg);}
td.is-warn .pk{box-shadow:inset 0 0 0 1.5px color-mix(in srgb,var(--warning-text) 70%,transparent);}
td.is-err .pk:focus-within,td.is-warn .pk:focus-within{box-shadow:inset 0 0 0 2px var(--accent);}
.ps-pop .pk{min-height:34px;}
.ps-pop .pk:focus-within{box-shadow:none;}
/* The list under a picker (placed by SharedDropdown.place). */
.ps-pick{position:fixed;z-index:9500;overflow:auto;}
.ps-pick[hidden]{display:none;}
.ps-pick .combo-opt{padding-top:3px;padding-bottom:3px;padding-left:calc(10px + var(--lvl,0) * 10px);}
.ps-pick .combo-chip,.ps-pick .pk-ss{line-height:1.3;}
.ps-pick .pk-oc{font-family:'DM Mono',monospace;font-size:.76rem;color:var(--muted);margin-right:8px;}
.ps-pick .combo-opt:hover .pk-oc,.ps-pick .combo-opt.focused .pk-oc{color:inherit;}
.ps-pick .pk-par{font-weight:700;}
.ps-pick .mono{font-family:'DM Mono',monospace;font-size:.8rem;}
.pk-ss{flex-shrink:0;padding:1px 8px;border:1px solid var(--border);border-radius:999px;background:var(--panel);color:var(--muted);font-family:'DM Mono',monospace;font-size:.7rem;font-weight:600;cursor:pointer;}
.pk-ss:hover{border-color:currentColor;color:var(--text-inv);background:var(--accent-strong);}
.combo-opt:hover .pk-ss,.combo-opt.focused .pk-ss{border-color:currentColor;color:inherit;background:transparent;}
.combo-opt:hover .pk-ss:hover{background:var(--panel);color:var(--accent-strong);}
.pk-hint{padding:6px 10px 4px;border-top:1px solid var(--border);margin-top:4px;font-size:.72rem;line-height:1.4;color:var(--muted);}
.pk-hint strong{font-family:'DM Mono',monospace;font-weight:600;}
.pk-lag{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;padding:8px 10px;margin-top:4px;border-top:1px solid var(--border);font-size:.82rem;font-weight:600;color:var(--text);}
.pk-lag input{width:64px;padding:4px 8px;border:1px solid var(--border);border-radius:6px;background:var(--input-bg);color:var(--text);font-family:'DM Mono',monospace;font-size:.8rem;text-align:right;outline:none;}
.pk-lag input:focus{border-color:var(--accent);}
.ps-pick .pk-del{color:var(--negative-em);border-top:1px solid var(--border);border-radius:0 0 5px 5px;margin-top:2px;}
.ps-pick .pk-del .combo-main{display:inline-flex;align-items:center;gap:6px;}
.ps-pick .pk-del:hover{background:var(--negative-bg);color:var(--negative-em);}

/* Compact, beside Share: the button arranges the diagram, its chevron picks the shape. */
.ps-split{display:inline-flex;align-items:stretch;}
.ps-split .ps-split-main{border-top-right-radius:0;border-bottom-right-radius:0;gap:6px;}
.ps-split .ps-split-chev{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1.5px;padding-left:8px;padding-right:8px;min-width:0;}
.ps-split .ps-split-chev:hover,.ps-split .ps-split-chev:focus-visible{position:relative;z-index:1;}
.ps-split .ps-split-chev[aria-expanded="true"]{border-color:var(--accent);position:relative;z-index:1;}
.ps-split .ps-chev{transition:transform var(--motion-fast);}
.ps-split .ps-split-chev[aria-expanded="true"] .ps-chev{transform:rotate(180deg);}
.ps-ratio{font-family:'DM Mono',ui-monospace,monospace;font-size:.72rem;font-weight:500;color:var(--muted);}
.ps-cmenu{position:fixed;}
.ps-cmenu .combo-opt{width:100%;justify-content:flex-start;border:0;background:transparent;color:inherit;font:inherit;text-align:left;}
.ps-cmenu .combo-opt:hover,.ps-cmenu .combo-opt:focus-visible{outline:none;background:var(--accent);color:var(--text-inv);}
.ps-cmenu .combo-opt:hover .combo-sub,.ps-cmenu .combo-opt:focus-visible .combo-sub{color:inherit;opacity:.85;}
.ps-cmenu .combo-opt:disabled{opacity:.45;cursor:default;}
.ps-cmenu .combo-opt:disabled:hover{background:none;color:inherit;}
.ps-cmenu .ps-cauto{border-top:1px solid var(--border);border-radius:0 0 5px 5px;margin-top:4px;padding-top:8px;}

/* Resources. */
.res-section{margin-top:22px;padding-top:16px;border-top:1px solid var(--border);}
.res-wrap{max-height:none;}
.res-sheet .r-name{min-width:200px;width:220px;}
.res-sheet .r-type{min-width:120px;width:124px;}
.res-sheet .r-cap{min-width:104px;width:110px;}
.res-sheet .r-price{min-width:112px;width:118px;}
.res-sheet .r-price .ro{text-align:right;}
.res-sheet .r-price [hidden]{display:none;}
.res-sheet .r-date{min-width:132px;width:136px;}
.res-sheet .r-out{min-width:110px;padding:0 10px;font-family:'DM Mono',monospace;font-size:.78rem;text-align:right;white-space:nowrap;}
.res-sheet td.r-out{--bg:var(--bg-subtle);}
.res-sheet .r-status{min-width:220px;padding:0 8px;}
.res-sheet .r-del{width:40px;min-width:40px;text-align:center;}
.res-sheet .r-type select{width:calc(100% - 8px);margin:0 4px;font-size:.8rem;padding-top:4px;padding-bottom:4px;padding-left:8px;--sel-pad:24px;--sel-chev:7px;}

/* A short message about the last edit: a loop that was refused, a name added. */
.sheet-note{margin:0 0 10px;padding:8px 12px;border-radius:var(--radius-sm);font-size:.82rem;line-height:1.45;border:1px solid var(--border);background:var(--bg-subtle);color:var(--text);}
.sheet-note[hidden]{display:none;}
.sheet-note.bad{border-color:var(--negative-border);background:var(--negative-bg);color:var(--negative-em);}

/* A file dragged over the workspace. */
.workspace.is-drop{outline:2px dashed var(--accent);outline-offset:4px;}
.is-busy{opacity:.6;cursor:progress;}

/* Checks: every problem, each one a jump to its cell. */
.checks{margin:0 0 14px;padding:12px 14px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--bg-subtle);}
.checks h3{margin:0 0 8px;font-size:.95rem;}
.check-list{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:4px;}
.check-list li{font-size:.82rem;line-height:1.45;color:var(--text);display:flex;gap:8px;align-items:baseline;}
.check-list .ck-kind{flex:0 0 auto;font-size:.68rem;font-weight:700;padding:1px 6px;border-radius:999px;}
.check-list .ck-err{color:var(--negative-em);background:var(--negative-bg);}
.check-list .ck-warn{color:var(--warning-text);background:var(--warning-bg);}
.check-list button{border:0;background:none;padding:0;color:var(--accent-strong);font:inherit;font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:2px;}

/* What a file brought in, or why it could not. */
.file-report{margin:0 0 12px;padding:12px 14px;border-radius:var(--radius-md);border:1px solid var(--border);background:var(--bg-subtle);font-size:.84rem;line-height:1.5;position:relative;}
.file-report[hidden]{display:none;}
.file-report.bad{border-color:var(--negative-border);background:var(--negative-bg);}
.file-report.warn{border-color:color-mix(in srgb,var(--warning-text) 40%,transparent);background:var(--warning-bg);}
.file-report h3{margin:0 26px 4px 0;font-size:.92rem;}
.file-report ul{margin:6px 0 0;padding-left:18px;max-height:180px;overflow:auto;}
.file-report li{margin:2px 0;}
.file-report .fr-close{position:absolute;right:8px;top:8px;}
.file-report .fr-undo{margin-top:6px;}

/* ── The charts ── */
.chart-opts{display:flex;flex-wrap:wrap;align-items:center;gap:10px 16px;margin:12px 0 10px;}
.chart-opts .opt{display:inline-flex;align-items:center;gap:7px;}
.chk-opt{cursor:pointer;font-size:.82rem;font-weight:600;color:var(--text);}
.chk-opt input{accent-color:var(--accent);width:15px;height:15px;cursor:pointer;margin:0;}
.legend{display:flex;flex-wrap:wrap;gap:6px 14px;margin-left:auto;font-size:.76rem;color:var(--muted);}
.legend span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap;}
.legend svg{flex-shrink:0;}
.stage-wrap{position:relative;}
.stage{position:relative;overflow:auto;max-height:min(74vh,820px);border:1px solid var(--border);border-radius:var(--radius-md);background:var(--panel);overscroll-behavior:contain;}
.stage svg{display:block;}
.arrow-stage svg,.node-stage svg{margin:0 auto;}
.stage text{user-select:none;-webkit-user-select:none;}
.gantt-stage .g-hit:hover{fill:color-mix(in srgb,var(--accent) 7%,transparent);}
/* A canvas: the background pans; over a task the cursor says what a press
   does there: draw a link, move the bar, stretch its end, or open it. */
.gantt-stage,.arrow-stage,.node-stage{cursor:grab;}
.stage svg,.stage svg *{cursor:inherit;}
.stage.z-link,.stage.is-linking{cursor:crosshair;}
.stage.z-move,.stage.is-moving{cursor:move;}
.stage.z-resize,.stage.is-resizing{cursor:ew-resize;}
.stage.z-pick{cursor:pointer;}
.stage.is-panning{cursor:grabbing;}
.stage.is-panning,.stage.is-linking,.stage.is-moving,.stage.is-resizing{user-select:none;-webkit-user-select:none;}
/* The layer over a chart: what a drag draws and what is picked (never exported). */
.stage svg.ps-ov{position:absolute;left:0;top:0;pointer-events:none;overflow:visible;}
.ps-ov .ov-band{fill:none;stroke:var(--accent);stroke-dasharray:6 4;stroke-linecap:round;}
.ps-ov .ov-dot{fill:var(--accent);}
.ps-ov .ov-handle{fill:var(--panel);stroke:var(--accent);stroke-width:1.6;}
.ps-ov rect.ov-src,.ps-ov rect.ov-tgt,.ps-ov rect.ov-sel,.ps-ov rect.ov-bad{fill:none;stroke-width:2;}
.ps-ov path.ov-src,.ps-ov path.ov-tgt,.ps-ov path.ov-sel,.ps-ov path.ov-bad,.ps-ov path.ov-hov{fill:none;stroke-width:9;stroke-linecap:round;stroke-linejoin:round;opacity:.38;}
.ps-ov .ov-src{stroke:var(--accent);stroke-dasharray:3 2;}
.ps-ov path.ov-src{stroke-dasharray:none;opacity:.25;}
.ps-ov .ov-tgt{stroke:var(--accent);}
.ps-ov .ov-bad{stroke:var(--negative);}
.ps-ov .ov-sel{stroke:var(--accent-strong);}
.ps-ov path.ov-hov{stroke:var(--accent);opacity:.18;}
.ps-ov path.ov-line{stroke-width:5;opacity:.5;}
.ps-ov .ov-lab{font-family:'DM Sans',sans-serif;font-weight:600;fill:var(--text);stroke:var(--panel);paint-order:stroke;stroke-linejoin:round;}
.ps-ov .ov-lab.bad{fill:var(--negative-em);}
.ps-ov .ov-handle.is-on{fill:var(--accent);}
.ps-ov .ov-grip{fill:var(--panel);stroke:var(--accent);stroke-width:1.2;}
.ps-ov .ov-grip.is-on{fill:var(--accent);}
.ps-ov .ov-ghost{fill:color-mix(in srgb,var(--accent) 22%,transparent);stroke:var(--accent);stroke-width:1.5;stroke-dasharray:4 3;}
.ps-ov .ov-guide{stroke:var(--accent);stroke-width:1;stroke-dasharray:3 3;opacity:.7;}
.ps-ov circle.ov-ev{fill:none;stroke-width:3.5;opacity:.55;}
.ps-ov circle.ov-ev.ov-hov{stroke:var(--accent);opacity:.4;}
.ps-ov rect.ov-hov{fill:none;stroke:var(--accent);stroke-width:2;opacity:.35;}
.stage-zoom{position:absolute;right:12px;bottom:12px;display:flex;flex-direction:column;gap:4px;z-index:5;}
.stage-zoom .btn-icon{min-width:32px;padding:4px 0;background:var(--panel);font-size:.95rem;}
.stage-empty{padding:40px 20px;text-align:center;color:var(--muted);font-size:.88rem;}
.hover-box{margin-top:10px;color:var(--muted);font-size:.84rem;min-height:22px;line-height:1.5;}
.hover-box strong{color:var(--text);}
.hover-box .mono{font-family:'DM Mono',monospace;color:var(--text);font-size:.8rem;}
.hover-box .bad{color:var(--negative-em);font-weight:600;}
.hover-box .crit{color:var(--gold);font-weight:600;}
/* A task or link clicked on the chart stays in the box, its links each with × to remove. */
.hover-box.is-pinned{position:relative;padding:8px 36px 8px 12px;border:1px solid color-mix(in srgb,var(--accent) 40%,var(--border));border-radius:var(--radius-md);background:var(--bg-subtle);color:var(--text);}
.hover-box .hv-close{position:absolute;right:6px;top:6px;}
.hv-links{display:flex;flex-wrap:wrap;align-items:center;gap:5px 6px;margin-top:6px;}
.hv-k{font-size:.74rem;font-weight:700;color:var(--muted);margin-left:4px;}
.hv-k:first-child{margin-left:0;}
.hv-none{font-size:.78rem;color:var(--muted);font-style:italic;}
.lk-chip{display:inline-flex;align-items:center;gap:2px;padding:1px 2px 1px 8px;border:1px solid var(--border);border-radius:999px;background:var(--panel);}
.lk-chip .mono{font-size:.76rem;}
.lk-x{border:0;background:none;color:var(--muted);font:inherit;font-size:.95rem;line-height:1;width:20px;height:20px;border-radius:50%;cursor:pointer;padding:0;}
.lk-x:hover,.lk-x:focus-visible{color:var(--negative-em);background:var(--negative-bg);}
.hover-box .hv-ev{font-size:.76rem;color:var(--muted);}
.hv-btn{margin-left:6px;border:1px solid var(--negative-border);background:var(--negative-bg);color:var(--negative-em);font:inherit;font-size:.76rem;font-weight:600;padding:2px 9px;border-radius:999px;cursor:pointer;}

/* A number with its unit written after it, inside the cell (Capacity: /day, total). */
.unit-wrap{position:relative;}
.unit-wrap .cell{padding-right:46px;}
.cell-unit{position:absolute;right:9px;top:0;bottom:0;display:flex;align-items:center;font-size:.74rem;color:var(--muted);pointer-events:none;white-space:nowrap;}

/* The editor over a chart: a task's fields, the same as its table row. */
.ps-pop{position:fixed;z-index:1100;left:8px;top:8px;width:min(430px,calc(100vw - 16px));max-height:calc(100vh - 16px);overflow:auto;padding:10px 14px 12px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--panel);box-shadow:var(--shadow-lg,0 12px 32px rgba(0,0,0,.22));}
.ps-pop[hidden]{display:none;}
.pop-head{display:flex;align-items:center;gap:8px;margin-bottom:6px;min-height:30px;}
.pop-code{font-family:'DM Mono',monospace;font-size:.8rem;color:var(--muted);}
.pop-kind{font-size:.74rem;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.04em;}
.pop-head .pop-x{margin-left:auto;}
.pop-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;margin-top:8px;}
.pop-grid.pop-3{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:4px;}
/* The editor's groups, named as the table's are. */
.pop-sec{margin-top:12px;padding-top:8px;border-top:1px solid var(--border);font-size:.68rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);}
.pop-sec + .pop-wide{margin-top:4px;}
.pop-f{display:flex;flex-direction:column;gap:3px;min-width:0;}
.pop-wide{margin-top:8px;}
.pop-l{font-size:.74rem;font-weight:700;color:var(--muted);}
.ps-pop .pop-ctl{border:1px solid var(--border);border-radius:var(--radius-sm,6px);background:var(--input-bg);overflow:hidden;}
.ps-pop .pop-ctl:focus-within,.ps-pop input.pop-ctl:focus{border-color:var(--accent);box-shadow:none;}
.ps-pop .pop-ctl .cell:focus,.ps-pop input.pop-ctl:focus{box-shadow:none;background:var(--panel);}
.ps-pop .cell.mono{font-family:'DM Mono',monospace;font-size:.8rem;}
.pop-ms{flex-direction:row;align-items:center;gap:7px;align-self:end;height:34px;font-size:.84rem;font-weight:600;color:var(--text);cursor:pointer;}
.pop-ms input{accent-color:var(--accent);width:15px;height:15px;margin:0;cursor:pointer;}
.pop-sched{margin-top:10px;padding:8px 10px;border-radius:var(--radius-sm,6px);background:var(--bg-subtle);font-size:.8rem;line-height:1.5;color:var(--muted);}
.pop-sched:empty{display:none;}
.pop-sched .mono{font-family:'DM Mono',monospace;color:var(--text);font-size:.76rem;}
.pop-sched .crit{color:var(--gold);font-weight:600;}
.pop-sched .bad,.pop-warn{color:var(--negative-em);}
.pop-warn{margin-top:4px;font-weight:600;}
.pop-foot{display:flex;align-items:center;gap:10px;margin-top:10px;}
.pop-note{font-size:.74rem;color:var(--muted);}
.pop-foot .pop-del{margin-left:auto;padding:0 8px;font-size:.8rem;}
.ps-pop.is-sheet{left:8px;right:8px;top:auto;bottom:8px;width:auto;max-height:72vh;}

/* ── Phones and narrow windows ── */
@media (max-width:1180px){
  .metrics{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (max-width:760px){
  h1{font-size:1.45rem;}
  .project-fields{grid-template-columns:1fr 1fr;}
  .privacy-note{grid-column:1/-1;}
  .metrics{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}
  .metric .value{font-size:1.08rem;}
  /* A grid: the view with full screen beside it, the scale, then the files. */
  .toolbar{position:static;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;padding:8px 10px;}
  .tb-label{display:none;}
  .tb-view{grid-column:1;grid-row:1;}
  .tb-full{grid-column:2;grid-row:1;}
  .tb-scale{grid-column:1/-1;grid-row:2;}
  .tb-start{grid-column:1/-1;grid-row:3;}
  .tb-start .tb-label{display:inline;}
  .tb-start .tb-dpick{flex:1 1 auto;}
  .tb-start .tb-date{width:100%;}
  .tb-files{grid-column:1/-1;grid-row:4;margin-left:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));}
  .tb-files .btn-theme{justify-content:center;padding:7px 6px;}
  .tb-view .seg-group.ps-seg,.tb-scale .seg-group.ps-seg{display:flex;width:100%;}
  .tb-view .seg-group.ps-seg .seg-btn,.tb-scale .seg-group.ps-seg .seg-btn{flex:1 1 0;}
  .workspace.is-full .tb-summary{grid-column:1/-1;grid-row:5;}
  .view-card{padding:12px;}
  .sheet .c-name{min-width:180px;width:190px;}
  .sheet .c-wbs{width:50px;min-width:50px;}
  .sheet .c-name{left:88px;}
  .sheet{--frozen:278px;}
  .legend{margin-left:0;}
  .btn-clear{margin-left:0;}
}
@media (max-width:480px){
  .project-fields{grid-template-columns:1fr;}
  .sheet .c-wbs{position:static;}
  .sheet .c-name{left:38px;}
  .sheet{--frozen:228px;}
}

/* ── Actual: start, finish and % complete, just after the name ──
   The columns filled in as the work runs wear a green tint, % complete the
   stronger one. A heading is painted solid (it sticks over the rows as they
   scroll), so no row shows through it. */
.sheet thead th.c-act{background:color-mix(in srgb,var(--accent2) 7%,color-mix(in srgb,var(--text) 4.5%,var(--panel)));}
.sheet thead th.g-head.c-act{background:color-mix(in srgb,var(--accent2) 14%,var(--panel));color:var(--accent2);}
.sheet td.c-act{--bg:color-mix(in srgb,var(--accent2) 4%,var(--panel));}
.sheet tbody td.c-pct{--bg:color-mix(in srgb,var(--accent2) 9%,var(--panel));}
.sheet tbody tr.is-parent td.c-act{--bg:color-mix(in srgb,var(--accent2) 4%,color-mix(in srgb,var(--text) 3%,var(--panel)));}
.sheet tbody tr.is-parent td.c-pct{--bg:color-mix(in srgb,var(--accent2) 7%,color-mix(in srgb,var(--text) 3%,var(--panel)));}
.sheet tbody tr.is-sel td.c-act{--bg:color-mix(in srgb,var(--accent2) 4%,color-mix(in srgb,var(--accent) 7%,var(--panel)));}
.sheet tbody tr.is-sel td.c-pct{--bg:color-mix(in srgb,var(--accent2) 9%,color-mix(in srgb,var(--accent) 7%,var(--panel)));}
.sheet tbody td.c-pct .cell-unit{color:var(--accent2);}

/* ── See as: the same project in the tool that answers another question ──
   Beside Share in each chart card (workspace.js, seeMount), drawn as Share is,
   its list the site's dropdown, one chart name a line. */
.see-as{display:inline-flex;}
.see-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;}
.see-toggle .share-chev{flex:none;transition:transform var(--motion-fast);}
.see-toggle[aria-expanded="true"]{border-color:var(--accent);}
.see-toggle[aria-expanded="true"] .share-chev{transform:rotate(180deg);}
.see-list .see-opt{display:flex;text-decoration:none;}
@media(max-width:600px){ .btn-cluster .see-as{flex:1 1 auto;} .btn-cluster .see-as .see-toggle{width:100%;} }
html.abt-embed .see-as{display:none !important;}
