/* styles/tabs/update.css */
/* ══════════════════════════════════════════════════════════════════════
   PROJECT UPDATE & CONTROL — STYLES

   Every colour here comes from styles/core/00-00-tokens-reset.css. Nothing
   in this file introduces a palette:

     --bg  #FBF7F1  parchment ground     --tx  #2A2F36  body ink
     --bg2 #F3E9DA  warm secondary       --st  #0F1B2E  navy structure
     --mu  #4D6E91  steel blue           --am  #24B47E  green, positive
     --pk  #188D68  deep green           --rd  #8B3A1F  terracotta, negative
     --vi  #B8693E  ochre, attention     --sk/--sk2     hairlines
     --r 16px  --r2 12px  --r3 8px       'DM Sans'

   WBS colours are NEVER written here. They arrive as inline custom
   properties resolved from window.AppearancePalette.getLevelPalette() — the
   same call tabs/gantt/plugins/142-gantt-premium-layout-v13.js makes — so
   the Update module, the Gantt table and the generated Excel sheet cannot
   drift apart. Changing the palette in Settings repaints all three.

   Two additions the rest of the app does not have, both earned:
     · a navy STATUS RAIL, because every number on these screens is measured
       at the Data Date and it must never scroll off
     · a monospace face for activity IDs, dates and durations, because a
       1,200-row project-controls grid is read column-wise and proportional
       digits do not line up
   ══════════════════════════════════════════════════════════════════════ */

.upd {
  /* ── SEMANTIC COLOURS ARE LITERAL ON PURPOSE ──────────────────────────
     --am, --rd, --vi and --pk are the app's accent tokens, and several
     theme stylesheets REMAP them: styles/core/nexora-theme05.css sets
     --am to var(--nx-gold), 999-ai-planner-landing-theme.css sets it to
     var(--ap-honey), nexora-premium-redesign.css sets it to
     var(--nx-warning). So `var(--am)` is not reliably green.

     On a project-controls screen that is not a cosmetic problem. "Ahead of
     plan" rendering in the same hue as "attention", because someone chose a
     different theme preset, misreads the programme. So the four status
     colours are pinned to the values in styles/core/00-00-tokens-reset.css
     and used through these names everywhere in the module.

     WBS colours are the opposite case and are NOT pinned: they come from
     window.AppearancePalette so the planner's chosen palette reaches the
     grid, the Gantt and the Excel sheet alike. */
  --u-ok:   #24B47E;   /* ahead of / on plan  (00-00 --am) */
  --u-good: #188D68;   /* complete, earned    (00-00 --pk) */
  --u-warn: #B8693E;   /* attention, suggested (00-00 --vi) */
  --u-bad:  #8B3A1F;   /* behind, negative    (00-00 --rd) */
  --u-crit: #C6462B;   /* critical / negative float */
  --u-ai:   #6D5BA8;   /* machine-proposed */
  --u-dd:   #2F6BD8;   /* the Data Date, as tabs/gantt/print/tokens.js draws it */
  /* the two the inline timeline adds. A baseline bar has to sit BEHIND the
     current one without competing with it, and remaining work has to be
     legible against both green and terracotta, which --u-warn at bar height
     is not — it reads as the same ink as the baseline. */
  /* ── THE BAR PALETTE ─────────────────────────────────────────────────
     Four values, and the rule between them is the whole legend:

       --u-bl      the baseline. ONE fixed colour, never tinted by status,
                   criticality or the WBS palette. A reference that changes
                   colour is not a reference.
       --u-todo    an activity that still has float
       --u-crit    an activity on the critical path — which after an update
                   is the NEW critical path, not the baseline's
       --u-cmpl    an activity that has finished
       --u-sum     a WBS summary

     One colour per bar. Splitting a bar into "done" and "remaining" shades
     put two hues inside what reads as a single object, and with the overrun
     segment beside it a single in-progress row carried four coloured pieces.
     Progress is a figure, in the Plan % / Actual % / Var columns. */
  /* AMBER, and only ever amber. The baseline is the one thing on the
     timeline that does not move, so it is the one thing whose colour must
     not depend on anything: not status, not criticality, not the WBS
     palette, not whether the activity slipped. Slate was too close to the
     grid lines and to the app's own steel to read as a distinct object at
     5px tall across 257 rows. */
  --u-bl:     #D9A419;   /* amber — the baseline, and nothing else */
  --u-todo:   #2E9E72;   /* in progress or still to come, with float */
  /* COMPLETE IS BLUE. A finished activity is out of the argument: critical
     and float are questions about work still to come, and leaving a closed
     activity green keeps it in a conversation it has left. */
  --u-cmpl:   #1F5FA9;
  /* A WBS SUMMARY IS BLACK. A phase has no status of its own to be coloured
     by — it is not late, not critical, not complete, it is a container.
     Tinting it from the WBS palette made every band a different colour and
     put it in competition with the bars it summarises. */
  --u-sum:    #0B0F14;   /* near-black: a summary bar, and nothing else */
  --u-rem:    #C79157;   /* kept: the Review screen's "after" bar */
  --u-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --u-row: 26px;   /* was 30: the grid is the screen's job, so it fits more of it */
  font-size: 13px;
  color: var(--tx);
  padding-bottom: 40px;
}

/* ── A <button> NEEDS ITS OWN RESET HERE ───────────────────────────────
   The option rows, the stat tiles, the method cards and the export cards
   are all real buttons, so they are keyboard-reachable and announce
   themselves. That also means they inherit the app's global button styling
   — a border, a centred label, an inherited background — which turned the
   settings screen's radio list into a stack of boxed, centre-aligned
   blocks with the marks pushed into the corner. Every module button
   therefore states its own box explicitly. */
.upd button {
  font: inherit;
  color: inherit;
  text-align: left;
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  letter-spacing: inherit;
  text-transform: none;
  min-width: 0;
  margin: 0;
}
.upd button:not(:disabled) { cursor: pointer; }

.upd .mono,
.upd .u-mono { font-family: var(--u-mono); font-variant-numeric: tabular-nums; }
.upd table { font-variant-numeric: tabular-nums; }

/* ── the status rail ──────────────────────────────────────────────────── */
.u-rail {
  position: sticky;
  /* styles/core/00-00-tokens-reset.css defines --app-sticky-top as the offset
     that parks an in-page sticky bar just under the app header band. The
     FALLBACK is 0, not a guessed header height: where the token is absent
     there is no header to clear (print, a standalone render), and a guessed
     84px would push the rail down over the page title it sits above. */
  top: var(--app-sticky-top, 0px);
  z-index: 30;
  background: linear-gradient(100deg, var(--st) 0%, #16263F 100%);
  color: #E7EEF6;
  border-radius: var(--r2);
  padding: 13px 18px;
  display: flex;
  align-items: center;
  gap: 0;
  flex-wrap: wrap;
  overflow: hidden;
  box-shadow: 0 8px 24px -14px rgba(15, 27, 46, .5);
  margin-bottom: 14px;
}
.u-rail::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(231, 238, 246, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(231, 238, 246, .05) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(90deg, #000, transparent 65%);
  mask-image: linear-gradient(90deg, #000, transparent 65%);
}
.u-rail > * { position: relative; z-index: 1; }
.u-rail-id { font-size: 19px; font-weight: 800; letter-spacing: -.4px; margin-right: 22px; }
.u-rail-id span {
  display: block; font-size: 9px; font-weight: 700;
  letter-spacing: .12em; color: #8EACC9; margin-bottom: 1px;
}
.u-rail-f { padding: 0 18px; border-left: 1px solid rgba(142, 172, 201, .24); }
.u-rail-f .uk {
  font-size: 9px; font-weight: 700; letter-spacing: .1em; color: #8EACC9;
  display: flex; gap: 5px; align-items: baseline;
}
.u-rail-f .uk em { font-style: normal; opacity: .6; font-size: 8.5px; font-family: var(--u-mono); }
.u-rail-f .v { font-size: 14px; font-weight: 700; margin-top: 2px; font-family: var(--u-mono); }
.u-rail-f .v.big { font-size: 15.5px; color: #fff; }
.u-rail-f .v.none { color: #8EACC9; opacity: .7; }
.u-rail-build .v { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; opacity: .7; }
.u-rail-end { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.u-pill {
  font-size: 10px; font-weight: 800; letter-spacing: .09em;
  padding: 5px 12px; border-radius: 20px; border: 1px solid; white-space: nowrap;
}
.u-pill.ready { background: rgba(36, 180, 126, .16); border-color: rgba(36, 180, 126, .5); color: #5EE3B0; }
.u-pill.open { background: rgba(184, 105, 62, .18); border-color: rgba(184, 105, 62, .5); color: #E9B183; }
.u-pill.fin { background: rgba(142, 172, 201, .14); border-color: rgba(142, 172, 201, .42); color: #B8CDE0; }
.u-pill.hist { background: rgba(47, 107, 216, .18); border-color: rgba(47, 107, 216, .5); color: #9DBBF0; }

.u-rb {
  font-size: 11px; font-weight: 700; padding: 7px 14px; border-radius: var(--r3);
  background: var(--u-ok); color: #052D20; border: 0; cursor: pointer;
  transition: background .14s;
}
.u-rb:hover { background: #2ECB8F; }
.u-rb[disabled] { opacity: .45; cursor: not-allowed; }
.u-rb.ghost { background: transparent; border: 1px solid rgba(142, 172, 201, .45); color: #E7EEF6; }
.u-rb.ghost:hover { border-color: #E7EEF6; background: rgba(231, 238, 246, .08); }

/* ── sub-navigation ───────────────────────────────────────────────────── */
.u-nav {
  display: flex; gap: 5px; align-items: center; flex-wrap: wrap;
  padding: 0 0 14px;
}
.u-nav-b {
  font-size: 11.5px; font-weight: 600; padding: 6px 13px; border-radius: 20px;
  border: 1px solid var(--sk); color: var(--mu); background: var(--p);
  cursor: pointer; white-space: nowrap; transition: all .14s;
  display: inline-flex; gap: 6px; align-items: center;
}
.u-nav-b:hover { border-color: var(--mu); color: var(--st); }
.u-nav-b.on { background: var(--st); border-color: var(--st); color: var(--bg2); font-weight: 700; }
.u-nav-b .n {
  font-size: 9.5px; font-weight: 800; padding: 1px 5px; border-radius: 20px;
  background: rgba(15, 27, 46, .1);
}
.u-nav-b.on .n { background: rgba(231, 238, 246, .2); }
.u-nav-b.alert .n { background: rgba(198, 70, 43, .16); color: var(--u-crit); }

/* ── page furniture ───────────────────────────────────────────────────── */
.u-ph { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.u-ph h2 { font-size: 15.5px; font-weight: 800; letter-spacing: -.2px; color: var(--st); text-wrap: balance; }
.u-ph .sub { font-size: 11.5px; color: var(--mu); max-width: 70ch; line-height: 1.55; margin-top: 2px; }
.u-sp { flex: 1 1 auto; }

.u-card { background: var(--p); border: 1px solid var(--sk); border-radius: var(--r2); }
.u-card.lift { box-shadow: 0 1px 2px rgba(15, 27, 46, .05), 0 8px 24px -14px rgba(15, 27, 46, .16); }
.u-ch {
  padding: 10px 14px; border-bottom: 1px solid var(--sk2);
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
}
.u-ch h3 {
  font-size: 11px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mu);
}
.u-ch .p6 {
  font-size: 9px; font-weight: 700; letter-spacing: .06em; color: var(--mu);
  border: 1px solid var(--sk); padding: 1px 5px; border-radius: 3px;
  font-family: var(--u-mono); opacity: .8;
}
.u-cb { padding: 14px; }
.u-cf {
  padding: 11px 14px; border-top: 1px solid var(--sk);
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--p2);
  border-radius: 0 0 var(--r2) var(--r2);
}
.u-lbl {
  font-size: 9.5px; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mu);
}
.u-note { font-size: 11px; color: var(--mu); line-height: 1.6; }
.u-note b { color: var(--st); font-weight: 700; }
.u-note code, .u-note .mono { font-family: var(--u-mono); font-size: 10.5px; }
.u-hr { height: 1px; background: var(--sk); border: 0; margin: 12px 0; }
.u-empty { padding: 44px 20px; text-align: center; }
.u-empty .t { font-size: 14px; font-weight: 800; color: var(--st); margin-bottom: 4px; }
.u-empty .s { font-size: 11.5px; color: var(--mu); max-width: 52ch; margin: 0 auto 14px; line-height: 1.6; }
.u-err {
  padding: 14px; border-radius: var(--r2); font-size: 12px;
  background: rgba(139, 58, 31, .07); border: 1px solid rgba(139, 58, 31, .28); color: var(--u-bad);
}

/* ── buttons ──────────────────────────────────────────────────────────── */
.u-b {
  font-size: 11.5px; font-weight: 600; padding: 6px 13px; border-radius: var(--r3);
  border: 1px solid var(--sk); color: var(--mu); background: var(--p);
  cursor: pointer; transition: all .14s; white-space: nowrap;
}
.u-b:hover { border-color: var(--mu); color: var(--st); }
.u-b[disabled] { opacity: .42; cursor: not-allowed; }
.u-b[disabled]:hover { border-color: var(--sk); color: var(--mu); }
.u-b.pri { background: var(--st); border-color: var(--st); color: var(--bg2); font-weight: 700; }
.u-b.pri:hover { background: var(--mu); border-color: var(--mu); color: #fff; }
.u-b.go { background: var(--u-ok); border-color: var(--u-ok); color: #052D20; font-weight: 700; }
.u-b.go:hover { background: #2ECB8F; border-color: #2ECB8F; }
.u-b.udanger { border-color: rgba(139, 58, 31, .4); color: var(--u-bad); }
.u-b.udanger:hover { background: var(--u-bad); border-color: var(--u-bad); color: var(--bg); }
.u-b.sm { font-size: 10.5px; padding: 4px 10px; }

/* ── THE PROGRAMME PANEL ──────────────────────────────────────────────────
   Baseline, this update, and the variance between them, side by side — with
   a project-level two-track bar underneath drawn on the same axis and in the
   same colours as every row in the grid, so the slip is a distance before it
   is a number. The four flat tiles this replaces each stated a figure with
   nothing beside it to read the figure against. */
.u-prog {
  border: 1px solid var(--sk); border-radius: var(--r2); background: var(--p);
  overflow: hidden; margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(15, 27, 46, .04), 0 10px 26px -20px rgba(15, 27, 46, .3);
}
/* ── THE STATUS CARD ──────────────────────────────────────────────────────
   The dark rail above this screen already carries the update number, the
   Data Date, the behaviour and the baseline id. This card says none of them
   again — two headers stating the same six facts is what it replaced.

   It answers three questions in the order a planner asks them: is it OK,
   where should we be against where we are, and what moved. */
.u-sc2 {
  border: 1px solid var(--sk); border-left: 4px solid var(--vd, var(--mu));
  border-radius: var(--r2); background: var(--p); overflow: hidden;
  margin-bottom: 10px;
  box-shadow: 0 1px 2px rgba(15, 27, 46, .04), 0 10px 26px -22px rgba(15, 27, 46, .3);
}
.u-sc2.uok   { --vd: var(--u-ok);   --vdw: rgba(36, 180, 126, .10); }
.u-sc2.uwarn { --vd: var(--u-warn); --vdw: rgba(184, 105, 62, .10); }
.u-sc2.bad  { --vd: var(--u-crit); --vdw: rgba(198, 70, 43, .10); }
.u-sc2.na   { --vd: var(--sk);     --vdw: transparent; }

/* ── WHERE WE ARE | AGAINST WHAT ──────────────────────────────────────────
   Three grid columns put the slack BETWEEN the verdict and the rings, so a
   wide screen showed a hand's width of nothing there while the date table
   was squeezed into a third of the row. Two groups now: the verdict and its
   rings answer "where are we" and travel together on the left; the dates
   answer "against what" and take the right, at the width they need. */
.u-sc2-top {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: 18px; align-items: center; padding: 7px 12px;
  background: linear-gradient(100deg, var(--vdw), transparent 58%);
}
/* both tracks must be allowed to shrink, or an `auto` column sized to its
   content pushes the other one onto a row of its own — which is how the
   date table ended up as a full-width band under the rings instead of
   beside them */
.u-sc2-now {
  display: flex; align-items: center; gap: 20px; min-width: 0;
  flex-wrap: nowrap; overflow: hidden;
}
.u-sc2 .vd em { max-width: 26ch; }
@media (max-width: 900px) {
  .u-sc2-top { grid-template-columns: 1fr; }
  .u-sc2-now { flex-wrap: wrap; }
}

/* the verdict */
.u-sc2 .vd { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.u-sc2 .vd .udot {
  width: 11px; height: 11px; border-radius: 50%; background: var(--vd); flex: none;
  margin-top: 5px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--vd) 20%, transparent);
}
.u-sc2 .vd b {
  display: block; font-size: 18px; font-weight: 800; letter-spacing: -.45px;
  color: var(--st); line-height: 1.15;
}
.u-sc2 .vd em {
  display: block; font-style: normal; font-size: 10.5px; color: var(--mu);
  line-height: 1.5; margin-top: 2px; max-width: 32ch;
}
.u-sc2 .vd em b { display: inline; font-size: inherit; font-family: var(--u-mono); color: var(--vd); }

/* ── THE TWO RINGS ────────────────────────────────────────────────────────
   Planned to date against earned to date. The gap between the two rings IS
   the schedule variance — which is a thing you see, where "68.4% / 2.3%" is
   a thing you have to subtract. */
.u-sc2 .rings { display: flex; gap: 15px; align-items: center; }
.u-dn { display: flex; align-items: center; gap: 8px; }
.u-dn svg { width: 48px; height: 48px; flex: none; transform: rotate(-90deg); }
.u-dn svg .tr { fill: none; stroke: var(--sk2); stroke-width: 4.2; }
.u-dn svg .vl {
  fill: none; stroke: var(--mu); stroke-width: 4.2; stroke-linecap: round;
}
.u-dn.pl svg .vl   { stroke: var(--u-bl); }
.u-dn.uok svg .vl   { stroke: var(--u-ok); }
.u-dn.uwarn svg .vl { stroke: var(--u-warn); }
.u-dn.bad svg .vl  { stroke: var(--u-crit); }
.u-dn svg text {
  transform: rotate(90deg); transform-origin: 20px 20px;
  text-anchor: middle; font-family: var(--u-mono); fill: var(--st);
}
.u-dn svg .n { font-size: 11px; font-weight: 800; }
.u-dn svg .p { font-size: 5px; font-weight: 700; fill: var(--mu); }
.u-dn .lb b {
  display: block; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--st);
}
.u-dn .lb em {
  display: block; font-style: normal; font-size: 9.5px; color: var(--mu);
  margin-top: 1px; white-space: nowrap;
}
.u-dn.uok .lb em   { color: var(--u-good); font-weight: 700; }
.u-dn.uwarn .lb em { color: var(--u-warn); font-weight: 700; }
.u-dn.bad .lb em  { color: var(--u-crit); font-weight: 700; }

/* ── BASELINE vs CURRENT, WITH THE VARIANCE STATED ───────────────────────── */
.u-cmp {
  border: 1px solid var(--sk); border-radius: var(--r3); overflow: hidden;
  background: var(--p); min-width: 0;
}
.u-cmp .hd, .u-cmp .rw {
  display: grid; grid-template-columns: 44px 1fr 1fr 60px; align-items: center;
}
.u-cmp .hd { background: var(--p2); border-bottom: 1px solid var(--sk); }
.u-cmp .hd span {
  font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--mu); padding: 3px 8px;
}
.u-cmp .hd span:nth-child(2) { color: #9A7412; }
.u-cmp .hd span:last-child { text-align: right; }
.u-cmp .rw { border-top: 1px solid var(--sk2); }
.u-cmp .rw:first-of-type { border-top: 0; }
.u-cmp .rw .uk {
  font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mu); padding: 3px 8px;
}
.u-cmp .rw .ubl, .u-cmp .rw .cu {
  font-size: 11px; font-weight: 700; font-family: var(--u-mono); color: var(--st);
  padding: 3px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.u-cmp .rw .ubl { color: #9A7412; }
.u-cmp .rw em {
  display: block; font-style: normal; font-size: 8px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; color: var(--mu);
  font-family: 'DM Sans', system-ui, sans-serif;
}
.u-cmp .vr {
  font-size: 12.5px; font-weight: 800; font-family: var(--u-mono);
  text-align: right; padding: 6px 9px 6px 0; color: var(--mu); white-space: nowrap;
}
.u-cmp .vr em { font-style: normal; font-size: 9px; opacity: .7; margin-left: 1px; }
.u-cmp .vr.uok  { color: var(--u-good); }
.u-cmp .vr.bad { color: var(--u-crit); }

/* ── the counts ──────────────────────────────────────────────────────── */
.u-vcs { background: var(--p); display: flex; border-top: 1px solid var(--sk); }
.u-vc {
  flex: 1 1 0; min-width: 0;
  border: 0; border-left: 1px solid var(--sk2); background: transparent;
  padding: 5px 4px 6px; font: inherit; color: inherit; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 0;
  position: relative; transition: background .14s;
}
.u-vc:first-child { border-left: 0; }
.u-vc:hover { background: var(--p2); }
.u-vc.on { background: var(--sk2); }
.u-vc.on::after {
  content: ''; position: absolute; left: 6px; right: 6px; bottom: 0; height: 2px;
  background: var(--st); border-radius: 2px 2px 0 0;
}
.u-vc b { font-size: 15px; font-weight: 800; font-family: var(--u-mono); color: var(--st); letter-spacing: -.4px; }
.u-vc span {
  font-size: 7.5px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--mu); white-space: nowrap;
}
.u-vc.uok b   { color: var(--u-good); }
.u-vc.uwarn b { color: var(--u-warn); }
.u-vc.bad b  { color: var(--u-crit); }
.u-vc.stg b  { color: var(--u-ai); }

@media (max-width: 1240px) {
  .u-sc2-top { grid-template-columns: 1fr auto; }
  .u-cmp { grid-column: 1 / -1; }
}

/* ── method strip ─────────────────────────────────────────────────────────
   Four tall cards became one line. The description each card carried is on
   the title attribute; what changes — how many rows that method has already
   produced — stayed visible, because that is the only part worth a repaint. */
.u-mstrip {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  padding: 7px 9px; margin-bottom: 12px;
  border: 1px solid var(--sk); border-radius: var(--r2); background: var(--p);
}
.u-mstrip .lb {
  font-size: 8.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--mu); padding-right: 3px;
}
.u-mth {
  display: flex; align-items: center; gap: 7px; padding: 5px 11px 5px 6px;
  border: 1px solid var(--sk); border-radius: 8px; background: var(--p);
  font: inherit; color: inherit; cursor: pointer; transition: all .13s;
}
.u-mth:hover { border-color: var(--mu); background: var(--p2); }
.u-mth[disabled] { opacity: .45; cursor: not-allowed; }
.u-mth .ico { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none; }
.u-mth .ico svg {
  width: 13px; height: 13px; stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.u-mth .tx { display: flex; flex-direction: column; line-height: 1.25; text-align: left; }
.u-mth .tx b { font-size: 11.5px; font-weight: 700; color: var(--st); }
.u-mth .tx em { font-style: normal; font-size: 9px; color: var(--mu); }

/* ── one filter control, not ten chips ───────────────────────────────── */
.u-sel {
  font-size: 11px; font-weight: 600; padding: 4px 26px 4px 9px; border-radius: 5px;
  border: 1px solid var(--sk); background: var(--p); color: var(--st);
  font-family: inherit; cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%234D6E91' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 9px;
}
.u-sel:focus { outline: 2px solid var(--mu); outline-offset: -1px; }

/* ── the timeline key ─────────────────────────────────────────────────── */
.u-tlkey {
  display: flex; align-items: center; gap: 4px; font-size: 9px;
  font-weight: 700; color: var(--mu); letter-spacing: .02em;
}
.u-tlkey .uk { width: 12px; height: 6px; border-radius: 2px; margin-left: 7px; }
.u-tlkey .uk:first-child { margin-left: 0; }
.u-tlkey .uk.ubl { background: var(--u-bl); height: 5px; }
.u-tlkey .uk.cm { background: var(--u-cmpl); }
.u-tlkey .uk.rm { background: var(--u-todo); }
.u-tlkey .uk.cr { background: var(--u-crit); }
.u-tlkey .uk.sm { background: var(--u-sum); }
.u-tlkey .uk.dd { background: var(--u-dd); width: 2px; height: 11px; }

/* ── the inline timeline ──────────────────────────────────────────────────
   Baseline above, current below, the way P6 stacks them — because the whole
   question a status update answers is "where is this against the plan", and
   two bars on one line make that a matter of reading two dates rather than
   seeing one distance.

   Colour is not decoration here. Steel is always the plan, green is always
   what actually happened, amber is always work still to come, terracotta is
   always critical, and the dashed tail is always slip from the baseline
   finish. Nothing else uses those five. */
table.u-g th.u-tlh-c { padding: 0; min-width: 260px; }
table.u-g.tl { min-width: 1320px; }
.u-tlh {
  position: relative; display: flex; height: 100%; align-items: stretch;
  background: var(--p2);   /* opaque, for the same reason as th.bl above */
}
.u-tlh .mo {
  border-left: 1px solid var(--sk2); font-size: 8px; font-weight: 700;
  color: var(--mu); padding: 7px 0 6px 3px; overflow: hidden; white-space: nowrap;
  letter-spacing: .02em; text-transform: none;
}
.u-tlh .mo:first-child { border-left: 0; }
.u-tlh .mo em { font-style: normal; opacity: .55; margin-left: 2px; }
.u-tlh .dd { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--u-dd); }
.u-tlh .dd::after {
  content: ''; position: absolute; left: -3px; bottom: -1px;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-bottom: 5px solid var(--u-dd);
}

table.u-g td.u-tl { padding: 0 0 0 0; }
.u-tlb { position: relative; display: block; height: var(--u-row); width: 100%; }
/* with the history layer on, the row carries three bars instead of two, so it
   takes one more track rather than stacking them on top of each other */
table.u-g.hist { --u-row: 32px; }

/* ── ONE LINE, NOT ONE SEGMENT PER ROW ───────────────────────────────────
   The line is the CELL's, not the bar wrapper's. The wrapper is a fixed
   30px, so on any row whose cell grew taller than that the segment stopped
   short and the column came out dashed, one gap per row, down a 257-row
   grid. On the cell it is full height by construction, and the 1px bleed
   carries it across the row border into the next one. */
table.u-g td.u-tl { position: relative; }
table.u-g td.u-tl::after {
  content: ''; position: absolute; top: 0; bottom: -1px; left: var(--dd);
  width: 2px; margin-left: -1px; background: var(--u-dd); z-index: 5;
  pointer-events: none;
}
table.u-g td.u-tl:not([style*="--dd"])::after { display: none; }
/* the header card's own band still draws its line inline */
.u-pband .u-tlb .dd {
  position: absolute; top: 0; bottom: 0; width: 2px;
  background: var(--u-dd); z-index: 5;
}

/* ── THE BARS ─────────────────────────────────────────────────────────────
   Two per row, stacked, ONE COLOUR EACH:

       ███████████████     UPDATE     where the activity is now
       ▬▬▬▬▬▬▬▬▬▬          BASELINE   where the plan put it

   A row used to draw four coloured pieces — a dark green actual portion, a
   lighter green remaining portion, a red overrun segment and the amber
   baseline. Four objects and three hues on one 30px row, 257 rows down the
   page: green and red inside what read as a single bar, and no telling at a
   glance which of the four you were looking at.

   Progress lives in the Plan % / Actual % / Var columns, where it can be
   read as a figure. The slip is the distance between the two bars, which is
   what stacking them is for. */
/* A bar narrower than about 5px is a dot, and a two-day activity on a
   five-month window is 0.7% — four pixels. The floor belongs here, in
   pixels, not in the percentage the renderer computes: the renderer knows
   the dates, only the browser knows how wide the column ended up. */
.u-tlb .ub { position: absolute; border-radius: 2px; min-width: 5px; }

/* Both bars are 8px. The update bar was 9px against a 6px baseline, which
   reads as "this one matters more" — but they are a measurement and its
   reference, and the whole comparison depends on them being the same thing
   drawn twice. */
.u-tlb .ub.ucur { top: 5px; height: 8px; z-index: 4; background: var(--u-todo); }
.u-tlb .ub.ucur.ucrit { background: var(--u-crit); }
.u-tlb .ub.ucur.ucmpl { background: var(--u-cmpl); }

/* ── WORK DONE, AND WORK LEFT ─────────────────────────────────────────────
   P6 draws a started activity as two marks: the ACTUAL work up to the Data
   Date, and the REMAINING work from where it is scheduled to resume. Between
   them it draws nothing, because nothing happens there.

   BOTH ARE THE COLOUR THE BAR ALREADY WAS. A first version of this gave the
   remaining half a lighter fill and its own entry in the key, which is a
   second thing to learn in exchange for a distinction the row already makes:
   the mark on the left of the Data Date line is what has been done, the one
   on the right is what has not. The fix asked for was the gap. The gap is
   the fix. */

/* The baseline keeps its height — it is the reference, not a lesser bar —
   but takes a darker amber edge. At eight pixels tall and sometimes six
   wide, a flat fill has no shape; the edge is what still reads as "a bar"
   when the bar is nearly a square.

   THIS RULE WAS DELETED ONCE, BY ME, WHILE PUTTING THE UPDATE BAR'S COLOURS
   BACK. The renderer kept emitting <i class="ub ubl">, so nothing threw and
   no test noticed — the element simply had no height, no background and no
   top, and every amber bar on the chart went invisible. A bar that is drawn
   and cannot be seen is the one kind of breakage a code review cannot spot,
   so tools/test-update-real-programme.js now asserts this rule exists. */
.u-tlb .ub.ubl {
  top: 17px; height: 8px; z-index: 2;
  background: var(--u-bl); border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(120, 82, 0, .55);
}

/* ── THE VARIANCE TIE ─────────────────────────────────────────────────────
   The lane between the two bars, spanning baseline finish to current finish.
   Red when the finish moved out, green when it pulled in. It is the only
   mark on the row that states the RELATIONSHIP between the pair rather than
   restating one of them, and it is what makes a slip legible when you are
   scanning 257 rows rather than measuring one. */
.u-tlb .utie {
  position: absolute; top: 14px; height: 3px; z-index: 3;
  border-radius: 2px; opacity: .95;
}
.u-tlb .utie.ulate  { background: var(--u-crit); }
.u-tlb .utie.uearly { background: var(--u-good, #2E9E72); }
.u-tlb .utie::after {
  content: ''; position: absolute; top: -2px; right: -1px;
  width: 0; height: 0; border-top: 3.5px solid transparent;
  border-bottom: 3.5px solid transparent; border-left: 4px solid currentColor;
}
.u-tlb .utie.ulate::after  { color: var(--u-crit); }
.u-tlb .utie.uearly::after { color: var(--u-good, #2E9E72); border-left: 0;
  border-right: 4px solid currentColor; right: auto; left: -1px; }

.u-tlb .ums {
  position: absolute; width: 10px; height: 10px; margin-left: -5px;
  transform: rotate(45deg); border-radius: 1px;
}
/* a rotated square's BOUNDING BOX is ~1.41x its side, so a 10px diamond
   occupies 14px of the row, not 10 — the two diamonds were touching at the
   corners while their declared boxes looked clear of each other */
.u-tlb .ums.ucur { top: 3px; z-index: 4; background: var(--u-todo); }
.u-tlb .ums.ucur.ucmpl { background: var(--u-cmpl); }
.u-tlb .ums.ucur.ucrit { background: var(--u-crit); }
.u-tlb .ums.ubl { top: 17px; width: 8px; height: 8px; margin-left: -4px; background: var(--u-bl); z-index: 2; }

/* ── A WBS SUMMARY BAR ────────────────────────────────────────────────────
   P6's shape: a solid black span with its ends turned down. Black because a
   phase has no status of its own — it is not late, not critical, not
   complete, it is a container. It had a translucent grey body and a border
   for a top edge, which read as a rectangle with a line on it rather than
   as a summary bar. Solid now, and the ends are the whole signature. */
.u-tlb .usum {
  position: absolute; top: 6px; height: 5px; z-index: 4;
  background: var(--u-sum); border-radius: 0;
}
.u-tlb .usum::before, .u-tlb .usum::after {
  content: ''; position: absolute; top: 0; width: 0; height: 0;
  border-top: 9px solid var(--u-sum);
}
.u-tlb .usum::before { left: 0; border-right: 5px solid transparent; }
.u-tlb .usum::after { right: 0; border-left: 5px solid transparent; }

/* ── a WBS band ───────────────────────────────────────────────────────────
   A phase row carries the WBS colour as its BACKGROUND, so a bar tinted from
   that same colour is invisible on it. The band therefore draws in the row's
   own foreground ink — light on a dark phase, dark on a pale one — which is
   the only pair guaranteed to have contrast whatever palette the planner
   chose in Appearance. */
/* A BAND DRAWS ONE BAR. The black summary is the phase; adding an amber
   baseline under it put two bars on a row that is a container, not an
   activity, and the pair read as "coloured" rather than as P6's plain black
   summary. The phase's baseline dates are in the BL Start / BL Finish
   columns on the same row, in figures. */
.u-pband .u-tlb .usum { top: 5px; height: 6px; }
/* the band's timeline strip is parchment like every other row's, so its
   grid and Data Date line read at full strength rather than the dimmed
   values they needed when the WBS colour ran behind them */
tr.u-wbs .u-tlb .dd { opacity: .75; }

/* ── a phase row's own figures ────────────────────────────────────────────
   Dates, counts and percentages inherit the band's ink for the same reason:
   --mu on a navy phase row is navy on navy. */
table.u-g tr.u-wbs td .u-dt,
table.u-g tr.u-wbs td .u-num,
table.u-g tr.u-wbs td .u-wcount,
table.u-g tr.u-wbs td.num,
table.u-g tr.u-wbs .u-pg .nm b,
table.u-g tr.u-wbs .u-pg .nm em,
table.u-g tr.u-wbs .u-pg .dl { color: var(--u-wbs-text, #fff); }
table.u-g tr.u-wbs td .u-dt { opacity: .9; }
table.u-g tr.u-wbs td .u-dt.none { opacity: .45; }
table.u-g tr.u-wbs .u-pg .nm em, table.u-g tr.u-wbs .u-pg .dl { opacity: .78; }
table.u-g tr.u-wbs .u-pg .tk { background: rgba(255, 255, 255, .22); }
table.u-g tr.u-wbs .u-pg .tk .pn { background: var(--u-wbs-text, #fff); opacity: .95; }

/* ── THE ACTUAL CELL ──────────────────────────────────────────────────────
   A number, and beside it the number it could be:

        29%   ⌐44%¬

   DASHED MEANS PROPOSED. It is the convention a schedule already uses for a
   bar that has not happened yet, nothing else in this grid is drawn that
   way, and it separates "what was reported" from "what the baseline says"
   without a second colour system. One tap stages it.

   It is permanent, not a hover popover: this screen is used on site, on a
   tablet, where hover does not exist. ⋯ opens the other figures. */
/* ── ONE FIGURE, AND A SUGGESTION BESIDE IT ───────────────────────────────
   This cell used to be 120px wide on all 257 rows to hold a figure, a
   suggestion chip, a ⋯ button and a popover of six more buttons - so the
   narrowest useful column on the grid was the widest one. The ⋯ and its
   popover are gone. What a planner does here is accept the suggestion, so
   the suggestion IS the control; anything else is a pencil away on the same
   row, in the editor built for it. */
.u-pg { position: relative; display: flex; align-items: center; gap: 6px; min-width: 0; }
/* The reported figure stays neutral ink. Colouring it by how far behind
   plan it is repeated, in the same row, exactly what the Var column next to
   it already says — two cells shouting the same thing, and the number you
   came to read made harder to read for it. */
.u-pg .nm {
  font-size: 11.5px; font-weight: 800; font-family: var(--u-mono);
  color: var(--st); min-width: 30px; text-align: right;
}

/* ── THE SUGGESTION STYLE ─────────────────────────────────────────────────
   Dashed border, the module's suggestion green, monospace: the same three
   signals wherever this application proposes a value rather than reporting
   one — here, and on a suggested date. The key above the grid names it, so
   it is a convention the reader has been told about rather than one they
   have to infer. Click applies it. */
.u-sgst,
.u-pg .sg {
  flex: none; font-size: 10.5px; font-weight: 800; font-family: var(--u-mono);
  padding: 1px 6px; border-radius: 5px; cursor: pointer; line-height: 1.3;
  border: 1.5px dashed rgba(24, 141, 104, .6); background: transparent;
  color: var(--u-good); white-space: nowrap;
}
.u-sgst:hover,
.u-pg .sg:hover { background: var(--u-ok); border-color: var(--u-ok); border-style: solid; color: #052D20; }
.u-pg .sg.ubad, .u-sgst.ubad { border-color: rgba(198, 70, 43, .55); color: var(--u-crit); }
.u-pg .sg.ubad:hover, .u-sgst.ubad:hover { background: var(--u-crit); border-color: var(--u-crit); color: #fff; }

/* a WBS is not statusable, so its cell carries no control at all */
.u-pg.rld .sg { display: none; }

.u-wcount { font-size: 10px; font-weight: 800; font-family: var(--u-mono); opacity: .85; }
.u-tag.dim { opacity: .55; margin-left: 6px; font-size: 8px; }
.u-note.dim { opacity: .6; font-size: 9.5px; font-style: italic; }
/* ── A STICKY HEADER CANNOT BE TRANSLUCENT ───────────────────────────────
   th.bl tinted the two baseline columns with a 9%-alpha wash. On a body cell
   that is a tint; on the SCROLLING HEADER it is a window — every row that
   passed underneath was drawn through it, so the header read
   "15-SEP-26 / 12-OCT-26" over its own labels. The tint is now a gradient
   layer composited over an opaque background, so the column still reads as
   the baseline pair and nothing shows through. */
table.u-g td.ubl {
  background-image: linear-gradient(rgba(142, 172, 201, .09), rgba(142, 172, 201, .09));
}
table.u-g th.ubl {
  color: #5F89AE;
  background-color: var(--p2);
  background-image: linear-gradient(rgba(142, 172, 201, .16), rgba(142, 172, 201, .16));
}
/* the band paints its colour on each TD, so the baseline columns' tint has
   to be REPLACED by the band colour here, not cleared — `transparent` let
   the page through and punched two pale holes in every phase row */
table.u-g tr.u-wbs td.ubl { background: var(--u-wbs-bg, var(--st)); }
.u-dt.ubl { color: #5F89AE; }
/* ── THE ACTUAL IS THE ONE THAT STANDS OUT ─────────────────────────────
   P6 shows one Start and one Finish: the actual once there is one, the
   forecast until then. "لون الأكشوال هو اللي يبقى مميز، الفوركاست يبقى
   لون أسود عادي" — so the recorded date carries the weight and the
   colour, and a forecast is plain text, the way an unremarkable figure
   should be. A finished activity keeps the green it always had. */
.u-dt.act { color: var(--u-cmpl); font-weight: 700; }
table.u-g tr.done td .u-dt.act { color: var(--u-good); font-weight: 700; }
.u-dt.fcst { font-weight: 400; }
table.u-g tr.u-wbs td { white-space: nowrap; }
table.u-g tr.u-wbs td .tw { display: inline-flex; align-items: center; }
.u-gscroll.cmp table.u-g { min-width: 820px; }

/* ── KPI tiles ────────────────────────────────────────────────────────── */
.u-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
/* four figures in a six-column grid read as two gaps and no row; the parse
   report has exactly four, so it asks for four columns */
.u-kpis.four { grid-template-columns: repeat(4, 1fr); }
.u-kpi {
  background: var(--p); border: 1px solid var(--sk); border-radius: var(--r2);
  padding: 11px 12px; position: relative; overflow: hidden;
  box-shadow: 0 1px 2px rgba(15, 27, 46, .05), 0 8px 24px -16px rgba(15, 27, 46, .16);
}
.u-kpi .uk { font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mu); }
.u-kpi .uk em {
  font-style: normal; display: block; font-size: 8px; opacity: .65;
  margin-top: 1px; font-family: var(--u-mono); letter-spacing: .04em;
}
.u-kpi .v {
  font-size: 25px; font-weight: 800; letter-spacing: -1px; line-height: 1.1;
  margin-top: 5px; font-family: var(--u-mono); color: var(--st);
}
.u-kpi .v.sm { font-size: 18px; letter-spacing: -.4px; }
.u-kpi .d { font-size: 10px; font-weight: 700; margin-top: 2px; }
.u-kpi .spark { position: absolute; right: 0; bottom: 0; width: 62px; height: 26px; opacity: .5; }
.u-up { color: var(--u-ok); } .u-dn { color: var(--u-bad); } .u-flat { color: var(--mu); }
.u-kpi.na .v { color: var(--mu); opacity: .55; }

/* ── provenance badges ────────────────────────────────────────────────── */
.u-src {
  font-size: 8.5px; font-weight: 800; letter-spacing: .08em; padding: 1.5px 5px;
  border-radius: 3px; border: 1px solid; white-space: nowrap; text-transform: uppercase;
  display: inline-block; vertical-align: 1px;
}
.u-src.P6       { color: var(--mu); border-color: rgba(77, 110, 145, .42); background: rgba(77, 110, 145, .1); }
.u-src.EXCEL    { color: var(--u-good); border-color: rgba(24, 141, 104, .42); background: rgba(24, 141, 104, .1); }
.u-src.MANUAL   { color: var(--st); border-color: var(--sk); background: var(--sk2); }
.u-src.AI       { color: var(--u-ai); border-color: rgba(109, 91, 168, .45); background: rgba(109, 91, 168, .1); }
.u-src.AUTO     { color: var(--u-warn); border-color: rgba(184, 105, 62, .5); background: rgba(184, 105, 62, .09); border-style: dashed; }
.u-src.CALCULATED { color: var(--u-good); border-color: rgba(24, 141, 104, .35); background: rgba(24, 141, 104, .07); font-style: italic; }
.u-src.PREVIOUS { color: var(--mu); border-color: var(--sk); background: transparent; }
.u-src.BASELINE { color: var(--u-warn); border-color: rgba(184, 105, 62, .35); background: transparent; }
.u-legend { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.u-legend .lg { font-size: 9.5px; color: var(--mu); font-weight: 700; letter-spacing: .05em; }

/* ── status chips ─────────────────────────────────────────────────────── */
.u-chip {
  font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 2px 6px;
  border-radius: 3px; white-space: nowrap; display: inline-block;
}
.u-chip.TK_NotStart { background: var(--sk2); color: var(--mu); }
.u-chip.TK_Active   { background: rgba(184, 105, 62, .16); color: var(--u-warn); }
.u-chip.TK_Complete { background: rgba(36, 180, 126, .17); color: var(--u-good); }
.u-chip.oos         { background: rgba(198, 70, 43, .15); color: var(--u-crit); }
.u-tag {
  font-size: 9px; font-weight: 700; letter-spacing: .04em; padding: 2px 6px;
  border-radius: 3px; background: var(--sk2); color: var(--mu);
  font-family: var(--u-mono); white-space: nowrap;
}

/* ── the activity grid ────────────────────────────────────────────────── */
.u-gwrap { position: relative; border: 1px solid var(--sk); border-radius: var(--r2); overflow: hidden; background: var(--p); }
.u-gtools {
  display: flex; gap: 7px; align-items: center; padding: 8px 11px;
  border-bottom: 1px solid var(--sk); background: var(--p2); flex-wrap: wrap;
}
.u-f {
  font-size: 10.5px; font-weight: 600; padding: 4px 9px; border-radius: 5px;
  border: 1px solid var(--sk); color: var(--mu); background: var(--p);
  cursor: pointer; white-space: nowrap;
}
.u-f:hover { border-color: var(--mu); color: var(--st); }
.u-f.on { background: var(--st); border-color: var(--st); color: var(--bg2); }
.u-search {
  font-size: 11px; padding: 4px 9px; border-radius: 5px;
  border: 1px solid var(--sk); background: var(--p); color: var(--tx);
  width: 180px; font-family: inherit;
}
.u-search:focus { outline: 2px solid var(--mu); outline-offset: -1px; }
/* ── THE GRID GETS WHAT IS LEFT OF THE SCREEN ────────────────────────────
   62vh is a guess, and it was the wrong one in both directions: on a short
   screen it left the grid scrolling inside a page that also scrolled - two
   scrollbars for one list, and neither of them the one your thumb reaches
   for - and on a tall one it stopped short and left a band of empty page
   under the table.

   The height is measured now, not guessed: everything above the grid
   (the rail, the tabs, the card, the methods, the toolbar) reports its
   height into --u-above, and the grid takes the rest of the viewport. The
   page itself no longer scrolls on this screen, so there is one scroll
   region and it is the table. */
.u-gscroll {
  overflow: auto;
  height: calc(var(--u-vh, 100vh) - var(--u-above, 340px));
  min-height: 260px;
  overscroll-behavior: contain;
}

/* SEPARATE, NOT COLLAPSE. A collapsed border belongs to the table's grid,
   not to its cell, so with the Gantt frozen on the right the rules of the
   columns scrolling UNDER it were painted on top of it — "الجانت شفاف،
   حركة الـ lines باينة من تحته". Separate borders belong to their cells and
   go under a frozen pane with them. Every cell draws only its right and
   bottom rule, so nothing doubles. */
table.u-g { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 1060px; }
table.u-g th {
  font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--mu); text-align: left; padding: 5px 8px; background: var(--p2);
  border-bottom: 1px solid var(--sk); position: sticky; top: 0;
  /* above EVERY body cell, the raised popover row included — a sticky
     header that something can paint over is not a header */
  z-index: 8; white-space: nowrap;
}
table.u-g th em {
  font-style: normal; display: block; font-size: 7.5px; opacity: .6;
  font-weight: 700; font-family: var(--u-mono);
}
table.u-g th.num, table.u-g td.num { text-align: right; }
/* ── VISIBLE COLUMN RULES ────────────────────────────────────────────────
   A project-controls grid is read down a column as often as across a row,
   and with only a row border the eye had nothing to follow. Every cell
   carries a hairline; the boundary between the table and the Gantt carries
   a heavy one, because they are two different things sharing a scroll. */
/* ── THE SEPARATORS ARE INK, NOT MIST ────────────────────────────────────
   --sk2 is rgba(42,47,54,.11): eleven percent of a dark grey on parchment,
   which is a suggestion of a line rather than a line. Against the pale
   column fills it disappeared entirely and the grid read as one field of
   figures with nothing dividing it. These are ruled lines now, dark enough
   to follow a column down 257 rows with your eye. */
table.u-g { --u-rule: rgba(15, 27, 46, .30); --u-rule-lite: rgba(15, 27, 46, .14); }
table.u-g td {
  padding: 3px 8px; border-bottom: 1px solid var(--u-rule-lite);
  border-right: 1px solid var(--u-rule);
  font-size: 11px; white-space: nowrap; vertical-align: middle; height: var(--u-row);
}
table.u-g th { border-right: 1px solid var(--u-rule); }
table.u-g th:last-child, table.u-g td:last-child { border-right: 0; }
/* ── THE GANTT IS A CHART, NOT A COLUMN ──────────────────────────────────
   It was being drawn as one more cell in the table: same paper, same rules,
   same treatment as Act Start or TF. It is a different kind of object — a
   plotted surface with an axis — and it has to look like one or a reader
   keeps trying to read it as a column of values.

   So it gets its own paper, its own gridlines (from the real month
   boundaries, set once on the table as --u-grid), and a true edge: a heavy
   rule plus a shadow falling INTO the chart, the way a frozen pane divides
   a sheet. The table scrolls under that edge; the chart lives past it. */
.upd { --u-chart: #FFFDF9; --u-gridline: rgba(15, 27, 46, .17);
       --u-rowline: rgba(15, 27, 46, .10); }

table.u-g th.u-tlh-c,
table.u-g td.u-tl,
table.u-g thead tr.grp th.g.tl {
  border-left: 3px solid var(--st);
  box-shadow: inset 9px 0 11px -11px rgba(15, 27, 46, .75);
}
table.u-g td.u-tl {
  background-color: var(--u-chart);
  background-image: var(--u-grid, none);
  background-repeat: no-repeat;
  border-right: 0;
  /* ── A BAR HAS TO BELONG TO A ROW ─────────────────────────────────────
     The chart inherited the table's row rule, --sk2, which is a hairline
     tuned for parchment and vanishes on the chart's near-white paper. So
     257 rows of bars floated in one undivided field: a pair of bars had no
     boundary, and the amber below a green belonged to that row or to the
     next one with equal plausibility. The chart draws its own row rule, in
     its own ink, at the same 1px as the table's so the two sides of the
     divider stay in register. */
  border-bottom-color: var(--u-rule-lite);
}
table.u-g th.u-tlh-c { padding: 0; min-width: 300px; background-color: var(--u-chart); }
table.u-g thead tr.grp th.g.tl { background-color: var(--u-chart); }
.u-tlh { background-color: var(--u-chart); background-image: var(--u-grid, none); }

/* ── A PHASE BAND CROSSES THE CHART AS A TINT ────────────────────────────
   The WBS colour ran into the chart at full strength, which turned every
   band row into a solid block of colour with a black bar somewhere in it —
   and on a deep WBS that is a stack of solid blocks. In the Gantt tab the
   same colour crosses the chart as a wash. Same here: the band's hue at a
   fraction of its strength over the chart's own paper, so the row still
   reads as that phase and the bars, the gridlines and the Data Date all
   stay legible through it. */
/* `tr.u-wbs td { background: … }` is the SHORTHAND, so it resets
   background-image to none — which silently stripped the chart's gridlines
   from every band row while leaving them on the activity rows. Both halves
   are restated here. */
table.u-g tr.u-wbs td.u-tl {
  background-color: color-mix(in srgb, var(--u-wbs-bg, var(--st)) 13%, var(--u-chart));
  background-image: var(--u-grid, none);
  background-repeat: no-repeat;
}
table.u-g tr.u-wbs:hover td.u-tl {
  background-color: color-mix(in srgb, var(--u-wbs-bg, var(--st)) 19%, var(--u-chart));
  filter: none;
}
/* same trap on the two rows that repaint a whole row */
table.u-g tbody tr:hover td.u-tl,
table.u-g tr.sel td.u-tl {
  background-image: var(--u-grid, none) !important;
  background-repeat: no-repeat;
}
table.u-g tbody tr:hover td.u-tl { background-color: var(--u-chart); }
/* the band's own ink is no longer behind the bar, so its label column keeps
   the full colour and only the chart side is washed */
table.u-g tr.u-wbs td.u-tl .u-tlb { mix-blend-mode: normal; }
table.u-g tbody tr:hover td { background: var(--sk2); }
table.u-g tr.u-wbs td {
  font-weight: 800; font-size: 10.5px; letter-spacing: .05em; text-transform: uppercase;
  padding: 6px 8px; color: var(--u-wbs-text, #fff); background: var(--u-wbs-bg, var(--st));
  cursor: pointer;
}
table.u-g tr.u-wbs:hover td { background: var(--u-wbs-bg, var(--st)); filter: brightness(1.08); }
table.u-g tr.u-wbs td .c { opacity: .75; font-weight: 700; margin-left: 8px; }
table.u-g tr.sel td { background: rgba(77, 110, 145, .1) !important; }

/* ── THE FROZEN IDENTITY COLUMN ──────────────────────────────────────────
   The grid is wider than a tablet. Without this the id and the name scroll
   away and every row becomes an anonymous set of dates — which is what the
   whole table is for. It stays, and it carries the divider that says the
   rest of the row scrolls under it. */
table.u-g th.stk, table.u-g td.stk {
  position: sticky; left: 0; z-index: 3;
  width: var(--u-namew); min-width: var(--u-namew); max-width: var(--u-namew);
  /* a long WBS name ran straight out of the frozen cell and printed itself
     over the next column's dates */
  overflow: hidden;
}
table.u-g tr.u-wbs td.stk .tw {
  display: block; max-width: 100%; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
table.u-g th.stk { z-index: 10; background-color: var(--p2); }
table.u-g td.stk { background-color: var(--p); }
table.u-g th.stk::after, table.u-g td.stk::after {
  content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: var(--sk);
}
table.u-g td.stk { box-shadow: 6px 0 10px -10px rgba(15, 27, 46, .55); }
/* ── A FROZEN COLUMN HAS TO BE OPAQUE ──────────────────────────────────────
   "You froze the name column, but when I scroll sideways the other columns
   come underneath it — there is a transparency and they show through."

   They did. The cell's own background was var(--p), which is solid, but the
   hover state replaced it with var(--sk2) — rgba(42, 47, 54, .11), a TINT,
   eleven per cent of a colour and eighty-nine per cent of whatever is behind
   it. What is behind a sticky cell is the rest of the row, sliding under it.
   The same hazard sits on the WBS band rows, whose colour comes from the
   appearance palette and is not this file's to vouch for.

   So the tint stops being the background and becomes a layer ON one. The
   background-color stays solid underneath in every state; background-image
   paints the tint over it. Identical to look at, and nothing can show
   through a colour that has no alpha left to see through. */
table.u-g tbody tr:hover td.stk {
  background-color: var(--p);
  background-image: linear-gradient(var(--sk2), var(--sk2));
}
/* the selected row sets `background:` with !important two rules up, and a
   shorthand clears the image with it — so the frozen cell has to answer in
   the same terms. Higher specificity, same weight, same look. */
table.u-g tr.sel td.stk {
  background-color: var(--p) !important;
  background-image: linear-gradient(rgba(77, 110, 145, .1), rgba(77, 110, 145, .1)) !important;
}
table.u-g tr.u-wbs td.stk {
  background-color: var(--p);
  background-image: linear-gradient(var(--u-wbs-bg, var(--st)), var(--u-wbs-bg, var(--st)));
}
table.u-g tbody tr.u-wbs:hover td.stk {
  background-image: linear-gradient(var(--u-wbs-bg, var(--st)), var(--u-wbs-bg, var(--st)));
}

/* id and name on one line, the name taking whatever is left */
.u-idn { display: flex; align-items: center; gap: 6px; min-width: 0; }
.u-idn .u-aid { flex: none; }
.u-idn .u-name {
  flex: 1 1 auto; min-width: 0; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; max-width: none;
}
.u-idn .u-src, .u-idn .u-tag { flex: none; }
tr.u-wbs .u-idn .u-name { color: var(--u-wbs-text, #fff); }
table.u-g tr.derived td { opacity: .6; font-style: italic; }
table.u-g tr.ucrit td.num.tf { color: var(--u-crit); font-weight: 700; }

.u-aid { font-family: var(--u-mono); font-size: 10.5px; font-weight: 600; color: var(--mu); }
.u-dt { font-family: var(--u-mono); font-size: 10.5px; }
.u-dt.none { color: var(--mu); opacity: .45; }
.u-dt.act { color: var(--u-good); font-weight: 600; }
.u-num { font-family: var(--u-mono); font-size: 11px; }
.u-name {
  max-width: 260px; overflow: hidden; text-overflow: ellipsis;
  display: block; white-space: nowrap;
}
.u-wtick {
  display: inline-block; width: 3px; height: 11px; border-radius: 2px;
  margin-right: 6px; vertical-align: -1px;
}

/* ── progress bars ────────────────────────────────────────────────────── */
.u-bar2 { display: flex; flex-direction: column; gap: 3px; width: 154px; min-width: 0; }
.u-bar2 .r { display: flex; align-items: center; gap: 6px; }
.u-bar2 .cap { font-size: 8px; font-weight: 800; letter-spacing: .07em; color: var(--mu); width: 42px; flex: none; }
.u-bar2 .tr {
  flex: 1; min-width: 34px; height: 7px; border-radius: 4px;
  background: var(--sk2); overflow: hidden;
}
.u-bar2 .tr i { display: block; height: 100%; border-radius: 4px; background: var(--mu); }
.u-bar2 .tr.exp { background: transparent; border: 1px solid rgba(77, 110, 145, .55); }
.u-bar2 .tr.exp i { background: rgba(77, 110, 145, .3); }
.u-bar2 .n {
  font-size: 9.5px; font-weight: 800; width: 32px; text-align: right;
  flex: none; font-family: var(--u-mono);
}
.u-pbar {
  width: 62px; height: 5px; border-radius: 3px; background: var(--sk2);
  overflow: hidden; display: inline-block; vertical-align: middle;
}
.u-pbar i { display: block; height: 100%; border-radius: 3px; background: var(--mu); }

/* ── review rows ──────────────────────────────────────────────────────── */
.u-rev { border: 1px solid var(--sk); border-radius: var(--r2); overflow: hidden; background: var(--p); }
.u-rev-r {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px;
  padding: 10px 13px; border-bottom: 1px solid var(--sk2); align-items: center;
}
.u-rev-r:last-child { border-bottom: 0; }
.u-rev-r.ACCEPTED, .u-rev-r.EDITED { background: rgba(36, 180, 126, .055); }
.u-rev-r.REJECTED { background: rgba(139, 58, 31, .05); opacity: .62; }
.u-rev-t { display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap; }
.u-rev-t b { font-size: 12px; font-weight: 700; color: var(--st); }
.u-rev-f { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 5px; }
.u-fld { font-size: 10.5px; }
.u-fld .fk {
  font-size: 8.5px; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: var(--mu); display: block;
}
.u-fld .fv { font-family: var(--u-mono); font-size: 11px; font-weight: 600; }
.u-fld .fv s { color: var(--mu); opacity: .6; text-decoration-thickness: 1px; }
.u-fld .fv b { color: var(--u-good); }
.u-acts { display: flex; gap: 5px; flex-wrap: wrap; }
.u-a {
  font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: 5px;
  border: 1px solid var(--sk); background: var(--p); color: var(--mu); cursor: pointer;
}
.u-a.uok { border-color: rgba(36, 180, 126, .45); color: var(--u-good); }
.u-a.uok:hover, .u-a.uok.on { background: var(--u-ok); border-color: var(--u-ok); color: #052D20; }
.u-a.ed:hover { background: var(--sk2); border-color: var(--mu); color: var(--st); }
.u-a.no { border-color: rgba(139, 58, 31, .4); color: var(--u-bad); }
.u-a.no:hover, .u-a.no.on { background: var(--u-bad); border-color: var(--u-bad); color: var(--bg); }

/* ── confidence meter — never hidden ─────────────────────────────────── */
.u-conf { display: inline-flex; gap: 6px; align-items: center; }
.u-conf .segs { display: flex; gap: 2px; }
.u-conf .sg { width: 11px; height: 5px; border-radius: 2px; background: var(--sk2); }
.u-conf .sg.f { background: var(--u-ai); }
.u-conf .sg.f.lo { background: var(--u-warn); }
.u-conf .t { font-size: 9px; font-weight: 800; letter-spacing: .05em; color: var(--mu); font-family: var(--u-mono); }
.u-conf.low .t { color: var(--u-bad); }

/* ── validation list ──────────────────────────────────────────────────── */
.u-val { display: flex; flex-direction: column; }
.u-val-r {
  display: flex; gap: 10px; align-items: center; padding: 8px 13px;
  border-bottom: 1px solid var(--sk2); font-size: 11.5px;
}
.u-val-r:last-child { border-bottom: 0; }
.u-m { width: 17px; height: 17px; border-radius: 5px; display: grid; place-items: center;
  font-size: 10px; font-weight: 800; flex: none; }
.u-m.pass { background: rgba(36, 180, 126, .16); color: var(--u-good); }
.u-m.uwarning { background: rgba(184, 105, 62, .18); color: var(--u-warn); }
.u-m.error { background: rgba(139, 58, 31, .16); color: var(--u-bad); }
/* a note is neither a pass nor a problem: the tracking-sheet parse report
   uses it for things the planner should know before approving — a stale
   period, a changed baseline — which are not failures of the file */
.u-m.info { background: rgba(47, 107, 216, .14); color: var(--u-dd); font-style: italic; }
.u-code {
  font-family: var(--u-mono); font-size: 9.5px; color: var(--mu);
  background: var(--sk2); padding: 1px 5px; border-radius: 3px; flex: none;
}
.u-val-r .lb { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.u-val-r .n { margin-left: auto; font-family: var(--u-mono); font-weight: 700; font-size: 11.5px; flex: none; }
.u-val-r .drill { font-size: 10px; font-weight: 700; color: var(--mu); cursor: pointer; flex: none; }
.u-val-r .drill:hover { color: var(--st); text-decoration: underline; }

/* ── conflict block ───────────────────────────────────────────────────── */
.u-cf {
  border: 1px solid rgba(184, 105, 62, .4); border-radius: var(--r3);
  background: rgba(184, 105, 62, .06); padding: 10px 12px;
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 8px;
}
.u-cf .t { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; color: var(--u-warn); }
.u-cf .o { font-size: 10px; }
.u-cf .o .uk { font-size: 8.5px; font-weight: 800; letter-spacing: .06em; color: var(--mu); display: block; }
.u-cf .o .v { font-family: var(--u-mono); font-size: 13px; font-weight: 700; }
.u-cf.done { border-color: rgba(36, 180, 126, .38); background: rgba(36, 180, 126, .05); }
.u-cf.done .t { color: var(--u-good); }

/* ── timeline ─────────────────────────────────────────────────────────── */
.u-tl { display: flex; flex-direction: column; }
.u-tl-r { display: grid; grid-template-columns: 108px 26px minmax(0, 1fr) auto; gap: 12px; align-items: start; }
.u-tl-when { text-align: right; padding-top: 13px; }
.u-tl-when .d { font-family: var(--u-mono); font-size: 11.5px; font-weight: 700; color: var(--st); }
.u-tl-when .t { font-size: 9px; color: var(--mu); font-weight: 600; }
.u-tl-ax { position: relative; display: flex; justify-content: center; }
.u-tl-ax::before { content: ''; position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--sk); }
.u-tl-r:first-child .u-tl-ax::before { top: 14px; }
.u-tl-r:last-child .u-tl-ax::before { bottom: calc(100% - 14px); }
.u-tl-dot {
  width: 11px; height: 11px; border-radius: 50%; background: var(--p);
  border: 2.5px solid var(--mu); margin-top: 14px; z-index: 1; flex: none;
}
.u-tl-dot.ubl { border-color: var(--u-warn); background: var(--u-warn); }
.u-tl-dot.ucur { border-color: var(--u-ok); background: var(--u-ok); box-shadow: 0 0 0 4px rgba(36, 180, 126, .18); }
.u-tl-dot.orig { border-color: var(--sk); }
.u-tl-card { border: 1px solid var(--sk); border-radius: var(--r2); background: var(--p); padding: 11px 13px; margin: 6px 0; }
.u-tl-card.ucur { border-color: rgba(36, 180, 126, .45);
  box-shadow: 0 1px 2px rgba(15, 27, 46, .05), 0 8px 24px -14px rgba(15, 27, 46, .18); }
.u-tl-card.ubl { border-color: rgba(184, 105, 62, .4); }
.u-tl-card.orig { background: var(--p2); }
.u-tl-h { display: flex; gap: 9px; align-items: baseline; flex-wrap: wrap; }
.u-tl-h b { font-size: 13px; font-weight: 800; color: var(--st); }
.u-tl-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 7px; }
.u-tl-meta .m { font-size: 10px; }
.u-tl-meta .m .uk { font-size: 8.5px; font-weight: 800; letter-spacing: .06em; color: var(--mu); display: block; }
.u-tl-meta .m .v { font-family: var(--u-mono); font-weight: 700; font-size: 11.5px; color: var(--st); }
.u-tl-acts { display: flex; gap: 5px; padding-top: 20px; flex-wrap: wrap; }

/* ── layout grids ─────────────────────────────────────────────────────── */
.u-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.u-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; align-items: start; }
.u-wide { display: grid; grid-template-columns: 1.55fr 1fr; gap: 14px; align-items: start; }
.u-col { display: flex; flex-direction: column; gap: 14px; }
.u-rt { display: grid; grid-template-columns: 1fr; }
.u-rt.two { grid-template-columns: 1fr 1fr; gap: 0 22px; }
.u-rt-r {
  display: flex; gap: 9px; align-items: baseline; padding: 4.5px 0;
  border-bottom: 1px solid var(--sk2); font-size: 11px;
}
.u-rt-r:last-child { border-bottom: 0; }
.u-rt-r .uk { color: var(--mu); font-weight: 600; min-width: 0; }
.u-rt-r .v { margin-left: auto; font-family: var(--u-mono); font-weight: 700; color: var(--st); white-space: nowrap; }
.u-ok { color: var(--u-good); font-weight: 800; }

/* ── DESCRIPTIVE ROWS ──────────────────────────────────────────────────
   .u-rt is a key/value strip: its value is monospace, right-aligned and
   nowrap, which is right for "SPI 0.94" and wrong for a sentence. The
   Tracking Sheet has to explain what the sheet contains in prose, so this
   is the same row rhythm with a value that WRAPS and reads as text.
   ─────────────────────────────────────────────────────────────────────── */
.u-dlist { display: grid; grid-template-columns: 1fr; }
.u-dlist-r {
  display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 12px;
  padding: 7px 0; border-bottom: 1px solid var(--sk2); align-items: baseline;
}
.u-dlist-r:last-child { border-bottom: 0; }
.u-dlist-r > .uk {
  font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--mu); line-height: 1.5;
}
.u-dlist-r > .uk em {
  display: block; font-style: normal; font-weight: 600; letter-spacing: .02em;
  text-transform: none; font-size: 9px; color: var(--u-good);
}
.u-dlist-r > .v { font-size: 11px; color: var(--tx); line-height: 1.6; min-width: 0; }
/* a column name is a thing, not a word in a sentence: six of them in a row
   read as one string unless each is a chip */
.u-dlist-r > .v code, .u-dlist-r > .v .mono {
  font-family: var(--u-mono); font-size: 9.5px; font-weight: 600;
  background: var(--sk2); color: var(--st);
  padding: 1.5px 6px; border-radius: 4px;
  display: inline-block; margin: 0 3px 3px 0; white-space: nowrap;
}
@media (max-width: 760px) {
  .u-dlist-r { grid-template-columns: 1fr; gap: 2px; }
}

/* ── charts ───────────────────────────────────────────────────────────── */
.u-svg { width: 100%; height: auto; display: block; }
.u-svg text { font-family: 'DM Sans', system-ui, sans-serif; }
.u-svg .mono { font-family: var(--u-mono); }

/* ── drawer / sheet ───────────────────────────────────────────────────── */
.u-dock { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 0;
  border: 1px solid var(--sk); border-radius: var(--r2); overflow: hidden; }
.u-dock > .u-gwrap { border: 0; border-radius: 0; border-right: 1px solid var(--sk); }
.u-drawer { background: var(--p); display: flex; flex-direction: column; min-width: 0; max-height: 72vh; }
.u-dr-h { padding: 12px 14px; border-bottom: 1px solid var(--sk); background: var(--p2); }
.u-dr-h .id { font-family: var(--u-mono); font-size: 10.5px; font-weight: 700; color: var(--mu); }
.u-dr-h .nm { font-size: 14px; font-weight: 800; color: var(--st); letter-spacing: -.2px; margin-top: 1px; text-wrap: balance; }
.u-dr-h .wb { font-size: 10px; color: var(--mu); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.u-dr-b { padding: 13px 14px; display: flex; flex-direction: column; gap: 13px; overflow-y: auto; flex: 1; }
.u-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; }
.u-kv .i { min-width: 0; }
.u-kv .i .uk {
  font-size: 8.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase;
  color: var(--mu); display: flex; gap: 4px; align-items: baseline;
}
.u-kv .i .uk em { font-style: normal; opacity: .55; font-size: 7.5px; font-family: var(--u-mono); }
.u-kv .i .v { font-family: var(--u-mono); font-size: 12px; font-weight: 600; margin-top: 1px; }
.u-kv .i .v.em { color: var(--st); font-weight: 700; }
.u-kv .i .v.none { color: var(--mu); opacity: .5; }
.u-kv .i .v.bad { color: var(--u-bad); }
.u-kv .i .v.good { color: var(--u-good); }

.u-qa { border: 1px solid var(--sk); border-radius: var(--r3); overflow: hidden; }
.u-qa.sug { border-color: rgba(184, 105, 62, .42); border-style: dashed; }
.u-qa-h {
  padding: 8px 11px; background: var(--p2); display: flex; gap: 8px; align-items: center;
  font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu);
}
.u-qa.sug .u-qa-h { background: rgba(184, 105, 62, .07); color: var(--u-warn); }
.u-qa-b { padding: 11px; }
.u-qa-v { font-family: var(--u-mono); font-size: 17px; font-weight: 700; color: var(--st); }
.u-qa-why { font-size: 10px; color: var(--mu); line-height: 1.55; margin-top: 4px; }
.u-qa-f { display: flex; gap: 6px; padding: 0 11px 11px; flex-wrap: wrap; }

/* ── modal ────────────────────────────────────────────────────────────── */
.u-ov {
  position: fixed; inset: 0; z-index: 4000; background: rgba(15, 27, 46, .42);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 18px; overflow-y: auto; -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.u-ov[hidden] { display: none !important; }
.u-mod {
  background: var(--p); border: 1px solid var(--sk); border-radius: var(--r2);
  box-shadow: 0 24px 60px -20px rgba(15, 27, 46, .5);
  width: 100%; max-width: 1040px; overflow: hidden;
}
.u-mod.narrow { max-width: 620px; }
.u-mod-h {
  padding: 12px 15px; border-bottom: 1px solid var(--sk); display: flex;
  align-items: center; gap: 10px; background: var(--p2);
}
.u-mod-h .tt { font-size: 12.5px; font-weight: 800; letter-spacing: .03em; color: var(--st); }
.u-mod-h .tt span {
  display: block; font-size: 9px; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--mu); margin-bottom: 1px;
}
.u-mod-h .x {
  margin-left: auto; font-size: 15px; color: var(--mu); line-height: 1;
  background: none; border: 0; cursor: pointer; padding: 4px 6px;
}
.u-mod-h .x:hover { color: var(--st); }
.u-mod.ai .u-mod-h { background: linear-gradient(100deg, rgba(109, 91, 168, .13), var(--p2)); }
.u-mod-b { padding: 15px; max-height: 66vh; overflow-y: auto; }
.u-mod-f {
  padding: 11px 15px; border-top: 1px solid var(--sk); display: flex; gap: 8px;
  align-items: center; background: var(--p2); flex-wrap: wrap;
}

/* ── options / inputs ─────────────────────────────────────────────────── */
.u-opt { display: flex; gap: 9px; align-items: flex-start; padding: 7px 0;
  border-bottom: 1px solid var(--sk2); width: 100%; }
.u-opt:last-child { border-bottom: 0; }
.u-opt.flat { border-bottom: 0; }
.u-box, .u-rad {
  width: 15px; height: 15px; flex: none; margin-top: 1px; display: grid; place-items: center;
  border: 1.5px solid var(--sk); font-size: 9px; font-weight: 800; color: transparent;
}
.u-box { border-radius: 4px; }
.u-rad { border-radius: 50%; }
.u-box.on { background: var(--u-ok); border-color: var(--u-ok); color: #052D20; }
.u-rad.on { border-color: var(--mu); border-width: 4.5px; }
.u-opt .ot { font-size: 11.5px; font-weight: 600; color: var(--tx); }
.u-opt .ot span { display: block; font-size: 9.5px; color: var(--mu); font-weight: 500; margin-top: 1px; line-height: 1.55; }
.u-opt .ot .p6t { font-family: var(--u-mono); font-size: 9px; color: var(--mu); font-weight: 600; }
.u-opt.dim { opacity: .5; cursor: not-allowed; }

.u-in {
  font-size: 12px; padding: 6px 10px; border-radius: var(--r3);
  border: 1px solid var(--sk); background: var(--p); color: var(--tx);
  font-family: inherit; width: 100%;
}
.u-in.mono { font-family: var(--u-mono); }
.u-in:focus { outline: 2px solid var(--mu); outline-offset: -1px; }
.u-ta {
  width: 100%; border: 1px solid var(--sk); border-radius: var(--r3); padding: 11px 12px;
  font: inherit; font-size: 12px; background: var(--p2); color: var(--tx);
  resize: vertical; line-height: 1.6; min-height: 96px;
}
.u-ta:focus { outline: 2px solid var(--u-ai); outline-offset: -1px; background: var(--p); }
.u-ins { display: flex; gap: 6px; flex-wrap: wrap; }
.u-inb {
  font-size: 10px; font-weight: 700; padding: 5px 10px; border-radius: 20px;
  border: 1px solid var(--sk); color: var(--mu); background: var(--p);
  display: inline-flex; gap: 5px; align-items: center; cursor: pointer;
}
.u-inb.on { border-color: var(--u-ai); color: var(--u-ai); background: rgba(109, 91, 168, .08); }
.u-inb[disabled] { opacity: .45; cursor: not-allowed; }
.u-drop {
  display: block;
  border: 1.5px dashed var(--sk); border-radius: var(--r2); padding: 26px 18px;
  text-align: center; background: var(--p2); cursor: pointer; transition: all .14s;
}
.u-drop:hover, .u-drop.hot { border-color: var(--mu); background: var(--p); }
.u-drop .big { font-size: 13px; font-weight: 700; color: var(--st); }
.u-drop .sm { font-size: 10.5px; color: var(--mu); margin-top: 3px; }
.u-drop .ico { display: inline-grid; place-items: center; width: 40px; height: 40px;
  border-radius: 11px; margin: 0 auto 10px; background: var(--sk2); color: var(--mu); }
.u-drop:hover .ico, .u-drop.hot .ico { background: rgba(36, 180, 126, .14); color: var(--u-good); }
.u-drop .fn {
  display: inline-flex; gap: 7px; align-items: center; margin-top: 11px;
  font-family: var(--u-mono); font-size: 11px; font-weight: 600;
  padding: 6px 11px; border-radius: 20px; background: var(--p); border: 1px solid var(--sk);
}

/* ── gantt embed ──────────────────────────────────────────────────────── */
.u-gt { border: 1px solid var(--sk); border-radius: var(--r2); overflow: hidden; background: var(--p); }
.u-gt-h { display: grid; grid-template-columns: 190px 1fr; border-bottom: 1px solid var(--sk); background: var(--p2); }
.u-gt-h .l {
  padding: 6px 10px; font-size: 8.5px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mu); border-right: 1px solid var(--sk);
}
.u-gt-h .r { display: flex; }
.u-gt-h .mo {
  flex: 1; padding: 6px 0; text-align: center; font-size: 9px; font-weight: 700;
  color: var(--mu); border-right: 1px solid var(--sk2); letter-spacing: .03em;
}
/* ── THE COMPARISON TAKES THE SCREEN IT IS GIVEN ──────────────────────
   52vh is half the screen, so on any normal display the two panels stopped
   at the middle and the bottom half of the Comparison tab was empty —
   which is what the owner's screenshot shows. --u-cmp-h is measured by
   update.tab.js from where the panels actually start, exactly as --u-above
   is measured for the Update Centre's grid; the 52vh stays as the value
   before that measurement lands. */
.u-gt-body {
  max-height: var(--u-cmp-h, 52vh);
  height: var(--u-cmp-h, auto);
  overflow-y: auto;
  overscroll-behavior: contain;
}
/* the two panels must line up row for row, or the comparison compares
   different rows at the same height */
.u-2 .u-col > .u-gt { flex: 1 1 auto; min-height: 0; }
.u-2 .u-col > .u-card { flex: 0 0 auto; }

/* the picker: two lists and a segmented layout switch, on one line */
.u-cmp-pick {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  border: 1px solid var(--sk); border-radius: var(--r2);
  padding: 8px 10px; margin-bottom: 12px; background: var(--p2);
}
.u-cmp-pick label { display: flex; align-items: center; gap: 7px; min-width: 0; }
.u-cmp-pick .u-sel {
  background: var(--p); color: inherit; font: inherit; font-size: 11.5px;
  border: 1px solid var(--sk); border-radius: var(--r3);
  padding: 5px 9px; max-width: 280px;
}
.u-cmp-arrow { color: var(--mu); font-weight: 800; }
.u-seg { display: inline-flex; border: 1px solid var(--sk); border-radius: var(--r3); overflow: hidden; }
.u-seg .u-f { border: 0; border-radius: 0; }
.u-seg .u-f + .u-f { border-left: 1px solid var(--sk); }
.u-gt-r { display: grid; grid-template-columns: 190px 1fr; border-bottom: 1px solid var(--sk2); }
.u-gt-r .l {
  padding: 4px 10px; font-size: 10.5px; border-right: 1px solid var(--sk);
  display: flex; gap: 6px; align-items: center; overflow: hidden;
}
.u-gt-r .l .t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-gt-r.w .l {
  font-weight: 800; font-size: 9.5px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--u-wbs-text, #fff); background: var(--u-wbs-bg, var(--st));
}
.u-gt-r .r { position: relative; height: 22px; }
.u-gt-b { position: absolute; height: 8px; border-radius: 2px; top: 7px; }
.u-gt-b.ubl { height: 4px; top: 15px; opacity: .42; border-radius: 1px; background: var(--u-warn); }
.u-gt-b.act { border-radius: 2px 0 0 2px; background: var(--u-ok); }
.u-gt-b.rem { opacity: .5; background: var(--mu); }
.u-gt-b.rem.ucrit { opacity: .85; background: var(--u-crit); }
.u-gt-b.ums { width: 9px !important; height: 9px; top: 6px; transform: rotate(45deg); border-radius: 1px; }
.u-gt-dd { position: absolute; top: 0; bottom: 0; width: 1.5px; background: var(--u-dd); z-index: 3; }
.u-gt-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(90deg, rgba(15, 27, 46, .05) 0 1px, transparent 1px 12.5%);
}

/* ── export cards ─────────────────────────────────────────────────────── */
.u-exps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.u-exp {
  border: 1px solid var(--sk); border-radius: var(--r2); background: var(--p);
  padding: 12px; display: flex; flex-direction: column; gap: 6px; text-align: left;
  cursor: pointer; font: inherit; color: inherit; transition: all .14s;
}
.u-exp:hover { border-color: var(--mu);
  box-shadow: 0 1px 2px rgba(15, 27, 46, .05), 0 10px 26px -14px rgba(15, 27, 46, .2); }
.u-exp[disabled] { opacity: .5; cursor: not-allowed; }
.u-exp .fmt { font-family: var(--u-mono); font-size: 13px; font-weight: 700; color: var(--st); letter-spacing: -.2px; }
.u-exp .of { font-size: 9px; font-weight: 800; letter-spacing: .09em; color: var(--mu); text-transform: uppercase; }
.u-exp .ds { font-size: 10px; color: var(--mu); line-height: 1.5; }
.u-exp .dr {
  font-size: 9.5px; color: var(--u-warn); font-weight: 600; line-height: 1.5;
  padding-top: 5px; border-top: 1px dashed var(--sk); margin-top: auto;
}

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1320px) {
  .u-kpis { grid-template-columns: repeat(3, 1fr); }
  .u-dock { grid-template-columns: minmax(0, 1fr) 340px; }
}
@media (max-width: 1100px) {
  .u-stats { grid-template-columns: repeat(3, 1fr); }
  .u-methods { grid-template-columns: repeat(2, 1fr); }
  .u-exps { grid-template-columns: repeat(2, 1fr); }
  .u-wide, .u-2, .u-3 { grid-template-columns: 1fr; }
  .u-rt.two { grid-template-columns: 1fr; }
  .u-dock { grid-template-columns: 1fr; }
  .u-dock > .u-gwrap { border-right: 0; border-bottom: 1px solid var(--sk); }
  .u-drawer { max-height: none; }
}
@media (max-width: 760px) {
  .u-rail { flex-direction: column; align-items: stretch; gap: 10px; }
  .u-rail-f { border-left: 0; padding: 0; }
  .u-rail-end { margin-left: 0; }
  .u-rail-id { margin-right: 0; }
  .u-tl-r { grid-template-columns: 82px 20px minmax(0, 1fr); gap: 8px; }
  .u-tl-acts { grid-column: 3; padding-top: 0; padding-bottom: 10px; }
}
@media (max-width: 600px) {
  .u-kpis, .u-stats, .u-methods, .u-exps { grid-template-columns: 1fr 1fr; }
  .u-kv { grid-template-columns: 1fr; }
  .u-mod-b { max-height: 74vh; }
  .u-ov { padding: 2vh 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .upd *, .u-ov, .u-mod { transition: none !important; animation: none !important; }
  .u-method:hover { transform: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   THE PRINT REPORT

   #updPrintReport is hidden on screen and only @media print reveals it,
   which is the same mechanism styles/tabs/cost.css uses for the cost
   report. The point of printing the DOM rather than rasterising it is
   that the tables stay selectable text and the inline SVG charts stay
   vector, so a reviewer can search the PDF and zoom a curve without it
   turning to mush.

   Deliberately light-only and hex-literal: a printer has no dark mode,
   and a theme token would resolve to whatever the app's theme happens to
   be when the planner presses print.
   ══════════════════════════════════════════════════════════════════════ */
#updPrintReport { display: none }

@media print {
  /* only the report prints; the app's own chrome is not part of it */
  body > *:not(#updPrintReport) { display: none !important }
  body > #updPrintReport { display: block !important }

  @page { size: A4 landscape; margin: 12mm 11mm 13mm }

  #updPrintReport {
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    color: #0A0F1A;
    font-size: 9pt;
    line-height: 1.42;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  /* ── cover ───────────────────────────────────────────────────────── */
  #updPrintReport .pr-cover { page-break-after: always; padding-top: 44mm; text-align: center }
  #updPrintReport .pr-mark {
    font: 800 10.5pt/1 "Plus Jakarta Sans", sans-serif;
    letter-spacing: .22em; color: #188D68;
  }
  #updPrintReport .pr-cover h1 {
    margin: 9mm 0 3mm;
    font: 800 27pt/1.1 "Plus Jakarta Sans", sans-serif;
    letter-spacing: -.6pt;
  }
  #updPrintReport .pr-cover .pr-sub { margin: 0; font-size: 11pt; color: #69747F }
  #updPrintReport .pr-cover .pr-meta {
    margin: 15mm auto 0; max-width: 176mm;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 5mm 8mm;
    text-align: left; font-size: 9pt;
  }
  #updPrintReport .pr-cover .pr-meta > div {
    border-top: .6pt solid #E2E8EE; padding-top: 2mm;
    display: flex; flex-direction: column; gap: .8mm;
  }
  #updPrintReport .pr-cover .pr-meta b {
    color: #69747F; font-weight: 600; font-size: 7.6pt;
    letter-spacing: .08em; text-transform: uppercase;
  }
  #updPrintReport .pr-cover .pr-meta span { font-weight: 700; font-size: 10pt }

  /* ── a page break the report asks for, not one the flow happens to give ── */
  #updPrintReport .pr-page { page-break-before: always }

  #updPrintReport .pr-sect { margin-bottom: 6mm }
  #updPrintReport .pr-sect > h2 {
    font: 800 12pt/1.2 "Plus Jakarta Sans", sans-serif;
    margin: 0 0 3mm; padding-bottom: 1.6mm;
    border-bottom: .8pt solid #0A0F1A; letter-spacing: -.2pt;
  }

  /* ── tables ──────────────────────────────────────────────────────── */
  #updPrintReport table { width: 100%; border-collapse: collapse; font-size: 8pt }
  /* repeat the header on every page a long table spills onto */
  #updPrintReport thead { display: table-header-group }
  #updPrintReport tfoot { display: table-footer-group }
  #updPrintReport tr { page-break-inside: avoid }
  #updPrintReport th, #updPrintReport td {
    padding: 1.4mm 2mm; border-bottom: .4pt solid #E2E8EE;
    text-align: left; vertical-align: top;
  }
  #updPrintReport thead th {
    background: #EDF1F5 !important; font-weight: 700; font-size: 7.2pt;
    letter-spacing: .05em; text-transform: uppercase; color: #3C4956;
    border-bottom: .7pt solid #C9D3DC;
  }
  #updPrintReport td.n, #updPrintReport th.n {
    text-align: right; font-variant-numeric: tabular-nums;
  }
  #updPrintReport td.q { color: #69747F; font-size: 7.4pt; line-height: 1.34 }
  #updPrintReport td.neg { color: #8B3A1F; font-weight: 700 }
  #updPrintReport tr.wbs > * { font-weight: 700; background: #F7FAFC !important }
  #updPrintReport tr.wbs.d0 > * { background: #EDF1F5 !important }

  /* ── charts: the same inline SVG the Dashboard draws ─────────────── */
  #updPrintReport .pr-chart { page-break-inside: avoid; margin: 0 0 3mm }
  #updPrintReport .pr-chart svg { width: 100%; height: auto; display: block }

  #updPrintReport .pr-note {
    margin: 2.5mm 0 0; font-size: 7.6pt; color: #69747F; line-height: 1.45;
  }
  #updPrintReport .pr-foot {
    margin-top: 6mm; padding-top: 2mm; border-top: .5pt solid #E2E8EE;
    font-size: 7pt; color: #8A97A6; text-align: center;
  }
}

/* ── the composer's rule hints ────────────────────────────────────────────
   The instructions that are answered by rule rather than by the model. They
   are on the composer because a capability nobody can discover is not one. */
.u-hint {
  margin-top: 10px; padding: 9px 10px; border-radius: var(--r3);
  border: 1px dashed var(--sk); background: var(--p2);
  display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
}
.u-hint .hl {
  width: 100%; font-size: 8.5px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--mu); margin-bottom: 2px;
}
.u-hint .hb {
  font-size: 10.5px; padding: 4px 9px; border-radius: 20px;
  border: 1px solid var(--sk); background: var(--p); color: var(--st);
  cursor: pointer; line-height: 1.2;
}
.u-hint .hb:hover { border-color: var(--u-ai); color: var(--u-ai); background: rgba(109, 91, 168, .06); }
.u-hint .hn { width: 100%; font-size: 9.5px; color: var(--mu); line-height: 1.5; margin-top: 3px; }

/* ── how a rule-resolved result announces itself ──────────────────────── */
.u-intent {
  padding: 11px 13px; border-bottom: 1px solid var(--sk);
  background: linear-gradient(180deg, rgba(109, 91, 168, .07), transparent);
}
.u-intent .t { font-size: 12.5px; font-weight: 800; color: var(--st); }
.u-intent .s { font-size: 10.5px; color: var(--mu); line-height: 1.55; margin-top: 3px; max-width: 86ch; }
.u-intent .m {
  font-size: 9.5px; color: var(--u-ai); font-weight: 600; margin-top: 5px;
  padding-top: 5px; border-top: 1px dashed var(--sk);
}

/* ── the change table ─────────────────────────────────────────────────────
   Before → after in every cell, with one colour per kind of move and
   nothing else using those colours:

     green   a value that was empty and is now set   work newly recorded
     amber   a value that changed                    a figure revised
     steel   unchanged                               context, not news
     red     a finish that moves later               the thing to argue about

   Struck-through is always what the project holds today; bold is always what
   this update would write. */
.u-dl { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; line-height: 1.2; }
.u-dl s { opacity: .5; text-decoration-thickness: 1px; font-family: var(--u-mono); font-size: 10px; }
.u-dl b { font-family: var(--u-mono); font-weight: 800; }
.u-dl.same { color: var(--mu); font-family: var(--u-mono); opacity: .75; }
.u-dl.new b { color: var(--u-good); }
.u-dl.mv  b { color: var(--u-warn); }
.u-dl.bad b { color: var(--u-crit); }
.u-dl.new::before, .u-dl.mv::before, .u-dl.bad::before {
  content: ''; width: 3px; align-self: stretch; border-radius: 2px; flex: none;
}
.u-dl.new::before { background: var(--u-good); }
.u-dl.mv::before  { background: var(--u-warn); }
.u-dl.bad::before { background: var(--u-crit); }

.u-slip {
  display: inline-block; margin-left: 5px; font-size: 9.5px; font-weight: 800;
  font-family: var(--u-mono); padding: 1px 5px; border-radius: 3px;
}
.u-slip.ulate  { background: rgba(198, 70, 43, .14); color: var(--u-crit); }
.u-slip.uearly { background: rgba(36, 180, 126, .16); color: var(--u-good); }

/* progress, before under after in one track */
.u-pgd { display: flex; align-items: center; gap: 7px; }
.u-pgd .tk {
  position: relative; flex: 1; min-width: 40px; height: 9px;
  border-radius: 4px; background: var(--sk2); overflow: hidden;
}
.u-pgd .tk .b { position: absolute; left: 0; top: 0; bottom: 0; background: var(--mu); opacity: .38; }
.u-pgd .tk .a { position: absolute; left: 0; top: 0; bottom: 0; background: var(--u-good); opacity: .92; }
.u-pgd .n { display: flex; flex-direction: column; line-height: 1.15; width: 36px; flex: none; text-align: right; }
.u-pgd .n s { font-size: 8.5px; font-family: var(--u-mono); color: var(--mu); opacity: .7; }
.u-pgd .n b { font-size: 10.5px; font-family: var(--u-mono); font-weight: 800; color: var(--u-good); }

table.u-g.chg { min-width: 1160px; }
table.u-g.chg.tl { min-width: 1520px; }
/* in a table cell the three decisions are one control, not a wrapping stack:
   at 150px they were breaking to two lines and doubling every row's height */
table.u-g.chg .u-acts { flex-wrap: nowrap; gap: 3px; }
table.u-g.chg .u-a { padding: 3px 7px; font-size: 9.5px; }
table.u-g tr.ch td { vertical-align: middle; }
table.u-g tr.ch.REJECTED td { opacity: .45; }
table.u-g tr.ch.REJECTED .u-dl b { text-decoration: line-through; }
table.u-g tr.ch.ACCEPTED td:first-child, table.u-g tr.ch.EDITED td:first-child {
  box-shadow: inset 3px 0 0 var(--u-ok);
}
table.u-g tr.ch.PENDING td:first-child { box-shadow: inset 3px 0 0 var(--sk); }
table.u-g tr.ch.cf td:first-child { box-shadow: inset 3px 0 0 var(--u-crit); }
table.u-g tr.ch .u-chip + .u-chip { margin-left: 2px; }

/* ── THE THREE-TRACK BAR, IN THE MODULE'S OWN LANGUAGE ───────────────────
   AFTER on top and dominant, carrying the status colour it will have once
   applied. BEFORE quiet underneath — it is the thing being replaced.
   BASELINE amber at the bottom, the same fixed reference as every other
   screen. Before this, all three were similar warm bars and you could not
   tell which was which. */
.u-tlb.c3 { height: 36px; }
.u-tlb .ub.uaft {
  top: 4px; height: 9px; z-index: 5; border-radius: 2px;
  background: var(--u-todo);
}
.u-tlb .ub.uaft.ucrit { background: var(--u-crit); }
.u-tlb .ub.uaft.ucmpl { background: var(--u-cmpl); }
.u-tlb .ub.ubfr {
  top: 16px; height: 6px; z-index: 3; border-radius: 2px;
  background: var(--mu); opacity: .42;
}
.u-tlb.c3 .ub.ubl { top: 25px; height: 7px; z-index: 2; }
.u-tlb.c3 .ums.uaft { top: 3px; z-index: 5; background: var(--u-todo); }
.u-tlb.c3 .ums.uaft.ucrit { background: var(--u-crit); }
.u-tlb.c3 .ums.uaft.ucmpl { background: var(--u-cmpl); }
.u-tlb.c3 .ums.ubfr { top: 15px; width: 7px; height: 7px; margin-left: -3.5px; background: var(--mu); opacity: .5; z-index: 3; }
.u-tlb.c3 .ums.ubl { top: 24px; z-index: 2; }
.u-tlb .umoved {
  position: absolute; top: 14px; height: 0; z-index: 6;
  border-top: 2px dotted var(--u-crit);
}
.u-tlb .umoved.uearly { border-top-color: var(--u-good); }

/* the table / detail switch */
.u-seg { display: inline-flex; border: 1px solid var(--sk); border-radius: 5px; overflow: hidden; }
.u-seg .sg {
  font-size: 10.5px; font-weight: 600; padding: 4px 11px; border: 0;
  background: var(--p); color: var(--mu); cursor: pointer;
}
.u-seg .sg + .sg { border-left: 1px solid var(--sk); }
.u-seg .sg.on { background: var(--st); color: var(--bg2); font-weight: 700; }

.u-key { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.u-key .uk { width: 11px; height: 6px; border-radius: 2px; margin-left: 8px; }
.u-key .uk:first-child { margin-left: 0; }
.u-key .uk.new  { background: var(--u-good); }
.u-key .uk.mv   { background: var(--u-warn); }
.u-key .uk.ubl   { background: var(--u-bl); height: 4px; }
.u-key .uk.ubfr  { background: var(--mu); opacity: .42; }
.u-key .uk.uaft  { background: var(--u-todo); }
.u-key .uk.ulate { background: transparent; border-top: 2px dotted var(--u-crit); height: 0; width: 14px; }

/* ── THE GROUPED HEADER ───────────────────────────────────────────────────
   Eleven columns in a flat run read as eleven unrelated facts. They are
   three pairs and a triple, so the header says so: a band naming the group,
   a row naming the field. Same table, read as four blocks. */
table.u-g thead tr.grp th {
  border-bottom: 1px solid var(--sk2);
}
table.u-g thead tr.grp th.g {
  text-align: center; font-size: 8px; letter-spacing: .13em;
  color: var(--st); padding-bottom: 5px;
}
table.u-g thead tr.grp th.g.ubl { color: #9A7412; }
table.u-g thead tr.grp th.g.pr { color: var(--u-good); }
/* Both numbers come from one token, so the sub row's sticky offset can
   never drift from the band's real height. */
.upd { --u-hgrp: 22px; }
table.u-g thead tr.grp th { height: var(--u-hgrp); padding-top: 6px; padding-bottom: 4px; }
table.u-g thead tr.sub th {
  top: var(--u-hgrp); font-size: 8px; letter-spacing: .06em;
  padding-top: 4px; padding-bottom: 6px;
}
table.u-g thead tr.grp th[rowspan] { vertical-align: bottom; padding-bottom: 7px; }
table.u-g thead tr.grp th.g.tl { text-align: left; padding-left: 8px; color: var(--mu); }
/* the group bands get a hairline between them so the blocks are visible */
table.u-g thead th.g, table.u-g thead tr.sub th.pr:first-of-type { border-left: 1px solid var(--sk); }
table.u-g thead tr.sub th.ubl:first-of-type { border-left: 1px solid var(--sk); }
table.u-g td.pr-l, table.u-g th.pr-l { border-left: 1px solid var(--sk); }

/* Plan % — its own column now, because Schedule % Complete at the Data Date
   is what the whole update is measured against, not a footnote inside
   another cell */
.u-pl {
  font-family: var(--u-mono); font-size: 11px; font-weight: 700; color: var(--mu);
}
.u-pl.sm { font-size: 9px; }
.u-pl.rld { opacity: .95; }
.u-vr { font-family: var(--u-mono); font-size: 10px; font-weight: 800; }
.u-vr.uok { color: var(--u-good); } .u-vr.uwarn { color: var(--u-warn); } .u-vr.bad { color: var(--u-crit); }
table.u-g tr.u-wbs .u-pl, table.u-g tr.u-wbs .u-vr { color: var(--u-wbs-text, #fff); }

table.u-g tr.u-wbs .u-pg .nm { color: var(--u-wbs-text, #fff); }

/* the whole plan-and-actual block, for the screens that still want one cell */
.u-pgw { display: inline-flex; align-items: center; gap: 7px; }

/* ── §44: ONE PRIMARY ACTION ──────────────────────────────────────────────
   Auto Update is the workflow this screen exists for. It reads as the
   primary and the other three read as the alternatives they are — rather
   than four identical buttons that leave the planner to work out which one
   is the point of the page. */
.u-mstrip { padding: 6px 9px; margin-bottom: 9px; }
.u-mth.pri {
  background: var(--st); border-color: var(--st); padding-right: 13px;
}
.u-mth.pri:hover { background: var(--mu); border-color: var(--mu); }
.u-mth.pri .tx b { color: var(--bg2); }
.u-mth.pri .tx em { color: rgba(231, 238, 246, .72); }
.u-mth.pri .ico { background: rgba(231, 238, 246, .16); color: var(--bg2); }
.u-msep { width: 1px; align-self: stretch; background: var(--sk); margin: 0 4px; }
.u-b.sm { font-size: 10.5px; padding: 5px 11px; }

/* ── THE AUTO UPDATE PREVIEW ──────────────────────────────────────────────
   The modal IS the preview the workflow asks for: what will change, before
   anything does. It is also where the planner chooses between one
   confirmation and reading all 615 rows — both offered, neither hidden. */
.u-prev {
  border: 1px solid var(--sk); border-left: 3px solid var(--st);
  border-radius: var(--r3); background: var(--p2);
  padding: 9px 12px; margin-bottom: 10px;
  font-size: 11px; color: var(--mu); line-height: 1.6;
}
.u-prev b { font-family: var(--u-mono); font-weight: 800; color: var(--st); }
.u-prev em {
  display: block; font-style: normal; font-size: 9.5px; margin-top: 5px;
  padding-top: 5px; border-top: 1px dashed var(--sk); line-height: 1.55;
}

/* ══════════════════════════════════════════════════════════════════════════
   THE CHART'S KEY, AND A FLAG THAT IS NOT A STATUS
══════════════════════════════════════════════════════════════════════════ */

/* ── THE KEY ──────────────────────────────────────────────────────────────
   Asked of the old chart: "where is the baseline and where is the update —
   can you tell from the picture?" You could not. Two bars stated two facts
   and nothing on the drawing said which fact was which; the conventions
   lived in a settings screen and in the reader's memory. A chart that uses
   colour to mean something carries its key, on the chart, in its header,
   where the eye already is. */
table.u-g thead tr.grp th.g.tl { padding: 0 10px; text-align: left; }
/* ONE LINE, ALWAYS. Wrapping put the key on two rows, which made this
   header cell taller than the group cells beside it - so the whole thead
   grew, the ruler row shifted, and the columns stopped lining up with the
   chart. A key is not worth a broken header: it stays on one line and
   clips if the chart is narrow. */
.u-lgd {
  display: flex; align-items: center; gap: 4px; flex-wrap: nowrap;
  overflow: hidden; max-width: 100%;
  font-size: 9px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: var(--mu); line-height: 1; white-space: nowrap;
}
.u-lgd i.uk {
  width: 12px; height: 7px; border-radius: 2px; flex: none;
  margin-left: 6px; display: inline-block;
}
.u-lgd i.uk:first-child { margin-left: 0; }
.u-lgd i.uk.ubl   { background: var(--u-bl); box-shadow: inset 0 0 0 1px rgba(120, 82, 0, .55); }
.u-lgd i.uk.ucur  { background: var(--u-todo); }
.u-lgd i.uk.ucmpl { background: var(--u-cmpl); }
.u-lgd i.uk.ucrit { background: var(--u-crit); }
.u-lgd i.uk.dd   { background: var(--u-dd); width: 3px; height: 11px; border-radius: 1px; }

/* ── OUT OF SEQUENCE IS A MARK ON A STATUS, NOT ONE OF THE STATUSES ───────
   It used to take the status cell over, so a finished activity that ran
   ahead of its predecessor read "OUT OF SEQ." and the grid could no longer
   tell you it was complete. P6 keeps them apart, and so does this: the
   chip says what the activity IS, the mark says what is odd about it. */
.u-oos {
  display: inline-block; margin-left: 4px; padding: 1px 4px;
  font-size: 8.5px; font-weight: 800; font-style: normal; letter-spacing: .06em;
  border-radius: 3px; vertical-align: middle; cursor: help;
  color: #8A5300; background: rgba(217, 164, 25, .18);
  box-shadow: inset 0 0 0 1px rgba(217, 164, 25, .5);
}
.u-lgd i.uk.usum  { background: var(--u-sum); }

/* ── THE WAY INTO THE MANUAL DRAWER ───────────────────────────────────────
   Clicking a row used to throw the drawer open over half the screen. On a
   257-row grid the commonest reason to click a row is to LOOK at it, and a
   panel that takes the screen every time is in the way of that. The drawer
   is asked for now, and this is where you ask: quiet until the row is under
   the pointer or selected, then one click away. */
.u-edit {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; padding: 0; line-height: 1; font-size: 11px;
  border: 1px solid var(--sk); border-radius: 5px; cursor: pointer;
  background: var(--p); color: var(--mu);
  opacity: 0; pointer-events: none; transition: opacity .12s ease;
}
table.u-g tbody tr:hover .u-edit,
table.u-g tbody tr.sel .u-edit { opacity: 1; pointer-events: auto; }
.u-edit:hover { color: var(--tx); border-color: var(--mu); background: var(--p2); }
/* NO `position: relative` HERE. The activity cell is `position: sticky`, and
   restating position on it un-freezes the column - which is exactly what
   happened: scroll the grid sideways and the names slid out of view and got
   clipped mid-word. A sticky element is a positioned element, so it already
   is the containing block this button needs. */

/* ── THE SUGGESTION KEY, AND THE FOLD ─────────────────────────────────────
   The grid proposes values in a few places — a percentage, a date — and a
   reader has to be TOLD that a dashed green figure is a proposal, not left
   to infer it from a border style. */
.u-sgkey {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 9.5px; font-weight: 600; color: var(--mu); white-space: nowrap;
}
.u-sgkey .u-sgst { cursor: default; font-size: 9.5px; padding: 0 5px; }
.u-sgkey .u-sgst:hover { background: transparent; color: var(--u-good);
  border-color: rgba(24, 141, 104, .6); border-style: dashed; }

.u-f.fold {
  font-family: var(--u-mono); font-size: 10px; font-weight: 700;
  white-space: nowrap; letter-spacing: .02em;
}
.u-f.fold.on { background: var(--st); border-color: var(--st); color: var(--bg2); }

/* ── FOLDED: THE ACTIVITY AND THE CHART, AND NOTHING BETWEEN THEM ─────────
   Every column between the name and the timeline folds away. The Gantt then
   has the whole width of the grid, which is the view a planner reads a
   programme in — and one click puts the figures back. */
table.u-g.fold thead tr.grp th:not(.stk):not(.g.tl),
table.u-g.fold thead tr.sub th:not(.u-tlh-c),
table.u-g.fold tbody td:not(.stk):not(.u-tl) { display: none; }
table.u-g.fold { min-width: 640px; }
table.u-g.fold th.stk, table.u-g.fold td.stk { --u-namew: 360px; }

/* the calendar field on the rail warns when a default week is standing in
   for a project calendar that was never set */
.u-rail-f .u-warnk, .u-warnk {
  color: #E8B14A; font-style: normal; font-size: 9px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}

/* ── THE STATUS DOT ───────────────────────────────────────────────────────
   With the columns folded there is no Status column, and then a green bar
   that starts before the Data Date looks like a bug when it is correct: an
   IN PROGRESS activity draws from its ACTUAL start, which is in the past,
   while its remaining work runs from the Data Date. A NOT STARTED one always
   begins at the Data Date. This says which, in the one column the fold
   keeps, using the same colours as the bars. */
.u-stq {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  margin-left: 6px; flex: none; vertical-align: middle;
}
.u-stq.done { background: var(--u-cmpl); }
.u-stq.live { background: var(--u-todo); box-shadow: 0 0 0 2px rgba(46, 158, 114, .22); }
.u-stq.todo { background: transparent; box-shadow: inset 0 0 0 1.5px var(--sk); }
table.u-g tr.u-wbs .u-stq { display: none; }

/* ── THE DATE COMPARISON, AS TWO LINES ────────────────────────────────────
   It was a bordered grid with a header row and four rows of cells — a second
   card inside the card, taking the height of four rows to say six things,
   while the space beside the rings sat empty.

   START and FINISH are two facts, each read as "the plan said this, the
   update says that, and the difference is N". So each is one line, and the
   variance carries the only colour in the block. The card is now the height
   of the rings. */
.u-cmp2 { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.u-cmp2 .hd {
  display: grid; grid-template-columns: 44px 1fr 14px 1fr 54px; gap: 6px;
  font-size: 7.5px; font-weight: 800; letter-spacing: .09em;
  text-transform: uppercase; color: var(--mu); padding: 0 2px;
}
.u-cmp2 .hd span:nth-child(1) { grid-column: 2; color: #9A7412; }
.u-cmp2 .hd span:nth-child(2) { grid-column: 4; }
.u-cmp2 .hd span:nth-child(3) { grid-column: 5; text-align: right; }

.u-dl2 {
  display: grid; grid-template-columns: 44px 1fr 14px 1fr 54px; gap: 6px;
  align-items: baseline; padding: 3px 2px;
  border-top: 1px solid var(--sk2);
}
.u-dl2 .lb {
  font-size: 8.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: var(--mu);
}
.u-dl2 .bl, .u-dl2 .cu {
  font-size: 11.5px; font-weight: 700; font-family: var(--u-mono); color: var(--st);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.u-dl2 .bl { color: #9A7412; }
.u-dl2 .ar { color: var(--mu); opacity: .5; font-size: 11px; text-align: center; }
.u-dl2 .cu em {
  display: block; font-style: normal; font-size: 7.5px; font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--mu);
  font-family: 'DM Sans', system-ui, sans-serif; line-height: 1.5;
}
.u-dl2 .vr {
  font-size: 12.5px; font-weight: 800; font-family: var(--u-mono);
  text-align: right; color: var(--mu); white-space: nowrap;
}
.u-dl2 .vr em {
  font-style: normal; font-size: 8px; font-weight: 700; color: var(--mu);
  margin-left: 1px; text-transform: uppercase;
}
.u-dl2 .vr.uok  { color: var(--u-good); }
.u-dl2 .vr.ubad { color: var(--u-crit); }

/* ── WHICH BARS THE CHART DRAWS ───────────────────────────────────────────
   Each bar is a layer and any combination can be on: the baseline alone to
   read the approved plan, the update alone to read where the programme is
   now, both to read the slip between them, and the previous update beside
   them when one has been saved. */
.u-bars {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 4px; border: 1px solid var(--sk); border-radius: 7px;
  background: var(--p);
}
.u-bars .ttl {
  font-size: 8px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--mu); padding: 0 3px 0 2px;
}
.u-bar-l {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 7px; border-radius: 5px; cursor: pointer;
  border: 1px solid transparent; background: transparent; color: var(--mu);
  white-space: nowrap; line-height: 1;
}
.u-bar-l .sw {
  width: 12px; height: 6px; border-radius: 2px; flex: none;
  /* off: the outline of the bar, so the control shows what it WOULD draw */
  background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; opacity: .55;
}
.u-bar-l.on { background: var(--sk2); color: var(--st); }
.u-bar-l.on .sw { opacity: 1; box-shadow: none; }
.u-bar-l.on .sw.ubl   { background: var(--u-bl); box-shadow: inset 0 0 0 1px rgba(120, 82, 0, .55); }
.u-bar-l.on .sw.ucur  { background: var(--u-todo); }
.u-bar-l.on .sw.uprev { background: var(--u-prev); }
/* ── PLAN ONLY ────────────────────────────────────────────────────────
   Not a colour in the update's palette, because it is the absence of the
   update: the programme in its ordinary bar colour, with nothing laid over
   it. The swatch says so — an outline rather than a fill. */

.u-bar-l:hover { color: var(--st); }

/* the plain view: the update's own bars are not drawn at all, so what is
   left is the programme, in the colour every other tab draws it */
/* .planonly lived here for the Update tab's own 'Plan only' layer. That
   view belongs to the Gantt Chart tab (View \2192 Show \2192 Baseline only),
   so the rules that hid this chart's update bars are gone with it. */

/* ── THE PREVIOUS UPDATE'S BAR ────────────────────────────────────────────
   Quiet, because it is history: a slate the eye can find when it is looking
   for it and ignore when it is not, under both the bars that matter now. */
.upd { --u-prev: #7C89A6; }
.u-tlb .ub.uprev {
  top: 25px; height: 4px; z-index: 1;
  background: var(--u-prev); opacity: .8; border-radius: 2px;
}
.u-lgd i.uk.uprev { background: var(--u-prev); }

/* ── THE SCHEDULER'S SELF-CHECK, REPORTED ─────────────────────────────────
   An activity nobody has touched must keep its length. When the guard in
   core/172 has to correct one, saying so by name beats leaving a two-day
   activity drawing a forty-day bar and no way to tell why. */
.u-spanwarn {
  display: inline-flex; align-items: center; gap: 5px; cursor: help;
  font-size: 9.5px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 6px; white-space: nowrap;
  color: #8A5300; background: rgba(217, 164, 25, .16);
  box-shadow: inset 0 0 0 1px rgba(217, 164, 25, .5);
}
.u-spanwarn b { font-family: var(--u-mono); font-size: 11px; font-weight: 800; }


/* ══ TYPING IN THE GRID ═══════════════════════════════════════════════════
   A cell being edited is still the cell: same width, same alignment, same
   place on the row. An input that resizes its column makes the whole table
   jump on the first keystroke, which is the flicker this feature exists to
   remove, not to add. */
table.u-g td[data-ucell] { cursor: text; }
table.u-g td[data-ucell]:focus {
  outline: 2px solid var(--u-ok, #2E9E72);
  outline-offset: -2px;
}
table.u-g td.u-editing { padding: 0 !important; }
.u-cellin {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  outline: 2px solid var(--u-ok, #2E9E72);
  outline-offset: -2px;
  background: var(--u-surface, #fff);
  color: inherit;
  font: inherit;
  padding: 4px 6px;
  text-align: inherit;
  border-radius: 2px;
}

/* ── A STAGED ENTRY IS NOT AN APPLIED ONE ──────────────────────────────────
   The cell shows what the planner just typed, because it went back to the
   project's own figure before and looked refused. But it has not been
   applied: it is in the set, waiting for Review and Apply. So it is marked
   — an underline in the colour the module already uses for an entry, and
   nothing else. No new colour, no new weight, no second theme. */
.u-tlb td[data-ucell].u-stg,
td[data-ucell].u-stg {
  box-shadow: inset 0 -2px 0 var(--u-ok);
}


/* ── THE ASK, AT THE CELL ──────────────────────────────────────────────────
   A figure typed into a cell is staged like any other entry — reviewed,
   validated, approved. What changed is that the planner no longer has to go
   and find the button: it comes to the row. */
.u-cbar {
  position: absolute; z-index: 40;
  display: flex; align-items: center; gap: 6px;
  padding: 5px 7px; border-radius: 8px;
  background: var(--p); border: 1px solid var(--sk);
  box-shadow: 0 6px 18px -8px rgba(15, 27, 46, .45);
  font-size: 10.5px;
}
.u-cbar .n {
  font-family: var(--u-mono); font-weight: 700; color: var(--u-ok);
  padding-right: 2px;
}
/* docked: a staged change is a state of the screen, not a six-second
   notice that floats over the row being worked on */
.u-cbar.dock {
  position: sticky; bottom: 10px; z-index: 40;
  margin: 10px 0 0 auto; width: fit-content; max-width: calc(100% - 16px);
  padding: 7px 10px; gap: 9px; font-size: 11px;
  border-color: var(--u-ok); flex-wrap: wrap;
}
.u-cbar.dock .w { color: var(--mu); font-size: 10px; }


/* ── READING MODE: THE GRID IS THE SCREEN ──────────────────────────────────
   Scroll into the rows and the summary card and the four update methods
   fold away, so the column header is the first line on screen and every
   pixel under it is programme. Scroll back to the top and they return.

   Folded with max-height and opacity rather than display:none, so the
   transition has something to animate and the layout does not jump; the
   grid's own height is recomputed by fitGrid the moment the class changes,
   which is what actually hands the space over. */
#updOut .u-sc2,
#updOut .u-mstrip {
  transition: max-height .18s ease, opacity .14s ease,
              margin .18s ease, padding .18s ease;
  max-height: 460px;
}
/* ── AND THE BLACK BAND GOES WITH THEM ────────────────────────────────
   "When I go into the full-screen view the black part stays. It should
   start from the table's own header."

   Quite so. The rail is the summary of an update you have stopped reading
   the moment you are inside the rows, and it is the tallest thing on the
   screen. It folds with the cards now, so the column header is the first
   line, and the button below brings the whole block back. */
#updOut .u-rail {
  transition: max-height .18s ease, opacity .14s ease,
              margin .18s ease, padding .18s ease;
  max-height: 320px;
}
#updOut.u-focus .u-rail {
  max-height: 0; opacity: 0;
  margin: 0; padding-top: 0; padding-bottom: 0;
  overflow: hidden; pointer-events: none; border-width: 0;
}

/* ── THE WAY BACK UP ──────────────────────────────────────────────────
   Folding the block away is only half of it: scrolling the rows back to
   the top is a long way on a 257-activity programme, and on a tablet it is
   a long way with a thumb. So the way back is a button, pinned to the
   corner of the grid, and it exists only while there is something to come
   back to. */
.u-gfoot { display: flex; justify-content: flex-end; }
.u-unfold {
  position: static; margin-top: 6px; z-index: 12;
  display: none; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--sk); background: var(--st); color: #E7EEF6;
  font: 700 11.5px/1 var(--u-mono, ui-monospace, monospace);
  letter-spacing: .04em; cursor: pointer;
  box-shadow: 0 10px 28px -12px rgba(15, 27, 46, .55);
}
.u-unfold:hover { background: #16263F; }
.u-unfold svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.2; }
#updOut.u-focus .u-unfold { display: inline-flex; }
@media (prefers-reduced-motion: reduce) { #updOut .u-rail { transition: none; } }

#updOut.u-focus .u-sc2,
#updOut.u-focus .u-mstrip {
  max-height: 0; opacity: 0;
  margin-top: 0; margin-bottom: 0;
  padding-top: 0; padding-bottom: 0;
  overflow: hidden; pointer-events: none;
  border-width: 0;
}
@media (prefers-reduced-motion: reduce) {
  #updOut .u-sc2, #updOut .u-mstrip { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════════
   THE BOARD — the Dashboard screen, one viewport

   Three columns, fixed height, nothing scrolls. Each card clips its own
   list rather than growing the page, because a board that scrolls is a
   report and this screen is not one.

   COLOUR IS A MEASUREMENT HERE. A tile carries `ok` when it is ahead of
   the baseline, `bad` when it is behind, and nothing when it is a
   reference — the plan itself never changes colour. The tokens are the
   module's own (--u-good, --u-bad, --mu); this block introduces none.
   ══════════════════════════════════════════════════════════════════════ */
.ud-head { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.ud-head .k { font-size: 11.5px; color: var(--mu); }
.ud-head .k b { color: var(--u-good); font-weight: 700; }
.ud-head h2 { margin: 3px 0 0; font-size: 21px; font-weight: 800; letter-spacing: -.5px; }

/* ── the KPI row ─────────────────────────────────────────────────────── */
.ud-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.ud-k {
  position: relative; overflow: hidden; background: var(--p);
  border: 1px solid var(--sk); border-radius: var(--r2); padding: 12px 14px 10px;
  --acc: var(--mu); --accT: var(--sk2); --accL: var(--sk);
}
.ud-k.ok  { --acc: var(--u-good); --accT: rgba(36, 180, 126, .14); --accL: rgba(24, 141, 104, .34);
            background: linear-gradient(168deg, rgba(36, 180, 126, .07) 0%, var(--p) 58%); }
.ud-k.bad { --acc: var(--u-bad); --accT: rgba(139, 58, 31, .12); --accL: rgba(139, 58, 31, .34);
            background: linear-gradient(168deg, rgba(139, 58, 31, .07) 0%, var(--p) 58%); }
.ud-k.ok, .ud-k.bad { border-color: var(--accL); }
.ud-k::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
                background: var(--acc); opacity: .9; }
.ud-k::after { content: ''; position: absolute; right: -42px; top: -52px; width: 132px; height: 132px;
               border-radius: 50%; background: var(--acc); opacity: .05; pointer-events: none; }
.ud-k .t { display: flex; align-items: center; gap: 7px; position: relative; }
.ud-k .ic { width: 24px; height: 24px; border-radius: var(--r3); background: var(--accT);
            color: var(--acc); display: grid; place-items: center; flex: none; }
.ud-k .ic svg { width: 13px; height: 13px; }
.ud-k .lb { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
            color: var(--mu); }
.ud-k .st { display: inline-flex; align-items: center; gap: 4px; font-size: 9.5px; font-weight: 800;
            padding: 3px 8px; border-radius: 20px; background: var(--accT); color: var(--acc);
            border: 1px solid var(--accL); white-space: nowrap; }
.ud-k.flat .st { color: var(--mu); border-color: var(--sk); }
.ud-k .mid { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px;
             margin-top: 8px; position: relative; }
.ud-k .v { font-size: 27px; font-weight: 800; letter-spacing: -.9px; line-height: 1; color: var(--acc);
           font-family: var(--u-mono); }
.ud-k.flat .v { color: var(--tx); }
.ud-k .v.sm { font-size: 20px; letter-spacing: -.5px; }
.ud-k .v small { font-size: 14px; font-weight: 700; color: var(--mu); }
.ud-sp { width: 88px; height: 28px; flex: none; }
.ud-sp-x { display: inline-block; width: 88px; height: 28px; }
.ud-gap { position: relative; height: 6px; border-radius: 3px; background: var(--sk2); margin-top: 9px; }
.ud-gap i { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 3px; }
.ud-gap .pl { background: color-mix(in srgb, var(--mu) 45%, transparent); }
.ud-gap .ac { background: var(--acc); }
.ud-gap .mk { top: -3px; bottom: -3px; width: 2px; background: var(--st); border-radius: 1px; }
.ud-k .ft { display: flex; align-items: center; gap: 9px; margin-top: 9px; padding-top: 7px;
            border-top: 1px solid var(--sk); position: relative; }
.ud-k .ft .x { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ud-k .ft .x b { font-family: var(--u-mono); font-size: 11.5px; font-weight: 700; color: var(--tx);
                 white-space: nowrap; }
.ud-k .ft .x span { font-size: 9.5px; color: var(--mu); white-space: nowrap; }
.ud-k .ft .dv { width: 1px; align-self: stretch; background: var(--sk); }

/* ── the three columns ───────────────────────────────────────────────── */
.ud-main {
  display: grid; grid-template-columns: minmax(0, 4.3fr) minmax(0, 3.45fr) minmax(0, 2.9fr);
  gap: 10px;
  /* one viewport: the rail, the nav and the board head are what is above */
  height: calc(100vh - var(--app-sticky-top, 0px) - 268px);
  min-height: 460px;
}
.ud-col { display: grid; gap: 10px; min-height: 0; }
.ud-col.a { grid-template-rows: minmax(0, 1.3fr) minmax(0, 1fr); }
.ud-col.b { grid-template-rows: minmax(0, 1.14fr) minmax(0, 1fr); }
.ud-col.c { grid-template-rows: minmax(0, 1.16fr) minmax(0, .94fr) minmax(0, .96fr); }

.ud-c { background: var(--p); border: 1px solid var(--sk); border-radius: var(--r2);
        padding: 11px 13px; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.ud-c > header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.ud-c h3 { margin: 0; font-size: 13.5px; font-weight: 800; letter-spacing: -.2px; }
.ud-c .sub { font-size: 10.5px; color: var(--mu); margin-top: 2px; line-height: 1.35; }
.ud-b { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.ud-lk { font-size: 10.5px; color: var(--mu); cursor: pointer; white-space: nowrap; }
.ud-lk:hover { color: var(--tx); }
.ud-svg { flex: 1; min-height: 0; width: 100%; color: var(--tx); }

.u-chip.ok   { background: rgba(36, 180, 126, .17); color: var(--u-good); }
.u-chip.bad  { background: rgba(139, 58, 31, .13); color: var(--u-bad); }
.u-chip.warn { background: rgba(184, 105, 62, .16); color: var(--u-warn); }
.u-chip.flat { background: var(--sk2); color: var(--mu); }
.u-chip.na   { background: transparent; color: var(--mu); }

/* ── progress rings ──────────────────────────────────────────────────── */
.ud-vd { display: flex; align-items: center; gap: 12px; padding-bottom: 10px;
         border-bottom: 1px solid var(--sk); color: var(--tx); }
.ud-vd .t1 { font-size: 14px; font-weight: 800; letter-spacing: -.2px; }
.ud-vd .t1.ok { color: var(--u-good); } .ud-vd .t1.bad { color: var(--u-bad); }
.ud-vd .t2 { font-size: 11px; color: var(--mu); margin-top: 4px; line-height: 1.45; }
.ud-chips { display: flex; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.ud-rings { display: grid; grid-template-columns: repeat(3, 1fr); flex: 1; min-height: 0;
            margin-top: 6px; color: var(--tx); }
.ud-rings .rg { display: flex; flex-direction: column; align-items: center; justify-content: center;
                gap: 2px; min-width: 0; }
.ud-rings .nm { font-size: 10.5px; font-weight: 700; text-align: center; line-height: 1.2;
                max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-rings .nm b { font-family: var(--u-mono); }
.ud-rings .nm b.ok { color: var(--u-good); } .ud-rings .nm b.bad { color: var(--u-bad); }
.ud-rings .nm b.flat { color: var(--mu); }

/* ── earned value ────────────────────────────────────────────────────── */
.ud-ev { display: flex; flex-direction: column; gap: 7px; }
.ud-ev .evrow { display: grid; grid-template-columns: 92px minmax(0, 1fr) 80px; align-items: center;
                gap: 9px; }
.ud-ev .k2 { font-size: 11px; color: var(--tx); }
.ud-ev .k2 b { display: block; font-size: 9px; color: var(--mu); font-weight: 600; letter-spacing: .06em; }
.ud-ev .evtrack { position: relative; height: 16px; border-radius: 5px; background: var(--sk2);
                  overflow: hidden; }
.ud-ev .evtrack i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; }
.ud-ev .evtrack i.hz { right: 0; width: auto; border-radius: 5px; background-image:
  repeating-linear-gradient(135deg, var(--sk) 0 5px, transparent 5px 10px); }
.ud-ev .n2 { font-family: var(--u-mono); font-size: 11.5px; font-weight: 700; text-align: right; }
.ud-ev .n2.na { color: var(--mu); font-weight: 500; }
.ud-evf { display: flex; align-items: flex-start; gap: 6px; margin-top: 9px; padding-top: 9px;
          border-top: 1px solid var(--sk); color: var(--tx); }
.ud-g { width: 70px; height: 56px; flex: none; }
.ud-evs { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; min-width: 0; }
.ud-evs span { display: block; font-size: 9.5px; color: var(--mu); }
.ud-evs b { display: block; font-size: 11.5px; font-weight: 700; }
.ud-evs b.ok { color: var(--u-good); } .ud-evs b.bad { color: var(--u-bad); }
.ud-evs b.na { color: var(--mu); font-weight: 500; }
.ud-evt { width: 100%; height: 70px; flex: none; margin-top: 8px; color: var(--tx); }

/* ── delayed works ───────────────────────────────────────────────────── */
.ud-ax { display: grid; grid-template-columns: minmax(0, 1fr) 132px 52px; gap: 9px;
         align-items: center; font-size: 9px; color: var(--mu); padding-bottom: 4px;
         border-bottom: 1px solid var(--sk); }
.ud-ax .ax { display: flex; justify-content: space-between; }
.ud-slips { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden;
            color: var(--tx); }
.ud-slips .sl { display: grid; grid-template-columns: minmax(0, 1fr) 132px 52px; gap: 9px;
                align-items: center; padding: 5px 0; border-bottom: 1px solid var(--sk2); }
.ud-slips .sl:last-child { border-bottom: 0; }
.ud-slips .nm { min-width: 0; }
.ud-slips .nm b { display: block; font-size: 11.5px; font-weight: 700; line-height: 1.25;
                  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ud-slips .nm b:hover { color: var(--u-dd); }
.ud-slips .nm i { display: block; font-size: 9.5px; color: var(--mu); font-style: normal;
                  margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-slips .tk { width: 132px; height: 22px; }
.ud-slips .rt { text-align: right; }
.ud-slips .rt em { display: block; font-family: var(--u-mono); font-size: 10.5px; font-style: normal;
                   font-weight: 700; margin-bottom: 2px; }
.ud-leg { font-size: 9px; color: var(--mu); margin-top: 6px; white-space: nowrap; }

/* ── the two lists ───────────────────────────────────────────────────── */
.ud-rows { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow: hidden; }
.ud-rows .rw { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 8px;
               align-items: center; padding: 3px 0; border-bottom: 1px solid var(--sk2); }
.ud-rows .rw:last-child { border-bottom: 0; }
.ud-rows .ic { width: 22px; height: 22px; border-radius: var(--r3); display: grid; place-items: center;
               font-size: 10px; font-weight: 800; }
.ud-rows .ic.ok   { background: rgba(36, 180, 126, .16); color: var(--u-good); }
.ud-rows .ic.bad  { background: rgba(139, 58, 31, .12); color: var(--u-bad); }
.ud-rows .ic.warn { background: rgba(184, 105, 62, .16); color: var(--u-warn); }
.ud-rows .ic.flat { background: var(--sk2); color: var(--mu); }
.ud-rows .ti { display: block; font-size: 11.5px; font-weight: 700; line-height: 1.25;
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.ud-rows .ts { display: block; font-size: 9.5px; color: var(--mu); margin-top: 1px;
               overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1180px) {
  .ud-kpis { grid-template-columns: repeat(2, 1fr); }
  .ud-main { grid-template-columns: minmax(0, 1fr); height: auto; }
  .ud-col { grid-template-rows: none; }
  .ud-c { min-height: 260px; }
}

/* ── CHOOSING WHAT THE BOARD SHOWS ───────────────────────────────────
   One programme's phases are level 1 of the WBS and the next one's are
   level 2, so the board cannot assume a shape. These controls pick which
   measurements are drawn; they never touch a measurement. */
.ud-editnote {
  font-size: 11px; color: var(--mu); background: rgba(47, 107, 216, .06);
  border: 1px solid rgba(47, 107, 216, .2); border-left: 3px solid var(--u-dd);
  border-radius: var(--r3); padding: 7px 11px; margin: -4px 0 12px;
}
.ud-seg { display: flex; gap: 2px; background: var(--sk2); border-radius: 20px; padding: 2px; }
.ud-seg button {
  border: 0; background: none; font: inherit; font-size: 10.5px; font-weight: 700;
  color: var(--mu); padding: 3px 9px; border-radius: 20px; cursor: pointer;
}
.ud-seg button.on { background: var(--p); color: var(--tx); box-shadow: 0 1px 2px rgba(15, 27, 46, .12); }
.ud-pick { display: flex; flex-direction: column; flex: 1; min-height: 0; margin-top: 8px; }
.ud-pick-h {
  display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase; color: var(--mu); margin-bottom: 6px;
}
.ud-pick-l { flex: 1; min-height: 0; overflow: auto; border: 1px solid var(--sk);
             border-radius: var(--r3); }
.ud-pk {
  display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center;
  width: 100%; border: 0; background: none; font: inherit; text-align: left;
  padding: 5px 9px; border-bottom: 1px solid var(--sk2); cursor: pointer;
}
.ud-pk:last-child { border-bottom: 0; }
.ud-pk:hover { background: var(--sk2); }
.ud-pk .bx {
  width: 15px; height: 15px; border-radius: 4px; border: 1px solid var(--sk);
  display: grid; place-items: center; font-size: 10px; color: transparent;
}
.ud-pk.on .bx { background: var(--u-good); border-color: var(--u-good); color: #FFFDF9; }
.ud-pk .tx { font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ud-pk.on .tx { font-weight: 700; }
.ud-pk .ct { font-family: var(--u-mono); font-size: 10px; color: var(--mu); }
.ud-pk.dim { opacity: .45; cursor: not-allowed; }
.ud-pick-f { font-size: 10px; color: var(--mu); margin-top: 6px; }
.u-b.sm { font-size: 10.5px; padding: 3px 10px; }

/* A shorter screen keeps the same board: the rings and the tiles step down
   rather than the second row of phases disappearing under the fold. */
@media (max-height: 940px) {
  .ud-rings .rg svg { width: 52px; height: 52px; }
  .ud-rings .nm { font-size: 9.5px; }
  .ud-vd svg { width: 84px; height: 84px; }
  .ud-k .v { font-size: 24px; }
  .ud-evt { height: 58px; }
  .ud-g { height: 50px; }
}


/* ════════════════════════════════════════════════════════════════════════
   TWO FROZEN PANES, AND THE TABLE SCROLLS BETWEEN THEM

   "عاوز فريز كمان عند آخر الجدول بحيث مساحة الجانت شارت تكون قد المعروض
    دي دايماً، والتحرك بين الأعمدة بحيث عمود الاسم ثابت وباقي الأعمدة
    أقدر أسكرول جانبي في حدود المساحة دي."

   The name was frozen on the left and the chart was one more column at the
   right end of the scroll — so scrolling to reach a column pushed the chart
   off, and scrolling to the chart pushed the columns off. The chart is now
   frozen on the RIGHT at a fixed share of the screen, the name on the left,
   and the dates and figures scroll sideways in the space between them.
   Folding the columns ("Gantt only") still hands the chart the full width.
   ════════════════════════════════════════════════════════════════════════ */
.upd { --u-namew: 320px; --u-tlw: clamp(340px, 36vw, 720px); }
table.u-g.tl:not(.fold) th.u-tlh-c,
table.u-g.tl:not(.fold) td.u-tl,
table.u-g.tl:not(.fold) thead tr.grp th.g.tl {
  position: sticky; right: 0;
  width: var(--u-tlw); min-width: var(--u-tlw); max-width: var(--u-tlw);
}
table.u-g.tl:not(.fold) td.u-tl { z-index: 2; }
table.u-g.tl:not(.fold) thead th.u-tlh-c,
table.u-g.tl:not(.fold) thead tr.grp th.g.tl { z-index: 9; }
/* the name pane + the chart pane + the columns between them always
   overflow, so the columns scroll rather than being squeezed */
table.u-g.tl:not(.fold) { width: max-content; min-width: 100%; }
/* the legend in a fixed-width header must not push the pane wider */
table.u-g.tl thead tr.grp th.g.tl { overflow: hidden; }
table.u-g td.u-tl { overflow: hidden; }

/* ── THE NAME ON THE BAR ─────────────────────────────────────────────── */
.u-tlb .ulbl {
  position: absolute; top: 50%; transform: translateY(-50%);
  margin-left: 5px; z-index: 6; pointer-events: none;
  font-size: 8.5px; line-height: 1.25; font-weight: 500; color: #3C4757;
  white-space: nowrap; max-width: 60%; overflow: hidden; text-overflow: ellipsis;
  text-transform: none; letter-spacing: 0;
}
.u-tlb .ulbl.rt { margin-left: 0; margin-right: 5px; text-align: right; }
.u-tlb .ulbl.uwl { font-weight: 700; color: var(--st); font-size: 8px; letter-spacing: .02em; }
/* the key in a fixed-width pane: set tighter so it is not cut off */
table.u-g.tl:not(.fold) thead tr.grp th.g.tl .u-lgd { font-size: 8px; letter-spacing: .02em; gap: 3px; }
table.u-g.tl:not(.fold) thead tr.grp th.g.tl .u-lgd i.uk { margin-left: 5px; width: 10px; }
table.u-g tr.done .u-tlb .ulbl { color: var(--mu); }

/* ── THE COLUMNS: FITTED, AND CENTRED ────────────────────────────────────
   Every column between the name and the chart reads down, not across, so
   its figures sit in the middle of it — headers too. */
table.u-g th:not(.stk):not(.u-tlh-c):not(.tl),
table.u-g td:not(.stk):not(.u-tl),
table.u-g th.num, table.u-g td.num { text-align: center; }
table.u-g td:not(.stk):not(.u-tl) .u-pg { justify-content: center; }
table.u-g td:not(.stk):not(.u-tl) { padding-left: 6px; padding-right: 6px; }


/* ════════════════════════════════════════════════════════════════════════
   MORE OF THE PROGRAMME ON ONE SCREEN

   "الجدول مش شايف إن الخط ممكن يصغر شوية بحيث المعروض يكون أكتر" and
   "مش عاوز زر الـ show ولا السيرش، والفلتر نصغره". Smaller type and a
   shorter row in the grid, one thin toolbar row, no dead padding under the
   panel — every pixel of it goes to rows.
   ════════════════════════════════════════════════════════════════════════ */
.upd { --u-row: 22px; }
.upd:has(.u-gscroll) { padding-bottom: 0; }
.u-gfoot .u-unfold { margin: 5px 2px 4px 0; }

table.u-g td { font-size: 10px; padding: 2px 6px; }
table.u-g .u-dt { font-size: 9.5px; }
table.u-g .u-aid { font-size: 9.5px; }
table.u-g .u-num, table.u-g .u-pl, table.u-g .u-pg .nm { font-size: 10px; }
table.u-g .u-chip { font-size: 8px; padding: 1px 5px; }
table.u-g tr.u-wbs td { font-size: 9.5px; padding: 4px 6px; }
table.u-g th { padding: 4px 6px; }

/* the toolbar: one short row, and the filter a small control. The app's
   theme styles every <select> as a full-height field, so this answers it
   with enough specificity to hold. */
.upd .u-gwrap .u-gtools { padding: 4px 10px; gap: 10px; flex-wrap: nowrap; min-height: 0; }
.upd .u-gwrap .u-gtools select.u-sel {
  /* the theme's touch-target rule is `min-height: 44px !important` on
     every select; on a toolbar that is the height of the whole row */
  height: 26px !important; min-height: 0 !important; line-height: 1; width: auto; max-width: 210px;
  font-size: 10.5px; padding: 2px 24px 2px 8px; border-radius: 6px !important; margin: 0;
  box-shadow: none;
}
.upd .u-gwrap .u-gtools .u-f { padding: 3px 8px; }

/* the key is the layer switch now */
.u-lgd button.lg {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 3px; margin: 0;
  border: 0; background: transparent; font: inherit; color: inherit;
  letter-spacing: inherit; text-transform: inherit; cursor: pointer; border-radius: 3px;
  min-height: 0; height: auto; line-height: 1; box-shadow: none;
}
.u-lgd button.lg:hover { background: var(--sk2); color: var(--st); }
.u-lgd button.lg .uk { margin-left: 0; }
.u-lgd button.lg + .uk, .u-lgd button.lg + button.lg { margin-left: 4px; }
.u-lgd button.lg.off { opacity: .45; text-decoration: line-through; }
/* the two bars restacked for the shorter row, so neither is cut off */
table.u-g:not(.hist) .u-tlb .ub.ucur { top: 3px; height: 7px; }
table.u-g:not(.hist) .u-tlb .ub.ubl { top: 12px; height: 6px; }
table.u-g:not(.hist) .u-tlb .ums.ucur { top: 2px; width: 8px; height: 8px; margin-left: -4px; }
table.u-g:not(.hist) .u-tlb .ums.ubl { top: 12px; width: 7px; height: 7px; margin-left: -3.5px; }
table.u-g:not(.hist) .u-tlb .usum { top: 5px; }

/* ── AI UPDATE REVIEW (V2) — tabs/update/update-ai-v2.js ─────────────────
   The table is the grid's own .u-g with its .u-wbs bands; these only mark
   current → proposed inside a cell, and the sections below the table. */
.u-gscroll.u-a2-scroll { height: auto; min-height: 0; }
table.u-a2 td { vertical-align: top; height: auto; }
table.u-a2 td:nth-child(3) { white-space: normal; min-width: 220px; }
table.u-a2 tr.u-a2-row:not(.on) td { opacity: .62; }
.u-a2-box { background: none; border: 0; cursor: pointer; font-size: 15px; line-height: 1;
  color: var(--st); padding: 0 2px; }
.u-a2-cur { opacity: .55; text-decoration: line-through; }
.u-a2-ar { margin: 0 4px; opacity: .6; }
.u-a2-new { color: var(--u-good); font-weight: 800; }
.u-a2-same { opacity: .7; }
.u-a2-der { color: var(--mu); }
.u-a2-der small { font-size: 8.5px; text-transform: uppercase; letter-spacing: .04em; }
.u-a2-q { font-size: 9.5px; color: var(--mu); padding-left: 2px; margin-top: 2px; }
.u-a2-note { font-size: 9.5px; color: var(--mu); line-height: 1.45; }
.u-a2-warn { font-size: 9.5px; color: var(--u-warn, #B45309); line-height: 1.45; margin-top: 2px; }
.u-a2-sec { margin-top: 12px; border-top: 1px solid var(--sk2); padding-top: 8px; }
.u-a2-h { font-size: 11px; font-weight: 800; color: var(--st); margin-bottom: 6px; }
.u-a2-un { font-size: 10.5px; padding: 6px 8px; border-radius: 6px; background: var(--p2); margin-bottom: 6px; }
.u-a2-cands { margin-top: 5px; display: grid; gap: 4px; }
.u-a2-cand { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.u-a2-cand .u-b { padding: 2px 8px; font-size: 10px; }
.u-a2-diag { margin-top: 10px; font-size: 9px; color: var(--mu); }

/* ════════════════════════════════════════════════════════════════════════
   THE UPDATE SWITCHER — every update one click away, on every screen
   ════════════════════════════════════════════════════════════════════════ */
.u-nav .u-sp { flex: 1 1 auto; }
.u-uswitch {
  display: inline-flex; align-items: center; gap: 2px; padding: 2px 3px;
  border: 1px solid var(--sk); border-radius: 20px; background: var(--p);
}
.u-uswitch .ttl {
  font-size: 8.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--mu); padding: 0 6px 0 7px;
}
.u-uswitch button.us {
  position: relative; min-width: 30px; height: 24px; min-height: 0; padding: 0 8px; margin: 0;
  border: 0; border-radius: 14px; background: transparent; color: var(--mu);
  font: 700 11px/1 var(--u-mono); cursor: pointer; box-shadow: none;
}
.u-uswitch button.us:hover:not([disabled]) { background: var(--sk2); color: var(--st); }
.u-uswitch button.us.on { background: var(--st); color: var(--bg2); }
.u-uswitch button.us[disabled] { opacity: .4; cursor: not-allowed; }
/* the latest update is the current status: a green dot says so */
.u-uswitch button.us.cur i {
  position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--u-ok);
}

/* ════════════════════════════════════════════════════════════════════════
   COMPARISON — many layers on one Gantt (update-compare.js)
   ════════════════════════════════════════════════════════════════════════ */
.u-mc-pick {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 12px;
}
.u-mc-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; min-height: 0 !important; margin: 0;
  padding: 0 10px; border-radius: 16px; border: 1px solid var(--sk); background: var(--p);
  color: var(--mu); font: 700 11px/1 var(--u-mono); cursor: pointer; box-shadow: none;
}
.u-mc-chip i { width: 10px; height: 10px; border-radius: 3px; border: 2px solid var(--c); }
.u-mc-chip em { font-style: normal; font-weight: 600; font-size: 9.5px; opacity: .7; }
.u-mc-chip.on { border-color: var(--c); color: var(--st); background: color-mix(in srgb, var(--c) 12%, var(--p)); }
.u-mc-chip.on i { background: var(--c); }
.u-mc-colsel { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; }
.upd .u-mc-colsel select.u-sel { height: 28px !important; min-height: 0 !important; border-radius: 6px !important;
  font-size: 11px; padding: 2px 24px 2px 8px; width: auto; }

/* ── the layer cards ─────────────────────────────────────────────────── */
.u-mc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin-bottom: 10px; }
.u-mc-card {
  position: relative; overflow: hidden;
  border: 1px solid var(--sk); border-radius: 12px; background: var(--p);
  padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 9px;
  box-shadow: 0 1px 2px rgba(15, 27, 46, .05), 0 8px 20px -16px rgba(15, 27, 46, .35);
}
.u-mc-card::before { content: ''; position: absolute; left: 0; top: 0; right: 0; height: 4px; background: var(--c); }
.u-mc-card.ref { background: color-mix(in srgb, var(--c) 6%, var(--p)); }
.u-mc-card .hd { display: flex; align-items: center; gap: 9px; min-width: 0; }
.u-mc-card .hd .tg {
  flex: none; font: 800 11px/1 var(--u-mono); color: #fff; background: var(--c);
  padding: 5px 7px; border-radius: 6px; letter-spacing: .02em;
}
.u-mc-card .hd .nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.u-mc-card .hd .nm b { font-size: 12.5px; color: var(--st); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.u-mc-card .hd .nm em { font-style: normal; font-size: 10px; color: var(--mu); }
.u-mc-card .hd .rf { margin-left: auto; flex: none; font-size: 8px; font-weight: 800; letter-spacing: .1em;
  color: var(--mu); border: 1px solid var(--sk); border-radius: 10px; padding: 3px 7px; }
.u-mc-card .fs { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.u-mc-card .fs .lb { font-size: 8.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mu); }
.u-mc-card .fs .v { font: 800 17px/1 var(--u-mono); color: var(--st); }
.u-mc-card .dv { font: 800 10.5px/1 var(--u-mono); padding: 3px 7px; border-radius: 10px; }
.u-mc-card .dv.late { color: var(--u-crit); background: rgba(198, 70, 43, .12); }
.u-mc-card .dv.early { color: var(--u-good); background: rgba(24, 141, 104, .12); }
.u-mc-card .dv.flat { color: var(--mu); background: var(--sk2); }
.u-mc-card .pg { display: flex; flex-direction: column; gap: 4px; }
.u-mc-card .pg.na { font-size: 10px; color: var(--mu); font-style: italic; padding: 6px 0 2px; }
.u-mc-card .pg .br { display: grid; grid-template-columns: 52px 1fr 44px; align-items: center; gap: 7px; }
.u-mc-card .pg .br span { font-size: 8.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.u-mc-card .pg .br i { height: 6px; border-radius: 4px; background: var(--sk2); overflow: hidden; }
.u-mc-card .pg .br i b { display: block; height: 100%; border-radius: 4px; background: var(--c); }
.u-mc-card .pg .br.pl i b { background: color-mix(in srgb, var(--c) 40%, transparent); }
.u-mc-card .pg .br em { font: 700 10.5px/1 var(--u-mono); font-style: normal; color: var(--st); text-align: right; }
.u-mc-card .pg .spi { font-size: 9px; font-weight: 800; letter-spacing: .08em; color: var(--mu); }
.u-mc-card .pg .spi b { font: 800 11px/1 var(--u-mono); color: var(--st); margin-left: 4px; }
.u-mc-card .pg .spi b.late { color: var(--u-crit); }

/* ── the difference cards ────────────────────────────────────────────── */
.u-mc-diff { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
.u-mc-dc {
  border: 1px solid var(--sk); border-radius: 12px; background: var(--p); padding: 11px 13px;
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
}
.u-mc-dc.wide { grid-column: span 2; }
.u-mc-dc .lb { display: flex; align-items: center; gap: 6px; font-size: 8.5px; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--mu); }
.u-mc-dc .lb svg { width: 13px; height: 13px; flex: none; }
.u-mc-dc .v { font: 800 22px/1.1 var(--u-mono); color: var(--st); }
.u-mc-dc .s { font-size: 10px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-mc-dc .row { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.u-mc-dc.late { border-color: rgba(198, 70, 43, .35); background: linear-gradient(180deg, rgba(198, 70, 43, .07), var(--p) 70%); }
.u-mc-dc.late .v, .u-mc-dc.late .lb svg { color: var(--u-crit); }
.u-mc-dc.early { border-color: rgba(24, 141, 104, .35); background: linear-gradient(180deg, rgba(24, 141, 104, .07), var(--p) 70%); }
.u-mc-dc.early .v, .u-mc-dc.early .lb svg { color: var(--u-good); }
/* every layer's project finish on one small axis */
.u-mc-drift { margin-top: 6px; padding: 16px 4px 18px; }
.u-mc-drift .ax { position: relative; height: 2px; background: var(--sk); border-radius: 2px; }
.u-mc-drift .mk { position: absolute; top: -5px; transform: translateX(-50%); }
.u-mc-drift .mk i { display: block; width: 12px; height: 12px; border-radius: 50%; background: var(--c);
  box-shadow: 0 0 0 2px var(--p); }
.u-mc-drift .mk em { position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
  font: 700 9px/1 var(--u-mono); font-style: normal; color: var(--st); white-space: nowrap; }
.u-mc-drift .mk.dn em { top: 17px; }

/* ── the chart: the Update Center's own table, frozen panes and paper ── */
.u-mc { border: 1px solid var(--sk); border-radius: var(--r2); overflow: hidden; background: var(--p); }
.u-mc .u-mc-scroll { max-height: var(--u-cmp-h, 60vh); height: var(--u-cmp-h, auto); overflow: auto; }
table.u-mc-t th.mc-fh i { display: inline-block; width: 8px; height: 8px; border-radius: 2px;
  background: var(--c); margin-right: 4px; vertical-align: -1px; }
table.u-mc-t th em { display: block; font-size: 7.5px; opacity: .6; }
table.u-mc-t th.u-tlh-c { height: 34px; }
table.u-mc-t td.u-tl .u-tlb { height: var(--u-row); }
.u-tlb .mc-b { position: absolute; border-radius: 2px; min-width: 4px; z-index: 3; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(15, 27, 46, .16); }
.u-tlb .mc-hl { position: absolute; height: 2px; border-radius: 1px; background: var(--c); z-index: 2; opacity: .9; }
/* the slip: a thin arrow from the reference finish to the latest */
.u-tlb .mc-slip { position: absolute; height: 3px; z-index: 4; border-radius: 2px; }
.u-tlb .mc-slip.late { background: repeating-linear-gradient(90deg, var(--u-crit) 0 4px, transparent 4px 6px); }
.u-tlb .mc-slip.early { background: repeating-linear-gradient(90deg, var(--u-good) 0 4px, transparent 4px 6px); }
.u-tlb .mc-slip::after {
  content: ''; position: absolute; top: -3px; border-top: 4.5px solid transparent; border-bottom: 4.5px solid transparent;
}
.u-tlb .mc-slip.late::after { right: -4px; border-left: 6px solid var(--u-crit); }
.u-tlb .mc-slip.early::after { left: -4px; border-right: 6px solid var(--u-good); }
.u-mc-d { font: 800 10px/1 var(--u-mono); }
.u-mc-d.late { color: var(--u-crit); }
.u-mc-d.early { color: var(--u-good); }
.u-mc-d.flat { color: var(--mu); }
.u-mc-key {
  display: flex; flex-wrap: wrap; gap: 14px; padding: 7px 10px; border-top: 1px solid var(--sk);
  background: var(--p2); font-size: 10px; color: var(--mu);
}
.u-mc-key span { display: inline-flex; align-items: center; gap: 5px; }
.u-mc-key i { width: 14px; height: 6px; border-radius: 2px; background: var(--c); }
.u-mc-key i.usumk { background: var(--u-sum); height: 4px; border-radius: 0; }
.u-mc-key i.slk.late { height: 3px; background: repeating-linear-gradient(90deg, var(--u-crit) 0 4px, transparent 4px 6px); }
.u-mc-key i.slk.early { height: 3px; background: repeating-linear-gradient(90deg, var(--u-good) 0 4px, transparent 4px 6px); }
.u-mc-key i.ddk { width: 2px; height: 11px; background: var(--u-dd); }
.u-mc-key em { font-style: normal; font-weight: 700; color: var(--st); }
@media (max-width: 900px) { .u-mc-dc.wide { grid-column: auto; } }

/* the switcher sits at the end of the tab bar, on the same line: the bar
   scrolls sideways on a narrow screen rather than wrapping it underneath */
.upd .u-nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.upd .u-nav::-webkit-scrollbar { display: none; }
.upd .u-nav > * { flex: none; }
.upd .u-nav > .u-sp { flex: 1 1 auto; }

/* ── OUT OF SEQUENCE (update-oos.js) ─────────────────────────────────── */
.u-oos-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.u-oos-kpi { background: var(--p); border: 1px solid var(--sk); border-radius: var(--r2); padding: 11px 14px; }
.u-oos-kpi .k { font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.u-oos-kpi .v { font-size: 22px; font-weight: 800; color: var(--st); margin-top: 3px; font-variant-numeric: tabular-nums; }
.u-oos-kpi .s { font-size: 11px; color: var(--mu); margin-top: 1px; }
.u-oos-kpi.bad { border-left: 4px solid var(--u-crit); }
.u-oos-kpi.bad .v { color: var(--u-crit); }
.u-oos-kpi.good { border-left: 4px solid var(--u-good); }
.u-oos-kpi.good .v { color: var(--u-good); }
.u-oos-empty { padding: 18px 4px; font-size: 13px; color: var(--st); }
.u-oos-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.u-oos-list { display: grid; gap: 10px; margin-bottom: 16px; }
.u-oos-case { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px;
  background: var(--p); border: 1px solid var(--sk); border-left: 4px solid var(--u-crit);
  border-radius: var(--r2); padding: 12px 14px; }
.u-oos-case.keep { border-left-color: var(--mu); }
@media (max-width: 860px) { .u-oos-case { grid-template-columns: 1fr; } }
.u-oos-t { font-size: 13px; font-weight: 700; color: var(--st); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.u-oos-n { font-size: 11.5px; color: var(--mu); margin-top: 2px; }
.u-oos-why { font-size: 12px; color: var(--st); margin: 6px 0 4px; line-height: 1.45; }
.u-oos-arrow { color: var(--mu); }
.u-oos-rel { font: 700 11px var(--u-mono, ui-monospace, monospace); padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.u-oos-rel.old { background: color-mix(in srgb, var(--u-crit) 13%, transparent); color: var(--u-crit); }
.u-oos-rel.new { background: color-mix(in srgb, var(--u-good) 15%, transparent); color: var(--u-good); }
.u-oos-rel.del { background: color-mix(in srgb, var(--mu) 18%, transparent); color: var(--mu); text-decoration: line-through; }
.u-oos-r { display: grid; gap: 6px; align-content: start; }
.u-oos-opt { text-align: left; background: transparent; border: 1px solid var(--sk); border-radius: 8px;
  padding: 7px 10px; cursor: pointer; display: grid; gap: 2px; color: var(--st); }
.u-oos-opt:hover { border-color: var(--u-dd); }
.u-oos-opt.on { border-color: var(--u-good); box-shadow: inset 3px 0 0 var(--u-good);
  background: color-mix(in srgb, var(--u-good) 7%, transparent); }
.u-oos-opt .k { font-size: 12px; font-weight: 700; }
.u-oos-opt .k em { font-style: normal; font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--u-good); margin-left: 6px; }
.u-oos-opt .d { font-size: 11px; color: var(--mu); line-height: 1.4; }
.u-oos-svg { width: 100%; max-width: 460px; height: auto; display: block; margin-top: 6px; }
.u-oos-svg .act.p, .u-oos-svg .act.s { fill: var(--u-good); }
.u-oos-svg .rem.p, .u-oos-svg .rem.s { fill: color-mix(in srgb, var(--u-dd) 35%, transparent); stroke: var(--u-dd); stroke-width: .8; }
.u-oos-svg .dd { stroke: var(--u-dd); stroke-width: 1.4; stroke-dasharray: 3 2; }
.u-oos-svg .ddl { font: 700 8px sans-serif; fill: var(--u-dd); }
.u-oos-svg .lbl { font: 700 9px var(--u-mono, ui-monospace, monospace); fill: var(--mu); }
.u-oos-svg .tie { fill: none; stroke-width: 1.8; }
.u-oos-svg .tie.old { stroke: var(--u-crit); stroke-dasharray: 4 3; }
.u-oos-svg .tie.keep { stroke: var(--mu); }
.u-oos-svg .tie.new { stroke: var(--u-good); }
.u-oos-svg .ah.old { fill: var(--u-crit); }
.u-oos-svg .ah.keep { fill: var(--mu); }
.u-oos-svg .ah.new { fill: var(--u-good); }
.u-oos-pv { background: var(--p); border: 1px solid var(--sk); border-top: 3px solid var(--u-dd); border-radius: var(--r2);
  padding: 12px 14px; margin-bottom: 14px; }
.u-oos-pv.err { border-top-color: var(--u-crit); color: var(--u-crit); font-size: 12px; }
.u-oos-pvh { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mu); margin-bottom: 10px; }
.u-oos-cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 12px; }
.u-oos-c .k { font-size: 10.5px; color: var(--mu); font-weight: 700; }
.u-oos-c .v { font-size: 16px; font-weight: 700; color: var(--st); display: flex; gap: 7px; align-items: baseline;
  font-variant-numeric: tabular-nums; }
.u-oos-c .v span:first-child { color: var(--mu); font-weight: 600; font-size: 14px; }
.u-oos-c .ar { color: var(--mu); }
.u-oos-c .good, .u-oos-mv td.good { color: var(--u-good); }
.u-oos-c .bad, .u-oos-mv td.bad { color: var(--u-crit); }
.u-oos-c .s { font-size: 11px; font-weight: 700; }
.u-oos-crit { font-size: 9.5px; font-weight: 800; color: var(--u-crit); text-transform: uppercase; letter-spacing: .05em; }
.u-oos-log { width: 100%; }
.u-oos-log td { vertical-align: top; }
.u-oos-bh td { background: color-mix(in srgb, var(--u-dd) 7%, transparent); font-size: 11.5px; }
.u-oos-bh .u-b { margin-left: 10px; }
.u-oos-batch.rev, .u-oos-log tr.rev { opacity: .55; }
.u-oos-revd { margin-left: 10px; font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--mu); }
.u-oos-act { font-size: 9.5px; font-weight: 800; letter-spacing: .05em; padding: 2px 7px; border-radius: 4px; }
.u-oos-act.changed { background: color-mix(in srgb, var(--u-dd) 14%, transparent); color: var(--u-dd); }
.u-oos-act.added { background: color-mix(in srgb, var(--u-good) 15%, transparent); color: var(--u-good); }
.u-oos-act.removed { background: color-mix(in srgb, var(--u-crit) 13%, transparent); color: var(--u-crit); }
.u-oos-act.kept { background: color-mix(in srgb, var(--mu) 15%, transparent); color: var(--mu); }
.u-oos-wh { font-size: 11px; color: var(--mu); max-width: 360px; }
.u-oos-casc { font-size: 11.5px; color: var(--st); margin-bottom: 10px; line-height: 1.7; }
.u-oos-casc .u-aid { margin-right: 4px; }
.u-oos-svg .ax { font: 600 8px sans-serif; fill: var(--mu); }
.u-oos-svg .fixbar { fill: color-mix(in srgb, var(--u-good) 18%, transparent); stroke: var(--u-good); stroke-width: 1.2; stroke-dasharray: 3 2; }
.u-oos-leg { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 10.5px; color: var(--mu); margin-top: 4px; align-items: center; }
.u-oos-leg i { display: inline-block; width: 14px; height: 7px; border-radius: 2px; margin-right: 3px; vertical-align: middle; }
.u-oos-leg i.a { background: var(--u-good); }
.u-oos-leg i.r { background: color-mix(in srgb, var(--u-dd) 35%, transparent); border: 1px solid var(--u-dd); }
.u-oos-leg i.o { height: 0; border-top: 2px dashed var(--u-crit); border-radius: 0; }
.u-oos-leg i.n { height: 0; border-top: 2px solid var(--u-good); border-radius: 0; }
.u-oos-leg i.f { border: 1px dashed var(--u-good); background: color-mix(in srgb, var(--u-good) 18%, transparent); }
.u-oos-mv td:first-child, .u-oos-mv th:first-child, .u-oos-log td, .u-oos-log th { text-align: left; }
.u-oos-bt { border: 1px solid var(--sk); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.u-oos-bt.rev { opacity: .6; }
.u-oos-bt > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 12px; background: color-mix(in srgb, var(--u-dd) 6%, transparent); }
.u-oos-bt > summary::-webkit-details-marker { display: none; }
.u-oos-bt > summary::before { content: '▸'; color: var(--mu); font-size: 11px; }
.u-oos-bt[open] > summary::before { content: '▾'; }
.u-oos-bid { font: 700 12px var(--u-mono, ui-monospace, monospace); color: var(--st); }
.u-oos-bm { font-size: 11.5px; color: var(--mu); }
.u-oos-chip { font-size: 10.5px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.u-oos-chip.rel { background: color-mix(in srgb, var(--u-dd) 14%, transparent); color: var(--u-dd); }
.u-oos-chip.st { background: color-mix(in srgb, var(--u-good) 15%, transparent); color: var(--u-good); }
.u-oos-chip.kp { background: color-mix(in srgb, var(--mu) 15%, transparent); color: var(--mu); }
.u-oos-bb { padding: 4px 12px 12px; max-height: 520px; overflow: auto; }
.u-oos-sub { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mu); margin: 10px 0 5px; }
table.u-oos-t2 { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11.5px; color: var(--st); }
table.u-oos-t2 th { text-align: left; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
  color: var(--mu); padding: 5px 6px; border-bottom: 1px solid var(--sk); }
table.u-oos-t2 td { text-align: left; padding: 5px 6px; border-bottom: 1px solid var(--sk); vertical-align: top;
  overflow-wrap: anywhere; }
table.u-oos-t2 tr.rev { opacity: .55; }
.u-oos-chain { font-size: 9px; font-weight: 800; text-transform: uppercase; color: var(--u-ai); letter-spacing: .05em; }
table.u-g.u-oos-mv td:first-child { text-align: left; }
.u-a2-verify { margin-top: 4px; font-size: 11px; line-height: 1.4; color: var(--u-warn); font-weight: 600;
  background: color-mix(in srgb, var(--u-warn) 10%, transparent); border-left: 3px solid var(--u-warn);
  padding: 3px 6px; border-radius: 3px; text-align: left; }
.u-a2-vchip { display: inline-block; margin-top: 3px; font-size: 9.5px; font-weight: 800; letter-spacing: .06em;
  text-transform: uppercase; color: #fff; background: var(--u-warn); padding: 1px 6px; border-radius: 3px; }
.u-nav-b.u-nav-ai2 { color: var(--u-ai); font-weight: 700; }
.u-nav-b.u-nav-ai2 .n { background: var(--u-ai); color: #fff; }
.u-oos-rec { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.u-oos-rc { font-size: 11px; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--sk); color: var(--st); }
.u-oos-rc.dn { border-color: color-mix(in srgb, var(--u-good) 45%, transparent); }
.u-oos-rc.rt { border-color: color-mix(in srgb, var(--u-crit) 45%, transparent); }
.u-oos-chip.rt { background: color-mix(in srgb, var(--u-crit) 12%, transparent); color: var(--u-crit); }
/* the fix, played on hover */
.u-oos-steps { display: flex; gap: 10px; font-size: 10px; font-weight: 700; color: var(--mu); margin-top: 2px; }
.u-oos-steps span { opacity: .45; }
.u-oos-case:hover .u-oos-steps .s1 { animation: oos-step1 3.6s infinite; }
.u-oos-case:hover .u-oos-steps .s2 { animation: oos-step2 3.6s infinite; }
.u-oos-case:hover .u-oos-steps .s3 { animation: oos-step3 3.6s infinite; }
@keyframes oos-step1 { 0%, 30% { opacity: 1; color: var(--u-crit); } 35%, 100% { opacity: .45; color: var(--mu); } }
@keyframes oos-step2 { 0%, 30% { opacity: .45; } 35%, 65% { opacity: 1; color: var(--st); } 70%, 100% { opacity: .45; } }
@keyframes oos-step3 { 0%, 65% { opacity: .45; } 70%, 100% { opacity: 1; color: var(--u-good); } }
.u-oos-svg .fixbar.grow, .u-oos-svg .fixbar.slide { transform-box: fill-box; transform-origin: left center; }
.u-oos-case:hover .u-oos-svg .tie.old { animation: oos-break 3.6s infinite; }
@keyframes oos-break { 0% { opacity: 1; stroke-width: 1.8; } 15%, 25% { opacity: 1; stroke-width: 3.2; } 45%, 100% { opacity: .12; stroke-width: 1.8; } }
.u-oos-svg .tie.draw { stroke-dasharray: 100; }
.u-oos-case:hover .u-oos-svg .tie.draw { animation: oos-draw 3.6s infinite; }
@keyframes oos-draw { 0%, 35% { stroke-dashoffset: 100; opacity: .2; } 65%, 100% { stroke-dashoffset: 0; opacity: 1; } }
.u-oos-case:hover .u-oos-svg .fixbar.grow { animation: oos-grow 3.6s infinite; }
@keyframes oos-grow { 0%, 35% { transform: scaleX(0); opacity: 0; } 65%, 100% { transform: scaleX(1); opacity: 1; } }
.u-oos-case:hover .u-oos-svg .fixbar.slide { animation: oos-slide 3.6s infinite; }
@keyframes oos-slide { 0%, 35% { transform: translateX(var(--dx, 0)); opacity: .3; } 65%, 100% { transform: translateX(0); opacity: 1; } }
.u-oos-svg g.fade { opacity: .25; }
.u-oos-case:hover .u-oos-svg g.fade { animation: oos-fade 3.6s infinite; }
@keyframes oos-fade { 0%, 35% { opacity: 1; } 65%, 100% { opacity: .25; } }
.u-oos-svg g.gone { opacity: .2; }
.u-oos-svg .gonel { font: 700 8.5px sans-serif; fill: var(--u-crit); }
.u-oos-case:hover .u-oos-svg g.gone { animation: oos-fade 3.6s infinite; }
.u-oos-svg g.keepshift rect.rem { transform: translateX(var(--kx, 0)); }
.u-oos-case:hover .u-oos-svg g.keepshift rect.rem { animation: oos-keep 3.6s infinite; }
@keyframes oos-keep { 0%, 35% { transform: translateX(0); } 65%, 100% { transform: translateX(var(--kx, 0)); } }
@media (prefers-reduced-motion: reduce) {
  .u-oos-case:hover .u-oos-svg *, .u-oos-case:hover .u-oos-steps span { animation: none !important; }
}
/* the replacement for a removed tie */
.u-oos-repl { margin-top: 6px; border: 1px solid var(--sk); border-radius: 8px; padding: 8px 10px; }
.u-oos-repl.need { border-color: var(--u-warn); box-shadow: inset 3px 0 0 var(--u-warn); }
.u-oos-needtxt { font-size: 11px; font-weight: 700; color: var(--u-warn); margin-bottom: 6px; }
.u-oos-rchips { display: flex; flex-wrap: wrap; gap: 5px; }
.u-oos-rchip { font-size: 11px; text-align: left; border: 1px solid var(--sk); border-radius: 6px; background: transparent;
  color: var(--st); padding: 3px 7px; cursor: pointer; max-width: 100%; }
.u-oos-rchip small { color: var(--mu); }
.u-oos-rchip.on { border-color: var(--u-good); background: color-mix(in srgb, var(--u-good) 8%, transparent); }
.u-oos-rbar { display: flex; gap: 8px; align-items: center; margin-top: 7px; flex-wrap: wrap; }
.u-oos-none { font-size: 11px; background: transparent; border: 0; color: var(--mu); cursor: pointer; }
.u-oos-none.on { color: var(--st); font-weight: 700; }
.u-oos-picker { margin-top: 8px; border-top: 1px solid var(--sk); padding-top: 8px; }
.u-oos-pkbar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.u-oos-pkbar #u-oos-find { flex: 1 1 220px; min-width: 0; }
.u-oos-lag { font-size: 11px; color: var(--mu); display: flex; gap: 4px; align-items: center; }
.u-oos-lag input { width: 60px; }
.u-oos-pkscroll { max-height: 280px; overflow: auto; }
.u-oos-pk { display: flex; gap: 4px; flex-wrap: wrap; }
.u-oos-wbs { font-size: 10px; color: var(--mu); }
.u-oos-perr { font-size: 11px; color: var(--u-crit); font-weight: 700; margin-bottom: 6px; }
.u-oos-case > .u-oos-picker { grid-column: 1 / -1; }
.u-oos-pkbar .u-in { height: 30px; width: auto; padding: 3px 8px; font-size: 12px; }
.u-oos-pkbar #u-oos-find { width: auto; flex: 1 1 260px; }
.u-oos-pk .u-b[disabled] { opacity: .45; cursor: not-allowed; }
.u-oos-picker .u-oos-pkbar input.u-in, .u-oos-picker .u-oos-pkbar select.u-in { height: 30px !important; min-height: 0 !important; padding: 3px 8px !important; font-size: 12px !important; }
.u-oos-picker .u-oos-pkbar #u-oos-rtype { width: 72px !important; flex: 0 0 auto; }
.u-oos-picker .u-oos-lag input.u-in { width: 64px !important; }
/* the replacement on a Gantt */
.u-oos-full { grid-column: 1 / -1; }
.u-oos-rhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.u-oos-fitkey { font-size: 10.5px; color: var(--mu); display: flex; gap: 4px 10px; align-items: center; flex-wrap: wrap; }
.u-oos-fitkey i { display: inline-block; width: 14px; height: 0; border-top: 2px solid; margin-right: 3px; vertical-align: middle; }
.u-oos-fitkey i.close { border-color: var(--u-good); } .u-oos-fitkey i.ok { border-color: var(--u-dd); }
.u-oos-fitkey i.far { border-color: var(--mu); border-top-style: dashed; } .u-oos-fitkey i.push { border-color: var(--u-warn); }
.u-oos-gantt { width: 100%; height: auto; display: block; margin: 6px 0 2px; }
.u-oos-gantt .grow { fill: transparent; }
.u-oos-gantt .grow.head { fill: color-mix(in srgb, var(--u-dd) 5%, transparent); }
.u-oos-gantt .grow-g { cursor: pointer; }
.u-oos-gantt .grow-g:hover .grow { fill: color-mix(in srgb, var(--u-dd) 7%, transparent); }
.u-oos-gantt .grow.on { fill: color-mix(in srgb, var(--u-good) 10%, transparent); }
.u-oos-gantt .gl { font: 11px sans-serif; fill: var(--st); }
.u-oos-gantt .gid { font: 700 10px var(--u-mono, ui-monospace, monospace); fill: var(--mu); }
.u-oos-gantt .gck { font: 12px sans-serif; fill: var(--st); }
.u-oos-gantt .gax, .u-oos-gantt .gddl { font: 700 9px sans-serif; fill: var(--mu); }
.u-oos-gantt .gddl { fill: var(--u-dd); }
.u-oos-gantt .gdd { stroke: var(--u-dd); stroke-width: 1.2; stroke-dasharray: 3 2; }
.u-oos-gantt .gb.done { fill: var(--u-good); } .u-oos-gantt .gb.run { fill: var(--u-dd); }
.u-oos-gantt .gb.ns { fill: color-mix(in srgb, var(--u-dd) 30%, transparent); stroke: var(--u-dd); stroke-width: .8; }
.u-oos-gantt .gb.sel { stroke: var(--u-good); stroke-width: 2; }
.u-oos-gantt .gtie { fill: none; stroke-width: 1.3; opacity: .55; }
.u-oos-gantt .gtie.sel { stroke-width: 2.4; opacity: 1; }
.u-oos-gantt .grow-g:hover .gtie { opacity: 1; stroke-width: 2.2; }
.u-oos-gantt .gtie.old { stroke: var(--u-crit); stroke-dasharray: 4 3; opacity: .9; }
.u-oos-gantt .gtie.close { stroke: var(--u-good); } .u-oos-gantt .gtie.ok { stroke: var(--u-dd); }
.u-oos-gantt .gtie.far { stroke: var(--mu); stroke-dasharray: 3 3; } .u-oos-gantt .gtie.push { stroke: var(--u-warn); }
.u-oos-gantt .gtie.na { stroke: var(--mu); }
.u-oos-gantt .gah.close { fill: var(--u-good); } .u-oos-gantt .gah.ok { fill: var(--u-dd); } .u-oos-gantt .gah.far { fill: var(--mu); }
.u-oos-gantt .gah.push { fill: var(--u-warn); } .u-oos-gantt .gah.na { fill: var(--mu); } .u-oos-gantt .gah.old { fill: var(--u-crit); }
.u-oos-gantt .gtag { font: 700 10px sans-serif; fill: var(--mu); }
.u-oos-gantt .gtag.close { fill: var(--u-good); } .u-oos-gantt .gtag.ok { fill: var(--u-dd); }
.u-oos-gantt .gtag.push, .u-oos-gantt .gtag.old { fill: var(--u-warn); }
.u-oos-gantt .gtag.old { fill: var(--u-crit); }
.u-oos-fit { font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 4px; }
.u-oos-fit.close { color: var(--u-good); background: color-mix(in srgb, var(--u-good) 12%, transparent); }
.u-oos-fit.ok { color: var(--u-dd); background: color-mix(in srgb, var(--u-dd) 10%, transparent); }
.u-oos-fit.far { color: var(--mu); background: color-mix(in srgb, var(--mu) 12%, transparent); }
.u-oos-fit.push { color: var(--u-warn); background: color-mix(in srgb, var(--u-warn) 12%, transparent); }
/* the case diagram, P6 connectors and names */
.u-oos-svg { max-width: 620px; }
.u-oos-svg .bn { font: 600 10px sans-serif; fill: var(--st); }
.u-oos-svg .tt { font: 800 8.5px sans-serif; text-anchor: middle; }
.u-oos-svg .tt.old { fill: var(--u-crit); } .u-oos-svg .tt.new { fill: var(--u-good); } .u-oos-svg .tt.keep { fill: var(--mu); }
.u-oos-svg .tx { font: 800 11px sans-serif; fill: var(--u-crit); text-anchor: middle; }
.u-oos-svg g.p.fade { opacity: .25; }
.u-oos-steps { flex-wrap: wrap; font-size: 10.5px; }
/* the replacement gantt, polished */
.u-oos-gantt .grow-g .gb { transition: stroke-width .15s; }
.u-oos-repl { background: color-mix(in srgb, var(--u-dd) 3%, transparent); }
/* the impact window */
.u-imp { background: var(--p); border-radius: 14px; width: min(1400px, 96vw); max-height: 90vh; display: flex; flex-direction: column;
  box-shadow: 0 24px 64px -20px rgba(15, 27, 46, .45); overflow: hidden; }
.u-imp-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--sk); flex-wrap: wrap; }
.u-imp-h b { font-size: 14px; color: var(--st); }
.u-imp-sum { font-size: 12px; color: var(--mu); }
.u-imp-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 16px; font-size: 11px; color: var(--mu); align-items: center; }
.u-imp-leg i { display: inline-block; width: 18px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.u-imp-leg i.before { border: 1.5px dashed var(--mu); } .u-imp-leg i.after { background: var(--u-dd); }
.u-imp-leg i.later { background: var(--u-crit); } .u-imp-leg i.earlier { background: var(--u-good); }
.u-imp-leg i.status { background: var(--u-ai); } .u-imp-leg i.retract { background: var(--u-warn); }
.u-imp-leg i.tie { background: var(--u-dd); box-shadow: 0 0 0 2px var(--u-bl); }
.u-imp-grid { overflow: auto; flex: 1 1 auto; position: relative; }
.u-imp-head, .u-imp-row, .u-imp-wbs { display: grid; grid-template-columns: 340px 1fr; min-width: 1000px; }
.u-imp-head { position: sticky; top: 0; z-index: 3; background: var(--p); border-bottom: 1px solid var(--sk); height: 26px; }
.u-imp-head .u-imp-l { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mu); padding: 6px 10px; }
.u-imp-t { position: relative; }
.u-imp-tick { position: absolute; top: 6px; font-size: 10px; font-weight: 700; color: var(--mu); border-left: 1px solid var(--sk); padding-left: 3px; }
.u-imp-dd { position: absolute; top: 6px; font-size: 10px; font-weight: 800; color: var(--u-dd); transform: translateX(3px); }
.u-imp-body { position: relative; }
.u-imp-ddl { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed var(--u-dd); pointer-events: none; z-index: 2; }
.u-imp-wbs { background: var(--u-wbs-bg); color: var(--u-wbs-text); font-size: 11px; font-weight: 800; min-height: 22px; }
.u-imp-wbs .u-imp-l { padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-imp-row { min-height: 24px; border-bottom: 1px solid color-mix(in srgb, var(--sk) 60%, transparent); }
.u-imp-row .u-imp-l { font-size: 11.5px; color: var(--st); padding: 4px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-imp-row.hit { background: color-mix(in srgb, var(--u-bl) 10%, transparent); }
.u-imp-tag { font-style: normal; font-size: 9.5px; font-weight: 800; margin-left: 6px; padding: 1px 5px; border-radius: 3px; color: #fff; }
.u-imp-tag.later { background: var(--u-crit); } .u-imp-tag.earlier { background: var(--u-good); } .u-imp-tag.status { background: var(--u-ai); }
.u-imp-tag.retract { background: var(--u-warn); } .u-imp-tag.tie { background: var(--u-dd); }
.u-imp-b { position: absolute; top: 5px; height: 14px; border-radius: 3px; }
.u-imp-b.before { border: 1.5px dashed var(--mu); background: transparent; top: 4px; height: 16px; }
.u-imp-b.after { background: color-mix(in srgb, var(--u-dd) 55%, transparent); overflow: hidden; }
.u-imp-b.after span { font-size: 9px; font-weight: 700; color: #fff; padding-left: 3px; white-space: nowrap; line-height: 14px; }
.u-imp-b.after.later { background: var(--u-crit); } .u-imp-b.after.earlier { background: var(--u-good); }
.u-imp-b.after.status { background: var(--u-ai); } .u-imp-b.after.retract { background: var(--u-warn); }
.u-imp-b.after.tie { background: var(--u-dd); box-shadow: 0 0 0 2px var(--u-bl); }
.u-oos-imp-open { margin-left: 12px; }

/* ── Import from P6 (update-p6-import.js) ─────────────────────────────── */
.upd .u-p6i-pick { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 4px 0 14px; }
.upd .u-p6i-file { cursor: pointer; }
.upd .u-p6i-fn { font-weight: 600; font-size: 13px; }
.upd .u-p6i-sel { padding: 5px 8px; border-radius: 6px; border: 1px solid var(--u-line, #d0d7de); background: transparent; color: inherit; }
.upd .u-p6i-sec { border-top: 1px solid var(--u-line, #e3e8ee); }
.upd .u-p6i-sec:first-child { border-top: 0; }
.upd .u-p6i-sh { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 2px; border: 0; background: none;
  color: inherit; font-weight: 600; font-size: 13px; cursor: pointer; text-align: left; }
.upd .u-p6i-sh .n { margin-left: 4px; padding: 1px 8px; border-radius: 10px; background: rgba(99,102,241,.14); font-size: 11px; }
.upd .u-p6i-car { width: 12px; opacity: .6; }
.upd .u-p6i-tw { max-height: 360px; overflow: auto; margin-bottom: 10px; }
.upd .u-p6i-t { width: 100%; border-collapse: collapse; font-size: 12px; }
.upd .u-p6i-t th { position: sticky; top: 0; background: var(--u-card, #fff); text-align: left; font-weight: 600;
  padding: 6px 8px; border-bottom: 1px solid var(--u-line, #e3e8ee); opacity: .8; }
.upd .u-p6i-t td { padding: 5px 8px; border-bottom: 1px solid rgba(127,127,127,.12); vertical-align: top; }
.upd .u-p6i-t td.id { font-family: ui-monospace, monospace; white-space: nowrap; }
.upd .u-p6i-t s { opacity: .55; }
.upd .u-p6i-t tr.rv td { opacity: .5; }
.upd .u-p6i-more { padding: 6px 8px; font-size: 12px; opacity: .7; }
.upd .u-p6i-tag { padding: 1px 7px; border-radius: 9px; font-size: 11px; font-weight: 600; }
.upd .u-p6i-tag.add { background: rgba(22,163,74,.15); color: #15803d; }
.upd .u-p6i-tag.rem { background: rgba(220,38,38,.14); color: #b91c1c; }
.upd .u-p6i-tag.chg { background: rgba(217,119,6,.15); color: #b45309; }
.upd .u-p6i-modes { display: grid; gap: 8px; margin-bottom: 8px; }
.upd .u-p6i-done { padding: 10px 12px; margin-bottom: 12px; border-radius: 8px; background: rgba(22,163,74,.12); font-size: 13px; }

/* ── Update History: the Data Date line (update-reports.js screenHistory) ── */
.upd .u-p6i-back { margin-bottom: 8px; }
.upd .u-hx-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 2px 0 12px; }
.upd .u-hx-strip .k { background: var(--p); border: 1px solid var(--sk); border-radius: var(--r2); padding: 11px 14px;
  display: flex; flex-direction: column; gap: 3px; }
.upd .u-hx-strip .k > span { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.upd .u-hx-strip .k b { font-family: var(--u-mono); font-size: 20px; font-weight: 800; color: var(--st); line-height: 1.15; }
.upd .u-hx-strip .k b small { font-size: 12px; color: var(--mu); font-weight: 700; }
.upd .u-hx-strip .k em { font-style: normal; font-size: 10.5px; color: var(--mu); font-weight: 600; }
.upd .u-hx .bad, .upd .u-hx-strip .bad { color: var(--u-crit) !important; }
.upd .u-hx .good, .upd .u-hx-strip .good { color: var(--u-good) !important; }
.upd .u-hx-bar { display: block; height: 5px; border-radius: 3px; background: var(--sk2); overflow: hidden; margin-top: 3px; }
.upd .u-hx-bar i { display: block; height: 100%; border-radius: 3px; }
.upd .u-hx-bar.act i { background: var(--u-ok); }
.upd .u-hx-bar.pln i { background: var(--u-dd); opacity: .55; }

.upd .u-hx-trend { background: var(--p); border: 1px solid var(--sk); border-radius: var(--r2); padding: 8px 12px 6px; margin-bottom: 16px; position: relative; }
.upd .u-hx-trend svg { width: 100%; height: auto; max-height: 150px; display: block; overflow: visible; }
.upd .u-hx-trend .g { stroke: var(--sk2); stroke-width: 1; }
.upd .u-hx-trend .gl { font-size: 11px; fill: var(--mu); text-anchor: end; }
.upd .u-hx-trend .xl { font-size: 11px; fill: var(--mu); text-anchor: middle; font-weight: 700; }
.upd .u-hx-trend path { fill: none; stroke-width: 2.4; stroke-linejoin: round; }
.upd .u-hx-trend path.act { stroke: var(--u-ok); }
.upd .u-hx-trend path.pln { stroke: var(--u-dd); stroke-dasharray: 5 4; opacity: .7; }
.upd .u-hx-trend circle.pt { fill: var(--p); stroke: var(--u-ok); stroke-width: 2; }
.upd .u-hx-trend circle.cur { fill: var(--u-ok); stroke: var(--p); stroke-width: 2; }
.upd .u-hx-trend .lg { position: absolute; top: 8px; right: 14px; display: flex; gap: 12px; font-size: 10px; font-weight: 700; color: var(--mu); }
.upd .u-hx-trend .lg span::before { content: ''; display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 5px; vertical-align: middle; }
.upd .u-hx-trend .lg .act::before { background: var(--u-ok); }
.upd .u-hx-trend .lg .pln::before { background: var(--u-dd); opacity: .7; }

.upd .u-hx { display: flex; flex-direction: column; }
.upd .u-hx-row { display: grid; grid-template-columns: 124px 52px minmax(0, 1fr); gap: 0 14px; align-items: stretch; }
.upd .u-hx-date { text-align: right; padding-top: 14px; }
.upd .u-hx-date b { display: block; font-family: var(--u-mono); font-size: 15px; font-weight: 800; color: var(--st); }
.upd .u-hx-date span { display: block; font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--u-dd); margin-top: 2px; }
.upd .u-hx-date em { display: block; font-style: normal; font-size: 9.5px; color: var(--mu); margin-top: 6px; line-height: 1.35; }
.upd .u-hx-row.bl .u-hx-date span { color: var(--u-warn); }
.upd .u-hx-row.orig .u-hx-date span { color: var(--mu); }
.upd .u-hx-spine { position: relative; display: flex; flex-direction: column; align-items: center; }
.upd .u-hx-spine::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px;
  background: linear-gradient(var(--u-dd), rgba(47, 107, 216, .35)); border-radius: 2px; }
.upd .u-hx-row:first-child .u-hx-spine::before { top: 18px; }
.upd .u-hx-row:last-child .u-hx-spine::before { bottom: calc(100% - 26px); }
.upd .u-hx-node { position: relative; z-index: 1; margin-top: 8px; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-family: var(--u-mono); font-weight: 800; font-size: 13px;
  background: var(--p); color: var(--u-dd); border: 3px solid var(--u-dd); box-shadow: 0 0 0 4px var(--p); }
.upd .u-hx-row.cur .u-hx-node { background: var(--u-dd); color: #fff; box-shadow: 0 0 0 4px var(--p), 0 0 0 8px rgba(47, 107, 216, .22); }
.upd .u-hx-row.open .u-hx-node { border-color: var(--u-warn); color: var(--u-warn); }
.upd .u-hx-row.open.cur .u-hx-node { background: var(--u-warn); color: #fff; box-shadow: 0 0 0 4px var(--p), 0 0 0 8px rgba(184, 105, 62, .25); }
.upd .u-hx-row.rcv .u-hx-node { border-color: #7A2E8E; color: #7A2E8E; }
.upd .u-hx-node.bl { width: 26px; height: 26px; margin-top: 12px; border-radius: 6px; transform: rotate(0); font-size: 12px;
  border-color: var(--u-warn); color: var(--u-warn); }
.upd .u-hx-node.orig { width: 24px; height: 24px; border-color: var(--mu); color: var(--mu); font-size: 11px; }
.upd .u-hx-gap { position: absolute; bottom: 2px; z-index: 2; font-size: 9px; font-weight: 800; color: var(--u-dd);
  background: var(--p); border: 1px solid rgba(47, 107, 216, .35); border-radius: 10px; padding: 2px 7px; white-space: nowrap; }

.upd .u-hx-card { background: var(--p); border: 1px solid var(--sk); border-left: 4px solid var(--u-dd); border-radius: var(--r2);
  padding: 12px 15px 10px; margin: 8px 0 18px; box-shadow: 0 1px 2px rgba(15, 27, 46, .04); transition: box-shadow .15s; }
.upd .u-hx-card:hover { box-shadow: 0 1px 2px rgba(15, 27, 46, .05), 0 10px 26px -16px rgba(15, 27, 46, .28); }
.upd .u-hx-row.cur .u-hx-card { box-shadow: 0 1px 2px rgba(15, 27, 46, .05), 0 12px 30px -16px rgba(47, 107, 216, .45); }
.upd .u-hx-row.open .u-hx-card { border-left-color: var(--u-warn); }
.upd .u-hx-row.rcv .u-hx-card { border-left-color: #7A2E8E; }
.upd .u-hx-card.bl { border-left-color: var(--u-warn); background: var(--p2, var(--p)); padding-top: 10px; }
.upd .u-hx-card.orig { border-left-color: var(--mu); background: var(--p2, var(--p)); }
.upd .u-hx-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.upd .u-hx-top .ttl { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; min-width: 0; }
.upd .u-hx-top .ttl b, .upd .u-hx-name { font-size: 16px !important; letter-spacing: 0 !important; text-transform: none !important; font-weight: 800; color: var(--st) !important; }
.upd .u-hx-top .ttl .nm { font-size: 12.5px; color: var(--mu); font-weight: 600; }
.upd .u-hx-top .kd { font-size: 9px; font-weight: 800; letter-spacing: .1em; color: var(--mu); }
.upd .u-hx-ren { border: 0; background: none; color: var(--mu); cursor: pointer; font-size: 13px; padding: 2px 4px; border-radius: 5px; }
.upd .u-hx-ren:hover { background: var(--sk2); color: var(--st); }
.upd .u-hx-pill { font-size: 9px; font-weight: 800; letter-spacing: .06em; padding: 3px 8px; border-radius: 10px;
  background: var(--sk2); color: var(--mu); }
.upd .u-hx-pill.cur { background: var(--u-dd); color: #fff; }
.upd .u-hx-pill.view { background: rgba(47, 107, 216, .14); color: var(--u-dd); }
.upd .u-hx-pill.open { background: rgba(184, 105, 62, .16); color: var(--u-warn); }
.upd .u-hx-pill.rcv { background: #7A2E8E; color: #fff; }
.upd .u-hx-pill.act { background: rgba(24, 141, 104, .15); color: var(--u-good); }
.upd .u-hx-open.on { font-size: 11px; font-weight: 800; color: var(--u-dd); padding: 6px 12px; border-radius: 8px; background: rgba(47, 107, 216, .1); }
.upd .u-hx-met { display: grid; grid-template-columns: minmax(170px, 1.4fr) repeat(4, minmax(100px, 1fr)); gap: 10px 18px; margin: 12px 0 8px; }
.upd .u-hx-card.bl .u-hx-met, .upd .u-hx-card.orig .u-hx-met { grid-template-columns: repeat(3, minmax(120px, max-content)); }
.upd .u-hx-met > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.upd .u-hx-met span { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.upd .u-hx-met b { font-family: var(--u-mono); font-size: 14px; font-weight: 800; color: var(--st); }
.upd .u-hx-met b small { font-size: 11px; color: var(--mu); font-weight: 700; }
.upd .u-hx-met em { font-style: normal; font-size: 10px; font-weight: 700; color: var(--mu); }
.upd .u-hx-src { margin: 2px 0 6px; display: flex; gap: 5px; flex-wrap: wrap; }
.upd .u-hx-note { font-size: 10.5px; color: var(--mu); margin: 4px 0; padding: 6px 9px; border-radius: 7px; background: var(--sk2); }
.upd .u-hx-note.open { background: rgba(184, 105, 62, .1); color: var(--u-warn); }
.upd .u-hx-note.rcv { background: rgba(122, 46, 142, .09); color: #7A2E8E; }
.upd .u-hx-bar-acts { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; border-top: 1px solid var(--sk2); padding-top: 9px; margin-top: 6px; }
.upd .u-hx-a { font-size: 11px; font-weight: 700; padding: 6px 12px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--sk); background: var(--p); color: var(--st); transition: background .12s, border-color .12s; }
.upd .u-hx-a:hover:not([disabled]) { border-color: var(--u-dd); color: var(--u-dd); }
.upd .u-hx-a[disabled] { opacity: .45; cursor: not-allowed; }
.upd .u-hx-a.hx-pri { background: var(--u-dd); border-color: var(--u-dd); color: #fff; padding: 7px 18px; }
.upd .u-hx-a.hx-pri:hover:not([disabled]) { filter: brightness(1.08); color: #fff; }
.upd .u-hx-a.hx-rcv { color: #7A2E8E; border-color: rgba(122, 46, 142, .35); }
.upd .u-hx-a.hx-warn { color: var(--u-warn); border-color: rgba(184, 105, 62, .4); }
.upd .u-hx-a.hx-bad { color: var(--u-crit); border-color: rgba(198, 70, 43, .4); }
.upd .u-hx-a.hx-bad:hover:not([disabled]) { background: var(--u-crit); color: #fff; border-color: var(--u-crit); }
.upd .u-hx-del { font-size: 10.5px; color: var(--mu); margin: 0 0 12px 190px; }
@media (max-width: 900px) {
  .upd .u-hx-row { grid-template-columns: 78px 40px minmax(0, 1fr); gap: 0 8px; }
  .upd .u-hx-met { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upd .u-hx-del { margin-left: 0; }
}
/* opened from the Recovery tab: the way back */
.u-rcvback { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 9px 12px; border-radius: 10px;
  background: rgba(122, 46, 142, .08); border: 1px solid rgba(122, 46, 142, .3); font-size: 12px; color: var(--st); }
.u-rcvback span { flex: 1; }
/* the Gantt's chart cell is a TABLE CELL. `.u-tl` is also the History
   timeline's flex column (above), and the cell took that display: a flex
   td is no longer a table cell, so it stopped following its column — in a
   table stretched to its pane the rows' chart ended short of the ruler and
   the Data Date and target lines broke at the header. */
table.u-g td.u-tl { display: table-cell; }
.upd .u-hx-pill.p6 { background: rgba(31, 95, 168, .14); color: #1F5FA8; }

/* ── Update History, two panes (update-reports.js screenHistory) ──────── */
.upd .u-hx-ph { margin-bottom: 8px; }
.upd .u-hx-ph .sub { max-width: none; }
.upd .u-hx-strip { gap: 8px; margin: 0 0 10px; }
.upd .u-hx-strip .k { padding: 8px 12px; gap: 1px; flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 10px; }
.upd .u-hx-strip .k > span { width: 100%; }
.upd .u-hx-strip .k b { font-size: 17px; }
.upd .u-hx2 { display: grid; grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); gap: 12px; align-items: start; }
.upd .u-hx2-rail { background: var(--p); border: 1px solid var(--sk); border-radius: var(--r2); overflow: hidden; }
.upd .u-hx2-rh { display: flex; align-items: baseline; justify-content: space-between; padding: 9px 12px; border-bottom: 1px solid var(--sk2);
  font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--u-dd); }
.upd .u-hx2-rh span { font-size: 10px; letter-spacing: 0; text-transform: none; color: var(--mu); font-weight: 600; }
.upd .u-hx2-list { max-height: calc(100vh - 330px); min-height: 220px; overflow-y: auto; padding: 4px 0; position: relative; }
.upd .u-hx2-it { position: relative; display: grid; grid-template-columns: 70px 30px minmax(0, 1fr) auto; align-items: center; gap: 0 8px;
  width: 100%; padding: 6px 10px 6px 6px; border: 0; border-left: 3px solid transparent; background: none; color: inherit;
  text-align: left; cursor: pointer; font: inherit; }
.upd .u-hx2-it:hover { background: rgba(47, 107, 216, .05); }
.upd .u-hx2-it.on { background: rgba(47, 107, 216, .1); border-left-color: var(--u-dd); }
.upd .u-hx2-it.orig { cursor: default; opacity: .8; }
.upd .u-hx2-it .d { text-align: right; line-height: 1.15; }
.upd .u-hx2-it .d b { display: block; font-family: var(--u-mono); font-size: 11.5px; font-weight: 800; color: var(--st); }
.upd .u-hx2-it .d i { font-style: normal; font-size: 9px; font-weight: 700; color: var(--mu); }
.upd .u-hx2-it .sp { position: relative; align-self: stretch; display: flex; align-items: center; justify-content: center; }
.upd .u-hx2-it .sp::before { content: ''; position: absolute; top: -6px; bottom: -6px; left: 50%; width: 3px; margin-left: -1.5px; background: rgba(47, 107, 216, .45); }
.upd .u-hx2-list > :first-child .sp::before { top: 50%; }
.upd .u-hx2-list > :last-child .sp::before { bottom: 50%; }
.upd .u-hx2-it .nd { position: relative; z-index: 1; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--u-mono); font-size: 10.5px; font-weight: 800; background: var(--p); color: var(--u-dd); border: 2.5px solid var(--u-dd); }
.upd .u-hx2-it.cur .nd { background: var(--u-dd); color: #fff; box-shadow: 0 0 0 3px rgba(47, 107, 216, .22); }
.upd .u-hx2-it.open .nd { border-color: var(--u-warn); color: var(--u-warn); }
.upd .u-hx2-it.open.cur .nd { background: var(--u-warn); color: #fff; }
.upd .u-hx2-it.rcv .nd { border-color: #7A2E8E; color: #7A2E8E; }
.upd .u-hx2-it.p6 .nd { border-color: #1F5FA8; color: #1F5FA8; }
.upd .u-hx2-it .nd.bl { width: 18px; height: 18px; border-radius: 4px; font-size: 9px; border-color: var(--u-warn); color: var(--u-warn); }
.upd .u-hx2-it .nd.orig { width: 16px; height: 16px; font-size: 9px; border-color: var(--mu); color: var(--mu); }
.upd .u-hx2-it .tx { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.upd .u-hx2-it .tx b { font-size: 12.5px; font-weight: 800; color: var(--st); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upd .u-hx2-it .tx em { font-style: normal; font-size: 10px; font-weight: 600; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upd .u-hx2-it .tx .u-hx-bar { height: 3px; margin-top: 2px; max-width: 150px; }
.upd .u-hx2-it.bl { padding-top: 3px; padding-bottom: 3px; }
.upd .u-hx2-it.bl .tx b { font-size: 11px; color: var(--u-warn); }
.upd .u-hx2-it .tg { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.upd .u-hx2-it .tg i { font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: .05em; padding: 1px 6px; border-radius: 8px; background: var(--sk2); color: var(--mu); }
.upd .u-hx2-it .tg i.cur { background: var(--u-dd); color: #fff; }
.upd .u-hx2-it .tg i.view { background: rgba(47, 107, 216, .15); color: var(--u-dd); }
.upd .u-hx2-it .tg i.open { background: rgba(184, 105, 62, .16); color: var(--u-warn); }
.upd .u-hx2-it .tg i.rcv { background: #7A2E8E; color: #fff; }
.upd .u-hx2-it .tg i.p6 { background: rgba(31, 95, 168, .14); color: #1F5FA8; }
.upd .u-hx2-it .bad { color: var(--u-crit); } .upd .u-hx2-it .good { color: var(--u-good); }
.upd .u-hx2-rail .u-hx-del { margin: 0; padding: 7px 12px; border-top: 1px solid var(--sk2); }

.upd .u-hx2-det { background: var(--p); border: 1px solid var(--sk); border-top: 4px solid var(--u-dd); border-radius: var(--r2);
  padding: 14px 18px 12px; box-shadow: 0 1px 2px rgba(15, 27, 46, .05), 0 12px 30px -18px rgba(47, 107, 216, .4);
  max-height: calc(100vh - 272px); overflow-y: auto; }
.upd .u-hx2-h { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.upd .u-hx2-big { width: 48px; height: 48px; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--u-mono); font-size: 17px; font-weight: 800; background: var(--u-dd); color: #fff; box-shadow: 0 0 0 5px rgba(47, 107, 216, .16); }
.upd .u-hx2-big.open { background: var(--u-warn); box-shadow: 0 0 0 5px rgba(184, 105, 62, .18); }
.upd .u-hx2-big.rcv { background: #7A2E8E; }
.upd .u-hx2-big.bl { border-radius: 10px; background: var(--u-warn); font-size: 20px; }
.upd .u-hx2-h .ttl { min-width: 0; }
.upd .u-hx2-h .l1 { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.upd .u-hx2-h .l1 b { font-size: 19px; font-weight: 800; color: var(--st) !important; text-transform: none !important; letter-spacing: 0 !important; }
.upd .u-hx2-h .l2 { font-size: 11.5px; color: var(--mu); margin-top: 3px; }
.upd .u-hx2-h .l2 b { color: var(--u-dd); font-family: var(--u-mono); }
.upd .u-hx2-det .u-hx-met { margin: 14px 0 10px; padding: 12px 0; border-top: 1px solid var(--sk2); border-bottom: 1px solid var(--sk2); }
.upd .u-hx2-det .u-hx-met b { font-size: 16px; }
.upd .u-hx2-det .u-hx-trend { border: 0; padding: 0 0 4px; margin: 0 0 8px; }
.upd .u-hx2-det .u-hx-trend svg { max-height: 130px; }
.upd .u-hx-trend .sel { stroke: var(--u-dd); stroke-width: 1.5; stroke-dasharray: 3 3; opacity: .6; }
.upd .u-hx-trend .xl.on { fill: var(--u-dd); }
.upd .u-hx-src { align-items: center; }
.upd .u-hx-src > span { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); margin-right: 4px; }
.upd .u-hx2-acts { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--sk2); }
.upd .u-hx2-acts .grp { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.upd .u-hx2-acts .grp > span { font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mu); margin-right: 2px; }
@media (max-width: 1000px) {
  .upd .u-hx2 { grid-template-columns: 1fr; }
  .upd .u-hx2-list, .upd .u-hx2-det { max-height: none; }
}

/* ── Import from P6 as a floating window ─────────────────────────────── */
.u-mod.u-p6i-mod { max-width: 1180px; }
.u-mod.u-p6i-mod .u-mod-b { max-height: calc(90vh - 120px); overflow-y: auto; }
.upd .u-p6i-intro { font-size: 12px; color: var(--mu); margin-bottom: 10px; line-height: 1.45; }
.u-ov:has(.u-p6i-mod) { padding-top: 84px; }
.u-mod.u-p6i-mod .u-mod-b { max-height: calc(100vh - 220px); }
.upd .u-p6i-mod .u-p6i-modes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* a recovery / P6 import that set the new baseline: one entry, marked */
.upd .u-hx2-it .nd i.nbl { position: absolute; right: -7px; bottom: -6px; font-style: normal; font-size: 9px; line-height: 1;
  width: 14px; height: 14px; border-radius: 4px; display: flex; align-items: center; justify-content: center;
  background: var(--u-warn); color: #fff; box-shadow: 0 0 0 2px var(--p); }
.upd .u-hx2-it .tx .nbl-l { font-size: 9.5px; font-weight: 800; color: var(--u-warn); letter-spacing: .02em; }
.upd .u-hx-nbl { display: flex; align-items: center; gap: 12px; margin: 0 0 10px; padding: 10px 12px; border-radius: 10px;
  background: rgba(184, 105, 62, .08); border: 1px solid rgba(184, 105, 62, .35); }
.upd .u-hx-nbl .ic { width: 30px; height: 30px; flex: none; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  background: var(--u-warn); color: #fff; font-size: 14px; }
.upd .u-hx-nbl .tx { flex: 1; min-width: 0; }
.upd .u-hx-nbl .l1 { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: var(--st); }
.upd .u-hx-nbl .l1 b { color: var(--u-warn); font-family: var(--u-mono); }
.upd .u-hx-nbl .l2 { font-size: 10.5px; color: var(--mu); margin-top: 2px; }
.upd .u-hx-nbl .ac { display: flex; gap: 6px; }
.upd .u-hx2-it.rcv.cur .nd { background: #7A2E8E; border-color: #7A2E8E; color: #fff; box-shadow: 0 0 0 3px rgba(122, 46, 142, .22); }
.upd .u-hx2-it.p6.cur .nd { background: #1F5FA8; border-color: #1F5FA8; color: #fff; }

/* Manual Update — true spreadsheet cells; scoped to Update Center only. */
#updOut .u-g td[data-ucell] {
  cursor: cell;
  position: relative;
  transition: background-color .1s ease;
}
#updOut .u-g td[data-ucell]:hover,
#updOut .u-g td[data-ucell]:focus-visible {
  background: color-mix(in srgb, var(--u-dd, #2f6bd8) 8%, var(--p, white));
  outline: 1px solid color-mix(in srgb, var(--u-dd, #2f6bd8) 35%, transparent);
  outline-offset: -1px;
}
#updOut .u-g td[data-ucell="status"] { cursor: pointer; }
#updOut .u-g td[data-ucell="status"]:not(.u-editing)::after {
  content: "⌄";
  float: right;
  font-size: 11px;
  opacity: .45;
}
#updOut .u-g td.u-editing { padding: 2px 3px !important; background: var(--p, white) !important; }
#updOut .u-g td.u-editing .u-cellin {
  display: block;
  width: 100%;
  min-width: 76px;
  max-width: 100%;
  box-sizing: border-box;
  height: 27px;
  padding: 2px 5px;
  margin: 0;
  font: inherit;
  font-size: 11px;
  color: var(--st, #0f1b2e);
  background: var(--p, white);
  border: 1px solid var(--u-dd, #2f6bd8);
  border-radius: 4px;
  outline: 2px solid color-mix(in srgb, var(--u-dd, #2f6bd8) 16%, transparent);
}
#updOut .u-g td.u-editing .u-cellin.status { min-width: 102px; cursor: pointer; }
#updOut .u-g td.u-stg { box-shadow: inset 0 -2px 0 var(--u-dd, #2f6bd8); }
@media (pointer: coarse) {
  #updOut .u-g td[data-ucell] { min-height: 34px; touch-action: manipulation; }
  #updOut .u-g td.u-editing .u-cellin { height: 36px; font-size: 16px; }
}

/* First-gesture native status and calendar hit targets. The P6 status chip
   and Actual/Forecast display remain visible; the browser owns the picker.
   A transparent overlay is NOT a button that requires focus then another tap. */
#updOut .u-g td[data-ucell="status"],
#updOut .u-g td[data-ucell="actualStart"],
#updOut .u-g td[data-ucell="actualFinish"] {
  position: relative;
}
#updOut .u-g td .u-cellnative {
  position: absolute;
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  opacity: 0.015;
  padding: 0;
  margin: 0;
  border: 0;
  cursor: pointer;
  z-index: 2;
}
#updOut .u-g td:has(.u-cellnative):focus-within {
  outline: 2px solid var(--u-dd, #2f6bd8);
  outline-offset: -2px;
}
#updOut .u-g td input.u-cellnative::-webkit-calendar-picker-indicator {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
}
#updOut .u-g td[data-ucell="actualStart"]:has(.u-cellnative),
#updOut .u-g td[data-ucell="actualFinish"]:has(.u-cellnative) { touch-action: manipulation; }

/* ── UPDATE CENTER SCROLL STABILITY ──────────────────────────────────
   Summary collapse is user-initiated (Focus View), never driven by the
   grid's scrollTop. Large max-height/margin transitions changed the grid
   height in multiple frames, triggering ResizeObserver + fitGrid repeatedly
   while a finger was dragging. An instantaneous, one-time switch avoids
   layout work during the gesture without affecting other tabs. */
#updOut .u-rail,
#updOut .u-sc2,
#updOut .u-mstrip {
  transition: none !important;
}
#updOut .u-gscroll {
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
}

/* ═══ UPDATE CENTER — SINGLE NATIVE SCROLLPORT ═══════════════════════
   Rail, full-size summary, methods and activity grid are siblings INSIDE
   one vertical+horizontal scrollport. No nested Y scroll, scroll hijacks,
   fold animations, or per-scroll resize calculations. Horizontal overflow
   remains native, so the name (left) and Gantt (right) stay frozen.
   Only the two-row table headings stick vertically once reached. */
#updOut .u-center-scroll.u-gscroll {
  box-sizing: border-box;
  height: calc(100vh - var(--app-content-top, 80px) - 16px);
  height: calc(100dvh - var(--app-content-top, 80px) - 16px);
  min-height: 240px;
  width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  overflow-anchor: auto;
}
#updOut .u-center-scroll .u-scroll-chrome,
#updOut .u-center-scroll .u-scroll-summary,
#updOut .u-center-scroll .u-gtools {
  position: sticky;
  left: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
}
#updOut .u-center-scroll .u-rail {
  position: static;
  top: auto;
}
/* The table's horizontal overflow belongs to the shared scrollport.
   Clipping either ancestor would block native CSS sticky headers. */
#updOut .u-center-scroll .u-gwrap,
#updOut .u-center-scroll .u-gviewport {
  overflow: visible;
}
#updOut .u-center-scroll .u-gwrap {
  border-radius: 0;
}
#updOut .u-center-scroll .u-gviewport {
  position: static;
  height: auto;
  min-height: 0;
}
/* The grouped band sticks at 0 and the sub row under the same height
   token. This is the SAME header, not an unsynchronised cloned overlay. */
#updOut .u-center-scroll table.u-g thead th { top: 0; }
#updOut .u-center-scroll table.u-g thead tr.sub th { top: var(--u-hgrp); }
#updOut .u-center-scroll table.u-g thead tr.grp th[rowspan] { top: 0; }
#updOut .u-center-scroll table.u-g thead th.stk,
#updOut .u-center-scroll table.u-g thead th.u-tlh-c,
#updOut .u-center-scroll table.u-g thead tr.grp th.g.tl {
  z-index: 12;
}
/* Keep the exact full-size summary. The sticky-left positioning above
   prevents a horizontal pan through dates from shifting the overview. */

/* CHANGE REVIEW — RESPONSIVE TABLET FIT (isolated from Update Center grid).
   The Update Center reserves a sticky right Gantt pane and a min-width table.
   Review needs an ordinary full-width chart column, not a frozen pane hiding
   the actual-start/finish/progress/decision columns on tablet. */
.u-review-wrap {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  container: nexora-review / inline-size;
}
.u-review-wrap > .u-review-scroll {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overscroll-behavior-x: contain;
  /* THE TABLE IS THE SCREEN. The shared fit (fitGrid) sizes a grid so the
     grid AND everything under it fit in one viewport; under this one sit
     the legend and the conflicts list, so nine conflicts left four rows of
     table. Review is the core of the update: the table takes the whole
     viewport below the app bar, and what is under it is reached by
     scrolling the page, which brings the table fully into view first. */
  height: calc(var(--u-vh, 100vh) - var(--app-content-top, 80px) - 24px);
  min-height: 420px;
  scroll-margin-top: calc(var(--app-content-top, 80px) + 8px);
}
.u-review-mini-axis { display: none; }
.upd .u-review-tools { max-width: 100%; min-width: 0; flex-wrap: wrap; }
.upd .u-review-tools .u-sp { flex: 1 1 12px; }

/* ══════════════════════════════════════════════════════════════════════
   CHANGE REVIEW — ONE FIXED CARD
   The review is the height of the window and does not scroll the page: the
   status band, the navigation, the one-line summary and the toolbar stay
   where they are, and the table scrolls inside the card. (update.tab.js
   fitReview sets --u-rvh from where the panel actually starts.)
   ══════════════════════════════════════════════════════════════════════ */
.upd { --u-upd: #6B4EE6; --u-idle: #9AA3AE; }
#updOut:has(> .u-rv) {
  display: flex; flex-direction: column;
  height: var(--u-rvh, calc(100vh - 96px)); min-height: 460px;
  overflow: hidden; padding-bottom: 0;
}
#updOut:has(> .u-rv) > .u-rail { position: relative; top: auto; flex: none; margin-bottom: 8px; padding: 9px 16px; }
#updOut:has(> .u-rv) > .u-nav { flex: none; padding-bottom: 8px; }
.u-rv { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 6px; }

/* ── the one-line summary ─────────────────────────────────────────────── */
.u-rs {
  flex: none; display: flex; align-items: center; gap: 6px; min-width: 0;
  padding: 5px 6px 5px 12px; border-radius: var(--r2);
  background: var(--st); color: #E7EEF6;
  overflow-x: auto; scrollbar-width: none; white-space: nowrap;
}
.u-rs::-webkit-scrollbar { display: none; }
.u-rs > * { flex: none; }
.u-rs .u-sp { flex: 1 1 8px; }
@media (max-width: 1320px) { .u-rs-t > span, .u-rs-m small, .u-rs-imp em { display: none; } }
.u-rs-t { display: inline-flex; align-items: baseline; gap: 6px; font-size: 12px; margin-right: 6px; }
.u-rs-t b { font-size: 15px; font-family: var(--u-mono); }
.u-rs-t > span { font-size: 11px; color: #8EACC9; }
.u-rs-t .u-src { margin-left: 2px; }
.u-rs-m {
  display: inline-flex; align-items: baseline; gap: 5px;
  font-family: inherit; font-weight: 600; font-size: 11px; line-height: 1; color: #B8CDE0; background: rgba(231, 238, 246, .07);
  border: 1px solid rgba(142, 172, 201, .22); border-radius: 999px; padding: 5px 10px;
}
button.u-rs-m { cursor: pointer; }
button.u-rs-m:hover { border-color: #E7EEF6; color: #fff; }
.u-rs-m b { font: 800 13px/1 var(--u-mono); color: #fff; }
.u-rs-m small { font-size: 10px; color: #F2A58E; }
.u-rs-m.zero { opacity: .45; }
.u-rs-m.st b { color: #5EE3B0; }
.u-rs-m.fin b { color: #9DBBF0; }
.u-rs-m.late b { color: #F2A58E; }
.u-rs-m.cf { border-color: rgba(242, 165, 142, .55); }
.u-rs-m.cf b { color: #FFB59E; }
.u-rs-dec { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: #B8CDE0; }
.u-rs-dec b { color: #fff; font-family: var(--u-mono); }
.u-rs-bar { display: inline-flex; width: 84px; height: 6px; border-radius: 3px; background: rgba(231, 238, 246, .18); overflow: hidden; }
.u-rs-bar i { display: block; height: 100%; }
.u-rs-bar .ok { background: #2ECB8F; }
.u-rs-bar .no { background: #E06A4E; }
.u-rs-imp {
  display: inline-flex; align-items: baseline; gap: 7px; margin-left: 6px;
  padding: 6px 12px; border-radius: 8px; font-family: inherit; font-weight: 600; font-size: 11px; line-height: 1;
  background: rgba(231, 238, 246, .1); color: #E7EEF6; border: 0;
}
.u-rs-imp em { font-style: normal; font-size: 9.5px; letter-spacing: .08em; text-transform: uppercase; color: #8EACC9; }
.u-rs-imp s { color: #8EACC9; font-family: var(--u-mono); }
.u-rs-imp b { font-family: var(--u-mono); font-size: 13px; color: #fff; }
.u-rs-imp i { font-style: normal; font-weight: 800; font-family: var(--u-mono); }
.u-rs-imp.bad i { color: #FF9C84; }
.u-rs-imp.good i { color: #5EE3B0; }
.u-rs-imp.ask { cursor: pointer; background: #2ECB8F; color: #052D20; }
.u-rs-imp.ask em { color: #0B4D36; }
.u-rs-imp.ask b { color: #052D20; font-family: inherit; font-size: 11.5px; }
.u-rs-imp.busy { opacity: .7; }

/* ── the toolbar ──────────────────────────────────────────────────────── */
.u-rv-tools { flex: none; display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.u-rv-tools::-webkit-scrollbar { display: none; }
.u-rv-tools > * { flex: none; }
.u-rv-tools .u-sp { flex: 1 1 8px; }
.u-rv-hint { font-size: 10.5px; color: var(--mu); }

/* ── the card: the table takes everything that is left ───────────────── */
.u-rv-card {
  flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column;
  border: 1px solid var(--sk); border-radius: var(--r2); background: var(--p); overflow: hidden;
}
.u-rv-card > .u-rv-wrap { flex: 1 1 auto; min-height: 0; border: 0; border-radius: 0; display: flex; }
.u-rv-card .u-rv-scroll { flex: 1 1 auto; height: auto; min-height: 0; overflow: auto; }
.u-rv-card > .u-rv-scroll { padding: 10px; }
.u-rv-foot {
  flex: none; display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-top: 1px solid var(--sk); background: var(--p2);
}
.u-rv-foot .u-key { font-size: 10.5px; }
.u-rv-foot .u-sp { flex: 1 1 8px; }

/* ── the table: one line a row, widths are variables ─────────────────── */
table.u-g.u-rv-t { table-layout: fixed; min-width: 0; --u-row: 30px; }
table.u-rv-t th, table.u-rv-t td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.u-rv-t th { position: sticky; top: 0; font-size: 9px; padding: 6px 8px; }
table.u-rv-t td { font-size: 11.5px; padding: 0 8px; height: var(--u-row); }
table.u-rv-t td.u-tl, table.u-rv-t th.u-tlh-c { padding: 0; min-width: 0; }
table.u-rv-t th.c-id, table.u-rv-t td.c-id {
  position: sticky; left: 0; z-index: 6; background: var(--p);
}
table.u-rv-t th.c-name, table.u-rv-t td.c-name {
  position: sticky; left: var(--u-w-id); z-index: 6; background: var(--p);
  box-shadow: 1px 0 0 var(--u-rule), 6px 0 8px -6px rgba(15, 27, 46, .28);
}
table.u-rv-t th.c-dec, table.u-rv-t td.c-dec {
  position: sticky; right: 0; z-index: 6; background: var(--p);
  box-shadow: -1px 0 0 var(--u-rule), -6px 0 8px -6px rgba(15, 27, 46, .28);
}
table.u-rv-t th.c-id, table.u-rv-t th.c-name, table.u-rv-t th.c-dec { z-index: 9; background: var(--p2); }
table.u-g.u-rv-t tbody td.c-id, table.u-g.u-rv-t tbody td.c-name, table.u-g.u-rv-t thead th.c-id, table.u-g.u-rv-t thead th.c-name { text-align: left; }
table.u-rv-t td.c-id .u-aid { font-size: 11px; }
table.u-rv-t td.c-name { font-weight: 600; }
table.u-rv-t tr.u-wbs td.c-band {
  position: sticky; left: 0; z-index: 6; overflow: hidden;
  background: var(--u-wbs-bg, var(--st));
}
table.u-rv-t tr.u-wbs td.c-band .tw { display: flex; overflow: hidden; }
table.u-rv-t tr.u-wbs td { height: 24px; }
table.u-rv-t .u-cfdot {
  display: inline-grid; place-items: center; width: 14px; height: 14px; margin-left: 5px;
  border-radius: 50%; background: var(--u-crit); color: #fff; font: 800 9px/1 var(--u-mono); font-style: normal;
}
table.u-rv-t .u-dl { display: inline; }
table.u-rv-t .u-dl.new { color: var(--u-ok, #1E8E5E); font-weight: 700; }
table.u-rv-t .u-dl.mv { color: #B26A12; font-weight: 700; }
table.u-rv-t .u-dl.bad { color: var(--u-crit); }
table.u-rv-t .u-slip { margin-left: 5px; padding: 1px 4px; font-size: 9.5px; }

/* status in two letters */
.u-stc { display: inline-flex; align-items: center; gap: 3px; }
.u-stc em { font-style: normal; color: var(--mu); font-size: 10px; }
.u-st {
  display: inline-grid; place-items: center; min-width: 22px; height: 17px; padding: 0 4px;
  border-radius: 4px; font: 800 9.5px/1 var(--u-mono); font-style: normal; letter-spacing: .02em;
  background: rgba(15, 27, 46, .07); color: var(--mu);
}
.u-st.TK_Active { background: rgba(46, 158, 114, .14); color: #1E7E57; }
.u-st.TK_Complete { background: rgba(31, 95, 169, .14); color: var(--u-cmpl); }

/* progress in one line: a hairline bar under the number */
.u-pg1 { position: relative; display: inline-block; min-width: 46px; padding-bottom: 3px; }
.u-pg1 b { font-family: var(--u-mono); font-size: 11px; color: #B26A12; }
.u-pg1 i { position: absolute; left: 0; bottom: 0; height: 2px; border-radius: 1px; background: var(--u-todo); }

/* the decision: three small buttons */
.u-dk { display: flex; gap: 4px; justify-content: center; }
.u-dk button {
  width: 24px; height: 22px; display: inline-grid; place-items: center; padding: 0;
  border: 1px solid var(--sk); border-radius: 6px; background: var(--p); color: var(--mu);
  font-family: inherit; font-weight: 800; font-size: 12px; line-height: 1; cursor: pointer;
}
.u-dk button:hover { border-color: var(--mu); color: var(--st); }
.u-dk .ok.on { background: #2ECB8F; border-color: #2ECB8F; color: #052D20; }
.u-dk .no.on { background: #C6462B; border-color: #C6462B; color: #fff; }
.u-dk .rm svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.u-dk .rm:hover { color: var(--u-crit); border-color: var(--u-crit); }
table.u-rv-t tr.ch.REJECTED td:not(.c-dec) > * { opacity: .45; }
table.u-rv-t tr.ch.REJECTED td { opacity: 1; }
table.u-rv-t tr.ch.REJECTED td.c-name { text-decoration: line-through; color: var(--mu); }
table.u-rv-t tr.ch.EDITED td.c-id { box-shadow: inset 3px 0 0 #B26A12; }

/* editing in the cell */
table.u-rv-t td.u-ed { cursor: text; }
table.u-rv-t td.u-ed:hover { box-shadow: inset 0 0 0 1px var(--u-upd); }
table.u-rv-t td.u-editing { padding: 0 2px; box-shadow: inset 0 0 0 2px var(--u-upd); background: #fff; }
.u-cin {
  width: 100%; height: 24px; box-sizing: border-box; border: 0; outline: 0; background: transparent;
  font: 600 11.5px var(--u-mono); color: var(--st); padding: 0 4px;
}

/* resizing a column */
table.u-rv-t th { position: sticky; }
.u-rz {
  position: absolute; top: 0; right: -3px; width: 7px; height: 100%; z-index: 2;
  cursor: col-resize; touch-action: none;
}
.u-rz::after { content: ''; position: absolute; top: 25%; bottom: 25%; left: 3px; width: 1px; background: transparent; }
th:hover > .u-rz::after, table.u-resizing .u-rz::after { background: var(--u-upd); }
table.u-resizing, table.u-resizing * { cursor: col-resize !important; user-select: none; }

/* WHOLE SCHEDULE — three colours, one meaning each
     slate   an activity this update does not touch (it recedes)
     violet  an activity this update changes — a hue nothing else in the
             app uses, opposite amber, and distinct under colour-blindness
     amber   the baseline, as everywhere */
table.u-rv-t.whole tr.ch.idle td { color: var(--mu); }
table.u-rv-t.whole tr.ch.idle td.c-name { font-weight: 500; }
table.u-rv-t.whole tr.ch.upd td.c-id { box-shadow: inset 3px 0 0 var(--u-upd); }
.u-tlb .ub.uidle { top: 6px; height: 12px; border-radius: 2px; background: var(--u-idle); opacity: .7; z-index: 3; }
.u-tlb .ums.uidle { top: 5px; width: 10px; height: 10px; margin-left: -5px; transform: rotate(45deg); background: var(--u-idle); z-index: 3; }
table.u-rv-t.whole .u-tlb .ub.uaft,
table.u-rv-t.whole .u-tlb .ub.uaft.ucrit,
table.u-rv-t.whole .u-tlb .ub.uaft.ucmpl,
table.u-rv-t.whole .u-tlb.c3 .ums.uaft,
table.u-rv-t.whole .u-tlb.c3 .ums.uaft.ucrit,
table.u-rv-t.whole .u-tlb.c3 .ums.uaft.ucmpl { background: var(--u-upd); }
table.u-rv-t.whole .u-tlb .ubfr { display: none; }
.u-key .uk.uidle { background: var(--u-idle); }
.u-rv-card:has(table.whole) .u-key .uk.uaft { background: var(--u-upd); }

/* one-line rows: the three-track bar fits the row (after / before /
   baseline at 4 / 12 / 20 px) instead of setting a 36px row */
table.u-g.u-rv-t tbody tr.ch td { height: 30px; box-sizing: border-box; }
table.u-rv-t .u-tlb.c3 { height: 28px; }
table.u-rv-t .u-tlb .ub.uaft { top: 4px; height: 7px; }
table.u-rv-t .u-tlb .ub.ubfr { top: 13px; height: 4px; }
table.u-rv-t .u-tlb.c3 .ub.ubl { top: 20px; height: 5px; }
table.u-rv-t .u-tlb.c3 .ums.uaft { top: 2px; }
table.u-rv-t .u-tlb.c3 .ums.ubfr { top: 11px; }
table.u-rv-t .u-tlb.c3 .ums.ubl { top: 18px; }
table.u-rv-t .u-tlb .umoved { top: 10px; }
table.u-rv-t .u-tlb .ub.uidle { top: 6px; height: 10px; }
table.u-rv-t .u-tlb .ums.uidle { top: 6px; width: 9px; height: 9px; margin-left: -4.5px; }

/* narrow screens: the name stops being frozen, the ID and the decision stay */
@media (max-width: 900px) {
  table.u-rv-t th.c-name, table.u-rv-t td.c-name { position: static; box-shadow: none; }
  .u-rv-hint { display: none; }
}

/* Portrait and narrow multi-window tablets: every value remains visible,
   but rows reflow into compact labelled grids rather than clipping dates. */
@container nexora-review (max-width: 820px) {
  .u-review-wrap > .u-review-scroll {
    height: auto;
    min-height: 0;
    max-height: 68dvh;
    overflow: auto;
  }
  .u-review-wrap table.u-g.chg,
  .u-review-wrap table.u-g.chg tbody {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
  }
  .u-review-wrap table.u-g.chg thead { display: none; }
  .u-review-wrap table.u-g.chg tr.u-wbs { display: block; width: 100%; }
  .u-review-wrap table.u-g.chg tr.u-wbs td {
    display: block;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
  }
  .u-review-wrap table.u-g.chg tr.u-wbs .tw {
    display: block;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .u-review-wrap table.u-g.chg tr.ch {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    border-bottom: 5px solid var(--p2);
  }
  .u-review-wrap table.u-g.chg tr.ch > td {
    display: block;
    width: 100%;
    min-width: 0;
    height: auto;
    padding: 6px 7px;
    border-bottom: 1px solid var(--u-rule-lite);
    white-space: normal;
    overflow-wrap: anywhere;
  }
  .u-review-wrap table.u-g.chg tr.ch > td::before {
    content: attr(data-review-label);
    display: block;
    margin-bottom: 4px;
    font-size: 8px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: .025em;
    text-transform: uppercase;
    color: var(--mu);
  }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Activity ID"] { grid-area: 1 / 1 / 2 / 2; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Activity Name"] { grid-area: 1 / 2 / 2 / 4; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Status"] { grid-area: 1 / 4 / 2 / 5; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Actual Start"] { grid-area: 2 / 1 / 3 / 2; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Actual Finish"] { grid-area: 2 / 2 / 3 / 3; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Progress"] { grid-area: 2 / 3 / 3 / 4; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Remaining Duration"] { grid-area: 2 / 4 / 3 / 5; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Forecast Finish"] { grid-area: 3 / 1 / 4 / 2; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Timeline"] { grid-area: 3 / 2 / 4 / 4; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Decision"] { grid-area: 3 / 4 / 4 / 5; }
  .u-review-wrap table.u-g.chg:not(.tl) tr.ch > td[data-review-label="Decision"] { grid-area: 3 / 2 / 4 / 5; }
  .u-review-wrap table.u-g.chg tr.ch > td.u-tl { padding: 6px 7px; }
  .u-review-wrap table.u-g.chg .u-review-mini-axis {
    display: block;
    width: 100%;
    height: 26px;
    margin: 2px 0 1px;
  }
  .u-review-wrap table.u-g.chg .u-review-mini-axis .u-tlh {
    height: 26px;
    width: 100%;
  }
  .u-review-wrap table.u-g.chg .u-tlb { height: 28px; }
  .u-review-wrap table.u-g.chg .u-acts { gap: 4px; }
  .u-review-wrap table.u-g.chg .u-a { min-height: 30px; font-size: 8.5px; }
}
@container nexora-review (max-width: 520px) {
  .u-review-wrap table.u-g.chg tr.ch {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Activity ID"] { grid-area: 1 / 1 / 2 / 2; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Status"] { grid-area: 1 / 2 / 2 / 3; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Activity Name"] { grid-area: 2 / 1 / 3 / 3; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Actual Start"] { grid-area: 3 / 1 / 4 / 2; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Actual Finish"] { grid-area: 3 / 2 / 4 / 3; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Progress"] { grid-area: 4 / 1 / 5 / 2; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Remaining Duration"] { grid-area: 4 / 2 / 5 / 3; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Forecast Finish"] { grid-area: 5 / 1 / 6 / 2; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Decision"] { grid-area: 5 / 2 / 6 / 3; }
  .u-review-wrap table.u-g.chg:not(.tl) tr.ch > td[data-review-label="Decision"] { grid-area: 5 / 2 / 6 / 3; }
  .u-review-wrap table.u-g.chg tr.ch > td[data-review-label="Timeline"] { grid-area: 6 / 1 / 7 / 3; }
}

/* REVIEW FINISHING — tablets: real left-aligned WBS hierarchy, compact
   tabular values, and action-first conflict resolution. No schedule writes. */
.u-review-wrap table.u-g.chg tr.u-wbs td {
  text-align: left !important;
}
.u-review-wrap table.u-g.chg tr.u-wbs td .tw {
  box-sizing: border-box;
  display: block;
  width: 100%;
  max-width: 100%;
  padding-left: calc(11px + var(--u-review-indent, 0px));
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.u-review-wrap table.u-g.chg tr.u-wbs td .tw .c {
  display: inline-block;
  margin-left: 10px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  opacity: .8;
}
.u-review-wrap table.u-g.chg td[data-review-label="Activity Name"] { text-align: left; }
@container nexora-review (max-width: 1230px) {
  .u-review-wrap table.u-g.chg td[data-review-label="Activity ID"] .u-src {
    display: block;
    width: fit-content;
    margin-top: 2px;
  }
  .u-review-wrap table.u-g.chg td[data-review-label="Forecast Finish"] .u-dl {
    max-width: 100%;
  }
  .u-review-wrap table.u-g.chg td[data-review-label="Activity Name"] .u-chip {
    display: inline-block;
    margin-top: 3px;
  }
}
@container nexora-review (max-width: 820px) {
  .u-review-wrap table.u-g.chg tr.u-wbs td .tw {
    display: block;
    width: 100%;
  }
}

/* Conflict review: focus on the values and choice, not a 9px audit paragraph.
   Only these cards are restyled; Detail view still uses its native panels. */
.u-conflict-section {
  container: review-conflicts / inline-size;
  margin: 21px 0 12px;
  min-width: 0;
}
.u-conflict-section .u-conflict-head {
  padding: 0 1px 11px;
  margin: 0;
  align-items: flex-end;
}
.u-conflict-section .u-conflict-head h2 {
  font-size: 17px;
  letter-spacing: -.02em;
}
.u-conflict-section .u-conflict-head .sub {
  font-size: 11.5px;
  line-height: 1.5;
  max-width: 75ch;
}
.u-conflict-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}
.u-conflict-list .u-rev-conflict {
  display: block;
  padding: 14px 16px 12px;
  min-width: 0;
  border: 1px solid var(--sk);
  border-left: 3px solid var(--u-warn);
  border-radius: var(--r2);
  background: var(--p);
  box-shadow: 0 2px 10px rgba(15, 27, 46, .035);
}
.u-conflict-list .u-rev-conflict.REJECTED { opacity: .7; }
.u-conflict-list .u-rev-conflict.ACCEPTED,
.u-conflict-list .u-rev-conflict.EDITED { background: var(--p); }
.u-rev-conflict .u-rev-t { display: flex; align-items: center; gap: 8px; min-width: 0; }
.u-rev-conflict .u-rev-t .u-rev-id {
  flex: none;
  font: 750 11px/1.4 var(--u-mono);
  color: var(--st);
  border: 1px solid var(--sk);
  background: var(--p2);
  border-radius: 5px;
  padding: 3px 7px;
}
.u-rev-conflict .u-rev-t b {
  font-size: 13px;
  line-height: 1.3;
  font-weight: 800;
  min-width: 0;
}
.u-rev-conflict .u-cf {
  display: grid;
  grid-template-columns: minmax(160px, .85fr) minmax(250px, 1.3fr) minmax(230px, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 13px 14px;
  margin: 12px 0 0;
  border: 1px solid var(--sk);
  border-radius: 9px;
  background: var(--p2);
}
.u-rev-conflict .u-cf.done { background: rgba(36, 180, 126, .05); }
.u-rev-conflict .u-cf-head { min-width: 0; }
.u-rev-conflict .u-cf-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 9px;
}
.u-rev-conflict .u-cf-state {
  border-radius: 4px;
  padding: 3px 6px;
  color: var(--u-warn);
  background: rgba(184, 105, 62, .11);
  font-size: 9px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .035em;
  white-space: nowrap;
}
.u-rev-conflict .u-cf.done .u-cf-state {
  background: rgba(36, 180, 126, .12);
  color: var(--u-good);
}
.u-rev-conflict .u-cf-field { color: var(--st); font-size: 12px; }
.u-rev-conflict .u-cf-hint {
  margin: 5px 0 0;
  color: var(--mu);
  font-size: 10px;
  line-height: 1.45;
}
.u-rev-conflict .u-cf-values {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  min-width: 0;
}
.u-rev-conflict .u-cf-value {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 4px;
  padding: 9px 10px;
  border: 1px solid var(--sk);
  background: var(--p);
  border-radius: 7px;
}
.u-rev-conflict .u-cf-value.proposed { border-color: rgba(184, 105, 62, .35); }
.u-rev-conflict .u-cf-value .uk {
  color: var(--mu);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .035em;
  line-height: 1.25;
}
.u-rev-conflict .u-cf-value .v {
  font: 800 12.5px/1.3 var(--u-mono);
  color: var(--st);
  overflow-wrap: anywhere;
}
.u-rev-conflict .u-cf-value.proposed .v { color: var(--u-warn); }
.u-rev-conflict .u-cf-arrow {
  align-self: center;
  text-align: center;
  color: var(--mu);
  font-size: 15px;
}
.u-rev-conflict .u-cf-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
  min-width: 0;
}
.u-rev-conflict .u-cf-actions .u-a {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 34px;
  padding: 6px 9px;
  line-height: 1.15;
  font-size: 10px;
  white-space: nowrap;
}
.u-rev-conflict .u-cf-actions .u-a.ed.on {
  background: var(--st);
  color: var(--p);
  border-color: var(--st);
}
.u-rev-conflict .u-rev-audit {
  margin-top: 10px;
  border-top: 1px solid var(--sk2);
  padding-top: 7px;
}
.u-rev-conflict .u-rev-audit summary {
  width: fit-content;
  padding: 3px 0;
  color: var(--mu);
  font-size: 10.5px;
  font-weight: 750;
  cursor: pointer;
}
.u-rev-conflict .u-rev-audit[open] .u-rev-f { margin-top: 9px; }
.u-rev-conflict .u-rev-audit summary:hover { color: var(--st); }
.u-rev-conflict .u-rev-decisions {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  padding-top: 10px;
  margin-top: 9px;
  border-top: 1px solid var(--sk2);
}
.u-rev-conflict .u-rev-decisions .u-a {
  min-height: 30px;
  padding: 5px 12px;
}

@container review-conflicts (max-width: 980px) {
  .u-rev-conflict .u-cf {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.3fr);
  }
  .u-rev-conflict .u-cf-head { grid-column: 1 / -1; }
  .u-rev-conflict .u-cf-hint { max-width: 75ch; }
  .u-rev-conflict .u-cf-actions { justify-content: flex-start; }
}
@container review-conflicts (max-width: 620px) {
  .u-conflict-list .u-rev-conflict { padding: 12px; }
  .u-rev-conflict .u-cf { grid-template-columns: minmax(0, 1fr); padding: 11px; }
  .u-rev-conflict .u-cf-head,
  .u-rev-conflict .u-cf-values,
  .u-rev-conflict .u-cf-actions { grid-column: 1; }
  .u-rev-conflict .u-cf-actions { justify-content: stretch; }
  .u-rev-conflict .u-cf-actions .u-a { flex: 1 1 30%; }
  .u-rev-conflict .u-rev-t b { flex-basis: 75%; }
  .u-rev-conflict .u-rev-decisions .u-a { flex: 1 1 25%; }
}

/* ── AN ESTIMATED ACTUAL DATE ─────────────────────────────────────────────
   "التواريخ المستنتجة دي تتلف الخلية بلون خفيف كدا مميز مش مشتت"
   A date nobody reported (from the baseline, the latest update, the logic,
   or Auto Update) is tinted - a light wash of the module's own amber, laid
   OVER the cell's background as an image so the row's own colour (zebra,
   selection, critical, dark theme) still shows through, with a dotted
   underline on the date. A reported date stays plain. The staged underline
   (.u-stg, a box-shadow) still draws on top of it. */
#updOut .u-g td.u-est,
.u-g td.u-est {
  background-image: linear-gradient(color-mix(in srgb, var(--u-warn, #c98a2b) 11%, transparent),
                                    color-mix(in srgb, var(--u-warn, #c98a2b) 11%, transparent));
}
#updOut .u-g td.u-est .u-dt,
#updOut .u-g td.u-est b,
.u-g td.u-est .u-dt {
  text-decoration: underline dotted color-mix(in srgb, var(--u-warn, #c98a2b) 70%, transparent);
  text-underline-offset: 3px;
}

/* ── THE SAME FIX FOR EVERY CASE LIKE THIS ONE (update-oos.js sameBar) ── */
.u-oos-same { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--sk); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.u-oos-same .u-oos-sub { flex: 1 1 100%; font-size: 11px; color: var(--mu); }

.u-oos-more { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; margin: 14px 0 6px; }

/* ── DECIDED CASES (update-oos.js): a green line, and the way back ──────── */
.u-oos-case.done { display: flex; align-items: center; gap: 14px; padding: 9px 14px;
  border-left-color: var(--u-good);
  background-image: linear-gradient(color-mix(in srgb, var(--u-good) 8%, transparent), color-mix(in srgb, var(--u-good) 8%, transparent)); }
.u-oos-case.done .u-oos-done-l { flex: 1 1 auto; min-width: 0; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; }
.u-oos-case.done .u-oos-done-l .u-oos-n { grid-column: 2; font-size: 11.5px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-oos-case.done .u-oos-t { margin: 0; }
.u-oos-case.done .u-oos-done-r { display: flex; align-items: center; gap: 6px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
.u-oos-tick { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--u-good); color: #fff; font-size: 12px; font-weight: 800; grid-row: span 2; }
.u-oos-chosen { font-size: 12px; font-weight: 700; color: var(--u-good); padding: 3px 9px; border-radius: 999px;
  background: color-mix(in srgb, var(--u-good) 12%, transparent); }
.u-oos-case.done-open { border-left-color: var(--u-good); }
.u-oos-donebar { display: flex; align-items: center; gap: 8px; margin: -2px 0 8px; padding: 6px 10px; border-radius: 8px; font-size: 12.5px;
  background: color-mix(in srgb, var(--u-good) 10%, transparent); color: var(--st); }
.u-oos-donebar .u-oos-tick { width: 18px; height: 18px; font-size: 10px; }
@media (max-width: 860px) { .u-oos-case.done { flex-direction: column; align-items: stretch; } }

/* the decided count */
.u-oos-prog { display: flex; align-items: center; gap: 12px; margin: 4px 0 12px; }
.u-oos-prog-t { font-size: 12.5px; color: var(--mu); white-space: nowrap; }
.u-oos-prog-t b { color: var(--st); }
.u-oos-prog-b { flex: 1 1 auto; height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--mu) 18%, transparent); overflow: hidden; }
.u-oos-prog-b i { display: block; height: 100%; background: var(--u-good); border-radius: 999px; transition: width .25s; }

/* ── THE SAME FIX, REVIEWED (update-oos.js sameModal) ──────────────────── */
.u-sm { background: var(--p); border: 1px solid var(--sk); border-radius: 14px; width: min(1180px, 96vw); max-height: 88vh;
  display: flex; flex-direction: column; box-shadow: 0 24px 64px -20px rgba(15, 27, 46, .45); overflow: hidden; }
.u-sm-h { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--sk); justify-content: space-between; }
.u-sm-k { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.u-sm-t { font-size: 19px; font-weight: 800; color: var(--st); margin: 3px 0 4px; }
.u-sm-s { font-size: 12.5px; color: var(--mu); }
.u-sm-bar { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--sk); flex-wrap: wrap; }
.u-sm-seg { display: inline-flex; border: 1px solid var(--sk); border-radius: 9px; overflow: hidden; }
.u-sm-seg button { appearance: none; border: 0; background: transparent; padding: 6px 12px; font-size: 12.5px; cursor: pointer; color: var(--st); }
.u-sm-seg button + button { border-left: 1px solid var(--sk); }
.u-sm-seg button.on { background: var(--st); color: var(--p); font-weight: 700; }
.u-sm-sum { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 20px; font-size: 12.5px; color: var(--mu);
  background: color-mix(in srgb, var(--mu) 6%, transparent); border-bottom: 1px solid var(--sk); }
.u-sm-sum b { color: var(--st); }
.u-sm-sum .chg b { color: var(--u-warn); } .u-sm-sum .na { opacity: .8; }
.u-sm-body { overflow: auto; flex: 1 1 auto; }
.u-sm-tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.u-sm-tb th { position: sticky; top: 0; z-index: 1; background: var(--p); text-align: left; font-size: 10px; font-weight: 800;
  letter-spacing: .07em; text-transform: uppercase; color: var(--mu); padding: 8px 10px; border-bottom: 1px solid var(--sk); }
.u-sm-tb td { padding: 9px 10px; border-bottom: 1px solid var(--sk); vertical-align: top; color: var(--st); }
.u-sm-tb td .nm { font-size: 12px; margin-top: 2px; } .u-sm-tb td .st { font-size: 11px; color: var(--mu); margin-top: 2px; }
.u-sm-tb td.rl { white-space: nowrap; } .u-sm-tb td.wh { color: var(--mu); font-size: 11.5px; max-width: 360px; }
.u-sm-tb td.ck { width: 34px; }
.u-sm-tb tr.off td:not(.ck) { opacity: .42; }
.u-sm-tb tr.chg td.nw .u-sm-now { background: color-mix(in srgb, var(--u-warn) 16%, transparent); color: var(--u-warn); }
.u-sm-ck { appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid var(--sk); background: var(--p);
  cursor: pointer; font-size: 12px; font-weight: 800; color: #fff; display: grid; place-items: center; padding: 0; }
.u-sm-ck.on { background: var(--u-good); border-color: var(--u-good); }
.u-sm-now { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  background: color-mix(in srgb, var(--mu) 14%, transparent); color: var(--mu); white-space: nowrap; }
.u-sm-now.same { background: color-mix(in srgb, var(--u-good) 14%, transparent); color: var(--u-good); }
.u-sm-f { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--sk); flex-wrap: wrap; }
@media (max-width: 760px) { .u-sm-tb td.wh { display: none; } .u-sm-tb th:nth-child(5) { display: none; } }

.u-oos-noff { margin-top: 8px; padding: 7px 10px; border-radius: 8px; font-size: 11.5px; line-height: 1.45; color: var(--mu);
  background: color-mix(in srgb, var(--mu) 7%, transparent); }
.u-oos-noff div + div { margin-top: 3px; }

/* ── THE REVIEW WINDOW, DRAWN: one picture per case (update-oos.js) ──────── */
.u-sm-leg { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; padding: 8px 20px; font-size: 11px; color: var(--mu);
  border-bottom: 1px solid var(--sk); }
.u-sm-leg i { display: inline-block; width: 18px; height: 9px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.u-sm-leg i.a { background: var(--u-good); }
.u-sm-leg i.r { background: color-mix(in srgb, var(--u-dd) 35%, transparent); border: 1px solid var(--u-dd); }
.u-sm-leg i.o { height: 0; border-top: 2px dashed var(--u-crit); border-radius: 0; }
.u-sm-leg i.n { height: 0; border-top: 2px solid var(--u-good); border-radius: 0; }
.u-sm-leg i.f { border: 1.5px dashed var(--u-good); background: color-mix(in srgb, var(--u-good) 14%, transparent); }
.u-sm-list { display: flex; flex-direction: column; }
.u-sm-row { display: grid; grid-template-columns: 34px minmax(300px, 460px) minmax(0, 1fr); gap: 14px; align-items: center;
  padding: 12px 20px; border-bottom: 1px solid var(--sk); transition: opacity .15s, background .15s; }
.u-sm-row:hover { background: color-mix(in srgb, var(--mu) 5%, transparent); }
.u-sm-row.off .u-sm-pic, .u-sm-row.off .u-sm-tx { opacity: .35; filter: grayscale(.8); }
.u-sm-row.chg { box-shadow: inset 3px 0 0 var(--u-warn); }
.u-sm-pic .u-oos-svg { max-width: 460px; margin-top: 0; }
.u-sm-pic .u-oos-steps { display: none; }
.u-sm-ids { font-size: 12px; }
.u-sm-nm { font-size: 12.5px; color: var(--st); margin: 3px 0 5px; }
.u-sm-wh { font-size: 11.5px; color: var(--mu); line-height: 1.45; }
.u-sm-nowl { margin-top: 6px; font-size: 11px; color: var(--mu); }
.u-sm-will { color: var(--u-warn); font-weight: 700; }
@media (max-width: 860px) { .u-sm-row { grid-template-columns: 34px 1fr; } .u-sm-tx { grid-column: 1 / -1; } }

/* ── QUIETER TEXT: one line per fix (update-oos.js shortOf) ─────────────── */
.u-oos-opt .sh { display: block; font: 600 11px/1.4 var(--u-mono, ui-monospace, monospace); color: var(--st); margin-top: 2px; }
.u-oos-opt.brief { padding-top: 7px; padding-bottom: 7px; }
.u-oos-opt.brief .k { font-size: 12.5px; }
.u-oos-opt.brief .sh { color: var(--mu); font-weight: 500; }
.u-oos-opt.on .d { margin-top: 5px; }
.u-sm-nm { font-size: 12px; color: var(--mu); margin: 3px 0 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-sm-ef { font: 600 12px/1.4 var(--u-mono, ui-monospace, monospace); color: var(--st); }
.u-sm-ef .u-oos-arrow { color: var(--u-good); }
.u-sm-tx { min-width: 0; }

/* ── A REMOVAL'S REPLACEMENT, ON ITS ROW (update-oos.js proposalFor) ────── */
.u-sm-repl { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 7px; }
.u-sm-rl { font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--mu); }
.u-sm-rp { font: 600 11.5px/1.3 var(--u-mono, ui-monospace, monospace); padding: 3px 8px; border-radius: 6px;
  color: var(--u-good); background: color-mix(in srgb, var(--u-good) 12%, transparent); }
.u-sm-rp.none { color: var(--mu); background: color-mix(in srgb, var(--mu) 12%, transparent); }
.u-sm-rp.miss { color: var(--u-warn); background: color-mix(in srgb, var(--u-warn) 12%, transparent); font-family: inherit; }
.u-sm-src { font-size: 11px; color: var(--mu); font-style: italic; }
.u-sm-sel { max-width: 100%; font-size: 11.5px; padding: 3px 6px; border: 1px solid var(--sk); border-radius: 7px;
  background: var(--p); color: var(--st); margin-left: auto; min-width: 0; }

.u-oos-svg .act.x { fill: var(--u-good); opacity: .85; }
.u-oos-svg .rem.x { fill: color-mix(in srgb, var(--u-good) 16%, transparent); stroke: var(--u-good); stroke-width: .9; stroke-dasharray: 3 2; }

/* ── THE REPLACEMENT, AS CHOICES (update-oos.js sameModal) ──────────────── */
.u-sm-chs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: stretch; }
.u-sm-opt { appearance: none; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 2px;
  min-width: 150px; max-width: 250px; padding: 7px 10px; border-radius: 9px; border: 1.5px solid var(--sk);
  background: var(--p); color: var(--st); transition: border-color .12s, background .12s, box-shadow .12s; }
.u-sm-opt:hover { border-color: var(--u-dd); }
.u-sm-opt .t { font: 700 11.5px/1.3 var(--u-mono, ui-monospace, monospace); }
.u-sm-opt .b { font-size: 11px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.u-sm-opt .f { align-self: flex-start; font-size: 10px; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-top: 2px;
  background: color-mix(in srgb, var(--mu) 12%, transparent); color: var(--mu); }
.u-sm-opt .f.close { background: color-mix(in srgb, var(--u-good) 14%, transparent); color: var(--u-good); }
.u-sm-opt .f.ok { background: color-mix(in srgb, var(--u-dd) 14%, transparent); color: var(--u-dd); }
.u-sm-opt .f.far { background: color-mix(in srgb, var(--u-warn) 14%, transparent); color: var(--u-warn); }
.u-sm-opt .f.push { background: color-mix(in srgb, var(--u-crit) 14%, transparent); color: var(--u-crit); }
.u-sm-opt.on { border-color: var(--u-good); background: color-mix(in srgb, var(--u-good) 9%, var(--p));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--u-good) 25%, transparent); }
.u-sm-opt.on .t::before { content: '✓ '; color: var(--u-good); }
.u-sm-more { align-self: center; font-size: 11.5px; padding: 5px 8px; border: 1px dashed var(--sk); border-radius: 9px;
  background: var(--p); color: var(--mu); max-width: 220px; }
.upd .u-sm-chs select.u-sm-more { height: auto; min-height: 0; line-height: 1.3; padding: 6px 9px; width: auto; flex: 0 0 auto; }

/* the Validation screen's ways out of actuals after the Data Date */
.u-fixes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }

/* styles/tabs/recovery.css */
/* ══════════════════════════════════════════════════════════════════════
   RECOVERY — its own tab (tabs/recovery/*)

   ONE SCREEN HIGH. The workspace is exactly the height recovery.tab.js
   measures into --rc-h: a fixed top bar, a fixed step bar, and a stage the
   steps divide into panes. Panes scroll; the page does not.

   No new palette. The root carries .upd as well as .rcv, so every token of
   styles/tabs/update.css — the pinned status colours, the bar colours, the
   chart paper, the gridlines — and the Update grid's own table rules apply
   here unchanged. The Gantt on this tab IS the Update tab's Gantt.
   ══════════════════════════════════════════════════════════════════════ */

.rcv-host { --rc-h: calc(100vh - 120px); }
.upd.rcv {
  --rc-ink: var(--st);
  --rc-line: var(--sk);
  --rc-soft: var(--p2);
  --rc-paper: #FFFDF9;
  --rc-tg: #7A2E8E;
  --rc-ch: #2F6BD8;
  --u-namew: 220px;
  --u-tlw: clamp(300px, 32vw, 760px);
  height: var(--rc-h);
  display: flex; flex-direction: column; gap: 8px;
  min-height: 520px; overflow: hidden; position: relative;
  font-size: 12px;
}
.upd.rcv * { box-sizing: border-box; }
.rcv .rc-sp { flex: 1 1 auto; }
.rcv .mono, .rcv .rc-aid { font-family: var(--u-mono); }
.rcv .rc-note { font-size: 11px; color: var(--mu); line-height: 1.5; }
.rcv .rc-note.pad { padding: 14px 4px; }
.rcv .rc-note.bad { color: var(--u-crit); font-weight: 600; }

/* ── the top bar ─────────────────────────────────────────────────────── */
.rc-top {
  flex: none; display: flex; align-items: stretch; gap: 0; flex-wrap: nowrap;
  background: linear-gradient(180deg, #13223A, #0F1B2E); color: #E7EEF6;
  border-radius: 12px; padding: 0 10px 0 0; min-height: 54px; overflow: hidden;
  box-shadow: 0 10px 26px -18px rgba(15, 27, 46, .7);
}
.rc-brand { display: flex; flex-direction: column; justify-content: center; padding: 8px 16px;
  background: rgba(255, 255, 255, .06); border-right: 1px solid rgba(255, 255, 255, .08); }
.rc-brand .k { font-size: 9px; font-weight: 800; letter-spacing: .14em; color: #8EACC9; }
.rc-brand .v { font-family: var(--u-mono); font-size: 16px; font-weight: 800; letter-spacing: -.2px; }
.rc-tf { display: flex; flex-direction: column; justify-content: center; padding: 6px 14px;
  border-right: 1px solid rgba(255, 255, 255, .07); min-width: 0; }
.rc-tf .k { font-size: 8.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8EACC9; white-space: nowrap; }
.rc-tf .v { font-size: 13px; font-weight: 700; white-space: nowrap; }
.rc-tf .v em { font-style: normal; font-weight: 500; color: #B8CDE0; margin-left: 5px; font-size: 11.5px; }
.rc-tf.mono .v { font-family: var(--u-mono); }
.rc-tf.bad .v { color: #FF9C84; }
.rc-tf.ok .v { color: #6FE0B4; }
.rc-tf.tg .v { color: #E5B8F0; }
.rc-pill { align-self: center; font-size: 10px; font-weight: 800; letter-spacing: .08em; padding: 6px 12px;
  border-radius: 20px; white-space: nowrap; margin-right: 8px; border: 1px solid transparent; }
.rc-pill.ok { background: rgba(36, 180, 126, .2); border-color: rgba(36, 180, 126, .55); color: #7EF0C3; }
.rc-pill.bad { background: rgba(198, 70, 43, .22); border-color: rgba(255, 140, 110, .5); color: #FFB39E; }
.rc-pill.na { background: rgba(142, 172, 201, .14); border-color: rgba(142, 172, 201, .4); color: #B8CDE0; }
.rc-tb { align-self: center; font-size: 11px; font-weight: 700; padding: 7px 13px; border-radius: 8px; cursor: pointer;
  background: transparent; color: #E7EEF6; border: 1px solid rgba(142, 172, 201, .45); white-space: nowrap; margin-left: 6px; }
.rc-tb:hover { background: rgba(231, 238, 246, .1); }
.rc-sel { font: inherit; font-size: 11.5px; padding: 6px 9px; border-radius: 8px; border: 1px solid var(--sk);
  background: #fff; color: var(--st); min-width: 0; }
.rc-sel.sm { font-size: 11px; padding: 4px 8px; }
.rc-sel.dark { align-self: center; background: rgba(255, 255, 255, .08); color: #E7EEF6; border-color: rgba(142, 172, 201, .4); margin-left: 6px; }
.rc-sel.dark option { color: #0F1B2E; }
.rc-in { font: inherit; font-size: 12px; padding: 7px 9px; border-radius: 8px; border: 1px solid var(--sk); background: #fff; color: var(--st); width: 100%; }
.rc-in.mono { font-family: var(--u-mono); font-size: 11.5px; }
.rc-sel:focus, .rc-in:focus { outline: 2px solid var(--mu); outline-offset: -1px; }
@media (max-width: 1200px) { .rc-tf:nth-of-type(2), .rc-tf:nth-of-type(3) { display: none; } }

/* ── the step bar ────────────────────────────────────────────────────── */
.rc-steps { flex: none; display: flex; align-items: center; gap: 0; background: var(--p); border: 1px solid var(--sk);
  border-radius: 12px; padding: 5px; }
.rc-step { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0;
  background: transparent; border-radius: 9px; cursor: pointer; text-align: left; color: var(--mu); transition: background .15s; }
.rc-step:hover:not([disabled]) { background: var(--p2); }
.rc-step[disabled] { opacity: .45; cursor: not-allowed; }
.rc-step .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px; border: 2px solid var(--sk); color: var(--mu); background: #fff; }
.rc-step .n svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.4; fill: none; }
.rc-step .t { display: flex; flex-direction: column; min-width: 0; }
.rc-step .t b { font-size: 12px; color: var(--st); white-space: nowrap; }
.rc-step .t em { font-style: normal; font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-step.on, .rc-step.on:hover:not([disabled]) { background: var(--st); color: #B8CDE0; }
.rc-step.on .n { background: #fff; color: var(--st); border-color: #fff; }
.rc-step.on .t b { color: #fff; }
.rc-step.done .n { background: var(--u-good); border-color: var(--u-good); color: #fff; }
.rc-stepline { flex: 0 0 18px; height: 2px; background: var(--sk); border-radius: 2px; }

/* ── the stage and its panes ─────────────────────────────────────────── */
.rc-stage { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 8px; position: relative; }
.rc-split { flex: 1 1 auto; min-height: 0; display: grid; gap: 8px; }
.rc-split.setup { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.rc-split.diag { grid-template-columns: 340px minmax(0, 1fr); }
.rc-split.build { grid-template-columns: 360px minmax(0, 1fr); }
.rc-split.cmp { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.rc-split.rev { grid-template-columns: 320px minmax(0, 1fr); }
.rc-split.rev .rc-gpane { --u-namew: 190px; }
.rc-lcol { display: grid; grid-template-rows: minmax(0, 1.05fr) minmax(0, 1fr); gap: 8px; min-height: 0; }
.rc-pane { background: var(--p); border: 1px solid var(--sk); border-radius: 12px; min-height: 0; min-width: 0;
  display: flex; flex-direction: column; overflow: hidden; position: relative;
  box-shadow: 0 1px 2px rgba(15, 27, 46, .04), 0 10px 24px -20px rgba(15, 27, 46, .3); }
.rc-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 10px 12px; overscroll-behavior: contain; }
.rc-form { overflow: auto; padding: 4px 16px 14px; }
.rc-gap { padding: 4px 16px 14px; overflow: auto; }
.rc-ph { display: flex; align-items: baseline; gap: 10px; padding: 11px 12px 7px; flex-wrap: wrap; flex: none; }
.rc-form .rc-ph, .rc-gap .rc-ph { padding-left: 0; padding-right: 0; }
.rc-ph h3 { font-size: 10.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--st); margin: 0; }
.rc-ph span { font-size: 11px; color: var(--mu); }
.rc-ph .rc-segs, .rc-ph .rc-sel { margin-left: auto; }
.rc-ph.sub { padding: 12px 0 6px; }
.rc-foot { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--p);
  border: 1px solid var(--sk); border-radius: 12px; }
.rcv .u-b.lg { font-size: 12px; padding: 8px 16px; }
.rcv .u-b.wide { width: 100%; margin-top: 8px; display: inline-flex; justify-content: center; align-items: center; gap: 7px; }
.rcv .u-b svg { width: 13px; height: 13px; fill: currentColor; }
.rcv .u-b.warnb { border-color: rgba(184, 105, 62, .5); color: var(--u-warn); margin-top: 5px; }

.rc-alert { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px;
  border-radius: 10px; background: rgba(198, 70, 43, .08); border: 1px solid rgba(198, 70, 43, .3); color: var(--u-bad); font-size: 12px; }
.rc-alert.inl { margin-top: 8px; }
.rc-x { flex: none; width: 24px; height: 24px; border-radius: 6px; border: 0; background: transparent; cursor: pointer;
  color: var(--mu); display: inline-flex; align-items: center; justify-content: center; }
.rc-x:hover { background: var(--p2); color: var(--st); }
.rc-x svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2; fill: none; }
.rc-veil { position: absolute; inset: 0; z-index: 40; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; background: rgba(251, 247, 241, .72); backdrop-filter: blur(1.5px); color: var(--st); font-weight: 700; font-size: 12.5px; border-radius: 12px; }
.rc-spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--sk); border-top-color: var(--st); animation: rcspin .8s linear infinite; }
@keyframes rcspin { to { transform: rotate(360deg); } }
.rc-empty { margin: auto; text-align: center; padding: 40px 20px; max-width: 520px; }
.rc-empty .t { font-size: 15px; font-weight: 800; color: var(--st); margin-bottom: 6px; }
.rc-empty .s { font-size: 12px; color: var(--mu); line-height: 1.6; margin-bottom: 14px; }
.rc-empty.sm { padding: 24px 12px; }
.rc-empty.sm .t { font-size: 13px; }

/* ── controls ────────────────────────────────────────────────────────── */
.rc-segs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--p2); border: 1px solid var(--sk); flex-wrap: nowrap; }
.rc-segs.wrap { flex-wrap: wrap; }
.rc-segs.sm .rc-seg { font-size: 11px; padding: 4px 10px; }
.rc-seg { font: inherit; font-size: 11.5px; font-weight: 700; padding: 6px 12px; border-radius: 7px; border: 0; background: transparent;
  color: var(--mu); cursor: pointer; white-space: nowrap; }
.rc-seg:hover { color: var(--st); }
.rc-seg.on { background: #fff; color: var(--st); box-shadow: 0 1px 3px rgba(15, 27, 46, .15); }
.rc-lbl { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--mu); margin-bottom: 4px; }
.rc-fld { display: block; margin-top: 10px; }
.rc-ro { padding: 7px 10px; border-radius: 8px; background: var(--p2); border: 1px dashed var(--sk); color: var(--st); display: inline-block; margin-left: 8px; }
.rc-fld .rc-segs + .rc-in, .rc-fld .rc-segs + .rc-ro { margin-top: 0; }
.rc-fld .rc-in[type="date"] { width: auto; margin-left: 8px; }
.rc-aid { font-size: 10.5px; font-weight: 700; color: var(--mu); background: none; border: 0; padding: 0 2px; cursor: pointer; }
button.rc-aid:hover { color: var(--st); text-decoration: underline; }
.rc-aid.big { font-size: 12px; color: var(--st); }
.rc-aid.good { color: var(--u-good); } .rc-aid.bad { color: var(--u-crit); } .rc-aid.warn { color: var(--u-warn); }
.rc-tag { display: inline-block; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 7px;
  border-radius: 10px; background: var(--p2); color: var(--mu); white-space: nowrap; }
.rc-tag.ok { background: rgba(36, 180, 126, .14); color: var(--u-good); }
.rc-tag.bad { background: rgba(198, 70, 43, .12); color: var(--u-crit); }
.rc-ic { display: inline-flex; width: 18px; height: 18px; border-radius: 50%; flex: none; align-items: center; justify-content: center;
  background: var(--p2); color: var(--mu); }
.rc-ic svg { width: 11px; height: 11px; stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; }
.rc-ic.ok { background: rgba(36, 180, 126, .16); color: var(--u-good); }
.rc-ic.warn { background: rgba(184, 105, 62, .18); color: var(--u-warn); }
.rc-ic.error { background: rgba(198, 70, 43, .16); color: var(--u-crit); }

/* ── 1 source & target ───────────────────────────────────────────────── */
.rc-srcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.rc-srcc { text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--sk); background: #fff; color: var(--st); transition: border-color .15s, box-shadow .15s; }
.rc-srcc:hover:not([disabled]) { border-color: var(--mu); }
.rc-srcc[disabled] { cursor: default; opacity: .6; }
.rc-srcc.on { border-color: var(--st); box-shadow: inset 0 0 0 1px var(--st); opacity: 1; }
.rc-srcc .id { font-family: var(--u-mono); font-weight: 800; font-size: 13px; }
.rc-srcc .id em { font-family: inherit; font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--u-good); margin-left: 7px; }
.rc-srcc .l { font-size: 11px; color: var(--mu); }
.rc-srcc .m { font-size: 11px; font-family: var(--u-mono); }
.rc-srcc .m b { font-family: 'DM Sans', system-ui, sans-serif; font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--mu); margin-right: 5px; }
.rc-trts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-trt { text-align: left; display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--sk); background: #fff; }
.rc-trt:hover { border-color: var(--mu); }
.rc-trt.on { border-color: var(--st); box-shadow: inset 0 0 0 1px var(--st); }
.rc-trt.warn.on { border-color: var(--u-crit); box-shadow: inset 0 0 0 1px var(--u-crit); }
.rc-trt .k { font-weight: 800; font-size: 12px; color: var(--st); }
.rc-trt .k em { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--u-good); margin-left: 7px; }
.rc-trt .k em.w { color: var(--u-crit); }
.rc-trt .d { font-size: 10.8px; color: var(--mu); line-height: 1.45; }
.rc-big { display: flex; flex-direction: column; align-items: flex-start; padding: 14px 16px; border-radius: 12px; margin-bottom: 8px; border: 1px solid var(--sk); }
.rc-big .n { font-size: 44px; font-weight: 800; letter-spacing: -1.5px; line-height: 1; font-variant-numeric: tabular-nums; }
.rc-big .u { font-size: 13px; font-weight: 700; color: var(--st); margin-top: 4px; }
.rc-big .s { font-size: 11px; color: var(--mu); margin-top: 2px; }
.rc-big.bad { background: linear-gradient(100deg, rgba(198, 70, 43, .09), transparent 70%); border-color: rgba(198, 70, 43, .3); }
.rc-big.bad .n { color: var(--u-crit); }
.rc-big.ok { background: linear-gradient(100deg, rgba(36, 180, 126, .1), transparent 70%); border-color: rgba(36, 180, 126, .35); }
.rc-big.ok .n { color: var(--u-good); }
.rc-big.na { font-weight: 700; color: var(--mu); }
.rc-track { position: relative; height: 86px; margin: 6px 0 12px; }
.rc-trk { position: absolute; left: 4%; right: 4%; top: 40px; height: 6px; border-radius: 3px; background: var(--sk); }
.rc-trk.gap { right: auto; background: repeating-linear-gradient(45deg, var(--u-crit), var(--u-crit) 5px, #E07A5F 5px, #E07A5F 10px); }
.rc-mk { position: absolute; top: 0; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; width: 110px; }
.rc-mk::after { content: ''; position: absolute; top: 34px; width: 3px; height: 18px; border-radius: 2px; background: var(--mu); }
.rc-mk .l { font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--mu); }
.rc-mk .d { font-family: var(--u-mono); font-size: 11.5px; font-weight: 700; color: var(--st); }
.rc-mk.dd::after { background: var(--u-dd); } .rc-mk.dd .l { color: var(--u-dd); }
.rc-mk.tg::after { background: var(--rc-tg); } .rc-mk.tg .l { color: var(--rc-tg); }
.rc-mk.fc::after { background: var(--u-crit); } .rc-mk.fc .l { color: var(--u-crit); }
.rc-mk.tg { top: 52px; } .rc-mk.tg::after { top: -12px; }
.rc-kv3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--sk2); border: 1px solid var(--sk2); border-radius: 10px; overflow: hidden; margin: 6px 0 10px; }
.rc-kvc { background: #fff; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-kvc .k { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.rc-kvc .v { font-family: var(--u-mono); font-size: 12px; font-weight: 700; color: var(--st); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── 2 diagnose ──────────────────────────────────────────────────────── */
.rc-dxl .rc-ready { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 10px 12px 0; }
.rc-tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center;
  padding: 8px 10px; border-radius: 10px; border: 1px solid var(--sk); background: #fff; }
.rc-tile .rc-ic { grid-row: 1 / 3; }
.rc-tile .k { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.rc-tile .v { font-size: 12.5px; font-weight: 800; color: var(--st); }
.rc-tile.bad { border-color: rgba(198, 70, 43, .35); background: rgba(198, 70, 43, .04); }
.rc-tile.warn { border-color: rgba(184, 105, 62, .35); }
.rc-dx { border: 1px solid var(--sk2); border-radius: 9px; margin-bottom: 5px; background: #fff; overflow: hidden; }
.rc-dx.error { border-color: rgba(198, 70, 43, .35); }
.rc-dxh { width: 100%; display: flex; align-items: center; gap: 8px; padding: 7px 9px; background: transparent; border: 0; cursor: pointer; text-align: left; }
.rc-dxh[disabled] { cursor: default; }
.rc-dxh .k { flex: 1; font-size: 11.5px; font-weight: 700; color: var(--st); }
.rc-dxh .n { font-family: var(--u-mono); font-weight: 800; color: var(--st); font-size: 11.5px; }
.rc-dx.ok .rc-dxh .k, .rc-dx.ok .rc-dxh .n { color: var(--mu); font-weight: 600; }
.rc-dxb { padding: 0 10px 9px 36px; }
.rc-dxb .ids { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; }
.rc-rbban { display: flex; align-items: center; gap: 8px; padding: 8px 12px; margin: 0 0 8px; border-radius: 8px; background: rgba(47, 107, 216, .07); border: 1px solid rgba(47, 107, 216, .22); font-size: 12.5px; }
.rc-dxfix { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 7px; }
.rc-dxend { margin-top: 6px; font-size: 11.5px; color: var(--u-mut, #667085); }
/* the activities of the check that is open, lit in the Gantt beside it.
   The tint is a layer ON the solid background (update.css: a frozen column
   has to be opaque), and the timeline cell keeps its own grid. */
.rcv table.u-g tr.rc-hi td:not(.u-tl) { background-color: var(--p); background-image: linear-gradient(rgba(245, 158, 11, .14), rgba(245, 158, 11, .14)) !important; }
.rcv table.u-g tr.rc-hi td.stk { background-color: var(--p) !important; box-shadow: inset 3px 0 0 #f59e0b, 6px 0 10px -10px rgba(15, 27, 46, .55); }
.rcv table.u-g tr.rc-hi.sel td.stk { background-image: linear-gradient(rgba(245, 158, 11, .26), rgba(245, 158, 11, .26)) !important; }
.rc-types { display: flex; flex-wrap: wrap; gap: 5px; }
.rc-types span { font-size: 11px; padding: 3px 8px; border-radius: 12px; background: var(--p2); color: var(--st); }
.rc-fcr { width: 100%; display: grid; grid-template-columns: 70px 1fr auto; gap: 8px; align-items: center; padding: 5px 6px; border: 0; background: transparent;
  border-bottom: 1px dashed var(--sk2); cursor: pointer; text-align: left; font-size: 11px; }
.rc-fcr:hover { background: var(--p2); }
.rc-fcr .nm { color: var(--st); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-fcr .tf { font-family: var(--u-mono); font-weight: 800; color: var(--st); }
.rc-fcr .tf.bad { color: var(--u-crit); } .rc-fcr .tf.crit { color: var(--u-warn); }

/* ── the Gantt pane — the Update grid, fitted to its pane ────────────── */
.rc-gpane { position: relative; }
.rc-gbar { flex: none; display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--sk); background: var(--p2); }
.rc-gwrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
.rcv .u-gscroll.rc-gscroll { height: auto; flex: 1 1 auto; min-height: 0; }
.rcv table.u-g th.g.rc-srch { color: var(--u-prev); border-bottom: 2px solid var(--u-prev); }
.rcv table.u-g th.g.rc-rech { color: var(--u-good); border-bottom: 2px solid var(--u-good); }
.rcv table.u-g td.rc-src .u-dt { color: var(--u-prev); }
.rcv table.u-g tr.rc-path td.stk { box-shadow: inset 3px 0 0 var(--u-crit); }
.rcv .rc-sh { font-family: var(--u-mono); font-weight: 800; font-size: 10px; color: var(--mu); }
.rcv .rc-sh.good { color: var(--u-good); } .rcv .rc-sh.bad { color: var(--u-crit); }
/* the source bar: the Update tab's "previous" layer, drawn solid enough to compare against */
.rcv .u-tlb .ub.uprev { height: 5px; opacity: 1; background: var(--u-prev); }
/* the target: a dashed purple line down the chart, beside the Data Date */
.rcv table.u-g td.rc-tl::before {
  content: ''; position: absolute; top: 0; bottom: -1px; left: var(--tg, -10px); width: 0; z-index: 5; pointer-events: none;
  border-left: 2px dashed var(--rc-tg);
}
.rcv table.u-g td.rc-tl:not([style*="--tg"])::before { display: none; }
.rcv .rc-tgm { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--rc-tg); }
.rcv .rc-tgm::after { content: 'Target'; position: absolute; top: 1px; left: 3px; font-size: 8px; font-weight: 800; letter-spacing: .04em;
  color: #fff; background: var(--rc-tg); padding: 0 4px; border-radius: 2px; text-transform: uppercase; }
.rcv .u-lgd i.uk.rc-tgk { background: none; border-left: 2px dashed var(--rc-tg); width: 2px !important; }
.rcv .rc-flag { font-size: 8px; font-weight: 900; min-width: 14px; height: 14px; padding: 0 3px; border-radius: 7px; display: inline-flex;
  align-items: center; justify-content: center; color: #fff; flex: none; margin-left: 3px; font-style: normal; }
.rcv .rc-flag.ch { background: var(--rc-ch); }
.rcv .rc-flag.add { background: var(--u-cmpl); }
.rcv .rc-flag.nc { background: var(--u-crit); }
.rcv .rc-flag.dp { background: transparent; color: var(--u-crit); border: 1px solid var(--u-crit); }
.rcv table.u-g { min-width: 0; }

/* the activity drawer, inside the Gantt pane */
.rc-drawer { position: absolute; top: 44px; right: 8px; bottom: 8px; width: min(360px, calc(100% - 16px)); z-index: 30;
  background: #fff; border: 1px solid var(--sk); border-radius: 12px; display: flex; flex-direction: column;
  box-shadow: 0 24px 60px -22px rgba(15, 27, 46, .5); }
.rc-dh { display: flex; justify-content: space-between; gap: 10px; padding: 11px 12px; border-bottom: 1px solid var(--sk); background: var(--p2); border-radius: 12px 12px 0 0; }
.rc-dh .nm { font-size: 13px; font-weight: 800; color: var(--st); margin-top: 2px; line-height: 1.35; }
.rc-dh .st { font-size: 11px; color: var(--mu); margin-top: 2px; }
.rc-dh .st b.crit { color: var(--u-crit); }
.rc-db { padding: 10px 12px 12px; overflow: auto; flex: 1; }
.rc-dgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--sk2); border: 1px solid var(--sk2); border-radius: 9px; overflow: hidden; }
.rc-dgrid .rc-kvc .v s { color: var(--mu); font-weight: 500; }
.rc-dgrid .rc-kvc .v b { color: var(--u-good); }
.rc-dsec { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.rc-dsec > .rc-lbl { width: 100%; margin-bottom: 0; }
.rc-rel { display: inline-flex; gap: 6px; align-items: center; padding: 3px 8px; border-radius: 12px; border: 1px solid var(--sk); background: #fff;
  font-size: 10.5px; cursor: pointer; color: var(--st); font-family: var(--u-mono); }
.rc-rel:hover { border-color: var(--mu); }
.rc-chg { width: 100%; border: 1px solid var(--sk); border-left: 3px solid var(--rc-ch); border-radius: 8px; padding: 8px 10px; font-size: 11px; }
.rc-chg .t { font-weight: 800; color: var(--st); }
.rc-chg .v { color: var(--st); margin-top: 2px; }
.rc-chg .i { margin-top: 3px; } .rc-chg .i b { color: var(--u-good); }
.rc-chg .r { margin-top: 3px; color: var(--mu); line-height: 1.45; }
.rc-dq { display: flex; gap: 6px; margin-top: 4px; }

/* ── 3 build ─────────────────────────────────────────────────────────── */
.rc-scnbar { flex: none; display: flex; align-items: center; gap: 6px; padding: 6px; background: var(--p); border: 1px solid var(--sk); border-radius: 12px; overflow-x: auto; }
.rc-scn { flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 9px; border: 1px solid var(--sk);
  background: #fff; cursor: pointer; text-align: left; }
.rc-scn:hover { border-color: var(--mu); }
.rc-scn.on { border-color: var(--st); box-shadow: inset 0 0 0 1px var(--st); background: #fff; }
.rc-scn.acc { border-style: dashed; }
.rc-scn .n { width: 24px; height: 24px; border-radius: 7px; background: var(--p2); color: var(--st); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.rc-scn.on .n { background: var(--st); color: #fff; }
.rc-scn .t { display: flex; flex-direction: column; }
.rc-scn .t b { font-size: 11.5px; color: var(--st); white-space: nowrap; }
.rc-scn .t em { font-style: normal; font-size: 10.5px; color: var(--mu); font-family: var(--u-mono); white-space: nowrap; }
.rc-scn .t em.ok { color: var(--u-good); } .rc-scn .t em.bad { color: var(--u-crit); }
.rc-scnadd { flex: none; }
.rc-res { flex: none; display: flex; align-items: center; gap: 0; border-radius: 9px; border: 1px solid var(--sk); overflow: hidden; }
.rc-res.na { padding: 8px 12px; color: var(--mu); font-weight: 700; }
.rc-res .c, .rc-final .c { display: flex; flex-direction: column; padding: 4px 12px; border-right: 1px solid var(--sk2); }
.rc-res .c em, .rc-final .c em { font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.rc-res .c b, .rc-final .c b { font-family: var(--u-mono); font-size: 12.5px; color: var(--st); white-space: nowrap; }
.rc-rp { align-self: stretch; display: inline-flex; align-items: center; padding: 0 14px; font-weight: 800; font-size: 11px; letter-spacing: .06em; color: #fff; }
.rc-res.ok .rc-rp, .rc-final.ok .rc-rp { background: var(--u-good); }
.rc-res.bad .rc-rp, .rc-final.bad .rc-rp { background: var(--u-crit); }
.rc-res.ok { border-color: rgba(36, 180, 126, .5); } .rc-res.bad { border-color: rgba(198, 70, 43, .45); }

.rc-ttabs, .rc-ltabs { flex: none; display: flex; gap: 0; border-bottom: 1px solid var(--sk); background: var(--p2); padding: 0 6px; overflow-x: auto; }
.rc-ttabs button, .rc-ltabs button { font: inherit; font-size: 11.5px; font-weight: 700; color: var(--mu); background: none; border: 0; cursor: pointer;
  padding: 9px 10px 8px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.rc-ttabs button:hover, .rc-ltabs button:hover { color: var(--st); }
.rc-ttabs button.on, .rc-ltabs button.on { color: var(--st); border-bottom-color: var(--st); background: var(--p); border-radius: 7px 7px 0 0; }
.rc-ttabs { display: grid; grid-template-columns: repeat(5, auto); justify-content: start; padding: 0 4px; }
.rc-ttabs button { font-size: 11.5px; padding: 9px 11px 8px; }
.rc-ttabs button.auto svg { width: 12px; height: 12px; fill: var(--u-warn); }
.rc-ltabs button b { font-size: 10px; padding: 1px 6px; border-radius: 10px; background: rgba(15, 27, 46, .08); }
.rc-ltabs button b.bad { background: rgba(198, 70, 43, .15); color: var(--u-crit); }
.rc-ltabs button b.warn { background: rgba(184, 105, 62, .15); color: var(--u-warn); }
.rc-ltabs button b.ok { background: rgba(36, 180, 126, .15); color: var(--u-good); }

.rc-auto .u-b.wide { margin: 0 0 8px; }
.rc-autoh { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: linear-gradient(100deg, rgba(198, 70, 43, .08), transparent);
  border: 1px solid rgba(198, 70, 43, .25); margin-bottom: 8px; }
.rc-autoh .n { font-size: 30px; font-weight: 800; color: var(--u-crit); line-height: 1; font-variant-numeric: tabular-nums; }
.rc-autoh .n em { font-style: normal; font-size: 12px; margin-left: 2px; }
.rc-autoh .t { font-size: 12px; color: var(--st); }
.rc-chks { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
.rc-chk { display: flex; gap: 9px; align-items: flex-start; text-align: left; padding: 7px 9px; border-radius: 9px; border: 1px solid var(--sk); background: #fff; cursor: pointer; }
.rc-chk i { flex: none; width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--sk); margin-top: 1px; }
.rc-chk.on i { background: var(--st); border-color: var(--st); box-shadow: inset 0 0 0 2px #fff; }
.rc-chk span { display: flex; flex-direction: column; }
.rc-chk b { font-size: 11.5px; color: var(--st); }
.rc-chk em { font-style: normal; font-size: 10.5px; color: var(--mu); }
.rc-autor { margin-top: 10px; border-radius: 10px; border: 1px solid var(--sk); padding: 9px 10px; background: #fff; }
.rc-autor.ok { border-color: rgba(36, 180, 126, .45); background: rgba(36, 180, 126, .05); }
.rc-autor.bad { border-color: rgba(198, 70, 43, .35); background: rgba(198, 70, 43, .04); }
.rc-autor .h { font-weight: 800; color: var(--st); font-size: 12px; margin-bottom: 3px; }
.rc-steplog { margin: 8px 0 0; padding: 0; list-style: none; counter-reset: s; }
.rc-steplog li { counter-increment: s; display: grid; grid-template-columns: 18px 1fr auto; column-gap: 6px; font-size: 10.8px; padding: 4px 0; border-top: 1px dashed var(--sk2); align-items: baseline; }
.rc-steplog li::before { content: counter(s); grid-row: 1 / 3; font-weight: 800; color: var(--mu); font-family: var(--u-mono); }
.rc-steplog .tier { font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mu); grid-column: 2; }
.rc-steplog .lbl { grid-column: 2; font-family: var(--u-mono); color: var(--st); }
.rc-steplog .d { grid-column: 3; grid-row: 1; color: var(--u-good); font-weight: 800; font-family: var(--u-mono); }
.rc-steplog .f { grid-column: 3; grid-row: 2; color: var(--mu); font-family: var(--u-mono); }

.rc-cand, .rc-act { border: 1px solid var(--sk); border-radius: 9px; background: #fff; padding: 8px 10px; margin-top: 7px; font-size: 11px; }
.rc-cand.in { opacity: .6; }
.rc-cand .r1, .rc-act .r1 { display: flex; align-items: center; gap: 6px; }
.rc-cand .kind, .rc-act .kind { font-weight: 800; color: var(--st); }
.rc-cand .imp, .rc-act .imp { margin-left: auto; font-family: var(--u-mono); font-weight: 800; color: var(--mu); }
.rc-cand .imp.good, .rc-act .imp.good { color: var(--u-good); }
.rc-cand .r2, .rc-act .r2 { margin-top: 3px; color: var(--st); font-size: 10.5px; }
.rc-cand .r3, .rc-act .r3 { margin-top: 3px; color: var(--mu); line-height: 1.45; }
.rc-act .r3 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.rc-cand .r4, .rc-act .r4 { margin-top: 3px; font-size: 10.5px; color: var(--u-ai); }
.rc-cand .r4.warn { color: var(--u-warn); font-weight: 700; }
.rc-act .r4.ok { color: var(--u-good); font-weight: 700; display: flex; align-items: center; gap: 4px; }
.rc-act .r4.ok svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.4; fill: none; }
.rc-cand .r5 { margin-top: 6px; display: flex; justify-content: flex-end; }
.rc-act { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; align-items: start; }
.rc-act .tg { padding-top: 2px; }
.rc-act.off { opacity: .5; }
.rc-act.rej { border-color: rgba(198, 70, 43, .4); background: rgba(198, 70, 43, .03); }
.rc-act .r3.bad { color: var(--u-crit); -webkit-line-clamp: unset; }
.rc-act .src { font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 1px 5px; border-radius: 4px; border: 1px solid var(--sk); color: var(--mu); }
.rc-act .src.ai { color: var(--u-ai); border-color: rgba(109, 91, 168, .45); }
.rc-act .src.engine { color: var(--u-dd); border-color: rgba(47, 107, 216, .4); }
.rc-trl { font-size: 11px; color: var(--st); padding: 7px 9px; border-radius: 8px; background: var(--p2); }
.rc-trl.warn { color: var(--u-warn); }
.rc-vc { display: flex; gap: 9px; padding: 8px 2px; border-bottom: 1px dashed var(--sk2); font-size: 11px; }
.rc-vc .k { font-weight: 700; color: var(--st); }
.rc-vc .k b { font-family: var(--u-mono); margin-left: 4px; }
.rc-vc .d { color: var(--mu); margin-top: 2px; line-height: 1.45; }
.rc-vc .ids { display: flex; flex-wrap: wrap; gap: 3px 8px; margin-top: 4px; }
.rc-vc.error .k b { color: var(--u-crit); } .rc-vc.warn .k b { color: var(--u-warn); }
.rc-manual .rc-mgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.rc-aid-diag { margin-top: 10px; border-left: 3px solid var(--u-ai); background: rgba(109, 91, 168, .06); padding: 8px 10px; border-radius: 0 8px 8px 0; font-size: 11px; }
.rc-aid-diag ul { margin: 4px 0 0 16px; padding: 0; line-height: 1.5; }
.rc-inv { margin-top: 10px; font-size: 11px; color: var(--mu); }
.rc-inv summary { cursor: pointer; font-weight: 700; }
.rc-inv ul { margin: 5px 0 0 16px; padding: 0; line-height: 1.55; }

/* ── 4 compare ───────────────────────────────────────────────────────── */
.rc-cards { flex: none; display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.rc-card { flex: 0 0 250px; text-align: left; display: flex; flex-direction: column; gap: 6px; padding: 11px 12px; border-radius: 12px;
  border: 1px solid var(--sk); background: var(--p); cursor: pointer; border-top: 4px solid var(--sk); }
.rc-card:hover { border-color: var(--mu); }
.rc-card.ok { border-top-color: var(--u-good); } .rc-card.bad { border-top-color: var(--u-crit); }
.rc-card.on { box-shadow: 0 0 0 2px var(--st); }
.rc-card.na { cursor: default; }
.rc-card .h { display: flex; align-items: center; gap: 7px; }
.rc-card .h .n { width: 22px; height: 22px; border-radius: 6px; background: var(--st); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.rc-card .h b { font-size: 12px; color: var(--st); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-card .big { display: flex; align-items: baseline; gap: 8px; }
.rc-card .big span { font-family: var(--u-mono); font-size: 19px; font-weight: 800; color: var(--st); }
.rc-card .big em { font-style: normal; font-size: 11px; font-weight: 800; }
.rc-card .big em.ok { color: var(--u-good); } .rc-card .big em.bad { color: var(--u-crit); }
.rc-card .mini { position: relative; height: 16px; margin: 2px 4px; }
.rc-card .mini::before { content: ''; position: absolute; left: 0; right: 0; top: 7px; height: 2px; background: var(--sk); }
.rc-card .mini .bar { position: absolute; top: 5px; height: 6px; background: var(--u-good); border-radius: 3px; opacity: .45; }
.rc-card .mini i { position: absolute; top: 0; width: 3px; height: 16px; border-radius: 2px; margin-left: -1.5px; }
.rc-card .mini i.src { background: var(--u-prev); } .rc-card .mini i.tg { background: var(--rc-tg); } .rc-card .mini i.rc { background: var(--st); }
.rc-card .facts { display: flex; gap: 10px; font-size: 11px; color: var(--st); font-family: var(--u-mono); font-weight: 700; }
.rc-card .facts em { display: block; font-family: 'DM Sans', system-ui, sans-serif; font-style: normal; font-size: 8.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--mu); }
table.rc-cmp { width: 100%; border-collapse: collapse; font-size: 11.5px; }
table.rc-cmp th, table.rc-cmp td { padding: 7px 9px; border-bottom: 1px solid var(--sk2); text-align: left; }
table.rc-cmp thead th { font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); position: sticky; top: -10px; background: var(--p); }
table.rc-cmp tbody th { font-weight: 700; color: var(--st); white-space: nowrap; width: 150px; }
table.rc-cmp td { color: var(--st); font-family: var(--u-mono); font-size: 11px; }
table.rc-cmp .on { background: rgba(15, 27, 46, .045); }
.rc-wf { width: 100%; height: auto; max-height: 300px; display: block; }
.rc-wf rect { fill: var(--mu); }
.rc-wf rect.tot, .rc-wf rect.fin { fill: var(--u-crit); }
.rc-wf rect.fin.ok { fill: var(--u-ok); }
.rc-wf rect.down { fill: var(--u-good); }
.rc-wf rect.up { fill: var(--u-warn); }
.rc-wf line.z { stroke: var(--rc-tg); stroke-width: 1.5; stroke-dasharray: 5 4; }
.rc-wf text { font-family: var(--u-mono); fill: var(--st); text-anchor: middle; }
.rc-wf text.v { font-size: 12px; font-weight: 800; }
.rc-wf text.l { font-size: 10.5px; fill: var(--mu); font-family: 'DM Sans', system-ui, sans-serif; font-weight: 700; }
.rc-wf text.zl { font-size: 9px; fill: var(--rc-tg); text-anchor: end; font-weight: 800; }
.rc-contrib { display: flex; flex-direction: column; gap: 7px; }
.rc-cb { display: grid; grid-template-columns: 150px 1fr 60px; gap: 10px; align-items: center; font-size: 11px; }
.rc-cb .l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--mu); }
.rc-cb .l b { font-family: var(--u-mono); color: var(--st); }
.rc-cb .b { height: 10px; background: var(--p2); border-radius: 5px; overflow: hidden; }
.rc-cb .b i { display: block; height: 100%; border-radius: 5px; }
.rc-cb .b i.good { background: var(--u-good); } .rc-cb .b i.bad { background: var(--u-warn); }
.rc-cb .v { text-align: right; font-family: var(--u-mono); font-weight: 800; color: var(--st); }
.rc-cpc { display: flex; flex-direction: column; gap: 12px; }
.rc-cpc .g .k { display: block; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); margin-bottom: 4px; }
.rc-cpc .g .k.good { color: var(--u-good); } .rc-cpc .g .k.bad { color: var(--u-crit); } .rc-cpc .g .k.warn { color: var(--u-warn); }
.rc-cpc .g > div { display: flex; flex-wrap: wrap; gap: 4px 9px; }

/* ── 5 revised ───────────────────────────────────────────────────────── */
.rc-final { display: flex; align-items: stretch; margin: 0 12px; border: 1px solid var(--sk); border-radius: 10px; overflow: hidden; flex: none; }
.rc-final.mini { margin: 10px 0 0; }
.rc-final.ok { border-color: rgba(36, 180, 126, .5); } .rc-final.bad { border-color: rgba(198, 70, 43, .45); }
.rc-final .c { padding: 8px 14px; }
.rc-final .rc-rp { margin-left: auto; }
.rc-gate { flex: none; padding: 10px 12px 12px; border-top: 1px solid var(--sk); }
.rc-rev { border: 1px solid var(--sk); border-radius: 10px; background: #fff; padding: 10px 12px; margin-bottom: 8px; }
.rc-rev .h { display: flex; align-items: center; gap: 8px; }
.rc-rev .h .id { font-family: var(--u-mono); font-weight: 800; color: #fff; background: var(--st); padding: 2px 7px; border-radius: 6px; font-size: 11px; }
.rc-rev .h b { flex: 1; font-size: 12px; color: var(--st); }
.rc-rev .acts { display: flex; align-items: center; gap: 10px; }

@media (max-width: 1100px) {
  .rc-split.setup, .rc-split.cmp { grid-template-columns: 1fr; overflow: auto; }
  .rc-split.rev { grid-template-columns: 280px minmax(0, 1fr); }
  .rc-split.build { grid-template-columns: 320px minmax(0, 1fr); }
  .rc-split.diag { grid-template-columns: 280px minmax(0, 1fr); }
}

/* ── P6-style editing: the bars, the detail, the Manual table ────────── */
.rcv .rc-hint { font-size: 10.5px; color: var(--mu); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rcv table.u-g.rc-edit .u-tlb { overflow: visible; }
.rcv .rc-grip { position: absolute; top: 50%; width: 12px; height: 16px; margin: -8px 0 0 -6px; z-index: 6; cursor: ew-resize;
  border-radius: 3px; touch-action: none; }
.rcv .rc-grip::after { content: ''; position: absolute; left: 5px; top: 2px; bottom: 2px; width: 2px; border-radius: 1px; background: var(--rc-ch); opacity: 0; }
.rcv tr:hover .rc-grip::after, .rcv tr.sel .rc-grip::after { opacity: .9; }
.rcv .rc-grip.on { background: rgba(47, 107, 216, .14); }
.rcv .rc-grip.on::after { opacity: 1; top: -4px; bottom: -4px; }
.rcv table.u-g tr.rc-drop td { background: rgba(47, 107, 216, .1) !important; box-shadow: inset 0 1px 0 var(--rc-ch), inset 0 -1px 0 var(--rc-ch); }
.rc-dragtip { position: fixed; z-index: 9999; pointer-events: none; padding: 4px 8px; border-radius: 6px; background: #13223A; color: #fff;
  font: 700 11px/1.3 var(--u-mono, ui-monospace, monospace); white-space: nowrap; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .5); }

.rc-ded .rc-dur { display: flex; align-items: center; gap: 6px; width: 100%; }
.rc-ded .rc-dur input { width: 72px; }
.rc-ded .rc-dur span { font-size: 11px; color: var(--mu); }
.rc-ded .rc-dur em { font-style: normal; font-size: 10px; color: var(--mu); margin-left: auto; }
.rc-rels { display: flex; flex-direction: column; gap: 4px; width: 100%; }
.rc-relr { display: grid; grid-template-columns: minmax(0, 1fr) 96px 58px 24px; gap: 5px; align-items: center;
  padding: 3px 4px 3px 7px; border: 1px solid var(--sk); border-radius: 8px; background: #fff; }
.rc-relr.ch { border-left: 3px solid var(--rc-ch); }
.rc-relr .rc-aid { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: var(--st); font-size: 11px; font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-relr .rc-aid:hover { text-decoration: underline; }
.rcv .rc-in.sm, .rcv .rc-sel.sm { height: 26px; font-size: 11px; padding: 0 6px; }
.rc-x.sm { width: 24px; height: 24px; }
.rc-reladd { display: flex; gap: 5px; width: 100%; margin-top: 2px; }
.rc-reladd input { flex: 1; min-width: 0; }

.rc-mtips { border: 1px solid var(--sk); border-left: 3px solid var(--rc-ch); border-radius: 9px; background: #fff; padding: 8px 10px;
  display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--st); }
.rc-mtips b { color: var(--rc-ch); }
.rc-mtips .s { color: var(--mu); font-size: 10.5px; margin-top: 2px; }
.rcv .rc-ph.sm { padding: 10px 0 4px; border: 0; background: none; }
.rcv .rc-ph.sm h3 { font-size: 11px; }
.rc-mtab { width: 100%; border-collapse: collapse; font-size: 11px; }
.rc-mtab th { font-size: 9px; text-transform: uppercase; letter-spacing: .05em; color: var(--mu); text-align: left; padding: 4px; border-bottom: 1px solid var(--sk); }
.rc-mtab th em { font-style: normal; text-transform: none; margin-left: 2px; }
.rc-mtab td { padding: 3px 4px; border-bottom: 1px dashed var(--sk2); vertical-align: middle; }
.rc-mtab .num { text-align: right; }
.rc-mtab td .rc-aid { background: none; border: 0; padding: 0; cursor: pointer; font-weight: 700; color: var(--st); font-size: 11px; }
.rc-mtab td .nm { display: block; color: var(--mu); font-size: 10px; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-mtab tr.p td:first-child { box-shadow: inset 3px 0 0 var(--u-crit); }
.rc-mtab tr.sel td { background: rgba(47, 107, 216, .07); }
.rc-mtab input { width: 56px; text-align: right; }
.rc-mtab td.ch { color: var(--rc-ch); font-weight: 800; }
.rc-mform { margin-top: 10px; border-top: 1px solid var(--sk); padding-top: 6px; }
.rc-mform summary { cursor: pointer; font-size: 11px; font-weight: 700; color: var(--st); padding: 4px 0; }

.rc-cand .imp.part { color: var(--u-warn); }
.rc-addall { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rc-comb { margin-top: 8px; padding: 8px 10px; border-radius: 9px; font-size: 11px; border: 1px solid var(--sk); background: #fff; }
.rc-comb.ok { border-color: var(--u-good); color: var(--u-good); }
.rc-comb.part { border-color: var(--u-warn); }
.rc-comb.bad { border-color: var(--u-crit); color: var(--u-crit); }
.rc-steplog .d.z { color: var(--mu); font-weight: 700; font-size: 9.5px; text-transform: uppercase; }
.rc-res .u-b.sm { margin-left: 8px; white-space: nowrap; }
.rcv .u-lgd .lg { padding: 0 4px; }

/* ── what the plan did, on the bars ───────────────────────────────────── */
.rcv .rc-mv { position: absolute; bottom: 2px; height: 3px; border-radius: 2px; z-index: 4; pointer-events: auto;
  transform-origin: right center; animation: rcDraw .5s ease-out both; }
.rcv .rc-mv.e { background: var(--u-good); }
.rcv .rc-mv.l { background: var(--u-crit); transform-origin: left center; }
.rcv .rc-mv::before { content: ''; position: absolute; top: -4px; border: 5.5px solid transparent; }
.rcv .rc-mv.e::before { left: -6px; border-right-color: var(--u-good); border-left: 0; }
.rcv .rc-mv.l::before { right: -6px; border-left-color: var(--u-crit); border-right: 0; }
.rcv .rc-mv em { position: absolute; right: -2px; bottom: 4px; font: 800 9px/1 var(--u-mono); color: #fff; background: var(--u-good); padding: 2px 4px; border-radius: 7px; font-style: normal; }
.rcv .rc-mv.l em { background: var(--u-crit); left: -2px; right: auto; }
.rcv .rc-mv:hover { filter: brightness(1.15); height: 4px; }
.rcv .rc-cut { position: absolute; top: 50%; height: 9px; margin-top: -5px; z-index: 3; border-radius: 0 3px 3px 0;
  background: repeating-linear-gradient(135deg, rgba(198, 70, 43, .55) 0 2px, transparent 2px 5px);
  box-shadow: inset 0 0 0 1px rgba(198, 70, 43, .6); animation: rcFade .5s ease-out both; }
.rcv .rc-lk { position: absolute; top: 1px; z-index: 5; transform: translateX(-100%); }
.rcv .rc-lk b { display: block; font: 800 8px/1 var(--u-mono); color: #fff; background: #7A2E8E; padding: 2px 4px; border-radius: 3px 0 0 3px; white-space: nowrap; }
.rcv .rc-lk::after { content: ''; position: absolute; right: -1px; top: 0; bottom: -12px; border-right: 2px solid #7A2E8E; }
.rcv .u-lgd i.uk.rc-mvk { background: var(--u-good); height: 2px; }
@keyframes rcDraw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rcFade { from { opacity: 0; } to { opacity: 1; } }

/* ── 5 revised: the head, what happened, progress and money ─────────── */
.rc-revhead { flex: none; display: flex; align-items: stretch; gap: 10px; padding: 6px; background: var(--p); border: 1px solid var(--sk); border-radius: 12px; }
.rc-revhead > .rc-sel { align-self: center; max-width: 230px; }
.rc-revfacts { display: flex; align-items: stretch; flex: 1 1 auto; min-width: 0; overflow-x: auto; border: 1px solid var(--sk2); border-radius: 9px; background: #fff; }
.rc-revfacts .c { display: flex; flex-direction: column; justify-content: center; padding: 4px 11px; border-right: 1px solid var(--sk2); flex: none; }
.rc-revfacts .c em { font-style: normal; font-size: 8.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.rc-revfacts .c b { font-family: var(--u-mono); font-size: 12.5px; color: var(--st); white-space: nowrap; }
.rc-revfacts .c.arrow { font-size: 16px; color: var(--mu); border-right: 0; padding: 0 2px; }
.rc-revfacts .c.big b { font-size: 15px; color: var(--u-good); }
.rc-revhead.bad .rc-revfacts .c.big b { color: var(--u-crit); }
.rc-revfacts .c.good b { color: var(--u-good); }
.rc-revfacts .c.ev.ok { background: rgba(24, 141, 104, .06); }
.rc-revfacts .c.ev.ok b i { display: inline-flex; width: 12px; height: 12px; color: var(--u-good); vertical-align: -1px; }
.rc-revfacts .c.ev.ok b i svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.6; fill: none; }
.rc-revfacts .c.ev.warn { background: rgba(217, 164, 25, .1); }
.rc-revfacts .c b s { color: var(--mu); font-weight: 500; }
.rc-revhead .rc-rp { display: flex; align-items: center; padding: 0 14px; border-radius: 9px; color: #fff; font-weight: 800; letter-spacing: .06em; font-size: 11px; }
.rc-revhead.ok .rc-rp { background: var(--u-good); } .rc-revhead.bad .rc-rp { background: var(--u-crit); }
.rc-gatebar { display: flex; align-items: center; gap: 8px; flex: none; }
.rc-made { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--u-good); font-weight: 700; }
.rc-made svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2.6; fill: none; }

.rc-story { list-style: none; margin: 0; padding: 0; position: relative; }
.rc-story::before { content: ''; position: absolute; left: 12px; top: 14px; bottom: 14px; border-left: 2px solid var(--sk); }
.rc-story li { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; column-gap: 8px; align-items: start; padding: 7px 4px 7px 0; }
.rc-story li[data-act] { cursor: pointer; border-radius: 8px; }
.rc-story li[data-act]:hover { background: rgba(47, 107, 216, .06); }
.rc-story .n { z-index: 1; width: 24px; height: 24px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: #fff;
  border: 2px solid var(--sk); font: 800 10px/1 var(--u-mono); color: var(--mu); }
.rc-story .n svg { width: 12px; height: 12px; stroke: currentColor; stroke-width: 2.4; fill: none; }
.rc-story li.good .n { border-color: var(--u-good); color: var(--u-good); }
.rc-story li.bad .n { border-color: var(--u-crit); color: var(--u-crit); }
.rc-story li.src .n { border-color: var(--u-prev); color: var(--u-prev); }
.rc-story li.end.ok .n { background: var(--u-good); border-color: var(--u-good); color: #fff; }
.rc-story li.end.bad .n { background: var(--u-crit); border-color: var(--u-crit); color: #fff; }
.rc-story .t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rc-story .t b { font-size: 11.5px; color: var(--st); }
.rc-story .t em { font-style: normal; font-size: 10.5px; color: var(--mu); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-story .t .src { font-size: 8.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 1px 4px; border-radius: 3px; background: var(--sk2); color: var(--mu); margin-left: 4px; }
.rc-story .t .src.ai { background: rgba(122, 46, 142, .12); color: #7A2E8E; }
.rc-story .t .src.engine { background: rgba(47, 107, 216, .1); color: var(--rc-ch); }
.rc-story .bar { display: block; height: 4px; border-radius: 2px; background: var(--sk2); margin-top: 3px; overflow: hidden; }
.rc-story .bar i { display: block; height: 100%; background: var(--u-good); border-radius: 2px; }
.rc-story li.bad .bar i { background: var(--u-crit); }
.rc-story li.zero .bar i { background: var(--mu); }
.rc-story .d { font: 800 11px/1 var(--u-mono); color: var(--u-good); text-align: right; padding-top: 3px; }
.rc-story li.bad .d { color: var(--u-crit); } .rc-story li.zero .d { color: var(--mu); }
.rc-story .f { grid-column: 3; font: 600 10px/1 var(--u-mono); color: var(--mu); text-align: right; margin-top: 3px; }
.rc-story li.src .f, .rc-story li.end .f { font-size: 12px; font-weight: 800; color: var(--st); padding-top: 5px; grid-row: 1; }
.rc-story li.end.ok .f { color: var(--u-good); }

.rcv table.u-g th.g.rc-pgh { color: var(--rc-ch); border-bottom: 2px solid var(--rc-ch); }
.rcv table.u-g th.g.rc-evh { color: #7A2E8E; border-bottom: 2px solid #7A2E8E; }
.rcv table.u-g td.rc-pc, .rcv table.u-g td.rc-mo { font-family: var(--u-mono); font-size: 10px; white-space: nowrap; }
.rcv table.u-g td.rc-pc s, .rcv table.u-g td.rc-mo s { color: var(--mu); }
.rc-revl .rc-ltabs button { padding-left: 9px; padding-right: 9px; font-size: 11px; white-space: nowrap; }
.rc-adl { margin: 10px 0 0; padding-left: 18px; font-size: 12px; color: var(--st); line-height: 1.5; }
.rc-adchk { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 12px; color: var(--st); cursor: pointer; }
.rc-adchk input { margin-top: 2px; }
.rc-adopted { display: flex; align-items: center; gap: 5px; margin-top: 8px; font-size: 11px; font-weight: 700; color: var(--u-good); }
.rc-adopted svg { width: 13px; height: 13px; stroke: currentColor; stroke-width: 2.6; fill: none; }
.rc-split.rev.one { grid-template-columns: minmax(0, 880px); justify-content: center; }
.rc-adoptv .rc-scroll { padding: 18px 22px; }
.rc-adh { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: rgba(24, 141, 104, .08); border: 1px solid rgba(24, 141, 104, .35); }
.rc-adh > svg { width: 30px; height: 30px; flex: none; stroke: #fff; stroke-width: 2.6; fill: none; background: var(--u-good); border-radius: 50%; padding: 6px; }
.rc-adh b { display: block; font-size: 15px; color: var(--u-good); }
.rc-adh em { font-style: normal; font-size: 11.5px; color: var(--mu); }
.rc-revfacts.wide { margin-top: 12px; flex: none; }
.rc-adgo { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.rc-split.rev.one { grid-template-columns: minmax(0, 880px); justify-content: center; }
.rc-adoptv .rc-scroll { padding: 18px 22px; }
.rc-adh { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 12px; background: rgba(24, 141, 104, .08); border: 1px solid rgba(24, 141, 104, .35); }
.rc-adh > svg { width: 30px; height: 30px; flex: none; stroke: #fff; stroke-width: 2.6; fill: none; background: var(--u-good); border-radius: 50%; padding: 6px; }
.rc-adh b { display: block; font-size: 15px; color: var(--u-good); }
.rc-adh em { font-style: normal; font-size: 11.5px; color: var(--mu); }
.rc-revfacts.wide { margin-top: 12px; flex: none; }
.rc-adgo { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
/* ── 4 preview & execute ─────────────────────────────────────────────── */
.rc-scnbar .rc-plan { display: flex; flex-direction: column; padding: 2px 8px; }
.rc-scnbar .rc-plan b { font-size: 13px; color: var(--st); }
.rc-scnbar .rc-plan em { font-style: normal; font-size: 10.5px; color: var(--mu); }
.rc-revhead .rc-rp.eq { background: var(--u-good); } .rc-revhead .rc-rp.neq { background: var(--u-warn); }
.rc-story.does li { cursor: default; }
.rc-story .t em.wrap { white-space: normal; line-height: 1.45; }
.rc-story.does .n { font-weight: 900; }
.rcv table.u-g th.g.rc-blh { color: #8A5300; border-bottom: 2px solid #D9A419; }
.rcv table.u-g td.rc-rbd { font-family: var(--u-mono); font-size: 10px; white-space: nowrap; }
.rcv table.u-g td.rc-rbd s, .rcv table.u-g td.rc-pc s, .rcv table.u-g td.rc-mo s { color: var(--mu); margin-right: 3px; font-weight: 500; }
.rcv table.u-g td.rc-rbd b, .rcv table.u-g td.rc-pc b, .rcv table.u-g td.rc-mo b { color: var(--rc-ch); }
.rcv .rc-eq { display: inline-flex; width: 18px; height: 18px; border-radius: 9px; align-items: center; justify-content: center; font: 900 12px/1 var(--u-mono); color: #fff; }
.rcv .rc-eq.ok { background: var(--u-good); } .rcv .rc-eq.bad { background: var(--u-warn); }
.rc-split.rev .rc-gpane { --u-tlw: clamp(220px, 20vw, 420px); }
.rcv table.u-g td.rc-rbd s { font-size: 9px; }
.rc-exps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 8px; }
.rc-exp { display: flex; flex-direction: column; gap: 4px; text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--sk); background: #fff; cursor: pointer; }
.rc-exp:hover { border-color: var(--rc-ch); box-shadow: 0 6px 16px -10px rgba(47, 107, 216, .5); }
.rc-exp.main { border-color: var(--u-good); background: rgba(24, 141, 104, .05); }
.rc-exp b { font-size: 12.5px; color: var(--st); }
.rc-exp em { font-style: normal; font-size: 10.5px; color: var(--mu); line-height: 1.4; }
@media (max-width: 900px) { .rc-exps { grid-template-columns: 1fr; } }
.rc-revfacts.wide { flex-wrap: wrap; overflow: visible; }
.rc-revfacts.wide .c { border-bottom: 1px solid var(--sk2); }

/* ── 1b from Primavera ──────────────────────────────────────────────── */
.rc-srckind { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.rc-srckind button { display: flex; flex-direction: column; gap: 2px; text-align: left; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--sk); background: #fff; cursor: pointer; }
.rc-srckind button b { font-size: 12.5px; color: var(--st); }
.rc-srckind button em { font-style: normal; font-size: 10.5px; color: var(--mu); }
.rc-srckind button.on { border-color: var(--st); background: var(--st); }
.rc-srckind button.on b { color: #fff; } .rc-srckind button.on em { color: #B8CDE0; }
.rc-drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  min-height: 150px; padding: 18px; border: 2px dashed var(--sk); border-radius: 12px; background: #fff; cursor: pointer; transition: border-color .15s, background .15s; }
.rc-drop:hover, .rc-drop.over { border-color: var(--rc-ch); background: rgba(47, 107, 216, .05); }
.rc-drop.has { min-height: 84px; border-style: solid; border-color: var(--u-good); background: rgba(24, 141, 104, .04); }
.rc-drop .ic svg { width: 26px; height: 26px; stroke: var(--rc-ch); stroke-width: 2; fill: none; }
.rc-drop b { font-size: 13px; color: var(--st); }
.rc-drop em { font-style: normal; font-size: 11px; color: var(--mu); max-width: 420px; line-height: 1.45; }
.rc-impcard { margin-top: 10px; border: 1px solid var(--sk); border-radius: 12px; background: #fff; padding: 10px 12px; }
.rc-impcard .h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.rc-impcard .h b { font-size: 14px; color: var(--st); }
.rc-impcard .fmt { font: 800 9.5px/1 var(--u-mono); color: #fff; background: #7A2E8E; padding: 3px 6px; border-radius: 4px; letter-spacing: .06em; }
.rc-impcard .warn { color: var(--u-warn); font-weight: 700; }
.rc-imptiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 6px; }
.rc-imptile { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 10px; text-align: left; padding: 12px; border-radius: 12px;
  border: 1.5px solid var(--sk); background: #fff; cursor: pointer; align-items: start; }
.rc-imptile:hover:not([disabled]) { border-color: var(--mu); }
.rc-imptile[disabled] { opacity: .5; cursor: not-allowed; }
.rc-imptile .n { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  background: var(--p2); color: var(--st); font: 800 12px/1 var(--u-mono); }
.rc-imptile .n svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2.6; fill: none; }
.rc-imptile .t { display: flex; flex-direction: column; gap: 4px; }
.rc-imptile .t b { font-size: 13px; color: var(--st); }
.rc-imptile .t b em { font-style: normal; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #fff;
  background: var(--u-good); padding: 2px 6px; border-radius: 8px; margin-left: 4px; vertical-align: 1px; }
.rc-imptile .t > span { font-size: 11px; color: var(--mu); line-height: 1.45; }
.rc-imptile.on { border-color: var(--u-good); box-shadow: 0 0 0 3px rgba(24, 141, 104, .12); }
.rc-imptile.on .n { background: var(--u-good); color: #fff; }
.rc-impmatch { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--mu); margin: 0 0 8px; background: none; }
.rc-impmatch .mbar { display: block; flex: none; width: 120px; height: 6px; border-radius: 3px; background: var(--sk2); overflow: hidden; position: static; }
.rc-impmatch .mbar i { display: block; height: 100%; background: var(--u-good); }
.rc-impmatch.m-mid .mbar i { background: var(--u-warn); } .rc-impmatch.m-lo .mbar i { background: var(--u-crit); }
.rc-emptyacts { display: flex; gap: 8px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
@media (max-width: 900px) { .rc-imptiles, .rc-srckind { grid-template-columns: 1fr; } }

.rc-impcard .h { flex-wrap: wrap; }
.rc-impslip { margin-left: auto; font-size: 11px; font-weight: 800; padding: 3px 9px; border-radius: 10px; }
.rc-impslip.late { color: var(--u-crit); background: rgba(198, 70, 43, .1); }
.rc-impslip.early { color: var(--u-good); background: rgba(24, 141, 104, .1); }
.rc-impsides { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-impside { border: 1px solid var(--sk2); border-radius: 10px; padding: 8px 10px; }
.rc-impside .h { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.rc-impside .h i { width: 12px; height: 7px; border-radius: 2px; }
.rc-impside.up .h i { background: var(--u-todo, #2F6BD8); } .rc-impside.bl .h i { background: var(--u-bl, #D9A419); } .rc-impside.none .h i { background: var(--sk); }
.rc-impside .h b { font-size: 12.5px; color: var(--st); }
.rc-impside .h span { font-size: 10.5px; color: var(--mu); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-impside .r { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-top: 1px dashed var(--sk2); font-size: 11px; }
.rc-impside .r em { font-style: normal; color: var(--mu); }
.rc-impside .r b { font-family: var(--u-mono); color: var(--st); font-size: 11.5px; white-space: nowrap; }
.rc-imptl { position: relative; margin-top: 12px; padding: 4px 0 22px; }
.rc-imptl .row { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; height: 30px; }
.rc-imptl .row .k { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--mu); }
.rc-imptl .trk { position: relative; height: 30px; }
.rc-imptl .trk i { position: absolute; top: 6px; height: 10px; border-radius: 3px; }
.rc-imptl .trk i.bl { background: var(--u-bl, #D9A419); }
.rc-imptl .trk i.up { background: var(--u-todo, #2F6BD8); }
.rc-imptl .trk em { position: absolute; top: 18px; font: 700 9.5px/1 var(--u-mono); color: var(--mu); font-style: normal; white-space: nowrap; }
.rc-imptl .trk em.f { transform: translateX(-100%); }
.rc-imptl .dd { position: absolute; top: 0; bottom: 14px; border-left: 2px solid var(--u-dd, #2F6BD8); }
.rc-imptl .dd b { position: absolute; bottom: -14px; left: 4px; font: 800 9.5px/1 var(--u-mono); color: var(--u-dd, #2F6BD8); white-space: nowrap; }
@media (max-width: 900px) { .rc-impsides { grid-template-columns: 1fr; } }
.rc-oos { margin: 0 0 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid rgba(217, 164, 25, .6); background: rgba(217, 164, 25, .08); display: flex; flex-direction: column; gap: 6px; }
.rc-oos .h { display: flex; align-items: center; gap: 6px; } .rc-oos .h b { font-size: 12.5px; color: var(--st); }
.rc-oos .ids { display: flex; flex-wrap: wrap; gap: 4px; }
.rc-oos .ids .rc-aid { background: #fff; border: 1px solid var(--sk); border-radius: 6px; padding: 2px 6px; font-size: 10.5px; cursor: pointer; }
.rc-oos > .u-b { align-self: flex-start; }
/* ONE WIDTH FOR THE CHART COLUMN, HEADER AND ROWS ALIKE. The Update grid
   caps each chart cell at --u-tlw while the table stretches to its pane, so
   in a wide pane the header's chart column grew and the rows' did not: the
   Data Date and target lines broke at the header and the bars stopped short
   of the ruler. Here the chart takes the width the pane gives it, the same
   in every row. */
.rcv table.u-g.tl:not(.fold) th.u-tlh-c,
.rcv table.u-g.tl:not(.fold) td.u-tl,
.rcv table.u-g.tl:not(.fold) thead tr.grp th.g.tl { max-width: none; }

/* the same Data Date as the latest update: replace, or add */
.rc-samedate { margin-top: 10px; padding: 9px 11px; border-radius: 8px; background: rgba(245, 158, 11, .09); border: 1px solid rgba(245, 158, 11, .35); font-size: 12px; }
.rc-samedate label { display: block; margin-top: 5px; cursor: pointer; }

/* why a row still differs after the rebaseline: named with its reason */
.rc-why { margin: 4px 0 0; padding-left: 16px; }
.rc-why li { margin: 2px 0; line-height: 1.45; }
.rc-why b { font-family: var(--u-mono); }

/* a status the source cannot have: one check, a compact row per activity */
.rc-sdl { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.rc-sdi { border: 1px solid var(--sk2); border-left: 3px solid var(--u-bad); border-radius: 8px; padding: 7px 9px; background: #fff; }
.rc-sdi.done { border-left-color: var(--u-good); }
.rc-sdi.warn { border-left-color: var(--u-warn); }
.rc-sdi.warn .tag { color: var(--u-warn); background: rgba(199, 140, 30, .1); }
.rc-sdi .r1 { display: flex; align-items: center; gap: 7px; min-width: 0; }
.rc-sdi .nm { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 600; color: var(--st); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc-sdi .tag { flex: none; font-size: 9px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--u-bad);
  background: rgba(198, 70, 43, .08); border-radius: 4px; padding: 2px 6px; }
.rc-sdi.done .tag { color: var(--u-good); background: rgba(22, 128, 61, .08); }
.rc-sdi .fact { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 5px 0 7px; font-family: var(--u-mono); font-size: 10.5px; color: var(--mu); }
.rc-sdi .fact .tag { font-family: inherit; }
.rc-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--sk); border-radius: 7px; overflow: hidden; }
.rc-seg button { border: 0; border-right: 1px solid var(--sk); background: transparent; padding: 4px 10px; font-size: 10.5px; font-weight: 700;
  color: var(--mu); cursor: pointer; white-space: nowrap; }
.rc-seg button:last-child { border-right: 0; }
.rc-seg button:hover { background: var(--p2); color: var(--st); }
.rc-seg button.on { background: var(--st); color: #fff; }
.rc-story .rc-sdl { margin-top: 6px; }
.rc-sdall { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 10px; margin-top: 8px;
  padding: 7px 9px; border-radius: 8px; background: var(--p2); font-size: 11px; font-weight: 700; color: var(--st); }

/* styles/tabs/fourd.css */
/* ══════════════════════════════════════════════════════════════════════
   4D PLANNING — tabs/fourd/*

   A dark workspace so the daylight 3D scene is the brightest thing on the
   screen. ONE SCREEN HIGH: fd-views.js measures what is left of the
   viewport into --fd-h. Command bar · schedule | stage · timeline. Panels
   scroll; the page does not. Settings live in a drawer, details in a
   floating card — nothing is on screen until it is asked for.
   ══════════════════════════════════════════════════════════════════════ */

.fd-host { --fd-h: calc(100vh - 110px); }
.fd {
  --bg0: #0A0F18; --bg1: #101826; --bg2: #162133; --bg3: #1D2A40;
  --line: rgba(148, 163, 184, .14); --line2: rgba(148, 163, 184, .24);
  --tx: #E6EDF5; --tx2: #C2CEDB; --mu: #8597AC;
  --ac: #5EEAD4; --ac2: #2DD4BF; --act: #F5A524; --bad: #F87171; --ok: #34D399; --sel: #60A5FA; --pl: #C4B5FD;
  --mono: var(--u-mono, ui-monospace, 'JetBrains Mono', 'SFMono-Regular', Menlo, monospace);
  --fd-sw: 540px; --nw: 46%; --lw: 40px;
  height: var(--fd-h); min-height: 600px;
  display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 8px;
  padding: 8px; border-radius: 16px;
  background: radial-gradient(1200px 400px at 20% -10%, #15233A 0%, var(--bg0) 60%);
  color: var(--tx); font-size: 12px; position: relative; overflow: hidden;
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
.fd * { box-sizing: border-box; }
.fd button { font: inherit; color: inherit; cursor: pointer; }
.fd button:disabled { opacity: .4; cursor: not-allowed; }
.fd svg { display: block; }
.fd .bad { color: var(--bad); }
.fd .ok { color: var(--ok); }
.fd :focus-visible { outline: 2px solid var(--sel); outline-offset: 1px; }

/* ── command bar ─────────────────────────────────────────────────────── */
.fd-bar { display: flex; flex-wrap: wrap; align-items: center; column-gap: 8px; row-gap: 6px; padding: 7px 10px; min-height: 56px;
  background: linear-gradient(180deg, rgba(29, 42, 64, .9), rgba(16, 24, 38, .9)); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 12px 30px -20px rgba(0, 0, 0, .8); }
.fd-brand { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 250px; padding-right: 12px; border-right: 1px solid var(--line); }
.fd-logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, rgba(94, 234, 212, .25), rgba(96, 165, 250, .18)); color: var(--ac); border: 1px solid rgba(94, 234, 212, .35); }
.fd-logo svg { width: 19px; height: 19px; }
.fd-brand .k { display: block; font-size: 9px; font-weight: 800; letter-spacing: .16em; color: var(--ac); }
.fd-brand .v { display: block; font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--tx); }
.fd-when { display: flex; flex-direction: column; line-height: 1.1; padding: 0 4px; min-width: 112px; }
.fd-when .wd { font-size: 9.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--mu); }
.fd-when .dt { font-family: var(--mono); font-size: 17px; font-weight: 800; letter-spacing: -.3px; color: #fff; }
.fd-seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(148, 163, 184, .08); border: 1px solid var(--line); }
.fd-seg.full { display: flex; }
.fd-seg.full button { flex: 1; }
.fd-seg button { border: 0; background: transparent; padding: 6px 11px; border-radius: 7px; font-weight: 700; font-size: 11.5px; color: var(--mu); white-space: nowrap; transition: background .15s, color .15s; }
.fd-seg button:hover:not(:disabled) { color: var(--tx); }
.fd-seg button.on { background: linear-gradient(180deg, #24344F, #1B2840); color: #fff; box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 2px 8px rgba(0, 0, 0, .35); }
.fd-tog, .fd-ico { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 11px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(148, 163, 184, .06); color: var(--tx2) !important; font-weight: 700; font-size: 11.5px; white-space: nowrap; position: relative; transition: background .15s, border-color .15s; }
.fd-tog svg, .fd-ico svg { width: 16px; height: 16px; }
.fd-tog:hover:not(:disabled), .fd-ico:hover { background: rgba(148, 163, 184, .14); color: #fff !important; }
.fd-tog.on, .fd-ico.on { background: rgba(94, 234, 212, .14); border-color: rgba(94, 234, 212, .45); color: var(--ac) !important; }
.fd-ico.rec svg { color: #FF6B6B; }
.fd-ico.rec.on { background: #B4231E; border-color: #FF8C6E; color: #fff !important; animation: fd-pulse 1.4s infinite; }
.fd-ico.rec.on svg { color: #fff; }
@keyframes fd-pulse { 50% { box-shadow: 0 0 0 4px rgba(255, 107, 107, .25); } }
.fd-badge { display: none; position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--bad); color: #fff; font-style: normal; font-size: 10px; font-weight: 800; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--bg1); }
.fd-badge.on { display: block; }
.fd-div { width: 1px; height: 26px; background: var(--line); margin: 0 2px; }
.fd-sp { flex: 1 1 auto; }
.fd-kpis { display: flex; gap: 6px; }
.fd-kpi { display: flex; flex-direction: column; justify-content: center; padding: 3px 11px; border-radius: 9px; background: rgba(148, 163, 184, .06); border: 1px solid var(--line); min-width: 66px; }
.fd-kpi b { font-family: var(--mono); font-size: 14px; font-weight: 800; line-height: 1.15; }
.fd-kpi span { font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.fd-kpi.ok b { color: var(--ok); } .fd-kpi.act b { color: var(--act); } .fd-kpi.bad b { color: var(--bad); }
.fd-kpi.warn { cursor: pointer; text-align: left; } .fd-kpi.warn b { color: #FB923C; } .fd-kpi.warn:hover { border-color: rgba(251, 146, 60, .5); }
.fd-kpi.cost b { color: #A5B4FC; } .fd-kpi[hidden] { display: none; }
.fd-photo { display: none; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 2; pointer-events: none; mix-blend-mode: normal; }
.fd-vw { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid rgba(148, 163, 184, .07); }
.fd-vw .fd-lk:first-child { margin-right: auto; color: var(--tx) !important; }
.fd-drop.sm { padding: 14px 10px; }
.fd-card .crowd { padding: 8px; border-radius: 10px; border: 1px solid rgba(251, 146, 60, .35); background: rgba(251, 146, 60, .06); margin-bottom: 8px; }
.fd-card .crowd > .t { font-weight: 700; color: #FED7AA; margin-bottom: 6px; }
.fd-card .crowd > .t b { font-family: var(--mono); color: #FB923C; margin-right: 4px; }
.fd-card .crowd .act { margin-bottom: 4px; padding: 5px 8px 5px 12px; }

/* ── main row ────────────────────────────────────────────────────────── */
.fd-main { display: flex; min-height: 0; }
.fd-sched { width: var(--fd-sw); flex: none; display: flex; flex-direction: column; min-height: 0;
  background: var(--bg1); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }
.fd-rsz { width: 8px; flex: none; cursor: col-resize; position: relative; }
.fd-rsz::after { content: ''; position: absolute; left: 3px; top: 40%; height: 20%; width: 2px; border-radius: 2px; background: var(--line2); transition: background .15s; }
.fd-rsz:hover::after { background: var(--ac); }
.fd.nosched .fd-sched, .fd.nosched .fd-rsz { display: none; }
.fd-qto { display: none; }
.fd.qto .fd-sched { display: none; }
.fd.qto .fd-qto { width: var(--fd-sw); flex: none; display: flex; flex-direction: column; min-height: 0;
  background: var(--bg1); border: 1px solid var(--line); border-radius: 13px; overflow: hidden; }

.fd-sh-head { flex: none; padding: 10px 10px 8px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.fd-sh-title { display: flex; align-items: center; gap: 8px; }
.fd-sh-title b { font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.fd-sh-title em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--mu); background: rgba(148, 163, 184, .1); padding: 1px 7px; border-radius: 9px; margin-right: auto; }
.fd-mini { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--line); background: transparent; color: var(--mu) !important; display: grid; place-items: center; flex: none; }
.fd-mini svg { width: 14px; height: 14px; }
.fd-mini:hover { color: #fff !important; background: rgba(148, 163, 184, .12); }
.fd-search { width: 100%; height: 32px; padding: 0 11px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg0); color: var(--tx); font: inherit; outline: none; }
.fd-search:focus { border-color: rgba(96, 165, 250, .6); }
.fd-search::placeholder { color: var(--mu); }
.fd-sh-row { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.fd-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.fd-seg.xs { padding: 2px; flex: none; }
.fd-seg.xs button { padding: 3px 8px; font-size: 10px; }
.fd-chips button { border: 1px solid var(--line); background: transparent; color: var(--mu); padding: 3px 9px; border-radius: 12px; font-size: 10.5px; font-weight: 700; }
.fd-chips button:hover { color: var(--tx); }
.fd-chips button.on { background: rgba(96, 165, 250, .16); border-color: rgba(96, 165, 250, .5); color: #BFDBFE; }

.fd-gh, .fd .r { display: flex; align-items: center; }
.fd-gh { flex: none; height: 28px; border-bottom: 1px solid var(--line); background: var(--bg2); font-size: 9.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--mu); }
.fd .c-name { width: var(--nw); flex: none; min-width: 0; display: flex; align-items: center; gap: 0; padding-right: 6px; overflow: hidden; }
.fd-gh .c-name { padding-left: 10px; }
.fd .c-link { width: var(--lw); flex: none; display: flex; justify-content: center; align-items: center; color: var(--mu); }
.fd-gh .c-link svg { width: 13px; height: 13px; }
.fd .c-gantt { flex: 1 1 auto; position: relative; height: 100%; border-left: 1px solid var(--line); }
.fd-gh .c-gantt { cursor: ew-resize; }
.fd-gh .c-gantt span { position: absolute; top: 8px; transform: translateX(-50%); font-family: var(--mono); font-size: 9.5px; letter-spacing: 0; text-transform: none; white-space: nowrap; color: var(--mu); }
.fd-gh .c-gantt .cur { position: absolute; top: 0; bottom: -1px; width: 2px; margin-left: -1px; background: var(--ac); box-shadow: 0 0 10px var(--ac); }
.fd-gb { flex: 1 1 auto; min-height: 0; position: relative; overflow-y: auto; overflow-x: hidden; }
.fd-gb::-webkit-scrollbar, .fd-dr-body::-webkit-scrollbar, .fd-card::-webkit-scrollbar { width: 9px; }
.fd-gb::-webkit-scrollbar-thumb, .fd-dr-body::-webkit-scrollbar-thumb, .fd-card::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, .22); border-radius: 6px; border: 2px solid transparent; background-clip: padding-box; }
.fd-gb-sp { width: 1px; }
.fd-gb-rows { position: absolute; inset: 0 0 auto 0; }
.fd-cur, .fd-ddl { position: absolute; top: 0; width: 0; pointer-events: none; z-index: 2;
  left: calc(var(--nw) + var(--lw) + (100% - var(--nw) - var(--lw)) * var(--p, 0)); }
.fd-cur { border-left: 2px solid var(--ac); box-shadow: 0 0 12px rgba(94, 234, 212, .45); }
.fd-ddl { border-left: 1.5px dashed #60A5FA; opacity: .8; }

.fd .r { position: absolute; left: 0; right: 0; height: 26px; cursor: pointer; border-bottom: 1px solid rgba(148, 163, 184, .055); }
.fd .r .sw { width: 4px; height: 15px; border-radius: 2px; background: var(--c); flex: none; margin-right: 8px; }
.fd .r .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* WBS rows wear the project's own level palette (core/994), as the Gantt table does */
.fd .r.w { background: var(--c); border-bottom-color: color-mix(in srgb, var(--a) 35%, transparent); }
.fd .r.w .c-name, .fd .r.w .nm, .fd .r.w .cr { color: var(--t) !important; }
.fd .r.w .nm { font-weight: 800; font-size: 11.5px; }
.fd .r.w.l3 .nm, .fd .r.w.l4 .nm { font-weight: 700; }
.fd .r.w .sw { background: var(--a); }
.fd .r.w .c-gantt { background: color-mix(in srgb, var(--c) 35%, var(--bg1)); border-left-color: color-mix(in srgb, var(--a) 30%, transparent); }
.fd .r.w em { font-style: normal; font-family: var(--mono); font-size: 9.5px; color: var(--t); opacity: .7; margin-left: 7px; }
.fd .r.w:hover { filter: brightness(1.12); }
.fd .r .cr { width: 18px; height: 18px; border: 0; background: transparent; color: var(--mu) !important; flex: none; display: grid; place-items: center; margin-right: 2px; transition: transform .15s; }
.fd .r .cr svg { width: 12px; height: 12px; }
.fd .r .cr.open { transform: rotate(90deg); }
.fd .r.a .cd { font-family: var(--mono); font-size: 10px; color: var(--mu); margin-right: 7px; flex: none; }
.fd .r.a .nm { color: var(--tx2); }
.fd .r:hover { background-color: rgba(148, 163, 184, .07); }
.fd .r.a:hover .nm { color: #fff; }
.fd .r.run .nm { color: #FFE2A8; }
.fd .r.hl { background-color: rgba(96, 165, 250, .1); }
.fd .r.sel { background-color: rgba(96, 165, 250, .2); box-shadow: inset 3px 0 0 var(--sel); }
.fd .r.sel .nm { color: #fff; }
.fd .r.asg { box-shadow: inset 3px 0 0 var(--act), inset 0 0 0 1px rgba(245, 165, 36, .5); background-color: rgba(245, 165, 36, .1); }
.fd .lk { display: inline-flex; align-items: center; gap: 2px; font-family: var(--mono); font-size: 9.5px; }
.fd .lk svg { width: 13px; height: 13px; }
.fd .lk.on { color: var(--ac); }
.fd .lk.on b { color: var(--tx2); font-weight: 600; }
.fd .lk.off { color: #F87171; opacity: .75; }
.fd .lk.np { color: rgba(148, 163, 184, .4); }
/* bars as the app's Gantt draws them: WBS summary dark, activities green,
   critical red; the done part solid, the rest outlined */
.fd .r .bar { position: absolute; top: 6px; height: 13px; border-radius: 3px; overflow: hidden;
  background: color-mix(in srgb, var(--b) 22%, #0B111C); border: 1px solid var(--b); }
.fd .r .bar .pg { display: block; height: 100%; background: linear-gradient(180deg, color-mix(in srgb, var(--b) 100%, #fff 20%), var(--b)); }
.fd .r .bar.wbs { top: 9px; height: 7px; border: 0; border-radius: 1px; background: var(--t); opacity: .85; overflow: visible; }
.fd .r .bar.wbs::before, .fd .r .bar.wbs::after { content: ''; position: absolute; bottom: -4px; width: 0; height: 0; border: 3px solid transparent; border-top: 4px solid var(--t); }
.fd .r .bar.wbs::before { left: -3px; } .fd .r .bar.wbs::after { right: -3px; }
.fd .r .bl { position: absolute; top: 20px; height: 3px; border-radius: 2px; background: rgba(196, 181, 253, .75); }
.fd .r .ms { position: absolute; top: 7px; width: 11px; height: 11px; margin-left: -5.5px; transform: rotate(45deg); border-radius: 2px; background: #E6EDF5; box-shadow: 0 0 0 1.5px #0B111C; }

.fd-sh-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-top: 1px solid var(--line); background: var(--bg2); font-size: 10.5px; color: var(--mu); flex-wrap: wrap; }
.fd-sh-foot .k { font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.fd-sh-foot .lv { display: inline-flex; align-items: center; gap: 4px; font-family: var(--mono); font-size: 10px; }
.fd-sh-foot .lv i { width: 12px; height: 8px; border-radius: 2px; display: inline-block; }
.fd-sh-foot .sp { flex: 1; }
.fd-tgl { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--tx2); font-weight: 600; }
.fd-tgl input { accent-color: var(--ac); }

/* ── stage ───────────────────────────────────────────────────────────── */
.fd-stage { flex: 1 1 auto; min-width: 0; position: relative; border-radius: 13px; overflow: hidden; border: 1px solid var(--line); background: #0B111C; }
.fd-stage.drop { outline: 3px dashed var(--ac); outline-offset: -8px; }
.fd-vps { position: absolute; inset: 0; display: flex; gap: 3px; background: var(--bg0); }
.fd-vp { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; }
#fdVpB { display: none; }
.fd.split #fdVpB { display: block; }
.fd-canvas { display: block; position: absolute; inset: 0; touch-action: none; }
.fd-vp-tag { position: absolute; left: 12px; top: 12px; z-index: 3; display: flex; align-items: center; gap: 8px; padding: 6px 10px 6px 6px; border-radius: 11px;
  background: rgba(10, 15, 24, .78); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, .08); pointer-events: none; }
.fd-vp-tag .t { font-size: 10px; font-weight: 900; letter-spacing: .12em; padding: 4px 8px; border-radius: 7px; }
.fd-vp-tag .t.pl { background: rgba(196, 181, 253, .18); color: var(--pl); }
.fd-vp-tag .t.ac { background: rgba(94, 234, 212, .16); color: var(--ac); }
.fd-vp-tag .s { font-size: 11px; color: var(--tx2); }
.fd-vp-tag .p { font-family: var(--mono); font-size: 11px; font-weight: 800; color: #fff; padding-left: 8px; border-left: 1px solid var(--line2); }
.fd-showsched { display: none; position: absolute; left: 12px; bottom: 56px; z-index: 4; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .12); background: rgba(10, 15, 24, .8); color: #fff !important; font-weight: 700; font-size: 11px; backdrop-filter: blur(8px); }
.fd-showsched svg { width: 14px; height: 14px; }
.fd.nosched .fd-showsched { display: inline-flex; }
.fd-views { position: absolute; top: 12px; right: 12px; z-index: 4; display: flex; gap: 2px; padding: 3px; border-radius: 10px;
  background: rgba(10, 15, 24, .78); border: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(10px); }
.fd-views button { border: 0; background: transparent; padding: 5px 10px; border-radius: 7px; font-weight: 700; font-size: 11px; color: var(--tx2) !important; }
.fd-views button:hover { background: rgba(255, 255, 255, .1); color: #fff !important; }
.fd.split .fd-views { right: 12px; top: auto; bottom: 12px; }
.fd-legend { position: absolute; left: 12px; bottom: 12px; z-index: 3; display: flex; flex-wrap: wrap; gap: 4px 12px; max-width: 62%;
  padding: 7px 11px; border-radius: 10px; background: rgba(10, 15, 24, .78); border: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(10px); font-size: 10.5px; color: var(--tx2); }
.fd-legend span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.fd-legend i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }
.fd-assign { display: none; position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5; align-items: center; gap: 10px; max-width: 70%;
  padding: 7px 8px 7px 12px; border-radius: 12px; background: linear-gradient(180deg, #F5A524, #E08E0B); color: #1A1200; font-weight: 600; box-shadow: 0 10px 30px -10px rgba(245, 165, 36, .7); }
.fd-assign.on { display: flex; }
.fd-assign svg { width: 18px; height: 18px; flex: none; }
.fd-assign span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-assign button { border: 0; background: #1A1200; color: #FFD58A !important; font-weight: 800; padding: 5px 12px; border-radius: 8px; }
.fd.assigning .fd-canvas { cursor: crosshair; }
.fd-toast { position: absolute; left: 50%; bottom: 60px; transform: translate(-50%, 10px); z-index: 6; padding: 7px 14px; border-radius: 9px; background: rgba(10, 15, 24, .9); color: #fff; font-weight: 600;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; border: 1px solid var(--line2); }
.fd-toast.on { opacity: 1; transform: translate(-50%, 0); }
.fd-msg { position: absolute; inset: 0; z-index: 7; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--bg0); color: var(--tx2); font-weight: 600; transition: opacity .4s; }
.fd-msg.off { opacity: 0; pointer-events: none; }
/* reading / measuring a model: on the 3D view, whatever the drawers show */
.fd-load { display: none; position: absolute; left: 50%; bottom: 64px; transform: translateX(-50%); z-index: 8; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 12px; background: rgba(16, 24, 38, .92); border: 1px solid var(--line2); box-shadow: 0 16px 40px -20px rgba(0, 0, 0, .8); max-width: min(520px, 90%); }
.fd-load.on { display: flex; }
.fd-load .tx { display: flex; flex-direction: column; gap: 6px; min-width: 220px; }
.fd-load b { color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-load i { display: block; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.fd-load s { display: block; height: 100%; width: 0; background: var(--ac); transition: width .2s; text-decoration: none; }
.fd-spin { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(94, 234, 212, .2); border-top-color: var(--ac); animation: fd-spin .8s linear infinite; flex: none; }
@keyframes fd-spin { to { transform: rotate(360deg); } }

/* floating card */
.fd-card { display: none; position: absolute; right: 12px; bottom: 12px; z-index: 5; width: 350px; max-height: calc(100% - 70px); overflow-y: auto;
  padding: 12px; border-radius: 14px; background: rgba(13, 20, 32, .92); border: 1px solid var(--line2); backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .9); }
.fd-card.on { display: block; animation: fd-in .18s ease-out; }
.fd.split .fd-card { bottom: 56px; }
@keyframes fd-in { from { opacity: 0; transform: translateY(6px); } }
.fd-card .hd { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.fd-card .hd .k { display: flex; align-items: center; gap: 6px; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); margin-bottom: 3px; }
.fd-card .hd .k i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.fd-card .hd b { font-size: 13.5px; line-height: 1.3; color: #fff; display: block; }
.fd-card .hd b em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--ac); }
.fd-card .crumbs { flex-wrap: wrap; gap: 4px !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 600 !important; }
.fd-card .crumbs span { display: inline-flex; align-items: center; gap: 4px; padding: 1px 6px; border-radius: 5px; background: color-mix(in srgb, var(--c) 18%, transparent); color: var(--tx2); }
.fd-card .crumbs span i { width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.fd-card .pg { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.fd-card .pg .bar { flex: 1; height: 7px; border-radius: 5px; background: rgba(148, 163, 184, .14); overflow: hidden; }
.fd-card .pg .bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #2DD4BF, #5EEAD4); }
.fd-card .pg b { font-family: var(--mono); font-size: 13px; color: #fff; }
.fd-card .pg span { font-size: 10.5px; color: var(--mu); white-space: nowrap; }
.fd-card .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.fd-card .grid div { padding: 6px 8px; border-radius: 8px; background: rgba(148, 163, 184, .07); }
.fd-card .grid span { display: block; font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); }
.fd-card .grid b { font-family: var(--mono); font-size: 11.5px; color: var(--tx); }
.fd-card .row { display: flex; align-items: center; gap: 6px; }
.fd-card .row .cnt { display: inline-flex; align-items: center; gap: 5px; margin-right: auto; color: var(--tx2); font-size: 11px; }
.fd-card .row .cnt svg { width: 14px; height: 14px; color: var(--ac); }
.fd-card .sub { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--mu); margin: 4px 0 6px; }
.fd-card .note, .fd-note { margin: 6px 0 0; font-size: 11px; line-height: 1.55; color: var(--mu); }
.fd-card .act { position: relative; padding: 8px 9px 8px 14px; border-radius: 9px; background: rgba(148, 163, 184, .06); border: 1px solid var(--line); margin-bottom: 6px; cursor: pointer; }
.fd-card .act:hover { border-color: rgba(96, 165, 250, .4); }
.fd-card .act .sw { position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 3px 3px 0; background: var(--c); }
.fd-card .act .t { font-weight: 600; color: var(--tx); margin-bottom: 4px; }
.fd-card .act .t b { font-family: var(--mono); font-size: 10px; color: var(--mu); }
.fd-card .act .m { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 10.5px; color: var(--mu); font-family: var(--mono); }
.fd-card .act .m .how { font-family: inherit; font-style: italic; }
.fd-card .act .m .fd-lk { margin-left: auto; }
.fd-st { font-family: inherit; font-size: 9px; font-weight: 800; border-radius: 5px; padding: 2px 6px; text-transform: uppercase; letter-spacing: .05em; }
.fd-st.done { background: rgba(52, 211, 153, .16); color: var(--ok); }
.fd-st.act { background: rgba(245, 165, 36, .18); color: #FCD34D; }
.fd-st.ns { background: rgba(148, 163, 184, .12); color: var(--mu); }
.fd-st.crit { background: rgba(236, 72, 153, .16); color: #F9A8D4; }

/* drawer */
.fd-drawer { position: absolute; top: 0; right: 0; bottom: 0; z-index: 6; width: 370px; display: flex; flex-direction: column;
  background: rgba(16, 24, 38, .97); border-left: 1px solid var(--line2); backdrop-filter: blur(14px);
  transform: translateX(105%); transition: transform .22s ease; box-shadow: -24px 0 50px -30px rgba(0, 0, 0, .9); }
.fd-drawer.on { transform: none; }
.fd-dr-head { flex: none; display: flex; align-items: center; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line); }
.fd-tabs { display: flex; flex: 1; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(148, 163, 184, .08); }
.fd-tabs button { flex: 1; border: 0; background: transparent; padding: 6px; border-radius: 7px; font-weight: 700; font-size: 11.5px; color: var(--mu); }
.fd-tabs button.on { background: #24344F; color: #fff; }
.fd-dr-body { flex: 1 1 auto; overflow-y: auto; padding: 2px 14px 18px; }
.fd-sec { padding: 13px 0; border-bottom: 1px solid var(--line); }
.fd-sec:last-child { border-bottom: 0; }
.fd-h { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--tx2); margin-bottom: 9px; }
.fd-h em { font-style: normal; font-family: var(--mono); background: rgba(148, 163, 184, .12); border-radius: 10px; padding: 1px 7px; color: var(--mu); }
.fd-h .fd-lk { margin-left: auto; }
.fd-h.sm { margin: 12px 0 6px; font-size: 9.5px; color: var(--mu); }
.fd-note.ok { color: var(--ok); font-weight: 600; }
.fd-note.bad { color: var(--bad); font-weight: 600; }
.fd-note b { color: var(--tx2); }
.fd-lk { border: 0; background: none; padding: 2px 4px; color: #93C5FD !important; font-weight: 700; font-size: 11px; text-transform: none; letter-spacing: 0; }
.fd-lk:hover { text-decoration: underline; }
.fd-row { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.fd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border-radius: 8px; border: 1px solid #2DD4BF;
  background: linear-gradient(180deg, #2DD4BF, #14B8A6); color: #04201C !important; font-weight: 800; font-size: 11.5px; cursor: pointer; }
.fd-btn svg { width: 14px; height: 14px; }
.fd-btn.ghost { background: transparent; color: var(--tx2) !important; border-color: var(--line2); }
.fd-btn.ghost:hover { background: rgba(148, 163, 184, .1); }
.fd-btn.sm { padding: 5px 10px; font-size: 11px; }
.fd-btn.on { background: linear-gradient(180deg, #F5A524, #E08E0B); border-color: #F5A524; color: #1A1200 !important; }
.fd-prm { display: grid; grid-template-columns: 1fr 112px; gap: 3px 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(148, 163, 184, .07); }
.fd-prm .l { font-weight: 600; color: var(--tx); display: flex; align-items: center; gap: 6px; }
.fd-prm .in { display: flex; align-items: center; gap: 4px; }
.fd-prm .in input, .fd-prm .in select, .fd-ed select, .fd-sel { width: 100%; min-width: 0; padding: 6px 8px; border: 1px solid var(--line2); border-radius: 7px; font: inherit; font-size: 11.5px; background: var(--bg0); color: var(--tx); }
.fd-prm .in input { font-family: var(--mono); }
.fd-sel.dark { width: auto; height: 32px; }
.fd-prm .in em { font-style: normal; font-size: 10px; color: var(--mu); white-space: nowrap; }
.fd-prm .n { grid-column: 1 / -1; font-size: 10.5px; color: var(--mu); line-height: 1.45; }
.fd-bdg { font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; border-radius: 5px; padding: 1px 5px; cursor: help; }
.fd-bdg.set { background: rgba(96, 165, 250, .16); color: #93C5FD; }
.fd-bdg.derived { background: rgba(52, 211, 153, .15); color: var(--ok); }
.fd-bdg.assumed { background: rgba(245, 165, 36, .18); color: #FCD34D; }
.fd-kinds { display: flex; flex-wrap: wrap; gap: 5px; }
.fd-kinds span { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 7px; background: rgba(148, 163, 184, .08); font-size: 11px; color: var(--tx2); }
.fd-kinds i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.fd-kinds b { font-family: var(--mono); color: var(--mu); }
.fd-drop { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 24px 14px; border: 1.5px dashed var(--line2); border-radius: 13px; cursor: pointer; text-align: center; color: var(--mu); background: rgba(148, 163, 184, .04); transition: border-color .15s, background .15s; }
.fd-drop:hover { border-color: var(--ac); background: rgba(94, 234, 212, .06); }
.fd-drop svg { width: 34px; height: 34px; color: var(--ac); }
.fd-drop b { color: #fff; font-size: 13px; }
.fd-file { display: flex; flex-direction: column; gap: 2px; padding: 10px; border-radius: 9px; background: rgba(148, 163, 184, .07); margin-bottom: 8px; }
.fd-file b { color: #fff; word-break: break-all; }
.fd-file span { font-size: 11px; color: var(--mu); font-family: var(--mono); }
.fd-busy { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 9px; background: rgba(148, 163, 184, .07); color: var(--tx); font-weight: 600; }
.fd-tbl { width: 100%; border-collapse: collapse; font-size: 11px; }
.fd-tbl td { padding: 5px 2px; border-bottom: 1px solid rgba(148, 163, 184, .07); color: var(--tx2); }
.fd-tbl td.r { text-align: right; color: var(--mu); font-family: var(--mono); position: static; height: auto; display: table-cell; border-left: 0; }
.fd-cov { display: flex; align-items: center; gap: 10px; }
.fd-cov .bar { flex: 1; height: 8px; border-radius: 6px; background: rgba(148, 163, 184, .12); overflow: hidden; }
.fd-cov .bar i { display: block; height: 100%; background: linear-gradient(90deg, #2DD4BF, #5EEAD4); border-radius: 6px; }
.fd-cov b { font-family: var(--mono); font-size: 15px; color: #fff; }
.fd-facts { display: flex; flex-direction: column; gap: 3px; margin-top: 8px; font-size: 11px; color: var(--mu); }
.fd-facts b { color: #fff; font-family: var(--mono); }
.fd-un { padding: 9px; border: 1px solid rgba(248, 113, 113, .25); background: rgba(248, 113, 113, .05); border-radius: 10px; margin-bottom: 6px; }
.fd-un .t { font-weight: 600; color: var(--tx); cursor: pointer; }
.fd-un .t b { font-family: var(--mono); font-size: 10.5px; color: var(--mu); }
.fd-un .w { font-size: 10.5px; color: #FCA5A5; margin: 2px 0 6px; }
.fd-ed { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 6px; }
.fd-ed select[data-f=kind] { grid-column: 1 / -1; }
.fd-ed .fd-lk { justify-self: end; }
.fd-ai { padding: 9px; border-radius: 10px; background: rgba(96, 165, 250, .07); border: 1px solid rgba(96, 165, 250, .25); margin-bottom: 8px; }
.fd-air { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px solid rgba(96, 165, 250, .12); cursor: pointer; }
.fd-air span { display: flex; flex-direction: column; gap: 1px; }
.fd-air b { color: #fff; font-weight: 600; font-size: 11.5px; }
.fd-air em { font-style: normal; color: #93C5FD; font-weight: 700; font-size: 10.5px; }
.fd-air small { color: var(--mu); font-size: 10px; }
.fd-tg { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; cursor: pointer; line-height: 1.4; color: var(--tx2); }
.fd-tg input, .fd-air input { margin-top: 2px; accent-color: var(--ac); }

/* ── timeline ────────────────────────────────────────────────────────── */
.fd-time { display: flex; align-items: center; gap: 16px; padding: 8px 14px; border-radius: 13px; background: linear-gradient(180deg, rgba(22, 33, 51, .95), rgba(16, 24, 38, .95)); border: 1px solid var(--line); }
.fd-ctl { display: flex; align-items: center; gap: 7px; flex: none; }
.fd-ib { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; border: 1px solid var(--line); background: rgba(148, 163, 184, .06); color: var(--tx2) !important; flex: none; }
.fd-ib:hover { background: rgba(148, 163, 184, .14); color: #fff !important; }
.fd-ib svg { width: 15px; height: 15px; }
.fd-ib.play { width: 42px; height: 42px; border-radius: 50%; border: 0; background: linear-gradient(180deg, #5EEAD4, #14B8A6); color: #04201C !important; box-shadow: 0 8px 22px -8px rgba(45, 212, 191, .8); }
.fd-ib.play svg { width: 18px; height: 18px; }
.fd-chip { border: 1px solid var(--line); background: rgba(148, 163, 184, .06); border-radius: 8px; padding: 0 10px; height: 32px; font-size: 11px; font-weight: 700; color: var(--tx2); }
.fd-chip.dd { border-color: rgba(96, 165, 250, .45); color: #93C5FD; }
.fd-track { position: relative; flex: 1 1 auto; min-width: 200px; height: 56px; }
.fd-hist { position: absolute; left: 8px; right: 8px; top: 2px; height: 28px; width: calc(100% - 16px); }
.fd-marks { position: absolute; left: 8px; right: 8px; top: 0; height: 38px; pointer-events: none; }
.fd-marks .mk { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed; }
.fd-marks .mk b { position: absolute; top: -1px; left: 4px; font-size: 8.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; font-style: normal; }
.fd-marks .mk.dd { border-color: #60A5FA; color: #93C5FD; }
.fd-marks .mk.fin { border-color: #E6EDF5; color: #E6EDF5; }
.fd-marks .mk.fin b { left: auto; right: 4px; }
.fd-marks .mk.bl { border-color: var(--pl); color: var(--pl); }
.fd-marks .mk.bl b { top: 11px; left: auto; right: 4px; }
.fd-track input[type=range] { position: absolute; left: 0; right: 0; top: 22px; width: 100%; margin: 0; height: 18px; background: transparent; -webkit-appearance: none; appearance: none; }
.fd-track input[type=range]::-webkit-slider-runnable-track { height: 4px; border-radius: 3px; background: rgba(148, 163, 184, .22); }
.fd-track input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7px; border-radius: 50%; background: var(--ac); border: 3px solid #0A0F18; box-shadow: 0 0 0 2px var(--ac), 0 0 14px rgba(94, 234, 212, .7); cursor: grab; }
.fd-track input[type=range]::-moz-range-track { height: 4px; border-radius: 3px; background: rgba(148, 163, 184, .22); }
.fd-track input[type=range]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ac); border: 3px solid #0A0F18; }
.fd-axis { position: absolute; left: 8px; right: 8px; bottom: 0; height: 14px; }
.fd-axis span { position: absolute; transform: translateX(-50%); font-size: 9.5px; color: var(--mu); white-space: nowrap; font-family: var(--mono); }

/* ── empty / error ───────────────────────────────────────────────────── */
.fd-empty { display: flex !important; align-items: center; justify-content: center; }
.fd-empty-card { max-width: 460px; text-align: center; padding: 36px; background: var(--bg1); border: 1px solid var(--line); border-radius: 18px; }
.fd-empty-card svg { width: 46px; height: 46px; color: var(--ac); margin: 0 auto; }
.fd-empty-card h2 { margin: 10px 0 6px; font-size: 19px; color: #fff; }
.fd-empty-card p { margin: 0; color: var(--mu); line-height: 1.6; font-size: 12.5px; }
.fd-err { margin: 20px; padding: 14px; border-radius: 10px; background: rgba(248, 113, 113, .1); color: var(--bad); font-weight: 600; }

/* ── narrower screens ────────────────────────────────────────────────── */
@media (max-width: 1440px) {
  .fd { --fd-sw: 460px; }
  .fd-ico span, .fd-tog span { display: none; }
  .fd-kpi { min-width: 56px; padding: 3px 8px; }
}
@media (max-width: 1180px) {
  .fd { --fd-sw: 380px; --nw: 52%; }
  .fd-kpis { display: none; }
}
@media (max-width: 900px) {
  .fd { height: auto; min-height: 0; overflow: visible; grid-template-rows: auto auto auto; }
  .fd-bar { flex-wrap: wrap; }
  .fd-main { flex-direction: column; gap: 8px; }
  .fd-sched { width: auto !important; height: 380px; }
  .fd-rsz { display: none; }
  .fd-stage { min-height: 460px; }
  .fd-time { flex-wrap: wrap; }
  .fd-track { width: 100%; }
  .fd-drawer { width: 100%; }
  .fd-card { width: calc(100% - 24px); }
}

/* ── IFC: several files, one model ───────────────────────────────────── */
.fd-ifcfs { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.fd-ifcf { display: grid; grid-template-columns: auto minmax(0, 1fr) 104px auto; gap: 8px; align-items: center; padding: 8px; border-radius: 10px;
  background: rgba(148, 163, 184, .07); border: 1px solid var(--line); transition: opacity .15s; }
.fd-ifcf.off { opacity: .5; }
.fd-ifcf.off .eye { color: var(--mu); }
.fd-ifcf .eye { color: var(--ac); }
.fd-ifcf .nm { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fd-ifcf .nm b { color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-ifcf .nm span { font-size: 10.5px; color: var(--mu); font-family: var(--mono); line-height: 1.35; }
.fd-ifcf .nm em { font-style: normal; font-size: 10.5px; line-height: 1.35; }
.fd-ifcf .fd-sel.disc { padding: 5px 6px; font-size: 11px; }
.fd-drop.add { flex-direction: row; text-align: left; gap: 10px; padding: 10px 12px; }
.fd-drop.add svg { width: 24px; height: 24px; flex: none; }
.fd-drop.add b { font-size: 12px; display: block; }
.fd-drop.add span { font-size: 10.5px; }
.fd-tbl td small { display: block; font-size: 9.5px; color: var(--mu); margin-top: 1px; }

/* ── Links: coverage, activities to decide, the model's elements ─────── */
.fd-lcov { display: flex; align-items: center; gap: 12px; }
.fd-ring { width: 58px; height: 58px; flex: none; }
.fd-lcov > div { font-size: 12px; color: var(--tx2); line-height: 1.45; }
.fd-lcov > div b { color: #fff; font-family: var(--mono); }
.fd-lcov > div span { display: block; font-size: 10.5px; color: var(--mu); margin-top: 2px; }
.fd-ltiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.fd-lt { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 8px; border-radius: 9px; border: 1px solid var(--line);
  background: rgba(148, 163, 184, .06); text-align: left; }
.fd-lt:disabled { opacity: 1 !important; cursor: default !important; }
.fd-lt:not(:disabled):hover { border-color: var(--line2); background: rgba(148, 163, 184, .12); }
.fd-lt b { font-family: var(--mono); font-size: 15px; color: #fff; line-height: 1.1; }
.fd-lt span { font-size: 9.5px; font-weight: 700; color: var(--mu); line-height: 1.25; }
.fd-lt.bad b { color: var(--bad); } .fd-lt.ok b { color: var(--ok); } .fd-lt.warn b { color: #FBBF24; }
.fd-ltab { margin: 4px 0 2px; }
.fd-ltab em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--mu); margin-left: 4px; }
.fd-lbar { display: flex; gap: 6px; align-items: center; }
.fd-search.sm { flex: 1; min-width: 0; height: 32px; }
.fd-rsn { display: flex; flex-wrap: wrap; gap: 4px; margin: 8px 0; }
.fd-rsn button { border: 1px solid var(--line); background: rgba(148, 163, 184, .06); border-radius: 999px; padding: 3px 9px; font-size: 10.5px; font-weight: 700; color: var(--tx2); }
.fd-rsn button b { font-family: var(--mono); color: var(--mu); margin-left: 3px; }
.fd-rsn button.on { background: rgba(94, 234, 212, .14); border-color: rgba(94, 234, 212, .45); color: var(--ac); }
.fd-bulk { position: sticky; top: -12px; z-index: 2; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; margin-bottom: 8px; border-radius: 10px;
  background: #1B2840; border: 1px solid rgba(94, 234, 212, .4); box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .9); }
.fd-bulk > b { grid-column: 1 / -1; color: var(--ac); font-size: 11.5px; }
.fd-bulk select { min-width: 0; padding: 6px 8px; border: 1px solid var(--line2); border-radius: 7px; font: inherit; font-size: 11.5px; background: var(--bg0); color: var(--tx); }
.fd-bulk .fd-lk { justify-self: start; }
.fd-tg.all { padding: 2px 0 6px; font-size: 11px; color: var(--mu); }
.fd-un2 { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px; padding: 9px 9px 7px; margin-bottom: 6px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(148, 163, 184, .045); transition: border-color .15s, background .15s; }
.fd-un2:hover { border-color: var(--line2); }
.fd-un2.sel { border-color: rgba(94, 234, 212, .45); background: rgba(94, 234, 212, .06); }
.fd-un2.open { border-color: rgba(96, 165, 250, .45); }
.fd-un2 > input { margin-top: 2px; align-self: start; accent-color: var(--ac); }
.fd-un2 .bd { min-width: 0; }
.fd-un2 .t { font-weight: 600; color: var(--tx); cursor: pointer; line-height: 1.35; }
.fd-un2 .t:hover { color: #fff; }
.fd-un2 .t em { font-style: normal; font-family: var(--mono); font-size: 10px; color: var(--mu); margin-right: 6px; }
.fd-un2 .w { display: flex; flex-wrap: wrap; gap: 4px 8px; margin: 3px 0 6px; font-size: 10.5px; }
.fd-un2 .w .rsn { color: #FCA5A5; }
.fd-un2 .w .rd { color: var(--mu); }
.fd-un2 .sug { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.fd-un2 .sug .l { font-size: 9.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--mu); margin-right: 2px; }
.fd-sugc { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 7px; border: 1px solid var(--line2); background: rgba(148, 163, 184, .07);
  font-size: 11px; font-weight: 600; color: var(--tx2) !important; }
.fd-sugc:hover { border-color: var(--ac); background: rgba(94, 234, 212, .12); color: #fff !important; }
.fd-sugc.best { border-color: rgba(94, 234, 212, .5); }
.fd-sugc i { width: 8px; height: 8px; border-radius: 2px; }
.fd-sugc b { font-family: var(--mono); font-size: 10px; color: var(--mu); }
.fd-un2 .ops { display: flex; flex-wrap: wrap; gap: 2px 2px; margin-top: 6px; }
.fd-un2 .ops .fd-lk { padding: 2px 3px; }
.fd-un2 .ops .mu { color: var(--mu) !important; margin-left: auto; }
.fd-un2 .fd-ed { padding-top: 6px; border-top: 1px dashed var(--line); }
.fd-tgt { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; align-items: center; padding: 8px 10px; margin-bottom: 6px; border-radius: 10px;
  background: rgba(245, 165, 36, .1); border: 1px solid rgba(245, 165, 36, .45); }
.fd-tgt span { grid-column: 1; font-size: 9.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #FCD34D; }
.fd-tgt b { grid-column: 1; color: #fff; font-weight: 600; line-height: 1.3; }
.fd-tgt b em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: #FCD34D; }
.fd-tgt .fd-mini { grid-column: 2; grid-row: 1 / 3; }
.fd-etree { display: flex; flex-direction: column; margin-top: 4px; }
.fd-er { display: grid; grid-template-columns: 20px auto minmax(0, 1fr) 96px auto; align-items: center; gap: 6px; padding: 4px 4px 4px calc(4px + var(--ind, 0px));
  border-bottom: 1px solid rgba(148, 163, 184, .07); min-height: 32px; }
.fd-er.d1 { --ind: 14px; } .fd-er.d2 { --ind: 28px; }
.fd-er:hover { background: rgba(148, 163, 184, .06); }
.fd-er .car { width: 20px; height: 20px; padding: 0; border: 0; background: none; display: grid; place-items: center; color: var(--mu); }
.fd-er .car svg { width: 12px; height: 12px; transition: transform .15s; }
.fd-er.open .car svg { transform: rotate(90deg); }
.fd-er .sw { width: 10px; height: 10px; border-radius: 3px; }
.fd-er:not(:has(.sw)) { grid-template-columns: 20px minmax(0, 1fr) 96px auto; }
.fd-er .nm { border: 0; background: none; padding: 0; text-align: left; color: var(--tx); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-er .nm:hover { color: #fff; text-decoration: underline; }
.fd-er.d0 > .nm { font-weight: 700; }
.fd-er .ct { position: relative; display: flex; align-items: baseline; gap: 5px; padding: 2px 6px; border-radius: 6px; background: rgba(148, 163, 184, .08); overflow: hidden; }
.fd-er .ct i { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(52, 211, 153, .18); }
.fd-er .ct b, .fd-er .ct em { position: relative; font-family: var(--mono); font-size: 10.5px; }
.fd-er .ct b { color: #fff; }
.fd-er .ct em { font-style: normal; color: #FBBF24; font-size: 9.5px; }
.fd-er .fd-btn.sm { padding: 3px 9px; }

/* ── quantity takeoff panel (fd-qto-view.js) ─────────────────────────── */
.fq { display: flex; flex-direction: column; min-height: 0; height: 100%; --gold: #D9B56B; }
.fq-head { flex: none; padding: 10px 10px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.fq-title { display: flex; align-items: center; gap: 8px; }
.fq-title b { font-size: 13px; font-weight: 800; letter-spacing: .02em; }
.fq-title em { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--mu); background: rgba(148, 163, 184, .1); padding: 1px 7px; border-radius: 9px; margin-right: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.fq-tabs { display: flex; gap: 2px; }
.fq-cloud { font-size: 10.5px; color: var(--mu); }
.fq-cloud.ok { color: var(--ok); } .fq-cloud.error { color: var(--bad); } .fq-cloud.busy { color: var(--act); }
.fq-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 7px 10px; font-weight: 700; font-size: 11.5px; color: var(--mu); }
.fq-tabs button.on { color: var(--tx); border-bottom-color: var(--ac); }
.fq-tabs button:hover { color: var(--tx); }
.fq-body { flex: 1; min-height: 0; overflow: auto; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.fq-empty { padding: 28px 16px; text-align: center; color: var(--tx2); }
.fq-empty.sm { padding: 14px 8px; }
.fq-empty b { display: block; font-size: 13px; margin-bottom: 6px; color: var(--tx); }
.fq-empty p { margin: 0 0 12px; line-height: 1.5; }
.fq-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.fq-form label { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; font-weight: 700; color: var(--mu); text-transform: uppercase; letter-spacing: .06em; min-width: 110px; flex: 1 1 110px; }
.fq-form label.w { flex: 3 1 220px; }
.fq-form label.ck { flex-direction: row; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: 11.5px; color: var(--tx2); flex: 0 1 auto; }
.fq-form .fd-search { height: 30px; }
.fq-group { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.fq-group span { font-size: 10.5px; font-weight: 700; color: var(--mu); text-transform: uppercase; letter-spacing: .06em; margin-right: 4px; }
.fq-group button { border: 1px solid var(--line2); background: transparent; color: var(--tx2); border-radius: 14px; padding: 3px 9px; font-size: 11px; font-weight: 600; }
.fq-group button.on { background: rgba(94, 234, 212, .14); border-color: rgba(94, 234, 212, .5); color: var(--ac); }
.fq-acts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fd-btn.gold { background: transparent; border-color: var(--gold); color: var(--gold) !important; }
.fd-btn.gold:hover:not(:disabled) { background: rgba(217, 181, 107, .12); }
.fq-rules { display: flex; flex-wrap: wrap; gap: 4px; }
.fq-rule { display: inline-flex; border: 1px solid var(--line2); border-radius: 7px; overflow: hidden; }
.fq-rule button { border: 0; background: transparent; padding: 3px 8px; font-size: 11px; color: var(--tx2); }
.fq-rule button + button { border-left: 1px solid var(--line2); color: var(--mu); }
.fq-msg { padding: 7px 10px; border-radius: 8px; background: rgba(96, 165, 250, .1); border: 1px solid rgba(96, 165, 250, .25); color: var(--tx2); line-height: 1.45; }
.fq-msg.warn { background: rgba(245, 165, 36, .1); border-color: rgba(245, 165, 36, .35); }
.fq-msg.bad { background: rgba(248, 113, 113, .1); border-color: rgba(248, 113, 113, .4); color: #FECACA; }
.fq-msg a, .fq-body a { color: var(--sel); cursor: pointer; text-decoration: underline; text-decoration-color: rgba(96, 165, 250, .35); }
.fq-sub { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--mu); margin-top: 4px; }
.fq-table { border: 1px solid var(--line); border-radius: 9px; overflow: auto; max-height: 52vh; }
.fq-table table, .fq-kv { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.fq-table th { position: sticky; top: 0; background: var(--bg2); text-align: left; font-weight: 700; color: var(--mu); padding: 6px 8px; border-bottom: 1px solid var(--line2); white-space: nowrap; z-index: 1; }
.fq-table td { padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.fq-table tr.row td { white-space: nowrap; }
.fq-table tr.det td { white-space: normal; }
.fq-table tr.row { cursor: pointer; }
.fq-table tr.row:hover td { background: rgba(148, 163, 184, .06); }
.fq-table tr.row.open td { background: rgba(96, 165, 250, .1); }
.fq-table tr.cur td { color: var(--ac); }
.fq-table tfoot td { position: sticky; bottom: 0; background: var(--bg2); font-weight: 800; border-top: 1px solid var(--line2); }
.fq-table .n, .fq-kv .n { text-align: right; font-family: var(--mono); white-space: nowrap; }
.fq .mu { color: var(--mu); }
.fq-pill { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 10px; font-weight: 800; letter-spacing: .02em; background: rgba(148, 163, 184, .14); color: var(--tx2); white-space: nowrap; }
.fq-pill.ok { background: rgba(52, 211, 153, .14); color: var(--ok); }
.fq-pill.warn { background: rgba(245, 165, 36, .15); color: var(--act); }
.fq-pill.bad { background: rgba(248, 113, 113, .15); color: var(--bad); }
.fq-contrib { display: flex; flex-direction: column; gap: 3px; }
.fq-contrib .c { display: grid; grid-template-columns: minmax(0, 1.6fr) auto auto minmax(0, 2fr) auto auto; gap: 8px; align-items: center; }
.fq-contrib .c > a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fq-contrib .c .mu { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fq-ov { font-size: 10px; font-weight: 800; color: var(--gold); border: 1px solid rgba(217, 181, 107, .5); border-radius: 6px; padding: 0 5px; }
.fq-el { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.fq-el b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.fq-kv th { text-align: left; font-weight: 600; color: var(--mu); padding: 4px 8px 4px 0; width: 38%; vertical-align: top; }
.fq-kv td { padding: 4px 0; color: var(--tx); word-break: break-word; }
.fq-kv.q td.mu { font-size: 10.5px; }
.fq-set { border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; }
.fq-set summary { cursor: pointer; font-weight: 700; color: var(--tx2); }
.fq-kpis { display: flex; flex-wrap: wrap; gap: 6px; }
.fq-kpis span { padding: 4px 9px; border-radius: 8px; background: rgba(148, 163, 184, .08); border: 1px solid var(--line); color: var(--tx2); }
.fq-kpis span b { font-family: var(--mono); color: var(--tx); }
.fq-kpis span.ok b { color: var(--ok); } .fq-kpis span.warn b { color: var(--act); } .fq-kpis span.bad b { color: var(--bad); }
@media (max-width: 900px) {
  .fd.qto .fd-qto { width: auto !important; height: 560px; }
}
@media (pointer: coarse) {
  .fq-tabs button { padding: 10px 12px; }
  .fq-group button { padding: 6px 11px; }
  .fq-table td { padding: 8px; }
}

/* ── no model yet: the stage asks, it does not invent ───────────────── */
.fd-none { display: none; position: absolute; inset: 0; z-index: 3; align-items: center; justify-content: center; padding: 24px; pointer-events: none; }
.fd-none.on { display: flex; }
.fd-none .in { pointer-events: auto; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 26px 24px;
  border-radius: 16px; background: rgba(16, 24, 38, .92); border: 1px solid var(--line2); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9); backdrop-filter: blur(6px); }
.fd-none svg { width: 40px; height: 40px; color: var(--ac); }
.fd-none b { color: #fff; font-size: 16px; }
.fd-none span { color: var(--tx2); line-height: 1.55; font-size: 12px; }
.fd-none .row { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.fd-none em { font-style: normal; font-size: 11px; color: #FCD34D; }
.fd-stage.drop .fd-none .in { border-color: var(--ac); }


/* ── Schedule-first BIM takeoff: a sheet, not a stack of forms ─────────── */
.fd.qto .fd-qto { width: min(66vw, 1120px); max-width: calc(100% - 330px); border-color: rgba(117,149,194,.27); box-shadow: 0 18px 52px -40px #000; }
.fd.qto.fq-expanded .fd-qto { width: 100% !important; max-width: 100%; }
.fd.qto.fq-expanded .fd-stage { flex-basis: 0; min-width: 0; border: 0; }
.fq-schedule-mode .fq-body { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; padding: 0; overflow: hidden; }
.fq-schedule-mode .fq-head { background: #0E1828; }
.fq-schedule-mode .fq-title b { font-size: 13px; letter-spacing: .01em; color: #F1F5F9; }
.fq-schedule-mode .fq-tabs button { padding: 8px 12px; }
.fq-schedule-mode .fq-tabs button.on { color: #F2CC8B; border-color: #D7AF68; }
.fq-workspace { --q-gold: #D7AF68; --q-ink: #EDF4FF; display: flex; flex-direction: column; height: 100%; min-height: 0; background: #0B1422; position: relative; }
.fq-hero { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 17px 10px; background: linear-gradient(115deg,#15243B 0%,#0C1729 65%,#111D2F 100%); }
.fq-hero-copy { min-width: 0; }
.fq-eyebrow { display: block; color: #E3BA74; font-size: 9px; font-weight: 800; letter-spacing: .16em; margin-bottom: 5px; }
.fq-hero h2 { font-size: 21px; font-weight: 780; margin: 0 0 3px; color: #F8FAFC; letter-spacing: -.6px; line-height: 1.2; }
.fq-hero p { margin: 0; font-size: 10.5px; color: #9FB1C7; line-height: 1.5; max-width: 630px; }
.fq-hero-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.fq-hero-actions .fd-btn, .fq-sheet-actions .fd-btn { white-space: nowrap; }
.fq-workspace .fd-btn:not(.ghost):not(.gold) { border-color: #D2AA62; background: linear-gradient(180deg,#ECC77F,#CE9E4F); color: #211806 !important; font-weight: 800; }
.fq-workspace .fd-btn.ghost { background: #17253B; color: #CFD9E8 !important; border-color: #33435A; }
.fq-workspace .fd-btn.ghost:hover { background: #213450; border-color: #587398; }
.fq-metrics { flex: none; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); padding: 9px 14px 11px; gap: 8px; background: #101B2C; border-bottom: 1px solid #2B3D54; }
.fq-metric { min-width: 0; display: grid; align-content: center; padding: 7px 12px; border: 1px solid #2A3C51; background: #152237; border-radius: 9px; }
.fq-metric > span { color: #97A9BE; font-size: 9.5px; font-weight: 650; letter-spacing: .025em; }
.fq-metric > b { color: #F5F7FB; font-family: var(--mono); font-weight: 800; font-size: 19px; line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.fq-metric b.fq-warn { color: #F8C883; }
.fq-metric > small { color: #8096AF; font-size: 9.5px; line-height: 1.35; }
.fq-quantity-strip { display: flex; align-items: center; gap: 9px; padding: 7px 15px; background: #0E1929; flex-wrap: wrap; border-bottom: 1px solid #23334B; }
.fq-quantity-strip > span:not(.fq-quantity-note) { display: inline-flex; gap: 6px; align-items: baseline; border: 1px solid #35465A; border-radius: 7px; padding: 4px 10px; background: #16253A; }
.fq-quantity-strip b { color: #F4F7FB; font-size: 13px; font-family: var(--mono); }
.fq-quantity-strip em { color: #E2B979; font-size: 11px; font-weight: 800; font-style: normal; }
.fq-quantity-note { margin-left: auto; color: #8799AF; font-size: 9.5px; }
.fq-saved { display: flex; align-items: center; justify-content: space-between; padding: 5px 14px; background: #101B2A; color: #8F9EB2; font-size: 10px; }
.fq-saved button { color: #E7BC79; border: 0; background: none; padding: 2px 5px; font-weight: 700; }
.fq-progress { flex: none; display: flex; gap: 8px; padding: 8px 15px; background: rgba(204,157,67,.12); border-bottom: 1px solid rgba(204,157,67,.27); color: #F3C982; font-size: 11px; }
.fq-progress .fd-spin { width: 13px; height: 13px; border-color: rgba(233,190,111,.2); border-top-color: #EAC782; }
.fq-sheet { display: flex; flex-direction: column; flex: 1; min-height: 170px; margin: 10px 12px 5px; overflow: hidden; border: 1px solid #34465B; border-radius: 11px; background: #101A2A; box-shadow: 0 16px 40px -24px #020714; }
.fq-sheet-head { display: flex; flex: none; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; border-bottom: 1px solid #2C3C50; background: #162438; }
.fq-sheet-id { display: flex; align-items: center; gap: 9px; min-width: 0; }
.fq-sheet-glyph { display: grid; place-items: center; height: 34px; width: 34px; border: 1px solid #4C5B6B; border-radius: 8px; background: #24374B; color: #EBC17E; font-size: 25px; flex: none; }
.fq-sheet-id b { color: #F4F6FB; font-size: 13px; font-weight: 800; display: block; }
.fq-sheet-id small { font-size: 10px; color: #9BABBF; display: block; margin-top: 2px; }
.fq-sheet-actions { display: flex; gap: 5px; align-items: center; flex: none; }
.fq-sheet-toolbar { flex: none; display: flex; align-items: center; gap: 11px; padding: 7px 11px; background: #111E2F; border-bottom: 1px solid #2A3D54; }
.fq-sheet-toolbar > label { display: flex; align-items: center; gap: 7px; color: #9DACBE; font-size: 10px; font-weight: 800; white-space: nowrap; }
.fq-sheet-toolbar .fd-sel { max-width: 235px; min-width: 125px; height: 30px; background: #1C2C43; border-color: #394C64; }
.fq-sheet-toolbar > button { margin-left: auto; white-space: nowrap; }
.fq-sheet-path { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #738AA3; font-size: 9px; font-weight: 750; letter-spacing: .05em; }
.fq-sheet-path span { padding: 0 5px; color: #B79A6B; }
.fq-sheet-scroll { flex: 1; min-height: 0; overflow: auto; outline-offset: -2px; scrollbar-color: #425773 #111E2F; }
.fq-schedule-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 740px; font-size: 11px; color: #D6E0EF; }
.fq-schedule-table th { position: sticky; top: 0; background: #203049; color: #BDCBDB; height: 33px; z-index: 2; text-align: left; padding: 7px 10px; font-size: 10px; font-weight: 800; border-right: 1px solid #34465C; border-bottom: 1px solid #4C5C70; white-space: nowrap; }
.fq-schedule-table td { height: 35px; padding: 7px 10px; border-right: 1px solid #26364B; border-bottom: 1px solid #223247; color: #D9E4F0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fq-schedule-table tr:nth-child(even):not(.fq-section-row):not(.fq-explain-row) td { background: #111E2E; }
.fq-schedule-table tr.fq-data-row { cursor: pointer; }
.fq-schedule-table tr.fq-data-row:hover td { background: #1F3249 !important; }
.fq-schedule-table tr.fq-data-row.selected td { background: #203B53 !important; border-bottom-color: #A77B42; }
.fq-schedule-table .fq-rown { width: 38px; min-width: 38px; text-align: center; color: #73869C; background: #17243A; font-family: var(--mono); }
.fq-schedule-table .fq-num { min-width: 110px; font-family: var(--mono); font-size: 12px; font-weight: 800; text-align: right; color: #F5F6FB; }
.fq-schedule-table .fq-cat-cell { font-weight: 750; color: #F0F5FD; }
.fq-schedule-table .fq-source { color: #9BAEC3; font-size: 10px; }
.fq-section-row td { padding: 8px 12px; background: linear-gradient(90deg,#263B54,#1C3047) !important; color: #F5D29C; border-bottom-color: #465A73; font-weight: 800; position: relative; }
.fq-section-row td > b { color: #F5DAA7; font-size: 11.5px; }
.fq-section-row em { font-style: normal; font-size: 10px; font-weight: 550; color: #A8BBD1; margin-left: 9px; }
.fq-section-row span:not(.fq-section-dot) { font-family: var(--mono); margin-left: 10px; color: #E0B877; font-size: 10px; }
.fq-section-dot { display: inline-block; width: 6px; height: 6px; border-radius: 2px; background: #EBC17E; margin-right: 9px; vertical-align: middle; }
.fq-section-row button { float: right; border: 1px solid #5A6A7C; background: #1B3046; padding: 2px 8px; color: #D4E0EC; border-radius: 6px; font-size: 10px; }
.fq-section-row button:hover { border-color: #E3B673; color: #F4D7A7; }
.fq-preview-row td { color: #8DA0B6; }
.fq-skeleton { display: inline-block; height: 6px; width: 44px; vertical-align: middle; background: #304359; border-radius: 8px; }
.fq-explain-row > td { white-space: normal; background: #0B1627 !important; padding: 11px 13px 14px; }
.fq-explain { border: 1px solid #475B73; background: #142238; border-radius: 9px; padding: 13px; box-shadow: inset 3px 0 0 #D4AC65; }
.fq-explain-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.fq-explain-head b { font-size: 13px; color: #F7F9FC; display: block; }
.fq-explain-head small { display: block; color: #9EADC0; font-size: 10px; margin-top: 2px; }
.fq-explain-stats { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 9px; }
.fq-explain-stats span { background: #21324B; border: 1px solid #3D536A; border-radius: 7px; padding: 6px 10px; min-width: 112px; }
.fq-explain-stats b { display: block; font-size: 12px; font-family: var(--mono); color: #EAC27D; }
.fq-explain-stats small { color: #95A8BE; font-size: 9px; }
.fq-explain p { color: #AEBFD1; font-size: 10.5px; line-height: 1.5; white-space: normal; margin: 0 0 10px; }
.fq-explain .fq-contrib { max-height: 210px; overflow: auto; }
.fq-explain .fq-contrib .c { min-width: 500px; border-top: 1px solid #283C53; padding: 6px 0; }
.fq-explain .fq-contrib .c > a { color: #A9D8FF; }
.fq-sheet-foot { flex: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 8px 12px; border-top: 1px solid #30425A; background: #142338; color: #94A8BD; font-size: 9.5px; line-height: 1.4; }
.fq-sheet-foot span:last-child { font-family: var(--mono); white-space: nowrap; }
.fq-sheet-blank { flex: 1; display: grid; align-content: center; justify-items: center; gap: 8px; text-align: center; padding: 25px; }
.fq-sheet-blank b { color: #EAF0F8; font-size: 13px; }
.fq-sheet-blank p { color: #9FADC0; max-width: 380px; margin: 0; line-height: 1.6; }
.fq-schedule-footer { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 3px 13px 10px; font-size: 10px; }
.fq-schedule-footer > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; color: #90A5BC; line-height: 1.3; }
.fq-schedule-footer b { color: #D5E1EF; font-size: 10.5px; }
.fq-schedule-footer button { flex: none; }
/* Contextual Revit-style Schedule Properties, closed by default */
.fq-designer { position: absolute; z-index: 8; top: 0; bottom: 0; right: 0; width: min(384px, 100%); display: flex; flex-direction: column; background: #142137; border-left: 1px solid #536783; box-shadow: -32px 0 65px -25px rgba(0,0,0,.85); animation: fq-design-in .18s ease-out; }
@keyframes fq-design-in { from { transform: translateX(12px); opacity: .5; } to { transform: none; opacity: 1; } }
.fq-design-head { display: flex; flex: none; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 17px; border-bottom: 1px solid #31455F; }
.fq-design-head b { display: block; font-size: 16px; color: #F4F7FD; font-weight: 820; }
.fq-design-head small { display: block; color: #92A6BE; font-size: 10px; padding-top: 4px; }
.fq-design-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 3px; padding: 9px; border-bottom: 1px solid #304158; }
.fq-design-tabs button { border: 0; border-radius: 6px; padding: 9px 4px; color: #A9BAD0; background: #1B2C43; font-size: 10px; font-weight: 750; }
.fq-design-tabs button.on { background: #344861; color: #F9D89F; box-shadow: inset 0 -2px 0 #D3A964; }
.fq-design-body { overflow: auto; flex: 1; min-height: 0; padding: 14px; scrollbar-color: #425773 #152137; }
.fq-design-body p { color: #A7B6C9; margin: 0 0 14px; font-size: 11px; line-height: 1.6; }
.fq-dlabel { color: #E6C085; font-size: 10px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; margin: 16px 0 8px; }
.fq-field-option { display: flex; align-items: center; width: 100%; gap: 9px; margin: 4px 0; text-align: left; background: #17263C; border: 1px solid #30465F; border-radius: 7px; padding: 9px; }
.fq-field-option:hover { background: #22364E; border-color: #7187A2; }
.fq-field-option.active { border-color: #51708A; background: #22364E; }
.fq-field-option > span:nth-child(2) { font-weight: 700; color: #E0E9F3; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.fq-field-option > small { color: #A0B3C7; font-size: 9px; }
.fq-field-check { width: 20px; height: 20px; flex: none; display: grid; place-items: center; border-radius: 5px; background: #0D1A2C; color: #A1B5CA; border: 1px solid #486075; font-size: 12px; }
.fq-field-option.active .fq-field-check { background: #3F3A29; color: #F7D391; border-color: #C39958; }
.fq-design-form { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 6px 0 13px; }
.fq-design-form label { display: flex; flex-direction: column; gap: 5px; color: #AFC0D0; font-size: 10px; font-weight: 700; min-width: 0; }
.fq-design-form label:first-child:nth-last-child(2) { grid-column: 1 / -1; }
.fq-design-form .fd-search, .fq-design-form .fd-sel { min-width: 0; width: 100%; height: 34px; border-radius: 7px; border: 1px solid #425875; background: #0D1A2C; color: #F2F5F9; font-size: 11px; }
.fq-design-form > button { align-self: end; }
.fq-dtip { display: block; border-left: 2px solid #B78B4E; padding: 7px 11px; background: rgba(202,157,87,.07); color: #B1C1D2 !important; font-size: 10px; line-height: 1.55; }
.fq-sort-row { display: flex; justify-content: space-between; align-items: center; gap: 9px; background: #1A2A40; padding: 7px 10px; border: 1px solid #344960; border-radius: 6px; margin-bottom: 4px; }
.fq-sort-row b { font-size: 11px; color: #D8E3F0; overflow-wrap: anywhere; }
.fq-sort-row div { display: flex; gap: 3px; }
.fq-sort-row button { background: #0E1B2D; border: 1px solid #46617D; width: 25px; height: 24px; border-radius: 5px; font-size: 13px; }
.fq-basis { border-radius: 9px; border: 1px solid #39506B; background: #192B43; padding: 10px; margin: 0 0 9px; }
.fq-basis-title { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-bottom: 8px; }
.fq-basis-title b { color: #F7F8FA; font-size: 11.5px; }
.fq-basis-title small { color: #9BAFC6; font-size: 10px; }
.fq-basis .fq-design-form { margin-bottom: 8px; }
.fq-basis-note { color: #B7A384; font-size: 10px; line-height: 1.5; }
.fq-design-check { display: flex; align-items: flex-start; gap: 7px; font-size: 10.5px; color: #BECADC; line-height: 1.5; }
.fq-design-check input { accent-color: #D7AF68; }
.fq-design-foot { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex: none; padding: 12px 14px; border-top: 1px solid #39506A; background: #17263D; }
.fq-design-foot button { flex: 1; }
@media (max-width: 1180px) and (min-width: 901px) {
  .fd.qto .fd-qto { width: min(68vw,920px); max-width: calc(100% - 280px); }
  .fq-hero p, .fq-metric small, .fq-sheet-path { display: none; }
  .fq-hero h2 { font-size: 18px; }
  .fq-hero-actions .fd-btn { padding: 6px 8px; }
}
@media (max-width: 900px) {
  .fd.qto .fd-qto, .fd.qto.fq-expanded .fd-qto { max-width: 100%; width: 100% !important; height: 580px; }
  .fd.qto.fq-expanded .fd-stage { min-height: 0; }
  .fq-hero { padding: 10px; }
  .fq-hero p, .fq-hero-actions button:first-child, .fq-sheet-path { display: none; }
  .fq-schedule-footer > div { display: none; }
  .fq-schedule-footer { display: flex; justify-content: flex-end; }
  .fq-hero h2 { font-size: 18px; }
  .fq-metrics { gap: 4px; padding: 6px; }
  .fq-metric { padding: 6px; }
  .fq-metric b { font-size: 15px; }
  .fq-metric small { display: none; }
  .fq-sheet { margin: 6px; }
  .fq-sheet-id small { display: none; }
  .fq-sheet-actions .fd-btn.ghost { display: none; }
  .fq-sheet-toolbar { gap: 5px; }
}
@media (prefers-reduced-motion: reduce) {
  .fq-designer { animation: none; }
}


/* Explicit expert workflow, kept intact without crowding the primary schedule. */
.fq-legacy-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 11px 13px; border-radius: 9px; border: 1px solid #405574; background: #1B2A42; }
.fq-legacy-head div { min-width: 0; }
.fq-legacy-head b { display: block; color: #F1F5F9; font-size: 12px; }
.fq-legacy-head small { display: block; color: #A2B4CC; font-size: 10px; line-height: 1.45; margin-top: 4px; }
.fq-legacy-head .fd-btn { flex: none; border-color: #B69361; color: #EBC58B !important; }
@media (max-width: 700px) {
  .fq-legacy-head { flex-wrap: wrap; }
  .fq-legacy-head .fd-btn { width: 100%; }
}


.fq-evidence { overflow: auto; border: 1px solid #334A65; border-radius: 7px; max-height: 240px; }
.fq-evidence table { width: 100%; border-collapse: collapse; font-size: 10px; min-width: 660px; }
.fq-evidence thead th { position: sticky; top: 0; z-index: 2; text-align: left; padding: 8px 10px; background: #263B54; color: #C3D2E5; border-bottom: 1px solid #435A76; }
.fq-evidence tbody td { text-align: left; white-space: normal; padding: 9px 10px; vertical-align: top; border-bottom: 1px solid #293C55; color: #DAE5F1; }
.fq-evidence tbody td > small { display: block; color: #9AACBE; font-size: 9.5px; line-height: 1.4; padding-top: 2px; max-width: 400px; overflow-wrap: anywhere; }
.fq-evidence tbody td > b { display: block; font-size: 10px; color: #D4BD94; }
.fq-evidence tbody td > .fq-evidence-warning { color: #F5BC83; }
.fq-evidence tbody td.fq-evidence-num { font: 800 11px var(--mono); text-align: right; color: #F7F8FA; }
.fq-evidence tbody td button { white-space: nowrap; }

/* A model schedule scrolls INSIDE its grid, not the page. Every flex ancestor
   must be allowed to shrink to zero; otherwise the grid grows beyond the
   panel while both outer containers hide the overflow. */
.fd.qto .fd-qto, .fq-schedule-mode, .fq-schedule-mode .fq-workspace,
.fq-schedule-mode .fq-sheet, .fq-schedule-mode .fq-sheet-scroll {
  min-height: 0;
  min-width: 0;
}
.fq-schedule-mode .fq-workspace { height: auto; flex: 1 1 auto; overflow: hidden; }
.fq-schedule-mode .fq-sheet-scroll {
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
}
.fq-pickbar { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 13px; border-bottom: 1px solid #46536B; background: #152942; }
.fq-pickbar .fq-pick-label { display: inline-flex; gap: 7px; flex: 1 1 160px; min-width: 0;
  align-items: center; overflow: hidden; }
.fq-pickbar .fq-pick-label b { color: #F2D1A0; font-size: 10px; white-space: nowrap; }
.fq-pickbar .fq-pick-label span { color: #E1EBF4; font-size: 11px; white-space: nowrap;
  text-overflow: ellipsis; overflow: hidden; }
.fq-pickbar label { display: inline-flex; gap: 6px; align-items: center; font-size: 10px;
  font-weight: 750; color: #BFD0E2; }
.fq-pickbar select { max-width: 185px; min-width: 125px; padding: 6px 8px;
  border-radius: 7px; border: 1px solid #51657A; background: #203750; color: #E8F0F8; }
.fq-pickbar button { flex: none; }
.fq-sheet-scroll .fq-data-row.selected td { background: #263D59 !important; }
@media (max-width: 700px) {
  .fq-pickbar { padding: 7px; gap: 5px; }
  .fq-pickbar label { flex: 1 1 170px; }
  .fq-pickbar select { flex: 1; min-width: 0; }
}


/* The command strip must never clip the last actions (including Quantities).
   Keep tools together and let the entire group wrap to a second line when
   project title, date, mode, and status tiles consume the available width. */
.fd-bar-actions {
  display: flex; align-items: center; gap: 6px;
  flex: 0 0 auto; min-width: 0; max-width: 100%;
  margin-left: auto;
}
.fd-bar-actions > .fd-ico, .fd-bar-actions > .fd-div { flex: none; }
.fd-bar-actions .fd-ico { padding-inline: 9px; }
.fd-bar-actions .qto-entry {
  border-color: rgba(217,181,107,.58);
  background: rgba(217,181,107,.14);
  color: #F4D296 !important;
}
.fd-bar-actions .qto-entry svg { color: #EFC67E; }
.fd-bar-actions .qto-entry:hover { background: rgba(217,181,107,.23); color: #FFE2AB !important; }
.fd-bar-actions .qto-entry.on {
  background: rgba(217,181,107,.27);
  border-color: #EAC17A;
  color: #FFE4AD !important;
}
.fd-when .dt { white-space: nowrap; }
@media (max-width: 1440px) {
  /* Keeping the name next to the quantity icon is deliberate: these are
     the Revit-like takeoff/schedule tabs the engineer needs to discover. */
  .fd-bar-actions .qto-entry span { display: inline; }
}
@media (max-width: 900px) {
  .fd-bar-actions { margin-left: 0; width: 100%; flex-wrap: wrap; justify-content: flex-start; }
  .fd-bar-actions .fd-div { display: none; }
}
@media (max-height: 800px) {
  /* Short laptop viewports: leave useful height for the scrolling table. */
  .fq-schedule-mode .fq-head { padding: 6px 8px 0; gap: 4px; }
  .fq-schedule-mode .fq-tabs button { padding: 5px 8px; }
  .fq-schedule-mode .fq-hero { padding: 7px 11px; }
  .fq-schedule-mode .fq-hero h2 { font-size: 17px; }
  .fq-schedule-mode .fq-hero p { display: none; }
  .fq-schedule-mode .fq-metrics { padding: 5px 9px; gap: 5px; }
  .fq-schedule-mode .fq-metric { padding: 4px 8px; }
  .fq-schedule-mode .fq-metric > b { font-size: 15px; }
  .fq-schedule-mode .fq-metric > small { display: none; }
  .fq-schedule-mode .fq-sheet { min-height: 75px; margin: 5px 8px 3px; }
  .fq-schedule-mode .fq-sheet-head { padding: 6px 8px; }
  .fq-schedule-mode .fq-sheet-toolbar { padding: 4px 8px; }
  .fq-schedule-mode .fq-sheet-foot { padding: 5px 8px; }
  .fq-schedule-mode .fq-schedule-footer { display: none; }
}

/* Quantity sub-tabs remain reachable even with mobile browser zoom. */
.fd.qto .fq-tabs { min-width: 0; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
.fd.qto .fq-tabs button { flex: 0 0 auto; white-space: nowrap; }


/* 3.3 – QTO WORKBENCH: dense, table-first engineering UX.
   The old full-screen dashboard metrics/hero are intentionally retired.
   One compact command row, a category tree and a real scrollable grid. */
.fd.qto .fd-qto { min-width: 0; }
.fq-schedule-mode .fq-head {
  padding: 5px 10px 0; gap: 2px; flex: none; border-bottom: 1px solid #334156;
  background: #101928;
}
.fq-schedule-mode .fq-title b { font-size: 12px; }
.fq-schedule-mode .fq-title em { font-size: 9px; }
.fq-schedule-mode .fq-tabs { gap: 2px; }
.fq-schedule-mode .fq-tabs button { padding: 6px 12px; font-size: 10.5px; }
.fq-schedule-mode .fq-body { padding: 0; gap: 0; min-height: 0; }
.fq-schedule-mode .fq-workspace { height: auto; flex: 1 1 auto; min-height: 0; overflow: hidden; background: #0C1421; }
.fq-command-strip { display: flex; flex: none; justify-content: space-between; align-items: center;
  gap: 12px; min-height: 39px; padding: 5px 12px; border-bottom: 1px solid #293950;
  background: #142137; }
.fq-command-title { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; min-width: 0; }
.fq-command-title b { color: #F2F5FB; font-size: 13px; letter-spacing: -.2px; }
.fq-command-title > span { font-size: 10px; color: #9CB0C7; padding-left: 9px; border-left: 1px solid #455671; white-space: nowrap; }
.fq-command-title .fq-inline-warn { color: #EEC588; }
.fq-command-actions { display: flex; align-items: center; gap: 5px; flex: none; }
.fq-command-actions button { white-space: nowrap; font-size: 10px; }
.fq-quantity-strip { padding: 4px 12px; gap: 7px; background: #101C2C; border-bottom: 1px solid #2A3951; }
.fq-quantity-strip > span:not(.fq-quantity-note) { padding: 3px 7px; border-radius: 5px; background: #1B2C41; }
.fq-quantity-strip b { font-size: 11px; }
.fq-quantity-strip em { font-size: 10px; }
.fq-quantity-strip small { font-size: 9px; color: #8297AE; }
.fq-schedule-main { display: flex; flex: 1 1 auto; min-height: 0; min-width: 0; overflow: hidden; }
.fq-category-rail { display: flex; flex: 0 0 182px; min-width: 0; flex-direction: column;
  border-right: 1px solid #34455F; background: #101B2C; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: #42546A #101B2C; }
.fq-rail-title { display: flex; justify-content: space-between; gap: 8px; align-items: center;
  padding: 13px 11px 8px; font-size: 9px; color: #A2B5C8; letter-spacing: .12em; }
.fq-rail-title span { font: 750 10px var(--mono); color: #C2D1E0; background: #22334A; padding: 2px 5px; border-radius: 4px; }
.fq-rail-item { display: flex; gap: 8px; text-align: left; min-height: 39px; align-items: center;
  flex: none; width: 100%; background: transparent; border: 0; border-left: 2px solid transparent;
  padding: 5px 9px; color: #C3D1E0 !important; border-radius: 0; }
.fq-rail-item:hover { background: #1B2B40; }
.fq-rail-item.active { background: #26364D; border-left-color: #E4B96E; color: #FCF5E8 !important; }
.fq-rail-icon { display: grid; flex: none; place-items: center; width: 17px; height: 17px;
  border: 1px solid #43566A; border-radius: 5px; background: #18273B; color: #D5AD71; font-size: 11px; }
.fq-rail-name { display: block; flex: 1; min-width: 0; font-size: 10.5px; font-weight: 750;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.4; }
.fq-rail-name small { display: block; font-size: 9px; font-weight: 500; color: #91A6BD; }
.fq-rail-foot { margin-top: auto; border-top: 1px solid #29394D; padding: 10px; font-size: 9px;
  line-height: 1.5; color: #8296AD; }
.fq-rail-foot b { color: #C1CFE0; }
.fq-schedule-main > .fq-sheet { flex: 1 1 auto; min-width: 0; min-height: 0;
  margin: 6px 8px 5px; border-radius: 6px; background: #111C2B; }
.fq-sheet-head { padding: 6px 9px; min-height: 41px; }
.fq-sheet-id { gap: 7px; }
.fq-sheet-glyph { width: 26px; height: 26px; border-radius: 5px; font-size: 19px; }
.fq-sheet-id b { font-size: 11px; }
.fq-sheet-id small { font-size: 9px; margin-top: 0; }
.fq-sheet-actions { flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.fq-sheet-actions .fd-btn { height: 29px; padding: 3px 9px; font-size: 10px; border-radius: 6px; }
.fq-sheet-actions .fq-stop, .fq-progress button { background: #4B2330 !important; color: #FFD8D8 !important; border-color: #BF6E78 !important; }
.fq-sheet-toolbar { padding: 4px 10px; min-height: 28px; justify-content: space-between; }
.fq-sheet-basis { display: block; flex: 1; min-width: 0; font-size: 10px; color: #A7B9C9;
  text-overflow: ellipsis; overflow: hidden; white-space: nowrap; }
.fq-sheet-toolbar > button { margin-left: auto; }
.fq-schedule-table { font-size: 10.5px; }
.fq-schedule-table th { height: 30px; padding: 5px 8px; font-size: 9.5px; }
.fq-schedule-table td { height: 29px; padding: 5px 8px; }
.fq-schedule-table .fq-num { font-size: 11px; }
.fq-section-row td { padding: 6px 9px; }
.fq-sheet-foot { padding: 4px 8px; font-size: 9px; }
.fq-schedule-footer { margin: 0 8px 5px; min-height: 23px; }
.fq-schedule-footer > div span { display: none; }
.fq-schedule-footer b { font-weight: 550; color: #8FA5BB; }
.fq-progress { gap: 9px; padding: 6px 12px; font-size: 10px; align-items: center; }
.fq-progress-track { flex: 0 1 220px; height: 5px; border-radius: 6px; overflow: hidden;
  background: #293B50; }
.fq-progress-track span { display: block; width: 0; height: 100%; background: #D9AD66;
  transition: width .1s linear; }
.fq-progress button { font-size: 10px; border-radius: 6px; padding: 4px 10px; }
@media (max-width: 1100px) {
  .fq-category-rail { flex-basis: 150px; }
  .fq-command-title { gap: 5px; }
  .fq-command-title > span { padding-left: 5px; }
}
@media (max-width: 900px) {
  .fd.qto .fd-qto { height: 570px; }
  .fq-category-rail { flex-basis: 130px; }
  .fq-command-strip { flex-wrap: wrap; gap: 4px; padding: 5px 8px; }
  .fq-sheet-id small, .fq-sheet-toolbar button { display: none; }
}
@media (max-width: 540px) {
  .fq-category-rail { flex-basis: 112px; }
  .fq-rail-name { font-size: 10px; }
  .fq-rail-name small { font-size: 8.5px; }
  .fq-command-actions .fd-btn { padding: 4px 6px; }
  .fq-sheet-actions .fd-btn { font-size: 9px; }
}

/* Full schedule means no hidden 3D canvas competing for GPU cycles. */
.fd.qto.fq-expanded .fd-stage { display: none; }


/* QTO is an engineering workspace, not an overlay on the 4D simulation.
   Keep the app navigation above it, but take the FULL remaining 4D canvas. */
.fd.qto { grid-template-rows: minmax(0,1fr); gap: 0; }
.fd.qto > .fd-bar, .fd.qto > .fd-time { display: none !important; }
.fd.qto > .fd-main { min-height: 0; width: 100%; }
.fd.qto .fd-qto, .fd.qto.fq-expanded .fd-qto {
  display: flex; flex: 1 1 auto; width: 100% !important; max-width: 100% !important;
  min-width: 0; min-height: 0; height: 100% !important; box-shadow: none;
}
.fd.qto .fd-stage { display: none; }
.fd.qto:not(.fq-expanded) .fd-stage { display: block; flex: 0 0 40%; min-width: 0; }
.fd.qto:not(.fq-expanded) .fd-qto { flex: 1 1 60%; width: 60% !important; max-width: 60% !important; }
.fd.qto .fq-schedule-main { flex: 1 1 auto; min-height: 0; }
.fd.qto .fq-sheet { min-height: 0; }
.fd.qto .fq-sheet-scroll { flex: 1 1 auto; min-height: 0; overflow: auto; }
.fd.qto .fq-designer { width: clamp(370px, 35vw, 590px); max-width: 90%; box-shadow: -12px 0 36px -20px #000; }
.fd.qto .fq-design-body { padding: 12px; }
.fd.qto .fq-command-strip { min-height: 37px; }
@media (max-width: 1000px) {
  .fd.qto:not(.fq-expanded) .fd-stage { flex-basis: 38%; }
  .fd.qto:not(.fq-expanded) .fd-qto { width: 62% !important; max-width: 62% !important; }
}
@media (max-width: 700px) {
  .fd.qto .fd-main { flex-direction: column; }
  .fd.qto:not(.fq-expanded) .fd-stage { flex: 1 1 40%; min-height: 140px; }
  .fd.qto:not(.fq-expanded) .fd-qto { flex: 1 1 60%; width: 100% !important; max-width: 100% !important; }
  .fd.qto .fq-category-rail { flex-basis: 106px; }
  .fd.qto .fq-designer { width: 100%; max-width: 100%; }
}


/* Revit-style nested grouping: one hierarchy column; fields are separate. */
.fq-tree-table { min-width: max(980px, 100%); }
.fq-tree-table .fq-tree-main { min-width: 245px; width: 29%; position: sticky; left: 0; z-index: 4; background: #27374E; }
.fq-tree-table .fq-tree-label,
.fq-tree-table .fq-tree-leaf { position: sticky; left: 0; z-index: 1; min-width: 245px; max-width: 480px; padding-left: calc(12px + var(--indent, 0px)); }
.fq-tree-group { background: #223750; }
.fq-tree-group td { background: #223750 !important; border-bottom: 1px solid #38526A; color: #E9F3FB; }
.fq-tree-group.fq-tree-depth-0 td { background: #29415B !important; border-top: 1px solid #68819A; }
.fq-tree-group.fq-tree-depth-1 td { background: #1E334B !important; }
.fq-tree-group.fq-tree-depth-2 td { background: #192C42 !important; }
.fq-tree-group .fq-tree-label { display: table-cell; overflow: hidden; white-space: nowrap; vertical-align: middle; }
.fq-tree-toggle { flex: none; width: 19px; height: 19px; background: #384C62; border: 1px solid #5E7690; border-radius: 4px; line-height: 16px; padding: 0; color: #E0BD7E !important; }
.fq-tree-type { flex: none; font-size: 9px; letter-spacing: .03em; color: #A4B9CC; text-transform: uppercase; }
.fq-tree-group .fq-tree-label b { font-size: 11px; font-weight: 800; color: #F9DBA3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fq-tree-group .fq-num { font-weight: 750; color: #F4D29D; }
.fq-tree-leaf { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; background: #172438; }
.fq-tree-leafmark { color: #637A92; margin-right: 7px; }
.fq-tree-instance { background: #121D2E; color: #AEC0D4; }
.fq-tree-instance td { font-size: 10px; }
.fq-tree-instance .fq-tree-leaf { background: #121D2E; }
.fq-tree-blank { color: #586C84; }
.fq-tree-table tr.fq-data-row:hover td { background: #253B52; }
.fq-tree-table tr.fq-data-row:hover .fq-tree-leaf { background: #253B52; }
.fq-tree-table .fq-num { white-space: nowrap; text-align: right; }
.fq-data-explorer { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; overflow: hidden; margin: 5px 8px; border: 1px solid #374D67; border-radius: 8px; background: #101D2E; }
.fq-explore-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: none; padding: 10px 13px; border-bottom: 1px solid #344961; }
.fq-explore-head b { display: block; font-size: 13px; color: #F0F6FC; }
.fq-explore-head small { display: block; margin-top: 2px; font-size: 10px; color: #A4B6CA; }
.fq-explore-layout { display: flex; min-height: 0; flex: 1 1 auto; }
.fq-explore-fields { display: flex; flex-direction: column; flex: 0 0 230px; min-width: 0; min-height: 0; border-right: 1px solid #344961; padding: 8px; }
.fq-explore-fields label { display: flex; flex-direction: column; gap: 5px; font-size: 10px; color: #B5C6D6; margin-bottom: 8px; }
.fq-explore-fields .fd-search { min-width: 0; width: 100%; font-size: 10px; }
.fq-explore-fields-list { min-height: 0; overflow: auto; flex: 1 1 auto; scrollbar-width: thin; }
.fq-explore-fields-list button { display: block; width: 100%; background: none; border: none; border-radius: 5px; text-align: left; padding: 6px 8px; }
.fq-explore-fields-list button.on { background: #2D4158; border-left: 2px solid #E5BA76; }
.fq-explore-fields-list button:hover { background: #22364C; }
.fq-explore-fields-list button span { display: block; color: #E6EEF7; font-weight: 700; font-size: 10.5px; overflow-wrap: anywhere; }
.fq-explore-fields-list button small { display: block; margin-top: 2px; font-size: 9px; color: #92A8BF; }
.fq-explore-fields > small { font-size: 9px; color: #889FB6; padding-top: 6px; }
.fq-explore-detail { min-width: 0; min-height: 0; flex: 1 1 auto; display: flex; flex-direction: column; overflow: hidden; }
.fq-explore-field { display: flex; align-items: center; justify-content: space-between; flex: none; gap: 9px; padding: 9px 12px; border-bottom: 1px solid #273B53; }
.fq-explore-field b { display: block; font-size: 12px; color: #F4D39C; }
.fq-explore-field small { display: block; color: #A0B4CA; font-size: 9px; margin-top: 4px; }
.fq-explore-actions { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.fq-explore-values { display: flex; flex: none; gap: 6px; align-items: center; flex-wrap: wrap; padding: 8px 10px; max-height: 112px; overflow-y: auto; border-bottom: 1px solid #34445A; }
.fq-explore-values > b { flex: 0 0 100%; font-size: 9px; color: #B6C8DB; }
.fq-explore-values > button { display: flex; align-items: center; gap: 6px; max-width: 220px; padding: 5px 8px; border: 1px solid #3B536D; border-radius: 6px; color: #D4E1EE !important; background: #22354D; font-size: 10px; }
.fq-explore-values button span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.fq-explore-values button small { flex: none; color: #9CB2C6; }
.fq-explore-values button em { font-style: normal; color: #E8BD78; font-size: 9px; }
.fq-explore-raw { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; padding: 8px 10px; }
.fq-explore-raw > b { color: #E4EDF7; font-size: 11px; }
.fq-explore-raw > small { color: #91A7BC; font-size: 9px; margin: 3px 0 7px; }
.fq-explore-table { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid #33465D; }
.fq-explore-table table { border-collapse: collapse; min-width: max-content; font-size: 10px; }
.fq-explore-table th { position: sticky; top: 0; background: #2A3D55; color: #D8E5F2; padding: 9px 10px; text-align: left; }
.fq-explore-table td { max-width: 320px; min-width: 105px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 6px 10px; border-bottom: 1px solid #2B4055; color: #C9D8E8; }
@media (max-width: 700px) {
  .fq-explore-fields { flex-basis: 135px; }
  .fq-explore-head small, .fq-explore-raw > small { display: none; }
  .fq-explore-actions .fd-btn { padding: 3px 5px; }
}

.fq-selection-only { padding: 7px 12px; background: #4A3326; color: #F8D2A2; border-bottom: 1px solid #8B633A; font-size: 10px; font-weight: 800; letter-spacing: .03em; }

.fq-tree-group .fq-tree-toggle, .fq-tree-group .fq-tree-type, .fq-tree-group .fq-tree-label b { display: inline-block; vertical-align: middle; margin-right: 7px; }


/* 4D Quantity Schedule — readable Revit-like spreadsheet, not a clipped
   side panel. Keep the grid full width and make properties a bounded dialog. */
.fd.qto .fq-schedule-main { min-width:0; width:100%; }
.fd.qto .fq-schedule-main > .fq-sheet { margin:5px 7px; width:calc(100% - 14px); }
.fd.qto .fq-schedule-table.fq-tree-table {
  min-width:100%; width:max-content; table-layout:auto;
}
.fd.qto .fq-tree-table .fq-tree-main { min-width:205px; width:230px; max-width:230px; }
.fd.qto .fq-tree-table .fq-tree-label,
.fd.qto .fq-tree-table .fq-tree-leaf { min-width:205px; max-width:230px; }
.fd.qto .fq-tree-table th:not(.fq-tree-main):not(.fq-num),
.fd.qto .fq-tree-table td:not(.fq-tree-label):not(.fq-tree-leaf):not(.fq-num) {
  min-width:110px; max-width:225px; overflow:hidden; text-overflow:ellipsis;
}
.fd.qto .fq-sheet-scroll {
  overflow-x:auto !important; overflow-y:auto !important;
  scrollbar-width:auto; scrollbar-color:#7589A5 #101C2E;
}
.fd.qto .fq-schedule-controls {
  display:flex; align-items:center; flex-wrap:wrap; gap:6px;
  min-height:47px; padding:6px 10px;
}
.fd.qto .fq-schedule-controls > button,
.fd.qto .fq-schedule-controls .fd-btn,
.fd.qto .fq-command-actions button {
  display:inline-flex !important; align-items:center; justify-content:center;
  margin:0; flex:0 0 auto; min-height:29px; white-space:nowrap;
}
.fd.qto .fq-scope-picker {
  display:inline-flex; flex-direction:row; gap:7px; align-items:center;
  color:#BACBDD; white-space:nowrap; font-size:10px; font-weight:700;
}
.fd.qto .fq-scope-picker .fd-sel { min-width:150px; max-width:230px; }
.fd.qto .fq-search-picker .fd-search {
  width:165px; min-width:110px; height:30px; border:1px solid #435A76;
  border-radius:6px; background:#111F32; color:#F2F6FB; padding:4px 8px;
}
.fd.qto .fq-schedule-controls .fq-sheet-basis {
  flex:1 1 125px; min-width:90px; color:#9CB4D0;
}
.fd.qto .fq-design-backdrop {
  position:absolute; z-index:20; inset:0; background:rgba(3,9,17,.66);
}
.fd.qto .fq-designer {
  position:absolute; z-index:21; top:10px; bottom:10px;
  left:50%; right:auto; transform:translateX(-50%);
  width:min(970px,calc(100% - 24px)); max-width:calc(100% - 24px);
  min-width:0; height:auto; max-height:calc(100% - 20px);
  border:1px solid #6983A1; border-radius:11px; overflow:hidden;
  box-shadow:0 24px 70px rgba(0,0,0,.6); animation:none;
}
.fd.qto .fq-design-head { padding:12px 16px; }
.fd.qto .fq-design-body { flex:1 1 auto; min-height:0; overflow-y:auto; padding:12px 15px; }
.fd.qto .fq-design-foot { padding:8px 14px; }
.fd.qto .fq-field-manager {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  min-height:270px; height:min(480px,55vh); gap:12px;
}
.fd.qto .fq-field-column {
  min-width:0; min-height:0; display:flex; flex-direction:column;
  padding:10px; border:1px solid #3D5573; border-radius:9px; background:#101C2E;
}
.fd.qto .fq-field-column-head {
  display:flex; align-items:baseline; justify-content:space-between;
  gap:8px; padding:1px 3px 8px; color:#F2F5FB; font-size:12px;
}
.fd.qto .fq-field-column-head small { color:#9EADC2; font-size:10px; }
.fd.qto .fq-field-search {
  display:block; width:100%; min-width:0; flex:none;
  background:#142840; border:1px solid #48627E; color:#F4F7FC;
  border-radius:6px; padding:8px 9px; margin-bottom:8px;
}
.fd.qto .fq-field-list {
  flex:1 1 auto; min-height:0; overflow-y:auto; scrollbar-width:thin;
}
.fd.qto .fq-field-list .fq-field-option { margin:2px 0; padding:7px; }
.fd.qto .fq-field-selected .fq-sort-row { margin:3px 0; }
.fd.qto .fq-field-selected .fq-sort-row button:disabled { opacity:.3; cursor:default; }
@media(max-width:720px) {
  .fd.qto .fq-designer { top:5px; bottom:5px; width:calc(100% - 10px); max-width:calc(100% - 10px); max-height:calc(100% - 10px); }
  .fd.qto .fq-field-manager { grid-template-columns:1fr; grid-template-rows:minmax(160px,1fr) minmax(160px,1fr); height:auto; }
  .fd.qto .fq-field-column { min-height:160px; max-height:38vh; }
  .fd.qto .fq-schedule-controls .fq-search-picker { display:none; }
  .fd.qto .fq-design-tabs button { padding:8px 3px; }
}

/* Revit workflow: retain the category browser and keep every Schedule action
   visible. Form controls wrap; the data grid alone scrolls horizontally. */
.fd.qto .fq-category-rail { flex:0 0 198px; overflow-y:auto; min-height:0; }
.fd.qto .fq-schedule-main > .fq-sheet { flex:1 1 0; width:auto; min-width:0; }
.fd.qto .fq-sheet-head {
  display:flex; flex-wrap:wrap; min-width:0; overflow:visible;
  align-items:center; gap:8px; padding:8px 11px;
}
.fd.qto .fq-sheet-id { flex:0 1 220px; min-width:150px; }
.fd.qto .fq-sheet-actions {
  flex:1 1 460px; min-width:0; display:flex; gap:5px;
  align-items:center; flex-wrap:wrap; justify-content:flex-end;
}
.fd.qto .fq-sheet-actions .fd-btn {
  display:inline-flex !important; flex:0 0 auto;
  margin:0; max-width:100%; white-space:nowrap; visibility:visible;
}
.fd.qto .fq-schedule-controls { flex-wrap:wrap; min-width:0; gap:6px; }
.fd.qto .fq-schedule-controls > button { display:inline-flex !important; }
.fd.qto .fq-flat-table th:first-child,
.fd.qto .fq-flat-table td:first-child {
  position:sticky; left:0; z-index:2; min-width:170px; background:#203049;
}
.fd.qto .fq-flat-table td:first-child { z-index:1; background:#172438; }
.fd.qto .fq-page-controls { display:flex; align-items:center; gap:7px; flex-wrap:wrap; }
.fd.qto .fq-page-controls button {
  display:inline-flex; align-items:center; justify-content:center;
  border:1px solid #435C78; border-radius:6px;
  padding:3px 9px; color:#E9F1FC; background:#233750; min-height:25px;
}
.fd.qto .fq-page-controls button:disabled { opacity:.4; cursor:default; }
.fd.qto .fq-sheet-pagination { flex-wrap:wrap; justify-content:space-between; }
.fd.qto .fq-design-body .fq-field-manager { height:min(560px,62vh); }
.fd.qto .fq-designer { width:min(1040px,calc(100% - 22px)); max-width:calc(100% - 22px); }
.fd.qto .fq-design-body .fq-field-list { overflow:auto; }
.fd.qto .fq-design-body .fq-field-option { text-align:left; }
.fd.qto .fq-design-body .fq-field-option small { white-space:nowrap; }
@media(max-width:800px) {
  .fd.qto .fq-category-rail { flex-basis:150px; }
  .fd.qto .fq-schedule-controls .fq-sheet-basis { display:none; }
}
@media(max-width:560px) {
  .fd.qto .fq-category-rail { flex-basis:118px; }
  .fd.qto .fq-sheet-actions { justify-content:flex-start; }
  .fd.qto .fq-design-body .fq-field-manager { height:auto; }
}


/* 4D Schedule viewport and column navigation: prevent a wide Revit schedule
   from increasing the intrinsic width of any parent. Only the grid scrolls. */
.fd.qto { width:100%; min-width:0; min-height:0; max-width:100%; box-sizing:border-box; }
.fd.qto .fd-main { width:100%; max-width:100%; min-width:0; overflow:hidden; }
.fd.qto .fd-qto { width:100% !important; min-width:0 !important; max-width:100% !important; }
.fd.qto .fq, .fd.qto .fq-schedule-mode, .fd.qto .fq-body,
.fd.qto .fq-workspace, .fd.qto .fq-schedule-main {
  width:100%; max-width:100%; min-width:0; min-height:0; box-sizing:border-box;
}
.fd.qto .fq-category-rail { flex:0 0 clamp(122px,15vw,194px); min-width:0; max-width:194px; overflow-y:auto; }
.fd.qto .fq-schedule-main > .fq-sheet {
  flex:1 1 0 !important; min-width:0 !important; width:0 !important;
  max-width:calc(100% - 130px); margin:5px 6px; overflow:hidden;
}
.fd.qto .fq-sheet-head,.fd.qto .fq-sheet-toolbar {
  max-width:100%; box-sizing:border-box; min-width:0;
  display:flex; flex-wrap:wrap !important; overflow:visible;
  row-gap:5px; column-gap:6px;
}
.fd.qto .fq-sheet-actions { flex:1 1 auto; max-width:100%; min-width:0; flex-wrap:wrap; justify-content:flex-start; }
.fd.qto .fq-schedule-controls > .fd-btn { margin-left:0 !important; }
.fd.qto .fq-schedule-controls .fq-sheet-basis { flex:1 1 120px; max-width:100%; }
.fd.qto .fq-sheet-scroll {
  width:100%; max-width:100%; min-width:0; overflow-x:scroll !important;
  scrollbar-width: auto !important; scrollbar-color:#7D94B1 #111D2C;
  overscroll-behavior-x:contain;
}
.fd.qto .fq-sheet-scroll::-webkit-scrollbar { height:12px; width:10px; }
.fd.qto .fq-sheet-scroll::-webkit-scrollbar-track { background:#101C2D; }
.fd.qto .fq-sheet-scroll::-webkit-scrollbar-thumb { background:#5A7494; border-radius:6px; border:2px solid #101C2D; }
.fd.qto .fq-sheet-scroll .fq-schedule-table { width:max-content; min-width:100%; table-layout:auto; }
.fd.qto .fq-sheet-scroll.fq-fit-columns .fq-schedule-table {
  width:100% !important; min-width:100% !important; table-layout:fixed;
}
.fd.qto .fq-sheet-scroll.fq-fit-columns .fq-schedule-table th,
.fd.qto .fq-sheet-scroll.fq-fit-columns .fq-schedule-table td {
  min-width:0 !important; max-width:none !important;
  width:auto !important; overflow:hidden; white-space:nowrap; text-overflow:ellipsis;
  padding-left:6px; padding-right:6px;
}
.fd.qto .fq-col-nav { width:31px; padding:0 !important; }
.fd.qto .fq-field-category { display:flex; align-items:center; flex-wrap:wrap; gap:8px;
  font-size:11px; font-weight:700; color:#CAD7E8; margin-bottom:12px; }
.fd.qto .fq-field-category select { min-width:min(240px,100%); max-width:100%;
  background:#1D304B; color:#EFF6FE; border:1px solid #536B88; border-radius:6px; padding:7px; }
.fd.qto .fq-designer { top:8px; bottom:8px; max-height:calc(100% - 16px); }
.fd.qto .fq-design-body { min-height:0; flex:1 1 auto; }
.fd.qto .fq-field-manager { min-height:240px; max-height:100%; }
.fd-model-context { position:absolute; z-index:150; width:238px; max-width:calc(100% - 12px);
  padding:6px; background:#14243B; border:1px solid #6B83A0;
  color:#EAF2FB; border-radius:11px; box-shadow:0 16px 38px #0009; }
.fd-model-context-head { color:#F0C984; font-weight:800; font-size:11px;
  padding:7px 9px 10px; white-space:nowrap; text-overflow:ellipsis; overflow:hidden;
  border-bottom:1px solid #41536C; margin-bottom:4px; }
.fd-model-context button { display:block; width:100%; background:transparent;
  border:0; border-radius:6px; color:#E7EDF7 !important; text-align:left;
  padding:8px 10px; font-size:11px; cursor:pointer; }
.fd-model-context button:hover,.fd-model-context button:focus-visible { background:#284363; color:white !important; }
@media(max-width:760px) {
  .fd.qto .fq-category-rail { flex:0 0 122px; }
  .fd.qto .fq-schedule-main > .fq-sheet { max-width:calc(100% - 124px); }
  .fd.qto .fq-field-manager { grid-template-columns:1fr; height:auto; }
  .fd.qto .fq-field-column { max-height:30vh; }
  .fd.qto .fq-sheet-toolbar .fq-search-picker { display:flex; }
}


/* 4D Revit-style schedule clarity — compact primary controls, optional tools,
   and explicit separation of source properties from Nexora takeoff totals. */
.fd.qto .fq-sheet-head, .fd.qto .fq-sheet-toolbar { position:relative; z-index:11; overflow:visible; }
.fd.qto .fq-sheet-toolbar { z-index:10; align-items:center; }
.fd.qto .fq-sheet-head { z-index:12; }
.fd.qto .fq-tools-menu { position:relative; display:inline-flex; align-items:center; flex:0 0 auto; color:#E9EFFA; }
.fd.qto .fq-tools-menu > summary {
  display:inline-flex; gap:8px; align-items:center; min-height:30px;
  padding:5px 10px; cursor:pointer; list-style:none;
  border:1px solid #4F6380; border-radius:7px;
  font-size:10px; font-weight:800; background:#203149; color:#DEE8F7;
}
.fd.qto .fq-tools-menu > summary::-webkit-details-marker { display:none; }
.fd.qto .fq-tools-menu > summary span { color:#E4BA78; }
.fd.qto .fq-tools-menu[open] > summary { border-color:#D6AF72; background:#2B3D55; }
.fd.qto .fq-tools-popover {
  position:absolute; top:calc(100% + 5px); right:0; z-index:32;
  display:flex; flex-direction:column; gap:2px; min-width:215px; width:max-content;
  max-width:min(285px,75vw); max-height: min(450px,60vh); overflow:auto;
  padding:6px; background:#15253A; border:1px solid #526984;
  border-radius:10px; box-shadow:0 12px 34px #020A18bb;
}
.fd.qto .fq-tools-popover button {
  display:block !important; background:transparent !important;
  color:#E8EEF9 !important; min-height:32px !important;
  border:none !important; padding:8px 11px !important;
  border-radius:6px !important; text-align:left !important;
  font-size:10.5px !important; font-weight:650 !important;
  justify-content:flex-start !important; width:100% !important;
}
.fd.qto .fq-tools-popover button:hover:not(:disabled) { background:#2D425D !important; }
.fd.qto .fq-tools-popover button:disabled { opacity:.4; }
.fd.qto .fq-sheet-actions { flex:0 1 auto; justify-content:flex-end; }
.fd.qto .fq-sheet-toolbar > .fq-tools-menu { margin-left:0; }
.fd.qto .fq-takeoff-legend {
  padding:5px 11px; border-bottom:1px solid #2F4057;
  background:#101D2F; color:#91ABC4; font-size:9.5px; line-height:1.45;
}
.fd.qto .fq-takeoff-legend b { color:#E0E8F5; font-weight:800; }
.fd.qto .fq-clear-selection, .fd.qto .fq-pickbar .fq-clear-selection {
  display:inline-flex !important; flex:0 0 auto; align-items:center;
  min-height:29px; white-space:nowrap; border:1px solid #99676B !important;
  background:#3A2736 !important; color:#FFD9DB !important;
  border-radius:7px; font-weight:800; padding:5px 10px;
}
.fd.qto .fq-clear-selection:hover { background:#5A303A !important; }
.fd.qto .fq-field-source, .fd.qto .fq-group-presets {
  display:flex; flex-wrap:wrap; align-items:center; gap:5px;
  padding:6px; margin-bottom:10px; background:#101E32;
  border:1px solid #2C425D; border-radius:8px;
}
.fd.qto .fq-field-source span, .fd.qto .fq-group-presets span {
  color:#9CB0C9; font-size:9px; font-weight:800; padding:0 5px;
}
.fd.qto .fq-field-source button, .fd.qto .fq-group-presets button {
  border:1px solid #435A78; border-radius:6px; padding:6px 8px;
  background:#1C3047; color:#DDE8F6 !important; font-size:10px; font-weight:700;
}
.fd.qto .fq-field-source button.on { border-color:#D1AC70; color:#FBE6BB !important; background:#32435A; }
.fd.qto .fq-group-presets button:hover, .fd.qto .fq-field-source button:hover { background:#304964; }
.fd.qto .fq-selection-summary {
  border:1px solid #385774; background:#15253A; border-radius:10px;
  padding:10px; margin:7px; display:flex; flex-direction:column; gap:7px;
}
.fd.qto .fq-selection-head { display:flex; justify-content:space-between; gap:10px; align-items:center; }
.fd.qto .fq-selection-head b { display:block; font-size:14px; color:#F1D59D; }
.fd.qto .fq-selection-head small { display:block; margin-top:4px; color:#A3B8CF; line-height:1.4; }
.fd.qto .fq-selection-actions { display:flex; gap:6px; flex-wrap:wrap; }
.fd.qto .fq-selection-list {
  display:flex; flex-direction:column; gap:3px; max-height:220px; overflow:auto;
  border:1px solid #2C425A; border-radius:7px; padding:3px;
}
.fd.qto .fq-selection-list > button {
  border:0; border-radius:5px; padding:7px 10px; background:#1A2C42;
  color:#E3EEF8 !important; display:flex; justify-content:space-between;
  gap:8px; font-size:10.5px; text-align:left; align-items:center;
}
.fd.qto .fq-selection-list > button:hover { background:#2B445F; }
.fd.qto .fq-selection-list > button span { min-width:0; overflow-wrap:anywhere; }
.fd.qto .fq-selection-list > button b { white-space:nowrap; color:#F2D29A; }
.fd.qto .fq-selection-list small { color:#9CB1CC; padding:5px; }
.fd.qto .fq-bulk-install {
  margin:6px 8px; padding:10px; border-radius:8px;
  border:1px solid #344860; background:#111E30;
}
.fd.qto .fq-bulk-install summary { cursor:pointer; color:#E8CA97; font-size:11px; font-weight:750; }
.fd.qto .fq-el { display:flex; align-items:center; flex-wrap:wrap; gap:8px; padding:7px 10px; }
.fd.qto .fq-el > div { flex:1 1 140px; min-width:0; }
.fd.qto .fq-el small { display:block; color:#E2BB7D; font-size:8px; letter-spacing:.12em; margin-bottom:4px; font-weight:800; }
.fd.qto .fq-el b { display:block; min-width:0; overflow-wrap:anywhere; }
.fd.qto .fq-evidence-hint { color:#A8BBCF; background:#17263B; margin:4px 8px; padding:8px; border:1px solid #34506E; border-radius:7px; font-size:10px; }
.fd.qto .fq-kv, .fd.qto .fq-kv.q { table-layout:auto; width:100%; }
.fd.qto .fq-kv td, .fd.qto .fq-kv th { vertical-align:top; overflow-wrap:anywhere; }
.fd.qto .fq-kv.q td:last-child { max-width:390px; min-width:180px; font-size:10px; line-height:1.5; }
@media(max-width:800px) {
  .fd.qto .fq-sheet-toolbar { gap:5px; }
  .fd.qto .fq-tools-popover { right:0; }
  .fd.qto .fq-selection-head { flex-wrap:wrap; }
  .fd.qto .fq-field-source { flex-wrap:wrap; }
}


/* 4D Model Schedule: grouped hierarchy, field suggestions and native
   per-category facet navigation. No forced dashboard, and only the grid scrolls. */
.fd.qto .fq-schedule-controls {
  justify-content:flex-start !important; gap:6px !important;
  align-items:center; flex-wrap:wrap;
}
.fd.qto .fq-schedule-controls > button,
.fd.qto .fq-schedule-controls > .fq-fields-control,
.fd.qto .fq-schedule-controls > .fq-tools-menu {
  margin:0 !important; flex:0 0 auto !important;
}
.fd.qto .fq-schedule-controls .fq-search-picker { flex:0 1 230px; margin-right:3px; }
.fd.qto .fq-schedule-controls .fq-search-picker input {
  width:190px; max-width:100%;
}
.fd.qto .fq-fields-control { position:relative; z-index:15; }
.fd.qto .fq-field-suggestions {
  position:absolute; left:0; top:calc(100% + 6px); width:258px;
  max-width:min(300px,75vw); max-height:420px; overflow:auto; z-index:35;
  border:1px solid #4A6482; border-radius:9px; background:#112138;
  box-shadow:0 16px 40px #0009; padding:7px;
}
.fd.qto .fq-suggest-head { display:flex; justify-content:space-between; align-items:center; gap:8px;
  padding:5px 6px 9px; border-bottom:1px solid #32455F; margin-bottom:4px; color:#F5E1BA; font-size:11px; }
.fd.qto .fq-suggest-head button { border:0; color:#9EC1EC; background:none; font-size:10px; cursor:pointer; }
.fd.qto .fq-field-suggestions > button {
  width:100%; display:flex; text-align:left; gap:8px; align-items:center;
  border:0; border-radius:6px; padding:7px 8px; color:#E8F0FA; background:transparent; cursor:pointer;
}
.fd.qto .fq-field-suggestions > button:hover:not(:disabled) { background:#2C4260; }
.fd.qto .fq-field-suggestions > button:disabled { opacity:.55; cursor:default; }
.fd.qto .fq-field-suggestions > button > span { width:22px; color:#E8C98D; font-size:14px; text-align:center; }
.fd.qto .fq-field-suggestions > button > b { flex:1; font-size:11px; }
.fd.qto .fq-field-suggestions > button > small { color:#90A9C5; font-size:9px; }
.fd.qto .fq-schedule-content { min-width:0; min-height:0; flex:1 1 auto; display:flex; overflow:hidden; }
.fd.qto .fq-schedule-grid {
  flex:1 1 0; display:flex; flex-direction:column; min-width:0; min-height:0; overflow:hidden;
}
.fd.qto .fq-schedule-grid > .fq-sheet-scroll { flex:1 1 auto; min-height:0; }
.fd.qto .fq-schedule-grid > .fq-sheet-foot { flex:0 0 auto; }
.fd.qto .fq-schedule-content.with-insights .fq-insights {
  flex:0 0 clamp(215px,21vw,310px); min-width:0;
}
.fd.qto .fq-insights {
  display:flex; flex-direction:column; min-height:0; overflow:hidden;
  background:#101D30; border-left:1px solid #3B5271; color:#EAF0F8;
}
.fd.qto .fq-insights-head { display:flex; justify-content:space-between; align-items:flex-start;
  padding:11px 12px 9px; border-bottom:1px solid #2E4260; gap:8px; }
.fd.qto .fq-insights-head b { display:block; font-size:12px; }
.fd.qto .fq-insights-head small { display:block; padding-top:5px; color:#A9BED7; font-size:10px; }
.fd.qto .fq-insights-tabs { display:flex; gap:8px; align-items:center; padding:10px 10px 7px; }
.fd.qto .fq-insights-tabs > * { color:#AFC1D8; background:none; border:0; padding:4px 2px; font-size:10px; }
.fd.qto .fq-insights-tabs > .active { color:#F3CB86; border-bottom:2px solid #D4A961; font-weight:800; }
.fd.qto .fq-insights-tabs button { cursor:pointer; }
.fd.qto .fq-insights-search { display:flex; gap:7px; align-items:center; color:#D7BC8C;
  margin:4px 10px 9px; border:1px solid #45607C; background:#14283D; padding:0 7px; border-radius:7px; }
.fd.qto .fq-insights-search input { flex:1; width:0; min-width:0; border:0; background:transparent;
  color:#E8EFF8; padding:8px 1px; font-size:10px; }
.fd.qto .fq-insights-list { flex:1 1 auto; min-height:0; overflow:auto; padding:0 9px 8px; scrollbar-width:thin; }
.fd.qto .fq-insights-section { border-bottom:1px solid #2F455F; margin:0 0 7px; padding:3px 0 7px; }
.fd.qto .fq-facet-heading {
  display:flex; justify-content:space-between; align-items:center; width:100%; gap:8px;
  background:transparent; color:#EAF1FC; border:0; padding:6px 3px;
  text-align:left; font-size:11px; font-weight:800; cursor:pointer;
}
.fd.qto .fq-facet-heading small { color:#9DB3CE; font-size:9px; font-weight:600; }
.fd.qto .fq-facet-heading > b { color:#E5BC78; font-size:9px; white-space:nowrap; }
.fd.qto .fq-facet-values { display:flex; flex-direction:column; gap:2px; }
.fd.qto .fq-facet-values > small, .fd.qto .fq-header-filter-values > small {
  color:#9FB4CE; font-size:10px; padding:7px; }
.fd.qto .fq-facet-value {
  display:flex; gap:8px; align-items:center; width:100%; min-width:0; padding:6px 8px;
  border:1px solid transparent; border-radius:6px; background:transparent;
  color:#CAD8EB; cursor:pointer; text-align:left; font-size:10px;
}
.fd.qto .fq-facet-value:hover { background:#223853; }
.fd.qto .fq-facet-value.on { background:#263C55; border-color:#8A714D; color:#FFE5B9; }
.fd.qto .fq-facet-check { flex:0 0 13px; height:13px; border:1px solid #59718F;
  display:flex; justify-content:center; align-items:center; border-radius:3px; color:#EAC789; font-size:10px; }
.fd.qto .fq-facet-name { flex:1 1 0; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.fd.qto .fq-facet-value b { font-size:10px; color:#AFC4DF; font-variant-numeric:tabular-nums; }
.fd.qto .fq-insights-foot { flex:0 0 auto; border-top:1px solid #344965; padding:9px 11px;
  font-size:10px; line-height:1.45; color:#9FB5D0; background:#172941; }
.fd.qto .fq-insights-foot b { color:#E7F0FF; display:block; margin-bottom:4px; }
.fd.qto .fq-insights-foot p { margin:0 0 7px; }
.fd.qto .fq-insights-foot button { color:#F2C980; border:1px solid #65563F; border-radius:5px;
  background:transparent; padding:5px 7px; cursor:pointer; }
.fd.qto .fq-column-head { position:relative; }
.fd.qto .fq-column-head > span { display:inline-block; max-width:calc(100% - 24px);
  overflow:hidden; white-space:nowrap; text-overflow:ellipsis; vertical-align:middle; }
.fd.qto .fq-column-filter { float:right; width:20px; height:20px; cursor:pointer;
  border:1px solid #4B607E; background:#1C3049; color:#AFBED1; border-radius:4px; }
.fd.qto .fq-column-filter:hover,.fd.qto .fq-column-filter.active { color:#F4CA83; border-color:#D2AE73; }
.fd.qto .fq-header-filter-panel { flex:0 0 auto; display:block; padding:8px 11px;
  background:#1A304B; border-bottom:1px solid #507199; max-height:245px; overflow:auto; }
.fd.qto .fq-header-filter-panel > b { font-size:11px; color:#F5D59D; }
.fd.qto .fq-header-filter-panel > .fd-mini { float:right; }
.fd.qto .fq-header-filter-panel p { color:#A9BFD9; font-size:10px; margin:4px 0 8px; }
.fd.qto .fq-header-filter-values { display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:3px; max-height:120px; overflow:auto; }
.fd.qto .fq-header-filter-foot { display:flex; gap:9px; padding-top:7px; }
.fd.qto .fq-header-filter-foot button { background:#243D5A; border:1px solid #44627F;
  border-radius:5px; color:#D8E8F8; padding:6px 10px; cursor:pointer; font-size:10px; }
.fd.qto .fq-tree-group .fq-tree-label { min-width:265px !important; max-width:360px !important; }
.fd.qto .fq-tree-group .fq-tree-label .fq-tree-groupname { color:#F1CD87 !important; font-weight:800;
  white-space:nowrap; text-overflow:ellipsis; overflow:hidden; display:inline-block; max-width:200px;
  vertical-align:middle; padding-left:6px; }
.fd.qto .fq-tree-group .fq-tree-type { font-size:9px; color:#9DB9DB; }
.fd.qto .fq-tree-count { color:#AEC0D9; white-space:nowrap; margin-left:6px; font-size:9px; }
.fd.qto .fq-missing-value { display:block; font-size:9px; white-space:nowrap;
  color:#9BB0C9; font-weight:600; }
@media(max-width:1080px) {
  .fd.qto .fq-schedule-content.with-insights .fq-insights { flex-basis:215px; }
}
@media(max-width:800px) {
  .fd.qto .fq-schedule-content.with-insights { flex-direction:column; }
  .fd.qto .fq-insights { flex:0 0 180px !important; border-left:0; border-top:1px solid #46617C; }
  .fd.qto .fq-insights-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; }
  .fd.qto .fq-insights-foot { display:none; }
}

/* Model element context actions (one row, nested group or entire category). */
.fd.qto .fq-context-menu { position:fixed; z-index:9998; width:255px;
  max-width:calc(100vw - 20px); background:#172A42;
  border:1px solid #6683A4; border-radius:10px;
  box-shadow:0 18px 45px #030915E6; padding:6px; color:#E6F0FB; }
.fd.qto .fq-context-title { padding:9px 10px; display:flex; flex-direction:column; gap:4px;
  border-bottom:1px solid #385573; margin-bottom:3px; }
.fd.qto .fq-context-title b { font-size:11px; color:#FFDFA6; white-space:normal;
  overflow-wrap:anywhere; line-height:1.4; }
.fd.qto .fq-context-title small { color:#B4C8E2; font-size:10px; }
.fd.qto .fq-context-menu > button { display:block; width:100%; cursor:pointer;
  font-size:11px; padding:9px 10px; color:#DCEBFC; text-align:left;
  background:transparent; border:0; border-radius:6px; }
.fd.qto .fq-context-menu > button:hover,.fd.qto .fq-context-menu > button:focus-visible {
  color:white; background:#2F4D6D; }
.fd.qto .fq-tree-group[data-qto-context],.fd.qto .fq-data-row[data-qto-context] {
  cursor:context-menu; }
.fd.qto .fq-group-repeated { color:#E6CC96 !important; font-weight:700; }
.fd.qto .fq-tree-groupname { max-width:270px !important; }
.fd.qto .fq-tree-group .fq-tree-label { min-width:310px !important; }

/* Show full Family / Type value on the tree header rather than an ellipsis.
   The grid's own horizontal scrollbar handles its natural engineering width. */
.fd.qto .fq-schedule-table th.fq-tree-main { min-width:375px; }
.fd.qto .fq-tree-group .fq-tree-label { min-width:375px !important; max-width:510px !important;
  white-space:normal !important; overflow:visible !important; line-height:1.45; }
.fd.qto .fq-tree-group .fq-tree-groupname { max-width:340px !important;
  white-space:normal !important; overflow-wrap:anywhere; text-overflow:clip;
  vertical-align:middle; }
.fd.qto .fq-tree-group td { height:auto; }

/* ── BOQ intelligence tab (fd-qto-intel-view.js) — the panel's own tokens ── */
.fqi { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.fqi-sp { flex: 1 1 auto; }
.fqi-modes .fd-btn .fq-pill { margin-left: 4px; }
.fqi-card { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: rgba(148, 163, 184, .04); display: flex; flex-direction: column; gap: 6px; }
.fqi-disc { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow: auto; }
.fqi-disc-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 11.5px; }
.fqi-chip { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 10.5px; border: 1px solid var(--line); color: var(--tx2); background: rgba(148, 163, 184, .08); cursor: help; }
.fqi-chip.ok { border-color: rgba(52, 211, 153, .4); color: var(--ok); }
.fqi-chip.warn { border-color: rgba(245, 165, 36, .4); color: var(--act); }
.fqi-el-head { display: flex; align-items: center; gap: 8px; }
.fqi-el-head .fd-mini { margin-left: auto; }
.fqi-el-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; font-size: 11.5px; }
.fqi-ev { margin: 2px 0; padding-left: 16px; font-size: 11.5px; color: var(--tx2); line-height: 1.45; }
.fqi-ev li.bad { color: var(--bad); }
.fqi-fix summary { cursor: pointer; font-size: 11.5px; color: var(--sel); }
.fqi-table { max-height: 58vh; }
.fqi-table tr.fqi-d td { background: var(--bg2); font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 10.5px; color: var(--mu); }
.fqi-table tr.fqi-c td { font-weight: 700; color: var(--tx); background: rgba(148, 163, 184, .05); }
.fqi-table td.fqi-desc { white-space: normal !important; min-width: 220px; max-width: 460px; }
.fqi-table td.n, .fqi-table th.n { text-align: right; font-family: var(--mono); }
.fqi-table .fd-sel.sm { height: 24px; padding: 0 4px; font-size: 11px; }
.fqi-table tr.fqi-r-bad td:last-child, .fqi-table tr.fqi-r-bad td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.fqi-table tr.fqi-r-warn td:first-child { box-shadow: inset 3px 0 0 var(--act); }
.fqi-table tr.fqi-r-ok td:first-child { box-shadow: inset 3px 0 0 var(--ok); }
.fqi-detail { display: flex; flex-direction: column; gap: 6px; padding: 4px 0; }
.fqi-trace { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow: auto; font-size: 11.5px; }
.fqi-trace .c { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .6fr) auto auto minmax(0, 2fr) auto; gap: 8px; align-items: center; }
.fqi-trace .c > a, .fqi-trace .c > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fqi-trace .c .n { font-family: var(--mono); text-align: right; }
.fqi-pair { border-left: 2px solid var(--line2); padding: 4px 0 4px 8px; display: flex; flex-direction: column; gap: 4px; }
.fqi-filters span[role="button"] { cursor: pointer; }
.fqi-filters span.on { outline: 1px solid var(--sel); }
.fqi-foot { font-size: 10.5px; }
.fqi .fq-acts > .fd-search { flex: 1 1 220px; width: auto; min-width: 160px; }
.fqi .fq-acts > .fd-sel { flex: 0 1 280px; width: auto; }

/* ── BOQ workspace (one tab): source bar, filters, the BOQ in its own layout ── */
.fqi-t-ok { color: #34D399 !important; background: rgba(52, 211, 153, .13) !important; border-color: rgba(52, 211, 153, .35) !important; }
.fqi-t-warn { color: #F5B544 !important; background: rgba(245, 165, 36, .13) !important; border-color: rgba(245, 165, 36, .35) !important; }
.fqi-t-bad { color: #F87171 !important; background: rgba(248, 113, 113, .13) !important; border-color: rgba(248, 113, 113, .38) !important; }
.fqi-t-mu { color: var(--tx2) !important; background: rgba(148, 163, 184, .12) !important; border-color: var(--line) !important; }
b.fqi-t-ok, b.fqi-t-warn, b.fqi-t-bad { background: none !important; }
.fq-msg.fqi-t-bad, .fq-msg.fqi-t-warn { color: var(--tx) !important; }
.fq-msg a { margin-left: 6px; }
.fqi-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fqi .fqi-bar .fd-sel.fqi-src { flex: 1 1 260px; max-width: 420px; height: 30px; }
.fqi .fqi-bar .fd-sel.fqi-more { flex: 0 0 auto; width: auto; height: 30px; margin-left: auto; }
.fqi-model { font-size: 11.5px; color: var(--tx2); }
.fqi-model a { color: var(--sel); cursor: pointer; }
.fqi-back { display: flex; gap: 10px; align-items: baseline; font-size: 12px; }
.fqi-back a { color: var(--sel); cursor: pointer; }
.fqi-start { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.fqi-go p { margin: 2px 0 6px; color: var(--tx2); font-size: 12px; line-height: 1.5; }
.fqi-go .fd-btn { align-self: flex-start; }
.fqi-act { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fqi-f { border: 1px solid var(--line); background: rgba(148, 163, 184, .06); color: var(--tx2); border-radius: 8px; padding: 4px 10px; font-size: 11.5px; cursor: pointer; }
.fqi-f b { font-family: var(--mono); color: var(--tx); margin-left: 3px; }
.fqi-f.on { border-color: var(--sel); color: var(--tx); background: rgba(96, 165, 250, .12); }
.fqi-f-matched b { color: #34D399; } .fqi-f-diff b, .fqi-f-review b { color: #F5B544; } .fqi-f-missing b, .fqi-f-other b { color: #F87171; }
.fqi-grid { max-height: 64vh; }
.fqi-grid th, .fqi-grid td { font-size: 11.5px; }
.fqi-grid td.fqi-dc, .fqi-grid th.fqi-dc { white-space: normal !important; min-width: 260px; max-width: 520px; }
.fqi-grid .fqi-rn { color: var(--mu); font-family: var(--mono); width: 34px; text-align: right; }
.fqi-grid th.fqi-m { background: #16263F; color: #9CC2F5; }
.fqi-grid td.fqi-m { background: rgba(96, 165, 250, .06); white-space: nowrap; }
.fqi-grid tr.fqi-hd td { font-weight: 800; color: var(--tx); background: rgba(148, 163, 184, .07); }
.fqi-grid tr.fqi-it td { white-space: normal; }
.fqi-sug { color: var(--mu); }
.fqi-extra summary { cursor: pointer; font-size: 12px; }
.fqi-table tr.fqi-g td { font-weight: 700; font-size: 11px; color: #9CC2F5; background: rgba(96, 165, 250, .05); padding-left: 14px; }
.fqi-grid tr.fqi-gap td { height: 9px; padding: 0; border-bottom: 0; }
.fqi-grid tr.fqi-gap td.fqi-rn { font-size: 9px; color: rgba(148, 163, 184, .35); }
.fqi-grid tr.fqi-dec td { font-size: 11px; padding-top: 2px; padding-bottom: 4px; background: rgba(245, 165, 36, .05); white-space: normal; }
.fqi-dec-l { color: #F5B544; font-weight: 700; }
.fqi-yes, .fqi-no { border: 1px solid var(--line); background: transparent; color: var(--tx); border-radius: 6px; width: 24px; height: 20px; cursor: pointer; margin-left: 4px; font-size: 12px; line-height: 1; }
.fqi-yes:hover { background: rgba(52, 211, 153, .2); border-color: #34D399; } .fqi-no:hover { background: rgba(248, 113, 113, .2); border-color: #F87171; }
.fqi-yes[disabled] { opacity: .35; cursor: not-allowed; }
.fqi-against { color: #F87171; font-size: 10.5px; }
.fqi-ai td { background: rgba(167, 139, 250, .07) !important; }
.fqi-ai .fqi-dec-l { color: #C4B5FD; }
.fqi-auto { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--tx2); margin-right: 6px; }
.fqi .fd-sel.fqi-ms { height: 22px; max-width: 150px; font-size: 10.5px; padding: 0 2px; }
.fqi-ctx { position: fixed; z-index: 60; display: flex; flex-direction: column; min-width: 210px; padding: 8px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line2); box-shadow: 0 16px 40px -12px #000; }
.fqi-ctx b { font-size: 12px; } .fqi-ctx small { color: var(--mu); margin-bottom: 6px; }
.fqi-ctx button { text-align: left; background: none; border: 0; color: var(--tx); padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 12px; }
.fqi-ctx button:hover { background: rgba(96, 165, 250, .14); }

/* BOQ — compact, one line per decision, no bloated controls (3.15) */
.fqi select, .fqi select.fd-sel { height: 26px !important; min-height: 0 !important; padding: 0 22px 0 8px !important; border-radius: 6px !important; border: 1px solid var(--line2) !important; background-color: var(--bg0) !important; color: var(--tx) !important; font-size: 11.5px !important; line-height: 24px !important; box-shadow: none !important; width: auto; }
.fqi .fqi-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fqi .fqi-bar .fd-sel.fqi-src { flex: 0 1 340px; height: 26px; }
.fqi .fqi-bar .fd-sel.fqi-more { height: 26px; }
.fqi-grid tr.fqi-dec td { padding: 1px 6px 3px !important; background: rgba(245, 165, 36, .045); }
.fqi-dl { display: flex; align-items: center; gap: 6px; min-height: 22px; white-space: nowrap; overflow: hidden; font-size: 11px; line-height: 20px; }
.fqi-dl + .fqi-dl { border-top: 1px dashed rgba(148, 163, 184, .14); }
.fqi-dl .fqi-dec-l { flex: 0 0 auto; font-size: 10px; text-transform: uppercase; letter-spacing: .04em; }
.fqi-code { flex: 0 0 auto; font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: #9CC2F5; background: rgba(96, 165, 250, .14); border: 1px solid rgba(96, 165, 250, .35); border-radius: 4px; padding: 0 5px; line-height: 16px; }
.fqi-code.none { color: var(--mu); background: transparent; border-style: dashed; font-weight: 400; }
.fqi-dn { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--tx); }
.fqi-dn small { color: var(--mu); margin-left: 4px; }
.fqi-dq { flex: 0 0 auto; font-family: var(--mono); color: var(--tx2); }
.fqi-dl .fqi-against { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fqi-dl .fqi-yes, .fqi-dl .fqi-no { flex: 0 0 auto; width: 22px; height: 18px; padding: 0; font-size: 11px; line-height: 16px; }
.fqi-unit { display: inline-block; cursor: pointer; color: var(--tx); border-bottom: 1px dotted var(--mu); font-size: 11px; white-space: nowrap; }
.fqi-unit:hover { color: var(--sel); border-color: var(--sel); }
.fqi-grid tr[data-q="qi-hl"] { cursor: pointer; }
.fqi-grid tr[data-q="qi-hl"]:hover td { background: rgba(96, 165, 250, .06); }
.fqi-pop { position: fixed; z-index: 61; width: 360px; max-width: calc(100vw - 24px); padding: 8px; border-radius: 10px; background: var(--bg2); border: 1px solid var(--line2); box-shadow: 0 12px 32px rgba(0, 0, 0, .45); font-size: 11.5px; }
.fqi-pop b { display: block; font-size: 12px; margin-bottom: 4px; }
.fqi-pop input { width: 100%; height: 26px; padding: 0 8px; margin-bottom: 6px; border-radius: 6px; border: 1px solid var(--line2); background: var(--bg0); color: var(--tx); font-size: 11.5px; }
.fqi-pop .fqi-plist { max-height: 300px; overflow: auto; display: flex; flex-direction: column; gap: 1px; }
.fqi-pop .fqi-plist button { display: flex; align-items: center; gap: 6px; text-align: left; background: none; border: 0; color: var(--tx); padding: 4px 6px; border-radius: 5px; cursor: pointer; font-size: 11.5px; white-space: nowrap; overflow: hidden; }
.fqi-pop .fqi-plist button:hover, .fqi-pop .fqi-plist button.on { background: rgba(96, 165, 250, .14); }
.fqi-pop .fqi-plist button .fqi-dn { flex: 1 1 auto; }

/* NO PROGRAMME — a quantity takeoff over the model alone. 4D needs a
   schedule; measuring a model and pricing a BOQ do not. Nothing of the
   simulation is offered: no timeline, no progress, no "generate from the
   programme", and the takeoff cannot be closed onto an empty schedule. */
.fd.planless .fd-needs-plan,
.fd.planless .fq-head [data-q="close"],
.fd.planless .fd-legend,
.fd.planless .fd-vp-tag { display: none !important; }
.fq-planless-note { margin: 0 0 0 8px; font-size: 11px; color: #9FB0C6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fq-planless-note b { color: #EFC67E; font-weight: 600; }

/* THE MODEL TAKEOFF READS AS A BILL: numbered bills and sections, a quiet
   unit menu instead of a form control on every row, the method as a note */
.fqi-bill table { table-layout: auto; }
.fqi-bill td.fqi-no, .fqi-bill th.fqi-no { width: 54px; font-family: var(--mono); font-size: 11px; color: var(--mu); white-space: nowrap; }
.fqi-bill tr.fqi-d td { text-transform: none; letter-spacing: .03em; font-size: 11.5px; color: #CFE0F5; background: rgba(96, 165, 250, .10); border-top: 1px solid rgba(148, 163, 184, .25); }
.fqi-bill tr.fqi-d td.fqi-no, .fqi-bill tr.fqi-c td.fqi-no { color: #CFE0F5; font-weight: 800; }
.fqi-bill tr.fqi-c td { font-size: 12px; }
.fqi-bill tr.fqi-g td { font-weight: 600; font-style: italic; font-size: 11px; color: #9CC2F5; background: transparent; }
.fqi-bill td.fqi-un, .fqi-bill th.fqi-un { width: 62px; }
.fqi-bill td.fqi-how, .fqi-bill th.fqi-how { color: var(--mu); font-size: 11px; white-space: nowrap; }
.fqi-bill td.fqi-q a { font-weight: 700; }
.fqi-usel { appearance: none; -webkit-appearance: none; background: transparent; border: 0; border-bottom: 1px dashed rgba(156, 194, 245, .45); color: #9CC2F5; font: inherit; font-size: 11.5px; padding: 0 12px 0 2px; height: 20px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #9CC2F5 50%), linear-gradient(135deg, #9CC2F5 50%, transparent 50%); background-position: right 4px center, right 0 center; background-size: 4px 4px; background-repeat: no-repeat; }
.fqi-usel:focus { outline: 1px solid rgba(156, 194, 245, .6); }
.fqi-usel option { background: #0F1724; color: #E6EDF6; }
.fqi-bill select.fqi-usel { height: 20px !important; min-height: 0 !important; width: auto !important; min-width: 0 !important; border: 0 !important; border-bottom: 1px dashed rgba(156, 194, 245, .45) !important; border-radius: 0 !important; box-shadow: none !important; background-color: transparent !important; padding: 0 12px 0 2px !important; }
.fd.qto .fqi-table.fqi-bill { max-height: none; }

/* THE BOQ GRID IS THE BOQ: its own columns, then Model qty (with its unit),
   Δ % and ONE status · proposal cell. A decision is that cell — the proposed
   type, its quantity in its unit, ✓ / ✗ — with the details in a hover card;
   nothing is added under the row. */
.fqi-grid td.fqi-mq { white-space: nowrap !important; }
.fqi-grid td.fqi-mq .fqi-unit { font-size: 10.5px; margin-left: 2px; }
.fqi-grid th.fqi-pc, .fqi-grid td.fqi-pc { width: 300px; max-width: 300px; }
.fqi-prop { display: flex; align-items: center; gap: 5px; max-width: 300px; min-height: 22px; padding: 1px 4px 1px 6px; border-radius: 7px; font-size: 11px; line-height: 18px;
  background: rgba(245, 165, 36, .08); border: 1px solid rgba(245, 165, 36, .28); white-space: nowrap; overflow: hidden; cursor: default; }
.fqi-prop-ai, .fqi-prop-agent { background: rgba(167, 139, 250, .09); border-color: rgba(167, 139, 250, .32); }
.fqi-prop .fqi-src { flex: 0 0 auto; font-size: 9.5px; font-weight: 800; color: #F5B544; }
.fqi-prop-ai .fqi-src, .fqi-prop-agent .fqi-src { color: #C4B5FD; }
.fqi-prop .fqi-code { flex: 0 0 auto; }
.fqi-prop .fqi-pn { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--tx); }
.fqi-prop .fqi-pq { flex: 0 0 auto; font-family: var(--mono); color: #E6EDF6; }
.fqi-prop .fqi-pm { flex: 0 0 auto; font-size: 10px; color: var(--mu); }
.fqi-prop .fqi-yes, .fqi-prop .fqi-no { flex: 0 0 auto; margin-left: 0; width: 20px; height: 18px; font-size: 11px; }
.fqi-tip { position: fixed; z-index: 99999; display: none; max-width: 420px; padding: 8px 10px; border-radius: 9px; background: #0F1724; color: #E6EDF6; border: 1px solid rgba(148, 163, 184, .3);
  box-shadow: 0 14px 36px -12px #000; font: 11.5px/1.45 Inter, system-ui, sans-serif; white-space: pre-wrap; pointer-events: none; }
.fqi-aitrail { font-size: 10.5px; color: var(--mu); margin-left: 4px; white-space: nowrap; cursor: help; }

/* the BOQ item card (right-click a BOQ row) */
.fqi-card2 { width: 470px; max-width: calc(100vw - 24px); gap: 2px; padding: 10px 10px 8px; }
.fqi-c2-h { display: flex; gap: 6px; align-items: baseline; }
.fqi-c2-h b { font-size: 12px; line-height: 1.35; }
.fqi-c2-q { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 4px; font-size: 11.5px; color: var(--mu); }
.fqi-c2-q b { color: var(--tx); font-family: var(--mono); }
.fqi-c2-s { margin-top: 6px; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--mu); font-weight: 700; }
.fqi-c2-row { display: flex; align-items: center; gap: 6px; min-height: 26px; font-size: 11.5px; border-bottom: 1px solid rgba(148,163,184,.10); }
.fqi-c2-n { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fqi-c2-v { flex: 0 0 auto; font-family: var(--mono); }
.fqi-card2 .fqi-c2-row button { flex: 0 0 auto; padding: 2px 6px !important; font-size: 10.5px !important; border: 1px solid var(--line) !important; border-radius: 6px !important; }
.fqi-card2 .fqi-c2-row .fqi-yes, .fqi-card2 .fqi-c2-row .fqi-no { width: 22px; padding: 0 !important; text-align: center !important; }
.fqi-c2-p .fqi-src { font-size: 9.5px; font-weight: 800; color: #F5B544; white-space: nowrap; }
.fqi-c2-why { font-size: 10.5px; color: #F5B544; padding: 1px 0 3px 4px; } .fqi-c2-why.ok { color: #6EE7B7; }
.fqi-c2-acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.fqi-card2 .fqi-c2-acts button { padding: 4px 8px !important; font-size: 11px !important; border: 1px solid var(--line) !important; border-radius: 7px !important; }

/* LINK TO ACTIVITY — the picker and the level map */
.fd-lpk { position: absolute; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; background: rgba(5, 10, 18, .45); }
.fd-lpk-in { width: min(640px, calc(100% - 32px)); max-height: min(78vh, 720px); display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px; background: var(--bg2, #121B29); border: 1px solid var(--line2, rgba(148,163,184,.3)); box-shadow: 0 30px 80px -20px #000; color: var(--tx, #E6EDF6); }
.fd-lpk-hd { display: flex; align-items: center; gap: 10px; }
.fd-lpk-hd > div:first-child { flex: 1 1 auto; min-width: 0; }
.fd-lpk-hd .k { display: block; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--mu, #93A3B8); }
.fd-lpk-hd b { font-size: 13.5px; } .fd-lpk-hd em { margin-left: 8px; font-style: normal; color: var(--mu, #93A3B8); font-size: 11.5px; }
.fd-lpk-sub { font-size: 11px; color: var(--mu, #93A3B8); }
.fd-lpk-list { overflow: auto; min-height: 120px; display: flex; flex-direction: column; gap: 2px; }
.fd-lpk-row { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px; }
.fd-lpk-row:hover { background: rgba(96, 165, 250, .08); }
.fd-lpk-row.on { background: rgba(52, 211, 153, .08); }
.fd-lpk-row .t { flex: 1 1 auto; min-width: 0; font-size: 12px; }
.fd-lpk-row .t b { font-family: var(--mono, monospace); margin-right: 6px; }
.fd-lpk-row .t small { display: block; color: var(--mu, #93A3B8); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fd-lpk-row em { font-style: normal; font-size: 10.5px; color: #6EE7B7; font-family: var(--mono, monospace); }
.fd-lpk-ft { font-size: 11px; color: var(--mu, #93A3B8); }
.fd-lpk-ft a { color: #9CC2F5; cursor: pointer; text-decoration: underline; }
.fd-lmap { width: 100%; border-collapse: collapse; font-size: 12px; }
.fd-lmap th { text-align: left; font-size: 10.5px; color: var(--mu, #93A3B8); padding: 4px 6px; }
.fd-lmap td { padding: 4px 6px; border-top: 1px solid rgba(148,163,184,.12); }
.fd-lmap td small { display: block; color: var(--mu, #93A3B8); font-size: 10px; }
.fd-lmap .n { text-align: right; font-family: var(--mono, monospace); }
.fd-lmap select.own { border-color: #F5B544; }
.fd-byl { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 6px; }
.fd-byc { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 7px; border-radius: 7px; background: rgba(96,165,250,.10); border: 1px solid rgba(96,165,250,.25); font-size: 11px; }
.fd-byc em { font-style: normal; color: var(--mu, #93A3B8); font-family: var(--mono, monospace); }
.fd-byc button { border: 0; background: none; color: #F87171; cursor: pointer; font-size: 13px; line-height: 1; padding: 0 2px; }

/* THE LINK TABLE (Quantities → Links) */
.fd-ltwrap { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto; }
.fd-lt2 { display: flex; flex-direction: column; gap: 8px; min-height: 0; height: 100%; padding: 8px 2px; }
.fd-lt2-k { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 11.5px; color: var(--mu); }
.fd-lt2-k b { color: var(--tx); }
.fd-lt2-k .hint { color: #F5B544; }
.fd-lt2-k .fd-btn { margin-left: auto; }
.fd-lt2-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.fd-lt2-bar .fd-search { width: 220px; }
.fd-ltf { border: 1px solid var(--line); background: transparent; color: var(--tx); border-radius: 8px; padding: 4px 9px; font-size: 11.5px; cursor: pointer; }
.fd-ltf.on { background: rgba(96,165,250,.16); border-color: rgba(96,165,250,.5); }
.fd-ltf b { color: var(--mu); margin-left: 2px; }
.fd-lt2-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 9px; background: rgba(96,165,250,.10); border: 1px solid rgba(96,165,250,.3); font-size: 12px; }
.fd-lt2-t { flex: 1 1 auto; min-height: 200px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.fd-lt2-t table { width: 100%; border-collapse: collapse; font-size: 12px; }
.fd-lt2-t th { position: sticky; top: 0; z-index: 1; background: var(--bg2); text-align: left; font-size: 10.5px; color: var(--mu); padding: 7px 8px; border-bottom: 1px solid var(--line); }
.fd-lt2-t td { padding: 5px 8px; border-bottom: 1px solid rgba(148,163,184,.10); vertical-align: middle; }
.fd-lt2-t td.c, .fd-lt2-t th.c { width: 26px; }
.fd-lt2-t td.n { text-align: right; font-family: var(--mono); color: var(--mu); }
.fd-lt2-t td.ty { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-lt2-t td.lv { white-space: nowrap; color: var(--mu); }
.fd-lt2-t td.by .byw { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.fd-lt2-t td.op { white-space: nowrap; text-align: right; }
.fd-lt2-t tr.none td.ty { box-shadow: inset 3px 0 0 #F87171; }
.fd-lt2-t tr.part td.ty { box-shadow: inset 3px 0 0 #F5B544; }
.fd-lt2-t tr.ok td.ty { box-shadow: inset 3px 0 0 #34D399; }
.fd-lt2-t tr.sel td { background: rgba(96,165,250,.08); }
.fd-lt2 .src, .fd-lt2-k .src { display: inline-block; padding: 1px 6px; border-radius: 6px; font-size: 10px; font-weight: 700; background: rgba(148,163,184,.14); color: var(--mu); }
.src-model { background: rgba(167,139,250,.18) !important; color: #C4B5FD !important; }
.src-boq { background: rgba(52,211,153,.16) !important; color: #6EE7B7 !important; }
.src-manual { background: rgba(96,165,250,.16) !important; color: #9CC2F5 !important; }
.fd-sugg { display: inline-flex; align-items: center; gap: 4px; padding: 1px 3px 1px 7px; border-radius: 7px; border: 1px dashed rgba(245,181,68,.6); background: rgba(245,181,68,.08); font-size: 11px; }
.fd-sugg button { border: 1px solid #2FA36B; background: rgba(52,211,153,.15); color: #6EE7B7; border-radius: 5px; cursor: pointer; font-size: 11px; padding: 0 5px; }
.fd-lt2-t td.op > * { display: inline-flex; vertical-align: middle; margin-left: 4px; }

/* styles/tabs/siteplan.css */
/* ════════════════════════════════════════════════════════════════════════
   SITE PROGRESS — DESIGN SYSTEM  (siteplan.css)
   Its own system, in the family of the Estimator's: paper, ink and one
   deep-teal accent; numbers in a tabular mono; colour reserved for
   meaning — the work packages, and the three states of progress.

   Everything is scoped under .spx so nothing leaks into the workspace,
   and the workspace's styles do not leak in.

   ONE SCREEN HIGH: sp-view.js measures what is left of the viewport into
   --sp-h. Header · packages · plan | panel. Panels scroll; the page does not.
   ════════════════════════════════════════════════════════════════════════ */
.sp-host { --sp-h: calc(100vh - 110px); }
.spx {
  /* neutral greys, no beige: paper is white, the ground a cool grey */
  --bg: #f3f5f8; --panel: #ffffff; --panel-2: #f8fafc; --panel-3: #eef1f5; --hover: #f2f5f9;
  --ink: #15171c; --ink-2: #394150; --muted: #6b7280; --faint: #9aa3af;
  --line: #e2e6ec; --line-2: #edf0f4; --focus: #0e7c6b55;
  --brand: #0e7c6b; --brand-ink: #075a4e; --brand-soft: #e1f1ec;
  --good: #15803d; --good-bg: #e7f6ec; --warn: #b45309; --warn-bg: #fff4e0; --bad: #b91c1c; --bad-bg: #fdecec;
  --info: #0284c7; --info-bg: #e3f2fb;
  --plan-bg: #fbfcfd; --plan-line: rgba(21, 23, 28, .34); --plan-grid: rgba(21, 23, 28, .05);
  --shadow-1: 0 1px 2px rgba(20, 22, 28, .06), 0 1px 1px rgba(20, 22, 28, .04);
  --shadow-2: 0 10px 30px -10px rgba(20, 22, 28, .25), 0 2px 6px rgba(20, 22, 28, .08);
  --r-1: 6px; --r-2: 10px; --r-3: 14px;
  --font: 'Inter', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --side: 400px;

  height: var(--sp-h); min-height: 420px;
  container: spx / inline-size;
  display: grid; grid-template-rows: auto auto minmax(0, 1fr); gap: 10px;
  padding: 12px; border-radius: 18px; background: var(--bg); color: var(--ink);
  font: 13px/1.45 var(--font); -webkit-font-smoothing: antialiased; position: relative; overflow: hidden;
  color-scheme: light;
}
.spx[data-theme="dark"] {
  --bg: #0e1013; --panel: #15181d; --panel-2: #1a1e24; --panel-3: #20252c; --hover: #1d2228;
  --ink: #eceef1; --ink-2: #c6cad2; --muted: #8d94a0; --faint: #646b77;
  --line: #272c34; --line-2: #20252c; --focus: #2dd4bf55;
  --brand: #2bb39d; --brand-ink: #5fd3bf; --brand-soft: #12302b;
  --good: #4ade80; --good-bg: #12301f; --warn: #fbbf24; --warn-bg: #3a2a0f; --bad: #f87171; --bad-bg: #3a1717;
  --info: #38bdf8; --info-bg: #0f2a3a;
  --plan-bg: #111418; --plan-line: rgba(236, 238, 241, .28); --plan-grid: rgba(236, 238, 241, .04);
  --shadow-2: 0 14px 34px -10px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
.spx * { box-sizing: border-box; }
.spx button, .spx input, .spx select, .spx textarea { font: inherit; color: inherit; }
.spx .num, .spx .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.spx .muted { color: var(--muted); } .spx .faint { color: var(--faint); }
.spx svg { display: block; }

/* ── header ─────────────────────────────────────────────────────────── */
.sp-head { display: flex; align-items: center; gap: 14px; min-width: 0; flex-wrap: wrap; }
.sp-mark { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, var(--brand), #0b5f53); box-shadow: var(--shadow-1); }
.sp-mark svg { width: 20px; height: 20px; }
.sp-title { display: flex; flex-direction: column; min-width: 0; }
.sp-title b { font-size: 17px; font-weight: 750; letter-spacing: -.02em; white-space: nowrap; }
.sp-title span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 520px; }
.sp-facts { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-sp { flex: 1; }
.sp-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ── controls ───────────────────────────────────────────────────────── */
.spx .btn { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel); color: var(--ink); cursor: pointer; font-weight: 550; white-space: nowrap; transition: background .12s, border-color .12s; }
.spx .btn:hover { background: var(--hover); border-color: #c9d0da; }
.spx[data-theme="dark"] .btn:hover { border-color: #3a414c; }
.spx .btn svg { width: 15px; height: 15px; }
.spx .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.15) inset, var(--shadow-1); }
.spx .btn.primary:hover { background: var(--brand-ink); }
.spx .btn.ghost { background: none; border-color: transparent; }
.spx .btn.ghost:hover { background: var(--hover); }
.spx .btn.sm { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.spx .btn.icon { width: 32px; padding: 0; justify-content: center; }
.spx .btn.sm.icon { width: 26px; }
.spx .btn.danger { color: var(--bad); }
.spx .btn[disabled] { opacity: .45; pointer-events: none; }
.spx .input, .spx .select { height: 32px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 0 10px; outline: none; min-width: 0; }
.spx .input:focus, .spx .select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--focus); }
.spx .input.sm, .spx .select.sm { height: 26px; font-size: 12px; padding: 0 7px; border-radius: 6px; }
.spx .seg { display: inline-flex; background: var(--panel-3); border-radius: 9px; padding: 3px; gap: 2px; }
.spx .seg button { border: 0; background: none; height: 26px; padding: 0 10px; border-radius: 7px; cursor: pointer; color: var(--ink-2); font-weight: 550; font-size: 12px; white-space: nowrap; }
.spx .seg button.on { background: var(--panel); color: var(--ink); box-shadow: var(--shadow-1); }
.spx .seg button[disabled] { opacity: .4; cursor: not-allowed; }
.spx .check { display: inline-flex; gap: 7px; align-items: center; cursor: pointer; font-size: 12px; color: var(--ink-2); }
.spx .check input { accent-color: var(--brand); width: 14px; height: 14px; }
.spx label.field { display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; color: var(--muted); font-weight: 550; }
.spx label.field .input, .spx label.field .select { color: var(--ink); font-size: 13px; }

/* ── chips ──────────────────────────────────────────────────────────── */
.spx .chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; line-height: 1; }
.spx .chip b { font-family: var(--mono); font-weight: 650; color: var(--ink); }
.spx .chip.good { background: var(--good-bg); color: var(--good); border-color: transparent; }
.spx .chip.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.spx .chip.bad { background: var(--bad-bg); color: var(--bad); border-color: transparent; }
.spx .chip.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.spx .chip.brand { background: var(--brand-soft); color: var(--brand-ink); border-color: transparent; }
.spx .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ── KPI band + packages strip ──────────────────────────────────────── */
.sp-band { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.sp-kpis { display: grid; grid-template-columns: 1.35fr repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1200px) { .sp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .sp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sp-kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-3); padding: 11px 14px; box-shadow: var(--shadow-1); position: relative; overflow: hidden; min-width: 0; }
.sp-kpi .l { font-size: 10.5px; color: var(--muted); font-weight: 650; text-transform: uppercase; letter-spacing: .06em; }
.sp-kpi .v { font: 700 20px/1.2 var(--mono); margin-top: 5px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sp-kpi .v small { font-size: 11.5px; color: var(--muted); font-weight: 500; margin-left: 3px; }
.sp-kpi .s { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-kpi.accent { background: linear-gradient(140deg, var(--brand) 0%, #0a5d50 100%); border-color: transparent; color: #fff; display: flex; align-items: center; gap: 14px; }
.sp-kpi.accent .l, .sp-kpi.accent .s, .sp-kpi.accent .v small { color: rgba(255,255,255,.78); }
.sp-kpi .stack { display: flex; height: 6px; border-radius: 4px; overflow: hidden; background: var(--panel-3); margin-top: 8px; }
.sp-kpi .stack i { display: block; height: 100%; }

.sp-pkgs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.sp-pkg { flex: none; display: grid; grid-template-columns: auto 1fr auto; grid-template-rows: auto auto; column-gap: 9px; row-gap: 5px; align-items: center;
  min-width: 164px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); cursor: pointer; text-align: left;
  box-shadow: var(--shadow-1); transition: border-color .12s, box-shadow .12s, transform .12s; }
.sp-pkg:hover { transform: translateY(-1px); }
.sp-pkg.on { border-color: var(--c, var(--brand)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c, var(--brand)) 22%, transparent); }
.sp-pkg i.sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c, var(--brand)); }
.sp-pkg .n { font-weight: 650; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.sp-pkg .p { font: 700 13px var(--mono); }
.sp-pkg .bar { grid-column: 1 / -1; height: 5px; border-radius: 4px; background: var(--panel-3); overflow: hidden; position: relative; }
.sp-pkg .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--c, var(--brand)); border-radius: 4px; }
.sp-pkg .bar u { position: absolute; top: -2px; bottom: -2px; width: 2px; background: var(--ink); opacity: .55; }
.sp-pkg .meta { grid-column: 1 / -1; font-size: 10.5px; color: var(--muted); display: flex; gap: 8px; }

/* ── body: plan | side ─────────────────────────────────────────────── */
.sp-body { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: 10px; min-height: 0; }

.sp-stage { position: relative; border-radius: var(--r-3); overflow: hidden; background: var(--plan-bg); border: 1px solid var(--line); box-shadow: var(--shadow-1); min-height: 0; }
.sp-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.sp-stage canvas.drag { cursor: grabbing; }
.sp-tools { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; pointer-events: none; }
.sp-tools > * { pointer-events: auto; }
.sp-float { background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(6px); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-1); }
.sp-tools .seg { background: color-mix(in srgb, var(--panel-3) 92%, transparent); backdrop-filter: blur(6px); }
.sp-zoom { position: absolute; right: 10px; bottom: 10px; display: flex; flex-direction: column; padding: 3px; gap: 2px; }
.sp-zoom button { width: 30px; height: 30px; border: 0; background: none; border-radius: 7px; cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.sp-zoom button:hover { background: var(--hover); color: var(--ink); }
.sp-zoom svg { width: 15px; height: 15px; }
.sp-legend { position: absolute; left: 10px; bottom: 10px; padding: 8px 11px; font-size: 11px; color: var(--ink-2); display: flex; flex-direction: column; gap: 6px; max-width: calc(100% - 80px); }
.sp-legend .t { font-weight: 700; font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.sp-legend .row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.sp-legend .row span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sp-legend .row i { width: 11px; height: 11px; border-radius: 3px; display: inline-block; border: 1px solid rgba(0,0,0,.08); }
.sp-legend .ramp { width: 180px; height: 8px; border-radius: 4px; }
.sp-legend .ramp-l { display: flex; justify-content: space-between; width: 180px; font-family: var(--mono); font-size: 10px; color: var(--muted); }
.sp-search { position: relative; }
.sp-search svg { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 14px; height: 14px; color: var(--faint); }
.sp-search .input { padding-left: 29px; width: 180px; height: 32px; background: color-mix(in srgb, var(--panel) 92%, transparent); backdrop-filter: blur(6px); }
.sp-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 210px; max-width: 280px; padding: 10px 12px; border-radius: 11px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-2); font-size: 12px; animation: sp-pop .1s ease-out; }
.sp-tip h4 { margin: 0 0 6px; font-size: 13.5px; display: flex; gap: 7px; align-items: center; }
.sp-tip .r { display: flex; justify-content: space-between; gap: 10px; color: var(--muted); margin-top: 3px; }
.sp-tip .r b { color: var(--ink); font-family: var(--mono); font-weight: 650; }
@keyframes sp-pop { from { opacity: 0; transform: translateY(3px) scale(.985); } }
.sp-nobg { position: absolute; left: 50%; top: 58px; transform: translateX(-50%); padding: 7px 12px; font-size: 12px; color: var(--ink-2); display: flex; gap: 10px; align-items: center; white-space: nowrap; }

/* ── side panel ─────────────────────────────────────────────────────── */
.sp-side { display: grid; grid-template-rows: auto minmax(0, 1fr); background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--shadow-1); min-height: 0; overflow: hidden; }
.sp-tabs { display: flex; gap: 2px; padding: 8px 8px 0; border-bottom: 1px solid var(--line); background: var(--panel-2); }
.sp-tabs button { border: 1px solid transparent; border-bottom: 0; background: none; padding: 0 12px; height: 32px; border-radius: 8px 8px 0 0; cursor: pointer; color: var(--ink-2); font-weight: 600; font-size: 12.5px; display: flex; gap: 6px; align-items: center; position: relative; top: 1px; }
.sp-tabs button:hover { background: var(--hover); }
.sp-tabs button.on { background: var(--panel); border-color: var(--line); color: var(--ink); box-shadow: inset 0 2px 0 var(--brand); }
.sp-tabs .n { font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.sp-pane { overflow: auto; min-height: 0; }
.sp-pane-h { position: sticky; top: 0; z-index: 2; background: var(--panel); padding: 10px 12px; border-bottom: 1px solid var(--line-2); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.sp-pane-b { padding: 12px; }

.sp-units { width: 100%; border-collapse: separate; border-spacing: 0; }
.sp-units th { position: sticky; top: 53px; z-index: 1; background: var(--panel-2); text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: pointer; user-select: none; }
.sp-units th.num { text-align: right; }
.sp-units td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.sp-units tr { cursor: pointer; }
.sp-units tbody tr:hover td { background: var(--hover); }
.sp-units tr.sel td { background: var(--brand-soft); }
.sp-units .lbl { font: 650 12.5px var(--mono); color: var(--ink); }
.sp-units .sub { font-size: 10.5px; color: var(--muted); }
.sp-units td.num { text-align: right; font-family: var(--mono); font-weight: 650; }
.sp-meter { display: flex; align-items: center; gap: 8px; }
.sp-meter .m { flex: 1; height: 6px; border-radius: 4px; background: var(--panel-3); position: relative; min-width: 60px; overflow: visible; }
.sp-meter .m i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--c, var(--brand)); }
.sp-meter .m u { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .5; border-radius: 1px; }
.sp-meter b { font: 650 11.5px var(--mono); min-width: 38px; text-align: right; }
.sp-st { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.sp-st::before { content: ''; width: 8px; height: 8px; border-radius: 3px; background: var(--faint); }
.sp-st.complete { color: var(--good); } .sp-st.complete::before { background: var(--good); }
.sp-st.inProgress { color: var(--info); } .sp-st.inProgress::before { background: var(--info); }
.sp-st.notStarted { color: var(--muted); } .sp-st.notStarted::before { background: var(--faint); }
.sp-st.empty { color: var(--faint); } .sp-st.empty::before { background: transparent; border: 1px dashed var(--faint); }

/* unit detail */
.sp-uh { display: flex; gap: 12px; align-items: flex-start; }
.sp-uh .big { font: 750 24px/1.1 var(--mono); letter-spacing: -.03em; }
.sp-props { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 6px; }
.sp-facts2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 12px 0; }
.sp-facts2 > div { padding: 8px 10px; border-right: 1px solid var(--line-2); background: var(--panel-2); min-width: 0; }
.sp-facts2 > div:last-child { border-right: 0; }
.sp-facts2 .l { font-size: 9.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; font-weight: 700; }
.sp-facts2 .v { font: 650 13px/1.3 var(--mono); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-sec { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; }
.sp-sec h3 { margin: 0; font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); }
.sp-sec .sp { flex: 1; }
.sp-prow { display: grid; grid-template-columns: 12px minmax(0, 1fr) 120px; gap: 9px; align-items: center; padding: 5px 0; }
.sp-prow i.sw { width: 10px; height: 10px; border-radius: 3px; }
.sp-prow .n { font-size: 12.5px; font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-prow .n small { color: var(--muted); font-weight: 450; margin-left: 5px; font-family: var(--mono); }
.sp-acts { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.sp-act { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; gap: 9px; align-items: center; padding: 7px 10px; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.sp-act:last-child { border-bottom: 0; }
.sp-act .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-act .nm small { display: block; color: var(--muted); font-family: var(--mono); font-size: 10.5px; }
.sp-act .pc { font: 650 11.5px var(--mono); }
.sp-act .x { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 2px; border-radius: 5px; display: grid; }
.sp-act .x:hover { background: var(--bad-bg); color: var(--bad); }
.sp-act .x svg { width: 13px; height: 13px; }
.sp-act.grp { background: var(--panel-2); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); grid-template-columns: 10px 1fr auto; }

/* notes and empty states */
.sp-note { display: flex; gap: 9px; align-items: flex-start; padding: 9px 11px; border-radius: 10px; font-size: 12px; line-height: 1.5; margin-bottom: 10px; }
.sp-note svg { width: 15px; height: 15px; flex: none; margin-top: 2px; }
.sp-note.warn { background: var(--warn-bg); color: var(--warn); }
.sp-note.info { background: var(--info-bg); color: var(--info); }
.sp-note.bad { background: var(--bad-bg); color: var(--bad); }
.sp-note.muted { background: var(--panel-3); color: var(--ink-2); }
.sp-note b { font-weight: 700; }
/* the double check: programme units not on the plan */
.sp-gaps { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.sp-gap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px; align-items: center; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel, transparent); }
.sp-gap .nm { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sp-gap .nm small { display: block; font-weight: 400; opacity: .7; }
.sp-gap .muted { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sp-empty { display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; padding: 30px 16px; font-size: 12.5px; }
.sp-empty svg { width: 34px; height: 34px; color: var(--faint); }

/* the first screen: no drawing yet */
.sp-hero { grid-row: 2 / -1; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 14px; min-height: 0; overflow: auto; }
@media (max-width: 1000px) { .sp-hero { grid-template-columns: 1fr; } }
.sp-hero-card { border-radius: 18px; padding: 28px 30px; background: radial-gradient(120% 140% at 100% 0%, #13a089 0%, #0c6457 45%, #0a3d36 100%); color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; }
.sp-hero-card h1 { margin: 0; font-size: 26px; letter-spacing: -.025em; line-height: 1.15; }
.sp-hero-card p { margin: 0; color: rgba(255,255,255,.84); max-width: 560px; font-size: 13.5px; line-height: 1.6; }
.sp-hero-card .deco { position: absolute; right: -30px; bottom: -40px; width: 380px; height: 260px; opacity: .16; }
.sp-steps { display: grid; gap: 10px; margin-top: 6px; position: relative; }
.sp-step { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; }
.sp-step b.k { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: rgba(255,255,255,.14); font: 700 12px var(--mono); }
.sp-step div b { display: block; font-size: 13px; }
.sp-step div span { font-size: 12px; color: rgba(255,255,255,.76); }
.sp-drop { border: 2px dashed var(--line); border-radius: 18px; background: var(--panel); display: grid; place-items: center; align-content: center; gap: 12px; padding: 30px; text-align: center; cursor: pointer; transition: border-color .12s, background .12s; min-height: 280px; }
.sp-drop:hover, .sp-drop.over { border-color: var(--brand); background: var(--brand-soft); }
.sp-drop .ico { width: 56px; height: 56px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.sp-drop .ico svg { width: 28px; height: 28px; }
.sp-drop h3 { margin: 0; font-size: 16px; }
.sp-drop p { margin: 0; color: var(--muted); font-size: 12.5px; max-width: 380px; line-height: 1.55; }

/* progress overlay while a drawing is read */
.sp-busy { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(3px); }
.sp-busy .box { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px 22px; box-shadow: var(--shadow-2); width: 340px; }
.sp-busy .box b { display: block; margin-bottom: 4px; }
.sp-busy .pbar { height: 6px; background: var(--panel-3); border-radius: 4px; overflow: hidden; margin-top: 12px; }
.sp-busy .pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #13a089); transition: width .2s; }

/* modal */
.sp-veil { position: absolute; inset: 0; z-index: 40; background: rgba(12, 14, 18, .42); display: grid; place-items: center; padding: 16px; animation: sp-fade .15s; backdrop-filter: blur(2px); }
@keyframes sp-fade { from { opacity: 0; } }
.sp-modal { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow-2); width: min(980px, 100%); max-height: 100%; display: flex; flex-direction: column; border: 1px solid var(--line); min-height: 0; }
.sp-modal.wide { width: min(1280px, 100%); }
.sp-modal-h { padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.sp-modal-h h2 { margin: 0; font-size: 16px; letter-spacing: -.01em; }
.sp-modal-h .sp { flex: 1; }
.sp-modal-b { padding: 14px 18px; overflow: auto; min-height: 0; }
.sp-modal-f { padding: 12px 18px; border-top: 1px solid var(--line-2); display: flex; gap: 8px; justify-content: flex-end; align-items: center; }
.sp-steps-nav { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--line-2); background: var(--panel-2); }
.sp-steps-nav button { border: 0; background: none; padding: 11px 12px 10px; cursor: pointer; color: var(--muted); font-weight: 650; font-size: 12.5px; display: flex; gap: 8px; align-items: center; border-bottom: 2px solid transparent; }
.sp-steps-nav button b { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--panel-3); font: 700 10.5px var(--mono); color: var(--muted); }
.sp-steps-nav button.on { color: var(--ink); border-bottom-color: var(--brand); }
.sp-steps-nav button.on b { background: var(--brand); color: #fff; }
.sp-steps-nav button.ok b { background: var(--good-bg); color: var(--good); }

.sp-tbl-wrap { border: 1px solid var(--line); border-radius: 10px; overflow: auto; }
.sp-tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.sp-tbl th { position: sticky; top: 0; z-index: 1; background: var(--panel-2); text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.sp-tbl td { padding: 7px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.sp-tbl tr:last-child td { border-bottom: 0; }
.sp-tbl td.num, .sp-tbl th.num { text-align: right; font-family: var(--mono); }
.sp-tbl tr.pick { cursor: pointer; }
.sp-tbl tr.pick:hover td { background: var(--hover); }
.sp-tbl tr.on td { background: var(--brand-soft); }
.sp-tbl tfoot td { background: var(--panel-2); font-weight: 700; border-top: 1px solid var(--line); position: sticky; bottom: 0; }
.sp-heat { font: 650 11.5px var(--mono); text-align: center !important; border-radius: 6px; min-width: 64px; }
.sp-heat.na { color: var(--faint); font-weight: 400; }
.sp-grid2 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 800px) { .sp-grid2 { grid-template-columns: 1fr; } }
.sp-pk-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(0, 1.6fr) 70px auto; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line-2); }
.sp-pk-row:last-child { border-bottom: 0; }
.sp-pk-row input[type=color] { width: 30px; height: 28px; border: 1px solid var(--line); border-radius: 7px; padding: 2px; background: var(--panel); cursor: pointer; }
.sp-pk-vals { display: flex; gap: 4px; flex-wrap: wrap; }
.sp-pk-vals label { display: inline-flex; gap: 5px; align-items: center; height: 22px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); font-size: 11px; cursor: pointer; background: var(--panel); }
.sp-pk-vals label.on { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); font-weight: 600; }
.sp-pk-vals input { display: none; }
.sp-toast { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 50; background: var(--ink); color: var(--panel); padding: 9px 14px; border-radius: 10px; box-shadow: var(--shadow-2); font-size: 12.5px; animation: sp-pop .16s; }
.spx[data-theme="dark"] .sp-toast { background: #eceef1; color: #15181d; }

/* ── 1.2: P6 weighting · planned | actual · stages · filters · group by ── */
.sp-scope { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--ink-2); background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 6px 8px 6px 11px; }
.sp-scope > svg { flex: none; color: var(--muted); }
.sp-scope > span { flex: 1; min-width: 0; }
.sp-scope .btn svg { width: 13px; height: 13px; }
.sp-split { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--line); }
.sp-half { position: relative; background: var(--plan-bg); min-width: 0; overflow: hidden; }
.sp-half.one { position: absolute; inset: 0; }
.sp-half canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.sp-cap { position: absolute; top: 54px; left: 12px; font: 700 10.5px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); background: color-mix(in srgb, var(--panel) 90%, transparent); border: 1px solid var(--line); border-radius: 7px; padding: 3px 8px; pointer-events: none; }
.sp-cap.act { color: var(--brand-ink); }
.sp-cap.right { left: auto; right: 12px; }
.sp-split .sp-half:last-child .sp-cap { left: 12px; }
.sp-swipe { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--brand); cursor: ew-resize; z-index: 3; touch-action: none; }
.sp-swipe::before { content: ''; position: absolute; top: 0; bottom: 0; left: -12px; width: 22px; }
.sp-swipe .grip { position: absolute; top: 50%; left: -17px; width: 32px; height: 32px; margin-top: -16px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font: 700 12px var(--font); box-shadow: var(--shadow-2); }
.sp-tools .btn.on { border-color: var(--brand); color: var(--brand-ink); }
.sp-tools .btn svg { width: 14px; height: 14px; }
.sp-tools .btn .chip { height: 17px; padding: 0 6px; margin-left: 2px; }
.sp-filters { position: absolute; top: 52px; left: 10px; z-index: 5; width: min(520px, calc(100% - 20px)); max-height: calc(100% - 64px); overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-2); }
.sp-fh { display: flex; flex-direction: column; gap: 1px; }
.sp-fh b { font-size: 12px; }
.sp-fh .muted { font-size: 11px; }
.sp-frow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sp-frow > label:first-child { width: 96px; flex: none; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.sp-frow .seg { flex-wrap: wrap; }
.sp-frow.end { justify-content: flex-end; margin-top: 4px; }
.sp-frow .input, .sp-frow .select { height: 28px; }
.sp-nocost { font: 600 10.5px var(--font); color: var(--muted); background: repeating-linear-gradient(135deg, var(--panel-3) 0 4px, transparent 4px 8px); border: 1px dashed var(--line); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.sp-stand { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 4px; }
.sp-stand > div { border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--panel-2); min-width: 0; }
.sp-stand .l { display: block; font-size: 9.5px; text-transform: uppercase; color: var(--muted); letter-spacing: .06em; font-weight: 700; }
.sp-stand b { font-size: 12.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-tree { display: flex; flex-direction: column; gap: 2px; }
.sp-tree-row { padding-left: calc(var(--d, 0) * 14px); }
.sp-tree-row > summary, .sp-tree-row.leaf { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 8px; align-items: center; padding: 4px 6px; border-radius: 7px; cursor: pointer; list-style: none; }
.sp-tree-row.leaf { cursor: default; padding-left: calc(var(--d, 0) * 14px + 20px); }
.sp-tree-row > summary::-webkit-details-marker { display: none; }
.sp-tree-row > summary::before { content: '▸'; position: absolute; margin-left: -12px; color: var(--muted); font-size: 10px; }
.sp-tree-row[open] > summary::before { content: '▾'; }
.sp-tree-row > summary { position: relative; padding-left: 18px; }
.sp-tree-row > summary:hover, .sp-tree-row.leaf:hover { background: var(--hover); }
.sp-tree .tn { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; }
.sp-tree .tn .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-tree .tn small { color: var(--muted); font: 500 10.5px var(--mono); flex: none; }
.sp-st.dot { font-size: 0; gap: 0; }
.sp-bd-bar { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 10px; }
.sp-bd-bar .select { min-width: 280px; max-width: 520px; }
@media (max-width: 720px) { .sp-split { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; } .sp-scope { flex-wrap: wrap; } }
.sp-lead { font-size: 12.5px; line-height: 1.55; color: var(--ink-2); margin-bottom: 12px; }
.sp-lead b { color: var(--ink); }
.sp-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.sp-card { display: flex; gap: 10px; align-items: flex-start; text-align: left; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 11px 12px; cursor: pointer; color: var(--ink); font: inherit; min-width: 0; transition: border-color .12s, background .12s; }
.sp-card:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); background: var(--panel-2); }
.sp-card.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 1px var(--brand) inset; }
.sp-card .rad { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--faint); flex: none; margin-top: 1px; }
.sp-card.on .rad { border-color: var(--brand); box-shadow: inset 0 0 0 3px var(--panel), inset 0 0 0 8px var(--brand); }
.sp-card .ico { width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }
.sp-card .ico svg { width: 15px; height: 15px; }
.sp-card .bd { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.sp-card .tt { font-weight: 700; font-size: 12.5px; }
.sp-card .tt .chip { height: 17px; padding: 0 6px; font-size: 10px; margin-left: 4px; vertical-align: 1px; }
.sp-card .nums { font-size: 11.5px; color: var(--ink-2); }
.sp-card .cov { height: 4px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.sp-card .cov i { display: block; height: 100%; background: var(--brand); }
.sp-card .ex { display: flex; flex-wrap: wrap; gap: 4px; }
.sp-card .ex span { font-size: 10.5px; background: var(--panel-3); border-radius: 5px; padding: 1px 6px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-card .go { flex: none; align-self: center; font: 700 11px var(--font); color: var(--brand-ink); border: 1px solid var(--brand); border-radius: 7px; padding: 3px 9px; }
.sp-safe { max-width: 760px; margin: 24px auto; padding: 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-3); box-shadow: var(--shadow-1); align-self: start; }
/* the whole project — Update & Control's figure — leads the band, in its own colour */
.sp-kpis { grid-template-columns: 1.3fr 1.3fr repeat(3, minmax(0, 1fr)); }
@media (max-width: 1200px) { .sp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sp-kpi.whole { background: linear-gradient(140deg, #1f3a68 0%, #0f2142 100%); border-color: transparent; color: #fff; display: flex; align-items: center; gap: 14px; }
.sp-kpi.whole .l, .sp-kpi.whole .s { color: rgba(255,255,255,.8); }
.spx[data-theme="dark"] .sp-kpi.whole { background: linear-gradient(140deg, #2a4a80 0%, #142a52 100%); }


/* ════════════════════════════════════════════════════════════════════════
   1.3 — ONE SCREEN, ANY SCREEN
   The tab is an application, not a page: header · band · plan | panel,
   always exactly the height of what is left of the window (--sp-h), and
   nothing in it scrolls but the panel's own list. Every size below follows
   the width of the tab itself (container queries), so a laptop, a 4K
   monitor and a tablet each get cards of their own size — never a card
   built for a big screen squeezed onto a small one.
   ════════════════════════════════════════════════════════════════════════ */
.spx { box-sizing: border-box; gap: clamp(6px, 0.8cqi, 10px); padding: clamp(6px, 0.9cqi, 12px); font-size: 13px; }
.sp-band { gap: clamp(6px, 0.7cqi, 10px); }
.sp-kpis { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.35fr) repeat(3, minmax(0, 1fr)); gap: clamp(6px, 0.7cqi, 10px); }
.sp-kpi { padding: clamp(7px, 0.8cqi, 11px) clamp(9px, 1cqi, 14px); border-radius: 12px; }
.sp-kpi .l { font-size: 10.5px; }
.sp-kpi .v { font-size: clamp(16px, 1.55cqi, 22px); margin-top: 3px; }
.sp-kpi .s { font-size: 11px; }
.sp-kpi.whole, .sp-kpi.accent { gap: clamp(8px, 1cqi, 14px); }
.sp-kpi.whole svg, .sp-kpi.accent svg { width: clamp(40px, 3.6cqi, 60px); height: clamp(40px, 3.6cqi, 60px); }
.sp-kpi .kb { min-width: 0; }
.sp-pkgs { gap: 6px; scrollbar-width: none; }
.sp-pkgs::-webkit-scrollbar { display: none; }
.sp-pkg { min-width: clamp(132px, 12cqi, 176px); padding: 6px 10px; border-radius: 10px; row-gap: 4px; }
.sp-pkg .n { font-size: 12px; max-width: none; }
.sp-pkg .p { font-size: 12.5px; }
.sp-pkg .meta { font-size: 10.5px; }
.sp-title b { font-size: 16px; }
.spx .hide-s { display: inline; }
.sp-sp { flex: 1; }

/* the body: plan | panel; the panel can be put away */
.sp-body { grid-template-columns: minmax(0, 1fr) clamp(300px, 28cqi, 440px); }
.sp-body.noside { grid-template-columns: minmax(0, 1fr); }
.sp-side.hidden { display: none; }
.sp-sideopen { position: absolute; right: 10px; top: 10px; z-index: 4; height: 30px; }
.sp-tabs { align-items: flex-end; }
.sp-tabs .sp { flex: 1; }
.sp-tabs > .btn { align-self: center; margin-bottom: 4px; }
.sp-tabs button { padding: 0 10px; font-size: 12px; }

/* medium: the band in two rows, the panel narrower */
@container spx (max-width: 1180px) {
  .sp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sp-kpis > .sp-kpi:nth-child(n+4) { display: none; }
  .sp-facts .chip:nth-child(n+2) { display: none; }
}
/* small: the panel slides over the plan instead of beside it */
@container spx (max-width: 860px) {
  .sp-body { grid-template-columns: minmax(0, 1fr); position: relative; }
  .sp-side { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 92%); z-index: 6; box-shadow: var(--shadow-2); }
  .sp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sp-kpis > .sp-kpi:nth-child(n+3) { display: none; }
  .spx .hide-s { display: none; }
  .sp-title span { display: none; }
  .sp-facts { display: none; }
  .sp-tools .seg button { padding: 0 7px; }
  .sp-search .input { width: 130px; }
  .sp-legend { display: none; }
}
@container spx (max-width: 520px) {
  .sp-kpis { grid-template-columns: minmax(0, 1fr); }
  .sp-kpis > .sp-kpi:nth-child(n+2) { display: none; }
  .sp-tools > label.check { display: none; }
}
/* a short window: the band gives the plan its height back */
@media (max-height: 760px) {
  .sp-kpi .s, .sp-pkg .meta, .sp-kpi .stack { display: none; }
  .sp-kpi .v { font-size: 16px; }
  .sp-kpi.whole svg, .sp-kpi.accent svg { width: 36px; height: 36px; }
  .sp-mark { width: 30px; height: 30px; }
}

/* ── the WBS panel ─────────────────────────────────────────────────── */
.sp-wbs-total { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--line-2); background: var(--panel-2); }
.sp-wbs-total > div { display: flex; flex-direction: column; }
.sp-wbs-total .l { font-size: 9.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.sp-wbs-total b { font: 700 18px/1.15 var(--mono); }
.sp-wbs-total .muted { font: 500 11px var(--mono); }
.sp-wbs-key { display: flex; gap: 12px; padding: 6px 12px; font-size: 10.5px; color: var(--muted); border-bottom: 1px solid var(--line-2); }
.sp-wbs-key span { display: inline-flex; align-items: center; gap: 5px; }
.sp-wbs-key i { width: 14px; height: 5px; border-radius: 3px; display: inline-block; }
.sp-wbs-key i.a { background: var(--brand); } .sp-wbs-key i.p { background: color-mix(in srgb, var(--ink) 30%, transparent); }
.sp-wbs-key i.off { background: none; border: 1px dashed var(--faint); height: 9px; }
.sp-wbs { padding: 4px 0 10px; }
.sp-wrow { display: grid; grid-template-columns: auto 16px 4px minmax(0, 1fr) auto 50px minmax(54px, 26%); gap: 6px; align-items: center; min-height: 30px; padding: 0 10px 0 8px; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.sp-wrow:hover { background: var(--hover); }
.sp-wrow.sel { background: var(--brand-soft); }
.sp-wrow .gd { display: flex; height: 100%; align-self: stretch; }
.sp-wrow .gd i.g { width: 14px; flex: none; position: relative; }
.sp-wrow .gd i.g.more::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; border-left: 1px solid var(--line); }
.sp-wrow .tw { width: 16px; height: 16px; border: 0; background: none; padding: 0; cursor: pointer; color: var(--muted); font-size: 10px; line-height: 16px; border-radius: 4px; }
.sp-wrow .tw:hover { background: var(--panel-3); color: var(--ink); }
.sp-wrow .lv { width: 4px; height: 18px; border-radius: 2px; background: var(--lc); }
.sp-wrow .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 550; }
.sp-wrow .nm small { margin-left: 6px; color: var(--muted); font: 500 10.5px var(--mono); }
.sp-wrow.off .nm { color: var(--ink-2); font-weight: 450; }
.sp-wrow .pc { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.sp-wrow .pc b { font: 650 11.5px var(--mono); }
.sp-wrow .pc small { font: 500 10px var(--mono); color: var(--muted); }
.sp-bars { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-bars .b { display: block; height: 5px; border-radius: 3px; background: var(--panel-3); overflow: hidden; }
.sp-bars .b i { display: block; height: 100%; border-radius: 3px; }
.sp-bars .b.a i { background: var(--c, var(--brand)); }
.sp-bars .b.p i { background: color-mix(in srgb, var(--ink) 30%, transparent); }
.sp-wrow.off .sp-bars .b { outline: 1px dashed color-mix(in srgb, var(--faint) 70%, transparent); outline-offset: 0; }
.sp-utag, .sp-offtag, .sp-ucount { height: 20px; padding: 0 7px; border-radius: 999px; font: 600 10.5px var(--font); white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.sp-utag { border: 1px solid transparent; background: var(--brand-soft); color: var(--brand-ink); cursor: pointer; font-family: var(--mono); }
.sp-offtag { border: 1px dashed var(--faint); background: var(--panel); color: var(--ink-2); cursor: pointer; }
.sp-offtag:hover { border-color: var(--brand); color: var(--brand-ink); }
.sp-offtag svg { width: 11px; height: 11px; }
.sp-ucount { background: var(--panel-3); color: var(--muted); }

/* ── placing work by hand ──────────────────────────────────────────── */
.sp-body.placing .sp-stage canvas { cursor: crosshair; }
.sp-placebar { position: absolute; left: 50%; top: 52px; transform: translateX(-50%); z-index: 6; display: flex; gap: 8px; align-items: center; padding: 7px 10px; font-size: 12px; max-width: calc(100% - 20px); flex-wrap: wrap; box-shadow: var(--shadow-2); }
.sp-placebar .muted { font-size: 11.5px; }
/* the panel never widens its column: its tabs scroll, its rows wrap */
.sp-side { min-width: 0; }
.sp-tabs { overflow-x: auto; overflow-y: hidden; scrollbar-width: none; flex-wrap: nowrap; }
.sp-tabs::-webkit-scrollbar { display: none; }
.sp-tabs button { flex: none; max-width: 150px; }
.sp-gap { grid-template-columns: minmax(0, 1fr) auto; }
.sp-gap .muted { grid-column: 1 / -1; grid-row: 2; font-size: 11px; }
.sp-gap > button, .sp-gap > span:last-child:empty { grid-column: 2; grid-row: 1; }
.sp-pkgs > .sp-pkg { flex: 1 0 auto; }
.sp-tabs button { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; line-height: 32px; }
.sp-tabs button .n, .sp-tabs button .chip { display: inline-flex; vertical-align: middle; }
.sp-tabs > .btn { flex: none; display: inline-flex; }
.sp-tabs button { flex: none; padding: 0 9px; }


/* ════════════════════════════════════════════════════════════════════════
   1.5 — THE PANEL, REBUILT
   Read top to bottom, nothing boxed twice. A unit is a header, one
   progress block, its stages as a stepper, its packages, then what is
   behind it (activities, linking) folded away. Names are never cut to an
   ellipsis on the first line: they wrap to two, and the panel's left edge
   can be dragged wider.
   ════════════════════════════════════════════════════════════════════════ */
.sp-body { grid-template-columns: minmax(0, 1fr) var(--side-w, clamp(300px, 28cqi, 440px)); }
.sp-body.noside { grid-template-columns: minmax(0, 1fr); }
.sp-side { position: relative; }
.sp-resize { position: absolute; left: -6px; top: 0; bottom: 0; width: 10px; cursor: col-resize; z-index: 5; touch-action: none; }
.sp-resize::after { content: ''; position: absolute; left: 4px; top: 50%; height: 40px; margin-top: -20px; width: 3px; border-radius: 3px; background: var(--line); opacity: 0; transition: opacity .15s, background .15s; }
.sp-side:hover .sp-resize::after { opacity: 1; }
.sp-resize.on::after, .sp-resize:hover::after { background: var(--brand); opacity: 1; }
@container spx (max-width: 860px) { .sp-resize { display: none; } }

/* one bar, read everywhere: actual filled, planned a tick */
.sp-mbar { display: inline-grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; align-items: center; min-width: 0; width: 100%; }
.sp-mbar .tr { position: relative; height: 6px; border-radius: 4px; background: var(--panel-3); overflow: visible; min-width: 28px; }
.sp-mbar .tr i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 4px; background: var(--c, var(--brand)); }
.sp-mbar .tr u { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; border-radius: 1px; background: var(--ink); opacity: .55; }
.sp-mbar b { font: 650 11px/1 var(--mono); min-width: 38px; text-align: right; }

/* ── the unit ──────────────────────────────────────────────────────── */
.spu { padding: 12px 14px 16px; display: flex; flex-direction: column; }
.spu-head { display: flex; align-items: center; gap: 10px; }
.spu-id { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; }
.spu-id .k { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.spu-id b { font: 750 22px/1.1 var(--mono); letter-spacing: -.03em; overflow-wrap: anywhere; }
.spu-head .sp-st { height: 24px; padding: 0 9px; border-radius: 999px; background: var(--panel-3); }
.spu-head .sp-st.inProgress { background: var(--info-bg); } .spu-head .sp-st.complete { background: var(--good-bg); }
.spu-props { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 11px; color: var(--muted); }
.spu-props b { font: 600 11px var(--mono); color: var(--ink-2); }

.spu-prog { margin-top: 12px; padding: 11px 12px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); }
.spu-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.spu-nums > div { display: flex; flex-direction: column; min-width: 0; }
.spu-nums .l { font-size: 9.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.spu-nums b { font: 700 19px/1.15 var(--mono); letter-spacing: -.02em; white-space: nowrap; }
.spu-nums .good b { color: var(--good); } .spu-nums .warn b { color: var(--warn); } .spu-nums .bad b { color: var(--bad); }
.spu-bar { position: relative; height: 8px; margin: 10px 0 9px; border-radius: 5px; background: var(--panel-3); }
.spu-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 5px; background: linear-gradient(90deg, var(--brand), color-mix(in srgb, var(--brand) 70%, #4ade80)); }
.spu-bar u { position: absolute; top: -4px; bottom: -4px; width: 2px; margin-left: -1px; background: var(--ink); border-radius: 1px; }
.spu-dates { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11px; color: var(--muted); }
.spu-dates b { font: 650 11.5px var(--mono); color: var(--ink); }
.spu-dates .bad b { color: var(--bad); }
.spu-hint, .spu-foot { display: flex; gap: 7px; align-items: flex-start; font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.spu-hint svg, .spu-foot svg { width: 13px; height: 13px; flex: none; margin-top: 1px; }
.spu-foot.actions { gap: 6px; }

.spu-sec { display: flex; align-items: center; gap: 8px; margin: 16px 0 6px; min-height: 22px; }
.spu-sec h4 { margin: 0; font-size: 11px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.spu-sec .sp { flex: 1; }
.spu-sec .ct { font: 600 10.5px var(--mono); color: var(--muted); background: var(--panel-3); border-radius: 999px; padding: 1px 7px; }
.spu-sec .faint { font-size: 11px; }
.spu-sec.tgl { cursor: pointer; border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: 14px; }
.spu-sec.tgl:hover h4 { color: var(--brand-ink); }
.spu-rule select { height: 24px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); font-size: 11px; padding: 0 6px; color: var(--ink-2); max-width: 170px; cursor: pointer; }

.spu-manual, .spu-conc, .spu-warn { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; font-size: 11.5px; line-height: 1.45; margin-bottom: 8px; }
.spu-manual svg, .spu-conc svg, .spu-warn svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.spu-manual { background: var(--brand-soft); color: var(--brand-ink); flex-wrap: wrap; }
.spu-manual > span { flex: 1; min-width: 160px; }
.spu-manual.stale { background: var(--warn-bg); color: var(--warn); }
.spu-conc { background: var(--info-bg); color: var(--info); }
.spu-warn { background: var(--warn-bg); color: var(--warn); }

/* the stepper */
.spu-steps { display: flex; flex-direction: column; position: relative; }
.spu-step { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 9px; align-items: start; padding: 7px 6px 7px 2px; border-radius: 9px; }
.spu-step::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--line); }
.spu-step:first-child::before { top: 14px; } .spu-step:last-child::before { bottom: calc(100% - 14px); }
.spu-step.done::before { background: color-mix(in srgb, var(--c) 55%, var(--line)); }
.spu-step .ic { position: relative; z-index: 1; width: 14px; height: 14px; margin: 3px 0 0 3px; border-radius: 50%; background: var(--panel); border: 2px solid var(--faint); }
.spu-step.done .ic { background: var(--c); border-color: var(--c); }
.spu-step.done .ic::after { content: ''; position: absolute; left: 3px; top: 0px; width: 3px; height: 6px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.spu-step.run .ic { border-color: var(--c); background: conic-gradient(var(--c) 0 50%, var(--panel) 50% 100%); }
.spu-step.now { background: color-mix(in srgb, var(--c) 10%, var(--panel)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 45%, transparent); }
.spu-step .bd { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.spu-step .t { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.spu-step .nm { font-size: 12.5px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.spu-step.idle .nm { color: var(--ink-2); font-weight: 500; }
.spu-step .tw { border: 0; background: none; padding: 0; width: 14px; cursor: pointer; color: var(--muted); font-size: 10px; }
.spu-step .m { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.spu-step .ct, .spu-pk .ct, .spu-subrow .ct { font: 500 10.5px var(--mono); color: var(--muted); white-space: nowrap; }
.spu-step .set { align-self: center; border: 1px solid var(--line); background: var(--panel); border-radius: 6px; font-size: 10.5px; font-weight: 650; padding: 2px 7px; cursor: pointer; color: var(--ink-2); opacity: 0; transition: opacity .12s; }
.spu-step:hover .set, .spu-step .set:focus { opacity: 1; }
.spu-step .set:hover { border-color: var(--brand); color: var(--brand-ink); }
@media (hover: none) { .spu-step .set { opacity: 1; } }
.bdg { display: inline-flex; align-items: center; height: 17px; padding: 0 6px; border-radius: 999px; font-size: 9.5px; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }
.bdg.now { background: var(--c, var(--brand)); color: #fff; }
.bdg.plan { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--ink-2); }
.bdg.late { background: var(--warn-bg); color: var(--warn); }
.spu-subtree { margin: -2px 0 4px 26px; padding-left: 8px; border-left: 1px dashed var(--line); }
.spu-subrow { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto minmax(70px, 38%); gap: 7px; align-items: center; padding: 3px 0 3px calc(var(--d, 0) * 12px); font-size: 11.5px; }
.spu-subrow .nm { overflow-wrap: anywhere; line-height: 1.3; }
.spu-skip { font-size: 11px; color: var(--muted); margin: 6px 0 0 4px; line-height: 1.5; }
.spu-ends { display: flex; gap: 12px; margin: 8px 0 0 4px; }
.spu-ends .lnk { border: 0; background: none; padding: 0; font-size: 11px; color: var(--muted); cursor: pointer; text-decoration: underline dotted; }
.spu-ends .lnk:hover { color: var(--brand-ink); }
.spu-ends .bdg.now { --c: var(--ink-2); }

.spu-pks { display: flex; flex-direction: column; gap: 2px; }
.spu-pk { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto minmax(90px, 42%); gap: 8px; align-items: center; padding: 4px 0; font-size: 12px; }
.spu-pk .sw { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.spu-pk .nm { overflow-wrap: anywhere; line-height: 1.3; font-weight: 550; }

.spu-link { margin-top: 2px; }
.spu-link.empty { margin-top: 12px; }
.spu-link.empty .spu-sec { margin-top: 0; }
.spu-sub { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); margin: 10px 0 5px; }
.spu-cand { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 5px; background: var(--panel); }
.spu-cand:hover { border-color: color-mix(in srgb, var(--brand) 50%, var(--line)); }
.spu-cand .bd { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.spu-cand b { font-size: 12.5px; overflow-wrap: anywhere; }
.spu-cand small { font-size: 10.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spu-cand .warnc { color: var(--warn); }
.spu-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0; }
.spu-chip { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 4px 0 9px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: 11.5px; font-weight: 600; max-width: 100%; }
.spu-chip button { border: 0; background: none; padding: 2px; border-radius: 50%; cursor: pointer; color: inherit; display: grid; }
.spu-chip button:hover { background: rgba(0,0,0,.08); }
.spu-chip svg { width: 11px; height: 11px; }
.spu-find { margin-top: 8px; }
.spu-find .input { width: 100% !important; height: 30px; }
.spu-alias { display: flex; gap: 6px; }
.spu-alias .input { flex: 1; }

/* ── the WBS rows: the name whole, the bar beneath ─────────────────── */
.sp-wrow { grid-template-columns: auto 16px minmax(0, 1fr) auto; align-items: start; padding: 6px 12px 6px 8px; gap: 6px; min-height: 0; }
.sp-wrow .gd { align-self: stretch; }
.sp-wrow .tw { margin-top: 1px; }
.sp-wrow .mn { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sp-wrow .nm { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.3; font-size: 12.5px; overflow-wrap: anywhere; }
.sp-wrow .nm .lv { display: inline-block; width: 7px; height: 7px; border-radius: 2px; background: var(--lc); margin-right: 6px; vertical-align: 1px; }
.sp-wrow .mt { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; }
.sp-wrow .mt small { font: 500 10.5px var(--mono); color: var(--muted); white-space: nowrap; }
.sp-wrow .mt .sp-mbar b { display: none; }
.sp-wrow .pc { padding-top: 1px; min-width: 46px; }
.sp-wrow .pc b { font-size: 12px; }
.sp-wrow.off .sp-mbar .tr { outline: 1px dashed color-mix(in srgb, var(--faint) 70%, transparent); }

/* Setup › Stages */
.sp-st-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line-2); font-size: 12.5px; }
.sp-st-row .sw { width: 12px; height: 12px; border-radius: 3px; }
.sp-st-row .nm { font-weight: 600; overflow-wrap: anywhere; }
.sp-st-row.skip .nm { color: var(--muted); font-weight: 450; text-decoration: line-through; text-decoration-color: var(--faint); }


/* ════════════════════════════════════════════════════════════════════════
   1.5 — THE PRINT CENTRE
   Choices on the left, the deck on the right exactly as it will print:
   the large slide, and every slide in a strip beneath it.
   ════════════════════════════════════════════════════════════════════════ */

.sp-modal.rp { width: min(1500px, calc(100% - 24px)); height: calc(100% - 24px); max-height: none; display: grid; grid-template-rows: auto minmax(0, 1fr); padding: 0; overflow: hidden; }
.rp-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--panel); }
.rp-mark { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand), #0b5f53); flex: none; }
.rp-mark svg { width: 18px; height: 18px; }
.rp-title { display: flex; flex-direction: column; min-width: 0; }
.rp-title b { font-size: 15px; font-weight: 750; letter-spacing: -.01em; }
.rp-title span { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-head .sp { flex: 1; }
.rp-count { font: 600 12px var(--mono); color: var(--ink-2); background: var(--panel-3); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.rp-body { display: grid; grid-template-columns: 330px minmax(0, 1fr); min-height: 0; }
.rp-side { overflow: auto; border-right: 1px solid var(--line); background: var(--panel-2); padding: 6px 14px 20px; }
.rp-sec { padding: 12px 0; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.rp-sec:last-child { border-bottom: 0; }
.rp-sec.muted { opacity: .62; }
.rp-sec h5 { margin: 0; font-size: 10.5px; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); display: flex; align-items: baseline; gap: 8px; }
.rp-sec h5 small { font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 10.5px; }
.rp-presets { display: flex; flex-wrap: wrap; gap: 5px; }
.rp-preset { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 5px 11px; font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink-2); }
.rp-preset:hover { border-color: var(--brand); color: var(--brand-ink); }
.rp-preset.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.rp-slides { display: flex; flex-direction: column; gap: 2px; }
.rp-chk { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 8px; align-items: start; padding: 5px 6px; border-radius: 8px; cursor: pointer; }
.rp-chk:hover { background: var(--hover); }
.rp-chk input { accent-color: var(--brand); margin: 2px 0 0; width: 14px; height: 14px; }
.rp-chk span { display: flex; flex-direction: column; min-width: 0; }
.rp-chk b { font-size: 12.5px; font-weight: 600; }
.rp-chk small { font-size: 11px; color: var(--muted); line-height: 1.35; }
.rp-chk.dis { opacity: .5; cursor: not-allowed; }
.rp-side .seg { display: flex; width: 100%; }
.rp-side .seg button { flex: 1; padding: 0 6px; }
.rp-row { display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.rp-row .seg { width: auto; }
.rp-row .select { width: 100%; }
.rp-toggles { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.rp-note { font-size: 11.5px; color: var(--muted); line-height: 1.45; display: flex; gap: 6px; align-items: flex-start; }
.rp-note b { color: var(--ink); }
.rp-note.warn { color: var(--warn); }
.rp-note svg { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.rp-pick { display: flex; flex-wrap: wrap; gap: 4px; max-height: 150px; overflow: auto; padding: 2px; }
.rp-pick label { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 7px; padding: 2px 7px; font: 600 11px var(--mono); cursor: pointer; background: var(--panel); }
.rp-pick label.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-ink); }
.rp-pick input { display: none; }
.rp-accents { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.rp-accents button { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--panel); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.rp-accents button.on { box-shadow: 0 0 0 2px var(--ink); }
.rp-accents input[type=color] { width: 28px; height: 24px; border: 1px solid var(--line); border-radius: 6px; padding: 0; background: none; cursor: pointer; }
.rp-field { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; align-items: center; font-size: 11.5px; color: var(--muted); }
.rp-logo { display: flex; align-items: center; gap: 8px; }
.rp-logo img { height: 30px; max-width: 120px; object-fit: contain; border: 1px solid var(--line); border-radius: 6px; padding: 2px; background: #fff; }

.rp-main { display: grid; grid-template-rows: minmax(0, 1fr) auto; min-height: 0; background: color-mix(in srgb, var(--panel-3) 70%, var(--bg)); }
.rp-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 18px 24px 8px; min-height: 0; }
.rp-stage.busy::after { content: 'Building the preview…'; position: absolute; top: 14px; right: 20px; font-size: 11.5px; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.rp-paper { width: 100%; max-height: calc(100% - 40px); aspect-ratio: 16 / 9; max-width: calc((100vh - 260px) * 16 / 9); background: #fff; box-shadow: 0 18px 40px -18px rgba(20, 22, 28, .45), 0 2px 6px rgba(20, 22, 28, .12); border-radius: 3px; overflow: hidden; }
.rp-paper svg { width: 100%; height: 100%; display: block; }
.rp-nav { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--ink-2); }
.rp-nav .btn.icon { font-size: 16px; line-height: 1; }
.rp-strip { display: flex; gap: 10px; overflow-x: auto; padding: 10px 18px 14px; border-top: 1px solid var(--line); background: var(--panel); }
.rp-thumb { position: relative; flex: none; width: 150px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent; border-radius: 6px; background: #fff; cursor: pointer; overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.rp-thumb svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.rp-thumb span { position: absolute; left: 4px; bottom: 3px; font: 700 10px var(--mono); background: rgba(21, 23, 28, .78); color: #fff; border-radius: 4px; padding: 0 5px; }
.rp-thumb.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.rp-empty { color: var(--muted); font-size: 13px; padding: 40px; text-align: center; }
@container spx (max-width: 900px) {
  .rp-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 42%) minmax(0, 1fr); }
  .rp-side { border-right: 0; border-bottom: 1px solid var(--line); }
  .rp-title span { display: none; }
}
.rp-logo { flex-wrap: wrap; }
.rp-lg { position: relative; display: inline-flex; }
.rp-lg img { height: 34px; }
.rp-lg button { position: absolute; top: -6px; right: -6px; width: 16px; height: 16px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.rp-lg button svg { width: 9px; height: 9px; }

