/* ============================================================
   ScalAct Work Tracker — Design System
   Dependency-free. Professional consulting aesthetic.
   ============================================================ */

:root {
  /* ScalAct 3-colour system — logo black + logo green + one consistent grey (charts keep their own hues) */
  --ink: #1E1E1E;         /* logo black — primary text, buttons, sidebar, emphasis, ATTENTION */
  --ink-2: #3A3A38;       /* secondary dark text, table cells */
  --muted: #6E6E6B;       /* grey — labels, meta, captions, neutral status */
  --faint: #6E6E6B;       /* grey — disabled, table-header text, placeholders. Same value as --muted: no grey TEXT is lighter than 4.5:1 on white (was #9C9C98, 2.76:1) */
  --line: #E4E3DF;        /* grey borders */
  --line-2: #EFEEEA;      /* grey inner dividers, track fills, neutral badge bg */
  --bg: #F5F5F2;          /* app canvas (neutral grey) */
  --bg-2: #FAFAF8;        /* topbar, hover rows */
  --card: #FFFFFF;
  --sidebar: #1E1E1E;     /* logo black */

  --green: #70B94E;       /* logo green — accent, active nav, positive/done, progress fills */
  --green-ink: #357320;   /* darker green for text, and the fill behind white text — 5.79:1 on white, 5.0:1 on every grey surface (was #357320, 3.53:1) */
  --green-tint: #EAF4E1;  /* soft green badge/chip bg */

  /* Status is now monochrome: attention = black, neutral = grey. (Charts/graphs keep full colour.) */
  --amber: var(--ink);     --amber-ink: #FFFFFF;      --amber-tint: var(--ink);      /* WIP / watch / attention → solid black */
  --red: var(--ink);       --red-ink: #FFFFFF;        --red-tint: var(--ink);        /* overdue / risk → solid black */
  --blue: var(--muted);    --blue-ink: var(--muted);  --blue-tint: var(--line-2);    /* info / planned → neutral grey */

  --font: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  --shadow-sm: 0 1px 2px rgba(43,42,40,.05);
  --shadow: 0 2px 6px rgba(43,42,40,.07), 0 1px 2px rgba(43,42,40,.04);
  --shadow-md: 0 6px 16px rgba(43,42,40,.10);
  --shadow-lg: 0 16px 40px rgba(43,42,40,.16);
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --sidebar-w: 256px;

  /* ---- legacy aliases so existing rules re-theme automatically ---- */
  --navy-900: var(--sidebar); --navy-800: var(--ink); --navy-700: var(--ink-2); --navy-600: #5c5951;
  --slate-500: var(--muted); --slate-400: var(--faint); --slate-300: #C9C6BE;
  --slate-200: var(--line); --slate-100: var(--line-2); --slate-50: var(--bg-2);
  --brand: var(--ink); --brand-dark: #1c1b19; --brand-soft: var(--green-tint);
  --accent: var(--green); --accent-dark: var(--green-ink); --accent-soft: var(--green-tint);
  --teal: var(--blue); --teal-soft: var(--blue-tint);
  --amber-soft: var(--amber-tint); --green-soft: var(--green-tint);
  --red-soft: var(--red-tint); --sky: var(--blue); --sky-soft: var(--blue-tint);
  --border: var(--line); --text: var(--ink); --text-soft: var(--ink-2); --text-faint: var(--muted);
  --radius-lg2: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

#app { display: flex; height: 100vh; overflow: hidden; }

/* ---------- Nav: slim icon rail + flyout sub-modules (keeps the work window full-width) ---------- */
.navshell { flex-shrink: 0; width: 72px; height: 100vh; }
.railbar { width: 72px; height: 100%; background: var(--ink); display: flex; flex-direction: column; align-items: center; padding: 14px 0 12px; }
.rail-logo { width: 46px; height: auto; cursor: pointer; margin-bottom: 16px; }
/* A client signed in: their logo under ScalAct's, on a white chip (the rail is dark). The box itself is LOGO_RAIL in app.js. */
.rail-client { display: flex; background: #fff; border-radius: 9px; padding: 3px; margin: -6px 0 16px; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.rail-client[hidden] { display: none; }
/* On a phone the rail is hidden, so the client's home carries the ScalAct × client lockup at the top instead. */
.phone-brand { display: none; }
@media (max-width: 640px) { .phone-brand { display: block; } }
.rail-groups { flex: 1; display: flex; flex-direction: column; gap: 7px; align-items: center; width: 100%; }
.rail-btn { position: relative; width: 48px; height: 48px; border-radius: 13px; border: none; background: transparent; color: #b7b7b3; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .12s, color .12s; }
.rail-btn svg { width: 21px; height: 21px; }
.rail-btn:hover { background: rgba(255,255,255,.09); color: #fff; }
.rail-btn.active { background: var(--green); color: #1E1E1E; box-shadow: 0 3px 12px rgba(112,185,78,.4); }
.rail-tip { position: absolute; left: 58px; top: 50%; transform: translateY(-50%); background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 9px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; box-shadow: var(--shadow-lg); z-index: 60; }
.rail-btn:hover .rail-tip { opacity: 1; }
/* a rail label never sits over an open menu (2026-10-06) */
.navshell.flyout-open .rail-btn .rail-tip { opacity: 0; }
.rail-foot { margin-top: auto; }
.rail-reset { width: 40px; height: 40px; border-radius: 11px; border: none; background: transparent; color: #85857f; font-size: 18px; cursor: pointer; }
.rail-reset:hover { background: rgba(255,255,255,.08); color: #fff; }

.subnav { position: fixed; left: 72px; top: 0; bottom: 0; width: 236px; background: #fff; border-right: 1px solid var(--border); box-shadow: 10px 0 30px rgba(30,30,30,.09); padding: 18px 12px; overflow-y: auto; z-index: 45; transform: translateX(-16px); opacity: 0; visibility: hidden; transition: transform .16s ease, opacity .16s ease, visibility .16s; }
.subnav.open { transform: none; opacity: 1; visibility: visible; }
.subnav-head { padding: 4px 10px 14px; }
.subnav-group { font-size: 11px; text-transform: uppercase; letter-spacing: 1.4px; color: var(--green-ink); font-weight: 800; }
.subnav-desc { font-size: 11.5px; color: var(--muted); margin-top: 4px; line-height: 1.4; }
.subnav-item { display: flex; align-items: center; gap: 11px; padding: 10px 11px; border-radius: 10px; color: var(--ink); font-size: 13.5px; font-weight: 600; cursor: pointer; text-decoration: none; margin-bottom: 2px; }
.subnav-search { width: 100%; margin: 0 0 8px; }
.subnav-item svg { width: 18px; height: 18px; color: var(--muted); flex-shrink: 0; }
.subnav-item:hover { background: var(--bg); }
.subnav-item.active { background: var(--green-tint); color: var(--green-ink); }
.subnav-item.active svg { color: var(--green-ink); }
.subnav-scrim { display: none; }
.tabbar { display: none; }

/* ---------- Sidebar ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: var(--navy-900);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--navy-800);
}
.brand {
  display: flex; align-items: center; gap: 12px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.brand-logo { width: 132px; height: auto; display: block; }
.brand-sub { color: var(--slate-400); font-size: 10px; text-transform: uppercase; letter-spacing: 1.6px; margin-top: 7px; display: block; }

.nav { flex: 1; overflow-y: auto; padding: 14px 12px; }
.nav-group-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1.1px;
  color: var(--slate-500); font-weight: 700;
  padding: 16px 12px 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 8px;
  color: #cbd5e1; font-size: 13.5px; font-weight: 500;
  cursor: pointer; user-select: none;
  transition: background .12s, color .12s;
  margin-bottom: 1px;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-item.active { background: var(--green); color: #1E1E1E; font-weight: 700; box-shadow: 0 2px 10px rgba(112,185,78,.32); }
.nav-item.active .ni-icon { color: #1E1E1E; opacity: 1; }
.ni-icon { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: .85; flex-shrink: 0; }
.ni-icon svg { width: 17px; height: 17px; }

.sidebar-footer { padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.06); }
.btn-text { background: none; border: none; color: var(--slate-400); cursor: pointer; font-size: 12px; padding: 4px 0; }
.btn-text:hover { color: #fff; }
.version { color: var(--slate-500); font-size: 11px; margin-top: 8px; }

/* ---------- Main ---------- */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: 64px; flex-shrink: 0;
  background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 16px;
  padding: 0 24px;
}
.hamburger { display: none; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--navy-700); }
.topbar-title { font-size: 18px; font-weight: 700; color: var(--navy-900); flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 18px; }

.role-switch { display: flex; align-items: center; gap: 8px; }
.role-switch label { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.role-switch select {
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px;
  font-size: 13px; color: var(--navy-800); background: var(--slate-50); cursor: pointer; font-weight: 500;
}

.user-chip { display: flex; align-items: center; gap: 10px; padding-left: 16px; border-left: 1px solid var(--border); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, #2b3038, var(--accent));
  color: #fff; font-weight: 700; font-size: 13px;
  display: grid; place-items: center;
}
.user-meta { display: flex; flex-direction: column; line-height: 1.2; }
.user-name { font-weight: 600; font-size: 13.5px; color: var(--navy-800); }
.user-role { font-size: 11.5px; color: var(--text-faint); }

.content { flex: 1; overflow-y: auto; padding: 22px 32px 60px; }

/* Account lives at the BOTTOM of the left rail (the reset sits above it). */
.rail-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.rail-acct { background: transparent; border: none; padding: 0; cursor: pointer; border-radius: 50%; transition: transform .12s; }
.rail-acct:hover { transform: scale(1.07); }
.rail-acct .avatar { width: 40px; height: 40px; font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.search-fab { position: fixed; right: 14px; top: 10px; z-index: 70; width: 40px; height: 40px; display: none; align-items: center; justify-content: center; border-radius: 50%; border: 1px solid var(--line); background: var(--card, #fff); color: var(--ink); cursor: pointer; box-shadow: 0 2px 8px rgba(30,30,30,.12); }
.acct-mobile { display: none; }   /* desktop: account is in the rail; only shown on phones (rail hidden) */
/* Account menu — pops out from the bottom-left, just past the rail. */
.util-menu { position: fixed; left: 64px; bottom: 16px; width: 226px; background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg, 0 18px 50px rgba(30,30,30,.22)); padding: 12px; z-index: 130; }
.um-head { padding: 2px 6px 10px; border-bottom: 1px solid var(--line, #eee); margin-bottom: 6px; }
.um-name { font-weight: 700; font-size: 14px; color: var(--navy-900, #1E1E1E); }
.um-role { font-size: 12px; color: var(--muted, #6E6E6B); margin-top: 1px; }
.util-menu .role-switch { flex-direction: column; align-items: flex-start; gap: 5px; padding: 8px 6px; }
.util-menu .role-switch select { width: 100%; }
.um-item { display: block; width: 100%; text-align: left; background: none; border: none; padding: 9px 6px; cursor: pointer; font: inherit; font-size: 13.5px; color: var(--navy-800, #2B2A28); border-radius: 8px; }
.um-item:hover { background: var(--bg-2, #FAFAF8); }
.um-item.um-cloud { display: none; }   /* password and session actions exist only on the live app — applyCloudChrome shows them */

/* Phone: the left rail is hidden, so show a small floating avatar top-right; the menu drops below it. */
@media (max-width: 640px) {
  .search-fab { display: inline-flex; right: 54px; top: 8px; width: 36px; height: 36px; }
  .acct-mobile { display: block; position: fixed; right: 10px; top: 8px; z-index: 70; background: transparent; border: none; padding: 0; cursor: pointer; }
  .acct-mobile .avatar { width: 36px; height: 36px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
  .util-menu { left: auto; right: 10px; top: 52px; bottom: auto; }
  .content { padding-top: 14px; }
}

/* ---------- Page header ---------- */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; }
.page-head .subtitle { color: var(--text-soft); font-size: 13.5px; margin-top: 4px; max-width: 640px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 16px; font-size: 13px; font-weight: 600; min-height: 38px;
  cursor: pointer; transition: all .14s; white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-green { background: var(--green); color: #1E1E1E; box-shadow: var(--shadow-sm); }
.btn-green:hover { filter: brightness(.96); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--slate-300); }
.btn-danger { background: var(--red); color: #fff; }
.btn-danger:hover { filter: brightness(.93); }
.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; min-height: 30px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px){ .grid-4 { grid-template-columns: repeat(2,1fr);} .grid-3{grid-template-columns:repeat(2,1fr);} }
@media (max-width: 720px){ .grid-2,.grid-3,.grid-4 { grid-template-columns: minmax(0, 1fr);} }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 20px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title { font-size: 15px; font-weight: 700; color: var(--navy-900); }
.card-sub { font-size: 12px; color: var(--text-faint); margin-top: 2px; }
.cell-sub { font-size: 12px; color: var(--text-faint); }
.cell-strong { font-weight: 600; color: var(--ink); }

/* ---------- Stat cards ---------- */
.stat {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.stat .stat-label { font-size: 12px; color: var(--text-soft); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
/* A figure card is a button (sd() lists what makes the number; the rest scroll to their list): pointer, a darker edge, a chevron. */
.stat[data-sd], .stat[data-sc] { cursor: pointer; transition: border-color .12s ease, box-shadow .12s ease; }
.stat[data-sd]:hover, .stat[data-sc]:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.stat[data-sd]:focus-visible, .stat[data-sc]:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.stat[data-sd] .stat-label::after, .stat[data-sc] .stat-label::after { content: " ›"; color: var(--faint); font-weight: 700; }
.stat-target { outline: 2px solid var(--green); outline-offset: 3px; border-radius: var(--radius); transition: outline-color .4s ease; }
.stat .stat-value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 27px; font-weight: 700; color: var(--ink); margin-top: 6px; letter-spacing: -.02em; }
.stat .stat-meta { font-size: 12px; margin-top: 6px; color: var(--text-faint); }
.stat .stat-icon { display: none; }  /* no emoji per DESIGN_RULES */
.empty .emoji { display: none; }
.stat.accent-brand { border-top: 3px solid var(--brand); }
.stat.accent-teal { border-top: 3px solid var(--teal); }
.stat.accent-amber { border-top: 3px solid var(--amber); }
.stat.accent-green { border-top: 3px solid var(--green); }
.stat.accent-red { border-top: 3px solid var(--red); }
.stat.accent-sky { border-top: 3px solid var(--sky); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  text-align: left; padding: 12px 16px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--faint); font-weight: 700; background: var(--bg-2);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--slate-100); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--slate-50); }
td .cell-strong { font-weight: 600; color: var(--navy-800); }
td .cell-sub { font-size: 12px; color: var(--text-faint); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .2px; white-space: nowrap;
}
.badge-gray { background: var(--line-2); color: var(--muted); }
.badge-brand { background: var(--green-tint); color: var(--green-ink); }
.badge-teal { background: var(--blue-tint); color: var(--blue-ink); }
.badge-amber { background: var(--amber-tint); color: var(--amber-ink); }
.badge-green { background: var(--green-tint); color: var(--green-ink); }
.badge-red { background: var(--red-tint); color: var(--red-ink); }
.badge-sky { background: var(--blue-tint); color: var(--blue-ink); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* mono tabular numbers for money / metrics / ids / scores (DESIGN_RULES §3) */
.mono, .score-pill, .dim-score, .range-val, .mod-num, .step-dot { font-family: var(--mono); font-variant-numeric: tabular-nums; }

/* ---------- Forms ---------- */
.form-grid { display: grid; gap: 14px; }
.form-grid.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width:600px){ .form-grid.cols-2 { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span-2 { grid-column: 1 / -1; }
.field label { font-size: 12px; font-weight: 600; color: var(--navy-700); }
.field .hint { font-size: 11px; color: var(--text-faint); font-weight: 400; }
input, select, textarea {
  font-family: inherit; font-size: 13.5px; color: var(--text);
  border: 1px solid var(--slate-300); border-radius: 8px; padding: 9px 11px;
  background: #fff; transition: border-color .12s, box-shadow .12s; width: 100%;
}
/* ONE keyboard focus ring for every control that has none of its own (audit 2026-11-23); dark surfaces get a white one. */
:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.railbar :focus-visible, .tabbar :focus-visible, .subnav-scrim :focus-visible { outline-color: #fff; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
.field-bad > input, .field-bad > select, .field-bad > textarea { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.field-bad > label { color: var(--ink); font-weight: 800; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green-ink); box-shadow: 0 0 0 3px rgba(95,170,51,.18); }
textarea { resize: vertical; min-height: 72px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type=range] { flex: 1; }
.range-val { font-weight: 800; font-size: 18px; color: var(--brand); min-width: 42px; text-align: right; }

/* ---------- Misc layout ---------- */
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-6 { gap: 6px; } .gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-16 { gap: 16px; }
.items-center { align-items: center; }
.mt-8{margin-top:8px;} .mt-12{margin-top:12px;} .mt-16{margin-top:16px;} .mt-20{margin-top:20px;} .mt-24{margin-top:24px;}
.mb-8{margin-bottom:8px;} .mb-12{margin-bottom:12px;} .mb-16{margin-bottom:16px;}
.text-soft { color: var(--text-soft); }
.text-faint { color: var(--text-faint); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: var(--text-soft); margin: 6px 0 12px; }

/* progress bar */
.progress { height: 7px; border-radius: 99px; background: var(--slate-200); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.progress.green > span { background: var(--green); }
.progress.amber > span { background: var(--amber); }
.progress.teal > span { background: var(--teal); }
/* score tones — green = strong, grey = middling, black = needs attention (§8: hue lives only inside chart SVGs; A3 ux:F10) */
.progress.gray > span { background: var(--muted); }
.progress.ink > span { background: var(--ink); }

/* pills/filters */
.filter-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.pill {
  padding: 6px 13px; border-radius: 999px; border: 1px solid var(--border);
  background: #fff; font-size: 12.5px; font-weight: 600; color: var(--text-soft); cursor: pointer;
}
.pill:hover { border-color: var(--slate-300); }
.pill.active { background: var(--navy-900); color: #fff; border-color: var(--navy-900); }
.search-input { max-width: 260px; }

/* empty state */
.empty { text-align: center; padding: 48px 20px; color: var(--text-faint); }
.empty .emoji { font-size: 34px; opacity: .5; display: block; margin-bottom: 10px; }

/* list rows */
.list-row {
  display: flex; align-items: center; gap: 14px; padding: 13px 16px;
  border-bottom: 1px solid var(--slate-100);
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: var(--slate-50); }

/* checkbox round */
.checkround {
  width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--slate-300);
  cursor: pointer; flex-shrink: 0; display: grid; place-items: center; transition: all .12s;
}
.checkround:hover { border-color: var(--brand); }
.checkround.done { background: var(--green); border-color: var(--green); color: #1E1E1E; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.5);
  display: grid; place-items: center; z-index: 100; padding: 20px;
  backdrop-filter: blur(2px);
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; max-height: 88vh; display: flex; flex-direction: column;
  animation: pop .16s ease-out;
  /* A grid item takes its minimum width from its content, so a wide table inside a pop-up pushed the pop-up past
     a phone's edge. With this, the pop-up keeps to the screen and the table scrolls inside its own .table-wrap. */
  min-width: 0;
}
.modal.wide { max-width: 760px; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; font-weight: 700; color: var(--navy-900); }
.modal-close { background: none; border: none; font-size: 16px; cursor: pointer; color: var(--text-faint); padding: 4px; border-radius: 6px; }
.modal-close:hover { background: var(--slate-100); color: var(--navy-800); }
.modal-body { padding: 22px; overflow-y: auto; }
/* A row of actions WRAPS — it never overflows. With flex-end and no wrap, buttons that did not fit were pushed out of
   the LEFT edge, where nothing can scroll to them (the profile's "Edit details" was cut in half, 2026-10-06). The
   second justify-content is a backstop for one label wider than the row: "safe" sends it right, where it can be
   scrolled to; a browser that does not know "safe" keeps flex-end. openModal also widens a pop-up on a wide screen
   when its footer would need two rows, so a desktop footer keeps its one-row look. */
.modal-footer { display: flex; flex-wrap: wrap; justify-content: flex-end; justify-content: safe flex-end; gap: 10px; margin-top: 20px; }

/* ---------- Toast ---------- */
.toast-host { position: fixed; bottom: 24px; right: 24px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--navy-900); color: #fff; padding: 12px 18px; border-radius: 10px;
  box-shadow: var(--shadow-lg); font-size: 13px; font-weight: 500; min-width: 220px;
  display: flex; align-items: center; gap: 10px; animation: slideIn .2s ease-out;
}
/* §8 monochrome status: success = brand green, error/attention = black (never off-palette red/green). */
.toast.success { background: var(--green-ink, #357320); }
.toast.error { background: var(--ink, #1E1E1E); }
@keyframes slideIn { from { transform: translateX(20px); opacity: 0; } to { transform: none; opacity: 1; } }

/* timeline */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content:''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--slate-200); }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before { content:''; position: absolute; left: -20px; top: 4px; width: 11px; height: 11px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.tl-item .tl-time { font-size: 11px; color: var(--text-faint); }
.tl-item .tl-text { font-size: 13px; color: var(--navy-700); }

/* score ring inline */
.score-pill { display:inline-flex; align-items:center; justify-content:center; font-weight:800; border-radius: 8px; padding: 4px 10px; font-size: 15px; }
.score-pill.tone-green { background: var(--green-tint); color: var(--green-ink); }
.score-pill.tone-gray { background: var(--line-2); color: var(--muted); }
.score-pill.tone-ink { background: var(--ink); color: #fff; }
.dim-score.tone-green { color: var(--green-ink); }
.dim-score.tone-gray { color: var(--muted); }
.dim-score.tone-ink { color: var(--ink); }
/* the Monthly Review's section jump chips (on its dark header card) */
.mr-jump { border: 0; border-radius: 99px; padding: 3px 11px; font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; background: rgba(255,255,255,.12); color: #dcefca; }
.mr-jump:hover { background: rgba(255,255,255,.22); }
.mr-jump:focus-visible { outline: 2px solid #9ed27a; outline-offset: 2px; }
/* controls tagged no-print (the Monthly Review's jump chips, "Capture rating") are not part of the page when it is printed */
@media print { .no-print { display: none !important; } }

/* ---------- Routines (habit tracker) ---------- */
.routine-col { display:flex; flex-direction:column; }
.routine-list { margin: 10px 0 4px; }
.routine-row { display:flex; align-items:center; gap:10px; padding:9px 2px; border-bottom:1px solid var(--line); }
.routine-row:last-child { border-bottom:none; }
.routine-title { flex:1; min-width:0; font-size:13.5px; font-weight:600; color:var(--ink); overflow-wrap:anywhere; }
.routine-title.is-done { color:var(--muted); text-decoration:line-through; }
.streak-pill { display:inline-flex; align-items:center; gap:3px; background:var(--green-tint); color:var(--green-ink); font-weight:800; font-size:12px; padding:3px 8px; border-radius:99px; flex-shrink:0; font-variant-numeric:tabular-nums; }
.streak-pill svg { width:13px; height:13px; }
.routine-del { background:none; border:none; color:var(--faint); cursor:pointer; font-size:14px; line-height:1; padding:4px 6px; border-radius:7px; flex-shrink:0; }
.routine-del:hover { color:var(--ink); background:var(--bg); }
.routine-add { display:flex; gap:8px; margin-top:auto; padding-top:10px; border-top:1px dashed var(--line); }
.routine-add input { flex:1 1 auto; min-width:0; width:auto; }
.routine-add .btn { flex:0 0 auto; }
/* checklist overdue markers (attention = black, always paired with the word "Overdue") */
.routine-row.is-late { box-shadow:inset 3px 0 0 var(--ink); padding-left:8px; }
.chk-late { display:inline-flex; align-items:center; background:var(--ink); color:#fff; font-size:10.5px; font-weight:800; letter-spacing:.3px; text-transform:uppercase; padding:2px 7px; border-radius:99px; flex-shrink:0; }
/* Team checklists (2026-09-22): a read-only tick mark — not a switch, because nothing here can be changed. */
.chk-mark { width:20px; height:20px; border-radius:50%; border:2px solid var(--line); background:var(--card); flex-shrink:0; display:inline-flex; align-items:center; justify-content:center; color:#fff; }
.chk-mark.is-done { background:var(--green); border-color:var(--green); }
.pill .chk-flag { margin-left:2px; font-size:11px; color:var(--muted); font-weight:700; }
.pill .chk-flag.is-late { color:var(--ink); }
.pill.active .chk-flag, .pill.active .chk-flag.is-late { color:#fff; }
/* onboarding WhatsApp tick */
.ob-tick { display:inline-flex; align-items:center; gap:8px; font-size:13.5px; font-weight:600; cursor:pointer; }
.ob-tick input { width:auto; }

/* ---------- Leads ---------- */
.lead-meta { display:flex; flex-wrap:wrap; gap:6px 14px; align-items:center; margin:10px 0 0; font-size:12px; color:var(--muted); }
.lead-meta span { display:inline-flex; align-items:center; gap:5px; }
.lead-meta svg { color:var(--faint); }
.lead-voc { margin-top:10px; font-size:13px; font-style:italic; color:var(--ink); background:var(--bg); border-left:3px solid var(--green); padding:8px 12px; border-radius:0 8px 8px 0; }
.lead-chals-preview { margin-top:10px; }
.lc-line { font-size:12.5px; color:var(--ink); padding:2px 0; overflow-wrap:anywhere; }
/* challenge editor rows */
.lead-chal { border:1px solid var(--line); border-radius:10px; padding:10px; margin-bottom:8px; background:var(--bg); }
.lead-chal-top { display:flex; gap:8px; align-items:center; }
.lead-chal-top .lc-txt { flex:1 1 auto; min-width:0; width:auto; }
.lead-chal-fw { margin-top:8px; }
.lead-chal-fw select { width:100%; }
.fw-chips { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.fw-chip { display:inline-flex; align-items:center; gap:6px; background:var(--green-tint); color:var(--green-ink); font-size:12px; font-weight:600; padding:4px 9px; border-radius:99px; }
.fw-x { cursor:pointer; font-size:11px; opacity:.7; }
.fw-x:hover { opacity:1; }
.btn-x { flex:0 0 auto; background:none; border:none; color:var(--faint); cursor:pointer; font-size:14px; padding:4px 7px; border-radius:7px; }
.btn-x:hover { color:var(--ink); background:var(--line); }
/* support chips (documents / training / implementation suggested against a challenge) — grey, not green */
.sup-chip { background:var(--bg); color:var(--ink); border:1px solid var(--line); }
.sup-chip .sup-t { font-size:9.5px; text-transform:uppercase; letter-spacing:.4px; color:var(--muted); font-weight:700; }
/* inline lead-status select in the leads table */
.lead-status-sel { font-size:12px; font-weight:600; border-radius:99px; padding:3px 8px; border:1px solid var(--line); background:#fff; cursor:pointer; width:auto; }
.lead-status-sel.badge-green { background:var(--green-tint); color:var(--green-ink); border-color:var(--green); }
.lead-status-sel.badge-amber { background:var(--bg); color:#1E1E1E; border-color:var(--line); }
.lead-status-sel.badge-gray { background:var(--bg); color:var(--muted); }
/* Lead category (Hot/Warm/Cold). Monochrome per section 8 — Hot is BLACK (= attention), never red. */
.lead-cat-sel { color:var(--muted); }
.lead-cat-sel.is-hot { background:var(--ink); color:#fff; border-color:var(--ink); }
/* two-workflow guidance strip */
.wf-card { background:var(--bg); }
.wf-row { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin-top:8px; }
.wf-tag { flex:0 0 auto; font-size:10.5px; text-transform:uppercase; letter-spacing:.5px; font-weight:800; color:var(--green-ink); min-width:104px; }
.wf-step { display:inline-flex; align-items:center; background:#fff; border:1px solid var(--line); border-radius:99px; padding:4px 11px; font-size:12px; font-weight:600; color:var(--ink); }
.wf-arrow { color:var(--faint); font-weight:700; }
@media (max-width:640px){ .wf-tag { min-width:100%; margin-bottom:2px; } }
/* weekly pipeline-review nudge (attention = black left accent) */
.pipe-banner { display:flex; align-items:flex-start; gap:8px; background:var(--bg); border:1px solid var(--line); border-left:3px solid #1E1E1E; border-radius:12px; padding:11px 14px; font-size:13px; color:var(--ink); }
.pipe-banner svg { color:#1E1E1E; flex:0 0 auto; margin-top:1px; }
/* finance donut + legend (client income / category expense) */
.fin-pie-wrap { display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin-top:8px; }
.fin-legend { flex:1 1 190px; min-width:0; }
.fin-leg { display:flex; align-items:center; gap:8px; padding:3px 0; font-size:12.5px; }
.fin-leg .dot { width:9px; height:9px; border-radius:3px; flex:0 0 auto; }
.fin-leg-l { flex:1 1 auto; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ink); }
.fin-leg-v { flex:0 0 auto; color:var(--muted); font-size:11.5px; }
@media (max-width:560px){ .fin-pie-wrap { justify-content:center; } }

/* ---------- Data Asset Management ---------- */
/* Module-level tabs (Data Asset Management) — an underline tab bar, visually PRIMARY so it reads clearly
   above the segmented sub-view toggle below it. */
.asset-tabs { flex-wrap:wrap; gap:2px; align-items:flex-end; border-bottom:2px solid var(--line); }
.asset-tabs .pill {
  display:inline-flex; align-items:center; gap:6px;
  border:none; background:transparent; border-radius:0;
  padding:9px 14px; font-size:13px; font-weight:700; color:var(--muted);
  border-bottom:2.5px solid transparent; margin-bottom:-2px;
}
.asset-tabs .pill svg { width:13px; height:13px; }
.asset-tabs .pill:hover { color:var(--ink); border-color:transparent; }
.asset-tabs .pill.active, .asset-tabs .pill.active:hover { background:transparent; color:var(--ink); border-bottom-color:var(--green); }

/* Sub-view toggle (Client Matrix / Library) — a compact segmented control, visually SECONDARY. */
.subview-toggle { display:inline-flex; gap:3px; padding:3px; background:var(--bg-2); border:1px solid var(--line); border-radius:11px; }
.subview-pill { display:inline-flex; align-items:center; gap:6px; border:none; background:transparent; border-radius:8px; padding:7px 14px; font-size:12.5px; font-weight:700; color:var(--muted); cursor:pointer; }
.subview-pill svg { width:13px; height:13px; }
.subview-pill:hover { color:var(--ink); }
.subview-pill.active { background:#fff; color:var(--ink); box-shadow:0 1px 3px rgba(30,30,30,.10); }
.att-chip { display:inline-flex; align-items:center; gap:5px; background:var(--bg); border:1px solid var(--line); color:var(--ink); font-size:12px; font-weight:600; padding:5px 10px; border-radius:99px; text-decoration:none; }
a.att-chip:hover { border-color:var(--green); color:var(--green-ink); }
.att-chip svg { color:var(--muted); flex-shrink:0; }
.att-chip .fw-x { cursor:pointer; margin-left:2px; opacity:.7; }
.att-chip .fw-x:hover { opacity:1; }
/* client-framework matrix (Plan / Execute) */
.cfw-wrap { max-height:70vh; overflow:auto; }
.cfw-matrix { border-collapse:separate; border-spacing:0; font-size:12px; width:auto; min-width:100%; }
.cfw-matrix th, .cfw-matrix td { padding:4px 5px; border-bottom:1px solid var(--line); border-right:1px solid var(--line); text-align:center; }
.cfw-matrix thead th { position:sticky; top:0; background:#fff; z-index:2; font-size:10.5px; color:var(--muted); font-weight:700; }
.cfw-matrix .fwcol { text-align:left; min-width:190px; max-width:250px; font-weight:600; position:sticky; left:0; background:#fff; z-index:1; white-space:normal; }
.cfw-matrix thead th.fwcol { z-index:3; }
.cfw-cli { min-width:64px; vertical-align:top; }
.cfw-cliname { font-weight:700; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:78px; margin:0 auto 3px; }
.cfw-clirow { display:flex; justify-content:center; gap:4px; align-items:baseline; line-height:1.2; }
.cfw-clirow .lbl { font-size:8.5px; text-transform:uppercase; letter-spacing:.4px; color:var(--faint); }
.cfw-clirow .mono { font-family:var(--mono); font-size:11px; font-weight:700; color:#1E1E1E; }
.ink-green { color:var(--green-ink) !important; }
.cfw-cli .cfw-cliline { height:2px; border-radius:2px; background:var(--line); margin:3px auto 0; max-width:52px; }
.cfw-cli .cfw-cliline > i { display:block; height:100%; background:var(--green); border-radius:2px; }
.cfw-domrow td { background:var(--bg); font-weight:800; text-transform:uppercase; letter-spacing:.5px; font-size:10px; color:var(--green-ink); text-align:left; position:sticky; left:0; }
.cfw-cell { padding:2px 3px; }
.cfw-btn { min-width:52px; width:100%; height:24px; border:1px dashed var(--line); border-radius:6px; background:transparent; cursor:pointer; font-size:10px; font-weight:800; color:var(--muted); padding:0 4px; }
.cfw-btn.empty:hover { border-color:var(--green); background:var(--bg); }
/* §8: "Planned" is attention = BLACK on a neutral tint (green is reserved for done/Executed). */
.cfw-btn.plan { border-style:solid; border-color:var(--ink); background:var(--bg); color:var(--ink); }
.cfw-btn.done { border-style:solid; border-color:var(--green); background:var(--green-tint); color:var(--green-ink); }
.cfw-legend { display:flex; align-items:center; gap:7px; font-size:11.5px; color:var(--muted); flex-wrap:wrap; }
.cfw-legend .cfw-btn { cursor:default; display:inline-flex; align-items:center; justify-content:center; }

/* framework library (master doc + lessons annexure) */
.fwlib-meta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:8px; font-size:12px; }
.fwlib-meta .dot { color:var(--faint); }
.fwlib-lesstoggle { margin-top:10px; background:none; border:none; padding:0; cursor:pointer; color:var(--green-ink); font-weight:600; font-size:13px; display:inline-flex; align-items:center; gap:5px; }
.fwlib-lesstoggle .caret { font-size:11px; }
.fwlib-lessons { margin-top:8px; border-left:2px solid var(--green); padding-left:10px; width:100%; }
.lesson-row { padding:8px 0; border-bottom:1px solid var(--line); }
.lesson-row:last-child { border-bottom:none; }
.lesson-h { display:flex; gap:8px; align-items:center; margin-bottom:2px; flex-wrap:wrap; }
.doc-frame { border:1px solid var(--line); border-radius:12px; overflow:hidden; background:var(--bg); }

/* responsive nav */
.hamburger { display: none; }              /* replaced by the icon rail (desktop) + bottom tab bar (phone) */
@media (max-width: 900px) {
  .role-switch label { display: none; }
  .user-meta { display: none; }
  .content { padding: 20px 16px 60px; }
}

/* ---------- Phone (PWA phone-first) ---------- */
@media (max-width: 640px) {
  body { font-size: 13.5px; }
  .content { padding: 16px 13px calc(72px + env(safe-area-inset-bottom, 0px)); }
  /* phone: hide the icon rail, show a bottom tab bar of the 5 groups; sub-modules open as a bottom sheet */
  /* the shell is display:contents, NOT none: the sub-module sheet (#subnav) lives inside it, and hiding the shell hid the sheet while its scrim still
     dimmed the page and ate every tap, so the bottom tabs seemed dead (2026-11-22). Only the icon rail is hidden. */
  .navshell { display: contents; }
  .railbar { display: none; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: var(--ink); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); justify-content: space-around; box-shadow: 0 -6px 20px rgba(30,30,30,.16); }
  .tab-btn { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 3px; background: none; border: none; color: #b7b7b3; font-size: 9.5px; font-weight: 600; padding: 5px 2px; cursor: pointer; border-radius: 10px; }
  .tab-btn svg { width: 21px; height: 21px; }
  .tab-btn.active { color: var(--green); }
  .subnav { left: 0; right: 0; top: auto; bottom: 0; width: auto; height: auto; max-height: 64vh; border-right: none; border-top-left-radius: 18px; border-top-right-radius: 18px; box-shadow: 0 -12px 34px rgba(30,30,30,.24); transform: translateY(100%); padding: 16px 14px calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 95; }
  .subnav.open { transform: none; }
  .subnav-item { padding: 13px 12px; font-size: 15px; }
  .subnav-scrim { display: block; position: fixed; inset: 0; background: rgba(30,30,30,.4); z-index: 94; opacity: 0; visibility: hidden; transition: opacity .16s, visibility .16s; }
  .subnav-scrim.open { opacity: 1; visibility: visible; }
  .topbar { padding-left: 12px; padding-right: 12px; gap: 8px; }
  .topbar-right { gap: 10px; }
  .page-head { margin-bottom: 16px; gap: 10px; }
  .page-head h1 { font-size: 21px; }
  .page-head .subtitle { font-size: 12.5px; }
  .page-actions { width: 100%; }                 /* actions wrap under the title, full width */
  .card { padding: 14px 14px; }
  .grid { gap: 12px; }
  /* one column everywhere on a phone (covers inline grid-template-columns too via !important on the utility grids) */
  /* minmax(0,1fr), not 1fr: a bare 1fr track will not shrink below its content, so a wide table inside a card pushed the whole page sideways (Team & Access, 2026-10-06) */
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  /* timesheet: stack the quick-add controls full-width; stack the analytics pie above its legend */
  .ts-quick .field { flex: 1 1 100% !important; min-width: 0 !important; }
  /* instant to-do add bar: each control full-width on a phone */
  .td-add > input, .td-add > select, .td-add > button { flex: 1 1 100% !important; min-width: 0 !important; }
  /* routines: the add row wraps so the input isn't crushed on a phone */
  .routine-add { flex-wrap: wrap; }
  .routine-add input { flex: 1 1 100%; }
  /* comfortable touch targets */
  .btn { min-height: 44px; padding: 11px 16px; }
  .btn-sm { min-height: 44px; padding: 8px 13px; font-size: 12.5px; }
  /* every small control a thumb must hit is at least 44 x 44 (audit 2026-11-23) */
  .icon-btn, .modal-close, .subview-pill { min-height: 44px; min-width: 44px; }
  .tab-btn { min-height: 48px; font-size: 11px; }
  .pill { padding: 9px 14px; font-size: 13px; }
  .mr-jump { padding: 9px 14px; font-size: 12.5px; }
  .nav-item { padding: 13px 14px; font-size: 14.5px; }
  select, input, textarea { font-size: 16px; min-height: 44px; }  /* 16px stops iOS auto-zoom */
  textarea { min-height: 80px; }
  .filter-bar { gap: 6px; }
  .kpi-inline { gap: 12px; }
  /* tables scroll horizontally inside their wrapper; hint with momentum scroll */
  .table-wrap { -webkit-overflow-scrolling: touch; }
  table { font-size: 12.5px; }
  th, td { padding: 10px 12px; }
  /* modal becomes a bottom sheet */
  .modal-overlay { padding: 0; place-items: end center; }
  .modal, .modal.wide { max-width: 100%; width: 100%; max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal-body { padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px)); }
  .modal-footer { position: sticky; bottom: 0; background: #fff; padding-top: 12px; margin-top: 16px; border-top: 1px solid var(--line-2); }
  .modal-footer .btn { flex: 1; }               /* full-width action buttons */
  /* calendar month grid: keep 7 cols but smaller cells */
  .cal-mini .card { min-height: 58px !important; padding: 4px 4px !important; }
}
@media (max-width: 400px) {
  .page-head h1 { font-size: 19px; }
  .card { padding: 12px 12px; }
}

.kpi-inline { display:flex; gap:18px; flex-wrap:wrap; margin-top: 6px; }
.kpi-inline > div { font-size: 12px; color: var(--text-soft); }
.kpi-inline b { color: var(--navy-800); font-size: 13px; }

.dim-bar-row { display:grid; grid-template-columns: 120px 1fr 44px; align-items:center; gap:12px; margin-bottom:10px; }
.dim-bar-row .dim-name { font-size:12.5px; font-weight:600; color: var(--navy-700); }
.dim-bar-row .dim-score { font-weight:800; text-align:right; }

a { color: var(--brand); text-decoration: none; }
a.linklike { cursor: pointer; font-weight: 600; }
a.linklike:hover { text-decoration: underline; }

/* reminder chips */
.rem-chip { display: inline-flex; align-items: center; margin-left: 2px; color: var(--muted); }
.rem-chip svg { width: 13px; height: 13px; }
.rem-chips { display: inline-flex; align-items: center; gap: 4px; }
.rem-card {
  flex: 1; text-align: center; padding: 16px 10px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-2); display: flex; flex-direction: column; align-items: center;
}
.rem-card svg { width: 22px; height: 22px; color: var(--ink-2); }
.rem-card div { font-size: 12px; color: var(--text-soft); font-weight: 600; margin-top: 8px; }

/* parameter grid */
.param-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 18px; }
@media (max-width:760px){ .param-grid { grid-template-columns: 1fr; } }
.param { font-size: 12.5px; color: var(--text-soft); display: flex; gap: 8px; align-items: flex-start; padding: 4px 0; }
.param span { color: var(--slate-300); font-weight: 800; }
.param.param-on { color: var(--navy-800); font-weight: 500; }
.param.param-on span { color: var(--green); }

/* module cards */
.module-card { cursor: pointer; transition: transform .12s, box-shadow .12s, border-color .12s; }
.module-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--slate-300); }
.mod-num {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-dark);
  font-weight: 800; font-size: 13px; display: grid; place-items: center; flex-shrink: 0;
}

/* stage stepper */
.stepper { display: flex; align-items: center; overflow-x: auto; padding: 4px 0 2px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 70px; flex-shrink: 0; }
.step-dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--slate-200); color: var(--slate-500); border: 2px solid var(--slate-200);
}
.step-label { font-size: 11px; color: var(--text-faint); font-weight: 600; text-align: center; }
.step.done .step-dot { background: var(--green); border-color: var(--green); color: #1E1E1E; }
.step.done .step-label { color: var(--text-soft); }
.step.current .step-dot { background: var(--accent); border-color: var(--accent); color: #1E1E1E; box-shadow: 0 0 0 4px rgba(95,170,51,.18); }
.step.current .step-label { color: var(--accent-dark); font-weight: 800; }
.step-line { height: 2px; background: var(--slate-200); flex: 1; min-width: 8px; margin: 0 -4px 16px; }

/* core-flow row */
.flow-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.flow-step { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid #cfe8bf; border-radius: 8px; padding: 7px 13px; font-weight: 700; font-size: 12.5px; }
.flow-arrow { color: var(--slate-400); font-weight: 800; margin: 0 2px; }

/* onboarding checklist grid */
.onb-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
@media (max-width:600px){ .onb-grid { grid-template-columns: 1fr; } }
.onb-item { font-size: 12px; color: var(--text-soft); padding: 5px 0; cursor: pointer; display: flex; gap: 7px; align-items: flex-start; }
.onb-item span { color: var(--slate-300); font-weight: 800; }
.onb-item:hover { color: var(--navy-800); }
.onb-item.on { color: var(--navy-800); }
.onb-item.on span { color: var(--green); }

/* gantt dot for plans */
.gantt-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--accent); }
.gantt-dot.teal { background: var(--teal); }

/* ---- Skill Matrix / Competency ---- */
.cmp-controls { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 14px; }
.cmp-inbox { padding: 12px 14px; margin-bottom: 14px; border-left: 3px solid var(--ink); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cmp-stats { margin-bottom: 14px; }
.cmp-viz { margin-bottom: 4px; }
.empty-hint { color: var(--faint); font-size: 12.5px; padding: 20px 0; text-align: center; }
.cmp-grp { margin-bottom: 12px; }
.cmp-grp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.cmp-grp-head h3 { font-size: 15px; margin: 0; }
.cmp-table th, .cmp-table td { vertical-align: middle; }
.cmp-table td:first-child { font-size: 13px; line-height: 1.35; white-space: normal; padding-right: 14px; }
.cmp-table th.cmp-c { font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.cmp-c { text-align: center; width: 152px; white-space: nowrap; padding-left: 6px; padding-right: 6px; }
/* THE GAP (Archaan, 2026-09-21): the table is width:100% with two fixed 152px rating columns, so on a wide
   screen the Item column stretched to 600px+ and pushed the 1-5 buttons to the far right. The eye then lost
   the row between the skill name and its rating, and people clicked the neighbouring row's buttons.
   Three changes, no markup churn:
   1. cap the table so the three columns sit together and the skill text keeps a readable measure;
   2. a hairline between the reading zone and the rating zone, so the row reads as two halves;
   3. a full-row hover, so the row you are about to rate is unmistakable. */
.cmp-table { max-width: 940px; }
.cmp-table td:first-child { max-width: 560px; }
.cmp-table tr > *:nth-child(2) { border-left: 1px solid var(--line-2, #eceae4); }
.cmp-table tbody tr:not(.cmp-guide-tr):hover > td { background: var(--bg-soft, #f0efe9); }
.cmp-table tbody tr.cmp-reviewed:hover > td { background: var(--green-wash, #edf6e7); }
/* Skill Review — last month beside each skill (2026-11-09): a quiet reference, never a second set of buttons */
.cmp-prev { width: 120px; }
.cmp-prev .cr-pill { opacity: .85; }
.cmp-chg { font-family: var(--mono); font-size: 11px; color: var(--muted); margin-left: 4px; }
.cmp-chg.up { color: var(--green-ink); }
.cmp-chg.down { color: var(--ink); font-weight: 700; }
.cmp-prevref { background: var(--bg-soft, var(--bg)); }
@media (max-width: 640px) { .cmp-prev { width: 104px; } }
/* the name and its meaning stay one readable block rather than a full-width line of small grey text */
.cmp-item { max-width: 540px; }
tr.cmp-gap td:first-child::before { content: "•"; color: var(--ink); font-weight: 700; margin-right: 6px; }
/* per-parameter "reviewed = final" toggle in the Manager column (Archaan, 2026-09-16) */
.cmp-rev { display: inline-block; margin-top: 5px; font-size: 10.5px; font-weight: 600; padding: 2px 9px; border-radius: 20px; border: 1px solid var(--line, #ddd); background: none; color: var(--muted); cursor: pointer; white-space: nowrap; }
.cmp-rev:hover { border-color: var(--green-ink); color: var(--green-ink); }
.cmp-rev.on { background: var(--green-ink, #357320); border-color: var(--green-ink, #357320); color: #fff; }
tr.cmp-reviewed > td { background: var(--green-wash, #edf6e7); }
/* rating pills (read-only) */
.cr-pill { font-family: var(--mono); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px; display: inline-block; white-space: nowrap; }
.cr-pill b { font-family: var(--mono); }
.cr-0 { color: var(--faint); background: var(--line-soft, #eef0eb); }
.cr-1 { color: #fff; background: var(--ink); }                         /* Not yet — attention (black) */
.cr-2 { color: var(--muted); background: var(--bg-soft, #f0efe9); }    /* Developing — grey */
.cr-3 { color: var(--ink); background: var(--line-soft, #eef0eb); border: 1px solid var(--line); }  /* Independent — neutral */
.cr-4 { color: var(--green-ink); background: var(--green-wash, #edf6e7); border: 1px solid var(--green); }  /* Strong */
.cr-5 { color: #1E1E1E; background: var(--green); }                       /* Expert */
/* rating buttons (editable) */
.cr-set { display: inline-flex; gap: 3px; }
.cr-btn { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: var(--card, #fff); font-family: var(--mono); font-weight: 700; font-size: 13px; cursor: pointer; color: var(--muted); transition: all .12s; }
.cr-btn:hover { border-color: var(--ink); }
.cr-on { color: #fff; border-color: transparent; }
.cr-on-1 { background: var(--ink); } .cr-on-2 { background: var(--faint, #A6A49E); }
.cr-on-3 { background: var(--muted); } .cr-on-4 { background: var(--green-ink); } .cr-on-5 { background: var(--green); }
.cmp-scale { display: flex; flex-direction: column; gap: 6px; }
.cmp-scale-row { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
/* per-skill inline guide beside each rating (Skill Matrix) */
.cmp-item-top { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cmp-item-name { font-weight: 600; }
.cmp-item-def { font-size: 11.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; font-weight: 400; }
.cmp-guide { margin-top: 5px; }
.cmp-guide > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--green-ink); user-select: none; }
.cmp-guide > summary::-webkit-details-marker { display: none; }
.cmp-guide > summary::marker { content: ""; }
.cmp-guide[open] > summary { margin-bottom: 6px; }
.cmp-guide-body { display: flex; flex-direction: column; gap: 5px; padding: 9px 11px; background: var(--bg-soft, #f0efe9); border-radius: 8px; max-width: 640px; }
.cmp-guide-body .cmp-scale-row { align-items: flex-start; gap: 8px; font-size: 12px; line-height: 1.4; }
.cmp-guide-body .cr-pill { min-width: 24px; text-align: center; padding: 2px 6px; margin-top: 1px; flex: 0 0 auto; }
/* small guide button sitting just LEFT of the rating buttons, + the full-width guide row it toggles below */
.cr-cell { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.cr-guide-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; padding: 0; border: none; background: none; color: var(--muted); cursor: pointer; border-radius: 6px; flex: 0 0 auto; }
.cr-guide-btn:hover { color: var(--green-ink); background: var(--line-soft, #eef0eb); }
.cr-guide-btn.on { color: var(--green-ink); background: var(--green-wash, #edf6e7); }
.cmp-guide-tr > td { background: var(--bg-soft, #f0efe9); padding: 0 12px 12px; border-top: 0; }
.cmp-guide-panel { padding-top: 2px; }
.cmp-guide-phead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; flex-wrap: wrap; }
.cmp-guide-ptitle { font-size: 12.5px; font-weight: 600; }
/* Scaleup Strategies — interactive per-strategy progress rows (dashboard on module / My Work / Command Centre) */
.su-rows { display: flex; flex-direction: column; }
.su-row { display: flex; align-items: center; gap: 12px; padding: 9px 6px; border-radius: 8px; cursor: pointer; border-bottom: 1px solid var(--line-soft, #eef0eb); }
.su-row:last-child { border-bottom: 0; }
.su-row:hover { background: var(--bg-soft, #f0efe9); }
.su-row-main { flex: 1 1 auto; min-width: 0; }
.su-bar { flex: 0 0 140px; height: 7px; border-radius: 20px; background: var(--line-soft, #eef0eb); overflow: hidden; }
.su-bar-fill { height: 100%; background: var(--green); border-radius: 20px; transition: width .2s; }
.su-pct { flex: 0 0 auto; width: 40px; text-align: right; font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .su-bar { flex-basis: 84px; } }
.cmp-imp { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-soft, #eef0eb); }
.cmp-imp-note { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.cmp-imp-add { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.cmp-nlabel { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); margin-bottom: 4px; }
.cmp-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 8px; }
@media (max-width: 640px) {
  .cmp-c { width: 138px; }
  .cmp-table, .cmp-table td:first-child, .cmp-item { max-width: none; }   /* the wrapper scrolls; do not double-constrain */
  .cr-btn { width: 28px; height: 28px; }
  .cmp-controls { gap: 10px; }
  .cmp-controls .field select { max-width: 46vw; }
  .cmp-imp-add select, .cmp-imp-add input { flex: 1 1 100% !important; }
}

/* ---- shared: pill row + count badge + icon button (used by Leave, etc.) ---- */
.pill-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.pill-badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 20px; background: var(--ink); color: #fff; font-family: var(--mono); font-size: 11px; font-weight: 700; line-height: 17px; text-align: center; vertical-align: middle; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--card, #fff); color: var(--muted); cursor: pointer; }
.icon-btn:hover { border-color: var(--ink); color: var(--ink); }

/* ---- Command Centre: module health board ---- */
.hboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.hcard { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--card, #fff); transition: border-color .12s, box-shadow .12s; }
.hcard:hover { border-color: var(--ink); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.hcard-top { display: flex; align-items: center; gap: 8px; }
.hdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.hcard-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .01em; }
.hcard-metric { font-family: var(--mono); font-size: 19px; font-weight: 700; line-height: 1.1; margin-top: 6px; }
.hcard-sub { font-size: 11.5px; color: var(--faint); margin-top: 2px; line-height: 1.4; }
@media (max-width: 640px) { .hboard { grid-template-columns: 1fr 1fr; } }
/* Command Centre — how ScalAct is performing (requirement 4): six panels in the order of the priorities, the mix by priority, then the three priority sections */
.cc-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.cc-panel .stat-label { display: flex; align-items: center; gap: 7px; }
.cc-tag { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 10.5px; font-weight: 800; flex: none; }
.cc-tag.t2 { background: var(--muted); }
.cc-tag.t3 { background: var(--faint); }
.cc-medal { width: 22px; height: 22px; font-size: 12px; }
.cc-tier-head { margin-top: 24px; }
.cc-tier-sub { color: var(--muted); font-weight: 500; font-size: 12px; }
.cc-fun { display: grid; grid-template-columns: 92px minmax(0, 1fr) 34px; align-items: center; gap: 10px; padding: 5px 0; cursor: pointer; }
.cc-fun-bar { height: 10px; background: var(--line); border-radius: 5px; overflow: hidden; }
.cc-fun-bar i { display: block; height: 100%; background: var(--green); }
.cc-fun.lost .cc-fun-bar i { background: var(--faint); }
.cc-vrow .badge { flex: none; }
@media (max-width: 1000px) { .cc-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cc-strip { gap: 8px; } .cc-panel { padding: 12px; } .cc-panel .stat-label { font-size: 10.5px; gap: 5px; } .cc-panel .stat-value { font-size: 19px; } .cc-panel .stat-meta { font-size: 11px; }
  .cc-fun { grid-template-columns: 78px minmax(0, 1fr) 30px; } .cc-vrow { flex-wrap: wrap; } }

/* ---- My Work summary cards (skill rating + leave) ---- */
.sk-sum { cursor: pointer; }
.sk-sum:hover { border-color: var(--line); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.sk-sum-row { display: flex; align-items: center; gap: 24px; margin-top: 6px; flex-wrap: wrap; }
.sk-big { font-family: var(--mono); font-size: 24px; font-weight: 700; line-height: 1; }

/* ---- WhatsApp Inbox — shared team inbox (3-colour: black / green / grey) ---- */
.wa-shell { display: grid; grid-template-columns: 320px 1fr; gap: 0; height: calc(100vh - 210px); min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card, #fff); }
.wa-list { border-right: 1px solid var(--line); overflow-y: auto; background: var(--bg); }
.wa-conv { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; padding: 11px 13px; border: none; border-bottom: 1px solid var(--line); background: transparent; cursor: pointer; font-family: inherit; }
.wa-conv:hover { background: rgba(0,0,0,.03); }
.wa-conv.active { background: var(--card, #fff); box-shadow: inset 3px 0 0 var(--green); }
.wa-av { width: 38px; height: 38px; flex: none; border-radius: 50%; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; }
.wa-conv-main { min-width: 0; flex: 1; }
.wa-conv-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.wa-conv-name { font-weight: 700; font-size: 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-conv-time { font-size: 11px; color: var(--faint); font-family: var(--mono); flex: none; }
.wa-conv-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; }
.wa-snip { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-tag { font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 1px 6px; border-radius: 20px; flex: none; }
.wa-client { background: var(--green-tint, #EAF4E3); color: var(--green-ink); }
.wa-lead { background: var(--ink); color: #fff; }
.wa-team { background: #ECECE9; color: var(--muted); }
.wa-new, .wa-unknown { background: #ECECE9; color: var(--muted); }
.wa-panel { display: flex; flex-direction: column; min-width: 0; background: var(--card, #fff); }
.wa-thread-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.wa-th-name { font-weight: 700; font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 7px; }
.wa-th-sub { font-size: 12px; color: var(--faint); margin-top: 1px; }
.wa-back { display: none; }
.wa-thread { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.wa-row { display: flex; }
.wa-row.mine { justify-content: flex-end; }
.wa-bubble { max-width: 74%; padding: 8px 11px; border-radius: 12px; border-top-left-radius: 3px; background: var(--card, #fff); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.wa-bubble.mine { border-top-left-radius: 12px; border-top-right-radius: 3px; background: var(--green-tint, #EAF4E3); border-color: #CFE6BE; }
.wa-text { font-size: 13.5px; line-height: 1.45; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.wa-meta { font-size: 10.5px; color: var(--faint); font-family: var(--mono); margin-top: 3px; text-align: right; }
.wa-composer { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); }
.wa-input { flex: 1 1 auto; min-width: 0; width: auto; padding: 10px 13px; border: 1px solid var(--line); border-radius: 22px; font-family: inherit; font-size: 14px; background: var(--card, #fff); }
.wa-input:focus { outline: none; border-color: var(--ink); }
.wa-send { flex: 0 0 auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.wa-window-note { padding: 0 14px 12px; font-size: 11px; color: var(--faint); line-height: 1.45; }
.wa-winbar { padding: 6px 14px; font-size: 11.5px; font-weight: 600; text-align: center; border-bottom: 1px solid var(--line); }
.wa-winbar.open { background: var(--green-tint, #EAF4E3); color: var(--green-ink); }
.wa-winbar.closed { background: #F1F0EC; color: var(--muted); }
.wa-assign { flex: 0 0 auto; width: auto; padding: 5px 8px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 12px; background: var(--card, #fff); color: var(--ink); max-width: 120px; }
.wa-unread { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex: none; margin-left: auto; }
.wa-mini-tag { font-size: 9.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 0 5px; border-radius: 20px; background: #ECECE9; color: var(--muted); margin-right: 5px; }
.wa-media-img { max-width: 240px; max-height: 260px; border-radius: 9px; display: block; margin-bottom: 5px; }
.wa-doc { display: inline-flex; align-items: center; gap: 7px; padding: 8px 11px; margin-bottom: 5px; border-radius: 9px; background: rgba(0,0,0,.04); color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; max-width: 240px; }
.wa-doc:hover { background: rgba(0,0,0,.08); }
.wa-doc span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wa-media-note { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.wa-tpl-picker { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.wa-tpl-head { font-size: 12px; font-weight: 700; color: var(--muted); }
.wa-tpl-body { font-size: 12.5px; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; line-height: 1.45; }
.wa-tpl-note { padding: 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.wa-tpl-note code { font-family: var(--mono); font-size: 11.5px; background: var(--bg); padding: 1px 5px; border-radius: 5px; }
.wa-empty-thread { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--faint); font-size: 14px; }
.wa-setup { margin-bottom: 14px; }
.wa-setup-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--ink); margin-bottom: 8px; }
.wa-setup-body p { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0 0 10px; }
.wa-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 12px; }
.wa-steps li { font-size: 13px; color: var(--ink); line-height: 1.55; }
.wa-kv { display: flex; align-items: center; gap: 10px; margin: 6px 0 0; flex-wrap: wrap; }
/* Connect WhatsApp checklist (admin): green = done, black = to do, hollow grey = by hand / not checkable yet */
.wa-ck-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.wa-ck { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); }
.wa-ck-dot { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--faint); color: #fff; margin-top: 1px; }
.wa-ck-dot svg { width: 13px; height: 13px; }
.wa-ck-ok .wa-ck-dot { background: var(--green); border-color: var(--green); }
.wa-ck-todo .wa-ck-dot { background: var(--ink); border-color: var(--ink); }
.wa-ck-ok { border-color: var(--green-tint); }
.wa-ck-main { min-width: 0; flex: 1; }
.wa-ck-title { font-weight: 700; font-size: 13.5px; color: var(--ink); }
.wa-ck-body { font-size: 13px; color: var(--muted); line-height: 1.55; margin-top: 4px; overflow-wrap: anywhere; }
.wa-ck-body code { font-family: var(--mono); font-size: 12px; color: var(--ink); }
.wa-ck-err { color: var(--ink); font-weight: 600; }
.wa-num { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 7px 0; border-top: 1px dashed var(--line); }
.wa-num:first-child { border-top: 0; padding-top: 2px; }
.wa-pin-box { margin-top: 8px; padding: 10px 12px; background: var(--bg); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 8px; }
.wa-pin { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.wa-pin input { flex: 0 0 150px; width: auto; min-width: 0; }
.wa-kv span { flex: 0 0 190px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--faint); }
.wa-kv code { flex: 1 1 240px; min-width: 0; font-family: var(--mono); font-size: 12px; background: var(--bg); border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; color: var(--ink); word-break: break-all; }
@media (max-width: 720px) {
  .wa-shell { grid-template-columns: 1fr; height: calc(100vh - 250px); }
  .wa-shell .wa-panel { display: none; }
  .wa-shell.has-open .wa-list { display: none; }
  .wa-shell.has-open .wa-panel { display: flex; }
  .wa-back { display: inline-flex; }
  .wa-kv span { flex-basis: 100%; }
}

/* ============ MAILBOX (Mail module — Inbox / Sent / Drafts, 3-pane) ============ */
.mailbox { display: grid; grid-template-columns: 188px 340px 1fr; gap: 0; border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; background: var(--card); height: calc(100vh - 172px); min-height: 460px; }
.mb-rail { border-right: 1px solid var(--line); background: var(--bg); padding: 14px 12px; display: flex; flex-direction: column; gap: 4px; }
.mb-compose { width: 100%; justify-content: center; margin-bottom: 10px; }
.mb-fold { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; cursor: pointer;
  font-size: 14px; font-weight: 500; color: var(--ink); border: none; background: transparent; text-align: left; width: 100%; }
.mb-fold svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.mb-fold:hover { background: #EDEEEA; }
.mb-fold.on { background: #EAF3E3; color: var(--green-ink); font-weight: 600; }
.mb-fold.on svg { color: var(--green-ink); }
.mb-fold .ct { margin-left: auto; font-family: var(--mono, "IBM Plex Mono", monospace); font-size: 11px; color: var(--muted); }
.mb-fold.on .ct { color: var(--green-ink); }
.mb-conn { margin-top: auto; font-size: 11px; color: var(--faint); line-height: 1.4; padding: 8px 4px 0; }
.mb-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.mb-search { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-bottom: 1px solid var(--line); color: var(--faint); }
.mb-search svg { width: 15px; height: 15px; flex: none; }
.mb-search input { border: none; outline: none; background: transparent; font-family: inherit; font-size: 13px; width: 100%; color: var(--ink); }
.mb-msgs { overflow-y: auto; flex: 1; }
.mb-row { display: flex; flex-direction: column; gap: 3px; padding: 11px 14px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; }
.mb-row:hover { background: var(--bg); }
.mb-row.sel { background: #EAF3E3; }
.mb-row.sel::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; background: var(--green); border-radius: 3px; }
.mb-row.unread .mb-r-top, .mb-row.unread .mb-r-sub { font-weight: 700; color: var(--ink); }
.mb-r-top { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.mb-r-name { font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-r-date { margin-left: auto; font-size: 11px; color: var(--faint); white-space: nowrap; flex: none; font-family: var(--mono, "IBM Plex Mono", monospace); }
.mb-r-sub { font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-r-snip { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mb-r-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); flex: none; }
.mb-read { display: flex; flex-direction: column; min-width: 0; overflow-y: auto; }
.mb-empty { margin: auto; text-align: center; color: var(--faint); padding: 40px; max-width: 320px; }
.mb-empty svg { width: 40px; height: 40px; color: var(--line); margin-bottom: 12px; }
.mb-msg-head { padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.mb-msg-subj { font-size: 19px; font-weight: 700; color: var(--ink); line-height: 1.3; margin-bottom: 12px; }
.mb-msg-meta { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.mb-msg-meta .who { font-weight: 600; color: var(--ink); }
.mb-msg-meta .addr { color: var(--muted); }
.mb-msg-meta .when { margin-left: auto; font-size: 12px; color: var(--faint); font-family: var(--mono, "IBM Plex Mono", monospace); }
.mb-msg-body { padding: 20px 24px; font-size: 14px; line-height: 1.65; color: var(--ink); white-space: pre-wrap; word-break: break-word; flex: 1; }
.mb-msg-acts { padding: 12px 24px; border-top: 1px solid var(--line); display: flex; gap: 8px; }
.mb-att { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 12.5px; color: var(--muted); }
.mb-att svg { width: 15px; height: 15px; }
.mb-back { display: none; }
.mb-compose-form { padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.mb-compose-form .fld label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.mb-compose-form input, .mb-compose-form select, .mb-compose-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 11px; font-family: inherit; font-size: 14px; background: var(--card); color: var(--ink); }
.mb-compose-form textarea { min-height: 220px; resize: vertical; line-height: 1.6; }
.mb-compose-form .fld input:focus, .mb-compose-form textarea:focus, .mb-compose-form select:focus { outline: none; border-color: var(--green-ink); box-shadow: 0 0 0 3px #EAF3E3; }
@media (max-width: 1040px) {
  .mailbox { grid-template-columns: 64px 320px 1fr; }
  .mb-fold { justify-content: center; padding: 10px 0; }
  .mb-fold span.lbl, .mb-fold .ct { display: none; }
  .mb-compose { padding: 0; }
  .mb-conn { display: none; }
}
@media (max-width: 760px) {
  .mailbox { grid-template-columns: 1fr; height: calc(100vh - 210px); }
  .mb-rail { flex-direction: row; overflow-x: auto; padding: 8px; height: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .mb-rail { grid-column: 1 / -1; }
  .mb-fold { width: auto; }
  .mb-list { border-right: none; }
  .mb-read { display: none; }
  .mailbox.reading .mb-list { display: none; }
  .mailbox.reading .mb-read { display: flex; }
  .mailbox.reading .mb-rail { display: none; }
  .mb-back { display: inline-flex; }
}

/* ScalScore — business-health maturity audit */
.sc-band-legend { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.sc-band-chip { font-size: 11px; padding: 3px 8px; border-radius: 8px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.sc-band-chip.b0 { border-left: 3px solid #C9C9C4; } .sc-band-chip.b1 { border-left: 3px solid #9DBE85; } .sc-band-chip.b2 { border-left: 3px solid #7BB558; } .sc-band-chip.b3 { border-left: 3px solid var(--green); }
.sc-list { display: flex; flex-direction: column; }
.sc-prow { padding: 12px 2px; border-top: 1px solid var(--line); }
.sc-prow:first-child { border-top: none; }
.sc-prow.sc-na { opacity: .55; }
.sc-phead { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.sc-pname { font-weight: 600; font-size: 14px; }
.sc-pactions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
.sc-appl { font-size: 12px; color: var(--muted); display: flex; gap: 4px; align-items: center; white-space: nowrap; cursor: pointer; }
.sc-rate { margin-top: 10px; display: flex; flex-direction: column; gap: 7px; }
.sc-rrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sc-rlabel { font-size: 11.5px; color: var(--muted); width: 82px; flex-shrink: 0; font-weight: 600; }
.sc-strip { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.sc-dot { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--line); background: #fff; cursor: pointer; transition: transform .08s; }
.sc-dot:hover { transform: scale(1.18); }
.sc-dot.on.sa { background: var(--green); border-color: var(--green); }
.sc-dot.on.cl { background: #1E1E1E; border-color: #1E1E1E; }
.sc-val { margin-left: 6px; font-size: 12px; color: var(--muted); min-width: 34px; }
.sc-rung { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.sc-rung:first-of-type { border-top: none; }
.sc-rung-pct { font-size: 12px; color: var(--muted); flex: 0 0 46px; }
@media (max-width: 640px) { .sc-dot { width: 20px; height: 20px; } .sc-rlabel { width: 100%; } }

/* Progressive-disclosure "More details" in forms (de-bulk — every field stays in the DOM) */
/* Time & date are picked, never typed (2026-10-05): a From–To pair of time selectors. */
.time-range { display: flex; gap: 6px; align-items: center; }
.time-range select { flex: 1 1 0; min-width: 0; width: auto; }
.time-range-to { color: var(--muted); font-size: 12px; flex: 0 0 auto; }
.more-fields { margin: 2px 0 8px; border-top: 1px solid var(--line); padding-top: 6px; }
.more-fields > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--green-ink, #357320); list-style: none; padding: 7px 2px; user-select: none; display: flex; align-items: center; gap: 6px; }
.more-fields > summary::-webkit-details-marker { display: none; }
.more-fields > summary::before { content: "＋"; font-weight: 700; }
.more-fields[open] > summary::before { content: "－"; }
.more-fields[open] > summary { color: var(--muted); }

/* ---- Timesheet (Archaan, 2026-09-18 rebuild) ---------------------------------------------------------- */
/* Week-grid entry — moved here verbatim from the render string in app.js (it was global the moment it rendered). */
.tsg{border-collapse:collapse;width:100%;font-size:13px}
.tsg th,.tsg td{padding:8px 8px;text-align:center;border-bottom:1px solid var(--line,#E7E5E0)}
.tsg thead th{font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--faint,#A6A49E)}
.tsg th.tsg-proj,.tsg td.tsg-proj{text-align:left;min-width:190px}
.tsg td.tsg-proj .p{font-weight:600}
.tsg td.tsg-proj .d{font-size:11px;color:var(--muted,#6E6E6B);margin-top:2px}
.tsg th.tsg-day small{display:block;font-family:var(--mono,ui-monospace,monospace);font-weight:500;color:var(--muted,#6E6E6B);font-size:10px;text-transform:none;letter-spacing:0;margin-top:1px}
.tsg th.tsg-day.today small{color:#1E1E1E}
.tsg th.tsg-day.wk{color:#c9c7c1}
.tsg-in{width:48px;text-align:center;font-family:var(--mono,ui-monospace,monospace);font-size:13px;border:1px solid var(--line,#E7E5E0);border-radius:8px;padding:6px 2px;background:#fff;color:#1E1E1E}
.tsg-in:focus{outline:2px solid var(--green-ink);outline-offset:1px;border-color:var(--green-ink)}
.tsg-in.locked{background:var(--bg,#F5F4F1);color:var(--muted,#6E6E6B);border-color:var(--line-2,#F0EEE9)}
.tsg-in.zero{color:var(--faint,#A6A49E)}
.tsg-tot{font-family:var(--mono,ui-monospace,monospace);font-weight:600}
.tsg tr.tsg-excl td{color:var(--faint,#A6A49E)}
.tsg tfoot td{border-top:2px solid var(--line,#E7E5E0);font-family:var(--mono,ui-monospace,monospace);font-weight:600;background:var(--bg-2,#FBFAF8);padding:10px 8px}
.tsg tfoot td.tsg-proj{font-family:inherit;text-transform:uppercase;font-size:10.5px;letter-spacing:.04em;color:var(--muted,#6E6E6B);font-weight:700}
@media (max-width: 640px) {
  .tsg th, .tsg td { padding: 6px 4px; }
  .tsg th.tsg-proj, .tsg td.tsg-proj { min-width: 132px; }
  .tsg-in { width: 40px; font-size: 12px; }
}

/* Fill matrix — one square per person per day. Colour carries the state; a legend names all five in words. */
.ts-cal { border-collapse: separate; border-spacing: 3px; font-size: 12px; }
.ts-cal th { font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--faint); padding: 0 0 4px; text-align: center; }
.ts-cal th.ts-name, .ts-cal td.ts-name { text-align: left; position: sticky; left: 0; background: #fff; z-index: 2; padding-right: 10px; min-width: 156px; }
.ts-cal td.ts-tot { font-family: var(--mono); font-size: 11px; color: var(--muted); white-space: nowrap; padding-left: 8px; }
.ts-cell { width: 22px; height: 22px; border-radius: 5px; display: inline-block; font-family: var(--mono); font-size: 10px; line-height: 22px; text-align: center; border: 1px solid transparent; }
.ts-cell.is-full { background: var(--green); color: transparent; }
.ts-cell.is-open { background: #fff; border-color: var(--green); color: transparent; }
.ts-cell.is-short { background: var(--line-2, #F0EEE9); color: var(--muted); border-color: var(--line); }
.ts-cell.is-missing { background: var(--ink); color: transparent; }
.ts-cell.is-off { background: transparent; color: var(--faint); border-color: var(--line-2, #F0EEE9); }
.ts-cell.is-future { background: transparent; color: transparent; border-style: dashed; border-color: var(--line-2, #F0EEE9); }
button.ts-cell { cursor: pointer; padding: 0; }
.ts-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; font-size: 11.5px; color: var(--muted); align-items: center; }
.ts-legend .ts-cell { width: 13px; height: 13px; line-height: 13px; margin-right: 5px; vertical-align: -2px; }

/* Time-of-day intensity — one hue, four steps (the ScalScore band ramp). No new colour enters the palette. */
.ts-i0 { background: #C9C9C4; }
.ts-i1 { background: #9DBE85; }
.ts-i2 { background: #7BB558; }
.ts-i3 { background: var(--green); }
.ts-band-cell { display: block; border-radius: 6px; padding: 7px 4px; font-family: var(--mono); font-size: 12px; text-align: center; color: #1E1E1E; }
.ts-band-cell.dark { color: #fff; }

/* Client-facing vs internal, in one monochrome bar rather than a pie. */
.ts-split { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--line); }
.ts-split i { display: block; height: 100%; }
.ts-split i.client { background: var(--green); }
.ts-split i.scalact { background: var(--muted); }   /* tier 2 — building ScalAct */
.ts-split i.skills { background: var(--faint); }    /* tier 3 — building skills */

@media (max-width: 640px) {
  .ts-cell { width: 18px; height: 18px; line-height: 18px; }
  .ts-cal { border-spacing: 2px; }
  .ts-cal th.ts-name, .ts-cal td.ts-name { min-width: 118px; }
  .ts-band-late { display: none; }
}

/* ---- CALENDAR (Archaan, 2026-09-18, ask 7): the hour grid, person columns and the month view ----
   Gridlines are ONE repeating-linear-gradient on the track rather than a child per hour, and blocks
   are absolutely positioned in PERCENT inside it — the Scaleup Gantt trick rotated 90 degrees, so a
   day never forces a horizontal page scroll. Person colour is applied inline (a §8-named exception);
   everything else here is black + green + one grey. */
.cal-toolbar { display:flex; align-items:center; gap:6px; flex-wrap:wrap; margin-bottom:12px; }
.cal-title { font-size:15px; margin-left:4px; }
.cal-legend { display:flex; gap:12px; flex-wrap:wrap; font-size:11.5px; color:var(--muted); margin-bottom:10px; }
.cal-legend span { display:inline-flex; align-items:center; gap:5px; }

.cal-grid { display:flex; gap:0; border:1px solid var(--line); border-radius:14px; background:#fff; overflow:hidden; }
.cal-grid.multi { overflow-x:auto; }
.cal-gutter { flex:0 0 52px; border-right:1px solid var(--line); background:var(--bg-2); position:sticky; left:0; z-index:3; }
.cal-gutter-pad { height:34px; border-bottom:1px solid var(--line); }
.cal-allday-pad { height:var(--cal-ad,30px); box-sizing:border-box; border-bottom:1px solid var(--line); }
.cal-hrs { display:grid; grid-template-rows:repeat(var(--cal-rows),var(--cal-row,46px)); }
.cal-hr { font-size:10.5px; color:var(--faint); padding:2px 6px 0 0; text-align:right; font-family:var(--mono); }
.cal-cols { display:flex; flex:1 1 auto; min-width:0; }
.cal-col { flex:1 1 0; min-width:0; border-left:1px solid var(--line-2); }
.cal-col:first-child { border-left:none; }
.cal-grid.multi .cal-col { min-width:108px; }
.cal-daycol-head { height:34px; display:flex; align-items:center; justify-content:center; gap:6px; font-size:11.5px;
  font-weight:700; color:var(--muted); border-bottom:1px solid var(--line); background:var(--bg-2); }
.cal-daycol-head.today { color:var(--ink); box-shadow:inset 0 -2px 0 #70B94E; }
/* The all-day strip is ONE height across every column and the hour gutter (--cal-ad, set by calTimeGrid), and each item has a
   fixed height, so a day's hour track always starts at the same line as the hour labels. */
.cal-allday-wrap { height:var(--cal-ad,30px); box-sizing:border-box; overflow:hidden; border-bottom:1px solid var(--line); padding:2px 3px; }
.cal-allday { font-size:11px; height:20px; line-height:16px; box-sizing:border-box; padding:2px 6px; border-radius:6px; background:var(--bg); border-left:3px solid var(--faint);
  margin-bottom:2px; cursor:pointer; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-track { position:relative; height:calc(var(--cal-rows) * var(--cal-row,46px));
  background:repeating-linear-gradient(to bottom, var(--line-2) 0, var(--line-2) 1px, transparent 1px, transparent var(--cal-row,46px)); }
.cal-slot { position:absolute; left:0; right:0; cursor:pointer; }
.cal-slot:hover { background:rgba(112,185,78,.10); }
.cal-ev { position:absolute; overflow:hidden; border-radius:7px; padding:3px 6px; cursor:pointer; min-height:24px;
  background:var(--bg); border:1px solid var(--line); border-left:3px solid var(--ink); box-shadow:0 1px 2px rgba(0,0,0,.05); }
.cal-ev b { display:block; font-size:11.5px; font-weight:600; line-height:1.25; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-ev span { display:block; font-size:10.5px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-ev.meeting { background:#F3F8EF; }
.cal-ev.call { background:var(--bg-2); border-style:dashed; }
.cal-ev.outside { background:var(--green-tint); border-style:dashed; }
.cal-ev.done { opacity:.62; }
.cal-ev.cancel { opacity:.5; }
.cal-ev.cancel b { text-decoration:line-through; }
.cal-now { position:absolute; left:0; right:0; height:0; border-top:2px solid #70B94E; z-index:2; pointer-events:none; }
.cal-now::before { content:""; position:absolute; left:-4px; top:-4px; width:7px; height:7px; border-radius:50%; background:#70B94E; }

.cal-month { display:grid; grid-template-columns:repeat(7,1fr); gap:5px; }
.cal-mh { text-align:center; font-size:10.5px; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--faint); padding:2px 0; }
.cal-mc { min-height:82px; border:1px solid var(--line); border-radius:10px; background:#fff; padding:4px 5px; cursor:pointer; overflow:hidden; }
.cal-mc.empty { border:none; background:transparent; cursor:default; min-height:0; }
.cal-mc.today { border-color:#70B94E; background:#F7FAF4; }
.cal-md { font-size:11.5px; font-weight:700; color:var(--muted); }
.cal-mev { font-size:10.5px; margin-top:2px; padding:1px 4px; border-radius:4px; background:var(--bg);
  border-left:3px solid var(--faint); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.cal-mev.meeting { background:#F3F8EF; }
.cal-mev.cancel { opacity:.5; text-decoration:line-through; }
.cal-mmore { font-size:10px; color:var(--faint); margin-top:2px; }

@media (max-width:640px) {
  .cal-toolbar .cal-title { flex:1 1 100%; order:-1; margin:0 0 4px; }
  .cal-grid { --cal-row:42px; }
  .cal-gutter { flex:0 0 44px; }
  .cal-hr { font-size:10px; }
  .cal-month { gap:3px; }
  .cal-mc { min-height:54px; padding:3px; border-radius:8px; }
  .cal-mev { font-size:9.5px; }
  .cal-mh { font-size:9.5px; }
}
/* Dashboard group heading (Archaan, 2026-09-21) - My Work + Command Centre are grouped the same way the
   nav is, so the page reads in the order people already navigate. Section 8: no new hue. */
.dash-group { display:flex; align-items:center; gap:7px; margin-top:20px; }
.dash-group svg { opacity:.75; }

/* Notification bell (Archaan, 2026-09-21). Section 8: the unread count is GREEN on the dark rail — the one
   place a count earns emphasis — and the rail itself already carries the black. No new hue. */
.notif-btn { position: relative; }
.notif-dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 9px;
  background: var(--green); color: #1E1E1E; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; }
.tab-btn .notif-dot { top: 2px; right: 14px; }
.notif-row.is-unread { background: var(--bg-soft, #f0efe9); }
.notif-row:hover { background: var(--line-soft, #eef0eb); }

/* Save-as-draft strip (Archaan, 2026-09-21). Section 8: black accent = something needs your attention,
   no new hue. */
/* One quiet notice: a black rule on a light ground. NEVER paint a notice with var(--amber-tint) / var(--red-tint) — §8 remaps both to solid black,
   so the text inherits ink on ink and disappears (A3, ux:F01). The saved-draft strip and the confidential / private notes share this rule. */
.draft-bar, .note-attn { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:8px 11px;
  border-left:3px solid var(--ink); background:var(--bg-soft, #f0efe9); border-radius:8px; font-size:12.5px; color:var(--ink); }
.draft-bar { margin-bottom:12px; }
/* a one-time SETUP card (Facebook, email, "how work flows") sits collapsed once it is configured — a disclosure inside a normal card (A3, founder:F10) */
.setup-card .more-fields { border-top: 0; margin: 0; padding-top: 0; }
.setup-card .more-fields > summary { color: var(--ink); font-size: 14px; font-weight: 700; }
.setup-card .more-fields[open] > summary { color: var(--ink); }
.draft-bar svg, .note-attn svg { vertical-align:-2px; }

/* Timesheet MONTH CALENDAR (Archaan, 2026-09-21) — one persons month at a glance.
   Named tsmcal, NOT ts-cal: .ts-cal is already the Discipline fill-matrix table and a display:grid
   would have destroyed it. Section 8: green = the 8h mark met, black outline = nothing logged,
   dim = weekend / holiday / approved leave. No new hue. */
.tsmcal { display:grid; grid-template-columns:repeat(7,1fr); gap:5px; }
.tsmcal-dow { font-size:10.5px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); text-align:center; padding-bottom:2px; }
.tsmcal-cell { min-height:62px; border:1px solid var(--line-2,#eceae4); border-radius:9px; padding:5px 6px; background:#fff; }
.tsmcal-cell.is-blank { border:none; background:none; }
.tsmcal-cell.is-off { background:var(--bg-soft,#f0efe9); opacity:.7; }
.tsmcal-cell.is-full { background:var(--green-wash,#edf6e7); border-color:var(--green); }
.tsmcal-cell.is-missing { border-color:var(--ink); }
.tsmcal-cell.is-short { border-color:var(--line); border-style:dashed; }   /* logged but under that person's own hours - the matrix has always drawn this */
.tsmcal-cell.is-today { box-shadow:0 0 0 2px var(--green); }
.tsmcal-d { font-size:11px; color:var(--muted); font-weight:700; }
.tsmcal-h { font-size:13px; font-weight:700; }
.tsmcal-act { font-size:10px; color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
@media (max-width:640px){ .tsmcal-cell { min-height:52px; padding:4px; } .tsmcal-act { display:none; } }

/* View-as banner (Archaan, 2026-09-22) — in the layout FLOW, not overlaying it: .main is a column flexbox,
   so this takes its own row and .content shrinks to fit. Deliberately NOT position:fixed like the expired-
   session banner: that covers the top of the page, which is fine for a rare emergency and wrong for a state
   you sit in for minutes. Never var(--amber-tint) — it is remapped to solid black (black-on-black). */
.viewas-bar { display:flex; align-items:center; gap:12px; background:var(--ink); color:#fff;
  padding:9px 16px; font-size:12.5px; line-height:1.5; flex:0 0 auto; }
.viewas-bar .va-ico { display:flex; opacity:.85 }
.viewas-bar .va-txt { flex:1; min-width:0 }
.viewas-bar .va-sub { display:block; opacity:.7; font-size:11.5px }
.viewas-bar .btn { flex:0 0 auto }
.viewas-bar .va-who { opacity:.75 }
.viewas-bar .va-btns { display:flex; gap:8px; flex-wrap:wrap; flex:0 0 auto }
.viewas-bar .va-switch { background:transparent; color:#fff; border:1px solid rgba(255,255,255,.45) }
.viewas-bar .va-switch:hover { border-color:#fff }
/* on a phone the floating account avatar sits at the top right (36px at right:10px) — the banner leaves it room */
@media (max-width:640px) { .viewas-bar { padding:8px 56px 8px 12px; gap:8px; font-size:12px; flex-wrap:wrap } .viewas-bar .va-ico { display:none } .viewas-bar .va-btns { width:100% } }
/* Until the first screen is drawn (the first draw replaces #view's contents) — a blank white page on a slow phone looks broken (2026-10-11) */
.boot-note { padding: 28px 24px; color: var(--muted); font-size: 14px; }
/* A newer version of the app is ready (2026-10-11) — the same in-flow row as the view-as bar, so it never covers the page; black = attention (§8),
   the green primary button. On a phone the floating account avatar sits at the top right, so the row leaves it room. */
.update-bar { display:flex; align-items:center; gap:12px; background:var(--ink); color:#fff; padding:9px 16px; font-size:12.5px; line-height:1.5; flex:0 0 auto; }
.update-bar .ub-txt { flex:1; min-width:0 }
.update-bar .ub-sub { opacity:.75 }
.update-bar .ub-btns { display:flex; gap:8px; flex:0 0 auto }
.update-bar .ub-later { background:transparent; color:#fff; border:1px solid rgba(255,255,255,.45) }
.update-bar .ub-later:hover { border-color:#fff }
@media (max-width:640px) { .update-bar { padding:8px 56px 8px 12px; gap:8px; font-size:12px; flex-wrap:wrap } .update-bar .ub-btns { width:100% } }
/* The way back (2026-10-11): a slim light strip under the page after a click into something from a dashboard or a list. Light, never black —
   black means a person is waiting (§8). In the layout flow like the update and view-as bars; on a phone it leaves room for the floating account avatar. */
.back-bar { display:flex; align-items:center; padding:2px 16px; background:var(--bg-soft, #F4F4F2); border-bottom:1px solid var(--line, #E4E4E0); flex:0 0 auto; }
.back-bar .back-btn { display:inline-flex; align-items:center; gap:6px; min-height:34px; font-weight:600 }
/* A pop-up opened from a figure's list carries a link back to that list at the top of its body. */
.modal-return { margin:-4px 0 10px }
.modal-return .btn { display:inline-flex; align-items:center; gap:6px; font-weight:600 }
@media (max-width:640px) { .modal-return .btn { min-height:44px } }
@media (max-width:640px) { .back-bar { padding:2px 56px 2px 8px } .back-bar .back-btn { min-height:44px } }
.um-ver { padding:6px 6px 2px; margin-top:4px; border-top:1px solid var(--line, #eee); font-family:var(--mono, "IBM Plex Mono", monospace); font-size:10.5px; color:var(--muted, #6E6E6B); letter-spacing:.02em }
.um-ver:empty { display:none }
/* View as (2026-10-01): the per-module button, the note when the person can't open a module, and the picker rows. */
.viewas-btn, .archive-btn { display:inline-flex; align-items:center; gap:6px }
.viewas-top { display:flex; justify-content:flex-end; margin-bottom:10px }
.viewas-note { border-left:3px solid var(--ink); padding:8px 12px; margin-bottom:12px; background:var(--bg); border-radius:8px; font-size:12.5px }
.va-list { max-height:min(60vh, 520px); overflow-y:auto }
.va-row { display:flex; align-items:center; gap:10px; width:100%; text-align:left; background:none; border:0; border-bottom:1px solid var(--line); padding:9px 4px; cursor:pointer; font:inherit; color:inherit; min-height:44px }
.va-row:hover:not([disabled]) { background:var(--bg) }
.va-row[disabled] { cursor:default }
.va-row-main { display:flex; flex-direction:column; flex:1 1 auto; min-width:0 }
.va-row .cell-sub { white-space:normal }
/* Save state (2026-09-26): a change the server has not taken is never silent. §8 — black = attention. */
.save-pill { position:fixed; right:16px; bottom:16px; z-index:95; /* above the page and phone tab bar (80), under every pop-up (100) */ display:inline-flex; align-items:center; gap:8px;
  background:var(--ink); color:#fff; border:0; border-radius:20px; padding:10px 16px; font:inherit; font-size:13px; font-weight:600;
  cursor:pointer; box-shadow:0 6px 20px rgba(30,30,30,.22); max-width:calc(100vw - 32px) }
.save-pill:focus-visible { outline:2px solid var(--green-ink); outline-offset:2px }
/* A toast never covers the button: while it shows, the toasts stack above it. */
body:has(#saveStatePill) .toast-host { bottom:72px }
@media (max-width:640px) { .save-pill { right:12px; bottom:calc(76px + env(safe-area-inset-bottom, 0px)); font-size:12px; padding:9px 14px }
  body:has(#saveStatePill) .toast-host { bottom:calc(128px + env(safe-area-inset-bottom, 0px)) } }
.unavail-note { border-left:3px solid var(--ink); line-height:1.6; font-size:13px; margin-bottom:14px }
.reach-screen { position:fixed; inset:0; z-index:9500; background:var(--bg); display:flex; align-items:center; justify-content:center; padding:16px }
.reach-card { background:#fff; border:1px solid var(--line); border-radius:14px; padding:28px 24px; max-width:420px; width:100%;
  display:flex; flex-direction:column; gap:12px; align-items:flex-start; line-height:1.6 }
.reach-card h2 { margin:6px 0 0; font-size:20px }
.reach-card p { margin:0; color:var(--muted) }
/* Finance — a dashboard figure is a button that opens its detail below (2026-09-28) */
.stat.fin-kpi { cursor:pointer; padding:14px 16px; transition:box-shadow .15s ease, transform .15s ease; }
.stat.fin-kpi .stat-value { font-size:22px; margin-top:4px; }
.stat.fin-kpi .stat-meta { margin-top:4px; }
.stat.fin-kpi:hover { box-shadow:0 0 0 2px var(--line); }
.stat.fin-kpi:focus-visible { outline:2px solid var(--green-ink); outline-offset:2px; }
.stat.fin-kpi.fin-on { box-shadow:0 0 0 2px var(--green); }
.fin-kpi-go { font-size:11px; font-weight:700; color:var(--green-ink); margin-top:4px; }
.fin-panel { scroll-margin-top:12px; }
.fin-dec { cursor:pointer; align-items:flex-start; gap:10px; padding:9px 4px; border-radius:8px; }
.fin-dec:hover { background:var(--bg); }
.fin-dec:focus-visible { outline:2px solid var(--green-ink); outline-offset:1px; }
.fin-dec-dot { flex-shrink:0; width:8px; height:8px; border-radius:3px; margin-top:6px; }
.fin-keys { display:flex; flex-wrap:wrap; gap:6px 16px; font-size:12px; color:var(--muted); }
.fin-key { display:inline-flex; align-items:center; gap:6px; }

/* The execution consultant's payment flag (2026-09-29): black = attention, never an amount. */
.pay-flag { border-left: 3px solid var(--ink, #1E1E1E); background: var(--bg, #F4F4F2); border-radius: 8px; padding: 7px 10px; margin: 8px 0; font-size: 12.5px; line-height: 1.45; color: var(--ink, #1E1E1E); }

/* The entry a bill writes, shown read-only for the CA (Account batch B). Monochrome, mono figures. */
.fe-voucher { margin-top: 8px; }
.fe-vt { width: 100%; border-collapse: collapse; font-size: 12px; }
.fe-vt th, .fe-vt td { padding: 4px 6px; border-bottom: 1px solid var(--line, #E4E3DF); text-align: left; }
.fe-vt th { font-weight: 600; color: var(--muted, #6E6E6B); }
.fe-vt .r { text-align: right; white-space: nowrap; }

/* ---- Live session (2026-10-02): the paper MOM template as a screen — black boxes, green = in the room / now ---- */
.live-head { background:var(--ink); color:#fff; border-radius:12px; padding:10px 14px; font-size:13.5px; margin-bottom:12px; display:flex; flex-wrap:wrap; gap:6px 10px; align-items:center }
.live-head b { color:#fff } .live-head > span { opacity:.55 } .live-head .live-status { opacity:1; margin-left:auto }
.live-blocks { display:flex; flex-wrap:wrap; gap:4px }
.live-block { font-family:var(--mono); font-size:11px; padding:3px 7px; border-radius:7px; border:1px solid var(--line); color:var(--muted) }
.live-block.is-past { background:var(--bg-2); color:var(--faint) }
.live-block.is-now { background:var(--green); border-color:var(--green); color:#1E1E1E; font-weight:600 }
.live-chips { display:flex; flex-wrap:wrap; gap:6px; align-items:center }
.live-chip { border:1px solid var(--line); background:#fff; border-radius:20px; padding:6px 12px; font:inherit; font-size:13px; cursor:pointer; min-height:36px; display:inline-flex; gap:6px; align-items:center; color:var(--ink) }
.live-chip.is-in { background:var(--green); border-color:var(--green); color:#1E1E1E }
.live-chip:focus-visible { outline:2px solid var(--ink); outline-offset:2px }
.live-chip-t { font-family:var(--mono); font-size:10.5px; opacity:.85 }
.live-topic { background:var(--bg-2); border-radius:8px; padding:3px 8px; font-size:12.5px; display:inline-flex; gap:4px; align-items:center; max-width:100%; overflow-wrap:anywhere }
.live-src { max-height:260px; overflow-y:auto; border:1px solid var(--line); border-radius:10px }
.live-src-row { padding:8px 10px; border-bottom:1px solid var(--line); cursor:pointer }
.live-src-row:hover { background:var(--bg-2) }
.live-src-row:last-child { border-bottom:0 }
.live-board { display:grid; grid-template-columns:1.3fr 1fr 1fr; grid-template-areas:"disc value deliv" "disc next follow"; gap:12px }
.lb-disc { grid-area:disc } .lb-value { grid-area:value } .lb-deliv { grid-area:deliv } .lb-next { grid-area:next } .lb-follow { grid-area:follow }
.live-box { border:1.5px solid var(--ink); border-radius:12px; padding:10px 12px; background:#fff; min-width:0; min-height:120px }
.live-box.lb-internal { border-style:dashed; border-color:var(--faint); background:var(--bg); min-height:0 }
.live-box-h { font-weight:700; font-size:13.5px; margin-bottom:4px }
.live-line { display:flex; flex-wrap:wrap; gap:4px 8px; justify-content:space-between; align-items:flex-start; padding:6px 0; border-top:1px solid var(--line); font-size:13px }
.live-line.is-private { color:var(--muted) }
.live-line-main { min-width:0; flex:1 1 170px; overflow-wrap:anywhere }
.live-line-act { display:flex; gap:4px; align-items:center; flex-shrink:0; margin-left:auto }
.live-time { font-size:11px; color:var(--faint); margin-right:6px }
.live-preview { border:1px solid var(--line); border-radius:12px; padding:10px; overflow-x:auto }
@media (max-width:900px) { .live-board { grid-template-columns:1fr; grid-template-areas:"disc" "value" "deliv" "follow" "next" } }
/* ---- the session mirrors the agenda (Agenda / Minutes stage 4c, 2026-10-13): Now / Next, five figures, the board by topic / by hour ---- */
.live-nn { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:12px }
.live-nn-col { min-width:0; border-left:3px solid var(--line); padding-left:10px }
.live-nn-col:first-child { border-left-color:var(--green) }
.live-nn-k { display:block; font-size:11px; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); font-weight:700; margin-bottom:2px }
.live-nn-t { overflow-wrap:anywhere; font-size:14px }
.live-figs { display:grid; grid-template-columns:repeat(5, minmax(0, 1fr)); gap:8px }
.live-figs .stat { padding:10px 12px }
.live-figs .stat .stat-value { font-size:20px }
.live-tlist { display:flex; flex-direction:column; gap:10px }
.live-tgroup { min-height:0 }
.live-pt { padding:6px 0; border-top:1px solid var(--line) }
.live-box-h + .live-pt { border-top:0 }
@media (max-width:900px) { .live-figs { grid-template-columns:repeat(2, minmax(0, 1fr)) } }
@media (max-width:640px) { .live-nn { grid-template-columns:1fr } .live-figs .stat { padding:8px 10px } .live-figs .stat .stat-value { font-size:18px } }
/* ---- Agenda / minutes editors (2026-10-07): one line per point, phone-first rows, one status bar, Undo ---- */
.ag-list { border-bottom:1px solid var(--line); }
.ag-row { display:flex; gap:8px; padding:8px 0; border-top:1px solid var(--line); }
.ag-n { color:var(--muted); font-size:12px; width:22px; flex:0 0 22px; padding-top:10px; }
.ag-main { flex:1; min-width:0; }
.ag-meta { display:flex; flex-wrap:wrap; gap:6px; margin-top:6px; }
.ag-meta select { width:auto; flex:1 1 150px; min-width:0; }
.ag-meta .btn { flex:0 0 auto; }
.ag-priv { display:inline-flex; align-items:center; gap:5px; font-size:12px; color:var(--muted); flex:0 0 auto; cursor:pointer }
.ag-priv input { width:auto; margin:0 }
.ag-pick .live-src-row { cursor:pointer; }
.doc-bar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; padding:9px 12px; background:var(--bg-2); border:1px solid var(--line); border-radius:10px; }
.doc-undo { display:flex; gap:8px; align-items:center; justify-content:space-between; padding:7px 12px; border:1px dashed var(--line); border-radius:10px; font-size:12.5px; color:var(--muted); margin-bottom:8px; }
.mtg-box { border:1px solid var(--line); border-radius:10px; padding:12px; min-width:0; }
.live-chip-x { width:24px; height:24px; margin-left:-4px; }
/* ---- the nested, hour-wise agenda (stage 4b): a TOPIC is a time block with its people, a POINT is one line under it ---- */
.ag-topic { border:1px solid var(--line); border-radius:12px; padding:10px 12px; margin-bottom:10px; background:#fff; min-width:0; }
.ag-thead { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.ag-thead .ag-n { flex:0 0 auto; color:var(--muted); font-size:13px; }
.ag-thead select { width:auto; flex:1 1 170px; min-width:0; }
.ag-time { display:inline-flex; align-items:center; gap:6px; flex:0 1 auto; }
.ag-time select, .ag-own-r select { width:auto; min-width:104px; }
.ag-own-r { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.ag-people { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:8px; min-width:0; }
.ag-chip { display:inline-flex; align-items:center; gap:2px; padding:2px 4px 2px 10px; border:1px solid var(--line); border-radius:999px; font-size:12.5px; line-height:1.4; background:var(--bg-2); color:var(--ink); }
.ag-chip.scalact { background:var(--ink); border-color:var(--ink); color:#fff; }
.ag-chip.client { border-color:var(--green); color:var(--green-ink, #357320); background:#fff; }
.ag-chip button { border:0; background:transparent; color:inherit; cursor:pointer; padding:0 6px; min-height:22px; width:auto; font-size:15px; line-height:1; }
.ag-padd { width:auto; flex:1 1 170px; min-width:0; max-width:260px; padding:5px 10px; font-size:13px; }
.ag-subs { margin-top:8px; }
.ag-sub { display:flex; gap:8px; padding:5px 0; border-top:1px solid var(--line-2, var(--line)); }
.ag-bul { flex:0 0 14px; color:var(--muted); font-weight:700; padding-top:8px; }
.ag-sub-main { flex:1; min-width:0; }
.ag-sub-line { display:flex; gap:6px; align-items:center; }
.ag-sub-line input { flex:1 1 auto; min-width:0; }
.ag-sub-meta { display:flex; flex-wrap:wrap; gap:6px; align-items:center; margin-top:3px; font-size:12px; color:var(--muted); }
.ag-win { color:var(--muted); font-size:12px; }
.ag-who { color:var(--ink); font-size:12px; }
.ag-more { margin:2px 0 0; border-top:0; }
.ag-more > summary { font-size:12px; padding:3px 2px; }
.ag-own { padding:4px 0 6px; display:flex; flex-direction:column; gap:6px; }
.ag-add { margin-top:6px; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.ag-strip { border:1px solid var(--line); border-radius:10px; padding:8px 10px; margin-bottom:10px; background:var(--bg-2); }
.ag-strip-t { font-size:11.5px; font-weight:700; text-transform:uppercase; letter-spacing:.05em; color:var(--faint); margin-bottom:6px; }
.ag-strip-c, .ag-strip-n { display:flex; flex-wrap:wrap; gap:6px; }
.ag-strip-n { margin-top:6px; font-size:12px; }
.ag-sc { border:1px solid var(--line); border-radius:8px; padding:3px 8px; font-size:12px; background:#fff; }
.ag-sc b { font-family:var(--mono); font-size:11.5px; font-weight:600; }
.ag-sc.warn { border-color:var(--ink); }
.ag-scn { color:var(--muted); }
.ag-scn.warn { color:var(--ink); font-weight:600; }
.ag-table { border-top:1px solid var(--line); }
.ag-trow { display:grid; grid-template-columns:28px minmax(0,1fr) minmax(0,150px) minmax(0,130px); gap:10px; padding:8px 0; border-bottom:1px solid var(--line); font-size:13px; }
.ag-tn { color:var(--muted); }
.ag-tb { display:flex; gap:6px; margin-top:3px; }
.ag-tp { color:var(--ink); overflow-wrap:anywhere; }
.ag-tt { color:var(--muted); font-size:12px; }
@media (max-width: 640px) {
  .ag-trow { grid-template-columns:24px minmax(0,1fr); }
  .ag-tp, .ag-tt { grid-column:2; }
  .ag-sub-line .btn { flex:0 0 auto; }
  .ag-padd { max-width:none; }
}
@keyframes lineIn { from { background:#eef7e9; } to { background:transparent; } }
.live-line.is-new { animation: lineIn 2.4s ease-out; }
/* on a phone the composer comes first: the room chips and the board follow it */
@media (max-width:640px) { .live-wrap { display:flex; flex-direction:column; } .live-compose { order:-1; } }

/* ---- The image adjuster (2026-10-06): zoom & position a logo or photo in its fixed frame. Above every pop-up (100),
   under toasts (200). The stage shows a checker pattern where the picture does not reach, so empty space is visible. ---- */
.imgadj-scrim { position: fixed; inset: 0; z-index: 150; background: rgba(30,30,30,.55); display: grid; place-items: center; padding: 16px; }
.imgadj { background: var(--card); border-radius: var(--radius); padding: 18px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 12px; }
.imgadj-title { font-weight: 700; font-size: 16px; color: var(--ink); }
.imgadj-hint { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.imgadj-stage { position: relative; overflow: hidden; margin: 0 auto; box-sizing: content-box; border: 1px solid var(--line); cursor: grab; touch-action: none; outline: none;
  background: #fff repeating-conic-gradient(#F0F0EC 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.imgadj-stage:active { cursor: grabbing; }
.imgadj-stage:focus-visible { box-shadow: 0 0 0 3px var(--green-ink); }
.imgadj-stage.round { border-radius: 50%; }
.imgadj-stage canvas { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; user-select: none; }
.imgadj-zoom { width: 100%; accent-color: var(--green); }
.imgadj-out { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.imgadj-box { width: 120px; height: 32px; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; }
.imgadj-box img { width: 120px; height: 32px; object-fit: contain; object-position: center; }
.imgadj-box img:not([src]) { visibility: hidden; }

/* The live line under every start–end pair (js/clock.js, 2026-10-06): "9 h", "4 h · ends the next day", or what is
   missing — grey when the range is complete, ink when something needs the person's attention. */
.time-span { font-size: 12px; color: var(--muted); margin-top: 4px; line-height: 1.35; }
.time-span.is-off { color: var(--ink); font-weight: 600; }
.time-span:empty { display: none; }
/* A meeting card: one strip that says where its agenda, minutes and actual time stand (Meetings, 2026-10-06). */
.mtg-strip { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; margin-top: 10px; padding: 8px 12px; background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 10px; font-size: 12px; }
.mtg-strip > div { display: flex; align-items: center; gap: 6px; }
.mtg-strip > div > span:first-child { color: var(--muted); font-weight: 700; font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; }
.mtg-card.is-off { opacity: .72; }
/* The quick-add row is bottom-aligned (flex-end) so every box sits on one line. The live line under End used to add height to that one column, which lifted End above Date / Project / Domain / Start (Archaan, 2026-10-06). On a wide row the line now hangs below its box without taking any room, and the row reserves the space instead. On a phone every field is full width and the line stays in the flow. */
@media (min-width: 641px) {
  .ts-quick { padding-bottom: 20px; }
  .ts-quick .field { position: relative; }
  .ts-quick .field > .time-span { position: absolute; left: 0; top: 100%; margin-top: 3px; white-space: nowrap; }
}

/* ---- CLIENT HISTORY REPORT (js/story.js; screen styles — the print window carries ClientStory.PRINT_CSS) — tokens only, no new hue ---- */
.cs-report { max-width: 980px; }
.cs-banner { margin: 0 0 12px; font-size: 12.5px; }
/* The page scrolls inside .content, which has top padding, and a sticky box stops at the PADDING line — so the bar's offset is minus that padding (--cs-pt,
   the same three values .content uses) to stick at the very top edge instead of 16-22px below it, with scrolled text peeking over it. */
.cs-chips { --cs-pt: 22px; position: sticky; top: calc(-1 * var(--cs-pt)); z-index: 5; display: flex; gap: 6px; padding: 8px 0; margin: 0 0 8px; background: var(--bg); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cs-jump { flex: 0 0 auto; border: 1px solid var(--line); border-radius: 99px; padding: 4px 12px; font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; background: var(--card); color: var(--ink-2); white-space: nowrap; }
.cs-jump:hover { border-color: var(--green); color: var(--green-ink); }
.cs-jump:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.cs-sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0 0 12px; scroll-margin-top: 58px; }
.cs-h { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--green-ink); margin: 0 0 10px; font-weight: 700; }
.cs-narr p { margin: 0 0 6px; font-size: 14px; line-height: 1.55; }
.cs-figs { margin: 12px 0; }
.cs-fig[data-sd] { cursor: pointer; }
.cs-sub { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin: 14px 0 6px; }
.cs-sub2 { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.cs-line { margin: 0 0 8px; font-size: 13px; }
.cs-faint { color: var(--faint); }
.cs-empty { color: var(--muted); font-style: italic; font-size: 13px; }
.cs-tl { list-style: none; margin: 4px 0 6px; padding: 0 0 0 6px; }
.cs-tl li { position: relative; display: flex; gap: 12px; padding: 5px 0 5px 16px; border-left: 2px solid var(--line); }
.cs-tl li::before { content: ""; position: absolute; left: -6px; top: 11px; width: 10px; height: 10px; border-radius: 50%; background: var(--card); border: 2px solid var(--green); }
.cs-tl li[data-ref] { cursor: pointer; }
.cs-tl-d { flex: 0 0 104px; color: var(--muted); font-size: 12px; }
.cs-tl-t { font-size: 13px; }
.cs-und { color: var(--muted); font-size: 12px; margin-top: 6px; }
.cs-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 18px; }
.cs-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: .8px; color: var(--faint); font-weight: 700; }
.cs-v { font-weight: 600; font-size: 13.5px; overflow-wrap: anywhere; }
.cs-quote { border-left: 3px solid var(--line); padding: 4px 12px; white-space: pre-wrap; font-size: 13.5px; line-height: 1.55; }
.cs-table td, .cs-table th { vertical-align: top; }
.cs-table tr[data-ref] { cursor: pointer; }
.cs-table tr[data-ref]:hover { background: var(--bg-2); }
.cs-num { text-align: right; color: var(--faint); }
.cs-more { margin-top: 8px; }
.cs-dom-r { display: flex; align-items: center; gap: 10px; margin: 3px 0; }
.cs-dom-n { flex: 0 0 190px; font-size: 12.5px; }
.cs-bar { flex: 1; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.cs-bar i { display: block; height: 100%; background: var(--green); }
.cs-dom-v { flex: 0 0 30px; text-align: right; font-size: 12px; }
.cs-miss { margin: 0; padding-left: 18px; font-size: 13px; line-height: 1.6; }
@media (max-width: 900px) { .cs-chips { --cs-pt: 20px; } }
@media (max-width: 640px) {
  /* the floating account avatar (top-right, 36px) sits over the bar's right end — leave its room, like the update and way-back bars do; tap targets of a phone size */
  .cs-chips { --cs-pt: 16px; margin-right: 46px; }
  .cs-jump { padding: 9px 14px; font-size: 12.5px; min-height: 40px; }
  .cs-sec { padding: 12px; scroll-margin-top: 70px; }
  .grid-3.cs-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cs-tl-d { flex-basis: 86px; }
  .cs-tl li { flex-wrap: wrap; gap: 2px 12px; }
  .cs-dom-n { flex-basis: 110px; }
  .cs-table { font-size: 12px; }
}

/* ---- Notes, OneNote-style formatting (2026-10-29) ---- */
.nb-bar { display:flex; align-items:center; gap:4px; flex-wrap:wrap; padding:6px; margin-bottom:8px; border:1px solid var(--line); border-radius:10px; background:var(--bg-soft, #f6f5f1); position:sticky; top:-16px; z-index:5; }
.nb-btn { min-width:32px; height:32px; padding:0 9px; border:1px solid transparent; border-radius:7px; background:transparent; color:var(--ink); font:inherit; font-size:13px; cursor:pointer; display:inline-flex; align-items:center; justify-content:center; list-style:none; }
.nb-btn:hover, .nb-btn:focus-visible { background:#fff; border-color:var(--line); }
.nb-sel { height:32px; width:auto; min-width:0; padding:0 6px; font-size:13px; border:1px solid var(--line); border-radius:7px; background:#fff; }
.nb-sep { width:1px; align-self:stretch; background:var(--line); margin:3px 3px; }
.nb-pal { position:relative; }
.nb-pal summary::-webkit-details-marker { display:none; }
.nb-A { font-weight:700; border-bottom:3px solid var(--ink); line-height:1; padding:0 1px; }
.nb-A.nb-hl { background:#FFF3A3; border-bottom-color:transparent; }
.nb-sw { position:absolute; top:36px; left:0; z-index:10; display:flex; gap:6px; flex-wrap:wrap; width:196px; padding:8px; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:0 6px 20px rgba(0,0,0,.12); }
.nb-swatch { width:26px; height:26px; border-radius:6px; border:1px solid rgba(0,0,0,.18); cursor:pointer; padding:0; }
.nb-edit { min-height:340px; padding:14px 16px; border:1px solid var(--line); border-radius:10px; background:#fff; font-size:15px; line-height:1.6; outline:none; overflow-wrap:anywhere; }
.nb-edit:focus { border-color:var(--green-ink); }
.nb-edit:empty::before { content:attr(data-ph); color:var(--faint); }
.nb-edit h1 { font-size:24px; margin:10px 0 4px; } .nb-edit h2 { font-size:20px; margin:8px 0 4px; } .nb-edit h3 { font-size:17px; margin:6px 0 2px; }
.nb-edit ul, .nb-edit ol { margin:4px 0 4px 22px; padding:0; } .nb-edit hr { border:0; border-top:1px solid var(--line); margin:10px 0; }
.nb-edit img { max-width:100%; height:auto; border-radius:6px; cursor:pointer; vertical-align:top; margin:4px 0; }
.nb-edit img[data-w="25"] { width:25%; } .nb-edit img[data-w="50"] { width:50%; } .nb-edit img[data-w="75"] { width:75%; } .nb-edit img[data-w="100"] { width:100%; }
.nb-todo { position:relative; padding-left:28px; min-height:1.6em; }
.nb-todo::before { content:""; position:absolute; left:3px; top:.32em; width:15px; height:15px; border:2px solid var(--ink); border-radius:4px; background:#fff; cursor:pointer; box-sizing:border-box; }
.nb-todo[data-done="1"] { color:var(--muted); text-decoration:line-through; }
.nb-todo[data-done="1"]::before { background:var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3L13 4.5' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/11px no-repeat; border-color:var(--green); }
@media (max-width:640px) { .nb-bar { top:-12px; } .nb-btn { min-width:40px; height:40px; } .nb-sel { height:40px; } .nb-edit { min-height:260px; padding:12px; } .nb-sw { width:176px; } }

/* ---- Team KPI (2026-10-29) ---- */
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(210px, 1fr)); gap:12px; }
.kpi-tile .stat-label { display:flex; align-items:center; gap:6px; flex-wrap:wrap; text-transform:none; letter-spacing:0; font-size:13px; }
.kpi-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.kpi-label { min-width:130px; text-align:center; }
@media (max-width:640px) { .kpi-grid { grid-template-columns:1fr 1fr; gap:8px; } .kpi-label { min-width:0; } }
.kpi-actions select { width:auto; min-width:160px; flex:0 0 auto; }

/* ---- Team Chat (2026-10-29): WhatsApp-style, in the OS's own colours ---- */
.chat { display:grid; grid-template-columns:340px 1fr; height:calc(100vh - 190px); min-height:420px; border:1px solid var(--line); border-radius:14px; overflow:hidden; background:#fff; }
.chat-list { border-right:1px solid var(--line); display:flex; flex-direction:column; min-height:0; background:#fff; }
.chat-search { padding:10px; border-bottom:1px solid var(--line); }
#chatList { overflow-y:auto; flex:1; min-height:0; }
.chat-item { display:flex; align-items:center; gap:12px; width:100%; padding:10px 12px; border:0; border-bottom:1px solid var(--line); background:#fff; text-align:left; cursor:pointer; font:inherit; color:inherit; }
.chat-item:hover { background:var(--bg-soft, #f6f5f1); } .chat-item.active { background:#eef4ea; }
.chat-av { flex:0 0 auto; background:#E4E3DF; color:var(--ink); }
.chat-item-main { flex:1; min-width:0; display:flex; flex-direction:column; gap:3px; }
.chat-item-top, .chat-item-bot { display:flex; justify-content:space-between; align-items:center; gap:8px; min-width:0; }
.chat-item-top b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; } .chat-when { font-size:11.5px; color:var(--faint); flex:0 0 auto; }
.chat-pre { font-size:13px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; min-width:0; }
.chat-unread { flex:0 0 auto; min-width:20px; height:20px; padding:0 6px; border-radius:10px; background:var(--green); color:#1E1E1E; font-size:11.5px; font-weight:700; display:inline-flex; align-items:center; justify-content:center; }
.chat-empty-list { padding:20px 14px; color:var(--muted); font-size:13px; text-align:center; }
.chat-pane { display:flex; flex-direction:column; min-width:0; min-height:0; background:#EFEEE9; }
.chat-pane.empty .chat-composer, .chat-pane.empty .chat-head { display:none; }
.chat-head { display:flex; align-items:center; gap:10px; padding:8px 12px; background:#fff; border-bottom:1px solid var(--line); }
.chat-head-t { display:flex; flex-direction:column; min-width:0; } .chat-head-t b, .chat-head-t span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-back { display:none; }
.chat-msgs { flex:1; overflow-y:auto; padding:14px 16px; min-height:0; }
.chat-empty { height:100%; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; text-align:center; color:var(--muted); padding:20px; }
.chat-note { text-align:center; font-size:12px; color:var(--muted); background:#fff; border-radius:8px; padding:6px 10px; margin:0 auto 12px; max-width:420px; }
.chat-day { text-align:center; margin:12px 0 8px; } .chat-day span { font-size:12px; background:#fff; color:var(--muted); padding:3px 11px; border-radius:10px; }
.chat-row { display:flex; margin-bottom:4px; } .chat-row.out { justify-content:flex-end; }
.chat-bubble { position:relative; max-width:min(560px, 78%); padding:6px 9px 4px; border-radius:10px; background:#fff; box-shadow:0 1px 1px rgba(0,0,0,.08); overflow-wrap:anywhere; }
.chat-row.out .chat-bubble { background:#DCEFD0; }
.chat-bubble.failed { outline:2px solid var(--ink); cursor:pointer; }
.chat-who { font-size:12px; font-weight:700; color:var(--green-ink, #357320); margin-bottom:2px; }
.chat-text { font-size:14.5px; line-height:1.45; white-space:normal; } .chat-text a { color:var(--green-ink, #357320); text-decoration:underline; }
.chat-meta { font-size:11px; color:var(--muted); text-align:right; margin-top:2px; } .chat-read { color:var(--green-ink, #357320); }
.chat-quote { border-left:3px solid var(--green); background:rgba(0,0,0,.05); border-radius:6px; padding:4px 8px; margin-bottom:4px; font-size:12.5px; color:var(--muted); display:flex; flex-direction:column; }
.chat-quote b { color:var(--ink); font-size:12px; }
.chat-reply-btn { position:absolute; top:2px; right:-2px; transform:translateX(100%); display:none; border:0; background:transparent; color:var(--muted); font-size:12px; cursor:pointer; padding:2px 6px; }
.chat-row.in .chat-reply-btn { right:auto; left:auto; } .chat-bubble:hover .chat-reply-btn { display:block; }
.chat-row.out .chat-reply-btn { transform:translateX(-100%); left:0; right:auto; }
.chat-replying { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:6px 12px; background:#fff; border-top:1px solid var(--line); font-size:13px; } .chat-replying div { display:flex; flex-direction:column; min-width:0; } .chat-replying span { color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.chat-composer { display:flex; align-items:flex-end; gap:8px; padding:8px 10px; background:#fff; border-top:1px solid var(--line); }
.chat-composer textarea { flex:1; resize:none; min-height:0; height:42px; max-height:140px; border:1px solid var(--line); border-radius:20px; padding:9px 14px; font:inherit; font-size:15px; line-height:1.4; }
.chat-people { max-height:46vh; overflow-y:auto; }
.chat.audit .chat-composer, .chat.audit #chatReply { display:none; }
.chat-audit-note { border:1px solid var(--line); }
@media (max-width:900px) { .chat { grid-template-columns:280px 1fr; } }
@media (max-width:640px) {
  .chat { grid-template-columns:1fr; height:calc(100vh - 230px); border-radius:10px; }
  .chat-pane { display:none; } .chat.show-chat .chat-list { display:none; } .chat.show-chat .chat-pane { display:flex; }
  .chat-back { display:inline-flex; } .chat-bubble { max-width:86%; } .chat-reply-btn { display:block; position:static; transform:none; font-size:11px; padding:0; margin-top:2px; }
}

/* ---- MY WORK IN THREE PRIORITY BANDS (js/tiers.js; Archaan 2026-10-11) — tokens only, no new hue ---- */
.mw-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; margin: 0 0 16px; }
.mw-tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.mw-tl { font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); font-weight: 700; margin: 0 0 8px; }
.mw-ring { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.mw-ringfig { flex: 0 0 auto; line-height: 0; border-radius: 50%; cursor: pointer; }
.mw-ringfig:focus-visible, .mw-dg:focus-visible, .mw-chip:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.mw-act { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
.mw-off { color: var(--muted); font-size: 13px; line-height: 1.5; }
.mw-start { max-width: 100%; white-space: normal; text-align: left; line-height: 1.35; }
.mw-prior { margin-top: 6px; line-height: 1.6; }
.mw-prior .mw-chips { display: inline-flex; vertical-align: middle; }
.mw-split { margin: 4px 0 10px; }
.mw-chips { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.mw-chip { display: flex; flex-direction: column; gap: 1px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; min-width: 0; }
.mw-chip b { font-size: 15px; font-weight: 800; line-height: 1.15; }
.mw-chip span { font-size: 11.5px; color: var(--muted); }
.mw-chip:hover, .mw-dg:hover { border-color: var(--green); }
.mw-bands { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; margin: 0 0 16px; align-items: start; }
.mw-band { background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius); padding: 14px 16px; min-width: 0; }
.mw-band.urgent { border-left-color: var(--ink); }
.mw-bh { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.mw-medal { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.mw-bt { flex: 1 1 200px; min-width: 0; }
.mw-bn { font-weight: 800; font-size: 15px; }
.mw-bp { color: var(--muted); font-size: 12px; }
.mw-digits { display: flex; gap: 8px; flex-wrap: wrap; }
.mw-dg { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 84px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); cursor: pointer; }
.mw-dg-v { font-size: 18px; font-weight: 800; line-height: 1.1; }
.mw-dg-l { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; }
.mw-share { display: flex; align-items: center; gap: 10px; margin: 10px 0 4px; }
.mw-share .progress { flex: 0 1 160px; min-width: 70px; }
.mw-do { margin-top: 6px; }
.mw-empty { color: var(--muted); font-size: 13px; padding: 8px 0; }
.mw-all { margin-top: 4px; }
.mw-body { margin-top: 12px; padding-top: 4px; border-top: 1px solid var(--line-2); }
.mw-mod { display: inline-block; border: 1px solid var(--line); border-radius: 8px; padding: 0 6px; font-size: 10.5px; color: var(--muted); }
.mw-tabs { display: none; }
.mw-flow { display: flex; flex-direction: column; }
.mw-flow .mw-hero { order: 1; } .mw-flow .mw-tabs { order: 2; } .mw-flow .mw-page { order: 3; }
.mw-ts-act { margin-top: 8px; }
.ts-morechips > summary { list-style: none; cursor: pointer; display: inline-flex; }
.ts-morechips > summary::-webkit-details-marker { display: none; }
.ts-morechips[open] { flex-basis: 100%; }
@media (min-width: 1100px) { .mw-bands { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mw-band[data-tier="clients"] { grid-column: 1 / -1; } }
@media (max-width: 1100px) { .mw-hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } .mw-hero .mw-tile:nth-child(2) { grid-column: 1 / -1; order: 3; } }
@media (max-width: 640px) {
  .mw-hero { grid-template-columns: minmax(0, 1fr); }
  .mw-tabs { --mw-pt: 16px; display: flex; gap: 6px; margin: 0 0 12px; position: sticky; top: calc(-1 * var(--mw-pt)); z-index: 5; background: var(--bg); padding: 6px 46px 6px 0; }
  .mw-tabs .pill { flex: 1 1 0; text-align: center; min-height: 40px; }
  .mw-page[data-tier="clients"] .mw-band:not([data-tier="clients"]),
  .mw-page[data-tier="scalact"] .mw-band:not([data-tier="scalact"]),
  .mw-page[data-tier="skills"] .mw-band:not([data-tier="skills"]) { display: none; }
  .mw-band { padding: 12px; }
  /* a phone reads the priority first: the tab strip and the bands, then the day / week / habits tiles */
  .mw-flow .mw-tabs { order: 1; } .mw-flow .mw-page { order: 2; } .mw-flow .mw-hero { order: 3; margin-top: 4px; }
  .mw-dg { min-width: 76px; flex: 1 1 0; }
  .mw-digits { width: 100%; }
}

/* ---- Knowledge Bank · the Build tracker (2026-10-12). Tokens only — black / green / one grey. ---- */
.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-row { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 14px; align-items: start; padding: 11px 14px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; cursor: pointer; }
.kb-row:hover { border-color: var(--ink); }
.kb-row.nobar { padding-bottom: 11px; }
.kb-row:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.kb-title { font-size: 14px; line-height: 1.35; overflow-wrap: anywhere; }
.kb-code { color: var(--muted); font-size: 12px; margin-right: 4px; }
.kb-flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.kb-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.kb-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.kb-when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.kb-bar { position: absolute; left: 14px; right: 14px; bottom: 6px; height: 3px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.kb-bar > span { display: block; height: 100%; background: var(--green); }
.kb-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.kb-more { gap: 4px; align-items: center; }
.kb-making .kb-row { padding: 9px 12px 12px; }
.kb-facts { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; }
.kb-fact b { margin-left: 4px; }
.kb-hist { font-size: 13px; line-height: 1.5; padding: 3px 0; border-top: 1px solid var(--line-2); }
.kb-phase { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 8px 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.kb-phase .span-2 { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .kb-row { grid-template-columns: minmax(0, 1fr); padding-right: 12px; }
  .kb-side { align-items: flex-start; text-align: left; }
  .kb-badges { justify-content: flex-start; }
  .kb-phase { grid-template-columns: minmax(0, 1fr); }
  .kb-filters select, .kb-filters input { flex: 1 1 100% !important; }
}

/* ---- Knowledge Bank dashboard (stage 5c): figures, what to decide now, health bar, groups with a progress line, the panel under them ---- */
.kb-figs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .kb-figs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kb-figs { gap: 8px; } .kb-figs .stat { padding: 12px 12px; } .kb-figs .stat .stat-value { font-size: 22px; } }
.kb-overall { display: flex; align-items: center; gap: 12px; }
.kb-overall .progress { flex: 1 1 auto; min-width: 0; }
.kb-ins { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 10px 2px; border-top: 1px solid var(--line-2); }
.kb-ins:first-of-type { border-top: 0; }
.kb-ins[role="button"], .kb-ins[data-sd] { cursor: pointer; }
.kb-ins[role="button"]:hover, .kb-ins[data-sd]:hover { background: var(--bg-2); }
.kb-ins:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.kb-ins .hdot { margin-top: 5px; }
.kb-ins-t { font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.kb-ins.attention .kb-ins-t { font-weight: 600; color: var(--ink); }
.kb-ins-go { color: var(--faint); font-weight: 700; }
.kb-hbar { display: flex; height: 12px; border-radius: 8px; overflow: hidden; background: var(--line-2); }
.kb-hbar i { display: block; height: 100%; }
.kb-hbar i.od, .kb-leg i.od { background: var(--ink); }
.kb-hbar i.d7, .kb-leg i.d7 { background: var(--muted); }
.kb-hbar i.ok, .kb-leg i.ok { background: var(--green); }
.kb-hbar i.nd, .kb-leg i.nd { background: var(--line); }
.kb-hbar i.dn, .kb-leg i.dn { background: var(--green-ink); }
.kb-legs { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.kb-leg { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 12.5px; color: var(--text-soft); background: none; border: 0; padding: 4px 2px; cursor: pointer; }
.kb-leg:hover { color: var(--ink); }
.kb-leg:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; border-radius: 4px; }
.kb-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
/* the badge column is a FIXED width: with `auto` it took each row's own badges' width, so the progress bar and the count sat at a different place on every row */
.kb-grp { display: grid; grid-template-columns: minmax(0, 1fr) 150px 56px 188px; gap: 4px 14px; align-items: center; padding: 11px 6px; border-top: 1px solid var(--line-2); cursor: pointer; border-radius: 8px; }
.kb-grp:first-of-type { border-top: 0; }
.kb-grp:hover { background: var(--bg-2); }
.kb-grp.on { background: var(--bg-2); box-shadow: inset 3px 0 0 var(--green); }
.kb-grp:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.kb-sc { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 6px 14px; align-items: center; padding: 10px 6px; border-top: 1px solid var(--line-2); }
.kb-sc:first-of-type { border-top: 0; }
.kb-sc-t .cell-strong, .kb-sc-t .cell-sub { overflow-wrap: anywhere; }
.kb-sc-c { display: flex; flex-wrap: wrap; gap: 6px; }
.kb-chip { font: inherit; font-size: 12px; font-family: var(--mono); padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.kb-chip:hover { border-color: var(--ink); }
.kb-chip:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.kb-chip.off { color: var(--muted); border-style: dashed; cursor: default; }
.kb-chip.open { color: var(--muted); }
.kb-sc-b { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; text-align: right; }
.kb-del { color: var(--ink); }
.kb-del:hover { border-color: var(--ink); }
/* where the Library is thin: domain x shelf */
.kb-covt { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.5px; }
.kb-covt th { text-align: center; font-size: 11.5px; font-weight: 600; color: var(--muted); padding: 6px 4px; white-space: nowrap; }
.kb-covt th:first-child, .kb-covt td:first-child { text-align: left; position: sticky; left: 0; background: var(--card); z-index: 1; padding-right: 10px; white-space: nowrap; }
.kb-covt td { padding: 3px; text-align: center; border-top: 1px solid var(--line-2); }
.kb-cov { box-sizing: border-box; padding: 0; font: inherit; font-family: var(--mono); font-size: 12px; min-width: 34px; height: 28px; border-radius: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.kb-cov:hover { border-color: var(--ink); }
.kb-cov:focus-visible { outline: 2px solid var(--green-ink); outline-offset: 2px; }
.kb-cov.empty { color: var(--faint); border-style: dashed; background: transparent; }
@media (max-width: 640px) { .kb-sc { grid-template-columns: minmax(0, 1fr); } }
.kb-gl { min-width: 0; }
.kb-gl .cell-strong, .kb-gl .cell-sub { overflow-wrap: anywhere; }
.kb-gb { height: 6px; border-radius: 6px; background: var(--line-2); overflow: hidden; }
.kb-gb > span { display: block; height: 100%; background: var(--green); }
.kb-gn { font-size: 12.5px; text-align: right; color: var(--text-soft); }
.kb-gf { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; min-width: 0; }
.kb-gnote { grid-column: 1 / -1; }
.kb-panel { border-color: var(--ink); scroll-margin-top: 12px; }
@media (max-width: 720px) {
  .kb-grp { grid-template-columns: minmax(0, 1fr) 48px; }
  .kb-gb { grid-column: 1 / -1; order: 3; }
  .kb-gf { grid-column: 1 / -1; order: 4; justify-content: flex-start; }
  .kb-gn { text-align: right; }
  .kb-ins { grid-template-columns: 12px minmax(0, 1fr); }
  .kb-ins-go { display: none; }
}
.kb-hbar i.oh, .kb-leg i.oh { background: var(--faint); }
/* pasted links and long names wrap inside their row and window — never push the page sideways at 375px */
.kb-facts, .kb-fact, .kb-hist, .kb-row .cell-sub, .kb-title, .kb-gl, .kb-ins-t, .kb-flags { overflow-wrap: anywhere; min-width: 0; }

/* Skill Review — the quarter commitment (requirement 5). Priority 3 of 3: quiet by design — green for done / on track, one grey for everything else, never black attention. */
.sp-chips, .sp-ways { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.sp-chip { font: inherit; font-size: 12.5px; padding: 7px 12px; min-height: 36px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.sp-chip:hover:not(:disabled) { border-color: var(--green); }
.sp-chip.on { background: var(--green-tint); border-color: var(--green); color: var(--green-ink); font-weight: 600; }
.sp-chip:disabled { opacity: .45; cursor: default; }
.sp-chip-n { color: var(--muted); font-size: 11px; }
.sp-chip-why { color: var(--muted); font-size: 11px; font-weight: 400; }
.sp-other { margin: 4px 0 10px; }
.sp-other select { width: auto; max-width: 100%; }
.sp-draft-skill { margin: 10px 0; padding: 12px 14px; }
.sp-lvl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.sp-lvl select { width: auto; }
.sp-dline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.sp-dm { flex: 0 0 120px; font-size: 12.5px; font-weight: 600; }
.sp-dline input:not([type=date]) { flex: 1 1 200px; min-width: 0; width: auto; }
.sp-dline select, .sp-dline input[type=date] { flex: 0 0 auto; width: auto; }
.sp-sum { margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--bg); font-size: 13px; line-height: 1.5; }
.sp-empty { padding: 18px; }
.sp-head { margin-bottom: 12px; }
.sp-weeks { display: grid; grid-template-columns: repeat(13, minmax(0, 1fr)); gap: 4px; margin: 10px 0 6px; }
.sp-wk { display: block; height: 14px; border-radius: 4px; background: var(--slate-200); border: 1px solid transparent; }
.sp-wk.logged { background: var(--green); }
.sp-wk.missed { background: transparent; border-color: var(--muted); }
.sp-wk.now { background: transparent; border-color: var(--green); border-style: dashed; }
.sp-wk.before { background: transparent; border-color: var(--line); }
.sp-wk.future { background: var(--slate-200); opacity: .5; }
.sp-legend { display: flex; gap: 14px; flex-wrap: wrap; }
.sp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.sp-legend .sp-wk { display: inline-block; width: 18px; height: 10px; }
.sp-skill { margin-top: 12px; }
.sp-bar { display: flex; align-items: center; gap: 12px; margin: 8px 0 4px; }
.sp-bar .progress { flex: 1 1 auto; }
.sp-line { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.sp-lhead { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.sp-lm { font-size: 12.5px; font-weight: 600; flex: 0 0 auto; }
.sp-lt { min-width: 0; overflow-wrap: anywhere; }
.sp-lmeta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.sp-more { border-top: 0; margin: 6px 0 0; padding-top: 0; }
.sp-more-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.sp-more-row input { flex: 1 1 200px; min-width: 0; width: auto; }
.sp-more-row select { width: auto; }
/* the suggested ways to learn a skill (Suggest ways to learn it) */
.sp-sug { margin: 8px 0 4px; }
.sp-sug-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.sp-sug-row > div { min-width: 0; overflow-wrap: anywhere; }
.sp-sess { margin-top: 4px; }
@media (max-width: 640px) {
  .sp-dm { flex-basis: 100%; }
  .sp-weeks { gap: 3px; }
  .sp-chip { min-height: 44px; }
  .sp-lmeta .btn { min-height: 44px; }
}

/* ScalAct Intelligence idea cards (Knowledge Bank dashboard) — the app's own tokens, no new hue */
.kb-idea { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 8px 0; background: var(--bg); }
.kb-idea-h { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.kb-idea-t { font-weight: 600; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.kb-idea-w { font-size: 13px; line-height: 1.6; color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.kb-idea-steps { margin: 8px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
.kb-idea-s { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kb-src { display: inline-flex; max-width: 100%; align-items: center; gap: 2px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; color: var(--ink); text-decoration: none; overflow: hidden; white-space: nowrap; }
.kb-src span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.kb-idea-a { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.kb-idea-btns { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.kb-idea-auto { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
@media (max-width: 640px) {
  .card-head:has(.kb-idea-btns) { flex-wrap: wrap; }
  .card-head:has(.kb-idea-btns) .kb-idea-btns { width: 100%; justify-content: flex-start; }
}
/* MONEY (Finance, 2026-11-23): the sheet-style Income / Expense lists. The grey row is a month held only as a sheet total (total only, never a GST figure). */
.money-table .money-row { cursor: pointer; }
.money-table .money-row:hover { background: var(--bg-2); }
.money-table .money-acts { white-space: nowrap; text-align: right; }
.money-table tfoot td { border-top: 2px solid var(--line); background: var(--bg); }
.money-table .money-sheet td { background: var(--bg); color: var(--muted); font-style: italic; }
.money-table .money-drift td { background: var(--green-tint); color: var(--ink); font-style: normal; border-left: 3px solid var(--ink); }
@media (max-width: 640px) {
  .money-table thead { display: none; }
  .money-table, .money-table tbody, .money-table tr, .money-table td, .money-table tfoot { display: block; width: 100%; }
  .money-table .money-row { padding: 10px 12px; border-bottom: 1px solid var(--line); }
  .money-table .money-row td { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border: 0; text-align: right; }
  .money-table .money-row td::before { content: attr(data-l); color: var(--muted); font-weight: 600; text-align: left; flex: 0 0 auto; }
  .money-table .money-row td[data-l="Client"], .money-table .money-row td[data-l="Source"] { font-weight: 700; }
  .money-table .money-acts { justify-content: flex-end; }
  .money-table .money-acts .btn-text { min-height: 44px; padding: 0 14px; }
  .money-table .money-sheet td { display: block; text-align: left; padding: 8px 12px; }
  .money-table tfoot td { display: flex; justify-content: space-between; padding: 4px 12px; }
  .money-table tfoot td[data-l]::before { content: attr(data-l); color: var(--muted); font-weight: 600; text-align: left; flex: 0 0 auto; }
  .money-table tfoot td:empty, .money-table .money-sheet td:empty { display: none; }
}
