/* ============================================================
   redesign.css — v6 structural design system (LOADED LAST)
   Goal: bring every page to the Overview standard.
   Overview reads calmly because it has one rhythm:
     intro → summary layer → chaptered sections → focused cards.
   This layer gives the other pages that same vocabulary:
     .section-head  — the divider between page chapters
     .statbar       — the compact summary layer up top
     .callout       — a prominent contextual note
     .kgroup-card   — metric groups as their own cards
     .field-group   — grouped, labelled form sections
   Pure presentation. No engine / metric / data changes.
   ============================================================ */

/* ---- page rhythm: a touch more air between chapters ---- */
.view > .section-head:first-of-type { margin-top: 4px; }

/* ============================================================
   SECTION HEAD — the clear divider between major page chapters.
   Eyebrow + title + sub, with an optional right-aligned action.
   ============================================================ */
.section-head {
  display: flex; align-items: flex-end; gap: 16px;
  margin: 30px 0 14px;
}
.section-head:first-child { margin-top: 8px; }
.section-head .sh-titles {
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  position: relative; padding-left: 13px;
}
.section-head .sh-titles::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px;
  border-radius: 3px; background: linear-gradient(180deg, var(--orange), var(--orange-600));
}
.section-head .sh-eyebrow {
  font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--orange-600);
}
.section-head h3 {
  font-size: 16px; font-weight: 800; letter-spacing: -.01em; color: var(--ink);
  margin: 0; line-height: 1.2;
}
.section-head .sh-sub { font-size: 12px; color: var(--ink-3); font-weight: 500; line-height: 1.4; }
.section-head .sh-action { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }

/* ============================================================
   STATBAR — the summary layer. Lighter than hero cards; a single
   hairline-divided strip that orients before the detail.
   ============================================================ */
.statbar {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-1);
  margin-bottom: 8px;
}
.statbar-item {
  background: var(--surface); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 5px; min-width: 0;
}
.statbar-item.clickable { cursor: pointer; transition: background var(--fast); position: relative; }
.statbar-item.clickable:hover { background: var(--navy-50); }
.statbar-k {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.statbar-v {
  font-family: var(--font-data); font-size: 23px; font-weight: 700; letter-spacing: -.02em;
  color: var(--navy); line-height: 1;
}
.statbar-s { font-size: 11px; color: var(--ink-3); line-height: 1.35; }
.statbar-item.accent { background: linear-gradient(150deg, var(--navy), var(--navy-600)); }
.statbar-item.accent .statbar-k { color: rgba(255,255,255,.55); }
.statbar-item.accent .statbar-v { color: #fff; }
.statbar-item.accent .statbar-s { color: rgba(255,255,255,.6); }
.statbar-item.accent.clickable:hover { filter: brightness(1.08); }

/* ============================================================
   CALLOUT — a prominent, scannable contextual note. Replaces the
   ad-hoc .info-banner / "note" walls for things the user must read.
   ============================================================ */
.callout {
  display: flex; gap: 13px; align-items: flex-start; padding: 14px 16px;
  border-radius: var(--r); margin-bottom: 16px;
  background: linear-gradient(100deg, var(--navy-50), var(--surface) 72%);
  border: 1px solid var(--navy-100);
}
.callout-ic {
  flex: none; width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center;
  background: var(--navy-100); color: var(--navy); font-weight: 800; font-size: 13px;
}
.callout-body { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.callout-body + .callout-body { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line-2); }
.callout-body b { color: var(--navy); }
.callout-body .ib-tag {
  display: inline-block; min-width: 0; margin-right: 4px;
  font-weight: 700; color: var(--navy); font-size: 11px; text-transform: uppercase; letter-spacing: .03em;
}
.callout.warn { background: linear-gradient(100deg, var(--warn-bg), var(--surface) 72%); border-color: #F0DDA6; }
.callout.warn .callout-ic { background: var(--warn-bg); color: var(--warn); }
.callout.soon { background: linear-gradient(100deg, var(--orange-50), var(--surface) 72%); border-color: var(--orange-100); }
.callout.soon .callout-ic { background: var(--orange-100); color: var(--orange-600); }

/* ============================================================
   METRIC GROUPS AS CARDS — replaces the single "wall of metrics"
   card with a calm responsive grid of self-contained group cards.
   ============================================================ */
.kgrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
  gap: 16px; align-items: start;
}
.kgroup-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); padding: 16px 18px 18px;
}
.kgroup-card .kgroup { margin: 0; }
.kgroup-card .kgroup-h {
  border-bottom: 1px solid var(--line); padding-bottom: 10px; margin-bottom: 14px;
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px;
}
.kgroup-card .kcards { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }

/* ============================================================
   SEGMENTED CONTROL IN SECTION ACTIONS — used to fold repeated
   tables (Waterfalls Total/Direct/Agg, Breakdown dimensions) into
   one switchable surface instead of stacking near-identical blocks.
   ============================================================ */
.section-head .sh-action .seg { box-shadow: var(--sh-0); }
.seg.lg .seg-btn { padding: 7px 18px; font-size: 13px; }

/* ============================================================
   TABLE GROUPING — light dividers that separate column groups so
   dense tables read in chunks (e.g. funnel cols vs loss cols).
   ============================================================ */
table.data th.grp, table.data td.grp { border-left: 1px solid var(--line); }
table.data .col-muted { color: var(--ink-3); }

/* ============================================================
   FORMS — grouped, labelled fieldsets with intentional controls.
   Turns the Ops Review "wall of inputs" into clear sections.
   ============================================================ */
.field-group { margin-bottom: 20px; }
.field-group:last-child { margin-bottom: 0; }
.fg-head {
  font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--navy); padding-bottom: 8px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line-2);
}
.field-group .or-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 11px 14px; margin: 0; }
@media (max-width: 720px) { .field-group .or-fields { grid-template-columns: 1fr; } }
.or-f { display: flex; flex-direction: column; gap: 5px; }
.or-f.wide { grid-column: 1 / -1; }
.or-f > span { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.or-f input, .or-f select {
  font-family: var(--font); font-size: 13px; padding: 8px 11px; width: 100%;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-2); color: var(--ink);
  transition: border-color var(--fast), box-shadow var(--fast), background var(--fast);
}
.or-f input:focus, .or-f select:focus {
  outline: 0; border-color: var(--orange); box-shadow: var(--sh-glow-orange); background: var(--surface);
}
.or-f .or-hint { font-size: 10.5px; color: var(--ink-4); }

/* the live-output column: make the generated paragraph the hero of the form */
.or-grid { gap: 18px; }
.or-out { position: sticky; top: 84px; align-self: start; }
.or-out .or-paragraph { font-size: 13.5px; }

/* ============================================================
   EXPANDABLE — a calm, bordered disclosure for secondary detail
   (per-aggregator waterfalls, etc.) instead of a bare <details>.
   ============================================================ */
.disclosure { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin-top: 14px; }
.disclosure > summary {
  list-style: none; cursor: pointer; padding: 11px 15px; font-size: 12.5px; font-weight: 600;
  color: var(--navy); background: var(--bg-2); display: flex; align-items: center; gap: 8px;
}
.disclosure > summary::-webkit-details-marker { display: none; }
.disclosure > summary::before { content: "▸"; color: var(--orange); transition: transform var(--fast); }
.disclosure[open] > summary::before { transform: rotate(90deg); }
.disclosure[open] > summary { border-bottom: 1px solid var(--line); }
.disclosure-body { padding: 14px 15px; }

/* ============================================================
   Dark-mode + print niceties for the new components.
   ============================================================ */
@media print {
  .section-head .sh-action { display: none !important; }
  .statbar, .kgroup-card, .callout { box-shadow: none !important; break-inside: avoid; }
  .main { background: #fff !important; }
}

/* ============================================================
   v5 PREMIUM OVERHAUL (loaded last — wins the cascade)
   Finishing layer for the ui-ux-pro-max "Data-Dense Dashboard"
   direction: clean slate canvas, light table headers, tabular
   figures, soft elevation, crisp chips, accessible focus rings.
   Token-driven, so it themes light + dark automatically.
   ============================================================ */

/* ---- global type & tabular data figures ---- */
body { letter-spacing: -.006em; }
.statbar-v, .hero-v, .kpi-val, .rep-kpi-v, .mono,
table.data td.num, table.data th.num, .num {
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1, "ss01" 1;
}
.muted { color: var(--ink-3); }

/* ---- app canvas: a whisper of depth, never noisy ---- */
.main {
  background:
    radial-gradient(1100px 420px at 100% -10%, var(--navy-50) 0%, transparent 62%),
    var(--bg);
}

/* ---- cards & surfaces: soft, consistent elevation ---- */
.card, .table-wrap, .banner { border-radius: var(--r-lg); }
.card { box-shadow: var(--sh-1); }
.hero-card.clickable:hover, .statbar-item.clickable:hover { box-shadow: var(--sh-2); }

/* ---- TABLES: modern light sticky header + quiet zebra + row hover ---- */
table.data th,
table.data.sticky th,
table.data.tight th,
.table-wrap table.data th {
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 10.5px; font-weight: 700; letter-spacing: .055em; text-transform: uppercase;
  border-bottom: 2px solid var(--line);
  padding: 11px 14px; white-space: nowrap;
}
table.data td { border-bottom: 1px solid var(--line-2); padding: 10px 14px; }
table.data tbody tr:nth-child(even) td { background: var(--surface-2); }
table.data tbody tr:hover td { background: var(--navy-50); }
table.data th.num, table.data td.num { color: var(--ink); }
table.data tbody tr:last-child td { border-bottom: 0; }

/* ---- status chips: crisp bordered soft pills ---- */
.dd-status-chip {
  border: 1px solid transparent; border-radius: var(--r-pill);
  font-weight: 600; letter-spacing: .01em; padding: 3px 10px;
}
.dd-status-chip.active   { background: var(--good-bg); color: var(--good-600); border-color: var(--good-line); }
.dd-status-chip.progress { background: var(--navy-50);  color: var(--navy-600); border-color: var(--navy-200); }
.dd-status-chip.hold     { background: var(--warn-bg);  color: var(--warn-600); border-color: var(--warn-line); }
.dd-status-chip.lost     { background: var(--bad-bg);   color: var(--bad-600);  border-color: var(--bad-line); }
.chip {
  border: 1px solid var(--line); border-radius: var(--r-pill);
  background: var(--surface-2); color: var(--ink-2);
}
.chip.bad  { background: var(--bad-bg);  color: var(--bad-600);  border-color: var(--bad-line); }
.chip.warn { background: var(--warn-bg); color: var(--warn-600); border-color: var(--warn-line); }
.need-chip {
  border-radius: var(--r-pill); border: 1px solid var(--navy-200);
  background: var(--navy-50); color: var(--navy-600); font-weight: 600;
}
.lane-badge { border-radius: var(--r-pill); font-weight: 600; }

/* ---- buttons: refined primary gradient, ghost, focus ---- */
.btn { border-radius: var(--r-sm); box-shadow: var(--sh-1); }
.btn:not(.ghost):not(.navy) { background: linear-gradient(180deg, var(--orange) 0%, var(--orange-600) 100%); }
.btn:not(.ghost):not(.navy):hover { background: linear-gradient(180deg, var(--orange-600), var(--orange-600)); }
.btn.ghost { background: var(--surface); color: var(--navy-600); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--navy-50); border-color: var(--navy-200); color: var(--navy); }

/* ---- inputs / search / segmented control: unified, accessible focus ---- */
.search, .gf-select, .gf-date { border-radius: var(--r-sm); }
.search:focus, .gf-select:focus, .gf-date:focus,
.or-f input:focus, .or-f select:focus {
  outline: 0; border-color: var(--info); box-shadow: var(--ring); background: var(--surface);
}
.seg {
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 3px; gap: 2px; box-shadow: var(--sh-0);
}
.seg-btn { border-radius: calc(var(--r-sm) - 3px); color: var(--ink-2); font-weight: 600; transition: all var(--fast); }
.seg-btn:hover { color: var(--ink); background: var(--navy-50); }
.seg-btn.on { background: var(--navy); color: #fff; box-shadow: var(--sh-1); }
.seg-btn.on:hover { background: var(--navy-700); color: #fff; }

/* ---- accessible keyboard focus everywhere ---- */
a:focus-visible, button:focus-visible, [tabindex]:focus-visible,
.nav-btn:focus-visible, .seg-btn:focus-visible, .btn:focus-visible,
summary:focus-visible {
  outline: 0; box-shadow: var(--ring); border-radius: var(--r-xs);
}

/* ---- thin, styled scrollbars ---- */
.table-wrap::-webkit-scrollbar, .main::-webkit-scrollbar,
.cat-list::-webkit-scrollbar { width: 10px; height: 10px; }
.table-wrap::-webkit-scrollbar-thumb, .main::-webkit-scrollbar-thumb,
.cat-list::-webkit-scrollbar-thumb {
  background: var(--line); border-radius: 8px; border: 2px solid var(--surface);
}
.table-wrap::-webkit-scrollbar-thumb:hover, .main::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }

/* ============================================================
   RECONCILE CENTER — the live issue queue.
   ============================================================ */
.rec-list { display: flex; flex-direction: column; gap: 10px; }
.rc-item {
  border: 1px solid var(--line); border-left: 3px solid var(--line);
  border-radius: var(--r); padding: 12px 14px; background: var(--surface-2);
}
.rc-item.high   { border-left-color: var(--bad); }
.rc-item.medium { border-left-color: var(--warn); }
.rc-item.low    { border-left-color: var(--info); }
.rc-item.resolved { border-left-color: var(--good); opacity: .85; }
.rc-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.rc-title { font-size: 13px; color: var(--ink); }
.rc-sev {
  flex: none; font-size: 9.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  padding: 2px 8px; border-radius: var(--r-pill); border: 1px solid transparent;
}
.rc-sev.high   { background: var(--bad-bg);  color: var(--bad-600);  border-color: var(--bad-line); }
.rc-sev.medium { background: var(--warn-bg); color: var(--warn-600); border-color: var(--warn-line); }
.rc-sev.low    { background: var(--info-bg); color: var(--info);      border-color: var(--info-line); }
.rc-sev.resolved { background: var(--good-bg); color: var(--good-600); border-color: var(--good-line); }
.rc-body { font-size: 12.5px; color: var(--ink-2); }
.rc-opts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.rc-file { font-size: 10px; color: var(--ink-3); font-weight: 500; margin-left: 4px; }
.rc-custom { display: inline-flex; align-items: center; gap: 6px; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.rc-reasons { margin: 2px 0 0; padding-left: 18px; }
.rc-reasons li { margin: 2px 0; }
.rc-reason { color: var(--ink-2); }
.rc-done { margin-top: 8px; font-size: 12px; color: var(--good-600); }
.search.sm { padding: 6px 10px; font-size: 12px; min-width: 150px; max-width: 210px; }
.btn.sm.on, .btn.ghost.sm.on { box-shadow: var(--sh-glow-navy); border-color: var(--navy-500); }
.btn.ghost.sm.on { background: var(--navy-50); color: var(--navy); }
.linklike { border: 0; background: none; color: var(--info); cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }

/* ---- card grids (SOPs / Pricing / Templates): even rhythm, no stretch ----
   Cards carry .card's 20px bottom margin which, inside a grid, ADDS to the row
   gap (margins don't collapse in grid) and made rows uneven. And default
   align-items:stretch made every card in a row grow to match an expanded one,
   leaving whitespace under collapsed neighbours. Fix both. */
.sop-grid { align-items: start; }
.sop-grid > .card,
.sop-grid > .sop-card,
.cat-list > .card,
.charts-grid > .card { margin-bottom: 0; }

/* ---- section head: a touch more presence ---- */
.section-head h3 { font-size: 16.5px; }
.section-head .sh-titles::before {
  background: linear-gradient(180deg, var(--orange), var(--orange-600));
  box-shadow: 0 1px 4px rgba(241,90,34,.3);
}

/* Metrics I Need — clearer "selected" affordance on catalog rows (Phase 7) */
.cat-row-pick { flex: 0 0 auto; white-space: nowrap; }
.cat-row-pick.on { border-color: var(--orange); color: var(--orange); }
.cat-row.picked { border-color: var(--orange); box-shadow: var(--sh-glow-orange); background: var(--orange-100, #fff4ee); }

/* Data Health — errors / test-data surfacing (Phase 7.3) */
.statbar-item.warn-item { border-color: var(--warn, #c47a00); background: var(--warn-bg, #fff8ef); }
.statbar-item.warn-item .statbar-v { color: var(--warn, #c47a00); }
.err-card { border-color: var(--warn, #c47a00); box-shadow: 0 1px 6px rgba(196,122,0,.12); }
.err-card h3 { color: var(--warn, #b06f00); }

/* Pricing & Verticals — cleaner, non-cramped tables (Phase 7.4)
   The 6-column program tables were squished into 340px sop-grid cells and ran
   together. Give them a wider grid, a scroll wrapper, and real cell borders. */
.pr-prog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(480px, 1fr)); gap: 18px; margin-top: 4px; align-items: start; }
@media (max-width: 720px) { .pr-prog-grid { grid-template-columns: 1fr; } }
.pr-prog-card { margin-bottom: 0; }
.pr-prog-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px; margin-bottom: 12px; }
.pr-prog-title h3 { margin: 0; font-size: 15px; color: var(--navy); }
.pr-table-wrap { width: 100%; overflow-x: auto; }
.pr-rates { width: 100%; border-collapse: collapse; margin: 0; }
.pr-rates.pr-rates-wide { min-width: 360px; }
.pr-rates th { text-align: center; font-size: 10.5px; font-weight: 700; letter-spacing: .02em; padding: 6px 7px;
  background: var(--navy-50, #f2f3fb); color: var(--navy); border-bottom: 1.5px solid var(--line); white-space: nowrap; }
.pr-rates td { text-align: center; padding: 6px 7px; font-size: 12px; font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--line-2, #eef0f2); white-space: nowrap; }
.pr-rates tbody tr:last-child td { border-bottom: 0; }
.pr-rates tbody tr:nth-child(even) td { background: var(--bg-2, #fafbfc); }
.pr-rates td.pr-rl { text-align: left; font-weight: 700; color: var(--navy); }
/* enterprise-account program blocks: clearer separation */
.pr-prog { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.pr-prog:first-of-type { border-top: 0; margin-top: 10px; padding-top: 0; }
.pr-prog-head { margin-bottom: 8px; font-size: 13.5px; }

/* ============================================================
   DATA HEALTH & QUALITY HUB (Phase 8 — consolidated)
   ============================================================ */
/* always-visible clean-gate chips in the files bar */
.fb-gate { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; border: 1px solid var(--line); background: var(--card, #fff); cursor: pointer; white-space: nowrap; }
.fb-gate.ok    { border-color: var(--good-line, #bfe6d2); background: var(--good-bg, #f2fbf6); }
.fb-gate.warn  { border-color: var(--warn-line, #f0dda6); background: var(--warn-bg, #fff8ef); }
.fb-gate.force { border-color: var(--bad-line, #f2c4c0); background: var(--bad-bg, #fff5f5); }
.fb-gate:hover { box-shadow: var(--sh-1, 0 1px 4px rgba(0,0,0,.08)); }

/* readiness banner actions */
.gate-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }

/* issue-inbox groups: calm by default — a count + verdict, detail on open */
.issue-group > summary { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.issue-group .sh-sub { font-weight: 400; }
.ig-count { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 22px;
  padding: 0 7px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.ig-count.warn { background: var(--warn-bg, #fff8ef); color: var(--warn-600, #b06f00); border: 1px solid var(--warn-line, #f0dda6); }
.ig-count.ok   { background: var(--good-bg, #f2fbf6); color: var(--good, #1d7a4d); border: 1px solid var(--good-line, #bfe6d2); }
.issue-group .card { margin-top: 0; }

/* conflict full-context view */
.rc-hint { margin-top: 8px; padding: 7px 10px; border-radius: 8px; background: var(--navy-50, #f2f3fb);
  color: var(--ink-2); font-size: 12.5px; }
.snap-tog { display: inline-block; margin-top: 8px; font-size: 12.5px; }
.rec-card.snap { margin-top: 8px; }
.rec-row.hl { outline: 2px solid var(--orange); outline-offset: -2px; border-radius: 6px; background: var(--orange-100, #fff4ee); }
.prov-chip { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 10px;
  background: var(--navy-50, #f2f3fb); color: var(--ink-3, #6b7280); border: 1px solid var(--line); vertical-align: middle; }

/* auditor */
.audit-row > summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.audit-row { margin-top: 10px; }
tr.bad-row td { background: var(--bad-bg, #fff5f5); }
.count.bad { color: var(--bad-600, #b3261e); font-weight: 700; }
.match.on { border-color: var(--orange); box-shadow: var(--sh-glow-orange); }

/* mini action log */
.mini-log { margin: 6px 0 10px; padding-left: 18px; font-size: 12.5px; color: var(--ink-2); }
.mini-log li { margin: 3px 0; }
.row-actions { white-space: nowrap; }

/* dark theme */
:root[data-theme="dark"] .fb-gate.ok    { background: rgba(29,122,77,.15); }
:root[data-theme="dark"] .fb-gate.warn  { background: rgba(196,122,0,.15); }
:root[data-theme="dark"] .fb-gate.force { background: rgba(179,38,30,.18); }
:root[data-theme="dark"] .rc-hint { background: rgba(255,255,255,.06); }
:root[data-theme="dark"] .rec-row.hl { background: rgba(241,90,34,.12); }
:root[data-theme="dark"] .prov-chip { background: rgba(255,255,255,.08); }
:root[data-theme="dark"] tr.bad-row td { background: rgba(179,38,30,.12); }

/* verdict banners: app.css fades them to a hardcoded #fff, which is unreadable
   on the dark canvas — fade to the dark surface instead */
:root[data-theme="dark"] .verdict.good      { background: linear-gradient(100deg, var(--good-bg), var(--surface) 70%); border-color: var(--good-line); }
:root[data-theme="dark"] .verdict.minor     { background: linear-gradient(100deg, var(--warn-bg), var(--surface) 70%); border-color: var(--warn-line); }
:root[data-theme="dark"] .verdict.attention { background: linear-gradient(100deg, var(--bad-bg),  var(--surface) 70%); border-color: var(--bad-line); }

/* dark theme: --navy flips to light lavender (a TEXT color on dark), which made
   the sidebar wash out — pin it to the dark navy surface instead */
:root[data-theme="dark"] .sidebar { background: var(--navy-800); box-shadow: 2px 0 16px rgba(0,0,0,.5); }

/* ============================================================
   ISSUE TABLE (hub v2) — everything visible in one scannable grid
   ============================================================ */
.issue-card { padding-top: 12px; }
.tf-bar { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tf-chip { border: 1px solid var(--line); background: var(--surface, #fff); border-radius: 999px;
  padding: 5px 12px; font-size: 12.5px; cursor: pointer; color: var(--ink-2); font-weight: 600; }
.tf-chip b { color: var(--ink); }
.tf-chip:hover { border-color: var(--navy-500, #8584e0); }
.tf-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tf-chip.on b { color: #fff; }
.tf-bar .search.sm { max-width: 280px; }
.tf-bulk { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px; }

table.data.issue-table { width: 100%; table-layout: fixed; }
table.data.issue-table th { white-space: normal; }
table.data.issue-table td { vertical-align: top; padding-top: 10px; padding-bottom: 10px;
  white-space: normal; overflow-wrap: break-word; }
/* 4-column widths (no bulk-select checkbox) */
table.data.issue-table th:nth-child(1) { width: 17%; }
table.data.issue-table th:nth-child(2) { width: 31%; }
table.data.issue-table th:nth-child(3) { width: 25%; }
table.data.issue-table th:nth-child(4) { width: 27%; }
/* 5-column widths (.with-sel = bulk-select checkbox col first) — P0 fix:
   the checkbox column shifted every nth-child by one, leaving the last column
   ~0 width under table-layout:fixed (one-character-per-line collapse). */
table.data.issue-table.with-sel th:nth-child(1) { width: 34px; }
table.data.issue-table.with-sel th:nth-child(2) { width: 17%; }
table.data.issue-table.with-sel th:nth-child(3) { width: 30%; }
table.data.issue-table.with-sel th:nth-child(4) { width: 24%; }
table.data.issue-table.with-sel th:nth-child(5) { width: auto; }
table.data.issue-table td:last-child, table.data.issue-table th:last-child { padding-right: 12px; }
.issue-table tr.ir { border-left: 3px solid transparent; }
.issue-table tr.ir.bad  td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
.issue-table tr.ir.warn td:first-child { box-shadow: inset 3px 0 0 var(--warn); }
.issue-table tr.ir.info td:first-child { box-shadow: inset 3px 0 0 var(--info); }
.ir-type { }
.it-chip { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 800;
  letter-spacing: .02em; white-space: nowrap; border: 1px solid var(--line); }
.it-chip.bad  { background: var(--bad-bg);  color: var(--bad-600);  border-color: var(--bad-line); }
.it-chip.warn { background: var(--warn-bg); color: var(--warn-600); border-color: var(--warn-line); }
.it-chip.info { background: var(--info-bg, #eef4ff); color: var(--info, #3b62b8); border-color: var(--info-line, #c9d9f4); }
.ir-who { font-size: 12.5px; margin-top: 7px; line-height: 1.35; }
.ir-problem { font-size: 13px; }
.ir-why { color: var(--ink-3); font-size: 11.5px; margin-top: 4px; line-height: 1.45; }
.ir-ev { }
.ev-chip { max-width: 100%; }
.ev-chip b { overflow-wrap: anywhere; }
.ev-chip { display: flex; flex-direction: column; gap: 1px; padding: 4px 8px; margin: 0 6px 4px 0;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg-2, #fafbfc); font-size: 12px; }
.ev-chip .ev-src { font-size: 10px; color: var(--ink-3); }
.ir-fix { font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; }
.ir-act { }
.ir-btns { display: flex; flex-wrap: wrap; gap: 5px; }
.ir-btns .btn.sm { white-space: nowrap; }
.ir-done { font-size: 12px; color: var(--good, #1d7a4d); font-weight: 700; }
tr.ir-open > td { background: var(--bg-2, #fafbfc); border-top: 0; padding: 12px 14px 16px; }
.ir-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ir-more.on { background: var(--navy-50, #f2f3fb); }

:root[data-theme="dark"] .tf-chip { background: var(--surface); }
:root[data-theme="dark"] .tf-chip.on { background: var(--navy-600); border-color: var(--navy-600); }
:root[data-theme="dark"] .ev-chip { background: rgba(255,255,255,.04); }
:root[data-theme="dark"] tr.ir-open > td { background: rgba(255,255,255,.03); }
:root[data-theme="dark"] .it-chip.info { background: var(--info-bg); border-color: var(--info-line); }

/* ============================================================
   WORK HUB (Phase 9) — tasks / team / PM section
   ============================================================ */
.wh-me { font-size: 12px; color: var(--ink-3); }
.wh-me b { color: var(--ink-2); }
.wh-new { font-size: 11px; font-weight: 700; color: var(--orange-600); background: var(--orange-50);
  border: 1px solid var(--orange-100); border-radius: var(--r-pill); padding: 2px 9px; margin-left: 8px; vertical-align: middle; }
.wh-warn { border-left: 3px solid var(--warn); }
.task-conn { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: var(--r-pill); margin-left: 6px; vertical-align: middle; }
.task-conn.online { color: var(--good-600); background: var(--good-bg); border: 1px solid var(--good-line); }
.task-conn.local  { color: var(--ink-3); background: var(--bg-2); border: 1px solid var(--line); }
.task-conn.loading{ color: var(--info); background: var(--info-bg); border: 1px solid var(--info-line); }

/* attention strip */
.wh-attn { background: var(--bad-bg); border: 1px solid var(--bad-line); border-radius: var(--r);
  padding: 12px 14px; margin: 14px 0; }
.wh-attn-h { font-weight: 700; color: var(--bad-600); margin-bottom: 8px; font-size: 13px; }
.wh-attn-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wh-attn-item { text-align: left; background: var(--surface); border: 1px solid var(--bad-line);
  border-radius: var(--r-sm); padding: 7px 11px; cursor: pointer; display: flex; flex-direction: column; gap: 2px;
  max-width: 260px; transition: transform var(--fast) var(--ease); }
.wh-attn-item:hover { transform: translateY(-1px); box-shadow: var(--sh-1); }
.wh-attn-title { font-weight: 600; font-size: 13px; color: var(--ink); }
.wh-attn-why { font-size: 11px; color: var(--bad-600); }

/* tabs */
.wh-tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin: 16px 0 18px; flex-wrap: wrap; }
.wh-tab { background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -2px;
  padding: 9px 15px; font-size: 14px; font-weight: 600; color: var(--ink-3); cursor: pointer; border-radius: var(--r-sm) var(--r-sm) 0 0; }
.wh-tab:hover { color: var(--ink); background: var(--bg-2); }
.wh-tab.on { color: var(--navy); border-bottom-color: var(--orange); }
.wh-tc { display: inline-block; font-size: 11px; font-weight: 700; background: var(--navy-100); color: var(--navy-700);
  border-radius: var(--r-pill); padding: 1px 7px; margin-left: 3px; }
.wh-tc.red { background: var(--bad-bg); color: var(--bad-600); }

/* quick add */
.wh-qa .wh-qa-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wh-qa #wh-qa { flex: 1 1 320px; min-width: 220px; }
.wh-qa .gf-views-sel, .wh-qa .gf-pill-date { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 9px; background: var(--surface); color: var(--ink); }

/* cards grid */
.wh-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.wh-card { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-2);
  border-radius: var(--r); padding: 11px 13px; cursor: pointer; transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.wh-card:hover { transform: translateY(-1px); box-shadow: var(--sh-1); }
.wh-card.attn { border-left-color: var(--bad); }
.wh-card.over { border-left-color: var(--warn); }
.wh-card-top { display: flex; align-items: center; gap: 8px; }
.wh-card-title { flex: 1; font-weight: 600; font-size: 14px; color: var(--ink); line-height: 1.3; }
.wh-card-meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.wh-card-attn { margin-top: 8px; font-size: 12px; color: var(--bad-600); }
.wh-link-note { margin-top: 7px; font-size: 11.5px; color: var(--good-600); background: var(--good-bg);
  border: 1px solid var(--good-line); border-radius: var(--r-sm); padding: 4px 8px; }

.wh-check { background: none; border: 1.5px solid var(--line-2); border-radius: 5px; width: 20px; height: 20px;
  cursor: pointer; color: var(--good-600); font-size: 12px; line-height: 1; flex-shrink: 0; }
.wh-check:hover { border-color: var(--good); background: var(--good-bg); }
.wh-mini { background: none; border: none; cursor: pointer; font-size: 15px; color: var(--orange); padding: 0 2px; }

/* chips */
.wh-chip { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 2px 9px; color: var(--ink-2); }
.wh-chip.merch { background: var(--navy-50); color: var(--navy-700); border-color: var(--navy-100); }
.wh-chip.cat { background: var(--surface-2); }
.wh-chip.over { color: var(--warn-600); background: var(--warn-bg); border-color: var(--warn-line); }
.wh-chip.pri-high { color: var(--bad-600); background: var(--bad-bg); border-color: var(--bad-line); }
.wh-chip.type-waiting { color: var(--warn-600); background: var(--warn-bg); border-color: var(--warn-line); }
.wh-chip.type-followup { color: var(--info); background: var(--info-bg); border-color: var(--info-line); }
.wh-chip.type-update { color: var(--c-violet); }
.wh-dot { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px;
  border-radius: 50%; color: #fff; font-size: 9px; font-weight: 700; }
.wh-pdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--med); }
.wh-pdot.high { background: var(--bad); } .wh-pdot.low { background: var(--ink-4); }

/* board */
.wh-board-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.wh-seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; }
.wh-seg-b { background: var(--surface); border: none; padding: 7px 13px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--ink-3); }
.wh-seg-b.on { background: var(--navy); color: #fff; }
.wh-search { max-width: 320px; }
.wh-kanban { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; align-items: start; }
.wh-col { padding: 12px; }
.wh-col h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-3); margin-bottom: 10px; }
.wh-col .wh-card { margin-bottom: 8px; }
@media (max-width: 1100px) { .wh-kanban { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .wh-kanban { grid-template-columns: 1fr; } .wh-cards { grid-template-columns: 1fr; } }

/* list table */
.wh-tablewrap { overflow-x: auto; }
table.wh-table { width: 100%; }
table.wh-table td { white-space: nowrap; vertical-align: middle; }
.wh-tr { cursor: pointer; }
.wh-tr:hover > td { background: var(--bg-2); }
.wh-tr.attn > td:nth-child(2) { border-left: 3px solid var(--bad); }
.wh-td-title { white-space: normal !important; font-weight: 600; }
.wh-over { color: var(--warn-600); font-weight: 600; }
.wh-link-badge { font-size: 10.5px; font-weight: 700; color: var(--good-600); background: var(--good-bg);
  border: 1px solid var(--good-line); border-radius: var(--r-pill); padding: 1px 7px; white-space: nowrap; }

/* waiting */
.wh-waitlist { display: flex; flex-direction: column; gap: 9px; }
.wh-wait { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--good); border-radius: var(--r); padding: 12px 14px; }
.wh-wait.warn { border-left-color: var(--warn); }
.wh-wait.bad { border-left-color: var(--bad); }
.wh-wait-main { flex: 1; cursor: pointer; }
.wh-wait-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.wh-wait-for { margin-top: 3px; color: var(--ink-2); }
.wh-age { font-size: 11px; font-weight: 700; border-radius: var(--r-pill); padding: 1px 8px; background: var(--good-bg); color: var(--good-600); }
.wh-age.warn { background: var(--warn-bg); color: var(--warn-600); }
.wh-age.bad { background: var(--bad-bg); color: var(--bad-600); }
.wh-appid { font-family: var(--mono); font-size: 11px; color: var(--navy-700); background: var(--navy-50);
  border-radius: var(--r-sm); padding: 1px 6px; cursor: pointer; }
.wh-wait-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* team */
.wh-team-bar, .wh-act-bar { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.wh-act-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wh-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; align-items: start; }
.wh-tcol { padding: 13px; }
.wh-tcol-h { display: flex; align-items: center; gap: 7px; font-size: 14px; }
.wh-tcol-role { font-size: 11px; color: var(--ink-4); margin-left: auto; }
.wh-tcol-stats { display: flex; gap: 10px; font-size: 11.5px; color: var(--ink-3); margin: 8px 0 10px; }
.wh-tcol-stats .ok { color: var(--good-600); font-weight: 600; }
.wh-mini-task { display: flex; align-items: center; gap: 7px; padding: 5px 0; border-top: 1px solid var(--line);
  font-size: 13px; cursor: pointer; }
.wh-mini-task:hover { color: var(--navy); }
.wh-done-week { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.wh-tcol.unassigned { border-style: dashed; }
.wh-manage { background: var(--bg-2); }
.wh-manage-list { display: flex; flex-wrap: wrap; gap: 7px; }
.wh-mchip { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 4px 10px; font-size: 13px; }
.wh-x { background: none; border: none; color: var(--ink-4); cursor: pointer; font-size: 15px; line-height: 1; }
.wh-x:hover { color: var(--bad); }

/* activity feed */
.wh-feed { display: flex; flex-direction: column; gap: 2px; }
.wh-feed-item { display: flex; gap: 11px; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.wh-feed-item[data-act] { cursor: pointer; border-radius: var(--r-sm); }
.wh-feed-item[data-act]:hover { background: var(--bg-2); }
.wh-feed-ic { font-size: 15px; flex-shrink: 0; }
.wh-feed-line { font-size: 13px; color: var(--ink-2); }
.wh-feed-task { color: var(--navy-700); font-weight: 600; }
.wh-feed-text { font-size: 13px; color: var(--ink); margin: 2px 0; }
.wh-digest-h { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.wh-digest-out { width: 100%; min-height: 220px; font-family: var(--mono); font-size: 12px; border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 10px; background: var(--bg-2); color: var(--ink); resize: vertical; }

/* end-of-day log */
.wh-log-row { display: flex; gap: 8px; align-items: center; }
.wh-log-row .search { flex: 1; }

/* empty states */
.wh-empty { text-align: center; padding: 40px 20px; color: var(--ink-3); font-size: 14px; background: var(--bg-2);
  border: 1px dashed var(--line); border-radius: var(--r); }
.wh-empty b { color: var(--ink-2); }

/* detail slide-in panel */
.wh-detail-backdrop { position: fixed; inset: 0; background: rgba(15,18,40,.28); z-index: 90; }
.wh-detail { position: fixed; top: 0; right: 0; width: 440px; max-width: 92vw; height: 100vh; overflow-y: auto;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--sh-3); z-index: 91; padding: 18px 20px;
  animation: whSlide var(--slide, .22s) var(--ease); }
@keyframes whSlide { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.wh-detail-head { display: flex; justify-content: space-between; align-items: center; }
.wh-detail-title { width: 100%; font-size: 18px; font-weight: 700; border: none; border-bottom: 2px solid var(--line);
  background: none; color: var(--ink); padding: 8px 0; margin: 10px 0 14px; }
.wh-detail-title:focus { outline: none; border-bottom-color: var(--orange); }
.wh-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; margin-bottom: 12px; }
.wh-detail-grid label, .wh-detail-notes { display: flex; flex-direction: column; gap: 3px; font-size: 11px;
  font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }
.wh-detail-grid input, .wh-detail-grid select, .wh-detail-notes textarea { font-size: 13px; font-weight: 400;
  text-transform: none; letter-spacing: 0; padding: 7px 8px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); }
.wh-detail-notes { margin-bottom: 12px; }
.wh-detail-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.wh-detail-actions .btn.danger { color: var(--bad-600); }
.wh-detail-actions .btn.on { background: var(--bad-bg); border-color: var(--bad-line); }
.wh-doneline { font-size: 13px; color: var(--good-600); background: var(--good-bg); border-radius: var(--r-sm); padding: 8px 10px; margin-bottom: 12px; }
.wh-thread-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3);
  border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 8px; }
.wh-thread { display: flex; flex-direction: column; gap: 9px; margin-bottom: 12px; max-height: 300px; overflow-y: auto; }
.wh-thread-item { font-size: 13px; }
.wh-thread-item b { color: var(--ink); }
@media (max-width: 520px) { .wh-detail-grid { grid-template-columns: 1fr; } .wh-detail { width: 100%; } }

/* dark tweaks */
:root[data-theme="dark"] .wh-seg-b.on { background: var(--navy-600); }
:root[data-theme="dark"] .wh-detail-backdrop { background: rgba(0,0,0,.5); }

/* About → Features segmented by area (Phase 9) */
.feat-group { margin-top: 18px; padding-top: 4px; }
.feat-group:first-of-type { margin-top: 4px; }
.feat-group-h { display: flex; align-items: flex-start; gap: 11px; padding: 10px 12px; margin-bottom: 10px;
  background: var(--bg-2); border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: var(--r); }
.feat-group-ic { font-size: 22px; line-height: 1.2; }
.feat-group-t { font-size: 16px; font-weight: 700; color: var(--navy); }
:root[data-theme="dark"] .feat-group-t { color: var(--ink); }
.feat-group-b { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }

/* ============================================================
   FACELIFT (Phase 9.1) — one visual language across the tool
   ============================================================ */

/* --- per-area identity: each section of the tool has its own accent ---
   Reporting = navy analytics · Data = teal trust · Work = orange action ·
   Reference = violet library · Guide = slate. */
:root { --area: var(--navy-500); --area-soft: var(--navy-50); }
body[data-area="reporting"] { --area: #4f46e5; --area-soft: rgba(79,70,229,.09); }
body[data-area="data"]      { --area: #0d9488; --area-soft: rgba(13,148,136,.09); }
body[data-area="work"]      { --area: var(--orange-600); --area-soft: rgba(241,90,34,.08); }
body[data-area="reference"] { --area: #7c3aed; --area-soft: rgba(124,58,237,.09); }
body[data-area="guide"]     { --area: #475569; --area-soft: rgba(71,85,105,.09); }
:root[data-theme="dark"] body[data-area="reporting"] { --area: #818cf8; }
:root[data-theme="dark"] body[data-area="data"]      { --area: #2dd4bf; }
:root[data-theme="dark"] body[data-area="work"]      { --area: #fb923c; }
:root[data-theme="dark"] body[data-area="reference"] { --area: #a78bfa; }
:root[data-theme="dark"] body[data-area="guide"]     { --area: #94a3b8; }

/* area eyebrow: every page announces its section, colored to match */
.view.show[data-arealabel]::before {
  content: attr(data-arealabel);
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--area); margin: 2px 0 4px;
}
.view-head { border-bottom: 2px solid var(--line); position: relative; }
.view-head::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 64px; height: 2px;
  background: var(--area); border-radius: 2px;
}
.section-head .sh-eyebrow { color: var(--area); }
/* (the accent stat tile keeps its navy gradient + white text — the area color
   would fight the gradient; the area identity lives in the eyebrow/underline) */

/* --- sidebar: crisp SVG icons + area-tinted group labels --- */
.side-nav .ni { width: 16px; height: 16px; display: inline-flex; align-items: center; flex-shrink: 0; opacity: .85; }
.side-nav .ni svg { width: 100%; height: 100%; stroke-width: 1.9; }
.nav-btn { display: flex; align-items: center; gap: 9px; transition: background var(--fast) var(--ease), transform var(--fast) var(--ease); }
.nav-btn:hover { transform: translateX(1px); }
.nav-btn.on .ni { opacity: 1; }
.side-group { display: flex; align-items: center; gap: 6px; }
.side-group::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.35); }
.side-group.area-reporting::before { background: #818cf8; }
.side-group.area-data::before      { background: #2dd4bf; }
.side-group.area-work::before      { background: #fb923c; }
.side-group.area-reference::before { background: #a78bfa; }
.side-group.area-guide::before     { background: #94a3b8; }

/* --- sidebar search / palette trigger --- */
.side-search {
  display: flex; align-items: center; gap: 8px; margin: 10px 14px 2px; padding: 8px 10px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--r-sm); color: rgba(255,255,255,.75); cursor: pointer;
  font-size: 12.5px; width: calc(100% - 28px); text-align: left;
  transition: background var(--fast) var(--ease);
}
.side-search:hover { background: rgba(255,255,255,.12); color: #fff; }
.side-search svg { width: 14px; height: 14px; flex-shrink: 0; }
.side-search span { flex: 1; }
.side-search kbd {
  font-family: var(--mono); font-size: 10px; padding: 2px 6px; border-radius: 4px;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.6);
}

/* --- command palette --- */
.pal-backdrop {
  position: fixed; inset: 0; background: rgba(10,12,32,.42); z-index: 200;
  display: none; align-items: flex-start; justify-content: center; padding-top: 12vh;
  backdrop-filter: blur(2px);
}
.pal-backdrop.open { display: flex; }
.pal {
  width: 620px; max-width: 92vw; background: var(--surface); border-radius: var(--r-lg);
  box-shadow: var(--sh-3); border: 1px solid var(--line); overflow: hidden;
  animation: palIn .18s var(--ease);
}
@keyframes palIn { from { transform: translateY(-8px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.pal-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); }
.pal-head svg { width: 17px; height: 17px; color: var(--ink-3); flex-shrink: 0; }
.pal-head input { flex: 1; border: none; background: none; font-size: 15px; color: var(--ink); outline: none; }
.pal-head kbd { font-family: var(--mono); font-size: 10px; padding: 2px 7px; border-radius: 4px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink-4); }
.pal-list { max-height: 46vh; overflow-y: auto; padding: 6px; }
.pal-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: var(--r-sm); cursor: pointer; }
.pal-item.on { background: var(--area-soft, var(--bg-2)); }
.pal-item.on .pal-label { color: var(--ink); }
.pal-ic { width: 18px; text-align: center; color: var(--ink-3); flex-shrink: 0; font-size: 13px; }
.pal-ic svg { width: 14px; height: 14px; }
.pal-label { flex: 1; font-size: 13.5px; font-weight: 600; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pal-sub { font-size: 11px; color: var(--ink-4); flex-shrink: 0; }
.pal-empty { padding: 26px 14px; text-align: center; color: var(--ink-3); font-size: 13px; }
.pal-foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--line); background: var(--bg-2); font-size: 10.5px; color: var(--ink-4); }
:root[data-theme="dark"] .pal-backdrop { background: rgba(0,0,0,.55); }

/* --- redesigned empty / welcome state --- */
.empty { text-align: center; padding: 56px 24px; }
.empty-hero { width: 58px; height: 58px; margin: 0 auto 14px; border-radius: 18px;
  background: var(--area-soft, var(--navy-50)); color: var(--area, var(--navy));
  display: flex; align-items: center; justify-content: center; }
.empty-hero svg { width: 26px; height: 26px; }
.empty h3 { font-size: 19px; margin-bottom: 8px; }
.empty p { max-width: 480px; margin: 0 auto 18px; color: var(--ink-3); }
.empty-steps { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 20px; }
.empty-step { display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); padding: 12px 18px; min-width: 150px; }
.empty-step .es-n { width: 20px; height: 20px; border-radius: 50%; background: var(--area, var(--navy));
  color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; margin-bottom: 4px; }
.empty-step b { font-size: 13px; }
.empty-step span:last-child { font-size: 11.5px; color: var(--ink-4); }
.empty-actions { display: flex; gap: 8px; justify-content: center; }

/* --- toast polish --- */
.toast { border-left: 3px solid var(--info); box-shadow: var(--sh-2); }
.toast.ok { border-left-color: var(--good); }
.toast.bad { border-left-color: var(--bad); }

/* --- drilldown panel: matched to the Work Hub panel language --- */
.dd-panel { border-left: 1px solid var(--line); box-shadow: var(--sh-3); }
.dd-head { border-bottom: 2px solid var(--line); position: relative; }
.dd-head::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 48px; height: 2px;
  background: var(--area, var(--navy)); border-radius: 2px; }
.dd-pivot { transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease); }
.dd-pivot:hover { transform: translateY(-1px); box-shadow: var(--sh-1); }

/* --- micro-interactions --- */
.card { transition: box-shadow var(--fast) var(--ease); }
.btn { transition: transform var(--fast) var(--ease), box-shadow var(--fast) var(--ease), background var(--fast) var(--ease); }
.btn:active { transform: scale(.98); }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--area, var(--navy)); outline-offset: 1px; }

/* --- Work Hub additions: refresh, bulk bar, drag & drop --- */
.wh-refresh { background: none; border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 2px 8px; margin-left: 8px; cursor: pointer; color: var(--ink-3); font-size: 13px; }
.wh-refresh:hover { color: var(--area); border-color: var(--area); transform: rotate(45deg); transition: transform .18s var(--ease); }
.wh-bulk { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--area-soft, var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--r); padding: 9px 13px; margin-bottom: 10px; }
.wh-bulk b { font-size: 13px; color: var(--area); }
.wh-bulk .danger { color: var(--bad-600); }
.wh-selbox { width: 15px; height: 15px; accent-color: var(--area, var(--navy)); cursor: pointer; }
.wh-tr.sel > td { background: var(--area-soft, var(--bg-2)); }
.wh-card[draggable="true"] { cursor: grab; }
.wh-card[draggable="true"]:active { cursor: grabbing; }
.wh-col { transition: background var(--fast) var(--ease), border-color var(--fast) var(--ease); }

/* --- overview hero spacing at narrow widths (small-fixes queue) --- */
@media (max-width: 900px) {
  .hero, .hero-cards, .kpi-hero { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important; gap: 10px !important; }
}

/* --- dark sweep --- */
:root[data-theme="dark"] .empty-step { background: var(--surface-2); }
:root[data-theme="dark"] .side-search { background: rgba(255,255,255,.05); }
:root[data-theme="dark"] .wh-bulk { border-color: var(--line-2); }


/* --- dark sweep round 2 (from the full-screenshot review) ---
   app.css hardcodes #fff inside several gradients; in dark that paints a white
   wash over light text. Mirror the verdict-banner fix everywhere it was missed. */
:root[data-theme="dark"] .insight { background: var(--surface); }
:root[data-theme="dark"] .insight.sev-high   { background: linear-gradient(100deg, var(--bad-bg),  var(--surface) 60%); }
:root[data-theme="dark"] .insight.sev-medium { background: linear-gradient(100deg, var(--warn-bg), var(--surface) 60%); }
:root[data-theme="dark"] .banner.ok  { background: linear-gradient(100deg, var(--good-bg), var(--surface) 70%); border-color: var(--good-line); }
:root[data-theme="dark"] .banner.bad { background: linear-gradient(100deg, var(--bad-bg),  var(--surface) 70%); border-color: var(--bad-line); }
:root[data-theme="dark"] .spine-node { background: linear-gradient(170deg, rgba(129,140,248,.10), var(--surface) 80%); border-color: var(--line-2); }
:root[data-theme="dark"] .rec-row.empty { background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 5px, var(--surface) 5px, var(--surface) 10px); }
/* the accent stat tile: dark tokens remap navy to bright values — pin a true
   dark gradient and keep its labels readable */
:root[data-theme="dark"] .statbar-item.accent { background: linear-gradient(150deg, #2b2f5e, #20234a); }
:root[data-theme="dark"] .statbar-item.accent .statbar-k { color: rgba(255,255,255,.6); }
:root[data-theme="dark"] .statbar-item.accent .statbar-v { color: #fff; }
:root[data-theme="dark"] .statbar-item.accent .statbar-s { color: rgba(255,255,255,.65); }

/* --- facelift round 3: make the per-area identity unmistakable ---
   The active nav pill takes the area color (dark-sidebar bright variants),
   and every page header sits on a soft wash of its area color. */
body[data-area="reporting"] .side-nav .nav-btn.on::before { background: #818cf8; }
body[data-area="data"]      .side-nav .nav-btn.on::before { background: #2dd4bf; }
body[data-area="work"]      .side-nav .nav-btn.on::before { background: #fb923c; }
body[data-area="reference"] .side-nav .nav-btn.on::before { background: #a78bfa; }
body[data-area="guide"]     .side-nav .nav-btn.on::before { background: #94a3b8; }

.view-head {
  background: linear-gradient(100deg, var(--area-soft), transparent 65%);
  border-radius: var(--r); padding: 14px 16px 16px; margin-left: -16px; margin-right: -16px;
}
.view.show[data-arealabel]::before { margin-left: 2px; }
.view-head::after { left: 16px; width: 96px; }
@media (max-width: 900px) { .view-head { margin-left: 0; margin-right: 0; } }

/* run-through improvements: clickable explorer rows + SOP copy + drilldown export */
tr.raw-row { cursor: pointer; }
tr.raw-row:hover > td { background: var(--bg-2); }
.answer-q { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.answer-copy { flex-shrink: 0; }
.dd-filter { display: flex; gap: 8px; align-items: center; }
.dd-filter .search { flex: 1; }

/* dark: the Active hero card — dark tokens remap navy to light lavender,
   which washed out the white text; pin a true dark gradient (same fix as
   the accent stat tile) */
:root[data-theme="dark"] .hero-card.accent { background: linear-gradient(145deg, #2b2f5e 0%, #20234a 100%); }
:root[data-theme="dark"] .hero-card.accent .hero-k,
:root[data-theme="dark"] .hero-card.accent .hero-s { color: rgba(255,255,255,.6); }

/* ============ HUB AUTOPILOT + triage (Phase 10) ============ */
.ap-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--good-bg);
  border: 1px solid var(--good-line); border-radius: var(--r); padding: 9px 13px; margin-bottom: 10px; }
.ap-ic { font-size: 16px; }
.ap-text { flex: 1; font-size: 13px; color: var(--ink-2); min-width: 220px; }
.ap-toggle { display: flex; align-items: flex-start; gap: 9px; padding: 7px 0; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.ap-toggle input { margin-top: 2px; accent-color: var(--area, var(--navy)); }
.tf-selbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--area-soft, var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 12px; margin: 8px 0; }
.tf-selbar b { color: var(--area); font-size: 13px; }
.tf-selbar .note { flex-basis: 100%; margin: 2px 0 0; }
.tf-selbar .danger { color: var(--bad-600); }
table.issue-table td.ir-sel, table.issue-table th.ir-sel { width: 30px; text-align: center; vertical-align: middle; }
.ir-sel input { width: 15px; height: 15px; accent-color: var(--area, var(--navy)); cursor: pointer; }
tr.ir.sel > td { background: var(--area-soft, var(--bg-2)); }
.it-chip.good { color: var(--good-600); background: var(--good-bg); border-color: var(--good-line); }
.tf-chip.good { color: var(--good-600); }

/* ============================================================
   P0 DARK SWEEP (2026-07-14) — every remaining hardcoded-light
   surface. app.css paints these with #fff gradients or
   var(--navy)+white text; in dark, --navy flips to light lavender
   (#C9C8FF), so white-on-navy combos wash out. Pin dark variants.
   ============================================================ */
/* the hub explainer cards (Aamir's screenshot) */
:root[data-theme="dark"] .guide-card { background: linear-gradient(160deg, var(--navy-50), var(--surface) 60%); }
:root[data-theme="dark"] .guide-item { background: var(--surface-2); border-color: var(--line); }
/* white-on-navy chrome */
:root[data-theme="dark"] .seg-btn.on { background: var(--navy-600); color: #fff; }
:root[data-theme="dark"] .seg-btn.on:hover { background: var(--navy-500); color: #fff; }
:root[data-theme="dark"] .btn.navy { background: var(--navy-600); color: #fff; }
:root[data-theme="dark"] .jump:hover { background: var(--navy-600); border-color: var(--navy-600); color: #fff; }
:root[data-theme="dark"] .dd-head { background: var(--navy-800); }
:root[data-theme="dark"] .dd-table thead th { background: var(--navy-800); }
:root[data-theme="dark"] .price-card-h { background: var(--navy-800); }
:root[data-theme="dark"] .cat-reqbar { background: var(--navy-800); }
/* light-gradient / #fff card surfaces */
:root[data-theme="dark"] .match { background: var(--surface); }
:root[data-theme="dark"] .callout.warn { border-color: var(--warn-line); }

/* ============================================================
   SOP LIBRARY v2 (2026-07-14) — single source of truth.
   Library shelves → doc cards (outline quick-view) → full reader.
   ============================================================ */
.sop-hero { margin: 4px 0 18px; }
.sop-hero-q { width: 100%; max-width: 720px; font-size: 15px; padding: 13px 18px; border-radius: var(--r-lg); }
.sop-hero-meta { margin-top: 7px; font-size: 12px; color: var(--ink-3); }
.sop-jump { max-width: 260px; }

.sop-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 12px; margin-bottom: 6px; }
.sopc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--sh-1); }
.sopc-top { display: flex; align-items: center; }
.sopc-code { font-family: var(--mono); font-size: 10.5px; font-weight: 700; letter-spacing: .06em;
  color: var(--area, var(--navy)); border: 1px solid var(--line); border-radius: 5px; padding: 2px 7px;
  background: var(--bg-2); }
.sopc-size { font-size: 11px; color: var(--ink-4); }
/* v27.4 — SOP version chip + Updated / New / Draft badges */
.sopc-ver { font-family: var(--mono); font-size: 10.5px; font-weight: 700; color: var(--ink-3); margin-left: 6px; }
.sopc-badge { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px;
  padding: 1px 7px; margin-left: 6px; border: 1px solid var(--good-line); color: var(--good-600); background: var(--good-bg); }
.sopc-badge.new { border-color: var(--line); color: var(--navy); background: var(--bg-2); }
.sopc-badge.draft { border-color: var(--warn-line); color: var(--warn-600); background: var(--warn-bg); }
.sopc-title { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.35; }
.sopc-prov { font-size: 11px; color: var(--ink-3); }
.sopc-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.sopc-outline { margin: 8px 0 0; padding: 0 0 0 4px; list-style: none; border-top: 1px dashed var(--line); }
.sopc-outline li { margin: 0; }
.sopc-sec { display: block; width: 100%; text-align: left; font: inherit; font-size: 12.5px; color: var(--ink-2);
  background: none; border: 0; padding: 5px 6px; border-radius: 6px; cursor: pointer; }
.sopc-sec:hover { background: var(--bg-2); color: var(--area, var(--navy)); }

/* search hits — exact sections, highlighted */
.sop-results { padding: 10px 12px; }
.sop-hit { display: block; width: 100%; text-align: left; font: inherit; background: none; border: 0;
  border-bottom: 1px solid var(--line-2); padding: 10px 8px; cursor: pointer; border-radius: 8px; }
.sop-hit:last-child { border-bottom: 0; }
.sop-hit:hover { background: var(--bg-2); }
.sop-hit.gloss { cursor: default; }
.sop-hit-h { font-size: 13.5px; margin-bottom: 3px; color: var(--ink); }
.sop-hit-t { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.sop-hit mark { background: var(--warn-bg); color: var(--warn-600); border-radius: 3px; padding: 0 2px; font-weight: 700; }

/* glossary */
.gloss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 4px 18px; margin-top: 10px; }
.gloss-row { display: flex; gap: 10px; align-items: baseline; padding: 6px 4px; border-bottom: 1px solid var(--line-2); }
.gloss-term { font: inherit; font-family: var(--mono); font-size: 12px; font-weight: 700; color: var(--area, var(--navy));
  background: none; border: 0; padding: 0; cursor: pointer; white-space: nowrap; }
.gloss-term:hover { text-decoration: underline; }
.gloss-def { font-size: 12.5px; color: var(--ink-2); line-height: 1.5; }

/* reader */
.sr-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--bg); padding: 10px 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.sr-title { font-size: 15px; }
.sr-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 900px) { .sr-layout { grid-template-columns: 1fr; } .sr-toc { position: static; } }
.sr-toc { position: sticky; top: 56px; display: flex; flex-direction: column; gap: 2px; }
.sr-toc-h { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 6px; }
.sr-toc-i { text-align: left; font: inherit; font-size: 12.5px; color: var(--ink-2); background: none; border: 0;
  border-left: 2px solid var(--line); padding: 6px 10px; cursor: pointer; }
.sr-toc-i:hover, .sr-toc-i.on { color: var(--area, var(--navy)); border-left-color: var(--area, var(--navy)); background: var(--bg-2); }
.sr-body { max-width: 860px; }
.sr-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 22px; margin-bottom: 14px; box-shadow: var(--sh-1); }
.sr-sec.flash { animation: flash .9s var(--ease); }
.sr-sec-h { display: flex; align-items: baseline; gap: 10px; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; margin-bottom: 10px; }
.sr-sec-h h3 { margin: 0; font-size: 16.5px; flex: 1; }
.sr-h { margin: 16px 0 6px; font-size: 14px; color: var(--ink); }
.sr-h.h3 { font-size: 13px; color: var(--ink-2); }
.sr-p { font-size: 13.5px; line-height: 1.7; color: var(--ink-2); margin: 8px 0; max-width: 78ch; }
.sr-ul { margin: 6px 0 10px; padding-left: 22px; }
.sr-ul li { font-size: 13.5px; line-height: 1.65; color: var(--ink-2); margin: 4px 0; max-width: 76ch; }
.sr-ul li.sub { margin-left: 18px; list-style-type: circle; }
.sr-tw { margin: 10px 0; }
.sr-table th { white-space: normal; }
.sr-table td { white-space: normal; overflow-wrap: break-word; vertical-align: top; }
.sr-tip { background: var(--info-bg); border: 1px solid var(--info-line); border-left: 3px solid var(--info);
  border-radius: var(--r-sm); padding: 9px 13px; font-size: 12.5px; color: var(--ink-2); margin: 10px 0; max-width: 78ch; }
.sr-img { display: inline-block; font-size: 11.5px; color: var(--ink-4); background: var(--bg-2);
  border: 1px dashed var(--line); border-radius: 6px; padding: 2px 8px; margin: 2px 0; }
:root[data-theme="dark"] .sr-bar { background: var(--bg); }
:root[data-theme="dark"] .sop-hit mark { background: rgba(224,169,46,.2); color: var(--warn-600); }

/* ---- ERROR GUIDE (Phase 11) ---- */
.eg-intro .eg-flow { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 12px; }
.eg-step { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 13px; }
.eg-step b { display: block; font-size: 12px; color: var(--area, var(--navy)); margin-bottom: 3px; }
.eg-step span { font-size: 12px; color: var(--ink-2); line-height: 1.5; }
.eg-card { padding: 14px 18px; }
.eg-card.flash { animation: flash .9s var(--ease); }
.eg-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.eg-ic { font-size: 17px; }
.eg-actions-label { font-size: 11px; color: var(--ink-3); font-family: var(--mono); }
.eg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 22px; }
@media (max-width: 900px) { .eg-grid { grid-template-columns: 1fr; } }
.eg-grid b { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 3px; }
.eg-grid p { margin: 0; font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.eg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; grid-column: 1 / -1; }
@media (max-width: 700px) { .eg-split { grid-template-columns: 1fr; } }
.eg-auto { background: var(--good-bg); border: 1px solid var(--good-line); border-radius: var(--r-sm); padding: 9px 12px; }
.eg-you  { background: var(--info-bg); border: 1px solid var(--info-line); border-radius: var(--r-sm); padding: 9px 12px; }
.eg-auto b { color: var(--good-600); } .eg-you b { color: var(--info); }

/* calm view-heads: the "About this page" disclosure that absorbs long intros */
.vh-about { margin: 2px 0 0; }
.vh-about > summary { font-size: 12px; color: var(--ink-3); cursor: pointer; }
.vh-about .disclosure-body { padding: 8px 2px 2px; font-size: 12.5px; color: var(--ink-2); line-height: 1.6; max-width: 86ch; }

/* triage strip — the calm inbox header (big numbers, one line) */
.triage { display: flex; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.triage-cell { flex: 1 1 160px; display: flex; align-items: center; gap: 11px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-lg); padding: 11px 15px; box-shadow: var(--sh-1); }
.triage-cell .tn { font-family: var(--font-data); font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1; }
.triage-cell .tl { font-size: 12px; color: var(--ink-2); line-height: 1.35; }
.triage-cell.auto .tn { color: var(--good-600); }
.triage-cell.re   .tn { color: var(--area, var(--navy)); }
.triage-cell.you  { border-color: var(--warn-line); }
.triage-cell.you .tn { color: var(--warn-600); }
.triage-cell.you.zero { border-color: var(--good-line); }
.triage-cell.you.zero .tn { color: var(--good-600); }
.it-chip.linky { cursor: pointer; }
.it-chip.linky:hover { filter: brightness(1.06); text-decoration: underline; }

/* workspace save indicator (Phase 11 §4) */
.ws-save { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-3);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px 11px; background: var(--surface); }
.ws-save b { color: var(--good-600); font-weight: 700; }
.ws-save.warn b { color: var(--warn-600); }

/* ============================================================
   ONE-PAGE KPIs & BREAKDOWNS (Phase 12) — lane tabs, request cart,
   and the responsive pass so nothing jumbles at smaller widths.
   ============================================================ */
/* lane tabs — the big Total / Direct / Aggregator switch */
.lane-tabs {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  position: sticky; top: 0; z-index: 5; padding: 10px 0 12px;
  background: linear-gradient(var(--bg) 82%, transparent);
  margin: 22px 0 6px;
}
.lane-tab {
  display: flex; flex-direction: column; gap: 3px; align-items: flex-start;
  padding: 12px 16px; border-radius: var(--r-lg); cursor: pointer;
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--sh-1); text-align: left; font: inherit; color: var(--ink-2);
  transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast);
}
.lane-tab b { font-size: 15px; color: var(--ink); }
.lane-tab span { font-size: 11.5px; color: var(--ink-3); }
.lane-tab:hover { border-color: var(--area, var(--navy)); transform: translateY(-1px); }
.lane-tab.on {
  border-color: var(--area, var(--navy)); border-width: 2px; padding: 11px 15px;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--area, var(--navy)) 14%, transparent), var(--sh-1);
}
.lane-tab.on b { color: var(--area, var(--navy)); }
@media (max-width: 700px) { .lane-tabs { grid-template-columns: 1fr; } }

/* request cart — gated KPI cards + the needs table */
.kcard { position: relative; }
.req-chip {
  margin-top: 7px; font: inherit; font-size: 10.5px; font-weight: 700;
  padding: 2px 9px; border-radius: var(--r-pill); cursor: pointer;
  border: 1px dashed var(--line-2); background: transparent; color: var(--ink-3);
}
.req-chip:hover { border-color: var(--area, var(--navy)); color: var(--area, var(--navy)); }
.req-chip.on { border-style: solid; border-color: var(--good-line); background: var(--good-bg); color: var(--good-600); }
.req-btn.on { border-color: var(--good-line); background: var(--good-bg); color: var(--good-600); }
.needs-cart .cart-foot {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 12.5px; color: var(--ink-2);
}

/* How It Works tabs sit in the view head */
.hw-tabs { align-self: center; }

/* ---------- responsive pass: clean wrapping instead of jumble ---------- */
/* section heads: let the action (seg buttons) wrap under the title */
.section-head { flex-wrap: wrap; row-gap: 10px; }
.section-head .sh-action { margin-left: auto; }
@media (max-width: 700px) { .section-head .sh-action { margin-left: 0; width: 100%; } }

/* statbar: tidy column counts instead of ragged auto-fit rows */
@media (max-width: 1240px) { .statbar { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .statbar { grid-template-columns: repeat(2, 1fr); } }

/* funnel spine: stack vertically on narrow screens, arrows point down */
@media (max-width: 860px) {
  .spine { flex-direction: column; align-items: stretch; }
  .spine-node { min-width: 0; }
  .spine-conn { min-width: 0; padding: 2px 0; flex-direction: row; gap: 8px; }
  .spine-arrow { transform: rotate(90deg); }
}

/* view head: title + integrity chip wrap cleanly */
.view-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 16px; }
.view-head .integrity { margin-top: 6px; }

/* every wide table scrolls inside its own wrapper, never the page */
.table-wrap { overflow-x: auto; max-width: 100%; }
.table-wrap > table { min-width: 560px; }

/* copy-paste comms macros in the SOP reader (Templates → SOP Library, Phase 12) */
.sr-macros { margin: 14px 0 4px; }
.mac-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.mac-row { border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); }
.mac-row summary {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 14px; cursor: pointer; list-style: none;
}
.mac-row summary::-webkit-details-marker { display: none; }
.mac-row summary b { font-size: 13px; color: var(--ink); }
.mac-row .mac-use { flex: 1 1 200px; font-size: 11.5px; color: var(--ink-3); }
.mac-row .mac-copy { margin-left: auto; flex: 0 0 auto; }
.mac-row[open] { background: var(--surface); }
.mac-row .tpl-body { margin: 0 14px 12px; }
.mac-row .mz { margin: 0 14px 12px; }
.lane-tab.off { opacity: .45; cursor: not-allowed; }
.lane-tab.off:hover { border-color: var(--line); transform: none; }

/* SOP IDEAS BACKLOG — capture a process idea before it's lost */
.idea-card { margin: 4px 0 10px; border-left: 3px solid var(--area, var(--navy)); }
.idea-add { display: flex; gap: 8px; margin-top: 10px; }
.idea-add input { flex: 1; }
.idea-list { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.idea-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--bg-2); }
.idea-row.done { opacity: .55; }
.idea-row.done .idea-text { text-decoration: line-through; }
.idea-row.building { border-color: var(--area, var(--navy)); }
.idea-status { font: inherit; font-size: 11px; font-weight: 700; padding: 3px 9px; white-space: nowrap;
  border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--surface);
  color: var(--ink-2); cursor: pointer; }
.idea-status:hover { border-color: var(--area, var(--navy)); color: var(--area, var(--navy)); }
.idea-text { flex: 1; font-size: 13px; color: var(--ink); line-height: 1.45; min-width: 0; }
.idea-who { width: 110px; font: inherit; font-size: 11.5px; padding: 3px 8px;
  border: 1px dashed var(--line-2); border-radius: var(--r-pill); background: transparent; color: var(--ink-2); }
.idea-who:focus { border-style: solid; border-color: var(--area, var(--navy)); outline: none; }
.idea-when { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.idea-x { font: inherit; font-size: 14px; border: 0; background: none; color: var(--ink-3); cursor: pointer; padding: 0 4px; }
.idea-x:hover { color: var(--bad-600, #c33); }
@media (max-width: 700px) { .idea-row { flex-wrap: wrap; } .idea-who { width: 90px; } }

/* recently opened SOPs — one click back in */
.sop-recent { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 10px; }
.sop-recent-l { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); }
.sop-recent-chip { font: inherit; font-size: 11.5px; font-weight: 700; padding: 3px 11px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--surface); color: var(--ink-2); }
.sop-recent-chip:hover { border-color: var(--area, var(--navy)); color: var(--area, var(--navy)); }

/* click-to-sort table headers */
table.data th.sortable { cursor: pointer; user-select: none; }
table.data th.sortable:hover { color: var(--area, var(--navy)); }
table.data th.sort-asc::after  { content: " ▲"; font-size: 9px; }
table.data th.sort-desc::after { content: " ▼"; font-size: 9px; }

/* DEPARTMENT COMMAND CENTER (roadmap.js) */
.rm-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.rm-card { display: block; text-align: left; font: inherit; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--sh-1); padding: 15px 17px; color: var(--ink-2);
  transition: transform var(--fast), border-color var(--fast), box-shadow var(--fast); }
.rm-card:hover { transform: translateY(-2px); border-color: var(--area, var(--navy)); box-shadow: var(--sh-2); }
.rm-card-h { display: flex; align-items: baseline; gap: 10px; }
.rm-card-h b { font-size: 15px; color: var(--ink); }
.rm-pct { margin-left: auto; font-family: var(--font-data); font-weight: 700; font-size: 15px; color: var(--area, var(--navy)); }
.rm-blurb { font-size: 11.5px; color: var(--ink-3); margin: 3px 0 9px; }
.rm-track { height: 6px; margin-bottom: 10px; }
.rm-counts { display: flex; gap: 7px; flex-wrap: wrap; }
.rm-c { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); }
.rm-c.building { border-color: var(--area, var(--navy)); color: var(--area, var(--navy)); }
.rm-c.blocked { border-color: var(--warn-line); color: var(--warn-600); }
.rm-c.done { border-color: var(--good-line); color: var(--good-600); }
.rm-c.who { font-weight: 600; }
.rm-addsec { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.rm-sec-h { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
/* roadmap schematic */
.rm-table td { vertical-align: top; }
.rm-table th:first-child { width: 170px; }
.rm-pill { display: block; width: 100%; text-align: left; font: inherit; font-size: 11.5px; line-height: 1.4;
  padding: 5px 9px; margin: 0 0 5px; border-radius: var(--r-sm); cursor: pointer;
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); }
.rm-pill:hover { border-color: var(--area, var(--navy)); }
.rm-pill.building { border-color: var(--area, var(--navy)); background: color-mix(in srgb, var(--area, var(--navy)) 8%, transparent); }
.rm-pill.blocked { border-color: var(--warn-line); background: var(--warn-bg); }
.rm-pill.done { border-color: var(--good-line); background: var(--good-bg); opacity: .75; }
.rm-pill-who { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; color: var(--ink-3); }
.rm-empty { color: var(--ink-3); font-size: 12px; }
.rm-secbtn { font: inherit; border: 0; background: none; cursor: pointer; color: var(--ink); padding: 0; text-align: left; }
.rm-secbtn:hover b { color: var(--area, var(--navy)); text-decoration: underline; }

/* build identity under the sidebar brand — which iteration am I looking at? */
.app-ver { font-size: 9.5px; letter-spacing: .04em; color: var(--ink-3);
  padding: 2px 14px 6px; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================================================
   COMMAND CENTER v2 — Work Hub upgrades + roadmap drill-ins
   ============================================================ */

/* header: ＋ New task + notification bell */
.wh-me { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.wh-newbtn { font-weight: 700; }
.wh-bell { position: relative; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-pill);
  padding: 4px 10px; cursor: pointer; font-size: 14px; color: var(--ink-2); }
.wh-bell.has { border-color: var(--orange); }
.wh-bell-n { position: absolute; top: -6px; right: -6px; background: var(--orange); color: #fff; font-size: 10px;
  font-weight: 800; border-radius: 999px; min-width: 16px; height: 16px; line-height: 16px; text-align: center; padding: 0 3px; }
.wh-notif { position: fixed; top: 0; right: 0; width: 400px; max-width: 92vw; height: 100vh; overflow-y: auto;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--sh-3); z-index: 92; padding: 14px 16px;
  animation: whSlide var(--slide, .22s) var(--ease); }
.wh-notif-h { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.wh-notif-list { display: flex; flex-direction: column; gap: 6px; }
.wh-notif-item { text-align: left; background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 10px; cursor: pointer; color: var(--ink); font: inherit; }
.wh-notif-item.fresh { border-left: 3px solid var(--orange); background: var(--surface); }
.wh-notif-item:hover { border-color: var(--orange); }
.wh-notif-line { font-size: 12.5px; }
.wh-notif-text { font-size: 12.5px; color: var(--ink-2); margin: 3px 0; }

/* clickable stat tiles */
button.statbar-item.wh-tile { cursor: pointer; text-align: left; font: inherit; border: 1px solid transparent; }
button.statbar-item.wh-tile:hover { border-color: var(--orange); }

/* filter chips (board + queues) */
.wh-fchips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.wh-fchip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px 11px;
  color: var(--ink-2); cursor: pointer; }
.wh-fchip b { font-weight: 800; }
.wh-fchip:hover { border-color: var(--orange); }
.wh-fchip.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.wh-fchip.on .wh-dot { outline: 2px solid #fff; }
.wh-fchip-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.wh-fchip-bad { color: var(--bad-600); font-weight: 800; font-size: 11px; margin-left: 3px; }
.wh-fchip.on .wh-fchip-bad { color: #fff; }

/* 5-column kanban */
.wh-kanban.five { grid-template-columns: repeat(5, minmax(200px, 1fr)); }
@media (max-width: 1200px) { .wh-kanban.five { grid-template-columns: repeat(3, minmax(200px, 1fr)); } }
@media (max-width: 760px)  { .wh-kanban.five { grid-template-columns: 1fr; } }

/* grab button + subtask chip */
.wh-card-grab { margin-top: 6px; }
.wh-subchip { display: inline-block; font-size: 10.5px; font-weight: 700; color: var(--ink-3);
  background: var(--bg-2); border-radius: var(--r-pill); padding: 1px 7px; }

/* status chips */
.wh-chip.st-doing { background: rgba(99, 102, 241, .12); border-color: rgba(99, 102, 241, .4); color: #6366f1; }
.wh-chip.st-review { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .45); color: #b45309; }
.wh-chip.st-waiting { background: rgba(14, 165, 233, .1); border-color: rgba(14, 165, 233, .35); color: #0284c7; }
.wh-chip.st-done { background: var(--good-bg); border-color: var(--good-line, var(--line)); color: var(--good-600); }
.wh-chip.road { background: rgba(139, 92, 246, .1); border-color: rgba(139, 92, 246, .35); color: #7c3aed; }
[data-theme="dark"] .wh-chip.st-review, .theme-dark .wh-chip.st-review { color: #fbbf24; }
[data-theme="dark"] .wh-chip.road, .theme-dark .wh-chip.road { color: #c4b5fd; }

/* ＋ New Task modal (slide-in, same rhythm as the detail panel) */
.wh-modal { position: fixed; top: 0; right: 0; width: 520px; max-width: 96vw; height: 100vh; overflow-y: auto;
  background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--sh-3); z-index: 93; padding: 18px 20px;
  animation: whSlide var(--slide, .22s) var(--ease); }
.wh-modal .wh-detail-title { font-size: 16px; }
.wh-roadlink, .wh-subs { border: 1px dashed var(--line); border-radius: var(--r-sm); padding: 10px 12px; margin-bottom: 12px; }
.wh-roadlink-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-3); margin-bottom: 8px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wh-roadlink-h .note { text-transform: none; letter-spacing: 0; font-weight: 500; }
.wh-subrow { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.wh-subrow input[type="text"] { flex: 1; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
.wh-subrow.done .wh-sub-text { text-decoration: line-through; color: var(--ink-3); }
.wh-sub-text { flex: 1; font-size: 13px; color: var(--ink); }
.wh-pin-l { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; white-space: nowrap; }

/* bulletin */
.wh-bull-post .wh-qa-row { margin-bottom: 8px; }
.wh-bull-post .search { flex: 1; }
.wh-bull-notes { width: 100%; font-size: 13px; padding: 7px 9px; border: 1px solid var(--line);
  border-radius: var(--r-sm); background: var(--surface); color: var(--ink); resize: vertical; }
.wh-bull-list { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.wh-bull { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md, 10px); padding: 12px 14px; }
.wh-bull.pinned { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange) inset; }
.wh-bull-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wh-bull-title { font-size: 14px; }
.wh-bull-body { font-size: 13px; color: var(--ink-2); margin: 7px 0 2px; white-space: pre-wrap; }
.wh-bull-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }

/* roadmap v2: component grid + drill-in */
.rm-comp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 12px; }
.rm-comp { text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md, 10px);
  padding: 11px 13px; cursor: pointer; font: inherit; color: var(--ink); display: flex; flex-direction: column; gap: 7px; }
.rm-comp:hover { border-color: var(--orange); box-shadow: var(--sh-2, var(--sh-3)); }
.rm-comp.done { opacity: .75; }
.rm-comp-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.rm-comp-name { font-size: 13.5px; font-weight: 650; line-height: 1.35; }
.rm-c.review { background: rgba(245, 158, 11, .12); color: #b45309; }
.rm-c.tasks { background: rgba(139, 92, 246, .1); color: #7c3aed; }
[data-theme="dark"] .rm-c.review, .theme-dark .rm-c.review { color: #fbbf24; }
[data-theme="dark"] .rm-c.tasks, .theme-dark .rm-c.tasks { color: #c4b5fd; }
.rm-panel { animation: fadeUp .18s var(--ease, ease); }
.rm-status-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 12px 0; }
.rm-stbtn { font-size: 11.5px; font-weight: 700; background: var(--bg-2); border: 1px solid var(--line);
  border-radius: var(--r-pill); padding: 4px 10px; color: var(--ink-2); cursor: pointer; }
.rm-stbtn:hover { border-color: var(--orange); }
.rm-stbtn.on { background: var(--navy, #16155C); border-color: var(--navy, #16155C); color: #fff; }
.rm-stbtn.done.on { background: var(--good-600); border-color: var(--good-600); }
.rm-stbtn.blocked.on { background: var(--bad-600); border-color: var(--bad-600); }
.rm-blurb-edit { display: flex; flex-direction: column; gap: 4px; margin-bottom: 6px; }
.rm-blurb-edit textarea { font-size: 13px; padding: 7px 9px; border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); color: var(--ink); resize: vertical; }
.rm-tasks-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; color: var(--ink-3); margin: 14px 0 8px; }
.rm-tasklist { display: flex; flex-direction: column; gap: 6px; }
.rm-taskrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 10px; cursor: pointer; }
.rm-taskrow:hover { border-color: var(--orange); }
.rm-task-title { font-size: 13px; font-weight: 550; flex: 1; min-width: 140px; }

/* FEEDBACK & IMPROVEMENTS (v14.1) */
.fb-form .fb-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.fb-form .fb-row .search { flex: 1 1 300px; }
.fb-detail { width: 100%; margin-top: 8px; font: inherit; font-size: 13px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 8px 12px; resize: vertical; caret-color: var(--ink); }
.fb-detail:focus { outline: 0; border-color: var(--orange); }
.fb-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; }
.fb-list { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.fb-card { padding: 13px 16px; }
.fb-card.done { opacity: .68; }
.fb-card.declined { opacity: .55; }
.fb-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fb-kind { font-size: 10.5px; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--ink-2); white-space: nowrap; }
.fb-kind.bug { border-color: var(--warn-line); color: var(--warn-600); }
.fb-kind.idea { border-color: var(--area, var(--navy)); color: var(--area, var(--navy)); }
.fb-area { font-size: 10.5px; color: var(--ink-3); border: 1px dashed var(--line-2);
  border-radius: var(--r-pill); padding: 2px 8px; white-space: nowrap; }
.fb-title { font-size: 13.5px; color: var(--ink); }
.fb-by { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.fb-detail-txt { margin: 7px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.fb-triage { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed var(--line); }
.fb-resp { flex: 1 1 260px; font: inherit; font-size: 12px; color: var(--ink); caret-color: var(--ink);
  background: transparent; border: 1px dashed var(--line-2); border-radius: var(--r-pill); padding: 5px 12px; }
.fb-resp:focus { outline: 0; border-style: solid; border-color: var(--area, var(--navy)); }

/* v15 "CLEAN TASKS" — This Week strip, card diet, stale + decide pile */
.wh-week { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 8px 13px; }
.wh-week-k { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); }
.wh-week-seg { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px 11px; color: var(--ink-2); }
.wh-week-seg b { font-weight: 800; }
.wh-week-seg.ok { color: var(--good-600); background: var(--good-bg); border-color: var(--good-line); }
.wh-week-seg.bad { color: var(--bad-600); background: var(--bad-bg); border-color: var(--bad-line); cursor: pointer; }
button.wh-week-seg { cursor: pointer; }
button.wh-week-seg:hover { border-color: var(--orange); }
.wh-chip.due.soon { color: var(--warn-600); background: var(--warn-bg); border-color: var(--warn-line); }
.wh-chip.due.over { color: var(--bad-600); background: var(--bad-bg); border-color: var(--bad-line); }
.wh-chip.flag { color: var(--bad-600); background: var(--bad-bg); border-color: var(--bad-line); }
.wh-prog { display: inline-flex; width: 52px; height: 5px; border-radius: 3px; background: var(--bg-2);
  border: 1px solid var(--line); overflow: hidden; align-self: center; }
.wh-prog i { display: block; height: 100%; background: var(--good); border-radius: 3px; }
.wh-card.stale { opacity: .62; border-left-style: dashed; }
.wh-card.stale:hover { opacity: 1; }
.wh-tr.stale td { opacity: .62; }
.wh-decide { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.wh-decide-row { display: flex; align-items: center; gap: 9px; background: var(--surface);
  border: 1px dashed var(--line-2); border-radius: var(--r); padding: 7px 12px; cursor: pointer; }
.wh-decide-row:hover { border-color: var(--orange); border-style: solid; }
.wh-decide-title { font-size: 13px; font-weight: 600; color: var(--ink); }

/* v16 "OPS DESK" — merchant queue, ack badges, activations, locations import */
.wh-ack { background: var(--info-bg, var(--bg-2)); border: 1px solid var(--info-line, var(--line));
  border-radius: var(--r); padding: 10px 14px; margin-bottom: 12px; }
.wh-ack-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.wh-ack-item { display: flex; align-items: center; gap: 10px; }
.wh-ack-open { flex: 1; display: flex; align-items: baseline; gap: 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 12px; cursor: pointer; text-align: left; }
.wh-ack-open:hover { border-color: var(--orange); }
.wh-ackbadge { color: #fff; background: var(--bad); border-radius: var(--r-pill);
  font-size: 10.5px; font-weight: 800; padding: 1px 7px; margin-left: 4px; }
.wh-unack-note { color: var(--warn-600); }
.wh-qform { margin-bottom: 12px; }
.wh-qlist { display: flex; flex-direction: column; gap: 10px; }
.wh-qcard { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--line-2);
  border-radius: var(--r); padding: 11px 14px; }
.wh-qcard.fu-due { border-left-color: var(--warn); }
.wh-qcard.fu-over { border-left-color: var(--bad); }
.wh-qcard-top { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.wh-qtitle { font-size: 14px; color: var(--ink); }
.wh-chip.qmerch { color: var(--navy-700); background: var(--navy-50); border-color: var(--navy-100); }
.wh-chip.qhold { color: var(--bad-600); background: var(--bad-bg); border-color: var(--bad-line); }
.wh-qwait { margin-top: 7px; font-size: 12.5px; color: var(--ink-2); }
.wh-qresolved { display: flex; gap: 10px; align-items: baseline; }
.wh-qdivider { border: 0; border-top: 1px dashed var(--line-2); margin: 18px 0; }
.wh-decide-row.fu-over { border-color: var(--bad-line); border-style: solid; }
/* v17.3 — "new on your tasks" strip (fresh comments, top of the hub) */
.wh-newforme { border-left: 3px solid var(--orange); }
/* v17.3 — the ✅ Done record */
.wh-done-day { display: flex; align-items: baseline; gap: 8px; margin: 16px 0 7px; font-size: 13px; color: var(--ink); }
.wh-donelist { display: flex; flex-direction: column; gap: 6px; }
.wh-donerow { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--good); border-radius: var(--r);
  padding: 8px 12px; cursor: pointer; }
.wh-donerow:hover { border-color: var(--orange); border-left-color: var(--good); }
.wh-done-check { color: var(--good-600); font-weight: 700; }
/* v17.3 — review center */
.wh-reviewwrap { display: flex; flex-direction: column; gap: 3px; }
.wh-review-meta { padding-left: 4px; }
/* v17.3 — 📎 Files on a task */
.wh-filesec { margin-top: 10px; }
.wh-filelist { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.wh-filerow { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
/* activations */
.av-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.av-add .search { flex: 1 1 220px; }
.av-locs { width: 74px; font: inherit; font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; }
.av-agg { flex: 0 1 170px; }
.av-list { display: flex; flex-direction: column; gap: 7px; }
.av-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--good); border-radius: var(--r); padding: 9px 13px; }
.av-row.unfinished { border-left-color: var(--warn); }
.av-merch { font-size: 13.5px; color: var(--ink); }
.av-missing { font-size: 11.5px; color: var(--warn-600); font-weight: 600; }
.av-done { font-size: 11.5px; color: var(--good-600); font-weight: 600; }
/* v20 — the setup audit (four-eyes check) */
.av-pend { font-size: 11.5px; color: var(--info, var(--ink-2)); font-weight: 600; }
.av-row.av-issue { border-left-color: var(--bad, #ef4444); }
.av-appid { flex: 0 1 110px; }
.av-audit-list { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.av-checkall { padding: 8px 10px; background: var(--bg-2); border: 1px dashed var(--line);
  border-radius: var(--r-sm); margin-top: 4px; }
/* v20.2 — the SOP Workshop zone: visually walled off from the library of
   finished SOPs so "needs to be built" can never be mistaken for "exists" */
.sop-workshop { border: 1px solid var(--line); border-left: 4px solid var(--orange);
  border-radius: var(--r); background: var(--bg-2); padding: 18px 18px 14px; margin: 18px 0; }
.sop-workshop .card { background: var(--surface); }
.sop-libdivider { margin-top: 26px; padding-top: 18px; border-top: 2px solid var(--line); }
.av-eod .wh-digest-out { width: 100%; }
.av-eod-list { display: flex; flex-direction: column; gap: 5px; margin: 6px 0 10px; }
.av-eod-item { display: flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
/* locations import */
.li-grid label input, .li-grid label select { min-width: 0; }
.li-ids { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.li-idp { width: 110px; } .li-idn { width: 64px; }
.li-idp, .li-idn { font: inherit; font-size: 13px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 7px 10px; }
.li-inrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.li-file { cursor: pointer; }
.li-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 7px; }
.li-map { display: flex; align-items: center; gap: 8px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px 9px; }
.li-map.blocked { opacity: .6; }
.li-map-src { flex: 1; font-size: 12px; font-weight: 600; color: var(--ink-2);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-map select { font: inherit; font-size: 12px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 6px; max-width: 180px; }
.li-pii { font-size: 11px; color: var(--bad-600); font-weight: 700; }
.li-flags { border-radius: var(--r); padding: 10px 14px; margin-bottom: 10px; font-size: 12.5px; line-height: 1.7; }
.li-flags.hard { background: var(--bad-bg); border: 1px solid var(--bad-line); color: var(--bad-600); }
.li-flags.soft { background: var(--warn-bg); border: 1px solid var(--warn-line); color: var(--warn-600); }
.li-hard { color: var(--bad-600); }
.li-preview { max-height: 420px; overflow: auto; }
.li-preview td { white-space: nowrap; font-size: 11.5px; }
.li-preview td.li-missing { background: var(--bad-bg); }
.li-grid-t td input { width: 130px; font: inherit; font-size: 12px; color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 7px; }
.li-profs { margin-top: 8px; display: flex; flex-direction: column; gap: 7px; }
.li-prof { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.li-prof b { min-width: 240px; font-size: 12.5px; }
.li-prof input { font: inherit; font-size: 12px; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 5px 9px; width: 150px; }
.btn.disabled { opacity: .5; cursor: not-allowed; }
.sh-actions { display: flex; align-items: center; gap: 8px; }

/* v20.8 — import creator mode picker */
.li-modegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.li-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left;
  font: inherit; color: var(--ink); background: var(--bg-2); border: 2px solid var(--line);
  border-radius: var(--r); padding: 14px 16px; cursor: pointer; }
.li-mode:hover { border-color: var(--orange); }
.li-mode.on { border-color: var(--orange); background: var(--surface); box-shadow: var(--shadow-sm, 0 1px 3px rgba(0,0,0,.08)); }
.li-mode-ico { font-size: 22px; }
.li-mode b { font-size: 14px; }

/* v16.2 — profile picker + chip */
.wh-profchip { display: inline-flex; align-items: center; gap: 7px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-pill); padding: 5px 13px; cursor: pointer;
  font: inherit; font-size: 13px; color: var(--ink); }
.wh-profchip:hover { border-color: var(--orange); }
.wh-prof-caret { color: var(--ink-4); font-size: 10px; }
.wh-profpanel { max-width: 460px; }
.wh-prof-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 9px; }
.wh-prof-card { display: flex; flex-direction: column; align-items: center; gap: 5px;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r);
  padding: 14px 10px 11px; cursor: pointer; font: inherit; color: var(--ink); position: relative; }
.wh-prof-card:hover { border-color: var(--orange); transform: translateY(-1px); }
.wh-prof-card.on { border-color: var(--good); background: var(--good-bg); }
.wh-prof-ava { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px;
  border-radius: 50%; color: #fff; font-weight: 800; font-size: 15px; }
.wh-prof-name { font-weight: 700; font-size: 13.5px; }
.wh-prof-you { position: absolute; top: 7px; right: 9px; font-size: 10.5px; font-weight: 800; color: var(--good-600); }
.wh-prof-colors { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 8px; }
.wh-prof-swatch { width: 26px; height: 26px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.wh-prof-swatch.on { border-color: var(--ink); }

/* ============================================================
   Operations agent, embedded (see js/opsagent.js).
   The agent's own stylesheet is generated scoped under .mor-scope by
   tools/sync_agent.py. These are the only HOST-side adjustments — they
   undo the agent's full-page assumptions now that it lives inside a
   dashboard view. Hand-written: sync_agent.py never touches this file.
   ============================================================ */
/* the agent's `body` rule became `.mor-scope` — it would paint its own
   canvas colour and reserve full-page height inside our view */
.mor-scope.mor-embed { background: transparent; min-height: 0; }
/* the review pane carries the agent's own top spacing; the dashboard
   view-head already provides it */
.mor-scope.mor-embed > .tabpane > .panel:first-child { margin-top: 0; }
/* tab strip for the agent's work tabs — dashboard chrome, sits outside
   .mor-scope so the agent's sidebar `.tab` styling can't reach it */
.or-agent-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; flex-wrap: wrap; }
.or-agent-tabs { margin: 0; }
/* storage-mode indicator — standalone this lives in the agent's own sidebar */
.or-agent-bar .hist-mode { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: var(--r-pill);
  border: 1px solid var(--line); color: var(--ink-3); background: var(--surface-2); white-space: nowrap; }
.or-agent-bar .hist-mode.online { color: var(--good); border-color: var(--good); }

/* ============================================================
   v17 · PROCEDURE SUBMISSIONS (SOP Library) + task-chat attachments
   Capture → review → finalize → in-the-SOP. Same card/pill/button
   vocabulary as the rest of the tool so it reads as one system.
   ============================================================ */
.pr-hub .pr-flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 4px 0 14px; }
.pr-step { background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.pr-step b { font-size: 12px; color: var(--navy); }
.pr-step span { font-size: 11px; color: var(--ink-3); line-height: 1.35; }
@media (max-width: 820px) { .pr-hub .pr-flow { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .pr-hub .pr-flow { grid-template-columns: 1fr; } }

.pr-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.pr-count { display: inline-block; min-width: 17px; padding: 0 5px; border-radius: var(--r-pill);
  background: var(--navy-50); color: var(--navy); font-size: 11px; font-weight: 700; text-align: center; }

.pr-shelf-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 16px 0 8px; }
.pr-shelf-h b { font-size: 13px; color: var(--navy); }
.pr-shelf-h .note { margin: 0; }
.pr-shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }

.pr-card { border: 1px solid var(--line); border-left: 3px solid var(--line); border-radius: var(--r-sm);
  background: var(--surface); padding: 12px 13px; display: flex; flex-direction: column; gap: 7px; }
.pr-card.submitted { border-left-color: var(--info); }
.pr-card.changes   { border-left-color: var(--warn); }
.pr-card.finalized { border-left-color: var(--orange); }
.pr-card.complete  { border-left-color: var(--good); }
.pr-top { display: flex; align-items: center; gap: 8px; }
.pr-status { font-size: 11px; font-weight: 700; padding: 2px 9px; border-radius: var(--r-pill); }
.pr-kind { font-size: 11px; color: var(--ink-2); background: var(--bg-2); border: 1px solid var(--line);
  padding: 2px 9px; border-radius: var(--r-pill); }
.pr-status.submitted { color: var(--info);   background: var(--info-bg); }
.pr-status.changes   { color: var(--warn);   background: var(--warn-bg); }
.pr-status.finalized { color: var(--orange); background: var(--warn-bg); }
.pr-status.complete  { color: var(--good);   background: var(--good-bg); }
.pr-meta { font-size: 11px; color: var(--ink-4); }
.pr-title { font-size: 13.5px; font-weight: 650; color: var(--ink); line-height: 1.35; }
.pr-target { font-size: 11.5px; color: var(--ink-3); }
.pr-body summary { font-size: 11.5px; color: var(--navy-600); cursor: pointer; font-weight: 600; }
.pr-pre { white-space: pre-wrap; font-size: 12px; line-height: 1.5; color: var(--ink-2);
  background: var(--bg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 11px; margin: 6px 0 0; max-height: 320px; overflow: auto; font-family: inherit; }
.pr-file { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  color: var(--navy-600); text-decoration: none; align-self: flex-start;
  background: var(--navy-50); border-radius: var(--r-pill); padding: 3px 10px; }
.pr-file:hover { text-decoration: underline; }
.pr-note { font-size: 12px; color: var(--ink-2); background: var(--warn-bg);
  border: 1px solid var(--warn-line); border-radius: var(--r-sm); padding: 7px 9px; line-height: 1.45; }
.pr-done { font-size: 11.5px; color: var(--good-600); font-weight: 600; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.pr-actions .btn.danger { color: var(--bad); }

/* the write-up form */
.pr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
@media (max-width: 720px) { .pr-grid { grid-template-columns: 1fr; } }
.pr-fld { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.pr-fld > span { font-size: 11.5px; font-weight: 650; color: var(--ink-2); }
.pr-textarea { width: 100%; resize: vertical; line-height: 1.55; font-family: inherit; min-height: 180px; }
/* v21: short guided sections respect their rows — only the steps box is tall */
.pr-textarea[rows="2"] { min-height: 58px; }
.pr-textarea[rows="3"] { min-height: 76px; }
.pr-zone { border: 1.5px dashed var(--line); border-radius: var(--r-sm); background: var(--bg-2);
  padding: 12px 14px; transition: border-color .15s, background .15s; }
.pr-zone.drag { border-color: var(--orange); background: var(--warn-bg); }
.pr-zone-in { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.pr-picked { margin-top: 9px; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; }
.pr-form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pr-form-actions .note { margin: 0; }

/* task-chat attachment (Work Hub detail panel) */
.wh-att { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  color: var(--navy-600); text-decoration: none; margin-top: 4px;
  background: var(--navy-50); border-radius: var(--r-pill); padding: 3px 10px; }
.wh-att:hover { text-decoration: underline; }
.wh-att-picked { display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  font-size: 12px; margin-top: 6px; padding: 6px 10px; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); }
/* v17 · sign-off gate buttons sit side by side on a review card */
.wh-card-grab.wh-signoff { display: flex; gap: 5px; flex-wrap: wrap; }

/* ============================================================
   v18 "COMMAND CENTER" — the Work Hub as a per-person home screen.

   Three problems this fixes, in order of how much they hurt:
     1. board columns grew without limit, so five tasks in one column
        pushed the page metres long → columns now scroll inside a fixed
        height and the cards are ~a third as tall
     2. the hub ran down the left half of a wide screen with dead space
        beside it → two columns, work left / context right
     3. "tabs" that were really links to other pages → a launcher grid
   Everything uses the existing tokens; no new palette, no new fonts.
   ============================================================ */

/* ---------- the two-column hub ---------- */
.wh-hub { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.wh-hub-main { min-width: 0; }
.wh-hub-side { display: flex; flex-direction: column; gap: 12px; position: sticky; top: 12px; }
@media (max-width: 1180px) {
  .wh-hub { grid-template-columns: 1fr; }
  .wh-hub-side { position: static; }
}
.wh-hub-tiles { margin-bottom: 14px; }

/* side cards */
.wh-side { padding: 12px 14px; }
.wh-side-h { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-bottom: 10px; }
.wh-side-row { display: flex; flex-direction: column; gap: 2px; width: 100%; text-align: left;
  padding: 7px 9px; border: 1px solid transparent; border-radius: var(--r-sm);
  background: none; cursor: pointer; transition: background var(--fast), border-color var(--fast); }
.wh-side-row:hover { background: var(--surface-2); border-color: var(--line); }
.wh-side-row.fresh { background: var(--info-bg); border-color: var(--info-line); }
.wh-side-row.over { background: var(--bad-bg); border-color: var(--bad-line); }
.wh-side-k { font-size: 11px; color: var(--ink-3); }
.wh-side-t { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; }
.wh-side-x { font-size: 11px; color: var(--ink-3); line-height: 1.35; }
.wh-side-acts { display: flex; gap: 5px; margin-top: 5px; }
.btn.block { width: 100%; margin-top: 6px; }

/* ---------- ⚡ launcher ---------- */
.wh-launch { padding: 12px 14px; }
.wh-jumps { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.wh-jump { display: flex; align-items: center; gap: 8px; padding: 9px 10px; font-size: 12.5px;
  font-weight: 600; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; text-align: left;
  transition: background var(--fast), border-color var(--fast), transform var(--fast); }
.wh-jump:hover { background: var(--navy-50); border-color: var(--navy-200); color: var(--navy-600); transform: translateY(-1px); }
.wh-jump-i { font-size: 15px; line-height: 1; }

/* ---------- 📬 needs your response ---------- */
.wh-resp { border-left: 3px solid var(--orange); }
.wh-resp.done { border-left-color: var(--good); }
.wh-resp-row { display: flex; align-items: center; gap: 8px; padding: 7px 0;
  border-top: 1px solid var(--line-2); }
.wh-resp-row:first-of-type { border-top: 0; }
.wh-resp-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px;
  background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.wh-resp-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); }
.wh-resp-t { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; }

/* ---------- 📊 team KPI snapshot ---------- */
.wh-kpi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.wh-kpi-cell { display: flex; flex-direction: column; padding: 8px 10px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
.wh-kpi-v { font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.1; }
.wh-kpi-k { font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .03em; }

/* ---------- grouped work list ---------- */
.wh-group { margin-bottom: 10px; }
.wh-group-h { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 9px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  cursor: pointer; font-size: 12px; font-weight: 700; color: var(--ink-2);
  text-transform: uppercase; letter-spacing: .04em; }
.wh-group-h:hover { background: var(--navy-50); }
.wh-group.bad .wh-group-h { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-600); }
.wh-group.muted .wh-group-h { opacity: .72; }
.wh-group-caret { font-size: 10px; color: var(--ink-3); }
.wh-group-t { flex: 1; text-align: left; }
.wh-rows { margin-top: 4px; }

/* ---------- the dense row (CRM-style) ---------- */
.wh-row { display: flex; align-items: center; gap: 9px; padding: 7px 10px;
  border: 1px solid var(--line); border-left: 3px solid var(--line-2);
  border-radius: var(--r-sm); background: var(--surface); margin-bottom: 4px;
  cursor: pointer; transition: background var(--fast), border-color var(--fast); }
.wh-row:hover { background: var(--surface-2); border-left-color: var(--navy-500); }
.wh-row.attn { border-left-color: var(--bad); }
.wh-row.over { border-left-color: var(--warn); }
.wh-row.stale { opacity: .66; border-style: dashed; }
.wh-row-title { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; color: var(--ink);
  line-height: 1.3; overflow: hidden; text-overflow: ellipsis; }
.wh-row-sub { font-weight: 400; font-size: 11.5px; color: var(--ink-3); margin-left: 6px; }
.wh-row-meta { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.wh-row-acts { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
@media (max-width: 720px) {
  .wh-row { flex-wrap: wrap; }
  .wh-row-title { flex-basis: 100%; }
}

/* ---------- compact meta chips ---------- */
.wh-mini-due { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); white-space: nowrap; }
.wh-mini-due.soon { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-600); }
.wh-mini-due.over { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad-600); }
.wh-flag { font-size: 11px; }
.wh-pend { font-size: 11px; opacity: .8; }
.wh-eta { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 999px;
  background: var(--good-bg); border: 1px solid var(--good-line); color: var(--good-600); white-space: nowrap; }
.wh-eta.slip { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn-600); }
.wh-dots { display: inline-flex; align-items: center; gap: -2px; }
.wh-dots > * + * { margin-left: -5px; }
.wh-dots-more { font-size: 10px; font-weight: 700; color: var(--ink-3);
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 1px 5px; margin-left: 2px; }
.wh-adv { background: none; border: 1px solid var(--line); border-radius: var(--r-xs);
  color: var(--ink-3); cursor: pointer; font-size: 12px; line-height: 1; padding: 3px 7px;
  transition: background var(--fast), color var(--fast), border-color var(--fast); }
.wh-adv:hover { background: var(--navy-50); color: var(--navy-600); border-color: var(--navy-200); }

/* ---------- BOARD: columns that stop growing ---------- */
.wh-kanban.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.wh-kanban .wh-col { display: flex; flex-direction: column;
  max-height: calc(100vh - 300px); min-height: 160px; padding: 10px; overflow: hidden; }
.wh-kanban .wh-col h3 { flex-shrink: 0; margin-bottom: 8px; }
.wh-kanban .wh-col > .wh-card, .wh-kanban .wh-col > .note, .wh-kanban .wh-col > .btn {
  flex-shrink: 0; }
/* the scrolling region is everything after the heading */
.wh-kanban .wh-col { scrollbar-width: thin; }
.wh-col-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden;
  margin: 0 -4px; padding: 0 4px; }
.wh-col-scroll::-webkit-scrollbar { width: 8px; }
.wh-col-scroll::-webkit-scrollbar-thumb { background: var(--line); border-radius: 999px; }
.wh-col-scroll::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }
@media (max-width: 1400px) { .wh-kanban.five { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) { .wh-kanban.five { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .wh-kanban.five { grid-template-columns: 1fr; }
  .wh-kanban .wh-col { max-height: none; } }

/* the slimmed-down card */
.wh-card.tight { padding: 7px 9px; margin-bottom: 5px; border-radius: var(--r-sm); }
.wh-card.tight .wh-card-title { font-size: 13px; line-height: 1.3; }
.wh-card.tight .wh-card-meta { margin-top: 5px; gap: 5px; align-items: center; }
.wh-card.tight .wh-card-grab { margin-top: 6px; }
.wh-card.tight .wh-prog { width: 42px; }

/* ---------- quick add ---------- */
.wh-qa .wh-qa-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.wh-qa-text { flex: 1 1 260px; min-width: 0; }
.wh-qa-who { display: inline-flex; align-items: center; gap: 5px; padding: 0 11px; height: 36px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; white-space: nowrap; }
.wh-qa-who:hover { background: var(--navy-50); border-color: var(--navy-200); color: var(--navy-600); }
.wh-qa-date, .wh-qa-pri { flex: 0 0 auto; }
.wh-qa-full { padding: 0 12px; font-size: 15px; line-height: 1; }
.wh-qa-tips { margin-top: 7px; font-size: 11.5px; color: var(--ink-3); }
.wh-qa-tips summary { cursor: pointer; color: var(--ink-3); font-weight: 600; }
.wh-qa-tips summary:hover { color: var(--navy-600); }
.wh-qa-tips > span { display: block; margin-top: 5px; line-height: 1.5; }

/* ---------- the who picker ---------- */
.wh-who { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 8px; }
.wh-who-chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px;
  font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: background var(--fast), border-color var(--fast), color var(--fast); }
.wh-who-chip:hover { background: var(--navy-50); border-color: var(--navy-200); }
.wh-who-chip.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.wh-who-chip.on:hover { background: var(--navy-600); }
.wh-who-chip.clear { color: var(--ink-3); }
.wh-who-sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; }

/* ---------- form sections (the long form) ---------- */
.wh-fset { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.wh-fset:first-of-type { border-top: 0; padding-top: 0; }
.wh-fset-h { display: flex; align-items: baseline; gap: 8px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--ink-3); margin-bottom: 8px; }
.wh-fset-h .note { text-transform: none; letter-spacing: 0; font-weight: 400; }

/* ---------- accept prompt ---------- */
.wh-accept { max-width: 460px; }
.wh-accept-t { font-size: 15px; font-weight: 700; color: var(--ink); margin: 4px 0 0; line-height: 1.35; }
.wh-accept-n { margin: 6px 0 0; }
.wh-accept-grid { margin-top: 14px; }
.wh-accept-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px;
  font-weight: 600; color: var(--ink-2); }

/* ---------- acceptance state in the detail panel ---------- */
.wh-acc { margin-top: 10px; display: flex; flex-direction: column; gap: 4px; }
.wh-acc-row { display: flex; align-items: center; gap: 7px; padding: 6px 9px; font-size: 12.5px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
.wh-acc-row.ok { background: var(--good-bg); border-color: var(--good-line); }

/* ---------- announcements: who's seen it ---------- */
.wh-bull.unread { border-left: 3px solid var(--orange); }
.wh-bull-ack { margin-top: 8px; font-size: 11.5px; font-weight: 600; color: var(--warn-600);
  background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: var(--r-xs); padding: 4px 8px; display: inline-block; }
.wh-bull-ack.ok { color: var(--good-600); background: var(--good-bg); border-color: var(--good-line); }

/* ---------- 📖 guide ---------- */
.wh-guide-seg { margin-bottom: 16px; }
.wh-rel { margin-bottom: 12px; }
.wh-rel.needs { border-left: 3px solid var(--orange); }
.wh-rel-h { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.wh-rel-v { font-size: 11px; font-weight: 700; letter-spacing: .04em; color: #fff;
  background: var(--navy); border-radius: 999px; padding: 3px 9px; }
.wh-rel-t { font-size: 15px; color: var(--ink); }
.wh-rel-sum { margin: 9px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.55; }
.wh-rel-list { margin: 12px 0 0; padding: 0; list-style: none; display: flex;
  flex-direction: column; gap: 9px; }
.wh-rel-list li { display: flex; flex-direction: column; gap: 2px; padding-left: 13px;
  border-left: 2px solid var(--line); }
.wh-rel-list b { font-size: 13px; color: var(--ink); }
.wh-rel-list span { font-size: 12.5px; color: var(--ink-2); line-height: 1.55; }
.wh-rel-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 14px; padding-top: 11px; border-top: 1px solid var(--line-2); }
.wh-rel-ok { font-size: 12px; font-weight: 600; color: var(--good-600); }
.wh-rel-who { font-size: 11.5px; }

.wh-how { display: flex; flex-direction: column; gap: 8px; }
.wh-howsec { padding: 0; overflow: hidden; }
.wh-how-h { display: flex; align-items: center; gap: 10px; width: 100%; padding: 13px 15px;
  background: none; border: 0; cursor: pointer; font-size: 14px; color: var(--ink); text-align: left; }
.wh-how-h:hover { background: var(--surface-2); }
.wh-how-i { font-size: 16px; line-height: 1; }
.wh-how-body { margin: 0; padding: 0 17px 15px 44px; list-style: disc; display: flex;
  flex-direction: column; gap: 8px; }
.wh-how-body li { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.wh-how-body b { color: var(--ink); }

/* ---------- dark-theme touch-ups ---------- */
:root[data-theme="dark"] .wh-jump:hover { background: var(--navy-700); border-color: var(--navy-500); color: #fff; }
:root[data-theme="dark"] .wh-who-chip.on { background: var(--orange); border-color: var(--orange); color: #fff; }
:root[data-theme="dark"] .wh-who-chip.on:hover { background: var(--orange-600); }
:root[data-theme="dark"] .wh-rel-v { background: var(--orange); }
:root[data-theme="dark"] .wh-group-h:hover { background: var(--navy-700); }
:root[data-theme="dark"] .wh-how-h:hover { background: var(--navy-700); }
.wh-adv.named { font-size: 11px; font-weight: 700; padding: 3px 8px; white-space: nowrap;
  color: var(--navy-600); background: var(--navy-50); border-color: var(--navy-200); }
:root[data-theme="dark"] .wh-adv.named { color: var(--orange); background: transparent; border-color: var(--line); }
:root[data-theme="dark"] .wh-adv.named:hover { background: var(--navy-700); color: #fff; }
/* v20.5 — task names in white (dark theme) so they pop off the cards */
[data-theme="dark"] .wh-card-title, [data-theme="dark"] .wh-row-title,
[data-theme="dark"] .wh-td-title, [data-theme="dark"] .wh-decide-title,
[data-theme="dark"] .idea-text { color: #ffffff; }
/* v20.5 — review-kind chips (why it's in Aamir's queue) */
.wh-chip.rv-fyi { color: var(--good-600); background: var(--good-bg, var(--bg-2)); }
.wh-chip.rv-action { color: var(--warn-600); background: var(--warn-bg, var(--bg-2)); font-weight: 700; }
.wh-chip.rv-doc { color: var(--info, var(--ink)); background: var(--info-bg, var(--bg-2)); }

/* ============================================================
   v20.9 — 🏓 hand-offs & the 📥 Action Queue
   ============================================================ */
/* whose-court chip on cards/rows */
.wh-chip.ball { color: var(--navy-600); background: var(--navy-50); border-color: var(--navy-100); font-weight: 700; }
.wh-chip.ball.mine { color: #fff; background: var(--orange); border-color: var(--orange); }
:root[data-theme="dark"] .wh-chip.ball { color: #c7d2fe; background: rgba(99, 102, 241, .14); border-color: rgba(99, 102, 241, .4); }
:root[data-theme="dark"] .wh-chip.ball.mine { color: #fff; background: var(--orange); border-color: var(--orange); }

/* the Action Queue card (My Hub, above My work) */
.wh-aq { border-left: 3px solid var(--orange); }
.wh-aq-rows { display: flex; flex-direction: column; gap: 8px; margin-top: 8px; }
.wh-aq-row { border: 1px solid var(--line); border-radius: var(--r-2, 10px); padding: 8px 10px;
  cursor: pointer; background: var(--surface); transition: border-color .12s; }
.wh-aq-row:hover { border-color: var(--navy-300, var(--orange)); }
.wh-aq-row.urgent { border-left: 3px solid var(--bad-600); }
.wh-aq-line { display: flex; align-items: center; gap: 8px; }
.wh-aq-title { font-weight: 600; flex: 1; min-width: 0; }
[data-theme="dark"] .wh-aq-title { color: #ffffff; }
.wh-aq-age { font-size: 10.5px; font-weight: 700; color: var(--ink-3); background: var(--bg-2);
  border-radius: var(--r-pill); padding: 1px 7px; white-space: nowrap; }
.wh-aq-age.warn { color: var(--warn-600); background: var(--warn-bg); }
.wh-aq-note { margin: 5px 0 0 30px; font-size: 12.5px; color: var(--ink-2); font-style: italic; }
.wh-aq-acts { display: flex; gap: 6px; margin: 7px 0 0 30px; flex-wrap: wrap; }
.wh-aq-replyrow { margin: 7px 0 0 30px; }

/* the "in their court" side card */
.wh-sent-row { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left;
  border: 0; background: none; padding: 5px 2px; cursor: pointer; border-radius: 6px; color: var(--ink); }
.wh-sent-row:hover { background: var(--bg-2); }
.wh-sent-t { flex: 1; min-width: 0; font-size: 12.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:root[data-theme="dark"] .wh-sent-row:hover { background: var(--navy-700); }

/* where-this-stands block in the detail panel */
.wh-ball { margin: 10px 0; padding: 8px 10px; border: 1px solid var(--navy-100, var(--line));
  border-left: 3px solid var(--navy-400, var(--orange)); border-radius: var(--r-2, 10px); background: var(--navy-50, var(--bg-2)); }
.wh-ball.mine { border-left-color: var(--orange); }
.wh-ball-line { display: flex; align-items: center; gap: 7px; }
.wh-ball-note { margin-top: 4px; font-size: 12.5px; font-style: italic; color: var(--ink-2); }
:root[data-theme="dark"] .wh-ball { background: rgba(99, 102, 241, .08); border-color: rgba(99, 102, 241, .3); }

/* send-to modal bits */
.wh-send-who { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
.wh-send-p { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line);
  background: var(--surface); border-radius: var(--r-pill); padding: 5px 12px 5px 6px; cursor: pointer;
  font-weight: 600; font-size: 13px; color: var(--ink); }
.wh-send-p.on { background: var(--orange); border-color: var(--orange); color: #fff; }
.wh-send-step { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); margin: 8px 0 2px; cursor: pointer; }

/* ============================================================
   v20.10 — 💬 conversations, actionable notifications, ✅ done polish
   ============================================================ */
/* the task conversation — reads top-down like a chat */
.wh-chat { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 8px 2px; border: 1px solid var(--line); border-radius: var(--r-2, 10px);
  background: var(--bg-2); margin-bottom: 8px; }
.wh-chat-msg { display: flex; flex-direction: column; align-items: flex-start; padding: 0 8px; }
.wh-chat-msg.mine { align-items: flex-end; }
.wh-chat-who { display: flex; align-items: center; gap: 6px; font-size: 11.5px; margin-bottom: 2px; color: var(--ink-2); }
.wh-chat-when { font-size: 10.5px; color: var(--ink-3); font-weight: 500; }
.wh-chat-bubble { max-width: 86%; padding: 7px 11px; border-radius: 12px; font-size: 13px; line-height: 1.45;
  background: var(--surface); border: 1px solid var(--line); border-top-left-radius: 4px;
  color: var(--ink); word-break: break-word; }
.wh-chat-msg.mine .wh-chat-bubble { background: var(--orange); border-color: var(--orange); color: #fff;
  border-top-left-radius: 12px; border-top-right-radius: 4px; }
.wh-chat-msg.mine .wh-chat-bubble .wh-att a, .wh-chat-msg.mine .wh-chat-bubble a { color: #fff; text-decoration: underline; }
/* a hand-off — the moment the ball moved */
.wh-chat-hand { display: flex; align-items: center; gap: 8px; margin: 2px 8px; padding: 6px 10px;
  border-left: 3px solid var(--orange); border-radius: 8px;
  background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); border-right: 1px solid var(--line);
  font-size: 12.5px; }
.wh-chat-hand-l { flex: 1; min-width: 0; }
/* mechanical events — quiet one-liners */
.wh-chat-ev { font-size: 11.5px; color: var(--ink-3); padding: 0 10px; line-height: 1.5; }
.wh-chat-ev b { color: var(--ink-2); font-weight: 600; }
.wh-composer .btn { white-space: nowrap; }
[data-theme="dark"] .wh-chat { background: rgba(0, 0, 0, .18); }
[data-theme="dark"] .wh-chat-bubble { background: var(--navy-700, #1e2a44); }

/* notifications — icon + content + one-click reply */
.wh-notif-item { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.wh-notif-ic { flex: 0 0 auto; margin-top: 1px; }
.wh-notif-main { flex: 1; min-width: 0; }
.wh-notif-reply { flex: 0 0 auto; align-self: center; }

/* quick-add shortcut chips */
.wh-qa-chips { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.wh-qa-chip { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-pill);
  padding: 2px 9px; font-size: 11.5px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.wh-qa-chip:hover { border-color: var(--orange); color: var(--orange); }
.wh-qa-chips .wh-qa-tips { margin: 0 0 0 auto; }

/* ✅ completed-this-week group on My Hub + Done-tab person chips */
.wh-done7 .wh-group-t { color: var(--good-600); }
.wh-done7-more { display: block; margin: 6px 0 2px 30px; font-size: 12px; }
.wh-done-who { margin: 4px 0 10px; }

/* ============================================================
   v20.11 — the activation audit loop + the 📜 audit log
   ============================================================ */
.av-pend.av-fixed { color: var(--info, #0284c7); font-weight: 700; }
.av-row.av-fixedrow { border-left: 3px solid var(--info, #0284c7); }
.av-trail { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.av-trail-row { display: flex; align-items: baseline; gap: 8px; font-size: 12.5px; padding: 3px 6px;
  border-radius: 6px; color: var(--ink-2); flex-wrap: wrap; }
.av-trail-row:nth-child(odd) { background: var(--bg-2); }
.av-trail-ic { flex: 0 0 auto; }
.av-trail-when { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.av-trail-note { font-style: italic; }
.av-trail-modal { max-height: 200px; overflow-y: auto; border: 1px solid var(--line);
  border-radius: var(--r-2, 10px); padding: 4px 6px; }

/* ============================================================
   v20.13 — TICKETS & FOCUS
   ============================================================ */
/* ticket number chip — small, mono, unmistakable */
.wh-ticket { display: inline-block; font-family: var(--font-data, ui-monospace, monospace); font-size: 10.5px;
  font-weight: 700; letter-spacing: .3px; color: var(--navy-700); background: var(--navy-100);
  border-radius: 5px; padding: 1px 6px; vertical-align: 1px; white-space: nowrap; }
button.wh-ticket.copy { border: 1px solid transparent; cursor: pointer; }
button.wh-ticket.copy:hover { border-color: var(--navy-500); }
[data-theme="dark"] .wh-ticket { background: rgba(255,255,255,.10); color: var(--navy-200, #C8C8E6); }

/* global ticket search (in the tab row) */
.wh-tsearch { position: relative; min-width: 210px; max-width: 300px; flex: 0 1 260px; align-self: center; }
.wh-tsearch .search { width: 100%; font-size: 12.5px; padding: 5px 9px; }
.wh-tsearch-res { position: absolute; top: calc(100% + 4px); right: 0; z-index: 80; width: 360px; max-width: 88vw;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2, 10px);
  box-shadow: 0 10px 28px rgba(13,13,34,.16); padding: 4px; display: flex; flex-direction: column; }
.wh-tsr { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; padding: 7px 8px;
  border: none; background: none; border-radius: 7px; cursor: pointer; font-size: 12.5px; color: var(--ink); }
.wh-tsr:hover { background: var(--surface-2); }
.wh-tsr-t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* 🗂 my open tickets — the workspace strip */
.wh-ws { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: -8px 0 14px; }
.wh-ws-k { font-size: 11px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .4px; }
.wh-ws-chip { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px;
  background: var(--surface); overflow: hidden; }
.wh-ws-chip.on { border-color: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.wh-ws-open { display: inline-flex; align-items: center; gap: 5px; border: none; background: none; cursor: pointer;
  font-size: 12px; color: var(--ink); padding: 3px 2px 3px 9px; }
.wh-ws-open b { font-family: var(--font-data, ui-monospace, monospace); font-size: 10.5px; color: var(--navy-700); }
[data-theme="dark"] .wh-ws-open b { color: var(--navy-200, #C8C8E6); }
.wh-ws-open:hover { text-decoration: underline; }
.wh-ws-x { border: none; background: none; cursor: pointer; color: var(--ink-4); font-size: 13px; padding: 3px 8px 3px 4px; }
.wh-ws-x:hover { color: var(--red, #C93B33); }

/* My Work sub-tabs */
.wh-worktabs { display: flex; gap: 4px; flex-wrap: wrap; margin: 0 0 10px; }
.wh-wtab { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 4px 11px; }
.wh-wtab:hover { border-color: var(--navy-500); }
.wh-wtab.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.wh-wtab.on .wh-tc { background: rgba(255,255,255,.22); color: #fff; }
.wh-wtab.warn:not(.on) { border-color: var(--red, #C93B33); }
.attn-row .wh-attn-why { flex: 0 0 auto; font-size: 11px; font-weight: 700; color: var(--red, #C93B33); }

/* ⏰ reminders card */
.wh-rem-row { display: flex; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--line-2); }
.wh-rem-row:last-of-type { border-bottom: none; }
.wh-rem-row.due { background: var(--orange-50); margin: 0 -6px; padding: 4px 6px; border-radius: 7px; }
[data-theme="dark"] .wh-rem-row.due { background: rgba(232,80,15,.14); }
.wh-rem-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; text-align: left;
  border: none; background: none; cursor: pointer; color: var(--ink); font-size: 12.5px; padding: 0; }
.wh-rem-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wh-rem-acts { display: flex; gap: 3px; }
.wh-rem-add { margin-top: 8px; }
.wh-rem-add .gf-pill-date { flex: 0 0 auto; }

/* centered create modal + kind chips + collapsed-section toggles */
.wh-modal.center { top: 50%; left: 50%; right: auto; transform: translate(-50%, -50%);
  width: 680px; max-width: 94vw; height: auto; max-height: 90vh; border-radius: var(--r-3, 14px);
  box-shadow: 0 24px 60px rgba(13,13,34,.30); }
.wh-kindrow { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 12px; }
.wh-kind { border: 1.5px solid var(--line); background: var(--surface); border-radius: 9px; cursor: pointer;
  font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 7px 13px; }
.wh-kind:hover { border-color: var(--navy-500); }
.wh-kind.on { border-color: var(--orange); color: var(--orange-700); background: var(--orange-50); }
[data-theme="dark"] .wh-kind.on { background: rgba(232,80,15,.14); color: var(--orange-400); }
.wh-fset-toggle { display: block; border: 1px dashed var(--line); background: none; border-radius: 8px;
  cursor: pointer; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 7px 12px; margin: 0 0 12px; width: 100%; text-align: left; }
.wh-fset-toggle:hover { border-color: var(--navy-500); color: var(--ink); }

/* ⇄ combine picker */
.wh-merge-list { display: flex; flex-direction: column; margin-top: 8px; max-height: 300px; overflow-y: auto; }

/* chat clarity: order label, day dividers, end marker */
.wh-chat-order { font-size: 11px; font-weight: 600; color: var(--ink-3); }
.wh-chat-day { display: flex; align-items: center; gap: 10px; margin: 6px 0 2px; }
.wh-chat-day::before, .wh-chat-day::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.wh-chat-day span { font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .5px; }
.wh-chat-who.mine { justify-content: flex-end; }
.wh-chat-latest { text-align: center; font-size: 10.5px; color: var(--ink-4); margin-top: 2px; }
.wh-mode { font-size: 12px; }

/* ============================================================
   v20.14 — ☀️ MORNING MEETING + 🗒 NOTES
   ============================================================ */
/* --- morning meeting --- */
.su-headacts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.su-strip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 14px 0 12px;
  padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2, 10px); }
.su-day { font-size: 14px; font-weight: 700; color: var(--ink); }
.su-att { display: flex; align-items: center; gap: 6px; font-size: 11px; color: var(--ink-3); }
.su-att input { font-size: 12.5px; padding: 4px 8px; border: 1px solid var(--line); border-radius: 7px;
  background: var(--bg-2); color: var(--ink); min-width: 220px; }
.su-tiles { margin-bottom: 14px; }
.su-carry { border-left: 3px solid var(--orange); margin-bottom: 14px; }
.su-carry-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line-2); }
.su-carry-row:last-child { border-bottom: none; }
.su-carry-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; text-align: left;
  border: none; background: none; cursor: pointer; color: var(--ink); font-size: 12.5px; padding: 0; }
.su-ct { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-agenda { display: flex; flex-direction: column; gap: 12px; }
.su-sec { border-left: 3px solid var(--line); }
.su-sec.on { border-left-color: var(--c-teal, #0E8FA8); }
.su-sec-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.su-sec-n { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-100); color: var(--navy-700); font-size: 11px; font-weight: 800; }
[data-theme="dark"] .su-sec-n { background: rgba(255,255,255,.10); color: var(--navy-200, #C8C8E6); }
.su-sec-t { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.su-sec-t b { font-size: 13.5px; }
.su-tick { color: var(--c-green, #129068); font-weight: 800; }
.su-notes { width: 100%; }
.su-acts { display: flex; flex-direction: column; gap: 2px; margin: 8px 0 4px; }
.su-act { display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 8px;
  background: var(--surface-2); font-size: 12.5px; }
.su-act.done { opacity: .62; }
.su-act.done .su-act-t { text-decoration: line-through; }
.su-act-t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-act-who { font-size: 11px; font-weight: 700; color: var(--ink-2); background: var(--navy-100);
  border-radius: 5px; padding: 1px 6px; }
[data-theme="dark"] .su-act-who { background: rgba(255,255,255,.10); }
.su-add { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.su-add-t { flex: 1 1 260px; min-width: 180px; }
.su-past-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 7px 8px;
  border: none; background: none; border-radius: 8px; cursor: pointer; color: var(--ink); font-size: 12.5px; }
.su-past-row:hover, .su-past-row.on { background: var(--surface-2); }
.su-people-row { display: flex; gap: 8px; flex-wrap: wrap; }
.su-person { display: flex; flex-direction: column; gap: 1px; padding: 6px 12px; border-radius: 9px;
  background: var(--surface-2); border: 1px solid var(--line); }
.su-person.clear { border-color: var(--c-green, #129068); }
.su-high textarea { width: 100%; }

/* --- notes --- */
.nt-capture { margin-bottom: 14px; }
.nt-cap-row { display: flex; gap: 6px; flex-wrap: wrap; }
.nt-cap-t { flex: 1 1 320px; min-width: 200px; font-size: 14px; }
.nt-due { border-left: 3px solid var(--orange); margin-bottom: 14px; }
.nt-due-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.nt-due-main { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 8px; text-align: left;
  border: none; background: none; cursor: pointer; color: var(--ink); font-size: 12.5px; padding: 0; }
.nt-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.nt-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.nt-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 4px 11px; }
.nt-chip.sm { font-size: 11.5px; padding: 3px 9px; }
.nt-chip:hover { border-color: var(--navy-500); }
.nt-chip.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.nt-chip.on .wh-tc { background: rgba(255,255,255,.22); color: #fff; }
.nt-chip.clear { color: var(--red, #C93B33); }
.nt-search { flex: 0 1 240px; }
.nt-rail { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 0 0 12px; }
.nt-rail-k { font-size: 10.5px; font-weight: 700; color: var(--ink-3); text-transform: uppercase;
  letter-spacing: .4px; margin-left: 4px; }
.nt-rail-k:first-child { margin-left: 0; }
.nt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.nt-card { display: flex; flex-direction: column; gap: 7px; padding: 12px 13px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-2, 10px); cursor: pointer; transition: border-color .12s, transform .12s; }
.nt-card:hover { border-color: var(--navy-500); transform: translateY(-1px); }
.nt-card.pinned { border-color: var(--orange); }
.nt-card-h { display: flex; align-items: flex-start; gap: 8px; }
.nt-title { flex: 1; min-width: 0; font-size: 13.5px; line-height: 1.35; }
.nt-pin { border: none; background: none; cursor: pointer; color: var(--ink-4); font-size: 14px; padding: 0 2px; }
.nt-card.pinned .nt-pin, .nt-row .nt-pin:hover { color: var(--orange); }
.nt-body { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2);
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.nt-meta { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nt-chip-k { font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 7px;
  background: var(--navy-100); color: var(--navy-700); }
.nt-chip-k.kind-sop { background: var(--orange-100); color: var(--orange-700); }
.nt-chip-k.kind-idea { background: #FDF3D3; color: #8A6100; }
.nt-chip-k.kind-decision { background: #DDF0E6; color: #0B6B4A; }
[data-theme="dark"] .nt-chip-k { background: rgba(255,255,255,.10); color: var(--navy-200, #C8C8E6); }
[data-theme="dark"] .nt-chip-k.kind-sop { background: rgba(232,80,15,.18); color: var(--orange-400); }
[data-theme="dark"] .nt-chip-k.kind-idea { background: rgba(255,214,102,.16); color: #E8C05A; }
[data-theme="dark"] .nt-chip-k.kind-decision { background: rgba(18,144,104,.20); color: #6ED3AA; }
.nt-tag { font-size: 10.5px; font-weight: 600; color: var(--ink-3); }
.nt-card-f { display: flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 4px;
  border-top: 1px solid var(--line-2); }
.nt-list { display: flex; flex-direction: column; }
.nt-row { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-bottom: 1px solid var(--line-2);
  cursor: pointer; font-size: 12.5px; }
.nt-row:hover { background: var(--surface-2); }
.nt-row-t { font-weight: 600; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nt-row-m { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.nt-editor .nt-kindrow { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 12px; }
.nt-editor textarea { width: 100%; font-size: 13px; line-height: 1.55; }

/* ============================================================
   v20.15 — SOP page: two surfaces, one rail
   ============================================================ */
.sop-tabs { display: flex; gap: 6px; margin: 14px 0 16px; border-bottom: 2px solid var(--line); padding-bottom: 0; }
.sop-tab { display: flex; align-items: baseline; gap: 7px; border: none; background: none; cursor: pointer;
  font-size: 14px; font-weight: 700; color: var(--ink-3); padding: 8px 14px 10px; border-bottom: 2px solid transparent;
  margin-bottom: -2px; border-radius: 8px 8px 0 0; }
.sop-tab:hover { color: var(--ink); background: var(--surface-2); }
.sop-tab.on { color: var(--ink); border-bottom-color: var(--orange); }
.sop-tab-s { font-size: 11px; font-weight: 500; color: var(--ink-4); }
.sop-tab.on .sop-tab-s { color: var(--ink-3); }

/* find bar */
.sop-find { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 12px; }
.sop-find-q { flex: 1 1 460px; max-width: 720px; font-size: 15px; padding: 12px 16px; border-radius: var(--r-lg, 12px); }
.sop-find-meta { font-size: 11.5px; color: var(--ink-3); }

/* shelf rail */
.sop-rail { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 0 0 14px; }
.sop-chip { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--ink-2); padding: 5px 12px; }
.sop-chip:hover { border-color: var(--navy-500); }
.sop-chip.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
.sop-chip.on .wh-tc { background: rgba(255,255,255,.22); color: #fff; }
.sop-rail-sep { width: 1px; height: 20px; background: var(--line); margin: 0 4px; }
.sop-libbody { margin-top: 2px; }

/* workshop pipeline */
.sop-pipe { display: flex; align-items: stretch; gap: 6px; flex-wrap: wrap; margin: 0 0 18px; }
.sop-stage { flex: 1 1 168px; display: flex; align-items: center; gap: 9px; text-align: left; cursor: pointer;
  padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2, 10px); }
.sop-stage:hover { border-color: var(--navy-500); }
.sop-stage.hot { border-color: var(--orange); }
.sop-stage.empty { opacity: .72; }
.sop-stage.done { border-style: dashed; }
.sop-stage-n { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy-100); color: var(--navy-700); font-size: 10.5px; font-weight: 800; }
[data-theme="dark"] .sop-stage-n { background: rgba(255,255,255,.10); color: var(--navy-200, #C8C8E6); }
.sop-stage.hot .sop-stage-n { background: var(--orange); color: #fff; }
.sop-stage-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sop-stage-b b { font-size: 12.5px; color: var(--ink); }
.sop-stage-b .note { font-size: 10.5px; }
.sop-stage-v { font-size: 18px; font-weight: 800; color: var(--ink); font-family: var(--font-data, inherit); }
.sop-pipe-arrow { align-self: center; color: var(--ink-4); font-size: 13px; }
@media (max-width: 900px) { .sop-pipe-arrow { display: none; } }

/* v20.15 fixes found in a real render (dark theme) ------------------- */
/* count badges inside the rail chips inherited a dark-on-dark pairing */
.sop-chip .wh-tc { background: var(--navy-100); color: var(--navy-700); }
[data-theme="dark"] .sop-chip .wh-tc { background: rgba(255,255,255,.14); color: #E8EAF6; }
[data-theme="dark"] .sop-chip.on .wh-tc { background: rgba(255,255,255,.22); color: #fff; }
[data-theme="dark"] .sop-tab .wh-tc { background: rgba(255,255,255,.14); color: #E8EAF6; }
/* the stage numerals were unreadable on the dark surface */
.sop-stage-n { font-size: 11px; }
[data-theme="dark"] .sop-stage-n { background: rgba(255,255,255,.16); color: #E8EAF6; }
[data-theme="dark"] .sop-stage.hot .sop-stage-n { background: var(--orange); color: #fff; }
/* the workshop no longer needs a heavy orange bracket — it IS the surface now */
.sop-workshop { border: none; border-left: none; background: none; padding: 0; margin: 0; }
/* equal-height doc cards, actions pinned to the bottom edge of every card */
.sop-shelf { align-items: stretch; }
.sopc { display: flex; flex-direction: column; }
.sopc-actions { margin-top: auto; }
.sopc-secs { font-size: 11px; color: var(--ink-3); }
/* keep the provenance line to one line — it's reference, not headline */
.sopc-prov { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* stage cards: one-line sub so five stages sit on one calm row */
.sop-stage-b .note { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sop-stage { padding: 9px 11px; }

/* ============================================================
   v20.17 — THE FACELIFT: rhythm, air, and crisp navigation.
   Layout-only: nothing moves pages or removes features.
   ============================================================ */
/* -- BUG: the ticket-search results box has display:flex, which beat the
   browser's [hidden] rule — an empty pill floated under the tab bar -- */
.wh-tsearch-res[hidden] { display: none !important; }

/* -- page header: a firmer masthead line -- */
.view-head { margin-bottom: 4px; }
.view-head h2 { letter-spacing: -.015em; }

/* -- primary tab bars (Work Hub, SOP, Activations): taller targets, a hover
   surface, and readable count badges in dark -- */
.wh-tabs { gap: 2px; margin: 18px 0 16px; align-items: center; }
.wh-tab { padding: 9px 14px 10px; font-weight: 650; letter-spacing: .01em; border-radius: 9px 9px 0 0; }
.wh-tab:hover { background: var(--surface-2); color: var(--ink); }
[data-theme="dark"] .wh-tab .wh-tc,
[data-theme="dark"] .wh-worktabs .wh-wtab:not(.on) .wh-tc,
[data-theme="dark"] .wh-fchip .wh-tc { background: rgba(255,255,255,.14); color: #E8EAF6; }

/* -- warnings read as a quiet strip, not a slab -- */
.card.wh-warn { padding: 9px 14px; border-radius: 10px; box-shadow: none; margin: 0 0 12px; }

/* -- quick add: slimmer card, clearer separation from the board -- */
.wh-qa { padding: 12px 14px; }
.wh-qa-chips { margin-top: 8px; align-items: center; }

/* -- filter chip rows: consistent gaps, room between wrapped rows -- */
.wh-fchips { gap: 6px; row-gap: 8px; margin: 12px 0; align-items: center; }

/* -- stat tiles: label+number with air; never cramped -- */
.statbar-item { min-height: 74px; }

/* -- THE BOARD: columns get room and an identity; long titles wrap cleanly -- */
.wh-kanban.five { grid-template-columns: repeat(5, minmax(232px, 1fr)); }
@media (max-width: 1400px) { .wh-kanban.five { grid-template-columns: repeat(3, minmax(232px, 1fr)); } }
.wh-col { padding: 12px 12px 10px; border-top: 3px solid var(--line); }
.wh-col[data-col="todo"]    { border-top-color: var(--navy-500); }
.wh-col[data-col="doing"]   { border-top-color: var(--orange); }
.wh-col[data-col="review"]  { border-top-color: var(--c-violet, #7B5BD6); }
.wh-col[data-col="waiting"] { border-top-color: var(--warn, #C08010); }
.wh-col[data-col="done"]    { border-top-color: var(--c-green, #129068); }
.wh-card { padding: 10px 11px; }
.wh-card-title { overflow-wrap: anywhere; }
.wh-card-meta { row-gap: 5px; }
.wh-adv.named { white-space: nowrap; }

/* -- buttons: one height system, calm hover, visible keyboard focus -- */
.btn { min-height: 33px; font-weight: 600; letter-spacing: .01em; }
.btn.sm { min-height: 27px; }
:is(.btn, .wh-tab, .sop-tab, .sop-chip, .nt-chip, .wh-wtab, .wh-fchip, .seg-btn, .wh-seg-b, .nav-btn):focus-visible {
  outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 8px; }
:is(.btn, .wh-fchip, .sop-chip, .nt-chip, .wh-wtab) { transition: background var(--fast, .12s), border-color var(--fast, .12s), color var(--fast, .12s); }

/* -- section heads: steady vertical rhythm everywhere -- */
.section-head { margin: 20px 0 10px; }
.section-head:first-child { margin-top: 0; }

/* -- pricing: the Grade-D column was clipped inside account cards -- */
.pr-table-wrap { overflow-x: auto; }
.sop-grid > .sop-card { min-width: 0; }
@media (min-width: 1200px) { #view-pricing .sop-grid { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); } }

/* -- hub two-column: a touch more gutter so the side rail reads separate -- */
.wh-hub { gap: 18px; }
/* five columns must FIT a 1440 screen (232px min pushed Done off the edge);
   212px min + tighter gap keeps every column on screen, and the kanban can
   scroll sideways as a last resort instead of clipping */
.wh-kanban { overflow-x: auto; padding-bottom: 4px; }
.wh-kanban.five { grid-template-columns: repeat(5, minmax(206px, 1fr)); gap: 10px; }
[data-theme="dark"] .wh-ticket { color: #D9DCF2; }

/* ============================================================
   v20.18 — sections that hold their shape + the readable ticket
   ============================================================ */
/* zone cards: each area of a tab is its own surface — nothing bleeds */
.wh-zone { padding: 14px 16px; margin-bottom: 14px; }
.wh-zone .section-head { margin-top: 0; }
.wh-zone .wh-qdivider { display: none; }

/* 📄 the brief — the ticket reads like a document the moment it opens */
.wh-brief { margin: 10px 0 12px; border: 1px solid var(--line); border-left: 3px solid var(--navy-500);
  border-radius: 10px; background: var(--bg-2); padding: 10px 13px; }
.wh-brief-h { display: flex; align-items: center; gap: 8px; justify-content: space-between;
  font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.wh-brief-body { font-size: 13px; line-height: 1.6; color: var(--ink); white-space: pre-wrap; overflow-wrap: anywhere; }
.wh-brief textarea { width: 100%; font-size: 13px; line-height: 1.55; }
.wh-detail-grid.four { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 560px) { .wh-detail-grid.four { grid-template-columns: 1fr 1fr; } }

/* notes: idea/feedback lifecycle + discussion */
.nt-st { font-size: 10.5px; font-weight: 700; border-radius: 5px; padding: 1px 7px;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.nt-st.st-sent { background: var(--orange-50); color: var(--orange-700); border-color: transparent; }
.nt-st.st-shipped { background: #DDF0E6; color: #0B6B4A; border-color: transparent; }
.nt-st.st-parked { opacity: .7; }
[data-theme="dark"] .nt-st.st-sent { background: rgba(232,80,15,.18); color: var(--orange-400); }
[data-theme="dark"] .nt-st.st-shipped { background: rgba(18,144,104,.20); color: #6ED3AA; }
.nt-cc { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.nt-strow { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin: 4px 0 10px; }
.nt-strow .wh-kind.sm { font-size: 11.5px; padding: 4px 9px; }
.nt-com { border-top: 1px solid var(--line-2); margin-top: 10px; padding-top: 8px; margin-bottom: 10px; }
.nt-com-row { padding: 5px 0; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.nt-com-row:last-of-type { border-bottom: none; }
.nt-com-t { margin-top: 1px; font-size: 12.5px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; }
.fb-moved { border-left: 3px solid var(--orange); }
/* v20.18 fixes from the real render: the 4-up row clipped date inputs in a
   440px panel; feedback-kind + count badges were dark-on-dark */
.wh-detail-grid.four { grid-template-columns: 1fr 1fr; }
[data-theme="dark"] .nt-chip .wh-tc { background: rgba(255,255,255,.14); color: #E8EAF6; }
.nt-chip-k.kind-feedback { background: #E2ECF9; color: #1C4E8A; }
[data-theme="dark"] .nt-chip-k.kind-feedback { background: rgba(90,150,240,.20); color: #9CC1F2; }

/* ---- v21 SOP Studio: drafts, discussion threads, autosave stamp ---- */
.pr-card.draft  { border-left-color: var(--ink-3); }
.pr-status.draft { color: var(--ink-2); background: var(--chip-bg, rgba(127,127,127,.12)); }
.pr-saved { font-size: 11px; font-weight: 600; color: var(--good); min-width: 84px; text-align: right; }
.pr-thread { margin-top: 8px; font-size: 12px; }
.pr-thread > summary { cursor: pointer; color: var(--ink-2); font-weight: 600; }
.pr-thread-list { margin: 6px 0 4px; display: flex; flex-direction: column; gap: 6px; }
.pr-msg { padding: 6px 9px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg-1, transparent); }
.pr-msg-t { margin-top: 2px; white-space: pre-wrap; color: var(--ink-1, inherit); }
.pr-msg-add { display: flex; gap: 6px; margin-top: 6px; }
.pr-msg-add .search { flex: 1; }
[data-theme="dark"] .pr-status.draft { background: rgba(255,255,255,.10); color: #C9CDDF; }

/* ---- v21.1 The Clear Update: solve bar, update bar, history tab, ⋯ menu ---- */
.wh-detail { display: flex; flex-direction: column; }
.wh-detail > * { flex: 0 0 auto; }
.wh-solvebar { position: sticky; bottom: -1px; margin-top: 12px; padding: 10px 2px;
  display: flex; align-items: center; gap: 8px; border-top: 2px solid var(--line);
  background: var(--surface); z-index: 3; }
.btn.solve { background: var(--good); border-color: var(--good); color: #fff; font-weight: 700; }
.btn.solve:hover { background: var(--good-600, var(--good)); }
.wh-updatebar { display: none; align-items: center; gap: 8px; }
.wh-updatebar.show { display: flex; animation: wh-pop .18s ease-out; }
.wh-updatebar .btn.accent { background: var(--orange); border-color: var(--orange); color: #fff; font-weight: 700; }
@keyframes wh-pop { from { transform: translateY(4px); opacity: 0; } to { transform: none; opacity: 1; } }
.wh-dtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 10px 0 6px; }
.wh-dtab { border: 0; background: none; cursor: pointer; padding: 6px 10px; font: inherit;
  font-size: 12.5px; font-weight: 600; color: var(--ink-2); border-bottom: 2px solid transparent; }
.wh-dtab.on { color: var(--orange); border-bottom-color: var(--orange); }
.wh-hist { display: flex; flex-direction: column; gap: 2px; }
.wh-hist-row { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px;
  border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.wh-hist-row:last-child { border-bottom: 0; }
.wh-hist-ic { width: 18px; text-align: center; flex: 0 0 auto; }
.wh-hist-b { flex: 1; min-width: 0; }
.wh-hist-t { color: var(--ink-2); margin-top: 1px; white-space: pre-wrap; }
.wh-hist-row.edit .wh-hist-t { color: var(--ink-1, inherit); }
.wh-detail-actions.route { margin: 10px 0 0; }
.wh-more { position: relative; display: inline-block; }
.wh-more > summary { list-style: none; cursor: pointer; }
.wh-more > summary::-webkit-details-marker { display: none; }
.wh-more[open] > .wh-more-menu { position: absolute; right: 0; bottom: calc(100% + 4px);
  display: flex; flex-direction: column; gap: 4px; padding: 8px; min-width: 170px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-sm); box-shadow: 0 8px 24px rgba(0,0,0,.18); z-index: 6; }

/* ============================================================
   v22.3 — 📋 THE MEETING QUEUE (+ agenda steps folded slim)
   ============================================================ */
.su-queue { border-left: 3px solid var(--navy-700, #23306B); margin-bottom: 14px; }
[data-theme="dark"] .su-queue { border-left-color: var(--navy-200, #C8C8E6); }
.su-q-add { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 6px; }
.su-q-add .search { flex: 1 1 320px; min-width: 200px; font-size: 13.5px; }
.su-q-note { margin: 4px 0 2px; }
.su-q-list { display: flex; flex-direction: column; }
.su-q { padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.su-q:last-child { border-bottom: none; }
.su-q-row { display: flex; align-items: center; gap: 8px; min-height: 26px; flex-wrap: wrap; }
.su-q-kind { flex: 0 0 auto; }
.su-q-t { font-size: 13px; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.su-q.res .su-q-t { font-weight: 500; color: var(--ink-2); }
.su-q.res { opacity: .78; }
.su-q-carry { font-size: 10.5px; font-weight: 700; color: var(--orange); background: var(--orange-50, rgba(232,119,34,.12));
  border-radius: 5px; padding: 1px 6px; white-space: nowrap; }
.su-q-x { color: var(--ink-4); }
.su-q-out { margin: 2px 0 0 26px; font-size: 12px; color: var(--ink-2); font-style: italic; }
.su-q-out::before { content: "↳ "; font-style: normal; color: var(--ink-4); }
.su-q-edit { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 6px 0 2px 26px;
  padding: 7px 9px; background: var(--surface-2); border-radius: 8px; }
.su-q-edit .search { flex: 1 1 260px; min-width: 180px; }

/* 📝 the one notes box (+ legacy per-step notes shown read-only) */
.su-notesbox { margin-bottom: 14px; }
.su-notesbox .su-notes { min-height: 110px; }
.su-legacy { display: flex; flex-direction: column; gap: 8px; margin: 2px 0 10px;
  padding: 9px 11px; background: var(--surface-2); border-radius: 9px; }
.su-legacy-b b { font-size: 11px; color: var(--ink-3); display: block; margin-bottom: 1px; }
.su-legacy-b div { font-size: 12.5px; white-space: pre-wrap; color: var(--ink-2); }

/* 📎 the read-only context fold */
details.su-fold > summary { cursor: pointer; list-style: none; margin-bottom: 0; user-select: none; }
details.su-fold > summary::-webkit-details-marker { display: none; }
details.su-fold[open] > summary { margin-bottom: 8px; }
.su-sec-c { color: var(--ink-4); font-size: 11px; transition: transform .15s ease; }
details.su-fold[open] .su-sec-c { transform: rotate(180deg); }
details.su-fold > summary:hover b { color: var(--orange); }
.su-ctxfold { margin-top: 14px; }

/* v26.1 — Import Creator: drafts bar, drop zone, review grid */
.li-modes.picked { padding-top: 12px; padding-bottom: 12px; }
.li-modes.picked h3 { display: none; }
.li-modes.picked .li-mode { padding: 9px 14px; flex-direction: row; align-items: center; gap: 10px; }
.li-modes.picked .li-mode .note { display: none; }
.li-mode-ico svg { color: var(--orange); }
.li-bar { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg, 12px);
  padding: 10px 14px; margin-bottom: 14px; box-shadow: var(--sh-1, 0 1px 3px rgba(0,0,0,.08)); }
.li-bar-l { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.li-title { font-size: 15px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-status { font-size: 12px; color: var(--ink-3); display: inline-flex; align-items: center; gap: 6px; }
.li-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-4, #aaa); display: inline-block; }
.li-dot.ok { background: var(--good, #2e9d5b); } .li-dot.busy { background: var(--orange); }
.li-bar-r { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.li-bar-r .btn { display: inline-flex; align-items: center; gap: 6px; }
.li-pill { font-size: 11px; font-weight: 700; background: var(--bg-2); border-radius: var(--r-pill, 99px); padding: 0 7px; }
.li-gen.pulse { box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 30%, transparent); }
.li-savedwrap { position: relative; }
.li-savedmenu { position: absolute; right: 0; top: calc(100% + 6px); width: 340px; max-height: 380px; overflow: auto; z-index: 20;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r, 10px); box-shadow: var(--sh-3, 0 10px 30px rgba(0,0,0,.18)); padding: 6px; }
.li-saved-row { display: flex; align-items: center; gap: 4px; border-radius: var(--r-sm); }
.li-saved-row.cur { background: var(--bg-2); }
.li-saved-open { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left;
  font: inherit; color: var(--ink); background: none; border: 0; padding: 7px 9px; cursor: pointer; border-radius: var(--r-sm); }
.li-saved-open:hover { background: var(--bg-2); }
.li-saved-open b { font-size: 13px; }
.li-saved-foot { border-top: 1px solid var(--line); margin: 6px 0 0; padding: 7px 9px 3px; display: flex; gap: 5px; align-items: center; }
.li-resume { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2);
  background: var(--bg-2); border-radius: var(--r); padding: 9px 13px; margin-bottom: 14px; }
.li-step h3 { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.li-n { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; font-weight: 800;
  background: var(--orange); color: #fff; flex: none; }
.li-okt { color: var(--good, #2e9d5b); font-weight: 600; }
.li-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; cursor: pointer;
  border: 2px dashed var(--line-2, var(--line)); border-radius: var(--r-lg, 12px); padding: 28px 20px; background: var(--bg-2);
  transition: border-color .15s, background .15s; }
.li-drop:hover, .li-drop.over { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 6%, var(--surface)); }
.li-drop b { font-size: 14px; color: var(--ink); }
.li-drop .note { max-width: 520px; }
.li-drop-ico { color: var(--orange); }
.li-alt { display: flex; align-items: flex-start; gap: 18px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; }
.li-alt summary { cursor: pointer; color: var(--ink-2); }
.li-alt textarea { margin-top: 8px; min-width: min(560px, 80vw); }
.li-filechip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; }
.li-filechip .btn { display: inline-flex; align-items: center; gap: 6px; }
.li-file-ico { color: var(--orange); display: inline-flex; }
.li-file-meta { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.li-sheetsel { font-size: 12px; color: var(--ink-3); display: inline-flex; gap: 6px; align-items: center; }
.li-sheetsel select { font: inherit; font-size: 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 4px 6px; }
.li-mapbox { margin-top: 12px; }
.li-map.hit { border-color: color-mix(in srgb, var(--good, #2e9d5b) 45%, var(--line)); }
.li-map-src { display: flex; flex-direction: column; }
.li-map-src i { font-style: normal; font-weight: 400; font-size: 11px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; }
.li-cov { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.li-chip { display: inline-flex; align-items: center; gap: 7px; font: inherit; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: var(--r-pill, 99px); padding: 4px 10px; }
.li-chip-v { font-weight: 700; }
.li-chip-v i { font-style: normal; font-weight: 400; color: var(--ink-3); }
.li-chip.full .li-chip-v { color: var(--good, #2e9d5b); }
.li-chip.part { border-color: var(--warn-line); background: var(--warn-bg); color: var(--warn-600); }
.li-chip.none { border-color: var(--bad-line); background: var(--bad-bg); color: var(--bad-600); }
.li-chip.opt .li-chip-v { color: var(--ink-3); }
.li-chip.on { outline: 2px solid var(--orange); outline-offset: 1px; }
.li-gridbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; font-size: 13px; }
.li-gridbar .btn { display: inline-flex; align-items: center; gap: 6px; }
.li-filter { display: inline-flex; align-items: center; gap: 4px; background: var(--bg-2); border-radius: var(--r-pill, 99px); padding: 2px 4px 2px 10px; font-size: 12px; }
.li-legend { display: inline-flex; align-items: center; gap: 5px; }
.li-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 6px; border: 1px solid var(--line); }
.li-sw.need { background: var(--bad-bg); border-color: var(--bad-line); }
.li-sw.edit { background: color-mix(in srgb, var(--orange) 16%, var(--surface)); border-color: var(--orange); }
.li-sw.fb { background: var(--surface); }
.li-gridwrap { max-height: 460px; overflow: auto; border: 1px solid var(--line); border-radius: var(--r); }
.li-grid-t { border-collapse: separate; border-spacing: 0; }
.li-grid-t thead th { position: sticky; top: 0; z-index: 2; background: var(--surface-2, var(--bg-2)); white-space: nowrap; font-size: 11.5px; }
.li-grid-t th.li-th-esc, .li-preview th.li-th-esc { color: var(--orange-700, var(--orange)); }
.li-grid-t td { padding: 3px 4px; }
.li-grid-t .li-rn { position: sticky; left: 0; z-index: 1; background: var(--surface); color: var(--ink-3); font-size: 11px; text-align: right; }
.li-grid-t thead .li-rn { z-index: 3; }
.li-grid-t tr.li-row-need .li-rn { color: var(--bad-600); font-weight: 700; }
.li-grid-t td input::placeholder { color: var(--ink-4, #9aa); font-style: italic; }
.li-grid-t td input:focus { outline: 2px solid var(--orange); outline-offset: -1px; border-color: transparent; }
.li-grid-t td.need input { background: var(--bad-bg); border-color: var(--bad-line); }
.li-grid-t td.edited input { background: color-mix(in srgb, var(--orange) 10%, var(--surface)); border-color: color-mix(in srgb, var(--orange) 55%, var(--line)); }
.li-empty { text-align: center; padding: 18px !important; }
.li-sub { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.li-sub-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.li-sub-h .note { font-weight: 400; }
.li-grid3 { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.li-ff { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--good, #2e9d5b);
  background: color-mix(in srgb, var(--good, #2e9d5b) 12%, transparent); border-radius: 4px; padding: 1px 5px; margin-left: 4px; }
.li-flags.soft summary { cursor: pointer; }
@media (max-width: 700px) {
  .li-bar { position: static; }
  .li-savedmenu { width: min(340px, 86vw); }
}

/* ============================================================
   v29 Notes — "Notes, organized" (Notes & Meetings → Notes, #mt-notes)
   Scoped under #mt-notes .nt-desk so it outranks the older .nt-* rules
   here and the #view-standup .nt-* rules in meetings.css.
   ============================================================ */
#mt-notes .nt-desk { --nt-acc: var(--c-navy); display: block; min-width: 0; }
#mt-notes .nt-desk .nt-head { position: static; top: auto; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 14px;
  margin: 0 0 16px; padding: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; }
#mt-notes .nt-desk .nt-head::after { display: none; }
#mt-notes .nt-desk .nt-head h2 { font-size: var(--fs-xl); margin: 0; }

/* scope switch: Mine · Sent to me · Team / Aamir's notes */
#mt-notes .nt-scope { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--r-md); max-width: 100%; }
#mt-notes .nt-scope-b { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; cursor: pointer;
  padding: 6px 12px; border-radius: var(--r-sm); font: inherit; font-size: var(--fs-sm); font-weight: 600; color: var(--ink-3);
  white-space: nowrap; min-width: 0; transition: background var(--fast), color var(--fast); }
#mt-notes .nt-scope-b:hover { color: var(--ink); }
#mt-notes .nt-scope-b.on { background: var(--surface); color: var(--ink); box-shadow: var(--sh-1); }
#mt-notes .nt-scope-b.on svg { color: var(--nt-acc); }
#mt-notes .nt-desk button:focus-visible, #mt-notes .nt-desk [tabindex]:focus-visible { outline: 2px solid var(--navy-500); outline-offset: 2px; }
#mt-notes .nt-scope-n { display: inline-block; font-family: var(--font-data); font-size: var(--fs-3xs); font-weight: 600; line-height: 1.5;
  padding: 0 6px; border-radius: 999px; background: var(--surface-3); color: var(--ink-2); }
#mt-notes .nt-scope-n.hot { background: var(--c-teal); color: #fff; }

/* layout: folder rail + main */
#mt-notes .nt-layout { display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 22px; align-items: start; }
#mt-notes .nt-layout.solo { grid-template-columns: minmax(0, 1fr); }
#mt-notes .nt-main { min-width: 0; }
#mt-notes .nt-side { position: sticky; top: 12px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
#mt-notes .nt-side-sec { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
#mt-notes .nt-side-k { font-size: var(--fs-3xs); font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-4);
  padding: 0 10px 4px; }
#mt-notes .nt-side-b { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; border: 0; background: none; cursor: pointer;
  padding: 6px 10px; border-radius: var(--r-sm); font: inherit; font-size: var(--fs-sm); color: var(--ink-2); text-align: left; }
#mt-notes .nt-side-b svg { flex: none; color: var(--ink-4); }
#mt-notes .nt-side-b:hover { background: var(--surface-2); color: var(--ink); }
#mt-notes .nt-side-b.on { background: var(--navy-50); color: var(--navy); font-weight: 650; box-shadow: inset 3px 0 0 var(--nt-acc); }
#mt-notes .nt-side-b.on svg { color: var(--nt-acc); }
#mt-notes .nt-side-l { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mt-notes .nt-side-n { flex: none; font-family: var(--font-data); font-size: var(--fs-2xs); color: var(--ink-4); }
#mt-notes .nt-side-tags { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 6px; }
#mt-notes .nt-side-foot { border-top: 1px solid var(--line-2); padding-top: 8px; }
#mt-notes .nt-tagb { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  border-radius: 999px; padding: 2px 9px; font: inherit; font-size: var(--fs-2xs); font-weight: 600; color: var(--ink-2); }
#mt-notes .nt-tagb span { font-family: var(--font-data); color: var(--ink-4); font-weight: 500; }
#mt-notes .nt-tagb:hover { border-color: var(--navy-500); }
#mt-notes .nt-tagb.on { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }
#mt-notes .nt-tagb.on span { color: rgba(255,255,255,.75); }

/* capture */
#mt-notes .nt-desk .nt-capture { margin: 0 0 14px; }
#mt-notes .nt-cap-box { display: flex; align-items: flex-start; gap: 8px; padding: 8px 8px 8px 12px; background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--orange); border-radius: var(--r); box-shadow: var(--sh-1);
  transition: border-color var(--fast), box-shadow var(--fast); }
#mt-notes .nt-cap-box:focus-within { border-color: var(--navy-500); border-left-color: var(--orange);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy-500) 14%, transparent); }
#mt-notes .nt-cap-ic { flex: none; display: inline-flex; color: var(--orange); padding-top: 7px; }
#mt-notes textarea.nt-cap-t { flex: 1 1 auto; min-width: 0; min-height: 32px; max-height: 220px; resize: none; border: 0; outline: 0; background: none;
  font: inherit; font-size: var(--fs-md); line-height: 1.5; color: var(--ink); padding: 5px 0; overflow-y: auto; box-shadow: none; }
#mt-notes textarea.nt-cap-t::placeholder { color: var(--ink-4); }
#mt-notes .nt-cap-kind { flex: none; border: 0; background: transparent; color: var(--ink-3); font: inherit; font-size: var(--fs-xs);
  padding: 6px 4px; border-radius: var(--r-sm); cursor: pointer; width: auto; }
#mt-notes .nt-cap-kind:hover, #mt-notes .nt-cap-kind:focus { background: var(--surface-2); color: var(--ink); }
#mt-notes .nt-cap-go { flex: none; }
#mt-notes .nt-ib { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 30px; height: 30px; padding: 0;
  border: 0; background: none; border-radius: var(--r-sm); color: var(--ink-3); cursor: pointer; }
#mt-notes .nt-ib:hover { background: var(--surface-2); color: var(--ink); }
#mt-notes .nt-ib.on { background: var(--surface); color: var(--nt-acc); box-shadow: var(--sh-1); }
#mt-notes .nt-dup { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; margin-top: 6px; padding: 7px 12px;
  border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-600); border-radius: var(--r-sm); font-size: var(--fs-xs); }
#mt-notes .nt-dup > span { flex: 1 1 200px; min-width: 0; color: var(--ink); font-weight: 600; overflow-wrap: anywhere; }
#mt-notes .nt-dup.flash { animation: ntFlash .5s ease 2; }
@keyframes ntFlash { 50% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-amber) 40%, transparent); } }
#mt-notes .nt-dup-b { border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font: inherit;
  font-size: var(--fs-xs); font-weight: 600; padding: 3px 10px; border-radius: var(--r-sm); }
#mt-notes .nt-dup-b:hover { border-color: var(--navy-500); }
#mt-notes .nt-dup-b.ghost { background: none; border-color: transparent; color: var(--ink-3); }

/* reminders due */
#mt-notes .nt-desk .nt-due { margin: 0 0 14px; padding: 6px 12px 8px; border: 1px solid var(--line); border-left: 3px solid var(--c-amber);
  border-radius: var(--r); background: color-mix(in srgb, var(--c-amber) 6%, var(--surface)); }
#mt-notes .nt-due-h { display: flex; align-items: center; gap: 7px; padding: 4px 0; color: var(--c-amber); font-size: var(--fs-xs); }
#mt-notes .nt-due-h b { color: var(--ink); }
#mt-notes .nt-desk .nt-due-row { padding: 1px 0; }

/* tools: search · kind · sort · layout */
#mt-notes .nt-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
#mt-notes .nt-search-w { display: flex; align-items: center; gap: 7px; flex: 1 1 260px; min-width: 0; padding: 0 10px; height: 34px; margin: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); color: var(--ink-4); }
#mt-notes .nt-search-w:focus-within { border-color: var(--navy-500); box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy-500) 14%, transparent); }
#mt-notes .nt-search-w input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: none; font: inherit; font-size: var(--fs-sm);
  color: var(--ink); padding: 0; height: 100%; box-shadow: none; max-width: none; }
#mt-notes .nt-search-w kbd { font-family: var(--font-data); font-size: var(--fs-3xs); color: var(--ink-4); border: 1px solid var(--line);
  border-radius: 4px; padding: 0 5px; line-height: 1.6; }
#mt-notes .nt-search-w:focus-within kbd { display: none; }
#mt-notes .nt-sel { height: 34px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: var(--r-sm);
  font: inherit; font-size: var(--fs-sm); padding: 0 8px; width: auto; cursor: pointer; }
#mt-notes .nt-viewtog { display: inline-flex; gap: 2px; padding: 2px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); }
#mt-notes .nt-viewtog .nt-ib { width: 28px; height: 28px; }
#mt-notes .nt-active, #mt-notes .nt-stage { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
#mt-notes .nt-stage .nt-side-k { padding: 0 4px 0 0; }
#mt-notes .nt-fchip { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--navy-200); background: var(--navy-50);
  color: var(--navy); border-radius: 999px; padding: 2px 8px 2px 10px; font: inherit; font-size: var(--fs-2xs); font-weight: 600; cursor: pointer; }
#mt-notes .nt-fchip:hover { border-color: var(--navy-500); }
#mt-notes .nt-fclear { border: 0; background: none; color: var(--ink-3); font: inherit; font-size: var(--fs-2xs); cursor: pointer; text-decoration: underline; }

/* groups */
#mt-notes .nt-group { margin: 0 0 18px; }
#mt-notes .nt-group-h { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; padding: 0 2px; font-size: var(--fs-2xs); font-weight: 700;
  letter-spacing: .07em; text-transform: uppercase; color: var(--ink-3); }
#mt-notes .nt-group[data-group="pinned"] .nt-group-h { color: var(--c-amber); }
#mt-notes .nt-group-n { font-family: var(--font-data); font-weight: 500; color: var(--ink-4); letter-spacing: 0; }
#mt-notes .nt-items.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
#mt-notes .nt-items.list { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); overflow: hidden; }

/* one note */
#mt-notes .nt-desk .nt-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 12px 14px 10px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-1); cursor: pointer; transform: none;
  transition: border-color var(--fast), box-shadow var(--fast); }
#mt-notes .nt-desk .nt-card:hover { border-color: var(--navy-200); box-shadow: 0 4px 14px rgba(13,13,34,.07); transform: none; }
#mt-notes .nt-desk .nt-card.pinned { border-color: var(--line); box-shadow: inset 3px 0 0 var(--c-amber), var(--sh-1); }
#mt-notes .nt-item-h { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
#mt-notes .nt-kind { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 6px;
  background: color-mix(in srgb, var(--c-slate) 12%, transparent); color: var(--c-slate); }
#mt-notes .nt-kind.k-sop { background: color-mix(in srgb, var(--orange) 12%, transparent); color: var(--orange-700); }
#mt-notes .nt-kind.k-question { background: color-mix(in srgb, var(--c-violet) 13%, transparent); color: var(--c-violet); }
#mt-notes .nt-kind.k-decision { background: color-mix(in srgb, var(--c-green) 13%, transparent); color: var(--c-green); }
#mt-notes .nt-kind.k-idea { background: color-mix(in srgb, var(--c-amber) 14%, transparent); color: var(--c-amber); }
#mt-notes .nt-kind.k-feedback { background: color-mix(in srgb, var(--c-teal) 13%, transparent); color: var(--c-teal); }
#mt-notes .nt-desk .nt-title { flex: 1 1 auto; min-width: 0; font-size: var(--fs-md); font-weight: 650; line-height: 1.4; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
#mt-notes .nt-prev { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-2); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
#mt-notes .nt-item-f { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: auto; min-width: 0; min-height: 30px; }
#mt-notes .nt-desk .nt-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; flex: 1 1 auto; min-width: 0; }
#mt-notes .nt-c { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 1px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-3); font-size: var(--fs-2xs); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#mt-notes .nt-c.nt-tag { background: none; padding: 1px 3px; }
#mt-notes .nt-c.due { background: var(--warn-bg); color: var(--warn-600); }
#mt-notes .nt-desk .nt-c.nt-share-line { display: inline-flex; flex-wrap: nowrap; margin: 0; background: color-mix(in srgb, var(--c-teal) 11%, transparent);
  color: var(--c-teal); }
#mt-notes .nt-c.nt-st { background: var(--navy-50); color: var(--navy-600); }
#mt-notes .nt-when { flex: none; font-size: var(--fs-2xs); color: var(--ink-4); white-space: nowrap; }
#mt-notes .nt-when b { color: var(--ink-2); font-weight: 600; }
#mt-notes .nt-acts { display: inline-flex; gap: 0; flex: none; }
#mt-notes .nt-acts .nt-ib { width: 28px; height: 28px; }
#mt-notes .nt-desk .nt-pin { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin: -2px -4px 0 0;
  border: 0; background: none; border-radius: 6px; color: var(--ink-4); cursor: pointer; padding: 0; }
#mt-notes .nt-desk .nt-pin:hover { background: var(--surface-2); color: var(--ink); }
#mt-notes .nt-desk .nt-pin.on { color: var(--c-amber); }
@media (hover: hover) {
  #mt-notes .nt-desk .nt-item-f { position: relative; }
  #mt-notes .nt-desk .nt-card .nt-acts { position: absolute; right: -6px; bottom: -4px; padding-left: 10px; border-radius: var(--r-sm);
    background: linear-gradient(90deg, transparent, var(--surface) 10px); }
  #mt-notes .nt-items.list .nt-card:hover .nt-acts { background: linear-gradient(90deg, transparent, var(--surface-2) 10px); }
  #mt-notes .nt-items.list .nt-card .nt-acts { bottom: auto; top: 50%; transform: translateY(-50%); }
  #mt-notes .nt-desk .nt-card .nt-acts, #mt-notes .nt-desk .nt-pin:not(.on) { opacity: 0; transition: opacity var(--fast); }
  #mt-notes .nt-desk .nt-card:hover .nt-acts, #mt-notes .nt-desk .nt-card:focus-within .nt-acts,
  #mt-notes .nt-desk .nt-card:hover .nt-pin, #mt-notes .nt-desk .nt-card:focus-within .nt-pin { opacity: 1; }
}
#mt-notes .nt-desk .nt-badge { display: inline-flex; align-items: center; gap: 3px; flex: none; font-size: var(--fs-3xs); font-weight: 650;
  white-space: nowrap; padding: 1px 7px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-3); margin-top: 2px; }
#mt-notes .nt-desk .nt-badge.from { color: var(--c-teal); border-color: color-mix(in srgb, var(--c-teal) 40%, var(--line)); }
#mt-notes .nt-desk .nt-badge.copied { color: var(--c-violet); border-color: color-mix(in srgb, var(--c-violet) 40%, var(--line)); }
#mt-notes .nt-desk .nt-lock { display: inline-flex; align-items: center; gap: 3px; flex: none; border: 1px solid var(--line); background: var(--surface);
  border-radius: 999px; padding: 1px 7px; font: inherit; font-size: var(--fs-3xs); font-weight: 650; color: var(--ink-3); cursor: pointer; margin-top: 1px; }
#mt-notes .nt-desk .nt-lock.on { color: var(--c-amber); border-color: color-mix(in srgb, var(--c-amber) 45%, var(--line));
  background: color-mix(in srgb, var(--c-amber) 8%, var(--surface)); }

/* list layout: one row per note */
#mt-notes .nt-items.list .nt-card { display: grid; grid-template-columns: minmax(190px, 1.25fr) minmax(0, 1fr) auto; align-items: center;
  column-gap: 16px; row-gap: 4px; padding: 9px 14px; border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line-2); }
#mt-notes .nt-items.list .nt-card:last-child { border-bottom: 0; }
#mt-notes .nt-items.list .nt-card:hover { background: var(--surface-2); box-shadow: none; }
#mt-notes .nt-items.list .nt-card.pinned { box-shadow: inset 3px 0 0 var(--c-amber); }
#mt-notes .nt-items.list .nt-item-h { grid-column: 1; align-items: center; }
#mt-notes .nt-items.list .nt-title { -webkit-line-clamp: 1; font-size: var(--fs-sm); }
#mt-notes .nt-items.list .nt-prev { grid-column: 2; -webkit-line-clamp: 1; font-size: var(--fs-xs); color: var(--ink-3); }
#mt-notes .nt-items.list .nt-item-f { grid-column: 3; flex-wrap: nowrap; margin: 0; min-height: 28px; justify-content: flex-end; }
#mt-notes .nt-items.list .nt-meta { flex: 0 1 auto; flex-wrap: nowrap; overflow: hidden; justify-content: flex-end; max-width: 340px; }
#mt-notes .nt-items.list .nt-c { flex: 0 1 auto; max-width: 200px; }
#mt-notes .nt-items.list .nt-lock:not(.on) { display: none; }
#mt-notes .nt-items.list .nt-c.nt-tag, #mt-notes .nt-items.list .nt-c.nt-cc { display: none; }
#mt-notes .nt-items.list .nt-pin { margin: 0; }
/* the Team / Only-me lock: quiet until hover unless it's Only me */
@media (hover: hover) {
  #mt-notes .nt-desk .nt-lock:not(.on) { opacity: 0; transition: opacity var(--fast); }
  #mt-notes .nt-desk .nt-card:hover .nt-lock, #mt-notes .nt-desk .nt-card:focus-within .nt-lock { opacity: 1; }
}

/* Sent to me */
#mt-notes .nt-desk .nt-from { border: 1px solid var(--line); border-left: 3px solid var(--c-teal); border-radius: var(--r); background: var(--surface);
  margin: 0; overflow: hidden; }
#mt-notes .nt-desk .nt-from-h { display: flex; align-items: center; gap: 8px; padding: 10px 14px; color: var(--c-teal); font-size: var(--fs-sm);
  background: color-mix(in srgb, var(--c-teal) 6%, var(--surface)); border-bottom: 1px solid var(--line-2); }
#mt-notes .nt-desk .nt-from-h b { color: var(--ink); }
#mt-notes .nt-desk .nt-from-list { display: flex; flex-direction: column; padding: 0; }
#mt-notes .nt-in-row { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto auto; align-items: center; gap: 12px; padding: 11px 14px;
  border-bottom: 1px solid var(--line-2); cursor: pointer; }
#mt-notes .nt-in-row:last-child { border-bottom: 0; }
#mt-notes .nt-in-row:hover { background: var(--surface-2); }
#mt-notes .nt-in-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; }
#mt-notes .nt-in-row.unread .nt-in-dot { background: var(--c-teal); }
#mt-notes .nt-in-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
#mt-notes .nt-in-t { font-size: var(--fs-sm); font-weight: 600; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mt-notes .nt-in-row.unread .nt-in-t { color: var(--ink); font-weight: 700; }
#mt-notes .nt-in-p { font-size: var(--fs-xs); color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mt-notes .nt-in-m { font-size: var(--fs-2xs); color: var(--ink-3); white-space: nowrap; }
#mt-notes .nt-mini { display: inline-flex; align-items: center; gap: 5px; flex: none; border: 1px solid var(--line); background: var(--surface);
  color: var(--ink-2); border-radius: var(--r-sm); padding: 4px 10px; font: inherit; font-size: var(--fs-xs); font-weight: 600; cursor: pointer; white-space: nowrap; }
#mt-notes .nt-mini:hover { border-color: var(--navy-500); color: var(--ink); }
#mt-notes .nt-mini.on { color: var(--good-600); border-color: var(--good-line); background: var(--good-bg); }

/* Aamir's notes (read-only for teammates) */
#mt-notes .nt-desk .nt-ro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
#mt-notes .nt-desk .nt-ro { cursor: default; box-shadow: inset 3px 0 0 var(--c-navy), var(--sh-1); }
#mt-notes .nt-desk .nt-ro-body { margin: 0; font-size: var(--fs-sm); line-height: 1.5; color: var(--ink-2); white-space: pre-line;
  max-height: 9.5em; overflow: hidden; overflow-wrap: anywhere; }

/* empty + undo */
#mt-notes .nt-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 42px 16px; border: 1px dashed var(--line);
  border-radius: var(--r); color: var(--ink-4); text-align: center; background: var(--bg-2); }
#mt-notes .nt-empty b { color: var(--ink-3); font-size: var(--fs-sm); font-weight: 600; }
#mt-notes .nt-undo { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px;
  max-width: calc(100vw - 32px); padding: 9px 10px 9px 14px; background: var(--navy); color: #fff; border-radius: 999px;
  box-shadow: 0 8px 24px rgba(13,13,34,.25); font-size: var(--fs-sm); }
#mt-notes .nt-undo span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#mt-notes .nt-undo button { flex: none; border: 0; background: rgba(255,255,255,.14); color: #fff; font: inherit; font-weight: 700; font-size: var(--fs-xs);
  padding: 4px 12px; border-radius: 999px; cursor: pointer; }
#mt-notes .nt-undo button:hover { background: rgba(255,255,255,.26); }

/* editor touches */
#mt-notes .nt-editor .wh-kind { display: inline-flex; align-items: center; gap: 5px; }
#mt-notes .nt-editor .wh-pin-l { display: flex; align-items: center; gap: 6px; }
#mt-notes .nt-editor .nt-e-share { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: var(--fs-xs); color: var(--ink-3); margin: 6px 0; }

@media (max-width: 1100px) {
  #mt-notes .nt-layout { grid-template-columns: 184px minmax(0, 1fr); gap: 16px; }
}
@media (max-width: 860px) {
  #mt-notes .nt-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  #mt-notes .nt-side { position: static; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  #mt-notes .nt-side-sec { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; }
  #mt-notes .nt-side-k { display: none; }
  #mt-notes .nt-side-b { width: auto; max-width: 100%; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); font-size: var(--fs-xs); }
  #mt-notes .nt-side-b.on { box-shadow: none; border-color: var(--navy-200); }
  #mt-notes .nt-side-foot { border-top: 0; padding-top: 0; }
  #mt-notes .nt-side-tags { padding: 0; }
}
@media (max-width: 640px) {
  #mt-notes .nt-scope { display: flex; width: 100%; }
  #mt-notes .nt-scope-b { flex: 1 1 0; justify-content: center; padding: 6px; gap: 4px; font-size: var(--fs-xs); }
  #mt-notes .nt-scope-b span:not(.nt-scope-n) { overflow: hidden; text-overflow: ellipsis; }
  #mt-notes .nt-search-w { flex-basis: 100%; }
  #mt-notes .nt-sel { flex: 1 1 0; min-width: 0; }
  #mt-notes .nt-cap-box { flex-wrap: wrap; }
  #mt-notes textarea.nt-cap-t { flex-basis: calc(100% - 30px); }
  #mt-notes .nt-cap-kind { margin-left: 22px; }
  #mt-notes .nt-cap-go { margin-left: auto; }
  #mt-notes .nt-items.grid { grid-template-columns: minmax(0, 1fr); }
  #mt-notes .nt-items.list .nt-card { grid-template-columns: minmax(0, 1fr); }
  #mt-notes .nt-items.list .nt-item-h, #mt-notes .nt-items.list .nt-prev, #mt-notes .nt-items.list .nt-item-f { grid-column: 1; }
  #mt-notes .nt-items.list .nt-item-f { flex-wrap: wrap; justify-content: flex-start; }
  #mt-notes .nt-items.list .nt-meta { justify-content: flex-start; flex-wrap: wrap; max-width: 100%; }
  #mt-notes .nt-in-row { grid-template-columns: 8px minmax(0, 1fr); row-gap: 6px; }
  #mt-notes .nt-in-m { grid-column: 2; }
  #mt-notes .nt-in-row .nt-mini { grid-column: 2; justify-self: start; }
  #mt-notes .nt-desk .nt-ro-grid { grid-template-columns: minmax(0, 1fr); }
  #mt-notes .nt-acts, #mt-notes .nt-desk .nt-pin { opacity: 1 !important; }
  #mt-notes .nt-desk .nt-card .nt-acts, #mt-notes .nt-items.list .nt-card .nt-acts { position: static; background: none; transform: none; padding: 0; margin-left: auto; }
}

/* v29.6 — Notes: one "Turn into" menu on each card */
#mt-notes .nt-turn { position: relative; display: inline-block; }
#mt-notes .nt-turn > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; width: auto; padding: 0 8px; font-size: 12px; }
#mt-notes .nt-turn > summary::-webkit-details-marker { display: none; }
#mt-notes .nt-turn-m { position: absolute; right: 0; bottom: calc(100% + 4px); z-index: 30; min-width: 190px; display: grid; padding: 4px;
  background: var(--surface, #fff); border: 1px solid var(--line, #d0d7de); border-radius: var(--r-sm, 6px); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
#mt-notes .nt-turn-o { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; background: transparent; color: inherit; text-align: left; border-radius: 4px; cursor: pointer; font-size: 13px; }
#mt-notes .nt-turn-o:hover, #mt-notes .nt-turn-o:focus-visible { background: var(--soft, rgba(127,127,127,.12)); }
/* v29.7 — tag a note as you write it; labels for what it became */
#mt-notes .nt-cap-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 6px 0 2px; }
#mt-notes .nt-cap-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; font-size: 12px; border-radius: 999px;
  border: 1px solid var(--line, #d0d7de); background: transparent; color: inherit; cursor: pointer; }
#mt-notes .nt-cap-tag.on { background: var(--accent, #2f6feb); border-color: var(--accent, #2f6feb); color: #fff; }
#mt-notes .nt-keep, #mt-notes .nt-turn-keep { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted, #6e7781); margin-left: auto; cursor: pointer; }
#mt-notes .nt-turn-keep { margin: 4px 6px 2px; border-top: 1px solid var(--line, #d0d7de); padding-top: 6px; }
#mt-notes .nt-turn-o.done { opacity: .6; cursor: default; }
#mt-notes .nt-routed { color: var(--accent, #2f6feb); }
#mt-notes .nt-route-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0; }
