@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500&display=swap');
/* ===========================================================================
   ui/base.css — the platform's base sheet: structure every page builds on
   (layout grids, tables, forms, dialogs, the build window, print, the sign-in
   wall). Loaded by index.html, home.html and settings.html before the looks.

   Retiring the old look, stage 2 (2026-11-08): this is the five older sheets
   (styles.css, wrb-design-system.css, planner-theme.css, ui-depth.css,
   theme-c.css) joined in their old load order, so the cascade is unchanged,
   with rules that no page or script can match removed. The looks live in
   ui/look.css tokens; a visual change is a token or rule change there, not
   an override sheet loaded after this one.
   =========================================================================== */

/* ==========================================================================
   from styles.css
   ========================================================================== */
/* ============================================================
   Traveler — visual identity for a modular / tiny-home builder.
   Concept: the drafting table & cut list. Birch plywood warmth,
   architect's-ink navy, saw-blade orange, kraft paper. Hairline
   rules and stamped labels evoke a materials takeoff sheet.
   ============================================================ */
:root{
  --paper:#F5F1E8; --paper-2:#EFE9DA; --card:#FFFDF8;
  --ink:#1F2A33; --ink-soft:#4A5761; --ink-faint:#8A949B;
  --line:#D8CFBC; --line-strong:#BFB49B;
  --saw:#D5622A; --saw-deep:#B44E1E;
  --pine:#5C7A52; --clay:#C0492E; --amber:#C8891F; --timber:#8A6A45;
  --shipped:#3E6C8C;
  --bg:var(--paper); --surface:var(--card); --surface-2:var(--paper-2);
  --surface-3:#E7DFCD; --text:var(--ink); --text-muted:var(--ink-soft);
  --text-dim:var(--ink-faint); --teal:var(--pine); --rust:var(--clay);
  --radius:5px;
  --display:'Archivo',sans-serif; --body:'Inter',sans-serif; --mono:'Spline Sans Mono','IBM Plex Mono',monospace;
}
*,*::before,*::after{box-sizing:border-box}
html,body{margin:0;padding:0}
body{background:var(--bg);
  background-image:linear-gradient(rgba(31,42,51,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(31,42,51,.035) 1px,transparent 1px);
  background-size:22px 22px;
  color:var(--text);font-family:var(--body);-webkit-font-smoothing:antialiased;min-height:100vh}
button{font-family:inherit;cursor:pointer}
input,select,textarea{font-family:inherit}
::selection{background:var(--saw);color:#fff}
::-webkit-scrollbar{height:11px;width:11px}::-webkit-scrollbar-track{background:var(--surface-2)}
::-webkit-scrollbar-thumb{background:var(--line-strong);border-radius:6px;border:2px solid var(--surface-2)}
h1,h2,h3{margin:0}
:focus-visible{outline:2px solid var(--saw);outline-offset:2px}

header{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:24px;flex-wrap:wrap;
  padding:14px 26px;background:rgba(245,241,232,.94);backdrop-filter:blur(8px);border-bottom:2px solid var(--ink)}
.brand{display:flex;align-items:baseline;gap:11px}
.brand h1{font-family:var(--display);font-weight:800;font-size:25px;letter-spacing:.02em;text-transform:uppercase}
.brand .sub{font-family:var(--mono);font-size:10.5px;letter-spacing:.12em;color:var(--saw);text-transform:uppercase;font-weight:500}
.header-stats{display:flex;gap:6px;margin-left:auto}
.hstat{display:flex;flex-direction:column;align-items:center;min-width:58px;padding:4px 10px;border:1px solid var(--line);border-radius:var(--radius);background:var(--card)}
.hstat .n{font-family:var(--display);font-size:21px;font-weight:700;line-height:1.1}
.hstat .l{font-family:var(--mono);font-size:8.5px;letter-spacing:.07em;text-transform:uppercase;color:var(--text-muted);margin-top:2px;white-space:nowrap}
.hstat.warn{border-color:var(--amber)} .hstat.warn .n{color:var(--amber)}
.hstat.bad{border-color:var(--clay)} .hstat.bad .n{color:var(--clay)}
.header-actions{display:flex;gap:10px}

.btn{font-family:var(--display);font-weight:600;font-size:12.5px;letter-spacing:.02em;text-transform:uppercase;
  border:1.5px solid var(--ink);background:var(--card);color:var(--ink);padding:9px 15px;border-radius:var(--radius);transition:transform .08s,background .15s,color .15s}
.btn:hover{background:var(--ink);color:var(--paper)} .btn:active{transform:translateY(1px)}
.btn.primary{background:var(--saw);border-color:var(--saw);color:#fff}
.btn.primary:hover{background:var(--saw-deep);border-color:var(--saw-deep)}
.btn.sm{padding:6px 11px;font-size:11px} .btn.danger{border-color:var(--clay);color:var(--clay)}.btn.danger:hover{background:var(--clay);color:#fff}
.btn:disabled{opacity:.4;cursor:not-allowed}
.ghost{background:none;border:none;color:var(--text-muted);font-size:17px;line-height:1} .ghost:hover{color:var(--saw)}

.tabbar{display:flex;gap:0;padding:0 26px;border-bottom:1px solid var(--line);background:var(--surface)}
.tab{font-family:var(--display);font-size:13px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;background:none;border:none;color:var(--text-muted);padding:14px 18px;border-bottom:3px solid transparent;margin-bottom:-1px}
.tab.active{color:var(--ink);border-bottom-color:var(--saw)} .tab:hover{color:var(--ink)}

.filterbar{display:flex;gap:10px;padding:13px 26px;border-bottom:1px solid var(--line);background:var(--surface)}
.search{background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);padding:8px 11px;font-size:13px;min-width:250px}
.search:focus{border-color:var(--saw);outline:none}
#lineFilter{background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);padding:8px 10px;font-size:13px}

main{padding:22px 26px 64px}
.view{display:none} .view.active{display:block}
.empty{padding:44px;text-align:center;color:var(--text-muted);font-family:var(--mono);font-size:13px;border:1.5px dashed var(--line-strong);border-radius:var(--radius);background:var(--card)}
.count-pill{font-family:var(--mono);font-size:11px;color:var(--saw);background:rgba(213,98,42,.1);padding:1px 8px;border-radius:10px;margin-left:6px;font-weight:500}
.td-sub{display:block;font-family:var(--mono);font-size:10.5px;color:var(--text-dim)}

.dash-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}
.panel{background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);padding:20px;position:relative}
.panel::before{content:'';position:absolute;left:0;right:0;top:0;height:4px;background:var(--ink);border-radius:var(--radius) var(--radius) 0 0}
.panel.span-2{grid-column:1/-1}
.panel h2{font-family:var(--display);font-size:15px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;display:flex;align-items:center}
.panel-sub{font-size:12px;color:var(--text-muted);line-height:1.55;margin:7px 0 16px}
.forecast-detail-head{margin:18px 0 8px;font-family:var(--display);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--ink);border-top:1px solid var(--line);padding-top:14px}
.forecast-detail-note{margin-top:16px;font-family:var(--mono);font-size:11.5px;color:var(--text-dim);border-top:1px solid var(--line);padding-top:14px}

.data-table{width:100%;border-collapse:collapse}
.data-table th{text-align:left;font-family:var(--mono);font-size:10px;letter-spacing:.05em;text-transform:uppercase;color:var(--text-muted);border-bottom:1.5px solid var(--ink);padding:9px 12px}
.data-table td{padding:12px;border-bottom:1px solid var(--line);font-size:13px}
.data-table tr[data-open]{cursor:pointer} .data-table tr[data-open]:hover td{background:var(--surface-2)}
.td-name{font-weight:600;cursor:pointer} .td-name:hover{color:var(--saw)}
.badge{color:#fff;font-family:var(--mono);font-size:9.5px;padding:2px 8px;border-radius:3px;text-transform:uppercase;letter-spacing:.04em;font-weight:500}
.suggest{color:var(--pine);font-weight:600}

.g-legend{display:flex;gap:18px;margin-bottom:13px;flex-wrap:wrap}
/* Duplicate control in the build panel footer. Sits with the destructive action but
   reads as neutral, and keeps its count input adjacent so the number is obviously
   attached to the button. */
.dup-group{display:inline-flex;align-items:center;gap:8px;margin-left:auto}
.dup-group label{display:inline-flex;align-items:center;gap:6px;font-family:var(--mono);font-size:8.5px;
  text-transform:uppercase;letter-spacing:.03em;color:var(--text-dim)}
.dup-group input{width:52px;text-align:center;background:var(--card);border:1px solid var(--line-strong);
  border-radius:var(--radius);padding:5px 6px;font-family:var(--mono);font-size:12px}

/* Sheet-size picker next to Print. Same shape as the view-mode toggle. */

/* Gantt view mode toggle: Plan (duration forecast) vs Line simulation. */
.g-mode{display:inline-flex;border:1px solid var(--line-strong);border-radius:var(--radius);overflow:hidden;margin-left:auto}
.g-mode-btn{background:var(--card);border:0;padding:5px 11px;font-family:var(--mono);font-size:8.5px;
  text-transform:uppercase;letter-spacing:.04em;font-weight:700;color:var(--text-muted);cursor:pointer}
.g-mode-btn + .g-mode-btn{border-left:1px solid var(--line-strong)}
.g-mode-btn:hover{background:var(--surface-2)}
.g-mode-btn.active{background:var(--timber);color:#fff}

/* The planned dates, drawn as a thin baseline strip UNDER the simulated bar rather
   than behind it. Behind was the first attempt and it is invisible: same height, an
   opaque bar on top, and the simulation almost always runs longer than the plan — so
   the ghost was completely hidden in exactly the case it exists to show. A baseline
   below the bar is the standard convention and makes plan-vs-actual a direct
   left-to-right length comparison. */
.g-bar-ghost{position:absolute;top:calc((var(--g-row-h) + var(--g-bar-h)) / 2 + 3px);height:4px;
  border:1px dashed var(--line-strong);border-radius:2px;background:transparent;pointer-events:none;z-index:0}
.g-legend .lg i.ghost{border:1px dashed var(--line-strong);background:transparent;height:4px}

/* A pulse where this build was held: behind a slower build, or queued for the booth.
   Sits clear ABOVE the bar — centred on it, these markers landed on top of the build
   name and were unreadable. */
.g-block{position:absolute;top:calc((var(--g-row-h) - var(--g-bar-h)) / 2 - 9px);width:7px;height:7px;
  border-radius:50%;background:var(--amber);border:1px solid var(--card);z-index:3;pointer-events:auto}
.g-block.booth{background:var(--clay)}

/* Mode explanation strip. */
.g-note{margin:0 0 10px;padding:8px 12px;border-left:3px solid var(--timber);background:var(--surface-2);
  border-radius:var(--radius);font-size:11.5px;color:var(--text-muted);line-height:1.55}
.g-note.warn{border-left-color:var(--amber);background:color-mix(in srgb,var(--amber) 8%,var(--card))}
.g-note strong{color:var(--ink)}
.g-note-warn{color:var(--clay);font-weight:600}

.g-legend .lg{display:flex;align-items:center;gap:6px;font-family:var(--mono);font-size:10.5px;color:var(--text-muted);text-transform:uppercase}
.g-legend i{width:12px;height:12px;border-radius:2px;display:inline-block}
.g-legend i.tent{border:1.5px dashed var(--text-muted)} .g-legend i.tgt{width:0;height:12px;border-left:2px dashed var(--ink);border-radius:0}
.g-wrap{border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--card);overflow:hidden}
.g-scroll{overflow-x:auto;position:relative}
.g-inner{display:block}
/* ---------------------------------------------------------------------------
   Display scale for the two dense tabs (Gantt, Build Hours).
   --tab-zoom 0.8 reproduces what browser zoom at 80% gives, as a default so the
   whole schedule fits without scrolling. Set it to 1 to go back to full size.

   IMPORTANT: CSS zoom scales every length inside the element, INCLUDING the
   vh-based max-height on the scroll containers. Left alone, the rows get 20%
   shorter and so does the box holding them, so exactly the same number of rows
   would be visible and the zoom would achieve nothing. The scroll containers
   therefore divide their height by --tab-zoom to cancel that out, leaving the
   viewport-filling box the same visual size while the content inside it shrinks.
   --------------------------------------------------------------------------- */
:root{--tab-zoom:0.8;--g-row-h:56px;--g-bar-h:26px}
#ganttRoot,#hoursRoot{zoom:var(--tab-zoom)}

.g-label-sp,.g-label{flex:0 0 234px;width:234px;min-width:234px;max-width:234px;box-sizing:border-box;position:sticky;left:0;z-index:4;background:var(--card);border-right:1.5px solid var(--line-strong)}
.g-head{display:flex;border-bottom:1.5px solid var(--ink)}
.g-label-sp{height:34px;display:flex;align-items:center;padding:0 13px;font-family:var(--mono);font-size:10px;text-transform:uppercase;color:var(--text-dim);z-index:6}
.ticks{position:relative;height:34px}.tick{position:absolute;top:0;bottom:0;border-left:1px solid var(--line)}
.tick span{position:absolute;top:10px;left:5px;font-family:var(--mono);font-size:10px;color:var(--text-dim)}
.g-body{position:relative}
.g-gridlines{position:absolute;top:0;bottom:0;z-index:0;pointer-events:none}
.g-gridline{position:absolute;top:0;bottom:0;width:1px;background:var(--line)}
.g-row{display:flex;border-bottom:1px solid var(--line)}.g-row:last-child{border-bottom:none}
.g-row.group .g-label{background:var(--paper-2);font-family:var(--display);font-size:11.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--ink);display:flex;align-items:center;padding:0 13px;height:30px}
.g-row.group .g-track{background:var(--paper-2);height:30px}
/* Row height comes from --g-row-h so the label, the track and the bar's vertical
   centring can never drift apart. Raised from 48px to fit two lines of build name;
   every row uses it, so rows stay uniform regardless of name length. */
.g-row:not(.group) .g-label{padding:7px 13px;display:flex;flex-direction:column;justify-content:center;height:var(--g-row-h);cursor:pointer}
.g-row:not(.group) .g-label:hover{background:var(--surface-2)}
/* Build names wrap to two lines instead of being cut off with an ellipsis. The
   clamp is what keeps rows uniform: a longer name wraps, it never grows the row. */
.g-name{font-weight:600;font-size:12px;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:break-word;max-width:100%;min-width:0}
.g-meta{font-family:var(--mono);font-size:9.5px;color:var(--text-dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%;min-width:0}
.g-track{position:relative;flex:0 0 auto;height:var(--g-row-h)}
.g-bar{position:absolute;top:calc((var(--g-row-h) - var(--g-bar-h)) / 2);height:var(--g-bar-h);border-radius:3px;display:flex;align-items:center;padding:0 9px;font-size:11px;font-weight:600;color:#fff;overflow:hidden;white-space:nowrap;cursor:pointer;border:1px solid rgba(0,0,0,.18);box-shadow:0 1px 2px rgba(31,42,51,.12)}
.g-bar.tentative{background:repeating-linear-gradient(45deg,var(--surface-2),var(--surface-2) 5px,var(--paper) 5px,var(--paper) 10px)!important;border:1.5px dashed var(--line-strong);color:var(--text-muted)}
.g-bar:hover{filter:brightness(1.06)}
.g-target{position:absolute;top:4px;bottom:4px;width:0;border-left:2px dashed var(--ink);z-index:3}
.g-target-flag{position:absolute;top:-1px;left:0;width:0;height:0;border-top:5px solid var(--ink);border-right:7px solid transparent;pointer-events:none}
/* Target COMPLETION is a separate checkpoint from target ship: a build leaves the line
   weeks or months before it leaves the yard, so the two need distinguishing at a glance.
   Solid pine for completion, dashed ink for ship. */
.g-target-complete{border-left:2px solid var(--pine);border-left-style:solid}
.g-target-complete .g-target-flag{border-top-color:var(--pine)}
.g-legend .lg i.tgt-complete{width:0;height:0;border-left:2px solid var(--pine);height:11px}
.g-nodate{position:absolute;top:50%;left:11px;transform:translateY(-50%);font-family:var(--mono);font-size:11px;color:var(--text-dim);border:1px dashed var(--line-strong);border-radius:3px;padding:4px 10px;cursor:pointer}
.g-nodate:hover{color:var(--saw);border-color:var(--saw)}
.today{position:absolute;top:0;bottom:0;width:2px;background:var(--saw);z-index:3}
.today span{position:absolute;top:-1px;left:4px;background:var(--saw);color:#fff;font-family:var(--mono);font-size:9px;padding:2px 6px;border-radius:2px;text-transform:uppercase;letter-spacing:.04em;z-index:3}

.board{display:flex;gap:16px;align-items:flex-start;overflow-x:auto}
.b-col{flex:0 0 306px;background:var(--surface-2);border:1px solid var(--line-strong);border-radius:var(--radius);display:flex;flex-direction:column}
.b-col-head{display:flex;justify-content:space-between;padding:12px 13px;border-bottom:1.5px solid var(--ink);font-family:var(--display);font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;flex:0 0 auto}
.b-zone{padding:11px;display:flex;flex-direction:column;gap:11px;min-height:80px;max-height:560px;overflow-y:auto;flex:1 1 auto}
.b-card{background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);padding:12px;cursor:grab;box-shadow:0 1px 2px rgba(31,42,51,.06)}
.b-card:hover{border-color:var(--saw)} .b-card:active{cursor:grabbing}
.b-card-top{display:flex;justify-content:space-between;align-items:center}
.b-id{font-family:var(--mono);font-size:9.5px;color:var(--text-dim);letter-spacing:.03em}
.b-name{font-family:var(--display);font-weight:600;font-size:13.5px;margin:7px 0 2px;line-height:1.25}
.b-client{font-size:11.5px;color:var(--text-muted)}
.b-meta{display:flex;justify-content:space-between;margin-top:9px;font-family:var(--mono);font-size:10px;color:var(--text-dim)}
.b-empty{color:var(--text-dim);font-family:var(--mono);font-size:12px;text-align:center;padding:16px}

/* ---------- reports / analytics ---------- */
.rep-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:18px;flex-wrap:wrap}
.rep-title{font-family:var(--display);font-size:19px;font-weight:800;text-transform:uppercase;letter-spacing:.03em}
.kpi-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:14px;margin-bottom:18px}
.kpi{background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);padding:15px 16px;display:flex;flex-direction:column;gap:3px;position:relative;overflow:hidden}
.kpi::before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--line-strong)}
.kpi.good::before{background:var(--pine)} .kpi.warn::before{background:var(--amber)} .kpi.bad::before{background:var(--clay)}
.kpi-label{font-family:var(--mono);font-size:10px;text-transform:uppercase;letter-spacing:.06em;color:var(--text-muted)}
.kpi-value{font-family:var(--display);font-size:28px;font-weight:700;line-height:1.1}
.kpi.good .kpi-value{color:var(--pine)} .kpi.warn .kpi-value{color:var(--amber)} .kpi.bad .kpi-value{color:var(--clay)}
.kpi-sub{font-family:var(--mono);font-size:10px;color:var(--text-dim)}
.trend{font-family:var(--mono);font-size:11px;margin-left:auto;text-transform:uppercase;letter-spacing:.04em;color:var(--text-dim)}
.trend.good{color:var(--pine)} .trend.bad{color:var(--clay)}
.throughput-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:6px;flex-wrap:wrap}
.tp-year-label{font-family:var(--mono);font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted);display:flex;align-items:center;gap:7px}
.tp-year-label select{min-width:88px}
.tp-year-total{font-family:var(--mono);font-size:11px;color:var(--saw);font-weight:600}
.bar-chart{display:flex;align-items:flex-end;gap:5px;height:160px;padding-top:10px}
.bc-col{flex:1;display:flex;flex-direction:column;align-items:center;height:100%;justify-content:flex-end;gap:4px}
.bc-count{font-family:var(--mono);font-size:9.5px;color:var(--text-muted);font-weight:600;min-height:12px}
.bc-bar{width:72%;min-height:2px;background:var(--saw);border-radius:2px 2px 0 0;transition:height .3s}
.bc-x{font-family:var(--mono);font-size:8.5px;color:var(--text-dim)}
.util-list{display:flex;flex-direction:column;gap:12px}
.util-row{display:flex;flex-direction:column;gap:5px}
.util-head{display:flex;justify-content:space-between;font-size:12.5px}
.util-head span:first-child{font-family:var(--display);font-weight:600;text-transform:uppercase;font-size:12px;letter-spacing:.03em}
.util-state{font-family:var(--mono);font-size:10.5px}
.util-state.constrained{color:var(--clay)} .util-state.balanced{color:var(--pine)} .util-state.underused{color:var(--text-dim)}
.util-track{height:10px;background:var(--surface-3);border-radius:5px;overflow:hidden}
.util-fill{height:100%;border-radius:5px}
.util-fill.constrained{background:var(--clay)} .util-fill.balanced{background:var(--pine)} .util-fill.underused{background:var(--line-strong)}
.mini-bar-wrap{display:inline-block;width:70px;height:7px;background:var(--surface-3);border-radius:4px;overflow:hidden;margin-right:8px;vertical-align:middle}
.mini-bar{height:100%;background:var(--timber);border-radius:4px}
.ratio-good{color:var(--pine);font-weight:600} .ratio-warn{color:var(--amber);font-weight:600} .ratio-bad{color:var(--clay);font-weight:600}
.rep-note{margin-top:18px;background:var(--surface-2);border:1px solid var(--line-strong);border-left:4px solid var(--saw);border-radius:var(--radius);padding:14px 16px;font-size:12.5px;color:var(--text-muted);line-height:1.55}

.settings-intro{font-size:13px;color:var(--text-muted);max-width:780px;line-height:1.6}
.settings-actions{display:flex;gap:10px;align-items:center;margin:16px 0 20px;flex-wrap:wrap}
.settings-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(290px,1fr));gap:18px;align-items:start}
.settings-card{background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);padding:18px}
.settings-card h3{font-family:var(--display);font-size:13.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;margin-bottom:13px;display:flex;align-items:center}
.opt-list{display:flex;flex-direction:column;border:1px solid var(--line);border-radius:var(--radius);overflow-y:auto;overflow-x:hidden;margin-bottom:13px;max-height:200px}
.opt-row{display:flex;align-items:center;gap:10px;padding:8px 12px;border-bottom:1px solid var(--line);background:var(--surface-2)}
.opt-row:nth-child(even){background:var(--card)}.opt-row:last-child{border-bottom:none}
.opt-dot{width:11px;height:11px;border-radius:3px;flex:0 0 auto}.opt-num{font-family:var(--mono);font-size:10px;color:var(--text-dim);width:20px}
.rm{background:none;border:none;color:var(--text-dim);font-size:15px;padding:2px 6px;line-height:1}.rm:hover{color:var(--clay)}
.add-row{display:flex;gap:8px;align-items:center}
.add-row>input{flex:1;background:var(--surface-2);border:1px solid var(--line-strong);border-radius:var(--radius);padding:8px 11px;font-size:13px}
.add-row>input:focus{border-color:var(--saw);outline:none}
.add-line-row{display:grid !important;grid-template-columns:minmax(80px,1fr) 52px 52px 0 46px;gap:7px;align-items:end}
.add-line-row .btn{grid-column:5}
.add-line-row .le-name{background:var(--surface-2);border:1px solid var(--line-strong);border-radius:var(--radius);padding:7px 9px;font-size:13px;min-width:0;width:100%}
.add-line-row .le-name:focus{border-color:var(--saw);outline:none}
.add-line-row .btn{white-space:nowrap;padding:7px 10px}

.overlay{position:fixed;inset:0;background:rgba(31,42,51,.52);display:none;align-items:flex-start;justify-content:center;padding:40px 20px;overflow-y:auto;z-index:100}
.overlay.open{display:flex}
.modal{background:var(--card);border:1.5px solid var(--ink);border-radius:var(--radius);width:100%;max-width:700px;box-shadow:0 18px 50px rgba(31,42,51,.25)}
.modal-head{display:flex;justify-content:space-between;padding:19px 22px;border-bottom:1.5px solid var(--ink);background:var(--surface-2);border-radius:4px 4px 0 0}
.modal-head h2{font-family:var(--display);font-size:18px;font-weight:700;text-transform:uppercase;letter-spacing:.02em}
.mono-sub{font-family:var(--mono);font-size:11px;color:var(--text-muted);letter-spacing:.02em}
.modal-body{padding:20px 22px;display:flex;flex-direction:column;gap:18px;max-height:76vh;overflow-y:auto}
.modal-foot{padding:15px 22px;border-top:1px solid var(--line);display:flex;justify-content:space-between;background:var(--surface-2);border-radius:0 0 4px 4px}
.forecast-banner{border:1px solid var(--line);border-left-width:4px;border-radius:var(--radius);padding:12px 15px;background:var(--surface-2)}
.forecast-banner>div:first-child{display:flex;align-items:center;gap:11px}
.fb-label{font-family:var(--mono);font-size:10px;text-transform:uppercase;letter-spacing:.07em;color:var(--text-muted)}
.fb-detail{font-size:12px;color:var(--text-muted);margin-top:6px}
.field-grid{display:grid;grid-template-columns:1fr 1fr;gap:13px}
.field{display:flex;flex-direction:column;gap:5px}
.field>span{font-family:var(--mono);font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted)}
.field input,.field select,.field textarea{background:var(--surface-2);border:1px solid var(--line-strong);border-radius:var(--radius);color:var(--text);padding:8px 11px;font-size:13px}
.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--saw);outline:none}
.section-head{display:flex;justify-content:space-between;align-items:center;border-top:1.5px solid var(--ink);padding-top:15px;gap:12px}
.section-head h3{font-family:var(--display);font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.section-head-actions{display:flex;align-items:center;gap:12px}

.stage-list{display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:min-content;gap:0;border:1px solid var(--line-strong);border-radius:var(--radius);overflow:visible;flex-shrink:0}
/* ---------------------------------------------------------------------------
   Stage progress: a segmented 5% bar plus a typed value, replacing a range slider.
   A slider needs a precise drag to hit a value, is poor on touch, and implies
   continuous precision when the judgement is coarse. Clicking a segment is one
   action, and the number box covers the case where an exact figure is known.
   --------------------------------------------------------------------------- */
.pg{display:inline-flex;align-items:center;gap:6px;min-width:0}
.pg-track{display:inline-flex;gap:1px;align-items:stretch;height:20px;padding:2px;
  background:var(--surface-2);border:1px solid var(--line-strong);border-radius:5px}
.pg-seg{width:7px;padding:0;border:0;border-radius:1px;background:var(--line);cursor:pointer;
  transition:background .12s ease,transform .12s ease}
.pg-seg:hover{background:var(--timber);transform:scaleY(1.15)}
.pg-seg.major{border-radius:0;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink) 18%,transparent)}
.pg-seg.on{background:var(--pine)}
.pg-seg.on:hover{background:var(--clay)}
.pg-num{width:52px;text-align:right;background:var(--card);border:1px solid var(--line-strong);
  border-radius:var(--radius);padding:3px 5px;font-family:var(--mono);font-size:12px}
.pg-num::-webkit-outer-spin-button,.pg-num::-webkit-inner-spin-button{opacity:1}
.pg-unit{font-family:var(--mono);font-size:10px;color:var(--text-dim)}
@media (max-width:640px){.pg-seg{width:9px}.pg-track{height:24px}}

.stage-row{display:grid;grid-template-columns:20px minmax(0,1fr) 44px 44px 56px 34px;gap:6px;align-items:center;padding:8px 10px;border-bottom:1px solid var(--line);background:var(--surface-2);min-width:0}
.stage-row:nth-child(4n+1),.stage-row:nth-child(4n){background:var(--card)}
.stage-list .stage-row:nth-last-child(-n+2){border-bottom:none}
.st-order{font-family:var(--mono);font-size:10px;color:var(--saw);font-weight:500;min-width:0}
.st-label{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0;cursor:default}
.st-days{background:var(--card);border:1px solid var(--line-strong);border-radius:3px;padding:5px 5px;font-size:12px;width:100%;min-width:0}
.st-hours{background:var(--card);border:1px solid var(--line-strong);border-radius:3px;padding:5px 4px;font-size:12px;width:100%;min-width:0}
.st-range{min-width:0;width:100%;accent-color:var(--saw)}
.st-prog{font-family:var(--mono);font-size:10.5px;color:var(--text-muted);text-align:right;font-weight:500;min-width:0}

@media(max-width:820px){
  .dash-grid{grid-template-columns:1fr}.field-grid{grid-template-columns:1fr}
  .header-stats{width:100%;margin:10px 0 0;justify-content:space-between;gap:5px;flex-wrap:wrap}
  .hstat{min-width:0;flex:1}
  .stage-list{grid-template-columns:1fr}
  .stage-row{grid-template-columns:22px 1fr 52px 42px}
  .st-range{display:none}
  main{padding:16px 14px 48px}
  .search{min-width:0;flex:1}
  .filterbar{flex-wrap:wrap}
  /* wide tables scroll inside their panel rather than widening the page */
  .panel{overflow-x:auto}
  .kpi-row{grid-template-columns:1fr 1fr}
  .modal-body{max-height:82vh}
  .field-grid{gap:10px}
}
/* global guard: never let the page scroll sideways; contain wide children */
html,body{max-width:100%;overflow-x:hidden}
.data-table{min-width:0}
.board{max-width:100%}
@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}

.field .hint{font-style:normal;text-transform:none;letter-spacing:0;color:var(--text-dim);font-size:9px}

/* build-name full-width field */
.field-wide{grid-column:1/-1}
/* settings: inline line editing + workdays/week */
.card-hint{font-size:11px;color:var(--text-dim);margin:0 0 12px;line-height:1.5}
.line-edit-list{display:flex;flex-direction:column;gap:8px;margin-bottom:12px}
.line-edit-row{display:grid;grid-template-columns:minmax(80px,1fr) 52px 52px 0 46px;gap:7px;align-items:end}
.line-edit-row .le-count{display:none}
.line-edit-row .rm{align-self:center;justify-self:center}
.line-edit-row .le-name{background:var(--surface-2);border:1px solid var(--line-strong);border-radius:var(--radius);padding:7px 9px;font-size:13px;min-width:0;width:100%}
.line-edit-row .le-name:focus{border-color:var(--saw);outline:none}
.line-edit-row .rm{align-self:center}
.le-num{display:flex;flex-direction:column;align-items:stretch;gap:2px;min-width:0}
.le-num>span{font-family:var(--mono);font-size:8px;text-transform:uppercase;letter-spacing:.02em;color:var(--text-dim);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.le-num input{width:100%;border:1px solid var(--line-strong);background:var(--surface-2);border-radius:var(--radius);padding:7px 2px;font-size:13px;font-family:var(--body);text-align:center;min-width:0}
.le-num input:focus{outline:none;border-color:var(--saw)}
.le-count{display:none}
@media(max-width:820px){

  .line-edit-row .le-count{display:none}
}

/* ---------- mini working-days timeline (dashboard + board) ---------- */
.mini-tl{margin:6px 0 2px}
.mtl-track{position:relative;height:7px;background:var(--surface-3);border-radius:4px;margin-right:9px}
.mtl-bar{position:absolute;left:0;top:0;height:100%;border-radius:4px;min-width:2px}
.mtl-today{position:absolute;top:-3px;width:2px;height:13px;background:var(--ink);border-radius:1px;z-index:2}
.mtl-today::after{content:'';position:absolute;top:-3px;left:-2px;width:6px;height:6px;border-radius:50%;background:var(--ink)}
.mtl-target{position:absolute;right:-9px;top:50%;transform:translateY(-50%);z-index:3}
.mtl-target-flag{display:block;width:0;height:0;border-top:6px solid transparent;border-bottom:6px solid transparent;border-left:9px solid var(--saw);filter:drop-shadow(0 1px 1px rgba(0,0,0,.15))}
.mtl-dates{display:flex;justify-content:space-between;font-family:var(--mono);font-size:8.5px;color:var(--text-dim);margin-top:3px}
.mtl-dates span:nth-child(2){color:var(--text-muted);font-weight:600}
.mtl-target-date{color:var(--saw)!important;font-weight:600}

/* ---------- bay tracking (dashboard line capacity) ---------- */

/* bay conflict warning in the build modal */
/* Sharing a bay is a normal way the floor operates, not an error, so this note is
   informational: same shape as .bay-warning but in neutral ink with no icon. */
.bay-shared{margin:12px 0 0;padding:10px 13px;border:1px solid var(--line-strong);border-left:4px solid var(--timber);border-radius:var(--radius);background:var(--surface-2);font-size:12.5px;color:var(--text-muted);line-height:1.5}

/* ---------------------------------------------------------------------------
   Line Routing card. Spans the full settings grid because it is a matrix, not a
   list: stage assignments on the left, resulting bay load on the right, so an
   imbalance is visible while you are still mapping rather than after.
   --------------------------------------------------------------------------- */
.lr-card{grid-column:1/-1}
.lr-tabs{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:10px}
.lr-tab{background:var(--surface-2);border:1px solid var(--line-strong);border-radius:var(--radius);padding:6px 11px;font-family:var(--mono);font-size:9px;text-transform:uppercase;letter-spacing:.03em;color:var(--text-muted);cursor:pointer;font-weight:700}
.lr-tab:hover{border-color:var(--timber)}
.lr-tab.active{background:var(--timber);border-color:var(--timber);color:#fff}
/* Line-level route stops: where foam happens, and whether the line has a trailer
   pre-station. Sits between the line tabs and the stage table because it frames how
   the rest of the card is read. */
.lr-stops{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin:0 0 12px;padding:10px 12px;
  border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-2)}
.lr-stops label{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:var(--text-muted)}
.lr-stops select{background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);
  padding:5px 26px 5px 8px;font-size:12px;font-family:var(--body)}
.lr-stop-check input{width:14px;height:14px;margin:0;cursor:pointer}
.lr-stops .lr-note{flex:1 0 100%;margin:2px 0 0}

.lr-warn{margin:0 0 10px;padding:7px 10px;border-left:3px solid var(--amber);background:color-mix(in srgb,var(--amber) 8%,var(--card));font-size:11.5px;color:var(--text-muted);border-radius:var(--radius)}
.lr-stage{font-weight:600;color:var(--ink)}
.lr-bay{width:100%;min-width:0;background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);padding:5px 24px 5px 7px;font-size:12px;font-family:var(--body)}
.lr-bay:focus{border-color:var(--saw);outline:none}
.lr-mr{text-align:center;width:44px}
.lr-mr input{width:14px;height:14px;margin:0;cursor:pointer}
.lr-load-row{display:grid;grid-template-columns:52px 1fr 54px 66px 44px;gap:8px;align-items:center}
.lr-load-row{padding:4px 0;font-size:11.5px}
.lr-load-bay{font-weight:600;color:var(--text-muted)}
.lr-load-track{height:9px;background:var(--card);border:1px solid var(--line);border-radius:5px;overflow:hidden}
.lr-load-fill{display:block;height:100%;background:var(--pine)}
.lr-load-row.neck .lr-load-fill{background:var(--clay)}
.lr-load-row.neck .lr-load-bay{color:var(--clay)}
.lr-load-row.starved .lr-load-cap{color:var(--clay);font-weight:700}
.lr-load-num,.lr-load-days{font-family:var(--mono);font-size:10.5px;text-align:right;color:var(--text-muted)}
.lr-load-cap{font-family:var(--mono);font-size:9.5px;color:var(--text-dim)}
.lr-summary{margin-top:10px;padding-top:9px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:5px;font-size:11.5px;color:var(--text-muted)}
.lr-summary strong{color:var(--ink)}
.lr-note{font-size:10.5px;color:var(--text-dim);font-style:italic}
.lr-summary .lr-warn{margin:4px 0 0}

/* Multi-select bay picker in the build panel. */
.bay-pick{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
.bay-pick-opt{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--card);font-size:11.5px;cursor:pointer;user-select:none}
.bay-pick-opt:hover{border-color:var(--timber)}
.bay-pick-opt.on{background:color-mix(in srgb,var(--timber) 12%,var(--card));border-color:var(--timber);font-weight:600}
.bay-pick-opt input{margin:0;width:12px;height:12px}
.bay-pick-hint{flex:1 0 100%;font-size:11px;color:var(--text-dim);margin-top:2px}

/* ---------- build history timeline (reports) ---------- */
.hist-day{margin-bottom:16px}
.hist-day-head{font-family:var(--mono);font-size:10px;text-transform:uppercase;letter-spacing:.05em;color:var(--saw);font-weight:600;padding-bottom:6px;border-bottom:1px solid var(--line);margin-bottom:8px}
.hist-row{display:grid;grid-template-columns:64px 12px minmax(120px,1.4fr) 2.6fr;gap:10px;align-items:center;padding:5px 0;font-size:12.5px}
.hist-time{font-family:var(--mono);font-size:10px;color:var(--text-dim);text-align:right}
.hist-dot{width:8px;height:8px;border-radius:50%;background:var(--line-strong);justify-self:center}
.hist-dot.good{background:var(--pine)} .hist-dot.accent{background:var(--saw)} .hist-dot.bad{background:var(--clay)}
.hist-build{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.hist-event{color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.hist-event.good{color:var(--pine);font-weight:500} .hist-event.accent{color:var(--saw);font-weight:500} .hist-event.bad{color:var(--clay)}
@media(max-width:820px){.hist-row{grid-template-columns:52px 10px 1fr;row-gap:2px}.hist-event{grid-column:3}}

/* draft (unsaved new build) footer note */
.draft-note{font-size:11.5px;color:var(--text-dim);font-style:italic;margin-right:auto;align-self:center}

/* ---------- Shop Overview (floor plan) ---------- */
.shop-map{position:relative;line-height:0;aspect-ratio:1096/532;width:100%;max-height:calc(100vh - 314px);max-width:calc((100vh - 314px) * 1096 / 532)}
.shop-bay{position:absolute;box-sizing:border-box;border:2px solid transparent;border-radius:4px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;line-height:1.1;padding:2px;transition:transform .08s,box-shadow .12s;overflow:hidden;z-index:2}
/* Occupied bays previously carried `box-shadow:0 0 0 1px var(--card)` as a
   separator. Same problem as .shop-bay.empty below, just 1px instead of 2px:
   it painted outside the box and bled over the adjacent bay. Adjacent occupied
   bays still need separating — without it a run of green bays merges into one
   blob — so the separation moves INSIDE the box: .shop-bay already reserves a
   2px border, and tinting it to the band colour gives every bay a light inset
   frame. Two neighbours therefore show a 4px gap, entirely within their own
   bounds, overlapping nothing. */
.shop-bay.occupied{background:var(--bay-color);border-color:var(--card);color:#fff}
/* `empty` is also a generic empty-state utility class (see .empty around line 67,
   restyled again in planner-theme.css). That rule sets a large padding and an
   ::before illustration, and it collides with .shop-bay.empty here.
   .shop-bay{padding:2px} and .empty{padding:...} have identical specificity
   (0,1,0), so before the theme existed the bays kept 2px only because
   .shop-bay came later in this file. planner-theme.css loads third and won that
   tiebreak, giving every open bay 44px of horizontal padding — and because
   box-sizing is border-box a box cannot shrink below its own padding, the inline
   width:6.259% was discarded and every empty bay rendered 92px wide instead of
   75.55px, overlapping its neighbours by 16.45px. Spray Foam, also .empty, blew
   out from 37.8px to 92px and swallowed Bay 3.
   Setting these here at (0,2,0) makes the bays immune to that collision
   regardless of stylesheet order, and content:none drops the illustration.
   border-radius and font are pinned for the same reason: the generic rule sets
   both, so open bays were rendering with a 2px radius against the occupied bays'
   4px until these were restated. */
.shop-bay.empty{background:var(--surface-2);border:2px dashed var(--line-strong);padding:2px;border-radius:4px;font-family:inherit;font-size:inherit}
.shop-bay.empty::before{content:none}
.shop-bay:hover{transform:scale(1.03);box-shadow:0 3px 10px rgba(31,42,51,.25);z-index:5}
.shop-bay-num{font-family:var(--mono);font-size:11px;font-weight:700}
.shop-bay.empty .shop-bay-num{color:var(--text-muted)}
/* Bays are tall and narrow (roughly 74 x 163px at a typical window size), so a
   2-line clamp was truncating most real build names — "Ofland - Workforce.."
   — while leaving most of the cell empty. There is room for four lines with
   plenty to spare. overflow-wrap keeps a single long token from spilling out. */
.shop-bay-build{font-family:var(--body);font-size:9.5px;font-weight:600;text-align:center;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:4;-webkit-box-orient:vertical;max-width:100%;overflow-wrap:anywhere}
.shop-bay-open{font-family:var(--mono);font-size:8px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-dim)}

/* ---------- Spray Foam bay (Shop Overview) ---------- */
.shop-bay.spray-foam.empty{border-style:solid;border-color:var(--timber);background:color-mix(in srgb,var(--timber) 14%,var(--surface-2))}
.shop-bay.spray-foam .shop-bay-num{color:var(--timber);font-size:9px}
.shop-bay.spray-foam.occupied .shop-bay-num{color:#fff}
.shop-bay.spray-foam .shop-bay-open{font-size:7px}

/* Carried (traveled) work marker. A build sitting in a bay with unfinished work
   from earlier bays is behind, and that is invisible from position alone — two
   builds in the same bay can be a fortnight apart. The badge shows how many stages
   are outstanding and roughly how many hours; the full list is in the tooltip.
   'gated' means at least one of them was flagged move-ready, i.e. a gate was
   waived to let the build through. */
.shop-carry{position:absolute;top:2px;right:2px;padding:1px 4px;border-radius:3px;
  background:var(--amber);color:#2A2622;font-family:var(--mono);font-size:8px;font-weight:700;
  letter-spacing:.02em;line-height:1.4;pointer-events:none}
.shop-bay.gated .shop-carry{background:var(--clay);color:#fff}
.shop-bay.behind{box-shadow:inset 0 0 0 2px var(--amber)}
.shop-bay.gated{box-shadow:inset 0 0 0 2px var(--clay)}
.shop-bay.compact .shop-carry{font-size:7px;padding:0 3px;top:1px;right:1px}

/* A line divides into lanes when any of its bays holds more than one build, so
   every cell in that row gets shorter. Shrink the type and drop the secondary
   label so the contents still fit rather than clipping. */
.shop-bay.compact{padding:1px}
.shop-bay.compact .shop-bay-num{font-size:9px}
.shop-bay.compact .shop-bay-build{font-size:8.5px;-webkit-line-clamp:2;line-height:1.1}
.shop-bay.compact .shop-bay-open{font-size:7px}

/* Drag feedback. A build box is the drag handle; open slots and other build boxes
   are drop targets. drop-hover = move here, drop-hover-add = Shift, i.e. add this
   bay to the build's set rather than replacing it. */
.shop-build{cursor:grab}
.shop-build.dragging{opacity:.4;cursor:grabbing}
.shop-bay.drop-hover{outline:2px solid var(--timber);outline-offset:-2px;filter:brightness(1.04)}
.shop-bay.drop-hover-add{outline:2px dashed var(--pine);outline-offset:-2px;filter:brightness(1.06)}

/* ---------- Bay picker modal ---------- */
.modal.modal-sm{max-width:440px}
.bp-list{display:flex;flex-direction:column;gap:6px}
.bp-row{display:grid;grid-template-columns:12px 1fr auto;align-items:center;gap:10px;width:100%;text-align:left;padding:10px 12px;background:var(--surface-2);border:1px solid var(--line-strong);border-radius:var(--radius);cursor:pointer;font-family:inherit;transition:border-color .12s,background .12s}
.bp-row:hover{border-color:var(--saw);background:color-mix(in srgb,var(--saw) 7%,var(--surface-2))}
.bp-dot{width:9px;height:9px;border-radius:50%}
.bp-name{font-weight:600;font-size:13px;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.bp-meta{font-family:var(--mono);font-size:10px;color:var(--text-dim);white-space:nowrap}
.bp-empty{padding:20px;text-align:center;color:var(--text-muted);font-size:12.5px;line-height:1.6}

/* ---------- build hours summary (reconciliation) ---------- */
.hours-summary{display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;margin-top:12px}
.hs-cell{background:var(--surface-2);border:1px solid var(--line-strong);border-radius:var(--radius);padding:9px 12px;display:flex;flex-direction:column;gap:2px}
.hs-label{font-family:var(--mono);font-size:8.5px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-dim)}
.hs-val{font-family:var(--display);font-size:18px;font-weight:700;color:var(--ink)}
.hs-var.over{border-color:var(--clay)} .hs-var.over .hs-val{color:var(--clay)}
.hs-var.under{border-color:var(--pine)} .hs-var.under .hs-val{color:var(--pine)}
.hs-note{margin-top:8px;font-size:12px;font-weight:600;padding:7px 12px;border-radius:var(--radius)}
.hs-note.over{color:var(--clay);background:color-mix(in srgb,var(--clay) 8%,var(--card));border:1px solid var(--clay)}
.hs-note.under{color:var(--pine);background:color-mix(in srgb,var(--pine) 8%,var(--card));border:1px solid var(--pine)}
.hs-note.even{color:var(--text-muted);background:var(--surface-2)}

/* header label for the stage hours column */
.stage-list-head{display:grid;grid-template-columns:20px minmax(0,1fr) 44px 44px 56px 34px;gap:6px;padding:0 10px 4px;font-family:var(--mono);font-size:8px;text-transform:uppercase;letter-spacing:.03em;color:var(--text-dim)}
.stage-list-head span{text-align:center}

/* ---------- Build Hours matrix ---------- */
.hours-head{margin-bottom:8px}
.hours-filters{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:10px}
.hf-search{min-width:180px;padding:7px 10px;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--card);font-size:12.5px}
.hours-filters .btn{margin-left:auto}
.hours-grid-wrap{overflow:auto;border:1px solid var(--line-strong);border-radius:var(--radius);max-height:calc((100vh - 300px) / var(--tab-zoom))}
.hours-grid{border-collapse:separate;border-spacing:0;font-size:12px;min-width:100%}
.hours-grid th,.hours-grid td{border-bottom:1px solid var(--line);border-right:1px solid var(--line);white-space:nowrap}
.hours-grid thead th{position:sticky;top:0;z-index:3;background:var(--surface-2);font-family:var(--mono);font-size:8.5px;text-transform:uppercase;letter-spacing:.03em;color:var(--text-muted);font-weight:600;padding:8px 6px;text-align:center;vertical-align:bottom}
.bh-stage{max-width:64px;overflow:hidden;text-overflow:ellipsis}
.bh-name-head,.bh-name{position:sticky;left:0;z-index:5;background:var(--card);text-align:left;min-width:190px;max-width:230px;padding:6px 10px;font-weight:600;overflow:hidden;white-space:normal}
.hours-grid thead .bh-name-head{z-index:7;background:var(--surface-2)}
.bh-name{cursor:pointer}
.bh-name:hover{color:var(--saw)}
.bh-sub{display:block;font-family:var(--mono);font-size:8.5px;font-weight:400;color:var(--text-dim);text-transform:uppercase}
.bh-cell{padding:0}
.bh-input{width:52px;border:none;background:transparent;padding:7px 4px;font-size:12px;text-align:center;font-family:var(--mono);color:var(--ink)}
.bh-input:hover{background:var(--surface-2)}
.bh-input:focus{outline:2px solid var(--saw);outline-offset:-2px;background:var(--card)}
.bh-goal-input{width:56px;color:var(--timber);font-weight:600}
.bh-total{text-align:center;font-family:var(--mono);font-weight:700;background:var(--surface-2);padding:7px 8px}
.bh-goal{text-align:center;padding:0}
.bh-var{text-align:center;font-family:var(--mono);font-weight:700;padding:7px 8px}
.bh-var.over{color:var(--clay)} .bh-var.under{color:var(--pine)} .bh-var.even{color:var(--text-muted)}
/* Two summary rows are pinned to the bottom of the scroll area: Totals, then
   Average beneath it. Both are position:sticky, so the upper one has to be
   offset by the height of the lower one or they stack on top of each other.
   --bh-avg-h is measured after render (see setSummaryRowOffset in app.js)
   because row height depends on font and zoom; the 30px fallback only applies
   for the first paint before that runs. */
.bh-totals-row td{position:sticky;bottom:var(--bh-avg-h,30px);z-index:4;background:var(--paper-2);font-weight:700;box-shadow:inset 0 2px 0 var(--ink);padding:7px 8px;vertical-align:middle;height:auto}
.bh-totals-row .bh-name{position:sticky;left:0;bottom:var(--bh-avg-h,30px);background:var(--paper-2);z-index:6;box-shadow:inset 0 2px 0 var(--ink);display:table-cell;padding:7px 10px}
/* Average row: same pinning, one step quieter than Totals so Totals still reads
   as the primary summary. No top rule — it sits directly under Totals. */
.bh-avg-row td{position:sticky;bottom:0;z-index:4;background:var(--paper-2);font-weight:600;padding:7px 8px;vertical-align:middle;height:auto;color:var(--text-muted)}
.bh-avg-row .bh-name{position:sticky;left:0;bottom:0;background:var(--paper-2);z-index:6;display:table-cell;padding:7px 10px;font-weight:700;color:var(--text-muted)}
.bh-avg-cell{text-align:center;font-family:var(--mono);font-size:11px}

/* --- Summary rows must stay opaque, whatever else is loaded ------------------
   planner-theme.css adds `tbody tr:hover > td{background:var(--wrb-hover-tint)}`,
   and that tint is rgba(...,.035) — 96.5% transparent. Specificity there is
   (0,1,3), which beats a plain `.bh-avg-row td` at (0,1,1), so on hover these
   sticky rows lost their opaque background and the stage-hour cells scrolling
   underneath showed straight through them.

   The corrective rules used to live in planner-theme.css, which meant the fix
   only worked if that file was up to date. These live here instead, next to the
   rest of the table, at (0,2,3) — high enough to win on specificity alone rather
   than on stylesheet order, so nothing can undo them. The hover tint is
   reapplied composited over each row's own opaque base, so the feedback looks
   identical but nothing behind can bleed through.

   z-index is also raised above the body rows' sticky name column (which sits at
   5); at 4 a body name cell would have painted over the summary rows. */
.hours-grid tbody tr.bh-totals-row > td,
.hours-grid tbody tr.bh-avg-row > td{background:var(--paper-2);z-index:7}
.hours-grid tbody tr.bh-totals-row > td.bh-name,
.hours-grid tbody tr.bh-avg-row > td.bh-name{background:var(--paper-2);z-index:8}
.hours-grid tbody tr.bh-totals-row:hover > td,
.hours-grid tbody tr.bh-avg-row:hover > td,
.hours-grid tbody tr.bh-totals-row:hover > td.bh-name,
.hours-grid tbody tr.bh-avg-row:hover > td.bh-name{
  background:color-mix(in srgb, var(--ink) 3.5%, var(--paper-2));
}
.bh-total-cell{text-align:center;font-family:var(--mono);font-size:11px}

/* ---------- drag-to-reorder ---------- */
.drag-handle{cursor:grab;color:var(--text-dim);font-size:12px;user-select:none;padding-right:2px}
.opt-row[draggable="true"]{cursor:default}
.opt-row.reorder-dragging{opacity:.4}
.opt-row.reorder-over{border-top:2px solid var(--saw)}
.hours-grid thead th.bh-stage[draggable="true"]{cursor:grab}
.hours-grid thead th.bh-stage.reorder-dragging{opacity:.4}
.hours-grid thead th.bh-stage.reorder-over{border-left:2px solid var(--saw);background:color-mix(in srgb,var(--saw) 12%,var(--surface-2))}
.card-hint{font-size:11px;color:var(--text-dim);margin:0 0 8px;line-height:1.5}

/* Build Hours target ship column */

/* editable settings option/stage names */
.opt-edit{flex:1;min-width:0;background:transparent;border:1px solid transparent;border-radius:3px;padding:4px 6px;font-size:12.5px;font-family:inherit;color:var(--ink)}
.opt-edit:hover{border-color:var(--line)}
.opt-edit:focus{outline:none;border-color:var(--saw);background:var(--card)}

/* Build Hours: name colored by variance, alternating rows, last-updated column */
.bh-name-var.over{color:var(--clay)} .bh-name-var.over .bh-sub{color:var(--clay);opacity:.7}
.bh-name-var.under{color:var(--pine)} .bh-name-var.under .bh-sub{color:var(--pine);opacity:.7}
.bh-name-var.even{color:var(--text-muted)}
.bh-updated{text-align:center;font-family:var(--mono);font-size:10px;white-space:nowrap;padding:7px 10px;color:var(--text-dim)}
.hours-grid tbody tr.bh-alt td{background:var(--surface-2)}
.hours-grid tbody tr.bh-alt .bh-name{background:var(--surface-2)}
.hours-grid tbody tr.bh-alt .bh-total{background:var(--surface-3)}
.hours-grid tbody tr:not(.bh-alt):not(.bh-totals-row) .bh-input:hover{background:var(--surface-2)}
.hours-grid tbody tr.bh-alt .bh-input:hover{background:var(--surface-3)}

/* Build Hours: row-highlight toggle */
/* The name cell MUST stay a real table cell. This rule used to set
   `.bh-name{display:flex}` so the ★ button and name could sit side by side —
   but .bh-name is a <td> that is also `position:sticky; left:0`. Changing a
   table cell's display takes it out of the table layout model (the browser
   wraps it in an anonymous cell box), which broke the frozen first column:
   the hour inputs scrolled out from underneath it, and since .bh-input:hover
   paints its own background, hovering the name lit up the stage-hour cells
   showing through. The flex layout now lives on an inner wrapper div instead,
   leaving the cell itself a plain sticky table-cell. */
.bh-name{display:table-cell}
.bh-name-inner{display:flex;align-items:center;gap:6px;min-width:0;overflow:hidden}
.bh-name-text{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.bh-highlight-btn{flex:0 0 auto;background:transparent;border:none;cursor:pointer;color:var(--line-strong);font-size:13px;line-height:1;padding:2px;border-radius:3px}
.bh-highlight-btn:hover{color:var(--amber)}
.bh-highlight-btn.active{color:var(--amber)}
.hours-grid tbody tr.bh-highlighted td{background:color-mix(in srgb,var(--amber) 20%,var(--card))!important;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--amber) 35%,transparent)}
.hours-grid tbody tr.bh-highlighted .bh-name{background:color-mix(in srgb,var(--amber) 24%,var(--card))!important}
.hours-grid tbody tr.bh-highlighted .bh-input{background:transparent}

/* ---------- build attachments (files & documents) ---------- */
.attach-groups{display:flex;flex-direction:column;gap:16px;margin-top:4px}
.attach-group{border:1px solid var(--line);border-radius:var(--radius);padding:12px;background:var(--surface-2)}
.attach-label{font-family:var(--mono);font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted);font-weight:600;margin-bottom:9px}
.attach-drop{border:1.5px dashed var(--line-strong);border-radius:var(--radius);padding:14px;text-align:center;background:var(--card);transition:border-color .12s,background .12s}
.attach-drop.drag-over{border-color:var(--saw);background:color-mix(in srgb,var(--saw) 8%,var(--card))}
.attach-drop-text{font-size:12px;color:var(--text-muted)}
.attach-browse{background:none;border:none;color:var(--saw);font-weight:600;cursor:pointer;text-decoration:underline;padding:0;font-size:12px;font-family:inherit}
.attach-linkrow{display:flex;gap:7px;margin-top:9px}
.attach-linkinput{flex:1;min-width:0;padding:7px 10px;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--card);font-size:12px}
.attach-list{display:flex;flex-direction:column;gap:6px;margin-top:10px}
.attach-item{display:flex;align-items:center;gap:8px;padding:7px 10px;background:var(--card);border:1px solid var(--line);border-radius:var(--radius);font-size:12.5px}
.ai-icon{flex:0 0 auto;font-size:13px}
.ai-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--ink);text-decoration:none}
a.ai-name:hover{color:var(--saw);text-decoration:underline}
.ai-download{background:none;border:none;cursor:pointer;text-align:left;font-family:inherit;font-size:12.5px}
.ai-download:hover{color:var(--saw);text-decoration:underline}
.ai-size{flex:0 0 auto;font-family:var(--mono);font-size:9.5px;color:var(--text-dim)}
.ai-rm{flex:0 0 auto;background:none;border:none;color:var(--text-dim);cursor:pointer;font-size:12px;padding:2px 4px;border-radius:3px}
.ai-rm:hover{color:var(--clay);background:color-mix(in srgb,var(--clay) 10%,transparent)}

/* ---------- build modal tabs ---------- */
.modal-tabs{display:flex;gap:2px;padding:0 22px;border-bottom:1px solid var(--line);background:var(--card)}
.modal-tab{background:none;border:none;border-bottom:2px solid transparent;padding:11px 4px;margin-right:20px;font-family:var(--display);font-size:12.5px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--text-dim);cursor:pointer;transition:color .12s,border-color .12s}
.modal-tab:hover{color:var(--text-muted)}
.modal-tab.active{color:var(--ink);border-bottom-color:var(--saw)}
.mt-badge{display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 4px;border-radius:9px;background:var(--saw);color:#fff;font-family:var(--mono);font-size:9px;font-weight:700;vertical-align:middle}
.modal-panel{display:flex;flex-direction:column;gap:18px}
.modal-panel[hidden]{display:none}

/* ---------- Build Hours resizable columns ---------- */
.hours-grid th{position:relative}
.col-resize{position:absolute;top:0;right:0;width:7px;height:100%;cursor:col-resize;z-index:8;user-select:none}
.col-resize:hover{background:color-mix(in srgb,var(--saw) 40%,transparent)}
body.col-resizing{cursor:col-resize;user-select:none}
body.col-resizing *{cursor:col-resize!important}
.bh-stage .th-label{cursor:grab;display:inline-block;max-width:100%;white-space:normal;word-break:normal;overflow-wrap:normal;vertical-align:bottom}
/* when a stage column is widened, let the header label wrap to show in full */
.hours-grid thead th.bh-stage{white-space:normal;word-break:normal;overflow-wrap:normal;hyphens:none;min-width:62px}

/* ---------- Dashboard: Line Capacity cards (redesigned) ---------- */
.line-cards{display:flex;flex-direction:column;gap:14px}
.line-card{padding:14px 15px;border:1px solid var(--line-strong);border-radius:var(--radius);background:var(--card);transition:border-color .15s}
.line-card.over{border-color:var(--clay)}
.lc-bay{position:relative;min-height:56px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface-2);padding:6px 8px;display:flex;flex-direction:column;gap:3px;transition:border-color .12s,background .12s}
.lc-bay.filled{border-left:3px solid var(--bc,var(--pine));background:var(--card)}
.lc-bay.open{opacity:.6}
/* Formerly .conflict, styled as an error. Two active builds in one bay is now a
   supported arrangement, so this reads as a neutral "shared" marker instead. */
.lc-bay.conflict{border-color:var(--timber);border-left:3px solid var(--timber);background:color-mix(in srgb,var(--timber) 7%,var(--card));opacity:1}
.lc-bay.drop-hover{border-color:var(--saw);border-style:dashed;background:color-mix(in srgb,var(--saw) 10%,var(--surface-2));opacity:1}

/* ---------- Crew (people) settings ---------- */
.crew-edit-list{display:flex;flex-direction:column;gap:9px;margin-bottom:12px;max-height:230px;overflow-y:auto;overflow-x:hidden;padding-right:2px}
.crew-filter{display:flex;align-items:center;gap:7px;margin-bottom:10px;font-family:var(--mono);font-size:8.5px;text-transform:uppercase;letter-spacing:.03em;color:var(--text-dim)}
/* Room for the native arrow so a long role name can't run underneath it. */
.crew-filter select{flex:1;min-width:0;background:var(--surface-2);border:1px solid var(--line-strong);border-radius:var(--radius);padding:6px 26px 6px 8px;font-size:12px;font-family:var(--body)}
.crew-filter select:focus{border-color:var(--saw);outline:none}
.crew-edit-row select.ce-role{background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);padding:7px 26px 7px 8px;font-size:12.5px;font-family:var(--body);min-width:0;width:100%}
.crew-edit-row select.ce-role:focus{border-color:var(--saw);outline:none}
.add-crew-row select.ac-role{background:var(--surface-2);border:1px solid var(--line-strong);border-radius:var(--radius);padding:8px 26px 8px 8px;font-size:12.5px;font-family:var(--body);min-width:0;width:100%}
.add-crew-row select.ac-role:focus{border-color:var(--saw);outline:none}
.crew-edit-row{display:grid;grid-template-columns:1fr 68px 24px;grid-template-areas:"name name del" "role hrs hrs";gap:6px 7px;align-items:center;padding:8px 9px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius)}
.crew-edit-row .ce-name{grid-area:name;font-weight:600}
.crew-edit-row .rm{grid-area:del;justify-self:center}
.crew-edit-row .ce-role{grid-area:role}
.crew-edit-row .ce-num{grid-area:hrs}
.crew-edit-row input{background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);padding:7px 9px;font-size:13px;min-width:0;width:100%}
.crew-edit-row input:focus{border-color:var(--saw);outline:none}
.ce-num{display:flex;align-items:center;gap:5px;font-family:var(--mono);font-size:8px;text-transform:uppercase;color:var(--text-dim);white-space:nowrap}
.ce-num input{width:100%;text-align:center}
/* Four columns (name, role, hrs, button) never fit the settings card, which is
   about 270px wide: it left ~57px each for the name input and the role select, so
   "Name…" rendered as "Nam" and the select's native arrow sat on top of its own
   text. Name now takes a full row of its own and the rest share the second row —
   the same two-row shape .crew-edit-row already uses. */
.add-crew-row{display:grid;grid-template-columns:1fr auto auto;grid-template-areas:"name name name" "role hrs btn";gap:7px;align-items:stretch}
.add-crew-row .ac-name{grid-area:name}
.add-crew-row .ac-role{grid-area:role}
.add-crew-row .btn{grid-area:btn}
.add-crew-row>input{width:100%}
.add-crew-row .btn{white-space:nowrap;align-self:stretch}

/* ---------- build modal: Crew assignment (drag lanes) ---------- */

/* ---------- build modal: Inspections (redesigned cards) ---------- */
.insp-list{display:flex;flex-direction:column;gap:12px}
.insp-card{border:1px solid var(--line-strong);border-radius:var(--radius);padding:14px;background:var(--surface-2)}
.insp-card.passed{border-left:3px solid var(--pine)}
.insp-card.failed{border-left:3px solid var(--clay)}
.insp-card-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px;flex-wrap:wrap}
.insp-name{font-size:13.5px;font-weight:700;color:var(--ink)}
.insp-opts{display:flex;gap:5px}
.insp-opt{background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);padding:5px 12px;font-size:11px;font-weight:600;color:var(--text-muted);cursor:pointer;font-family:inherit;transition:all .12s}
.insp-opt:hover{border-color:var(--saw)}
.insp-opt.on{color:#fff}
.insp-opt.on.passed{background:var(--pine);border-color:var(--pine)}
.insp-opt.on.failed{background:var(--clay);border-color:var(--clay)}
.insp-clear{color:var(--text-dim)}
.insp-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:12px}
.insp-fields .field{margin:0}
.insp-sub-label{font-family:var(--mono);font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-dim);font-weight:600;margin-bottom:6px}
.insp-photos-wrap{margin-bottom:12px}
.insp-drop{border:1.5px dashed var(--line-strong);border-radius:var(--radius);padding:12px;text-align:center;background:var(--card);transition:border-color .12s,background .12s}
.insp-drop.drag-over{border-color:var(--saw);background:color-mix(in srgb,var(--saw) 8%,var(--card))}
.insp-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(84px,1fr));gap:8px;margin-top:9px}
.insp-photo{position:relative;aspect-ratio:1;border-radius:var(--radius);overflow:hidden;border:1px solid var(--line-strong)}
.insp-photo img{width:100%;height:100%;object-fit:cover;display:block}
.insp-photo-x{position:absolute;top:3px;right:3px;width:18px;height:18px;border-radius:50%;background:rgba(31,42,51,.75);color:#fff;border:none;cursor:pointer;font-size:10px;line-height:1;display:flex;align-items:center;justify-content:center}
.insp-photo-x:hover{background:var(--clay)}
.mt-badge.fail{background:var(--clay)}
.mt-badge.ok{background:var(--pine)}

/* ---------- Dashboard: Labor Capacity ---------- */

/* ---------- Dashboard: What-If Scenario ---------- */

/* Crew card spans full settings width so its rows have room */

/* ---------- print size picker (screen) ---------- */

/* ---------- PRINT ----------
   Prints ONLY the target chart (Build Hours grid or Gantt), scaled to fill the
   sheet. Selectors below match the real DOM in index.html: <header>, nav.tabbar,
   .filterbar, main > section.view, .overlay. */
@media print{
  /* Nothing prints by default — we opt the target back in below. */
  body.printing > header,
  body.printing > nav.tabbar,
  body.printing > .filterbar,
  body.printing > .overlay{display:none !important}

  /* Only the view being printed is shown. */
  body.printing main > .view{display:none !important}
  body.printing.printing-hours main > #view-hours{display:block !important}
  body.printing.printing-gantt main > #view-gantt{display:block !important}

  /* Strip in-view chrome: titles, descriptions, filters, legends, buttons. */
  body.printing .hours-head,
  body.printing .hours-filters,
  body.printing .g-legend,
  body.printing [data-print],
  body.printing .col-resize,
  body.printing .bh-highlight-btn,
  body.printing .empty{display:none !important}

  /* Edge-to-edge on a clean white sheet (drop the kraft tint + grid texture). */
  html,body,body.printing{background:#fff !important;background-image:none !important;margin:0 !important;padding:0 !important;width:auto !important;height:auto !important;min-height:0 !important}
  body.printing main{margin:0 !important;padding:0 !important;max-width:none !important;background:none !important}
  body.printing main > .view{margin:0 !important;padding:0 !important;background:none !important}
  body.printing #hoursRoot,body.printing #ganttRoot{margin:0 !important;padding:0 !important;background:none !important}

  /* Release the on-screen scroll containers so everything prints. */
  body.printing .hours-grid-wrap,
  body.printing .g-wrap,
  body.printing .g-scroll{max-height:none !important;height:auto !important;overflow:visible !important;border:none !important;border-radius:0 !important}
  /* Print at full size — the on-screen 80% default would otherwise shrink the
     printed output as well, on top of the browser's own print scaling. */
  #ganttRoot,#hoursRoot{zoom:1 !important}

  /* --- Build Hours grid --- */
  body.printing-hours .hours-grid{font-size:7.5pt;border-collapse:collapse;width:100% !important;table-layout:auto}
  body.printing-hours .hours-grid thead{display:table-header-group}
  body.printing-hours .hours-grid tr{page-break-inside:avoid;break-inside:avoid}
  body.printing-hours .hours-grid th,
  body.printing-hours .hours-grid td{border:0.5pt solid #8a8a8a !important;padding:2.5pt 3pt;position:static !important;background:#fff !important;color:#000 !important;box-shadow:none !important;max-width:none !important;min-width:0 !important;width:auto !important}
  body.printing-hours .hours-grid th{font-size:6.5pt;font-weight:700;background:#ececec !important;white-space:normal;vertical-align:bottom}
  /* Stage columns are numerous and narrow — rotate their headers so each name
     reads as whole words instead of wrapping one letter per line. */
  body.printing-hours .hours-grid thead th.bh-stage{writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap !important;min-width:0 !important;width:auto !important;padding:3pt 1.5pt !important;height:78pt;text-align:left;vertical-align:middle}
  body.printing-hours .hours-grid thead th.bh-stage .th-label{white-space:nowrap !important;max-width:none;overflow:visible}
  body.printing-hours .hours-grid .bh-name{text-align:left;font-weight:600;white-space:normal}
  body.printing-hours .hours-grid .bh-sub{display:block;font-size:5.5pt;color:#555 !important}
  body.printing-hours .hours-grid .bh-input{border:none !important;background:transparent !important;font-size:7.5pt;width:100%;text-align:center;padding:0;color:#000 !important;-webkit-appearance:none;appearance:none}
  body.printing-hours .bh-totals-row td{font-weight:700;border-top:1pt solid #000 !important;background:#ececec !important}
  body.printing-hours .bh-avg-row td{font-weight:600;background:#f4f4f4 !important;color:#000 !important}
  body.printing-hours .bh-alt td{background:#f6f6f6 !important}

  /* --- Gantt --- */
  body.printing-gantt .g-inner{background:#fff !important}
  body.printing-gantt .g-row{page-break-inside:avoid;break-inside:avoid;border-bottom:0.5pt solid #b0b0b0 !important}
  body.printing-gantt .g-label,body.printing-gantt .g-label-sp{background:#fff !important;border-right:1pt solid #555 !important}
  body.printing-gantt .g-row:not(.group) .g-label{font-size:11px}
  body.printing-gantt .g-row.group .g-label{background:#ececec !important;font-size:12px}
  /* Faint on-screen gridlines are invisible on paper — darken them. */
  body.printing-gantt .g-gridline{border-left:0.5pt solid #c4c4c4 !important;background:none !important}
  body.printing-gantt .tick{border-left:0.5pt solid #9a9a9a !important}
  body.printing-gantt .tick span{color:#333 !important;font-size:10px}
  body.printing-gantt .g-bar,body.printing-gantt .bar{border:0.5pt solid #444 !important}
  body.printing-gantt .today{border-color:#c0392b !important}

  /* Preserve bar/status colors. */
  body.printing *{-webkit-print-color-adjust:exact !important;print-color-adjust:exact !important}
}

/* ---------- build modal: build-level inspection contact ---------- */
.insp-build-info{background:var(--surface-2);border:1px solid var(--line-strong);border-radius:var(--radius);padding:13px 14px;margin-bottom:14px}
.insb-title{font-family:var(--mono);font-size:9px;text-transform:uppercase;letter-spacing:.04em;color:var(--timber);font-weight:700;margin-bottom:10px}
.insp-build-info .insp-fields{margin-bottom:0}

/* ---------- Deployment modes: read-only banner + auth ---------- */
.mode-banner{background:var(--timber);color:#fff;font-family:var(--mono);font-size:10.5px;text-transform:uppercase;letter-spacing:.06em;text-align:center;padding:5px 10px;font-weight:700}
.mode-banner.warn{background:var(--clay)}

/* Hide every editing affordance for viewers. */
body.readonly #newBuildBtn,
body.readonly .add-row,
body.readonly .rm,
body.readonly .drag-handle,
body.readonly .col-resize,
body.readonly [data-del-line],
body.readonly [data-del-stage],
body.readonly [data-del-opt],
body.readonly [data-del-crew],
body.readonly [data-crew-remove],
body.readonly .insp-photo-x,
body.readonly .insp-drop,
body.readonly .attach-drop,
body.readonly .modal-foot .btn.danger,
body.readonly .tab[data-tab="settings"],
body.readonly .settings-actions,
body.readonly .bh-highlight-btn{display:none !important}

/* Dismiss controls stay fully usable in a read-only session. The generic
   `[data-locked]` styling below strips borders and backgrounds from locked fields;
   without this, a close button that slipped through would render as invisible
   furniture. Closing a dialog is not an edit. */
body.readonly [data-close-build],
body.readonly [data-close-picker],
body.readonly [data-cancel-draft],
body.readonly [data-close-modal],
body.readonly .modal-close{display:inline-flex !important;opacity:1 !important;cursor:pointer !important;pointer-events:auto !important}

/* Inputs stay visible (they carry the data) but read flat, not editable. */
body.readonly input[data-locked],
body.readonly textarea[data-locked],
body.readonly select[data-locked]{background:transparent !important;border-color:transparent !important;cursor:default;color:var(--ink)}
body.readonly .insp-opt[data-locked]{opacity:1}
body.readonly .g-bar,body.readonly .td-name{cursor:pointer}

.auth-box{display:flex;align-items:center;gap:9px;margin-right:10px}
.auth-box:empty{display:none}
.auth-box .btn{white-space:nowrap}
.auth-who{font-family:var(--mono);font-size:10px;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted)}
.auth-overlay{display:flex;align-items:center;justify-content:center}
.auth-modal{max-width:380px;width:92%}
.auth-err{color:var(--clay);font-size:12.5px;font-weight:600;padding:8px 10px;background:color-mix(in srgb,var(--clay) 8%,var(--card));border:1px solid var(--clay);border-radius:var(--radius)}

/* ---------- Admin: People & Access ---------- */

/* The panel is drawn light in both looks (known issue): its controls follow it, not the page. */
#peopleModal{color-scheme:light}
.admin-list{display:flex;flex-direction:column;gap:1px;background:var(--line);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;margin-top:12px}
.admin-row{display:flex;align-items:center;gap:10px;padding:9px 11px;background:var(--card);flex-wrap:wrap}
.admin-row.is-me{background:color-mix(in srgb,var(--timber) 5%,var(--card))}
.admin-who{flex:1 1 200px;min-width:0;display:flex;flex-direction:column;gap:2px}
.admin-email{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* The name (decision 0036): reads as the row's title, and is a field on hover and focus, so an admin types straight into it. */
.admin-name{font:inherit;font-size:14px;font-weight:700;color:inherit;background:transparent;border:1px solid transparent;border-radius:8px;padding:3px 7px;margin:-3px 0 0 -8px;width:min(100%,320px);min-height:30px}
.admin-name::placeholder{color:var(--text-muted);font-weight:600}
.admin-name:hover:not(:disabled){border-color:var(--line)}
.admin-name:focus{outline:none;border-color:var(--clay);background:var(--card);box-shadow:0 0 0 3px color-mix(in srgb,var(--clay) 18%,transparent)}
.admin-email.has-name{font-weight:500;color:var(--text-muted)}
.admin-you{font-family:var(--mono);font-size:9.5px;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);border:1px solid var(--line);border-radius:3px;padding:0 4px;margin-left:4px;font-weight:500}
.admin-meta{font-size:11px;color:var(--text-muted)}
.admin-role{font-size:12.5px;padding:4px 6px;min-width:96px}
.admin-plat{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--text-muted);cursor:pointer;flex-shrink:0;min-height:32px}
.admin-plat input{margin:0;width:15px;height:15px;accent-color:var(--timber)}
.admin-plat:has(input:checked){color:inherit;font-weight:600}
.admin-acts{display:flex;gap:6px;flex-shrink:0}
.admin-add{margin-top:14px;padding-top:13px;border-top:1px solid var(--line)}
.admin-add-title{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--text-muted);margin-bottom:8px}
.admin-add-fields{display:flex;gap:7px;flex-wrap:wrap}
.admin-add-fields input{flex:1 1 170px;min-width:0;padding:6px 9px;font-size:13px}
.admin-add-fields select{padding:6px 9px;font-size:13px}
.admin-add-hint{font-size:11.5px;color:var(--text-muted);line-height:1.5;margin-top:8px}
.admin-msg{font-size:12.5px;font-weight:600;padding:7px 10px;border-radius:var(--radius);margin-top:10px}
.admin-msg.info{background:color-mix(in srgb,var(--timber) 8%,var(--card));color:var(--ink)}
.admin-msg.ok{background:color-mix(in srgb,#157A6E 10%,var(--card));color:#0f5c53}
.admin-msg.err{background:color-mix(in srgb,var(--clay) 9%,var(--card));color:var(--clay)}
.admin-err{color:var(--clay);font-weight:600}
.admin-note{font-size:12px;line-height:1.55;color:var(--text-muted);background:color-mix(in srgb,var(--sand,#CE8214) 8%,var(--card));border:1px solid var(--line);border-radius:var(--radius);padding:9px 11px;margin-top:11px}

/* Viewers never reach Settings, but keep the panel out of read-only mode entirely. */
body.readonly #adminPeopleRoot{display:none !important}

/* Longer app name needs to survive narrow screens without crowding the header. */
@media (max-width:720px){
  .brand{flex-wrap:wrap;gap:0 8px}
  .brand h1{font-size:19px}
  .brand .sub{font-size:9.5px}
}
@media (max-width:420px){
  .brand h1{font-size:17px;letter-spacing:0}
}

/* A stored file that could not be signed (deleted from the bucket, or expired
   permissions) — show it as visibly missing rather than a broken-image icon. */
.insp-photo img.signed-missing{opacity:.4;background:repeating-linear-gradient(45deg,var(--line) 0 6px,transparent 6px 12px)}
.insp-photo img[data-signed-done="pending"]{opacity:.5}

/* ---------- People & Access: Settings card summary ---------- */

/* ---------- People & Access: modal ---------- */
#peopleModal{max-width:720px}
.admin-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.admin-toolbar .search{flex:1 1 auto;min-width:0}
.admin-showing{font-family:var(--mono);font-size:10.5px;letter-spacing:.05em;text-transform:uppercase;color:var(--text-muted);white-space:nowrap}
#peopleModal .admin-list{max-height:46vh;overflow-y:auto;margin-top:0}
.admin-foot-note{font-size:11.5px;color:var(--text-muted);margin-right:auto}
.modal-foot{display:flex;align-items:center;gap:10px}

/* Credential status tones */
.admin-st-ok{color:var(--text-muted)}
.admin-st-warn{color:#8a6410;font-weight:600}
.admin-st-bad{color:var(--clay);font-weight:700}

/* ---------- Settings: collapsible tiles ---------- */
.settings-card[data-tile] > .settings-card-body{display:none}
.settings-card[data-tile].tile-open > .settings-card-body{display:block}

.tile-head{display:flex;align-items:center;gap:10px;cursor:pointer;user-select:none;outline:none}
.tile-head h3{margin:0;flex:1 1 auto}
.tile-head:focus-visible{outline:2px solid var(--timber);outline-offset:3px;border-radius:4px}
.tile-chevron{font-size:19px;line-height:1;color:var(--text-muted);transition:transform .15s ease;flex-shrink:0}
.settings-card.tile-open > .tile-head .tile-chevron{transform:rotate(90deg)}

/* People & Access: the whole card is the control, so it never expands in place */
.tile-clickable{cursor:pointer;transition:border-color .12s ease,background .12s ease}
.tile-clickable:hover{border-color:var(--timber)}
.tile-clickable:focus-visible{outline:2px solid var(--timber);outline-offset:2px}
.tile-clickable .tile-head{cursor:pointer}
.tile-sub{font-size:13px;font-weight:600;margin-top:8px}
.tile-note{font-size:11.5px;color:var(--text-muted);margin-top:2px}

/* ---------- Gantt: freeze the date header ----------
   position:sticky resolves against the nearest scroll container, so the header
   can only freeze if the element that scrolls vertically is .g-scroll itself.
   Previously the page scrolled and .g-scroll only scrolled horizontally, which
   is why top:0 had nothing to stick to. Giving the chart its own viewport makes
   it behave like a spreadsheet: header frozen on top, labels frozen at left
   (.g-label already handles that axis). */
.g-scroll{overflow:auto;max-height:calc((100vh - 300px) / var(--tab-zoom));min-height:calc(300px / var(--tab-zoom))}
.g-head{position:sticky;top:0;z-index:7;background:var(--card)}
.g-head .ticks{background:var(--card)}

@media (max-width:900px){
  .g-scroll{max-height:calc((100vh - 260px) / var(--tab-zoom));min-height:calc(260px / var(--tab-zoom))}
}

/* Printing lays the whole chart out flat, so nothing should be pinned. */
@media print{
  .g-scroll{max-height:none !important;min-height:0 !important;overflow:visible !important}
  .g-head{position:static !important}
}
body.printing .g-head{position:static !important}
body.printing .g-scroll{max-height:none !important;min-height:0 !important}

/* The removed paper-size picker carried margin-left:auto, which pushed the Print
   button to the right of the legend. Keep that alignment on the button itself. */
.g-legend [data-print]{margin-left:auto}

/* ---------- Settings: consolidated Export card ---------- */
.export-row{display:flex;gap:8px;margin-top:11px;flex-wrap:wrap}
.export-row select{flex:1 1 190px;min-width:0;padding:6px 9px;font-size:13px}

/* ---------- Gantt: out-of-window note (print only) ---------- */
.g-print-note{display:none}
@media print{
  body.printing-gantt .g-print-note{display:block;margin-top:8pt;font-size:8pt;line-height:1.45;color:#000}
}

/* ---------- Shop Overview printing ---------- */
@media print{
  body.printing.printing-shop main > #view-shop{display:block !important}
  body.printing-shop .panel-sub{display:none !important}
}

/* ---------- Build Hours: wrapped names, uniform rows ---------- */
/* Numeric cells stay on one line; only the Build column wraps. The inner span
   is clamped to two lines so a long name can't make one row taller than the
   rest — table cells ignore overflow, so the clamp has to live on the span. */
.hours-grid tbody tr{height:52px}
.hours-grid tbody td{height:52px;vertical-align:middle}
.bh-name-text{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;
  overflow:hidden;white-space:normal;overflow-wrap:anywhere;line-height:1.22}
.bh-name .bh-sub{display:block;font-weight:500;font-size:10.5px;line-height:1.2}

/* ---------- Shop Overview printing ---------- */
@media print{
  /* Browsers strip background colours in print by default, which is why the
     empty bays vanished — their fill and the occupied bays' status colours are
     both backgrounds. Force exact colour reproduction for the map. */
  body.printing-shop .shop-map,
  body.printing-shop .shop-bay{-webkit-print-color-adjust:exact !important;print-color-adjust:exact !important}

  /* Empty bays: solid, dark, unmistakably present on paper. */
  body.printing-shop .shop-bay.empty{background:#fff !important;border:1.2pt dashed #333 !important;box-shadow:none !important}
  body.printing-shop .shop-bay.empty .shop-bay-num{color:#000 !important}
  body.printing-shop .shop-bay.empty .shop-bay-open{color:#444 !important}
  body.printing-shop .shop-bay.occupied{color:#fff !important;box-shadow:none !important}
  body.printing-shop .shop-bay{transition:none !important}

  /* Fill the sheet: the map is width:100% with a fixed aspect ratio, so lifting
     the on-screen height caps is all it takes. */
  body.printing-shop .shop-map{width:100% !important;max-width:none !important;max-height:none !important}
  body.printing-shop .rep-title{font-size:12pt !important;margin:0 !important}
}

/* A build whose saved dates cannot be read. Named in the row so it can be found and fixed. */
.g-bad-date{color:var(--rust);font-weight:600;cursor:help}

/* ---------- Board: fit all five status columns on screen ----------
   Adding Shipped made five fixed 306px columns (~1,600px) — wider than a laptop, so
   the last column sat off the right edge. Columns now share the available width
   equally, with a floor so cards stay readable; below that floor (~1,200px of board)
   the board scrolls sideways exactly as before. */
.board .b-col{flex:1 1 0;min-width:220px}

/* ---------- Staging marker ----------
   Shown when the app is using the staging (test) database.
   * The banner is positioned above the full-screen sign-in wall (z-index 99999) so
     it shows before sign-in. Inside the app it scrolls away like the page.
   * The header and the tab bar (the part that stays in view while scrolling) keep a
     red stripe along their top edge, and the tab title reads [TEST], so staging stays
     obvious at any scroll position. A pinned banner was avoided on purpose: header
     and tab bar are already sticky (top 0 / 66px in theme-c.css) and would have been
     partly covered. */
.mode-banner.staging{position:relative;z-index:100000;background:#B42318;color:#fff}
html.staging header,html.staging nav.tabbar{box-shadow:inset 0 4px 0 #B42318}

/* ---------- Production revamp phase 3b (2026-10-12): the firm schedule on the Gantt, Board and Dashboard ---------- */
/* Gantt: the part of the forecast finished in the lot after the build leaves the line — the
   bar's own colour, hatched, so "on the line" and "in the lot" read as one build. */
.g-bar-lot{position:absolute;top:calc((var(--g-row-h) - var(--g-bar-h)) / 2);height:var(--g-bar-h);border-radius:0 3px 3px 0;
  background:repeating-linear-gradient(45deg,var(--lot),var(--lot) 4px,color-mix(in srgb,var(--lot) 30%,var(--card)) 4px,color-mix(in srgb,var(--lot) 30%,var(--card)) 8px);
  border:1px solid rgba(0,0,0,.18);border-left:0;cursor:pointer}
/* Booth and Trailer weeks: a short strip just above the bar. */
.g-stop{position:absolute;top:calc((var(--g-row-h) - var(--g-bar-h)) / 2 - 7px);height:5px;border-radius:2px;z-index:2}
.g-stop.booth{background:var(--clay)}
.g-stop.trailer{background:var(--timber)}
.g-legend .lg i.lot{background:repeating-linear-gradient(45deg,var(--teal),var(--teal) 3px,var(--surface-2) 3px,var(--surface-2) 6px)}
.g-legend .lg i.stop{height:5px;border-radius:2px}
.g-legend .lg i.stop.booth{background:var(--clay)}
.g-legend .lg i.stop.trailer{background:var(--timber)}
.g-legend .lg i.upd-stale{width:8px;height:8px;border-radius:50%;background:var(--amber)}
/* Last updated: plain text; amber with a dot when not updated since the last move day. */
.g-upd.stale{color:var(--amber);font-weight:600}
.g-upd.stale::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--amber);margin-right:4px;vertical-align:middle}
/* Board timeline: the plan's line exit. */
/* Dashboard: what's coming onto each line, and the booth. */
/* Dashboard: labor outlook, one row per week. */
.labor-weeks{display:flex;flex-direction:column;gap:4px;margin-top:10px}
.lw-row{display:grid;grid-template-columns:56px minmax(80px,1fr) 104px minmax(0,1.4fr);gap:10px;align-items:center;font-size:11.5px}
.lw-week{font-family:var(--mono);font-size:10.5px;color:var(--text-muted)}
.lw-track{position:relative;height:10px;background:var(--surface-3);border-radius:5px}
.lw-plan{position:absolute;left:0;top:0;height:100%;border-radius:5px;background:var(--teal)}
.lw-row.over .lw-plan{background:var(--rust)}
.lw-supply{position:absolute;top:-3px;width:0;height:16px;border-left:2px solid var(--ink)}
.lw-num{font-family:var(--mono);font-size:10.5px;text-align:right;color:var(--text-muted)}
.lw-row.over .lw-num{color:var(--rust);font-weight:600}
.lw-top{color:var(--text-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@media (max-width:700px){.lw-row{grid-template-columns:48px 1fr 92px}.lw-top{grid-column:2/-1}}
.data-table .badge{white-space:nowrap}
/* Reports → WIP month-end close (2026-10-12). */
.wip-meta{font-size:12.5px;color:var(--text-muted);margin:2px 0 8px;line-height:1.5}
.wip-table-wrap{overflow-x:auto;margin-top:8px}
.wip-table .wip-num{font-variant-numeric:tabular-nums;white-space:nowrap}
.wip-flags{min-width:160px}
.wip-flag{display:inline-block;margin:1px 4px 1px 0;padding:1px 7px;border-radius:999px;font-size:11px;line-height:1.5;background:var(--surface-3);color:var(--text-muted)}
.wip-flag-stale,.wip-flag-negative,.wip-flag-no-standard,.wip-flag-complete-not-100,.wip-flag-not-active,.wip-flag-removed{background:color-mix(in srgb,var(--amber) 18%,transparent);color:var(--ink)}
.wip-flag-leaves-wip{background:color-mix(in srgb,var(--teal) 18%,transparent);color:var(--ink)}
.wip-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:12px}
.wip-reason{flex:1 1 220px;min-width:0;padding:6px 8px;border:1px solid var(--line-strong);border-radius:4px;font:inherit;font-size:12.5px}
.wip-reason.plan-need{border-color:var(--rust)}
.wip-msg{margin-top:8px;font-size:12.5px;color:var(--rust);min-height:0}
.wip-ok{margin:6px 0;font-size:12.5px;color:var(--pine)}
@media (max-width:600px){.wip-table th:nth-child(2),.wip-table td:nth-child(2){display:none}.wip-table td,.wip-table th{padding-left:6px;padding-right:6px}}

/* ==========================================================================
   from wrb-design-system.css
   ========================================================================== */
/* ============================================================================
   WIND RIVER BUILT — DESIGN SYSTEM  v1.0
   Product-agnostic. This file knows nothing about Production Planner, the CRM,
   or any other module, and it must stay that way.

   USE IT
     <link rel="stylesheet" href="wrb-design-system.css">
     <link rel="stylesheet" href="your-product-theme.css">   <!-- maps + applies -->

   WHAT BELONGS HERE
     Brand tokens, typography, brand motifs, and primitives that any Wind River
     product would want. If a rule mentions a class that exists in only one
     product, it belongs in that product's theme file instead.

   COLORS were sampled programmatically from WRB_Icon_Stacked_Color.png.
   Do not eyeball replacements — resample.
   ============================================================================ */

/* (font @import moved to the top of ui/base.css) */
:root{

  /* -- BRAND CORE ------------------------------------------------------- */
  --wrb-charcoal:#39393A;      /* the logo's own dark; use for chrome        */
  --wrb-charcoal-deep:#2E2E2F;
  --wrb-clay:#9B6344;          /* primary accent                             */
  --wrb-clay-deep:#7E4F35;
  --wrb-sage:#848777;          /* secondary accent                           */

  /* -- SURFACES --------------------------------------------------------- */
  --wrb-white:#FFFFFF;
  --wrb-bone:#FAF8F5;          /* app background                             */
  --wrb-bone-2:#F2EEE8;        /* wells, table heads, alt rows               */
  --wrb-bone-3:#E9E3DA;

  /* -- TEXT ------------------------------------------------------------- */
  --wrb-ink:#2B2B2C;
  --wrb-ink-soft:#6A6259;
  --wrb-ink-faint:#8E877E;

  /* -- RULES ------------------------------------------------------------ */
  --wrb-rule:#E3DDD4;
  --wrb-rule-strong:#CFC7BB;

  /* -- STATUS ----------------------------------------------------------- *
   * These must stay clearly distinguishable from one another at a glance.
   * An early draft tinted them all toward the warm brand neutrals and they
   * became nearly identical on screen. Legibility outranks palette purity —
   * do not re-tint these warm.                                             */
  --wrb-ok:#4F7C46;            /* green  — on track / healthy               */
  --wrb-warn:#B08637;          /* ochre  — at risk / needs attention        */
  --wrb-bad:#9B4A33;           /* clay   — late / failed                    */
  --wrb-info:#3E6C8C;          /* blue   — shipped / complete / neutral info */
  --wrb-idle:#8A7B6A;          /* warm gray — inactive / archived           */


  /* -- INTERACTION STATES ----------------------------------------------- */
  --wrb-focus:#9B6344;                       /* focus ring core            */
  --wrb-focus-ring:rgba(155,99,68,.32);      /* focus ring halo            */
  --wrb-disabled-opacity:.45;
  --wrb-hover-tint:rgba(57,57,58,.035);      /* row / card hover           */
  --wrb-active-tint:rgba(57,57,58,.07);      /* pressed                    */
  --wrb-readonly-tint:rgba(132,135,119,.10); /* viewer mode wash (sage)    */

  /* -- TYPE ------------------------------------------------------------- */
  --wrb-font:'Figtree',system-ui,-apple-system,sans-serif;
  --wrb-weight-body:400;
  --wrb-weight-medium:500;
  --wrb-weight-bold:700;
  --wrb-weight-display:800;

  /* Label tracking. The wide letterspaced caps treatment is lifted from
     windriverbuilt.com and is the most portable piece of the brand's voice. */
  --wrb-track-label:.15em;
  --wrb-track-eyebrow:.20em;

  /* -- SHAPE ------------------------------------------------------------ *
   * The logo is built from hard angles. Corners stay tight everywhere.     */
  --wrb-radius:2px;
  --wrb-radius-lg:3px;

  /* -- SPACING ---------------------------------------------------------- */
  --wrb-space-1:4px;  --wrb-space-2:8px;  --wrb-space-3:12px;
  --wrb-space-4:16px; --wrb-space-5:24px; --wrb-space-6:32px;

  /* -- BRAND MOTIFS ----------------------------------------------------- *
   * Exposed as custom properties so any product can apply them to its own
   * classes without copying SVG around. See §4 for how to use them.        */

  /* Roofline: the peak from the logo, as a clip-path for a pitched edge. */
  --wrb-roofline-clip:polygon(0 0, 100% 0, 100% 0, 58% 100%, 33% 38%, 0 0);

  /* Elevation line-art: module profiles. Three sizes, same drawing family. */
  --wrb-elevation-wide:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='240' height='78' fill='none' stroke='%239B6344' stroke-width='1.4' stroke-linejoin='round'>\
<path d='M3 74V38l30-17 30 17v36'/><path d='M17 74V54h12v20'/><path d='M43 51h12v11H43z'/>\
<path d='M84 74V34h42v40'/><path d='M84 34l21-13 21 13'/><path d='M97 74V53h11v21'/><path d='M114 50h9v10h-9z'/>\
<path d='M146 74V28l39-17 39 17v46'/><path d='M164 74V48h17v26'/><path d='M193 45h15v13h-15z'/>\
<path d='M0 74h240' stroke-width='1.6'/></svg>");

  --wrb-elevation-pair:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='150' height='64' fill='none' stroke='%239B6344' stroke-width='1.5' stroke-linejoin='round'>\
<path d='M4 60V30l28-15 28 15v30'/><path d='M18 60V44h13v16'/><path d='M42 38h11v11H42z'/>\
<path d='M84 60V24l30-16 30 16v36'/><path d='M100 60V42h15v18'/><path d='M124 34h12v12h-12z'/>\
<path d='M0 60h150' stroke-width='1.7'/></svg>");

  --wrb-elevation-single:url("data:image/svg+xml;utf8,\
<svg xmlns='http://www.w3.org/2000/svg' width='56' height='30' fill='none' stroke='%239B6344' stroke-width='1.5' stroke-linejoin='round'>\
<path d='M3 27V13L20 4l17 9v14'/><path d='M13 27v-9h8v9'/><path d='M0 27h56' stroke-width='1.7'/></svg>");
}

/* ============================================================================
   2. BASE
   ============================================================================ */

/* Tabular figures everywhere. The brand has no monospace face, so numeric
   columns get their alignment from Figtree's tabular numerals rather than by
   importing a typeface that isn't ours. */
body, table, input, select, textarea, button{
  font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1;
}

/* ============================================================================
   3. PRIMITIVES — generic classes any product can use directly
   ============================================================================ */

/* -- Eyebrow: small caps label above a heading ---------------------------- */

/* -- Label: caps used for nav, table heads, buttons ----------------------- */

/* -- Display heading. Brand voice ends these with a period ---------------- */

/* -- Stat: big number over an italic label (as used on windriverbuilt.com) - */

/* -- Status tag ----------------------------------------------------------- */

/* -- Button --------------------------------------------------------------- */

/* ============================================================================
   4. BRAND MOTIFS — apply these to your product's own elements
   ============================================================================ */

/* -- Roofline pitch ------------------------------------------------------- *
 * Put .wrb-roofline on any element that should have a pitched bottom edge,
 * or copy this rule onto your own class:
 *
 *   .my-navbar::after{ ...same as below... }
 */

/* -- Dimension line ------------------------------------------------------- *
 * A progress track drawn the way a measured length is drawn on a shop
 * drawing: squared rail, upright ticks at both ends, hard terminal tick
 * where the fill stops.
 *   <div class="wrb-dim"><div class="wrb-dim__fill" style="width:44%"></div></div>
 */

/* -- Elevation art -------------------------------------------------------- *
 * Decorative only. Wrapped in @media screen so it never reaches paper.
 */


/* ============================================================================
   6. INTERACTION STATES
   Applies to every product. Any module inheriting this file gets consistent
   focus, disabled, hover and read-only behaviour for free.
   ============================================================================ */

/* -- FOCUS ---------------------------------------------------------------- *
 * Deliberately implemented with box-shadow rather than outline.
 *
 * Products commonly carry legacy rules like `.field input:focus{outline:none}`
 * at a specificity a generic override cannot beat. Those rules do not touch
 * box-shadow, so a ring drawn this way lands regardless of specificity — no
 * cascade fight, and no need to edit the legacy stylesheet.
 *
 * :focus-visible (not :focus) means the ring appears for keyboard navigation
 * but not on mouse click, which is the behaviour people expect.
 * ------------------------------------------------------------------------- */
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible,
[tabindex]:focus-visible,
[contenteditable]:focus-visible{
  box-shadow:0 0 0 3px var(--wrb-focus-ring);
  border-color:var(--wrb-focus);
  position:relative;
  z-index:2;                 /* keep the ring above neighbouring rows */
}

/* Elements that had their outline stripped entirely still need an indicator. */
[role="button"]:focus-visible{
  box-shadow:0 0 0 3px var(--wrb-focus-ring);
}

/* -- DISABLED -------------------------------------------------------------- *
 * A disabled control must be obviously inert — not merely faded. Cursor,
 * saturation and background all change so the state reads without guessing.
 * ------------------------------------------------------------------------- */
input:disabled,
select:disabled,
textarea:disabled,
button:disabled,
input[readonly],
textarea[readonly]{
  opacity:var(--wrb-disabled-opacity);
  cursor:not-allowed;
  background:var(--wrb-bone-2);
  color:var(--wrb-ink-faint);
  filter:saturate(.4);
  box-shadow:none;
}
button:disabled{ filter:saturate(.25) }

/* Never show a hover affordance on something that cannot be used. */
button:disabled:hover,
input:disabled:hover,
select:disabled:hover{ background:var(--wrb-bone-2) }

/* -- HOVER / ACTIVE -------------------------------------------------------- */

/* -- READ-ONLY MODE -------------------------------------------------------- *
 * Products with a viewer tier should mark the body (e.g. body.readonly).
 * Controls that cannot be used are muted rather than removed, so the layout
 * stays stable and viewers still understand what the tool does.
 * ------------------------------------------------------------------------- */

/* -- MOTION ---------------------------------------------------------------- */
input,
select,
textarea{
  transition:box-shadow .12s ease, border-color .12s ease, background .12s ease;
}

/* Respect users who have asked for reduced motion. */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{
    animation-duration:.01ms !important;
    animation-iteration-count:1 !important;
    transition-duration:.01ms !important;
    scroll-behavior:auto !important;
  }
}

/* ============================================================================
   5. PRINT
   The brand's decorative layer has no business on a shop-floor printout.
   Products should keep their own @media print rules untouched by theming.
   ============================================================================ */

/* ==========================================================================
   from planner-theme.css
   ========================================================================== */
/* ============================================================================
   PRODUCTION PLANNER — product theme
   Requires wrb-design-system.css to be loaded FIRST.

   In index.html, after styles.css:
     <link rel="stylesheet" href="wrb-design-system.css">
     <link rel="stylesheet" href="planner-theme.css">

   To revert the entire redesign, delete both lines. Nothing else to undo.

   THIS FILE DOES TWO JOBS
     1. Maps Planner's legacy token names onto design-system tokens, so the
        existing 398 var() references in styles.css pick up the brand
        automatically without any of them being edited.
     2. Applies brand treatments to Planner-specific classes (.tabbar, .brand,
        .mtl-track, .b-id and so on) that the design system must not know about.

   Anything added here that is NOT Planner-specific belongs upstream in
   wrb-design-system.css instead.
   ============================================================================ */

/* ---------------------------------------------------------------------------
   1. LEGACY TOKEN MAP
   styles.css speaks an older vocabulary — paper, saw, pine, timber. Rather
   than rewrite 398 references, those names are re-pointed at design-system
   tokens here. New work should use the --wrb-* names directly.
   --------------------------------------------------------------------------- */
:root{
  --paper:var(--wrb-bone);
  --paper-2:var(--wrb-bone-2);
  --card:var(--wrb-white);
  --surface-3:var(--wrb-bone-3);

  --ink:var(--wrb-ink);
  --ink-soft:var(--wrb-ink-soft);
  --ink-faint:var(--wrb-ink-faint);

  --line:var(--wrb-rule);
  --line-strong:var(--wrb-rule-strong);

  --saw:var(--wrb-clay);            /* was saw-orange; now brand clay */
  --saw-deep:var(--wrb-clay-deep);

  --pine:var(--wrb-ok);             /* on track  */
  --amber:var(--wrb-warn);          /* at risk   */
  --clay:var(--wrb-bad);            /* late      */
  --shipped:var(--wrb-info);        /* shipped   */
  --teal:var(--wrb-ok);             /* on-track fallback used in app.js */
  --timber:var(--wrb-idle);

  --radius:var(--wrb-radius-lg);

  --display:var(--wrb-font);
  --body:var(--wrb-font);
  --mono:var(--wrb-font);           /* brand has no mono; tabular figures instead */
}

/* ---------------------------------------------------------------------------
   2. HEADER — white bar so the full-colour logo sits on its own ground
   Logo is applied as a background-image, so index.html needs no markup change.
   Requires: assets/wrb-logo.png
   --------------------------------------------------------------------------- */
header{ background:var(--wrb-white); border-bottom:1px solid var(--wrb-rule) }

.brand{ align-items:center; gap:14px; padding-left:0 }
.brand::before{
  content:'';
  display:block;
  width:96px; height:38px;
  flex:none;
  background:url('../assets/wrb-logo.png') left center / contain no-repeat;
}
.brand h1{
  font-family:var(--wrb-font);
  font-weight:var(--wrb-weight-display);
  font-size:17px;
  letter-spacing:var(--wrb-track-label);
  text-transform:uppercase;
  color:var(--wrb-ink-faint);
  border-left:1px solid var(--wrb-rule);
  padding-left:14px;
}
.brand .sub{ display:none }   /* the logo already reads "Wind River Built" */

/* ---------------------------------------------------------------------------
   3. TABBAR — charcoal chrome, caps-and-rule treatment, roofline pitch
   --------------------------------------------------------------------------- */
.tabbar{
  background:var(--wrb-charcoal);
  border-bottom:0;
  padding:0 26px;
  position:relative;
}
.tabbar .tab{
  background:transparent;
  border:0;
  color:#A9A49C;
  font-family:var(--wrb-font);
  font-size:10.5px;
  font-weight:var(--wrb-weight-bold);
  letter-spacing:var(--wrb-track-label);
  text-transform:uppercase;
  padding:14px 0 12px;
  margin-right:28px;
  position:relative;
  cursor:pointer;
}
.tabbar .tab:last-child{ margin-right:0 }
.tabbar .tab:hover{ color:#D6D2CB }
.tabbar .tab.active{ color:#fff }
.tabbar .tab.active::after{
  content:'';
  position:absolute; left:0; right:0; bottom:0;
  height:2px;
  background:var(--wrb-clay);
}

/* roofline pitch — motif from the design system, applied to Planner's nav */
.tabbar::after{
  content:'';
  position:absolute;
  left:0; right:0; bottom:-14px;
  height:14px;
  background:var(--wrb-charcoal);
  clip-path:var(--wrb-roofline-clip);
  pointer-events:none;
  z-index:1;
}

/* ---------------------------------------------------------------------------
   4. BUTTONS / TABLE HEADS / HEADINGS
   --------------------------------------------------------------------------- */
.btn{
  font-family:var(--wrb-font);
  font-size:10.5px;
  font-weight:var(--wrb-weight-bold);
  letter-spacing:.13em;
  text-transform:uppercase;
  border-radius:var(--wrb-radius);
}
.btn.primary{ background:var(--wrb-clay); border-color:var(--wrb-clay); color:#fff }
.btn.primary:hover{ background:var(--wrb-clay-deep); border-color:var(--wrb-clay-deep) }

table th{
  font-family:var(--wrb-font);
  font-size:9.5px;
  font-weight:var(--wrb-weight-bold);
  letter-spacing:var(--wrb-track-label);
  text-transform:uppercase;
  color:var(--wrb-ink-faint);
  background:var(--wrb-bone-2);
}

.card > h2, .panel > h2, section.view > h2{
  font-family:var(--wrb-font);
  font-weight:var(--wrb-weight-display);
  letter-spacing:-.015em;
  text-transform:none;
  color:var(--wrb-ink);
}

/* Module type label. .b-id was styled for a generated ID; it now holds a
   word ("Modular"), so it reads as a label rather than a code. */
.b-id{
  font-family:var(--wrb-font);
  font-size:9.5px;
  font-weight:var(--wrb-weight-bold);
  letter-spacing:.13em;
  text-transform:uppercase;
  color:var(--wrb-ink-faint);
}

/* Admin panel — the few colours that escaped Planner's token system */
.admin-msg.ok{ background:color-mix(in srgb, var(--wrb-sage) 14%, var(--wrb-white)); color:#4F5346 }
.admin-st-warn{ color:#8A6529 }

/* ===========================================================================
   5. DECORATIVE LAYER
   Screen only. Printed travelers, Gantt and Build Hours exports are untouched.
   =========================================================================== */
@media screen{

/* -- Elevation watermark behind the filter bar -------------------------- */
.filterbar{ position:relative; background:var(--wrb-white); border-bottom:1px solid var(--wrb-rule); overflow:hidden }
.filterbar::after{
  content:'';
  position:absolute;
  right:18px; bottom:-8px;
  width:240px; height:78px;
  opacity:.14;
  pointer-events:none;
  background:var(--wrb-elevation-wide) right bottom / contain no-repeat;
}
.filterbar > *{ position:relative; z-index:1 }

/* -- Mini timeline as a dimension line ---------------------------------- *
 * Planner's own markup (.mtl-track / .mtl-bar) receives the design system's
 * dimension-line treatment. The existing today-marker and target flag are
 * left alone and now read as drafting annotations.                        */
.mtl-track{
  border-radius:0;
  height:5px;
  background:var(--wrb-bone-2);
  border-left:1px solid var(--wrb-rule-strong);
  border-right:1px solid var(--wrb-rule-strong);
}
.mtl-track::before,
.mtl-track::after{
  content:'';
  position:absolute;
  top:-4px;
  width:1px; height:13px;
  background:var(--wrb-rule-strong);
  pointer-events:none;
}
.mtl-track::before{ left:-1px }
.mtl-track::after { right:-1px }

.mtl-bar{ border-radius:0 }
.mtl-bar::after{
  content:'';
  position:absolute;
  right:-1px; top:-4px;
  width:1px; height:13px;
  background:var(--wrb-ink);
  opacity:.55;
}

.mtl-dates{
  font-family:var(--wrb-font);
  font-size:8.5px;
  letter-spacing:.06em;
  text-transform:uppercase;
}

/* -- Empty states -------------------------------------------------------- */
.empty{
  font-family:var(--wrb-font);
  font-size:13px;
  border:1px dashed var(--wrb-rule-strong);
  border-radius:var(--wrb-radius);
  padding:38px 44px 40px;
}
.empty::before{
  content:'';
  display:block;
  width:150px; height:64px;
  margin:0 auto 16px;
  opacity:.42;
  background:var(--wrb-elevation-pair) center / contain no-repeat;
}

.b-empty{
  font-family:var(--wrb-font);
  font-style:italic;
  font-size:11.5px;
  padding:22px 16px;
}
.b-empty::before{
  content:'';
  display:block;
  width:56px; height:30px;
  margin:0 auto 9px;
  opacity:.34;
  background:var(--wrb-elevation-single) center / contain no-repeat;
}

} /* end @media screen */

/* ===========================================================================
   6. INTERACTION STATES — Planner-specific application
   The generic focus / disabled / motion rules live in wrb-design-system.css.
   Only Planner's own hooks are handled here.
   =========================================================================== */

/* -- Locked controls (viewer tier) ---------------------------------------- *
 * readonly.js sets `disabled` or `readOnly` on controls and tags each one
 * with data-locked. Using the app's own hook keeps this consistent with
 * however readonly.js evolves, rather than duplicating its logic in CSS.
 *
 * Note: Planner HIDES editing affordances outright for viewers (see the
 * body.readonly block in styles.css). That is deliberate and left alone —
 * this rule only covers controls that remain visible but are inert.
 * ------------------------------------------------------------------------- */
[data-locked]{
  cursor:default;
  background:var(--wrb-bone-2);
  color:var(--wrb-ink-faint);
  border-color:var(--wrb-rule);
  box-shadow:none;
}
[data-locked]:hover{ background:var(--wrb-bone-2) }

/* -- Focus ring contrast --------------------------------------------------- *
 * .tile-head already had a :focus-visible outline, but drew it in --timber
 * (warm gray) which is low contrast against the bone surface. Repointed at
 * the focus colour so keyboard position is actually visible.
 * ------------------------------------------------------------------------- */
.tile-head:focus-visible{
  outline:2px solid var(--wrb-focus);
  outline-offset:3px;
  border-radius:var(--wrb-radius);
}

/* -- Row and card hover ---------------------------------------------------- *
 * Dense tables need a clear "which row am I on" cue, especially at 54 builds.
 * ------------------------------------------------------------------------- */
tbody tr:hover > td{ background:var(--wrb-hover-tint) }

/* -- Frozen cells must stay opaque under that tint ------------------------- *
 * --wrb-hover-tint is rgba(57,57,58,.035) — 96.5% transparent. That is fine
 * for an ordinary cell sitting on the page background, but it is destructive
 * for a `position:sticky` cell: the rule above REPLACES the frozen Build
 * column's opaque background, so the horizontally-scrolled stage-hour columns
 * underneath show straight through it on hover. Same for the sticky totals row.
 *
 * Fix: re-apply the identical tint composited over each cell's own opaque base
 * rather than replacing it. Selectors are deliberately specific enough to beat
 * both the rule above and `.hours-grid tbody tr.bh-alt .bh-name` in styles.css.
 * ------------------------------------------------------------------------- */
.hours-grid tbody tr:hover > .bh-name{
  background:color-mix(in srgb, var(--wrb-ink) 3.5%, var(--card));
}
.hours-grid tbody tr.bh-alt:hover > .bh-name{
  background:color-mix(in srgb, var(--wrb-ink) 3.5%, var(--paper-2));
}
.hours-grid tbody tr.bh-totals-row:hover > td,
.hours-grid tbody tr.bh-avg-row:hover > td{
  background:color-mix(in srgb, var(--wrb-ink) 3.5%, var(--paper-2));
}

.b-card{ transition:box-shadow .12s ease, border-color .12s ease }
.b-card:hover{
  border-color:var(--wrb-rule-strong);
  box-shadow:0 2px 6px rgba(57,57,58,.09);
}
.b-card:active{ box-shadow:0 1px 2px rgba(57,57,58,.12) }

/* Gantt bars and clickable names already show a pointer; give them a hover
   cue that does not rely on colour alone. */
.g-bar:hover{ filter:brightness(1.06); box-shadow:0 2px 5px rgba(57,57,58,.18) }
.td-name[data-open]:hover{ text-decoration:underline; text-underline-offset:2px }

/* ===========================================================================
   SHOP OVERVIEW — bay boundary contrast
   ===========================================================================
   The theme owns no .shop-* geometry; bay position and width are
   absolutely-positioned percentages computed in app.js, so no stylesheet can
   change their size. What the palette CAN change is whether a bay's edges are
   legible, and that regressed.

   .shop-bay.empty marks the divider between open bays with a 2px dashed border
   in --line-strong. Measured contrast against the fill it sits on:

     old  #BFB49B on #EFE9DA   1.70:1
     new  #CFC7BB on #F2EEE8   1.45:1   <- no longer registers

   Below roughly 1.5:1 the dashes stop reading and a run of open bays looks like
   one continuous block. Restore a divider with real contrast (3.07:1).
   --------------------------------------------------------------------------- */
.shop-bay.empty{ border-color:var(--wrb-ink-faint) }
.shop-bay.spray-foam.empty{ border-color:var(--wrb-idle) }

/* ==========================================================================
   from ui-depth.css
   ========================================================================== */
/* ===========================================================================
   ui-depth.css — elevation, motion and material.
   Loaded LAST so it layers over the existing sheets without editing them, and can
   be removed by deleting one <link> if it is not wanted.
   ---------------------------------------------------------------------------
   Deliberately touches only shadow, transition, transform-on-press, blur and focus.
   It does NOT change any size, margin, padding or position, because the layout is
   already tuned and a depth pass has no business moving things. That constraint is
   verified by measuring element geometry with and without this sheet.
   =========================================================================== */

:root {
  /* Elevation as a scale rather than ad-hoc shadows. Each step pairs a tight
     contact shadow with a wider ambient one, which is what stops a raised surface
     reading as a flat grey halo. */
  --elev-1: 0 1px 1px rgba(43, 43, 44, .04), 0 1px 3px rgba(43, 43, 44, .05);
  --elev-2: 0 1px 2px rgba(43, 43, 44, .05), 0 3px 8px rgba(43, 43, 44, .07);
  --elev-3: 0 2px 4px rgba(43, 43, 44, .06), 0 8px 20px rgba(43, 43, 44, .10);
  --elev-4: 0 4px 8px rgba(43, 43, 44, .08), 0 18px 44px rgba(43, 43, 44, .16);

  /* Motion. Short, and decelerating rather than linear — a control that eases out
     feels like it settled, one that moves linearly feels like it was dragged.
     --ease-spring overshoots slightly, reserved for things that appear. */
  --dur-1: 90ms;
  --dur-2: 160ms;
  --dur-3: 240ms;
  --ease-out: cubic-bezier(.2, .8, .3, 1);
  --ease-spring: cubic-bezier(.2, 1.15, .3, 1);

  --ring: 0 0 0 3px color-mix(in srgb, var(--saw, #9B6344) 28%, transparent);
}

@media screen {

  /* ---- Surfaces ------------------------------------------------------------
     One elevation per role, so depth reads as hierarchy: cards sit just off the
     page, menus float above them, modals above everything. */
  .settings-card, .panel { box-shadow: var(--elev-1); }
  .b-card { box-shadow: var(--elev-1); transition: box-shadow var(--dur-2) var(--ease-out), transform var(--dur-1) var(--ease-out); }
  .b-card:hover { box-shadow: var(--elev-2); }
  .modal, #buildModal, #bayPickerModal { box-shadow: var(--elev-4); }

  /* ---- Material ------------------------------------------------------------
     Translucency plus blur on the layers that sit over content, so what is behind
     stays legible as context without competing. Guarded on support: without
     backdrop-filter these fall back to the opaque colour already set. */
  @supports (backdrop-filter: blur(12px)) {
    nav.tabbar { backdrop-filter: blur(16px) saturate(140%); }
  }

  /* ---- Appearance ----------------------------------------------------------
     Things that appear should arrive, not blink into place. Kept to ~200ms and a
     few pixels; anything more reads as sluggish on a tool used all day. */

  @keyframes uiRise { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
  @keyframes uiPop  { from { opacity: 0; transform: scale(.97) translateY(-4px); } to { opacity: 1; transform: none; } }

  /* ---- Press feedback ------------------------------------------------------
     Scoped to buttons only. Transforms create a containing block for absolutely
     positioned descendants, so applying this to layout containers — shop bays,
     gantt rows, tracks — would move their children. Buttons have no such
     descendants, and the effect is momentary. */
  .btn, .tab, .lr-tab, .g-mode-btn, .pg-seg {
    transition: background var(--dur-1) var(--ease-out), border-color var(--dur-1) var(--ease-out),
                box-shadow var(--dur-1) var(--ease-out), transform var(--dur-1) var(--ease-out),
                color var(--dur-1) var(--ease-out);
  }
  .btn:active, .tab:active, .lr-tab:active, .g-mode-btn:active { transform: scale(.97); }
  .btn:hover { box-shadow: var(--elev-1); }
  .btn.primary:hover { box-shadow: var(--elev-2); }

  /* ---- Inputs -------------------------------------------------------------- */
  input, select, textarea {
    transition: border-color var(--dur-1) var(--ease-out), box-shadow var(--dur-1) var(--ease-out),
                background var(--dur-1) var(--ease-out);
  }

  /* ---- Focus --------------------------------------------------------------
     :focus-visible only, so a mouse click does not leave a ring behind but keyboard
     navigation is always obvious. This is an accessibility fix as much as a visual
     one — the tool had no consistent focus treatment. */
  :focus-visible { outline: none; box-shadow: var(--ring); border-radius: 4px; }
  input:focus-visible, select:focus-visible, textarea:focus-visible { box-shadow: var(--ring); }

  /* ---- Sticky headers -----------------------------------------------------
     A sticky header with no shadow looks pasted on when rows scroll under it. */
  .hours-grid thead th, .data-table thead th { box-shadow: 0 1px 0 var(--line-strong, #CFC7BB); }

  /* ---- Scrollbars ---------------------------------------------------------
     Thin and only visible against the surface they belong to. */
  .g-scroll, .hours-grid-wrap {
    scrollbar-width: thin;
    scrollbar-color: var(--line-strong, #CFC7BB) transparent;
  }
  .g-scroll::-webkit-scrollbar, .hours-grid-wrap::-webkit-scrollbar { width: 10px; height: 10px; }
  .g-scroll::-webkit-scrollbar-thumb, .hours-grid-wrap::-webkit-scrollbar-thumb {
    background: var(--line-strong, #CFC7BB); border-radius: 6px; border: 3px solid transparent; background-clip: content-box;
  }
  .g-scroll::-webkit-scrollbar-thumb:hover, .hours-grid-wrap::-webkit-scrollbar-thumb:hover { background: var(--ink-faint, #8E877E); background-clip: content-box; }

  /* ---- Row hover ----------------------------------------------------------
     Background only. Never transform: these rows contain absolutely positioned
     bars and markers whose coordinates are computed in JS. */
  .data-table tbody tr { transition: background var(--dur-1) var(--ease-out); }
}

/* ---------------------------------------------------------------------------
   Motion is a preference, not a given. Everything above degrades to instant.
   --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .btn:active, .tab:active, .lr-tab:active, .g-mode-btn:active { transform: none; }
}

/* Print carries no depth: shadows and blur waste ink and can render as grey boxes. */
@media print {
  * { box-shadow: none !important; backdrop-filter: none !important; animation: none !important; }
}

/* ==========================================================================
   from theme-c.css
   ========================================================================== */
/* ===========================================================================
   theme-c.css — "Grouped" theme for the WRB Production Planner.

   Loaded LAST, after styles.css / wrb-design-system.css / planner-theme.css.
   It overrides those sheets rather than replacing them, so:
     - removing ONE <link> line returns the tool to exactly how it looked before
     - no existing rule is edited, so nothing can be lost in a merge
     - anything this sheet does not mention keeps its current styling

   Colour is the tool's own, unchanged in hue: the charcoal chrome, clay accent
   and ok/warn/bad/info semantics all come from wrb-design-system.css. The one
   addition is a ground tint a step darker than the card surface — that tint is
   what makes panels read as lifted, which is the whole idea of the direction.
   =========================================================================== */

:root{
  /* Structural additions. Everything else is inherited. */
  --c-ground:#EFEBE4;
  --c-group:var(--wrb-white,#FFFFFF);
  --c-sep:var(--wrb-rule,#E3DDD4);
  --c-sep-strong:var(--wrb-rule-strong,#CFC7BB);
  --c-ink:var(--wrb-ink,#2B2B2C);
  --c-ink-2:var(--wrb-ink-soft,#6A6259);
  --c-ink-3:var(--wrb-ink-faint,#8E877E);
  --c-accent:var(--wrb-clay,#9B6344);
  --c-accent-deep:var(--wrb-clay-deep,#7E4F35);
  --c-ok:var(--wrb-ok,#4F7C46);
  --c-warn:var(--wrb-warn,#B08637);
  --c-bad:var(--wrb-bad,#9B4A33);
  --c-info:var(--wrb-info,#3E6C8C);
  --c-idle:var(--wrb-idle,#8A7B6A);
  --c-r:14px;      /* groups */
  --c-r-sm:8px;    /* controls */
  --c-r-pill:999px;
  --c-lift:0 1px 2px rgba(43,43,44,.05), 0 8px 22px rgba(43,43,44,.055);
  --c-lift-2:0 1px 2px rgba(43,43,44,.06), 0 14px 34px rgba(43,43,44,.075);
}

/* ---------------------------------------------------------------- ground -- */
body{background:var(--c-ground)}

/* ---------------------------------------------------------------- header -- */
/* Dark chrome, with a LIGHT LOGO VARIANT rather than a compromise on the colour.
   The stock logo is 49% charcoal (#303030) against a #39393A header — 1.14:1, which
   is invisible. assets/wrb-logo-light.png remaps each brand colour to a lighter
   counterpart instead of flattening the mark to white, so the identity survives:
   wordmark 10.42:1, clay mark 4.40:1, sage mark 6.42:1.
   The lockup is also given room and a rule, so it reads as a masthead rather than
   a label sitting next to the counts. */
body > header{background:var(--wrb-charcoal,#39393A);color:#F6F3EE;
  padding:0 22px;position:sticky;top:0;z-index:40;box-shadow:0 1px 0 rgba(0,0,0,.28);
  display:flex;align-items:center;gap:22px;min-height:66px;border:0}
/* planner-theme.css already injects the logo with .brand::before as a background
   image, so no markup change is needed — the theme only has to point it at the light
   variant and give it a little more room. */
body > header .brand{display:flex;align-items:center;gap:14px;padding-right:22px;
  border-right:1px solid rgba(255,255,255,.14)}
body > header .brand::before{
  background-image:url('../assets/wrb-logo-light.png');
  width:108px;height:42px}
/* If a logo is ever placed as a real <img> instead, it inherits the same sizing. */
body > header .brand img{height:34px;width:auto;display:block;flex:none}
body > header .brand h1{font-family:Sora,var(--head,sans-serif);font-size:16px;font-weight:600;
  letter-spacing:-.012em;line-height:1.15;color:#F6F3EE;margin:0;text-transform:none;
  white-space:nowrap}
body > header .brand .sub{font-size:11.5px;color:#A9A29A;letter-spacing:.02em}
.header-stats{display:flex;gap:7px;flex-wrap:wrap}
.header-stats .hstat{display:flex;flex-direction:column;gap:1px;padding:6px 11px;
  border-radius:var(--c-r-sm);background:rgba(255,255,255,.06);min-width:64px;border:0}
.header-stats .hstat .n{font-family:var(--mono,ui-monospace);font-size:16px;font-weight:600;
  line-height:1.05;color:#F6F3EE}
.header-stats .hstat .l{font-size:10.5px;color:#A9A29A;text-transform:none;letter-spacing:0}
.header-stats .hstat.bad{background:color-mix(in srgb,var(--c-bad) 34%,transparent)}
.header-stats .hstat.bad .n{color:#F6C7BA}
.header-stats .hstat.warn{background:color-mix(in srgb,var(--c-warn) 32%,transparent)}
.header-stats .hstat.warn .n{color:#F6E0B2}
.header-actions{margin-left:auto;display:flex;align-items:center;gap:10px}

/* ------------------------------------------------------------------ tabs -- */
nav.tabbar{background:var(--wrb-charcoal-deep,#2E2E2F);padding:0 22px;position:sticky;
  top:66px;z-index:39;display:flex;align-items:stretch;gap:2px;min-height:42px;border:0}
nav.tabbar .tab{display:flex;align-items:center;font-size:13px;color:#A9A29A;padding:0 13px;
  border:0;background:none;cursor:pointer;border-radius:var(--c-r-sm) var(--c-r-sm) 0 0;
  border-bottom:2px solid transparent;font-family:inherit;letter-spacing:0;text-transform:none}
nav.tabbar .tab:hover{color:#F6F3EE;background:rgba(255,255,255,.05)}
nav.tabbar .tab.active{background:var(--c-ground);color:var(--c-ink);font-weight:500;
  border-bottom-color:var(--c-ground)}
nav.tabbar .tab[data-tab="settings"]{margin-left:auto;gap:7px}
nav.tabbar .tab[data-tab="settings"]::before{content:"";width:15px;height:15px;flex:none;
  background-color:currentColor;-webkit-mask:var(--c-gear) center/contain no-repeat;
  mask:var(--c-gear) center/contain no-repeat}
:root{--c-gear:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='3.2'/%3E%3Cpath d='M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 1 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 1 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 1 1-2.83-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 1 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 1 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.6a1.65 1.65 0 0 0 1-1.51V3a2 2 0 1 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 1 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 1 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z'/%3E%3C/svg%3E")}

/* ------------------------------------------------- panels as lifted groups -- */
.panel,.settings-card{background:var(--c-group);border:0;border-radius:var(--c-r);
  box-shadow:var(--c-lift);overflow:hidden}
.panel > h2,.settings-card > h3{font-family:Sora,var(--head,sans-serif);letter-spacing:-.01em;
  text-transform:none}
.card-hint,.panel-sub{color:var(--c-ink-3)}
.count-pill{background:var(--wrb-bone-2,#F2EEE8);color:var(--c-ink-2);border-radius:var(--c-r-pill);border:0}

/* ----------------------------------------------------------------- tables -- */
.data-table{border-collapse:collapse;width:100%}
.data-table thead th{background:transparent;color:var(--c-ink-3);font-weight:500;
  text-transform:none;letter-spacing:0;font-size:12.5px;border-bottom:0}
.data-table td{border-top:1px solid var(--c-sep);border-bottom:0;vertical-align:middle}
.data-table tbody tr:hover td{background:var(--wrb-bone,#FAF8F5)}
.td-name{font-weight:500}
.td-sub{color:var(--c-ink-3)}

/* Health is rendered as <span class="badge" style="background:…"> with the colour set
   inline from riskMeta, so the theme must not touch the colour — only the shape. The
   same applies to the build-hours status pill and the board card badges. */
.badge,.count-pill,.mt-badge,.pill{
  border-radius:var(--c-r-pill);font-weight:500;text-transform:none;letter-spacing:.005em;border:0}

/* The 4px ink bar across the top of every panel belongs to the squared-off card it
   was drawn for. A rounded group with a hard bar across its corners reads as a
   mistake, so it goes. */
.panel::before{display:none}
.panel{border:0;padding:20px 22px}
/* Section headings inside panels were uppercase display type; sentence case with
   weight carries the same hierarchy without shouting. */
.forecast-detail-head,.rep-head,.panel h2,.settings-card h3{
  text-transform:none;letter-spacing:-.008em;font-family:Sora,var(--head,sans-serif)}
.forecast-detail-head{font-size:13px;color:var(--c-ink-2);font-weight:600}

/* ---------------------------------------------------------------- buttons -- */
.btn{border-radius:var(--c-r-sm);border:1px solid var(--c-sep);background:var(--wrb-bone,#FAF8F5);
  color:var(--c-ink-2);font-family:inherit;text-transform:none;letter-spacing:0}
.btn:hover{background:var(--wrb-bone-2,#F2EEE8);color:var(--c-ink)}
.btn.primary{background:var(--c-accent);border-color:var(--c-accent);color:#fff}
.btn.primary:hover{background:var(--c-accent-deep);border-color:var(--c-accent-deep)}
.btn.danger{background:none;border-color:color-mix(in srgb,var(--c-bad) 45%,transparent);color:var(--c-bad)}
.btn.danger:hover{background:color-mix(in srgb,var(--c-bad) 10%,transparent)}

/* ------------------------------------------------------------------ board -- */
.b-col{background:var(--c-group);border:0;border-radius:var(--c-r);box-shadow:var(--c-lift)}
.b-col-head{border-bottom:1px solid var(--c-sep);background:transparent}
.b-card{background:var(--wrb-bone,#FAF8F5);border:1px solid var(--c-sep);border-radius:10px;
  box-shadow:none}
.b-card:hover{box-shadow:var(--c-lift);border-color:var(--c-sep-strong)}

/* ------------------------------------------------------------------ gantt -- */
#ganttRoot .g-wrap{background:var(--c-group);border:0;border-radius:var(--c-r);
  box-shadow:var(--c-lift);overflow:hidden}
#ganttRoot .g-head{background:var(--wrb-bone-2,#F2EEE8);border-bottom:1px solid var(--c-sep-strong)}
#ganttRoot .g-label-sp{font-weight:600;color:var(--c-ink-2);border-right:1px solid var(--c-sep-strong)}
#ganttRoot .g-row{border-top:1px solid var(--c-sep)}
#ganttRoot .g-row:hover{background:var(--wrb-bone,#FAF8F5)}
#ganttRoot .g-label{border-right:1px solid var(--c-sep)}
/* Bars become pills, matching the status pills — one radius language throughout. */
#ganttRoot .g-bar{border-radius:var(--c-r-pill);box-shadow:0 1px 2px rgba(43,43,44,.14)}
#ganttRoot .g-bar-ghost{border-radius:var(--c-r-pill)}
/* Date markers: a 2px line is near-impossible to hover. This widens the target to
   22px with a transparent hit area, and gives the flag a solid head. */
#ganttRoot .g-target{width:22px;margin-left:-11px;border-left:0;cursor:help;z-index:4}
#ganttRoot .g-target::before{content:"";position:absolute;top:6px;bottom:6px;left:10px;width:2px;
  border-radius:1px;background:var(--c-ink)}
#ganttRoot .g-target-complete::before{background:var(--c-ok)}
#ganttRoot .g-target-flag{left:7px;border-top-width:7px;border-right-width:9px}
/* Keep the chart's lines behind the frozen build names when scrolling sideways.
   The widened target line above sits at z-index 4, the same as the names
   (styles.css), and comes later in the page, so it was drawn over them. Names go
   to 5: above target lines (4) and Today (3), below the "Build" header cell (6)
   and the date header (7). */
#ganttRoot .g-label{z-index:5}
/* The row separators belong to the row, not the name cell, so the Today line
   still showed through the 1px gaps in the name column. Each name cell paints a
   separator-coloured strip over the 2px gap above it (the previous row's bottom
   border plus this row's top border). Screen only: print draws its own
   row lines (styles.css), and this would cover them. */
@media screen{
  #ganttRoot .g-label::before{content:"";position:absolute;left:0;right:0;top:-2px;height:2px;
    background:var(--c-sep);pointer-events:none}
}

/* ------------------------------------------------------------ build hours -- */
#hoursRoot .hours-grid-wrap{background:var(--c-group);border:0;border-radius:var(--c-r);
  box-shadow:var(--c-lift);overflow:auto}
/* A true grid: ruled both ways. On a thirteen-column numeric table the vertical
   rules matter as much as the horizontal ones — without them the eye loses which
   stage column a figure belongs to halfway across. */
#hoursRoot .hours-grid th,#hoursRoot .hours-grid td{
  border-right:1px solid var(--c-sep);border-bottom:1px solid var(--c-sep)}
#hoursRoot .hours-grid th:last-child,#hoursRoot .hours-grid td:last-child{border-right:0}
#hoursRoot .hours-grid thead th{background:var(--wrb-bone-2,#F2EEE8);color:var(--c-ink-2);
  font-weight:600;text-transform:none;letter-spacing:0;border-bottom:1px solid var(--c-sep-strong)}
#hoursRoot .hours-grid .bh-name{background:var(--c-group);border-right:1px solid var(--c-sep-strong)}
#hoursRoot .hours-grid tbody tr:hover td{background:var(--wrb-bone,#FAF8F5)}
#hoursRoot .hours-grid tbody tr:hover .bh-name{background:var(--wrb-bone,#FAF8F5)}
#hoursRoot .bh-totals-row > td,#hoursRoot .bh-avg-row > td{background:var(--wrb-bone-2,#F2EEE8)}

/* ------------------------------------------------------------------- shop -- */

/* ------------------------------------------------- build panel as a sheet -- */
/* A build carries five tabs of content. A centred box either scrolls badly or fills
   the screen anyway; a sheet keeps the list you came from visible at the left edge. */
#buildOverlay{background:rgba(30,30,31,.34);backdrop-filter:blur(3px)}
#buildModal{position:fixed;top:0;right:0;bottom:0;left:auto;width:min(760px,94vw);
  max-width:none;max-height:none;height:100vh;margin:0;transform:none;border-radius:0;
  background:var(--c-ground);display:flex;flex-direction:column;
  box-shadow:-18px 0 50px rgba(43,43,44,.20);border:0}
#buildModal .modal-head{background:var(--c-group);border-bottom:1px solid var(--c-sep);
  padding:20px 24px 15px;flex:none}
#buildModal .modal-head h2{font-family:Sora,var(--head,sans-serif);font-size:19px;
  letter-spacing:-.016em;line-height:1.25}
#buildModal .mono-sub{color:var(--c-ink-3)}
#buildModal .modal-tabs{background:var(--c-group);border-bottom:1px solid var(--c-sep);
  padding:0 24px;flex:none;gap:2px}
#buildModal .modal-tab{border:0;background:none;color:var(--c-ink-2);font-family:inherit;
  font-size:13px;padding:11px 13px;border-bottom:2px solid transparent;margin-bottom:-1px;
  text-transform:none;letter-spacing:0;border-radius:0}
#buildModal .modal-tab:hover{color:var(--c-ink);background:none}
#buildModal .modal-tab.active{color:var(--c-accent);border-bottom-color:var(--c-accent);
  font-weight:500;background:none}
.mt-badge{border-radius:var(--c-r-pill);background:var(--wrb-bone-2,#F2EEE8);color:var(--c-ink-2);border:0}
.mt-badge.ok{background:color-mix(in srgb,var(--c-ok) 16%,transparent);color:var(--c-ok)}
.mt-badge.fail{background:color-mix(in srgb,var(--c-bad) 16%,transparent);color:var(--c-bad)}
#buildModal .modal-body{flex:1;overflow-y:auto;padding:18px 24px 28px;background:var(--c-ground)}
#buildModal .modal-foot{background:var(--c-group);border-top:1px solid var(--c-sep);
  padding:13px 24px;flex:none}
/* Field groups become lifted cards inside the sheet, so the body reads as grouped
   decisions rather than one long form. */
#buildModal .field-grid{background:var(--c-group);border-radius:var(--c-r);
  box-shadow:var(--c-lift);padding:16px 18px;margin-bottom:16px}
/* Field labels everywhere, not only in the build panel: uppercase mono labels were a
   default rather than a decision, and weight plus colour carry the same hierarchy. */
.field > span{color:var(--c-ink-2);font-weight:500;text-transform:none;letter-spacing:0;
  font-family:inherit;font-size:12.5px}
#buildModal .field input,#buildModal .field select,#buildModal .field textarea{
  background:var(--wrb-bone,#FAF8F5);border:1px solid var(--c-sep-strong);border-radius:var(--c-r-sm)}
#buildModal .field input:focus,#buildModal .field select:focus,#buildModal .field textarea:focus{
  background:var(--c-group);border-color:var(--c-accent);outline:none;
  box-shadow:0 0 0 3px color-mix(in srgb,var(--c-accent) 20%,transparent)}
#buildModal .stage-row{border-bottom:1px solid var(--c-sep)}

/* ------------------------------------------------------- column filters --- */

/* ------------------------------------------- pinned header and tab bar -- */
/* styles.css sets html,body{overflow-x:hidden}. That turns the page into its own
   scrolling box, so the header and tab bar had nothing to pin to and scrolled away.
   `clip` still stops sideways scrolling but doesn't create the box. Browsers
   without `clip` (Safari before 16) ignore this line and behave as before. */
html,body{overflow-x:clip}
/* The header fits on one line from about 1000px up. Below 1100px it wraps to two or
   three lines, so it scrolls away normally (a 170px pinned block would take a third
   of a tablet screen), gets breathing room top and bottom, and the tab bar alone
   stays pinned at the very top. */
@media (max-width:1099px){
  body > header{position:static;padding-top:10px;padding-bottom:10px}
  nav.tabbar{top:0}
}
/* The tabs need about 910px. Narrower than that, the tab bar scrolls sideways so
   every tab stays reachable. A scrolling bar would clip the roofline decoration
   that hangs below it (planner-theme.css), so the roofline is hidden only here. */
@media (max-width:939px){
  nav.tabbar{overflow-x:auto;scrollbar-width:thin}
  nav.tabbar .tab{flex:none;white-space:nowrap}
  nav.tabbar::after{display:none}
}

/* ------------------------------------------------------------------ print -- */
/* Depth costs ink and can render as grey boxes. The 11x17 Gantt work assumes a
   plain surface, so the theme steps out of the way entirely. */
@media print{
  body{background:#fff}
  body > header,nav.tabbar{position:static;background:#fff;color:#000;box-shadow:none}
  .panel,.settings-card,.b-col,#ganttRoot .g-wrap,#hoursRoot .hours-grid-wrap{box-shadow:none;border-radius:0}
  #buildModal{position:static;width:auto;height:auto;box-shadow:none}
}

/* Build Hours: stage headers no longer drag to reorder (R4, 2026-10-01); resize only. */
.bh-stage .th-label{cursor:default}

/* Dashboard "Check status" flag (2026-10-01): builds whose status looks wrong for today. */
.status-check{margin:12px 0 4px;padding:10px 14px;border:1px solid var(--c-sep);border-left:3px solid var(--c-warn);border-radius:var(--c-r-sm);background:var(--c-group)}
.status-check-head{font-size:12px;font-weight:600;color:var(--c-ink);margin-bottom:4px}
.status-check ul{margin:0;padding-left:18px;font-size:12.5px;line-height:1.5;color:var(--c-ink-2)}
.status-check-name{color:var(--c-accent-deep);font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:2px}

/* Build window: Production Stages, one stage per row (2026-10-05). The base sheet lays
   stage rows out in two columns with a 56px progress column, sized for the old slider.
   The 20-step progress bar plus its % box needs about 235px, so bars were cut off, rows
   overlapped and the list scrolled sideways. Columns: # · stage · days · target ·
   actual · earned · progress (target and earned added the same day). */
#buildModal .stage-list{grid-template-columns:1fr}
#buildModal .stage-row,#buildModal .stage-list-head{grid-template-columns:20px minmax(0,1fr) 44px 52px 52px 44px 240px}
#buildModal .stage-list-head span:nth-child(7){text-align:left}
#buildModal .stage-row:nth-child(n){background:var(--surface-2)}
#buildModal .stage-row:nth-child(odd){background:var(--card)}
#buildModal .stage-list .stage-row:last-child{border-bottom:none}
#buildModal .st-target{background:var(--card);border:1px solid var(--line-strong);border-radius:3px;padding:5px 4px;font-size:12px;width:100%;min-width:0}
#buildModal .st-earned{font-size:12px;text-align:right;color:var(--c-ink-2);font-variant-numeric:tabular-nums}
@media (max-width:820px){
  #buildModal .stage-row,#buildModal .stage-list-head{grid-template-columns:22px repeat(4,minmax(0,1fr))}
  #buildModal .stage-row .st-label{grid-column:2/-1}
  #buildModal .stage-row .st-days{grid-column:2}
  #buildModal .stage-row .st-target{grid-column:3}
  #buildModal .stage-row .st-hours{grid-column:4}
  #buildModal .stage-row .st-earned{grid-column:5}
  #buildModal .stage-row .pg{grid-column:2/-1}
  #buildModal .stage-list-head span:nth-child(2),#buildModal .stage-list-head span:nth-child(7){display:none}
  #buildModal .stage-list-head span:nth-child(3){grid-column:2}
  #buildModal .stage-list-head span:nth-child(4){grid-column:3}
  #buildModal .stage-list-head span:nth-child(5){grid-column:4}
  #buildModal .stage-list-head span:nth-child(6){grid-column:5}
}

/* Target vs earned hours (2026-10-05): green up to 90% of earned, amber to 110%, red
   above. A coloured edge on the stage row, a light tint when close or over, and the
   same tint on Build Hours cells. Neutral for no target / not started. */
#buildModal .stage-row.hs-state-ok{box-shadow:inset 3px 0 0 var(--c-ok)}
#buildModal .stage-row.hs-state-near{box-shadow:inset 3px 0 0 var(--c-warn);background:color-mix(in srgb,var(--c-warn) 10%,var(--card))}
#buildModal .stage-row.hs-state-over{box-shadow:inset 3px 0 0 var(--c-bad);background:color-mix(in srgb,var(--c-bad) 9%,var(--card))}
#buildModal .stage-row.hs-state-over .st-earned{color:var(--c-bad);font-weight:600}
#buildModal .stage-row.hs-state-near .st-earned{color:var(--c-warn);font-weight:600}
.hours-summary.hs-earned{grid-template-columns:repeat(4,minmax(0,1fr))}
.hours-summary .hs-state-ok .hs-val{color:var(--c-ok)}
.hours-summary .hs-state-near .hs-val{color:var(--c-warn)}
.hours-summary .hs-state-over .hs-val{color:var(--c-bad)}
.bh-cell.hs-state-ok .bh-input{box-shadow:inset 0 -2px 0 var(--c-ok)}
.bh-cell.hs-state-near .bh-input{background:color-mix(in srgb,var(--c-warn) 16%,transparent)}
.bh-cell.hs-state-over .bh-input{background:color-mix(in srgb,var(--c-bad) 16%,transparent)}

/* Targets vs goal and per-stage overage (2026-10-05). The goal is fixed; targets should
   add up to it. Hours past a stage's target are an overage, shown in red on the stage. */
#buildModal .st-over{display:block;font-size:10.5px;line-height:1.1;color:var(--c-bad);font-weight:700}
.hs-alloc{margin-top:12px;padding:8px 12px;border-radius:var(--c-r-sm);font-size:12.5px;border:1px solid var(--c-sep)}
.hs-alloc-under,.hs-alloc-no-goal{border-left:3px solid var(--c-warn);background:color-mix(in srgb,var(--c-warn) 8%,var(--c-group))}
.hs-alloc-over{border-left:3px solid var(--c-bad);background:color-mix(in srgb,var(--c-bad) 8%,var(--c-group))}
.hs-alloc-matched{border-left:3px solid var(--c-ok);color:var(--c-ok)}
.hs-note.hs-overage{color:var(--c-bad);font-weight:600}

/* ---- Production revamp phase 2 (2026-10-07): plan, misses, gate breaches; station flag ---- */
.plan-box{margin:14px 0 4px;padding:10px 12px;border:1px solid var(--c-sep);border-radius:var(--c-r-sm);background:var(--c-group)}
.plan-box .section-head{margin:0 0 6px}
.plan-line{font-size:12.5px;line-height:1.5;margin:2px 0}
.plan-bad{color:var(--c-bad)}
.plan-replan{display:flex;gap:6px;align-items:center;flex-wrap:wrap;margin-top:6px}
.plan-replan input[type=text]{flex:1 1 220px;min-width:0}
.plan-replan .plan-need,.plan-replan input.plan-need{border-color:var(--c-bad)}
.plan-misses{margin-top:6px}
.le-station{display:inline-flex;align-items:center;gap:4px;font-size:12px;white-space:nowrap}
.lr-note-inline{font-weight:400;opacity:.75;font-size:12px}

/* Production revamp phase 3b (decision G, 2026-10-08): the build window no longer shows each
   stage's planned working days (the data is kept). Columns: # · stage · target · actual ·
   earned · progress. Remove this block if the Days column comes back. */
#buildModal .stage-row,#buildModal .stage-list-head{grid-template-columns:20px minmax(0,1fr) 52px 52px 44px 240px}
#buildModal .stage-list-head span:nth-child(7){text-align:center}
#buildModal .stage-list-head span:nth-child(6){text-align:left}
@media (max-width:820px){
  #buildModal .stage-row,#buildModal .stage-list-head{grid-template-columns:22px repeat(3,minmax(0,1fr))}
  #buildModal .stage-row .st-target{grid-column:2}
  #buildModal .stage-row .st-hours{grid-column:3}
  #buildModal .stage-row .st-earned{grid-column:4}
  #buildModal .stage-list-head span:nth-child(7){display:initial}
  #buildModal .stage-list-head span:nth-child(2),#buildModal .stage-list-head span:nth-child(6){display:none}
  #buildModal .stage-list-head span:nth-child(3){grid-column:2}
  #buildModal .stage-list-head span:nth-child(4){grid-column:3}
  #buildModal .stage-list-head span:nth-child(5){grid-column:4}
}

/* Build window tab row on a phone (live fix, 2026-10-12): the four tabs need about 440px,
   so "Files & Documents" ran off the right edge. Tighter tabs, and the row scrolls sideways
   if it still doesn't fit. */
@media (max-width:520px){
  #buildModal .modal-tabs{overflow-x:auto;padding:0 12px;scrollbar-width:none}
  #buildModal .modal-tab{flex:none;white-space:nowrap;padding:11px 9px}
}

/* Schedule accuracy, screens step (2026-10-14, claude/production-accuracy-screens-plan.md).
   Priority tag, crew dates, production managers, Weekly Update. Remove this block to drop
   the styling (the screens still work unstyled). */
.pri-tag{display:inline-block;margin-left:6px;padding:1px 6px;border-radius:999px;background:var(--clay);color:#fff;font-size:10.5px;font-weight:700;letter-spacing:.02em;vertical-align:middle;line-height:1.5;white-space:nowrap}
.g-name .pri-tag{margin-left:5px;font-size:9.5px}
.crew-edit-row.crew-dated{grid-template-columns:1fr 1fr 24px;grid-template-areas:"name name del" "role role role" "start end end"}
.crew-dated .ce-date{display:flex;flex-direction:column;gap:2px;font-size:11px;color:var(--text-muted);min-width:0}
.crew-dated .ce-date:first-of-type{grid-area:start}
.crew-dated .ce-date:last-of-type{grid-area:end}
.add-crew-row .ce-date{display:flex;flex-direction:column;gap:2px;font-size:11px;color:var(--text-muted)}
.crew-now{margin-top:-4px}
.crew-past{margin-top:8px}
.crew-past summary{cursor:pointer;font-size:12.5px;color:var(--text-muted);padding:4px 0}
.pm-list{display:flex;flex-direction:column;gap:6px;margin-bottom:8px}
.pm-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 9px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--radius);font-size:13px;overflow-wrap:anywhere}
.wk-count{margin:0 0 12px;font-size:13.5px}
.wk-upd{font-size:12.5px;color:var(--text-muted);white-space:nowrap}
.wk-upd.stale{color:var(--amber);font-weight:600}
.wk-upd.stale::before{content:'';display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--amber);margin-right:4px;vertical-align:middle}
.wk-bays{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;margin-top:10px}
.wk-check{margin-top:8px;font-size:12.5px;color:var(--clay)}

/* Production calculator for BD (2026-10-21, claude/production-bd-calculator-plan.md). Remove this
   block to drop the styling. */
.calc-rm{background:none;border:none;color:var(--text-dim);font-size:15px;padding:2px 6px;line-height:1;cursor:pointer}.calc-rm:hover{color:var(--clay)}
.calc-add{margin:8px 0 14px}
.calc-error{padding:10px 12px;border-left:3px solid var(--clay);background:var(--surface-2);color:var(--clay);font-weight:600}
.calc-empty{padding:10px 0}
.calc-printed{display:none}
.lob{position:relative;margin-top:10px}
.lob-axis{position:relative;height:16px;font-size:10px;color:var(--text-muted);border-bottom:1px solid var(--line)}
.lob-axis span{position:absolute;top:0}
.lob-row{position:relative;height:9px;margin:2px 0}
.lob-row .lob-bar{position:absolute;top:0;height:100%}
.lob-bar{display:inline-block;border-radius:2px;-webkit-print-color-adjust:exact;print-color-adjust:exact}
.lob-bar.long{background:var(--timber)}.lob-bar.short{background:var(--pine)}
@media print{
  body.printing.printing-calculator main > #view-calculator{display:block !important}
  body.printing-calculator .calc-add,body.printing-calculator .calc-rm{display:none !important}
  body.printing-calculator .calc-printed{display:block;font-size:9pt;color:#555}
  body.printing-calculator #calcRoot{font-size:10pt}
  body.printing-calculator .calc-printed{margin:0 0 6pt}
}

/* ---------------------------------------------------------------------------
   QuickBooks Time hours (2026-10-22, claude/production-qbt-hours-sync-plan.md 13)
   Build Hours: the QuickBooks figure under a typed cell where they differ; synced
   cells read-only. Settings → QuickBooks Time: link job codes to builds.
   --------------------------------------------------------------------------- */
.bh-cell .bh-qb,.bh-total .bh-qb{display:block;font-size:10.5px;font-weight:700;line-height:1.1;color:#3E6C8C;
  font-variant-numeric:tabular-nums;white-space:nowrap;margin-top:1px}
.qb-note .bh-qb{display:inline;font-size:11px;font-weight:700;color:#3E6C8C}
.bh-qb-src{display:inline-block;margin-left:5px;padding:0 4px;border-radius:2px;font-size:9.5px;font-weight:700;
  letter-spacing:.08em;color:#fff;background:#3E6C8C;vertical-align:1px}
/* Synced hours read like any other figure (a reference for the production managers, 2026-10-22):
   no tint, no dimming. The design system greys every read-only input (wrb-design-system.css);
   these are read-only only because QuickBooks Time is their source, so they keep the normal ink. */
.bh-cell.bh-synced .bh-input[readonly]{color:var(--ink,#2B2B2C);background:transparent;opacity:1;cursor:default}
.stage-row .st-hours[readonly][data-synced]{color:var(--ink,#2B2B2C);background:var(--card,#fff);opacity:1;cursor:default}
.qb-stale{color:#9B4A33}
.settings-card.qb-card{grid-column:1/-1}   /* full width, like Line Settings */
.qb-card .qb-switch{display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center;margin:10px 0 4px}
.qb-card .qb-label{font-size:10.5px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:var(--text-dim,#736B62)}
.qb-card .qb-opt{display:inline-flex;gap:6px;align-items:center;font-size:13px}
.qb-card .qb-actions{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 4px}
.qb-card .qb-sub{margin:16px 0 4px;font-size:10.5px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:var(--text-dim,#736B62)}
/* Job codes with no time in 2026: collapsed group under Needs a build (2026-10-26) */
.qb-card .qb-older > summary{cursor:pointer;display:list-item}
.qb-card .qb-older > summary:focus-visible{outline:2px solid var(--accent,#2C6E9E);outline-offset:2px}
.qb-card .qb-row{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) auto auto;gap:8px;align-items:center;
  padding:8px 0;border-top:1px solid rgba(43,43,44,.08)}
.qb-card .qb-row.qb-linked{grid-template-columns:minmax(0,1fr) auto}
.qb-card .qb-code{display:flex;flex-direction:column;min-width:0}
.qb-card .qb-code b{font-size:13px;overflow-wrap:anywhere}
.qb-card .qb-code .td-sub{font-variant-numeric:tabular-nums}
.qb-card select{min-width:0;max-width:100%}
@media (max-width:640px){
  .qb-card .qb-row{grid-template-columns:1fr 1fr}
  .qb-card .qb-row .qb-code,.qb-card .qb-row select{grid-column:1 / -1}
}
@media print{.bh-qb,.bh-qb-src{color:#000;background:none}}

/* ---- QuickBooks Time timekeeping additions (2026-10-22, claude/production-qbt-hours-sync-plan.md 15) ---- */
.qb-hint{margin-left:6px;padding:1px 7px;border:1px dashed #3E6C8C;border-radius:10px;background:transparent;color:#3E6C8C;
  font-size:11px;font-weight:700;cursor:pointer;font-variant-numeric:tabular-nums;white-space:nowrap}
.qb-hint:hover,.qb-hint:focus-visible{background:#3E6C8C;color:#fff;border-style:solid}
.wk-qb{display:flex;flex-direction:column;gap:2px;margin:8px 0 2px;padding:8px 10px;border-left:3px solid #9B4A33;background:var(--surface-2,#F6F3EE)}
.wk-qb-note{margin:6px 0 0}
.qb-labor{margin-top:16px;padding-top:12px;border-top:1px solid var(--line,#E3DDD4);display:grid;gap:6px}
.qb-labor-head{font-size:12px;font-weight:700;display:flex;flex-direction:column;gap:2px}
.qb-labor-head .td-sub{font-weight:400}
.lw-plan.qb-clocked{background:#3E6C8C}
.qb-bw{margin:12px 0 4px;display:grid;gap:8px}
.qb-bw:empty{display:none}
.qb-bw .qb-label{font-size:10.5px;font-weight:700;letter-spacing:.13em;text-transform:uppercase;color:var(--text-dim,#736B62);margin-right:4px}
.qb-bw-links{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center}
.qb-chip{display:inline-flex;align-items:center;gap:4px;padding:2px 8px;border-radius:12px;background:var(--surface-2,#F6F3EE);font-size:12px}
.qb-chip-x{border:0;background:none;cursor:pointer;color:var(--text-dim,#736B62);padding:0 2px}
.qb-bw-pick{display:flex;gap:6px;align-items:center;flex:1 1 320px;min-width:0}
.qb-bw-pick select{flex:1;min-width:0;max-width:100%}
.qb-late{padding:7px 10px;border-left:3px solid #9B4A33;background:#FBF1EC;font-size:12.5px}
.qb-drill{display:grid;gap:5px;padding:8px 10px;border:1px solid var(--line,#E3DDD4);border-radius:6px}
.qb-drill-head{display:flex;gap:8px;align-items:baseline;flex-wrap:wrap}
.qb-drill-head button{margin-left:auto}
.qb-review summary{cursor:pointer;font-size:12.5px;font-weight:700;padding:4px 0}
.qb-review-table{width:100%;border-collapse:collapse;font-size:12px;font-variant-numeric:tabular-nums;margin:4px 0}
.qb-review-table th,.qb-review-table td{padding:4px 8px;border-bottom:1px solid var(--line,#E3DDD4);text-align:right}
.qb-review-table th:first-child,.qb-review-table td:first-child{text-align:left}
.qb-review-table .over{color:#9B4A33}.qb-review-table .under{color:#3F7A4F}
.qb-review-table .qb-review-total td{font-weight:700}
.qb-review-table tr.qb-drillable{cursor:pointer}.qb-review-table tr.qb-drillable:hover td{background:var(--surface-2,#F6F3EE)}
.qb-review .qb-actions{display:flex;gap:8px}
#buildModal .stage-row .st-hours[readonly][data-synced]{cursor:pointer}
.qb-card .qb-samejob{color:#3E6C8C}
@media print{.qb-hint{display:none}}
/* Not applicable hours (2026-10-22): in the total, not on any job code */
#hoursRoot .hours-grid .bh-na,#hoursRoot .hours-grid .bh-na-head{text-align:center;font-variant-numeric:tabular-nums;color:var(--text-dim,#736B62);min-width:64px}
.qb-na-note{color:var(--text-dim,#736B62)}

/* ---- Checks: header button and side panel (2026-10-26; replaces the Dashboard's Check status block) ---- */
header .header-actions .chk-btn{display:inline-flex;align-items:center;gap:6px;position:relative}
header .header-actions .chk-btn svg{flex:none}
.chk-badge{min-width:18px;padding:0 5px;border-radius:9px;background:#9B4A33;color:#fff;font-size:11px;font-weight:700;line-height:18px;text-align:center;font-variant-numeric:tabular-nums}
.chk-panel{position:fixed;top:0;right:0;bottom:0;width:min(440px,100vw);z-index:90;overflow-y:auto;background:var(--card,#fff);
  border-left:1px solid var(--line,#E3DDD4);box-shadow:-12px 0 32px rgba(30,30,31,.16);padding:16px 18px 28px}
.chk-panel[hidden]{display:none}
.chk-close{font-size:16px}
@media (max-width:640px){header .header-actions .chk-btn .chk-label{display:none}}
@media print{.chk-panel,#checksBtn{display:none !important}}

/* ---- Wide tables on a phone or tablet (2026-10-26) ----
   The Pipeline, Dashboard and Reports tables are wider than a phone, and the page clips sideways
   overflow (html,body overflow-x:clip, for the pinned header), so their right-hand columns,
   including Pipeline's Confirm start, could not be reached. The table scrolls sideways itself. */
@media (max-width:900px){
  .view .data-table{display:block;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
}

/* ---- Line Settings: last move and closures (2026-10-27) ---- */
.lr-stops input[type="date"]{background:var(--card);border:1px solid var(--line-strong);border-radius:var(--radius);padding:4px 6px;font:inherit;font-size:12px}
.lr-closures{flex:1 0 100%;display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:12px;color:var(--text-muted)}
.lr-closures-title{font-weight:600}
.lr-closure-list{display:flex;flex-wrap:wrap;gap:6px;flex:1 0 100%}
.lr-closure{display:inline-flex;align-items:center;gap:4px;padding:2px 4px 2px 8px;border:1px solid var(--line-strong);border-radius:12px;background:var(--card);font-size:12px}
.lr-closure-add{display:inline-flex;align-items:center;gap:6px}

/* Build dates (2026-10-28): the projected completion under the completion date. Plain text
   inside the field's label, so it must undo the label span's uppercase, bold styling. */
.field > .proj-line, .proj-line{display:block;margin-top:4px;font-size:12px;line-height:16px;font-weight:400;text-transform:none;letter-spacing:normal;color:var(--text-muted);font-variant-numeric:tabular-nums}
.proj-line em{font-style:normal}
.proj-late{color:var(--rust);font-weight:600}
.field > .proj-basis, .proj-basis{display:block;font-size:11.5px;line-height:15px;font-weight:400;text-transform:none;letter-spacing:normal;color:var(--text-dim)}

/* Build window dates in fixed positions (2026-10-29): each planned date starts a row, with its
   actual beside it; Goal hours always starts the row after. A date that doesn't apply yet is
   shown locked with when it fills in, so nothing moves between builds. */
#buildModal .field-grid > .date-row-start{grid-column-start:1}
.field-later input[type="date"]{opacity:.5;cursor:not-allowed}
.field > .later-hint, .later-hint{display:block;margin-top:4px;font-size:11.5px;line-height:15px;font-weight:400;text-transform:none;letter-spacing:normal;color:var(--text-dim)}

/* Weekly Update (2026-10-29): a job code with an hours hint chip needs about 410 px (name, bar,
   number, %, chip). At 350 px columns, on wide screens with four columns, the chip sat on top of
   the number and the %. Columns are now at least 420 px (never wider than the page), and the
   bar, number and chip never shrink under each other. */

/* Tab switch (2026-10-29): the tab lights up at once; the pointer shows "working" while the new
   screen is drawn the next frame (app.js switchTab). No dimming: repainting a large old screen
   at partial opacity cost about 100 ms on its own. */
body.tab-busy main{cursor:progress}

/* Build Hours (2026-10-29): QuickBooks Time cells are text, not read-only inputs (app.js
   renderBuildHours). Same box as .bh-input so rows and columns don't move. */
.bh-input.bh-ro{display:inline-block;box-sizing:border-box;line-height:normal;vertical-align:middle;cursor:default}

/* ------------------------------------------------ Crew needs (2026-11-02) -- */
/* claude/production-pre-pivot-plan.md 4. Live's look: white groups on the ground, clay accent. */
.crew-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:0 0 12px}
.crew-tile{display:flex;flex-direction:column;gap:2px;background:var(--c-group,#FFFFFF);border-radius:12px;box-shadow:inset 0 0 0 1px #EEE8DF;padding:14px 16px;min-width:0}
.crew-n{font-size:30px;line-height:36px;font-weight:800;letter-spacing:-.01em;font-variant-numeric:tabular-nums;color:var(--c-ink,#2B2B2C)}
.crew-l{font-size:13px;font-weight:600;color:var(--c-ink,#2B2B2C)}
.crew-tile.bad .crew-n{color:var(--c-bad,#9B4A33)}
.crew-tile.ok .crew-n{color:var(--c-ok,#4F7C46)}
.crew-finish{border-radius:12px;padding:12px 16px;margin:0 0 12px;background:#F2EEE8;font-size:14px;line-height:1.45}
.crew-finish.ok{background:#EEF4EC}
.crew-finish.bad{background:#F6E9E4}
.crew-total{margin:14px 0 6px}
.crew-weeks td.num,.crew-weeks th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums}
.crew-weeks tr.crew-short td{background:#FBF3EF}
.crew-short-n{color:var(--c-bad,#9B4A33);font-weight:700}
@media (max-width:900px){
  .crew-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .crew-weeks{display:block;overflow-x:auto}
}
@media print{
  body.printing.printing-crew main > #view-crew{display:block !important}
  body.printing-crew .calc-printed{display:block;font-size:9pt;color:#555;margin:0 0 6pt}
  body.printing-crew [data-print="crew"]{display:none !important}
  body.printing-crew .crew-tiles{grid-template-columns:repeat(4,1fr)}
  body.printing-crew #crewRoot{font-size:9.5pt}
  body.printing-crew .crew-weeks td,body.printing-crew .crew-weeks th{padding:2pt 5pt !important}
}

/* ------------------------------------------- Needs you on Today (2026-11-03) -- */
/* One row per build: name, what's wrong as short tags, the key detail (was: grouped chips). */
.ny-top{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:8px}
.ny-top h2{margin:0}
.ny-sum{font-size:13px;color:var(--c-ink-2,#6A6259);font-weight:600}
.ny-go{margin-left:auto;font:inherit;font-size:13px;font-weight:600;border:0;background:none;padding:2px 0;color:var(--wrb-clay-deep,#7E4F35);cursor:pointer}
.ny-go:hover{text-decoration:underline;text-underline-offset:2px}
.ny-list{list-style:none;margin:0;padding:0}
.ny-row{display:grid;grid-template-columns:minmax(180px,1fr) minmax(0,1.25fr) minmax(0,1.25fr);gap:4px 16px;align-items:center;padding:9px 6px;border-top:1px solid #EEE8DF;cursor:pointer;border-radius:6px}
.ny-list .ny-row:first-child{border-top:0}
.ny-row:hover{background:#FAF7F2}
.ny-row:focus-visible{outline:2px solid var(--wrb-clay,#9B6344);outline-offset:1px}
.ny-name{font-weight:650;font-size:14px;color:var(--c-ink,#2B2B2C);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ny-tags{display:flex;flex-wrap:wrap;gap:4px}
.ny-tag{display:inline-flex;align-items:center;gap:4px;font-size:11.5px;font-weight:700;padding:2px 8px;border-radius:999px;white-space:nowrap;line-height:1.5}
.ny-tag b{font-weight:800;opacity:.75}
.ny-tag.bad{background:#F6E2DB;color:var(--c-bad,#9B4A33)}
.ny-tag.warn{background:#F5ECD9;color:#86631F}
.ny-tag.info{background:#EEF1F4;color:#4A5A68}
.ny-detail{font-size:13px;color:var(--c-ink-2,#6A6259);min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ny-more summary,.ny-key summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--c-ink-2,#6A6259);padding:8px 6px;list-style-position:inside}
.ny-more[open] summary{border-bottom:1px solid #EEE8DF}
.ny-shop{margin:8px 6px 0;font-size:13px;color:var(--c-ink-2,#6A6259)}
.ny-key{margin-top:4px}
.ny-key dl{display:grid;grid-template-columns:auto 1fr;gap:6px 12px;margin:4px 6px 4px;font-size:12.5px;color:var(--c-ink-2,#6A6259)}
.ny-key dd{margin:0;align-self:center}
@media (max-width:760px){
  .ny-row{grid-template-columns:1fr;gap:4px}
  .ny-name,.ny-detail{white-space:normal}
}
/* Crew needs: this year's actuals beside the plan (2026-11-02). */
.crew-actuals{margin-top:6px;padding-top:6px;border-top:1px solid #EEE8DF;font-size:12.5px;line-height:1.35;color:var(--c-ink-2,#6A6259)}
.crew-actuals strong{color:var(--c-ink,#2B2B2C);font-size:14px}

/* ------------------------------- Build window: Stages tab, the Gantt (2026-11-03) -- */
/* claude/production-stage-gantt-spec.md. A sticky stage column and a track of working days.
   Solid bars are set; faint, dashed bars are suggestions. Phones get a list instead. */
.gt{display:flex;flex-direction:column;gap:10px}
.gt-head{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.gt-facts{font-size:13.5px;line-height:1.45;color:var(--c-ink,#2B2B2C);min-width:0}
.gt-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.gt-onebay{font:inherit;font-size:12.5px;padding:4px 6px;border-radius:7px}
.gt-legend{display:flex;align-items:center;gap:6px 8px;flex-wrap:wrap;font-size:12px;color:var(--c-ink-2,#6A6259)}
.gt-key{display:inline-block;width:18px;height:10px;border-radius:3px;margin-left:4px}
.gt-key:first-child{margin-left:0}
.gt-key.conf{background:var(--wrb-clay,#9B6344)}
.gt-key.sug{background:#F3E7DF;box-shadow:inset 0 0 0 1px #C9A48D;border:1px dashed #B88A6E}
.gt-clash-note{color:var(--c-bad,#9B4A33);font-weight:700;margin-left:6px}
.gt-tip{margin-left:auto;color:var(--c-ink-3,#8C8378)}
.gt-scroll{overflow-x:auto;border-radius:12px;background:#FFFFFF;box-shadow:inset 0 0 0 1px #EEE8DF;overscroll-behavior-x:contain}
.gt-chart{display:inline-block;min-width:100%}
.gt-row{display:flex;align-items:stretch;border-top:1px solid #F1ECE4;min-height:40px}
.gt-row:first-child{border-top:0}
.gt-label{position:sticky;left:0;z-index:3;flex:none;width:200px;box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;gap:1px;padding:5px 10px;
  background:#FFFFFF;border:0;border-right:1px solid #EEE8DF;text-align:left;font:inherit;cursor:pointer;color:var(--c-ink,#2B2B2C)}
button.gt-label:hover .gt-name{color:var(--wrb-clay,#9B6344)}
button.gt-label:focus-visible{outline:2px solid var(--wrb-clay,#9B6344);outline-offset:-2px}
.gt-row.sel .gt-label{background:#FBF8F3}
.gt-name{font-size:13px;font-weight:650;line-height:1.2}
.gt-sub{font-size:11px;color:var(--c-ink-3,#8C8378)}
.gt-warn{color:var(--c-bad,#9B4A33);font-weight:800}
.gt-corner{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:var(--c-ink-2,#6A6259);cursor:default}
.gt-track{position:relative;flex:none}
.gt-headrow{min-height:48px;position:sticky;top:0;z-index:4;background:#FFFFFF}
.gt-axis{height:48px}
.gt-wk{position:absolute;top:3px;font-size:10.5px;font-weight:700;color:var(--c-ink-2,#6A6259);padding-left:3px;white-space:nowrap}
.gt-d{position:absolute;bottom:3px;width:var(--gt-day);text-align:center;font-size:9.5px;line-height:1.1;color:var(--c-ink-3,#8C8378)}
.gt-d b{display:block;font-size:11px;color:var(--c-ink-2,#6A6259);font-weight:600}
.gt-d.today b{color:#FFFFFF;background:var(--c-info,#3E6C8C);border-radius:999px;margin:0 4px}
.gt-wkline{position:absolute;top:0;bottom:0;width:0;border-left:1px solid #EEE8DF}
.gt-today{position:absolute;top:0;bottom:0;width:0;border-left:2px solid color-mix(in srgb,var(--c-info,#3E6C8C) 55%,transparent);z-index:1;pointer-events:none}
.gt-bar{position:absolute;top:7px;bottom:7px;border-radius:6px;display:flex;align-items:center;gap:6px;padding:0 8px;overflow:hidden;z-index:2;
  font-size:11.5px;font-weight:600;white-space:nowrap;user-select:none;-webkit-user-select:none}
.gt-bar.confirmed{background:var(--wrb-clay,#9B6344);color:#FFFFFF}
.gt-bar.suggested{background:#F6EEE8;color:var(--wrb-clay-deep,#7E4F35);border:1.5px dashed #C49C83}
.gt-bar.done{background:#E7E1D8;color:var(--c-ink-2,#6A6259)}
.gt-bar.clash{box-shadow:0 0 0 2px var(--c-bad,#9B4A33)}
.gt-bar.drag{cursor:grab;touch-action:none}
.gt-bar.dragging{cursor:grabbing;opacity:.85;z-index:5;box-shadow:0 4px 14px rgba(43,43,44,.22)}
.gt-bar:focus-visible{outline:2px solid var(--c-info,#3E6C8C);outline-offset:2px}
.gt-bar-text{overflow:hidden;text-overflow:ellipsis;min-width:0}
.gt-bay{margin-left:auto;font-size:10px;font-weight:700;opacity:.75}
.gt-h{position:absolute;top:0;bottom:0;width:10px;cursor:ew-resize;z-index:1}
.gt-h.l{left:0}.gt-h.r{right:0}
.gt-h::after{content:"";position:absolute;top:30%;bottom:30%;left:4px;width:2px;border-radius:1px;background:currentColor;opacity:.35}
.gt-err{font-size:12.5px;font-weight:600;color:var(--c-bad,#9B4A33)}
.gt-chip{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;padding:2px 4px 2px 9px;border-radius:999px;background:#FFFFFF;box-shadow:inset 0 0 0 1px #E3DDD4}
.gt-chip.clash{background:#F6E9E4;color:var(--c-bad,#9B4A33);font-weight:700}
.gt-chip-x{border:0;background:none;cursor:pointer;font-size:11px;color:var(--c-ink-3,#8C8378);padding:2px 5px;border-radius:999px}
.gt-chip-x:hover{background:#F2EEE8;color:var(--c-ink,#2B2B2C)}
.gt-clash{font-size:12.5px;font-weight:600;color:var(--c-bad,#9B4A33)}
.gt-done{font-size:12.5px;color:var(--c-ink-2,#6A6259)}
.gt-list{display:none}
.gt-card{display:grid;grid-template-columns:1fr auto;gap:2px 10px;width:100%;text-align:left;font:inherit;padding:10px 12px;border:0;border-top:1px solid #F1ECE4;background:#FFFFFF;cursor:pointer;color:var(--c-ink,#2B2B2C)}
.gt-card:first-child{border-top:0}
.gt-card.suggested .gt-card-name em{font-style:normal;font-size:11px;color:var(--wrb-clay-deep,#7E4F35);background:#F6EEE8;border-radius:999px;padding:0 6px;margin-left:4px}
.gt-card-name{font-weight:650;font-size:13.5px}
.gt-card-days{font-size:12.5px;font-variant-numeric:tabular-nums;text-align:right}
.gt-card-crew{grid-column:1 / -1;font-size:12px;color:var(--c-ink-2,#6A6259)}
@media (max-width:640px){
  .gt-scroll{display:none}
  .gt-list{display:block;border-radius:12px;background:#FFFFFF;box-shadow:inset 0 0 0 1px #EEE8DF;overflow:hidden}
  .gt-tip{display:none}
  .gt-actions{width:100%}
}
@media print{.gt-actions,.gt-legend .gt-tip{display:none !important}}
/* Settings → Stage crews (2026-11-03) */
.scd-list{display:flex;flex-direction:column;gap:2px;margin:6px 0 10px}
.scd-row{display:grid;grid-template-columns:150px 1fr auto;gap:8px;align-items:center;padding:5px 0;border-top:1px solid #F1ECE4}
.scd-row:first-child{border-top:0}
.scd-stage{font-size:13px;font-weight:600}
.scd-chips{display:flex;flex-wrap:wrap;gap:4px}
.scd-chip{display:inline-flex;align-items:center;gap:2px;font-size:12px;padding:1px 3px 1px 8px;border-radius:999px;background:#F2EEE8}
.scd-x{border:0;background:none;cursor:pointer;font-size:10.5px;padding:1px 4px;color:var(--c-ink-3,#8C8378)}
.scd-add{font:inherit;font-size:12px;padding:3px 5px;border-radius:6px;max-width:150px}
.scd-tpl{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;font-size:13px;padding-top:8px;border-top:1px solid #EEE8DF}
@media (max-width:640px){.scd-row{grid-template-columns:1fr auto}.scd-chips{grid-column:1 / -1;grid-row:2}}
/* The Stages tab gets the room it needs (2026-11-03): the build window widens to nearly the whole
   screen, leaving a strip of the list behind it, and the chart fits that width (app.js fitGantt).
   Other tabs keep the 760 px sheet. Phones are full width already. */
@media (min-width:641px){
  #buildModal.gt-wide{width:calc(100vw - 72px);max-width:2400px}
}
.gt-chart.narrow .gt-d:not(.wk0):not(.today){color:transparent}
.gt-chart.narrow .gt-d:not(.wk0):not(.today) b{color:transparent}
.gt-chart.narrow .gt-bay{display:none}
.gt-chart.narrow .gt-bar{padding:0 5px}
/* Fitting the height (2026-11-03): rows take --gt-row (26-40 px, app.js fitGantt); the build
   window's footer (Delete / Duplicate / Close) is hidden on the Stages tab, where the ✕ closes it. */
.gt-row:not(.gt-headrow){min-height:var(--gt-row,40px)}
.gt-track{overflow:hidden}
.gt-chart.compact .gt-label{flex-direction:row;align-items:center;justify-content:space-between;gap:6px;padding:2px 10px}
.gt-chart.compact .gt-name{font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.gt-chart.compact .gt-sub{font-size:10.5px;white-space:nowrap;flex:none}
.gt-chart.compact .gt-bar{top:3px;bottom:3px;font-size:11px}
@media (min-width:641px){#buildModal.gt-wide .modal-foot{display:none}}
/* Named crews (2026-11-03): Settings → Stage crews → Crews, and the shared-person note. */
.scd-crews{display:flex;flex-direction:column;gap:8px;padding:10px 0;border-top:1px solid #EEE8DF}
.scd-sub{font-size:13px;font-weight:700}
.scd-sub .td-sub{font-weight:400;margin-left:6px}
.scd-crew{display:flex;flex-direction:column;gap:6px;padding:9px 11px;border-radius:10px;background:#FBF8F3;box-shadow:inset 0 0 0 1px #EEE8DF}
.scd-crew-head{display:flex;align-items:center;gap:8px}
.scd-crew-name{font:inherit;font-weight:700;font-size:13.5px;padding:3px 7px;border-radius:6px;border:1px solid #E3DDD4;background:#FFFFFF;min-width:0;flex:1;max-width:260px}
.scd-crew-stages{display:flex;flex-wrap:wrap;gap:4px 10px}
.scd-tick{display:inline-flex;align-items:center;gap:4px;font-size:12px;cursor:pointer}
.scd-chip.scd-group{background:#F3E7DF;color:var(--wrb-clay-deep,#7E4F35);font-weight:700;padding-right:8px}
.gt-share{color:var(--c-info,#3E6C8C);font-weight:800}
.gt-chip.share{background:#EAF0F5;color:var(--c-info,#3E6C8C)}
.gt-shared{font-size:12.5px;color:var(--c-info,#3E6C8C)}
/* The Stage crews card spans the Settings grid: 21 stages × names need the width. */
.settings-grid > .scd-card{grid-column:1 / -1}
.scd-chip{white-space:nowrap}
.scd-crews .scd-chips{align-items:center}
/* Finished stages on the Stages tab (2026-11-03): tap for their crew. */
.gt-done{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.gt-done-label{font-size:12px;font-weight:700;color:var(--c-ink-2,#6A6259);margin-right:2px}
.gt-done-chip{font:inherit;font-size:12px;padding:3px 10px;border-radius:999px;border:0;background:#E7E1D8;color:var(--c-ink,#2B2B2C);cursor:pointer}
.gt-done-chip.sel{background:#D9CFC2}
.gt-done-chip:focus-visible{outline:2px solid var(--wrb-clay,#9B6344);outline-offset:2px}
.gt-done + .gt-detail{border-radius:10px;border-top:0;box-shadow:inset 0 0 0 1px #EEE8DF}
/* Timeline: stages by week under each signed build's bar (2026-11-03). The strip sits below the
   row's normal height, so the bar, plan ghost and markers stay where they were. */
.g-row.has-stages .g-label,.g-row.has-stages .g-track{height:calc(var(--g-row-h) + 18px)}
.g-stages{position:absolute;left:0;right:0;top:calc(var(--g-row-h) - 2px);height:16px}
.g-stg{position:absolute;top:0;height:16px;border-radius:4px;padding:0 5px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
  font-size:10px;font-weight:700;line-height:16px;letter-spacing:.01em;cursor:pointer;
  background:#F6EEE8;color:var(--wrb-clay-deep,#7E4F35);box-shadow:inset 0 0 0 1px #D9BFAE}
.g-stg.set{background:var(--wrb-clay,#9B6344);color:#FFFFFF;box-shadow:none}
.g-stg:hover{filter:brightness(.96)}
@media print{
  .g-stg{background:#fff !important;color:#000 !important;box-shadow:inset 0 0 0 0.5pt #555 !important}
  .g-stg.set{background:#ddd !important}
}
/* Stage details (2026-11-03): a panel that floats beside the stage column, level with the stage's
   name (app.js placeGtPop), so no row moves; opened only from the stage name. On phones it sits
   under the tapped card instead. */
.gt{position:relative}
.gt-pop{position:absolute;z-index:8;width:min(380px,calc(100% - 220px));max-height:calc(100vh - 140px);overflow:auto;
  background:#FFFFFF;border-radius:14px;box-shadow:0 1px 2px rgba(43,43,44,.06),0 14px 40px rgba(43,43,44,.18),inset 0 0 0 1px #E9E2D8}
.gt-detail{display:flex;flex-direction:column;gap:12px;padding:14px 16px 16px;font-size:13px}
.gt-list .gt-detail{background:#FBF8F3;border-top:1px dashed #E3DDD4}
.gt-dl-top{display:flex;align-items:flex-start;gap:10px}
.gt-dl-titles{flex:1;min-width:0}
.gt-dl-title{font-size:15px;font-weight:700;color:var(--c-ink,#2B2B2C);display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.gt-dl-meta{font-size:12.5px;color:var(--c-ink-2,#6A6259);margin-top:2px;font-variant-numeric:tabular-nums}
.gt-x{flex:none;border:0;background:#F2EEE8;color:var(--c-ink-2,#6A6259);width:28px;height:28px;border-radius:999px;cursor:pointer;font-size:12px}
.gt-x:hover{background:#E9E2D7;color:var(--c-ink,#2B2B2C)}
.gt-x:focus-visible{outline:2px solid var(--wrb-clay,#9B6344);outline-offset:2px}
.gt-pill{font-size:10.5px;font-weight:700;padding:1px 7px;border-radius:999px;letter-spacing:.01em}
.gt-pill.sug{background:#F6EEE8;color:var(--wrb-clay-deep,#7E4F35);box-shadow:inset 0 0 0 1px #D9BFAE}
.gt-pill.set{background:var(--wrb-clay,#9B6344);color:#FFFFFF}
.gt-pill.done{background:#E7E1D8;color:var(--c-ink-2,#6A6259)}
.gt-why{margin:0;font-size:12.5px;line-height:1.45;color:var(--c-ink-2,#6A6259);padding:8px 10px;border-radius:9px;background:#FAF7F2}
.gt-dl-sec{display:flex;flex-direction:column;gap:8px;padding-top:10px;border-top:1px solid #F1ECE4}
.gt-dl-h{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--c-ink-3,#8C8378)}
.gt-dl-h em{font-style:normal;text-transform:none;letter-spacing:0;font-weight:500;margin-left:4px}
.gt-days{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.gt-date{display:flex;flex-direction:column;gap:3px;font-size:11.5px;font-weight:600;color:var(--c-ink-2,#6A6259)}
.gt-date input{font:inherit;font-size:13px;font-weight:500;color:var(--c-ink,#2B2B2C);padding:6px 8px;border-radius:8px;border:1px solid #E3DDD4;background:#FFFFFF;min-width:0}
.gt-dl-actions{display:flex;gap:6px;flex-wrap:wrap}
.gt-crew{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.gt-crew-add{font:inherit;font-size:13px;padding:6px 8px;border-radius:8px;border:1px solid #E3DDD4;background:#FFFFFF;width:100%}
.gt-notes{display:flex;flex-direction:column;gap:4px}
@media (max-width:640px){.gt-pop{display:none}}

/* ------------------------------- Timeline view controls (2026-11-03) -- */
/* One toolbar beside Print: Stages, zoom, Today. Applied filters as chips on the left, each
   removable, with Clear all. */
.tl-bar{display:flex;align-items:flex-start;justify-content:space-between;gap:10px 16px;flex-wrap:wrap;margin:0 0 10px}
.tl-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;min-height:32px;flex:1 1 280px}
.tl-chip{display:inline-flex;align-items:center;gap:4px;font-size:12.5px;padding:3px 4px 3px 10px;border-radius:999px;background:#FFFFFF;box-shadow:inset 0 0 0 1px #E3DDD4;color:var(--c-ink,#2B2B2C);max-width:340px}
.tl-chip-k{font-weight:700;color:var(--c-ink-2,#6A6259)}
.tl-chip-v{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.tl-chip-x{border:0;background:none;width:20px;height:20px;border-radius:999px;cursor:pointer;font-size:10.5px;color:var(--c-ink-3,#8C8378);flex:none}
.tl-chip-x:hover{background:#F2EEE8;color:var(--c-ink,#2B2B2C)}
.tl-clear{border:0;background:none;font:inherit;font-size:12.5px;font-weight:600;color:var(--wrb-clay-deep,#7E4F35);cursor:pointer;padding:3px 6px}
.tl-clear:hover{text-decoration:underline;text-underline-offset:2px}
.tl-controls{display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.seg{display:inline-flex;border-radius:9px;background:#EEE8DF;padding:2px}
.seg button{font:inherit;font-size:12.5px;font-weight:600;border:0;background:none;padding:5px 10px;border-radius:7px;color:var(--c-ink-2,#6A6259);cursor:pointer}
.seg button[aria-pressed="true"]{background:#FFFFFF;color:var(--c-ink,#2B2B2C);box-shadow:0 1px 2px rgba(43,43,44,.12)}
.seg button:focus-visible,.tl-chip-x:focus-visible,.tl-clear:focus-visible{outline:2px solid var(--wrb-clay,#9B6344);outline-offset:2px}
.g-legend .lg i.stg-key{width:16px;height:9px;border-radius:2px;background:var(--wrb-clay,#9B6344)}
.g-legend .lg i.stg-key.sug{background:#F6EEE8;box-shadow:inset 0 0 0 1px #D9BFAE}

/* Filter menu (ui/filter-menu.js) */
.fm{position:relative}
.fm-btn{display:inline-flex;align-items:center;gap:6px;font:inherit;font-size:12.5px;padding:6px 10px;border-radius:9px;border:1px solid #E3DDD4;background:#FFFFFF;color:var(--c-ink,#2B2B2C);cursor:pointer;max-width:240px}
.fm-btn:hover{border-color:#CFC7BB}
.fm-btn:focus-visible{outline:2px solid var(--wrb-clay,#9B6344);outline-offset:2px}
.fm-label{font-weight:700}
.fm-value{color:var(--c-ink-2,#6A6259);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fm.active .fm-btn{background:#F6EEE8;border-color:#D9BFAE}
.fm.active .fm-value{color:var(--wrb-clay-deep,#7E4F35);font-weight:700}
.fm-chev{flex:none;color:var(--c-ink-3,#8C8378);transition:transform 160ms cubic-bezier(.23,1,.32,1)}
.fm.open .fm-chev{transform:rotate(180deg)}
.fm-pop{position:absolute;top:calc(100% + 6px);right:0;z-index:30;width:300px;max-height:min(520px,70vh);display:flex;flex-direction:column;
  background:#FFFFFF;border-radius:12px;box-shadow:0 1px 2px rgba(43,43,44,.06),0 14px 40px rgba(43,43,44,.18),inset 0 0 0 1px #E9E2D8;transform-origin:top right}
.fm-pop[hidden]{display:none}
.fm-pop:not([hidden]){animation:fm-in 140ms cubic-bezier(.23,1,.32,1)}
@keyframes fm-in{from{opacity:0;transform:translateY(-4px) scale(.98)}}
.fm-sheet-head{display:none}
.fm-top{display:flex;gap:6px;align-items:center;padding:10px 10px 6px}
.fm-search{flex:1;min-width:0;font:inherit;font-size:13px;padding:6px 9px;border-radius:8px;border:1px solid #E3DDD4;background:#FAF7F2}
.fm-search:focus{outline:2px solid var(--wrb-clay,#9B6344);outline-offset:0;background:#FFFFFF}
.fm-bulk{display:inline-flex;gap:2px;flex:none}
.fm-bulk button{font:inherit;font-size:12px;font-weight:600;border:0;background:none;color:var(--wrb-clay-deep,#7E4F35);padding:4px 6px;border-radius:6px;cursor:pointer}
.fm-bulk button:hover{background:#F6EEE8}
.fm-list{overflow:auto;padding:2px 6px 8px;overscroll-behavior:contain}
.fm-group{padding:2px 0}
.fm-group + .fm-group{border-top:1px solid #F1ECE4;margin-top:2px;padding-top:4px}
.fm-ghead,.fm-opt{display:flex;align-items:center;gap:8px;padding:5px 6px;border-radius:7px;cursor:pointer;font-size:13px}
.fm-ghead{font-weight:700;font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--c-ink-2,#6A6259)}
.fm-opt{padding-left:24px}
.fm-group:not(:has(.fm-ghead)) .fm-opt{padding-left:6px}
.fm-ghead:hover,.fm-opt:hover{background:#FAF7F2}
.fm-ghead input,.fm-opt input{accent-color:var(--wrb-clay,#9B6344);width:15px;height:15px;margin:0;flex:none}
.fm-opt-label{flex:1;min-width:0;display:flex;flex-direction:column}
.fm-sub{font-size:11px;color:var(--c-ink-3,#8C8378)}
.fm-count{font-size:11.5px;font-variant-numeric:tabular-nums;color:var(--c-ink-2,#6A6259);background:#F2EEE8;border-radius:999px;padding:0 7px;min-width:22px;text-align:center}
.fm-count.zero{background:none;color:#C4BBAF}
.fm-empty{margin:8px;font-size:12.5px;color:var(--c-ink-3,#8C8378)}
.fm-foot{padding:8px 12px;border-top:1px solid #F1ECE4;font-size:12.5px}
.fm-check{display:flex;align-items:center;gap:8px;cursor:pointer}
.fm-check input{accent-color:var(--wrb-clay,#9B6344)}
.fm-hint{display:block;font-size:12px;line-height:1.4;color:var(--c-ink-2,#6A6259)}
@media (max-width:640px){
  .tl-controls{width:100%;justify-content:flex-start}
  .fm-pop{position:fixed;left:0;right:0;bottom:0;top:auto;width:auto;max-height:78vh;border-radius:16px 16px 0 0;transform-origin:bottom center}
  .fm-pop:not([hidden]){animation:fm-sheet 220ms cubic-bezier(.32,.72,0,1)}
  @keyframes fm-sheet{from{transform:translateY(100%)}}
  .fm-sheet-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px 4px;font-size:15px}
  .fm-done{border:0;background:var(--wrb-clay,#9B6344);color:#FFFFFF;font:inherit;font-weight:700;font-size:13px;padding:6px 14px;border-radius:999px}
  .fm-ghead,.fm-opt{padding-top:9px;padding-bottom:9px}
}
@media (prefers-reduced-motion:reduce){.fm-pop:not([hidden]){animation:none}.fm-chev{transition:none}}
@media print{
  .tl-controls,.tl-chip-x,.tl-clear{display:none !important}
  .tl-chip{box-shadow:none !important;padding:0 8px 0 0 !important;font-size:9pt !important}
}

/* ------------------------------------------- Move-day update: list and detail (2026-11-03) -- */
/* claude/production-stage-gantt-spec.md section 16. The queue on the left, the chosen build on the right. */
.md .md-top{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,240px) auto;gap:10px 22px;align-items:end;margin-bottom:12px}
.md .md-title h2{margin-bottom:2px}
.md .md-title .panel-sub{margin:0}
.md .wk-count{margin:0 0 5px}
.md-bar{height:6px;border-radius:var(--c-r-pill);background:#EEE8DF;overflow:hidden}
.md-bar > span{display:block;height:100%;background:var(--c-ok);border-radius:inherit;transition:width .25s cubic-bezier(.23,1,.32,1)}
.md-n{display:inline-block;min-width:1.4em;margin-left:3px;padding:0 5px;border-radius:var(--c-r-pill);background:rgba(43,43,44,.07);font-size:11.5px;font-variant-numeric:tabular-nums;text-align:center}
.md .seg button:disabled{opacity:.45;cursor:default}
.md-split{display:grid;grid-template-columns:minmax(220px,270px) minmax(0,1fr);gap:16px;align-items:start}
.md-list{position:sticky;top:12px;max-height:calc(100vh - 150px);overflow:auto;border:1px solid var(--c-sep);border-radius:var(--c-r-sm);background:var(--c-group);padding:4px}
.md-group{display:flex;justify-content:space-between;padding:10px 8px 4px;font-size:11.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--c-ink-3)}
.md-group span{font-weight:600;letter-spacing:0;font-variant-numeric:tabular-nums}
.md-item{display:grid;grid-template-columns:10px minmax(0,1fr) auto;grid-template-areas:"dot name where" "dot state warn";gap:1px 8px;align-items:center;width:100%;text-align:left;font:inherit;border:0;background:none;padding:7px 8px;border-radius:7px;cursor:pointer;color:var(--c-ink)}
.md-item:hover{background:#FAF7F2}
.md-item.on{background:#F3EDE4;box-shadow:inset 3px 0 0 var(--c-accent)}
.md-item:focus-visible{outline:2px solid var(--c-accent);outline-offset:-2px}
.md-dot{grid-area:dot;width:8px;height:8px;border-radius:50%;background:var(--c-warn)}
.md-item.done .md-dot{background:var(--c-ok)}
.md-item-name{grid-area:name;font-weight:600;font-size:13.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.md-item-where{grid-area:where;font-size:12px;color:var(--c-ink-2);white-space:nowrap;font-variant-numeric:tabular-nums}
.md-item-state{grid-area:state;font-size:11.5px;color:var(--c-ink-3)}
.md-item:not(.done) .md-item-state{color:#8c6820;font-weight:600}   /* warn text, darkened for 4.5:1 (WRB standard) */
.md-warn{grid-area:warn;justify-self:end;color:var(--c-bad);font-size:12px}
.md-empty{padding:18px 10px;color:var(--c-ink-2);font-size:13px;text-align:center}
.md-detail{border:1px solid var(--c-sep);border-radius:var(--c-r-sm);background:var(--c-group);padding:14px 16px;min-width:0;
  display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"head actions" "where where" "prog prog";column-gap:16px}
.md-d-head{grid-area:head;min-width:0}
.md-sec-where{grid-area:where}
.md-sec-prog{grid-area:prog}
.md-back{display:none}
.md-d-head h3{margin:0 0 4px;font-size:18px}
.md-d-head h3 .status-check-name{cursor:pointer}
.md-d-meta{display:flex;flex-wrap:wrap;gap:4px 14px;font-size:12.5px;color:var(--c-ink-2);font-variant-numeric:tabular-nums}
.md-d-meta .wk-upd{font-size:12.5px}
.md-sec{margin-top:16px;padding-top:12px;border-top:1px solid #EEE8DF}
.md-sec h4{margin:0 0 8px;font-size:13px;font-weight:700;color:var(--c-ink)}
.md-sec h4 .td-sub{font-weight:500}
.md-where{display:flex;flex-wrap:wrap;gap:2px}
.md-where button{display:inline-flex;flex-direction:column;align-items:flex-start;line-height:1.2;padding:6px 12px;min-height:40px;justify-content:center}
.md-where button small{font-size:11px;font-weight:500;color:var(--c-ink-3)}
.md-where button[aria-pressed="true"] small{color:var(--c-ink-2)}
.md-moved{margin-top:8px;font-size:12.5px;color:var(--c-ink-2)}
.md-moved .linkish{font:inherit;border:0;background:none;padding:0;color:var(--c-accent);text-decoration:underline;cursor:pointer}
.md-other{margin-top:8px}
/* Stages fill the width in columns (Aaron, 2026-11-04: "so I don't have to scroll down to see all of them"). */
.md-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(215px,1fr));gap:2px 18px}
.md-stage{min-width:0;padding:5px 0;border-bottom:1px solid #F1ECE4}
.md-stage-top{display:flex;align-items:center;gap:6px;margin-bottom:2px;min-height:22px}
.md-stage-top .md-stage-name{flex:1 1 auto}
.md-stage-top .qb-hint{flex:none;padding:0 5px;font-size:11px;line-height:18px}
.md-stage-bar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.md-stage-bar > .pg, .md-stage-bar > .qb-hint{flex:none}
.md-stage-name{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.md-stage-h{font-size:12px;font-variant-numeric:tabular-nums;white-space:nowrap}
.md-stage-chk .md-stage-name, .md-stage-chk .md-stage-h{color:var(--c-bad);font-weight:600}
.md-none{margin:2px 0 6px}
.md-more{margin-top:8px}
.md-more > summary{cursor:pointer;font-size:12.5px;font-weight:600;color:var(--c-ink-2);padding:4px 0;list-style-position:inside}
.md-more > summary:focus-visible{outline:2px solid var(--c-accent);outline-offset:2px;border-radius:4px}
.md-actions{grid-area:actions;align-self:start;display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px 10px}
.md-actions .md-saved{order:-1}
.md-actions .btn{min-height:40px}
.md-actions .btn:active{transform:scale(.97)}
.md-saved{font-size:12.5px;color:var(--c-ok);font-weight:600}
.md-keys{margin:10px 0 0}
.md-keys kbd{display:inline-block;min-width:1.5em;padding:0 4px;margin:0 1px;border:1px solid var(--c-sep-strong);border-bottom-width:2px;border-radius:4px;background:#fff;font:600 11px/1.5 inherit;text-align:center}
/* Tablets and phones: the list, then one build at a time (2026-11-03: the floor, later). */
@media (max-width:860px){
  .md .md-top{grid-template-columns:1fr}
  .md-split{grid-template-columns:1fr}
  .md-list{position:static;max-height:none}
  .md-split.md-pane-detail .md-list{display:none}
  .md-split:not(.md-pane-detail) .md-detail{display:none}
  .md-back{display:inline-flex;margin:0 0 8px;font:inherit;font-size:13px;font-weight:600;border:0;background:none;padding:6px 0;color:var(--c-accent);cursor:pointer;min-height:40px;align-items:center}
  .md-keys{display:none}
  .md-item{padding:11px 8px}
  .md-detail{grid-template-columns:1fr;grid-template-areas:"head" "where" "prog" "actions"}
  .md-actions{justify-content:stretch;margin-top:16px;padding-top:12px;border-top:1px solid #EEE8DF}
  .md-actions .md-saved{order:0;flex-basis:100%}
  .md-actions .btn{flex:1 1 auto}
}
@media (min-width:861px){.md-stage .pg-seg{width:5px}.md-stage .pg-track{height:18px}.md-stage .pg-num{width:48px}}   /* narrower bars so more columns fit; the % box stays for exact values */
@media (prefers-reduced-motion:reduce){.md-bar > span{transition:none}}
@media print{.md-list,.md-actions,.md-keys,.md-show,.md-back{display:none !important}.md-split{display:block}}
body.ui-v2 #weeklyRoot .md-title > h2{display:none}   /* the page header already names it (as F3) */
.md-sec h4 .td-sub{display:inline}
.md-saved.md-err{color:var(--c-bad)}
.md-saved .linkish,.md-errbar .linkish{font:inherit;border:0;background:none;padding:0;color:var(--c-accent);text-decoration:underline;cursor:pointer}
.md-errbar{margin:0 0 10px;padding:8px 12px;border-left:3px solid var(--c-bad);background:#FBF1EE;font-size:13px;color:var(--c-ink)}
.md .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* Fit a whole build on one screen (2026-11-04): the bay choice sits beside its label, cells are tighter. */
@media (min-width:861px){
  .md-sec-where{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
  .md-sec-where > h4{margin:0}
  .md-sec-where > .md-moved, .md-sec-where > .md-other{flex-basis:100%}
  .md-sec{margin-top:12px;padding-top:10px}
  .md-stage{padding:3px 0}
  .md-stage-top{min-height:18px;margin-bottom:1px}
  .md .md-top{margin-bottom:8px}
}

/* ------------------------------------------- Hours: fit to screen, menus, sort, shading (2026-11-04) -- */
/* hours-view.js has the rules. The page stops scrolling; the table scrolls inside (fitHoursGrid). */
.hours-filters.bh-toolbar{gap:8px;margin-bottom:8px}
.bh-toolbar .hf-search{min-width:200px;flex:0 1 240px}
.bh-toolbar .bh-tools{margin-left:auto;display:inline-flex;flex-wrap:wrap;gap:8px;align-items:center}
.hours-filters.bh-toolbar .btn{margin-left:0}
.bh-toggle[aria-pressed="true"]{background:#F3EDE4;border-color:var(--c-accent);color:var(--c-ink)}
.bh-toggle[aria-pressed="true"]::before{content:"✓ ";font-weight:700;color:var(--c-accent)}
.bh-chips{display:flex;flex-wrap:wrap;gap:6px;align-items:center;margin:0 0 8px}
.bh-legend{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;margin:0 0 8px;font-size:11.5px}
.bh-sw{display:inline-block;width:14px;height:10px;border-radius:2px;margin-right:2px;vertical-align:-1px;border:1px solid rgba(0,0,0,.06)}
/* Sortable headers: the whole label is the button; ▲/▼ shows the current sort. */
.hours-grid thead th .bh-sort{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:flex-end;gap:3px;max-width:100%;font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit}
.hours-grid thead th .bh-sort:hover{color:var(--c-ink)}
.hours-grid thead th .bh-sort:focus-visible{outline:2px solid var(--c-accent);outline-offset:2px;border-radius:3px}
.hours-grid thead th .bh-sort .th-label{cursor:pointer}
.bh-sort-i{display:inline-block;width:8px;flex:none;font-size:8px;line-height:1;color:var(--c-accent)}
.bh-sort.on.asc .bh-sort-i::before{content:"▲"}
.bh-sort.on.desc .bh-sort-i::before{content:"▼"}
.hours-grid thead th[aria-sort]{color:var(--c-ink)}
/* Shading vs standard: a light scale, the number stays readable (4.5:1 on every step). */
.bh-shade-over1, .bh-cell.bh-shade-over1 .bh-input{background:#F7E9E1}
.bh-shade-over2, .bh-cell.bh-shade-over2 .bh-input{background:#EFCFBE}
.bh-shade-over3, .bh-cell.bh-shade-over3 .bh-input{background:#E3AE95}
.bh-shade-under, .bh-cell.bh-shade-under .bh-input{background:#E2ECDD}
.bh-cell.bh-shade-over3 .bh-input{font-weight:700}
/* Row size */
.hours-grid-wrap.bh-compact .hours-grid tbody td{padding-top:0;padding-bottom:0}
.hours-grid-wrap.bh-compact .bh-input{height:22px;font-size:11.5px}
.hours-grid-wrap.bh-compact .bh-name{padding-top:2px;padding-bottom:2px}
.hours-grid-wrap.bh-compact .bh-name-inner{font-size:11.5px}
@media (max-width:860px){ .bh-toolbar .bh-tools{margin-left:0} .bh-toolbar .hf-search{flex:1 1 100%} }
@media print{ .bh-toolbar, .bh-chips, .bh-legend{display:none !important} .hours-grid-wrap{max-height:none !important} }

/* ------------------------------------------- Reports: one report per tab (2026-11-04) -- */
.rep-view > .dash-grid:first-child, .rep-view > section:first-child{margin-top:0 !important}
.rep-view-history #historyTimeline{max-height:calc(100vh - 300px);overflow:auto}
@media (max-width:860px){ .rep-view-history #historyTimeline{max-height:none} }
/* Reports tabs, fitted (2026-11-04): the page header names the screen; the long tables use the width or scroll inside. */
body.ui-v2 #reportsRoot .rep-view-overview > .rep-head .rep-title{display:none}
body.ui-v2 #reportsRoot .rep-view-overview > .rep-head .panel-sub{margin:0}
#reportsRoot .rep-view-overview > .rep-head{margin-bottom:10px}
#reportsRoot .rep-view-overview .bar-chart{height:150px}
@media (min-width:861px){
  .rep-view-load .rep-load-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .rep-view-load .rep-load-table tbody{display:grid;grid-auto-flow:column;grid-template-rows:repeat(var(--load-rows,11),auto);column-gap:32px}
  .rep-view-load .rep-load-table tbody tr{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,2fr) 48px;align-items:center;border-bottom:1px solid #F1ECE4}
  .rep-view-load .rep-load-table td{border:0;padding:7px 6px}
  .rep-view-load .rep-load-table .mini-bar-wrap{width:calc(100% - 52px);max-width:none}
  .rep-view-load .rep-load-table td:last-child{text-align:right;color:var(--c-ink-2)}
}

/* ------------------------------------------- Settings: grouped list + one section (2026-11-04) -- */
/* settings-nav.js has the rules. Every section is laid out the same way: title, one line, its settings. */
.set-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:22px;align-items:start}
.set-nav{position:sticky;top:12px;display:flex;flex-direction:column;gap:10px;max-height:calc(100vh - 160px);overflow:auto;padding:2px}
.set-search{width:100%;box-sizing:border-box;padding:8px 10px;border:1px solid var(--c-sep-strong);border-radius:10px;background:#fff;font:inherit;font-size:13px}
.set-search:focus-visible{outline:2px solid var(--c-accent);outline-offset:1px}
.set-group{display:flex;flex-direction:column;gap:1px}
.set-group-h{padding:8px 10px 3px;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#6a6259}
.set-link{display:block;padding:7px 10px;border-radius:8px;color:var(--c-ink);text-decoration:none;font-size:13.5px;font-weight:500}
.set-link:hover{background:rgba(255,255,255,.6)}
.set-link[aria-current="page"]{background:#fff;font-weight:700;box-shadow:inset 3px 0 0 var(--c-accent)}
.set-link:focus-visible{outline:2px solid var(--c-accent);outline-offset:-2px}
.set-none{padding:8px 10px}
.set-nav .settings-intro{font-size:12px;line-height:1.5;color:#6a6259;margin:10px 10px 0}
.set-main{min-width:0}
.set-back{display:none}
.set-main .settings-grid{display:block}
.set-main .settings-grid > .settings-card{grid-column:auto;width:auto;max-width:none;padding:22px 24px}
.set-main .settings-grid > .settings-card[hidden]{display:none !important}
.set-main .settings-card > h3.set-title{font-family:inherit;font-size:20px;font-weight:700;letter-spacing:-.01em;text-transform:none;margin:0 0 4px;display:flex;align-items:center;gap:8px}
.set-main .set-desc{margin:0 0 18px;padding-bottom:14px;border-bottom:1px solid var(--c-sep);color:#6a6259;font-size:13.5px}
.set-main .set-import{margin:18px 0 0;padding-top:14px;border-top:1px solid var(--c-sep)}
@media (max-width:860px){
  .set-layout{grid-template-columns:1fr}
  .set-nav{position:static;max-height:none}
  .set-layout.set-pane-section .set-nav{display:none}
  .set-layout:not(.set-pane-section) .set-main{display:none}
  .set-back{display:inline-flex;align-items:center;min-height:40px;margin:0 0 8px;padding:0;border:0;background:none;font:inherit;font-weight:600;color:var(--c-accent);cursor:pointer}
  .set-main .settings-grid > .settings-card{padding:16px}
}
@media print{ .set-nav, .set-back{display:none !important} .set-layout{display:block} }
/* Sections have the whole width now (2026-11-04): lists show in full (the page scrolls, not a box
   inside it), and each crew member is one row: name, role, started, left, remove. */
.set-main .opt-list, .set-main .crew-edit-list{max-height:none;overflow:visible}
@media (min-width:861px){
  .set-main .crew-edit-row.crew-dated{grid-template-columns:minmax(160px,1.4fr) minmax(140px,1fr) 150px 150px 28px;grid-template-areas:"name role start end del";padding:6px 9px}
  .set-main .crew-edit-row.crew-dated > .ce-date:nth-of-type(1){grid-area:start}
  .set-main .crew-edit-row.crew-dated > .ce-date:nth-of-type(2){grid-area:end}
  .set-main .crew-edit-list{gap:4px}
  .set-main .add-crew-row{display:grid;grid-template-columns:minmax(160px,1.4fr) minmax(140px,1fr) 150px auto;gap:7px;align-items:end}
  .set-main .crew-filter{max-width:340px}
}
/* Reports → Build hours and Build history filters (2026-11-04) */
.rep-tools{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin:0 0 8px}
.rep-tools .hf-search{min-width:220px;flex:0 1 280px}
.rhist-range{display:inline-flex;gap:8px;align-items:center;font-size:12.5px;color:var(--c-ink-2)}
.rhist-range input{margin-left:4px}
.rep-count{margin:2px 0 8px}
.rep-hours .data-table thead th .bh-sort{all:unset;cursor:pointer;display:inline-flex;gap:4px;align-items:center;font:inherit;color:inherit}
.rep-hours .data-table thead th .bh-sort:focus-visible{outline:2px solid var(--c-accent);outline-offset:2px;border-radius:3px}
.rep-hours tbody tr[data-open]{cursor:pointer}
.rep-hours tbody tr[data-open]:hover td{background:#FAF7F2}
.hist-by{margin-left:auto;font-size:11.5px;white-space:nowrap}
.hist-row{display:flex;align-items:baseline;gap:8px}
.hist-build .status-check-name{cursor:pointer}
.hist-day-head .td-sub{font-weight:500;margin-left:4px}
.rep-more{display:flex;align-items:center;gap:10px;padding:12px 0 4px}
.rep-scroll{max-height:calc(100vh - 470px);overflow:auto}
.rep-scroll .data-table{width:100%}
.rep-scroll .data-table thead th{position:sticky;top:0;background:var(--c-group);z-index:1}
@media (max-width:860px){ .rep-scroll{max-height:none} .hist-by{display:none} }

/* Drag-to-reorder in Settings (2026-11-08): the drop line sits on the side the row will land (top half of the row under
   the pointer = before, bottom half = after; reorder.js). An inset shadow draws it, so the rows below don't shift by 2 px
   while dragging the way the old top border did. */
.opt-row.reorder-over{border-top:0;box-shadow:inset 0 2px 0 var(--saw)}
.opt-row.reorder-over.reorder-after{box-shadow:inset 0 -2px 0 var(--saw)}
