/* Mission Control v2 — Solva brand system. Near-monochrome cinematic, one orange whisper.
   Dark (default) + Light, both AA-safe. CVD-safe status scale (icon + word, never hue alone).
   Design language extracted verbatim from thesolvagroup.com (see BRAND.md). */

/* ---------------- Brand constants (theme-independent) ---------------- */
:root {
  --sans: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --mono: 'Spline Sans Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --orange: #E0742A;        /* the single brand accent — "the whisper" */
  --orange-2: #F0A363;      /* orange TEXT on dark (9.4:1 AAA) */
  --orange-ink: #8A4413;    /* orange TEXT on light (6.5:1 AA) — never plain --orange on paper */
  --orange-glow: rgba(224,116,42,.45);

  --ease: cubic-bezier(.16,1,.3,1);          /* ease-out-expo */
  --ease-ios: cubic-bezier(.32,.72,0,1);     /* Apple sheet motion (drawers) */
  --ease-cine: cubic-bezier(.22,.61,.36,1);  /* slower cinematic */
  --spring: cubic-bezier(.34,1.56,.64,1);    /* drop settle overshoot */
  --radius: 14px;
  --btn-radius: 4px;
  --nav-w: 236px;
}

/* ---------------- DARK theme (default) ---------------- */
:root, :root[data-theme="dark"] {
  --bg: #0D0D0F;
  --bg2: #1C1C1F;                 /* input surface — a hair above panel for edge legibility */
  --panel: #141416;
  --panel-solid: #141416;
  --panel-hi: rgba(255,255,255,0.06);
  --ring: rgba(255,255,255,0.14);
  --ring-str: rgba(255,255,255,0.28);
  --ink: #F4F3F1;                 /* 17.5:1 */
  --ink-dim: #B9B9BD;             /* 9.9:1 */
  --ink-faint: #9A9A9E;           /* 6.9:1 — captions/ages, never long body */
  --accent: var(--orange);        /* interactive: primary CTA, focus, nav bar */
  --accent-2: var(--orange-2);    /* accent TEXT / links */
  --cyan-2: #4CC9E0;              /* Jordan's identity as TEXT on dark (≥7:1) — pair with initials, never colour-alone */

  --ok: #108FAB;   --ok-bg: rgba(16,143,171,0.15);  --ok-ring: rgba(16,143,171,0.44);  --ok-fg: #79d7ec;
  --warn: #E0742A; --warn-bg: rgba(224,116,42,0.15); --warn-ring: rgba(224,116,42,0.44); --warn-fg: #f3b98a;
  --down: #E0603F; --down-bg: rgba(120,32,16,0.52); --down-ring: rgba(214,86,58,0.55);  --down-fg: #ffb7a6;
  --idle: #9A9A9E; --idle-bg: rgba(154,154,158,0.14); --idle-ring: rgba(154,154,158,0.34); --idle-fg: #c8c8cc;

  --shadow: 0 1px 0 rgba(255,255,255,0.05) inset, 0 14px 38px -16px rgba(0,0,0,0.7), 0 2px 8px -4px rgba(0,0,0,0.55);
  --shadow-lift: 0 22px 50px -20px rgba(0,0,0,0.8);
  --bg-glow-1: rgba(224,116,42,0.10);
  --bg-glow-2: rgba(224,116,42,0.05);
  --sel: rgba(224,116,42,0.30);
  color-scheme: dark;
}

/* ---------------- LIGHT theme (warm paper) ---------------- */
:root[data-theme="light"] {
  --bg: #F4F3F1;
  --bg2: #FFFFFF;
  --panel: #FFFFFF;
  --panel-solid: #FFFFFF;
  --panel-hi: rgba(0,0,0,0.05);
  --ring: #E2DFD9;
  --ring-str: #D3CFC7;
  --ink: #141416;                 /* 16.9:1 */
  --ink-dim: #5C5C60;             /* 6.0:1 */
  --ink-faint: #6E6A62;           /* ~5:1 */
  --accent: var(--orange);        /* fills/graphics only on light */
  --accent-2: var(--orange-ink);  /* orange TEXT on light must be the ink variant */
  --cyan-2: #0E7490;              /* Jordan's identity as TEXT on light (~4.9:1 on white) */

  --ok: #0E7C93;   --ok-bg: rgba(16,143,171,0.13);  --ok-ring: rgba(14,124,147,0.42);  --ok-fg: #0B6076;
  --warn: #B4551A; --warn-bg: rgba(224,116,42,0.14); --warn-ring: rgba(180,85,26,0.5);  --warn-fg: #8A4413;
  --down: #B23A22; --down-bg: rgba(178,58,34,0.11); --down-ring: rgba(178,58,34,0.42);  --down-fg: #8E2C16;
  --idle: #7A776F; --idle-bg: rgba(92,92,96,0.10);  --idle-ring: rgba(92,92,96,0.3);    --idle-fg: #5C5C60;

  --shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 16px 40px -22px rgba(30,24,18,0.28), 0 2px 8px -5px rgba(30,24,18,0.16);
  --shadow-lift: 0 24px 54px -24px rgba(30,24,18,0.32);
  --bg-glow-1: rgba(224,116,42,0.10);
  --bg-glow-2: rgba(224,116,42,0.04);
  --sel: rgba(224,116,42,0.24);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--sans);
  background:
    radial-gradient(1100px 620px at 82% -10%, var(--bg-glow-1), transparent 60%),
    radial-gradient(900px 520px at -8% 110%, var(--bg-glow-2), transparent 55%),
    var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: 0.1px;
}
::selection { background: var(--sel); }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 3px; }

/* Theme crossfade (View Transitions API) — 250ms, no flash. */
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 250ms; }

/* Signature eyebrow / label voice — mono, wide-tracked, uppercase. */
.eyebrow, .label, .k, .kcolhead, .krailhead, .dwkind, .dwsub, .prosec, .bellage, .section-title, .stat .label {
  font-family: var(--mono);
}

/* Film grain (login + empty states only — never data-dense views). */
.grain {
  position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: .05; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
/* Orange hairline rule — the site's signature section punctuation. */
.hair { width: 46px; height: 1px; background: var(--orange); border: 0; display: block; }

/* ---------------- Layout ---------------- */
#app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--nav-w); flex: 0 0 var(--nav-w); position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px; padding: 22px 14px;
  background: color-mix(in srgb, var(--bg) 82%, var(--panel) 18%);
  border-right: 1px solid var(--ring); backdrop-filter: blur(12px);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 4px 8px 20px; }
.brand .mark {
  width: 34px; height: 34px; border-radius: 8px; flex: 0 0 34px; overflow: hidden;
  display: grid; place-items: center; position: relative;
  box-shadow: 0 6px 16px -8px var(--orange-glow), inset 0 1px 0 rgba(255,255,255,0.35);
}
.brand .mark svg { width: 34px; height: 34px; display: block; }
.brand .name { font-weight: 600; font-size: 15px; letter-spacing: 0.2px; font-stretch: 108%; }
.brand .name .olva { color: var(--orange); }
.brand .name small {
  display: block; font-family: var(--mono); font-weight: 500; font-size: 9.5px; color: var(--ink-faint);
  letter-spacing: 2.4px; text-transform: uppercase; margin-top: 3px;
}

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; position: relative; }
.nav-ind { position: absolute; left: -14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--orange);
  box-shadow: 0 0 12px var(--orange); transition: top .28s var(--ease), height .28s var(--ease); opacity: 0; }
.nav-ind.on { opacity: 1; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 9px;
  color: var(--ink-dim); font-weight: 500; font-size: 13.5px; cursor: pointer;
  transition: color .16s var(--ease), background .16s var(--ease); border: 1px solid transparent; position: relative;
}
.nav a .ico { width: 18px; height: 18px; opacity: .82; flex: 0 0 18px; }
.nav a:hover { color: var(--ink); background: var(--panel-hi); }
.nav a.active { color: var(--ink); background: color-mix(in srgb, var(--orange) 12%, transparent); }
.nav a.active .ico { opacity: 1; }
.nav a .badge { margin-left: auto; font-size: 10px; padding: 1px 7px; border-radius: 999px; background: var(--down-bg); color: var(--down-fg); border: 1px solid var(--down-ring); font-weight: 700; font-family: var(--mono); }
.nav-spacer { flex: 1; }

/* Theme toggle — sun/moon segmented control */
.theme-seg { display: flex; gap: 3px; padding: 3px; border-radius: 9px; background: var(--panel-hi); border: 1px solid var(--ring); margin-bottom: 8px; }
.theme-seg button { flex: 1; display: grid; place-items: center; gap: 4px; background: none; border: none; color: var(--ink-faint); padding: 6px; border-radius: 6px; cursor: pointer; transition: all .16s var(--ease); }
.theme-seg button svg { width: 15px; height: 15px; }
.theme-seg button:hover { color: var(--ink-dim); }
.theme-seg button.on { color: var(--ink); background: color-mix(in srgb, var(--orange) 16%, var(--panel)); box-shadow: inset 0 1px 0 var(--panel-hi); }

.userbox { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 11px; background: var(--panel-hi); border: 1px solid var(--ring); cursor: pointer; transition: background .15s var(--ease), border-color .15s var(--ease); }
.userbox:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); border-color: var(--ring-str); }
.avatar { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(150deg, var(--orange), #a5540f); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,0.35); }
.userbox .who { font-size: 13px; font-weight: 600; line-height: 1.1; }
.userbox .who small { display: block; color: var(--ink-faint); font-weight: 500; font-size: 11px; }
.userbox .logout { margin-left: auto; background: none; border: none; color: var(--ink-faint); cursor: pointer; padding: 6px; border-radius: 7px; transition: all .15s var(--ease); }
.userbox .logout:hover { color: var(--ink); background: var(--panel-hi); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: 17px 28px 15px; backdrop-filter: blur(16px) saturate(1.2);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--ring);
}
.topbar h1 { font-size: 20px; margin: 0; font-weight: 430; letter-spacing: -0.02em; font-stretch: 112%; }
.topbar .sub { font-family: var(--mono); color: var(--ink-faint); font-size: 11px; margin-top: 3px; letter-spacing: 0.18em; text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.refresh-wrap { display: flex; align-items: center; gap: 10px; color: var(--ink-faint); font-size: 12px; }
.refresh-wrap .lastup { font-family: var(--mono); font-size: 10.5px; letter-spacing: .04em; }
.sweep { width: 88px; height: 3px; border-radius: 999px; background: var(--panel-hi); overflow: hidden; position: relative; }
.sweep i { position: absolute; inset: 0; transform-origin: left; background: linear-gradient(90deg, var(--orange), var(--orange-2)); animation: sweep 60s linear infinite; }
@keyframes sweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.btn-refresh { background: var(--panel-hi); border: 1px solid var(--ring); color: var(--ink); border-radius: var(--btn-radius); padding: 7px 11px; font-size: 12.5px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; transition: all .15s var(--ease); }
.btn-refresh:hover { background: color-mix(in srgb, var(--ink) 8%, transparent); border-color: var(--ring-str); transform: translateY(-1px); }
.btn-refresh:active { transform: scale(.985); }
.btn-refresh.spin svg { animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ⌘K launcher hint button in topbar */
.cmdk-hint { display: inline-flex; align-items: center; gap: 7px; background: var(--panel-hi); border: 1px solid var(--ring); color: var(--ink-faint); border-radius: var(--btn-radius); padding: 7px 11px; font-size: 12px; cursor: pointer; transition: all .15s var(--ease); }
.cmdk-hint:hover { color: var(--ink-dim); border-color: var(--ring-str); }
.cmdk-hint kbd { font-family: var(--mono); font-size: 10.5px; background: var(--bg2); border: 1px solid var(--ring); border-radius: 4px; padding: 1px 5px; color: var(--ink-dim); }

.content { padding: 26px 28px 64px; max-width: 1500px; width: 100%; }
.view { animation: viewin .16s var(--ease); }
@keyframes viewin { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------------- Surfaces ---------------- */
.panel { background: var(--panel); border: 1px solid var(--ring); border-radius: var(--radius); box-shadow: var(--shadow); position: relative; }
.panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: linear-gradient(90deg, transparent, var(--panel-hi), transparent); border-radius: var(--radius) var(--radius) 0 0; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.g-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.section-title { display: flex; align-items: center; gap: 12px; margin: 28px 2px 13px; font-size: 10.5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.24em; color: var(--ink-faint); }
.section-title:first-child { margin-top: 4px; }
.section-title::before { content: ""; width: 20px; height: 1px; background: var(--orange); flex: 0 0 20px; }
.section-title .line { flex: 1; height: 1px; background: linear-gradient(90deg, var(--ring), transparent); }

/* ---------------- Status chip (CVD-safe: colour + icon + WORD) ---------------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em; border: 1px solid; white-space: nowrap; text-transform: uppercase; }
.chip .ic { font-size: 11px; line-height: 1; font-family: var(--sans); }
.chip.ok { color: var(--ok-fg); background: var(--ok-bg); border-color: var(--ok-ring); }
.chip.warn { color: var(--warn-fg); background: var(--warn-bg); border-color: var(--warn-ring); }
.chip.down { color: var(--down-fg); background: var(--down-bg); border-color: var(--down-ring); }
.chip.idle { color: var(--idle-fg); background: var(--idle-bg); border-color: var(--idle-ring); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; position: relative; flex: 0 0 9px; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.dot.warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.dot.down { background: var(--down); box-shadow: 0 0 0 3px var(--down-bg); }
.dot.idle { background: var(--idle); box-shadow: 0 0 0 3px var(--idle-bg); }
.dot.live::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 2px solid currentColor; opacity: .55; animation: ping 1.8s var(--ease) infinite; }
.dot.ok.live { color: var(--ok); } .dot.warn.live { color: var(--warn); }
@keyframes ping { 0% { transform: scale(1); opacity: .55; } 70%,100% { transform: scale(2.1); opacity: 0; } }

/* ---------------- Stat tiles ---------------- */
.stat { padding: 17px 18px; }
.stat .label { color: var(--ink-faint); font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.18em; }
.stat .value { font-size: 30px; font-weight: 300; margin-top: 8px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; font-stretch: 105%; }
.stat .value.sm { font-size: 22px; }
.stat .foot { color: var(--ink-faint); font-size: 12px; margin-top: 6px; }
.stat .accent { color: var(--accent-2); }
/* settle-flash — a single background pulse when a polled value changed. */
.flash { animation: flashpulse 1s var(--ease) 1; border-radius: 6px; }
@keyframes flashpulse { 0% { background: color-mix(in srgb, var(--orange) 24%, transparent); } 100% { background: transparent; } }

/* ---------------- Overview hero ---------------- */
.hero-status { display: flex; align-items: center; gap: 14px; padding: 18px 20px; }
.hero-badge { font-size: 15px; font-weight: 600; padding: 9px 16px; border-radius: 10px; display: inline-flex; align-items: center; gap: 10px; font-stretch: 105%; }
.hero-badge .ic { font-size: 17px; }
.hero-badge.ok { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-ring); }
.hero-badge.warn { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-ring); }
.hero-badge.down { background: var(--down-bg); color: var(--down-fg); border: 1px solid var(--down-ring); }

/* Overview health-pill strip (each drills into a drawer) */
.pillstrip { display: flex; flex-wrap: wrap; gap: 10px; }
.hpill { display: inline-flex; align-items: center; gap: 9px; padding: 9px 13px; border-radius: 11px; background: var(--panel); border: 1px solid var(--ring); box-shadow: var(--shadow); cursor: pointer; transition: transform .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease); }
.hpill:hover { transform: translateY(-2px); border-color: var(--ring-str); box-shadow: var(--shadow-lift); }
.hpill:active { transform: scale(.99); }
.hpill:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.hpill .nm { font-size: 13px; font-weight: 550; }
.hpill .arr { color: var(--ink-faint); font-size: 12px; margin-left: 2px; }

/* Overview "what changed" panel */
.whatchanged { padding: 6px 4px; }
.wc-item { display: flex; align-items: center; gap: 11px; padding: 11px 15px; border-bottom: 1px solid var(--ring); font-size: 13px; }
.wc-item:last-child { border-bottom: none; }
.wc-item .wc-ic { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: 0 0 24px; background: var(--panel-hi); font-size: 12px; }
.wc-item b { font-weight: 650; }
.wc-item .wc-age { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--ink-faint); }
.wc-empty { padding: 20px 16px; text-align: center; color: var(--ink-faint); font-size: 12.5px; }

.timebomb { display: flex; align-items: center; gap: 15px; padding: 16px 18px; border-radius: 12px; background: color-mix(in srgb, var(--orange) 12%, var(--panel)); border: 1px solid var(--warn-ring); }
.timebomb .cd { font-size: 26px; font-weight: 300; color: var(--warn-fg); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.timebomb .txt { font-size: 13px; line-height: 1.45; }
.timebomb .txt b { color: var(--warn-fg); font-weight: 650; }

.prodrow { display: flex; align-items: center; gap: 13px; padding: 13px 16px; border-bottom: 1px solid var(--ring); }
.prodrow:last-child { border-bottom: none; }
.prodrow .nm { font-weight: 550; font-size: 14px; }
.prodrow .dt { color: var(--ink-faint); font-size: 12.5px; margin-left: auto; margin-right: 12px; }

/* ---------------- Rooftop — dealer cards ---------------- */
.dealer { padding: 0; overflow: hidden; transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease); }
.dealer:hover { transform: translateY(-2px); border-color: var(--ring-str); box-shadow: var(--shadow-lift); }
.dealer .head { display: flex; align-items: flex-start; gap: 12px; padding: 17px 18px 14px; }
.dealer .head .titles { min-width: 0; }
.dealer .head h3 { margin: 0; font-size: 16px; font-weight: 550; display: flex; align-items: center; gap: 8px; }
.dealer .head .meta { color: var(--ink-faint); font-size: 12px; margin-top: 4px; }
.kind { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: 0.12em; padding: 2px 7px; border-radius: 5px; text-transform: uppercase; }
.kind.LIVE { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-ring); }
.kind.SANDBOX { background: var(--idle-bg); color: var(--idle-fg); border: 1px solid var(--idle-ring); }
.kind.DEMO { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-ring); }
.dealer .box-tag { margin-left: auto; font-size: 10px; color: var(--ink-faint); font-family: var(--mono); background: var(--panel-hi); padding: 2px 8px; border-radius: 5px; border: 1px solid var(--ring); }
.dealer .stats-strip { display: flex; gap: 0; border-top: 1px solid var(--ring); border-bottom: 1px solid var(--ring); background: color-mix(in srgb, var(--bg) 40%, transparent); }
.dealer .stats-strip > div { flex: 1; padding: 11px 14px; border-right: 1px solid var(--ring); }
.dealer .stats-strip > div:last-child { border-right: none; }
.dealer .stats-strip .k { color: var(--ink-faint); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 500; }
.dealer .stats-strip .v { font-size: 16px; font-weight: 400; margin-top: 4px; font-variant-numeric: tabular-nums; }
.dealer .screens-head { display: flex; align-items: center; gap: 8px; padding: 13px 18px 4px; font-family: var(--mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); font-weight: 500; }
.dealer .actions { display: flex; gap: 9px; padding: 14px 18px 17px; }

/* TV screen cards — physical-TV-shaped */
.screens { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; padding: 8px 18px 6px; }
.tv { position: relative; }
.tv .bezel {
  position: relative; border-radius: 11px; padding: 8px; aspect-ratio: 16 / 10;
  background: linear-gradient(160deg, #26262b, #101013); border: 1px solid var(--ring-str);
  box-shadow: 0 10px 24px -12px rgba(0,0,0,0.7), inset 0 1px 0 rgba(255,255,255,0.08);
}
.tv .glass {
  position: absolute; inset: 8px; border-radius: 6px; overflow: hidden;
  background: radial-gradient(120% 100% at 30% 10%, rgba(224,116,42,0.10), transparent 60%), #08080a;
  border: 1px solid rgba(255,255,255,0.05); display: flex; flex-direction: column; justify-content: space-between; padding: 9px 10px;
}
.tv .glass.on { box-shadow: inset 0 0 24px rgba(16,143,171,0.18); }
.tv .glass.off { filter: grayscale(0.7) brightness(0.66); }
.tv .glass .snm { color: #F4F3F1; font-size: 11.5px; font-weight: 600; line-height: 1.15; }
.tv .glass .sinfo { font-family: var(--mono); font-size: 9px; color: #9A9A9E; letter-spacing: .04em; }
.tv .glass .live { display: flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .08em; }
.tv .glass .live .txt.ok { color: var(--ok-fg); } .tv .glass .live .txt.warn { color: var(--warn-fg); } .tv .glass .live .txt.down { color: var(--down-fg); } .tv .glass .live .txt.idle { color: #b3b3b8; }
.tv .stand { width: 34%; height: 8px; margin: 3px auto 0; background: linear-gradient(180deg, #24242a, #141418); border-radius: 0 0 4px 4px; border: 1px solid var(--ring); border-top: none; clip-path: polygon(14% 0, 86% 0, 100% 100%, 0 100%); }
.tv .sublast { text-align: center; font-family: var(--mono); font-size: 9.5px; color: var(--ink-faint); margin-top: 6px; font-variant-numeric: tabular-nums; }
.tv .pancount { position: absolute; top: 12px; right: 12px; font-family: var(--mono); font-size: 8.5px; background: rgba(0,0,0,0.5); color: #c8c8cc; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--ring); }
.empty-screens { padding: 16px 18px 20px; color: var(--ink-faint); font-size: 12.5px; }

/* ---------------- Buttons — 2-stage press, orange whisper primary ---------------- */
.btn { border: 1px solid var(--ring-str); background: var(--panel-hi); color: var(--ink); padding: 9px 14px; border-radius: var(--btn-radius); font-size: 12.5px; font-weight: 550; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; letter-spacing: .01em;
  transition: transform .12s var(--ease), box-shadow .12s var(--ease), background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease); }
.btn:hover { background: color-mix(in srgb, var(--ink) 10%, transparent); border-color: var(--ring-str); transform: translateY(-1px); box-shadow: 0 8px 20px -14px rgba(0,0,0,.7); }
.btn:active { transform: scale(.985); box-shadow: 0 2px 5px -3px rgba(0,0,0,.6); transition-duration: .09s; }
.btn:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.btn.primary { background: var(--orange); border-color: transparent; color: #0D0D0F; font-weight: 600; box-shadow: 0 8px 26px -14px var(--orange-glow); position: relative; overflow: hidden; }
.btn.primary:hover { box-shadow: 0 14px 34px -14px rgba(224,116,42,.62); }
.btn.primary::after { content: ""; position: absolute; inset: 0; transform: translateX(-130%) skewX(-18deg); background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.42), transparent 70%); }
.btn.primary:hover::after { animation: sheen-sweep .65s var(--ease) 1; }
@keyframes sheen-sweep { from { transform: translateX(-130%) skewX(-18deg); } to { transform: translateX(130%) skewX(-18deg); } }
.btn.warn { background: transparent; border-color: var(--warn-ring); color: var(--warn-fg); }
.btn.warn:hover { background: var(--warn-bg); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 10px; font-size: 11.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------------- Tables ---------------- */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; font-family: var(--mono); color: var(--ink-faint); font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.14em; font-weight: 500; padding: 11px 14px; border-bottom: 1px solid var(--ring); }
table.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--ring); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:hover td { background: var(--panel-hi); }
.mono { font-family: var(--mono); font-size: 12px; }
.muted { color: var(--ink-faint); }

/* Pipeline */
.deal { padding: 16px 17px; display: flex; flex-direction: column; gap: 9px; }
.deal .top { display: flex; align-items: center; gap: 10px; }
.deal h4 { margin: 0; font-size: 15px; font-weight: 550; }
.deal .contact { color: var(--ink-faint); font-size: 12.5px; }
.stagepill { font-family: var(--mono); font-size: 9px; font-weight: 500; letter-spacing: 0.08em; padding: 3px 9px; border-radius: 999px; text-transform: uppercase; }
.stagepill.live { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-ring); }
.stagepill.verbal { background: var(--warn-bg); color: var(--warn-fg); border: 1px solid var(--warn-ring); }
.stagepill.gated { background: var(--idle-bg); color: var(--idle-fg); border: 1px solid var(--idle-ring); }
.stagepill.prospect { background: var(--ok-bg); color: var(--ok-fg); border: 1px solid var(--ok-ring); }
.stagepill.lost { background: var(--down-bg); color: var(--down-fg); border: 1px solid var(--down-ring); }
.deal .mrr { margin-left: auto; font-weight: 500; font-variant-numeric: tabular-nums; }
.deal .field { font-size: 12.5px; line-height: 1.45; }
.deal .field b { color: var(--ink-faint); font-weight: 600; }
.deal .blocker { background: var(--down-bg); border: 1px solid var(--down-ring); border-radius: 8px; padding: 8px 11px; font-size: 12px; color: var(--down-fg); }
/* Pipeline deal — clickable card that opens the right drawer */
.deal { cursor: pointer; transition: transform .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease); }
.deal:hover { transform: translateY(-2px); border-color: var(--ring-str); box-shadow: var(--shadow-lift); }
.deal:focus-visible { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--sel); }
.deal .top h4 { flex: 1; min-width: 0; }
.deal .dealarr { color: var(--ink-faint); font-size: 18px; line-height: 1; transition: transform .16s var(--ease); }
.deal:hover .dealarr { transform: translateX(3px); color: var(--accent-2); }
.dealbuild { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim); }
.dealbuild b { color: var(--ink); font-variant-numeric: tabular-nums; }
/* deal drawer — build-fee block, quick status control, read blocks */
.buildbox { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.buildamt { font-size: 23px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.dwstatus button { font-size: 11.5px; padding: 6px 10px; }
.dv-block { font-size: 13px; line-height: 1.5; color: var(--ink-dim); white-space: pre-wrap; }
.dwrowfoot { display: flex; align-items: center; gap: 10px; }
.dwrowfoot .grow { flex: 1; }
/* Net & split — native .panel/.stat/.callout do the heavy lifting; these are small helpers */
.vunit { font-size: 12px; color: var(--ink-faint); margin-left: 2px; font-weight: 400; }
.splitcard { display: flex; align-items: center; gap: 13px; }
.splitcard .sc { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.splitcard .sc .value { margin-top: 0; }
/* .callout.netnote — double-class so it BEATS the base .callout (which is red/down by default and
   sits LATER in this sheet; single-class .netnote lost on source order and the info notes rendered
   as error cards — audit 2026-07-11). */
.callout.netnote { background: var(--idle-bg); border-color: var(--idle-ring); align-items: flex-start; }
.callout.netnote .ic { color: var(--accent-2); font-size: 16px; flex: none; line-height: 1.4; }
.callout.netnote .body { font-size: 12.5px; line-height: 1.55; color: var(--ink-dim); }
.callout.netnote .body b { color: var(--ink); }
.netowed { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 11px; font-size: 13px; color: var(--ink-dim); }
.netowed b { color: var(--ink); font-variant-numeric: tabular-nums; margin-left: 3px; }
.netowed .uav { margin-right: 3px; }
.netsep { color: var(--ink-faint); margin: 0 7px; }
.reimbitems { margin-top: 9px; font-size: 11.5px; color: var(--ink-faint); font-variant-numeric: tabular-nums; line-height: 1.6; }
.splitbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 4px 2px; font-size: 12.5px; color: var(--ink-dim); }
.subrow { cursor: pointer; transition: background .12s var(--ease); }
.subrow:hover { background: var(--panel-hi); }
.subrow:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--sel); }
/* Generic clickable card → opens the right drawer */
.clik { cursor: pointer; transition: transform .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease); }
.clik:hover { transform: translateY(-2px); border-color: var(--ring-str); box-shadow: var(--shadow-lift); }
.clik:focus-visible { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--sel); }
.cardarr { margin-left: auto; color: var(--ink-faint); font-size: 17px; line-height: 1; transition: transform .16s var(--ease); }
.clik:hover .cardarr { transform: translateX(3px); color: var(--accent-2); }

/* Callout */
.callout { display: flex; gap: 13px; padding: 15px 17px; border-radius: 12px; background: var(--down-bg); border: 1px solid var(--down-ring); }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-ring); }
.callout .ic { font-size: 18px; }
.callout .body { font-size: 13px; line-height: 1.5; }
.callout .body b { color: var(--ink); }

/* Skeleton */
.skel { border-radius: 10px; background: linear-gradient(100deg, var(--panel-hi) 30%, color-mix(in srgb, var(--ink) 10%, transparent) 50%, var(--panel-hi) 70%); background-size: 220% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -220% 0; } }
.skel.line { height: 13px; margin: 7px 0; }
.skel.tile { height: 92px; }
.skel.card { height: 220px; }

/* Toast */
#toasts { position: fixed; right: 22px; bottom: 22px; display: flex; flex-direction: column; gap: 10px; z-index: 100; }
.toast { padding: 13px 16px; border-radius: 11px; background: var(--panel-solid); border: 1px solid var(--ring-str); box-shadow: var(--shadow-lift); font-size: 13px; min-width: 240px; animation: slidein .25s var(--ease); display: flex; gap: 10px; align-items: center; }
.toast.ok { border-color: var(--ok-ring); } .toast.down { border-color: var(--down-ring); }
@keyframes slidein { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(4px); display: grid; place-items: center; z-index: 90; animation: fadein .2s var(--ease); }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
.modal { width: min(520px, 92vw); max-height: 88vh; overflow: auto; background: var(--panel); border: 1px solid var(--ring-str); border-radius: 16px; box-shadow: var(--shadow-lift); padding: 24px; animation: pop .24s var(--ease); }
@keyframes pop { from { transform: scale(.96) translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal h3 { margin: 0 0 14px; font-size: 18px; font-weight: 500; letter-spacing: -0.01em; }
.modal label { display: block; font-family: var(--mono); font-size: 10px; color: var(--ink-faint); margin: 13px 0 5px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; }
.modal input, .modal textarea, .modal select { width: 100%; background: var(--bg2); border: 1px solid var(--ring); border-radius: 8px; color: var(--ink); padding: 10px 12px; font-size: 13.5px; font-family: inherit; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.modal input:focus, .modal textarea:focus, .modal select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--sel); }
.modal .row { display: flex; gap: 12px; }
.modal .row > * { flex: 1; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.modal .err, .err { color: var(--down-fg); font-size: 12.5px; min-height: 18px; }

/* ---------------- Login — brand moment ---------------- */
#login { position: fixed; inset: 0; display: grid; place-items: center; z-index: 200; overflow: hidden;
  background: radial-gradient(900px 520px at 50% -8%, rgba(224,116,42,0.14), transparent 62%), var(--bg); }
#login .grain { z-index: 0; }
.login-card { position: relative; z-index: 2; width: min(400px, 92vw); padding: 40px 34px; text-align: center; }
.login-card .mark { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 20px; overflow: hidden; display: grid; place-items: center; box-shadow: 0 12px 30px -10px var(--orange-glow), inset 0 1px 0 rgba(255,255,255,0.35); }
.login-card .mark svg { width: 56px; height: 56px; display: block; }
.login-card .hair { margin: 0 auto 18px; }
.login-card h2 { margin: 0 0 6px; font-size: 23px; font-weight: 430; letter-spacing: -0.02em; font-stretch: 112%; }
.login-card .tag { font-family: var(--serif); font-style: italic; font-size: 17px; color: var(--ink-dim); margin: 0 0 26px; }
.login-card form { text-align: left; }
.login-card label { display: none; }
.login-card input { width: 100%; background: var(--bg2); border: 1px solid var(--ring); border-radius: 9px; color: var(--ink); padding: 13px 14px; font-size: 14px; margin-bottom: 11px; transition: border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease); }
.login-card input::placeholder { color: var(--ink-faint); }
.login-card input:focus { outline: none; border-color: var(--orange); background: color-mix(in srgb, var(--orange) 5%, var(--bg2)); box-shadow: 0 0 0 3px var(--sel); }
.login-card .err { text-align: center; margin: 2px 0 8px; }
.login-card .btn.primary { width: 100%; justify-content: center; padding: 13px; font-size: 14px; margin-top: 4px; }
.login-card .hint { margin-top: 18px; font-family: var(--mono); font-size: 10px; color: var(--ink-faint); letter-spacing: 0.06em; text-transform: uppercase; }

.hidden { display: none !important; }
.count { font-variant-numeric: tabular-nums; }
.grow { flex: 1; }

/* ============================================================
   PHASE 2 — Collaboration (Tasks kanban · bell · drawer · profile)
   ============================================================ */

/* Identity avatar — colour is IDENTITY not status; always carries initials text (CVD rule). */
.uav { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; flex: 0 0 26px;
  font-family: var(--mono); font-size: 10.5px; font-weight: 500; color: #fff; letter-spacing: .2px;
  background: linear-gradient(150deg, color-mix(in srgb, var(--uc) 92%, #fff 8%), color-mix(in srgb, var(--uc) 62%, #000 38%));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 6px -3px var(--uc); }
.uav.sm { width: 21px; height: 21px; flex: 0 0 21px; border-radius: 7px; font-size: 9px; }
.uav.xl { width: 54px; height: 54px; flex: 0 0 54px; border-radius: 15px; font-size: 19px; }
.mchip { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 6px; font-weight: 600; font-size: .92em;
  color: color-mix(in srgb, var(--uc) 72%, var(--ink) 28%); background: color-mix(in srgb, var(--uc) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--uc) 42%, transparent); }
/* CVD-safe priority: colour + icon + WORD. */
.prio { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 6px; border-radius: 7px; font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; border: 1px solid; }
.prio .ic { font-size: 9px; font-family: var(--sans); }
.prio.high { color: var(--down-fg); background: var(--down-bg); border-color: var(--down-ring); }
.prio.med { color: var(--warn-fg); background: var(--warn-bg); border-color: var(--warn-ring); }
.prio.low { color: var(--idle-fg); background: var(--idle-bg); border-color: var(--idle-ring); }
.due { font-family: var(--mono); font-size: 10px; font-weight: 500; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.due.soon { color: var(--warn-fg); }
.due.over { color: var(--down-fg); }

/* ---- Win Condition billboard ---- */
.wincon { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 16px; border-radius: var(--radius);
  background: color-mix(in srgb, var(--orange) 7%, var(--panel)); border: 1px solid var(--ring); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.wincon::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--orange); }
.wincon .wc-eye { font-family: var(--mono); font-size: 9px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange-2); flex: 0 0 auto; }
:root[data-theme="light"] .wincon .wc-eye { color: var(--orange-ink); }
.wincon .wc-goal { font-family: var(--serif); font-style: italic; font-size: 21px; line-height: 1.25; color: var(--ink); flex: 1; cursor: text; border-radius: 6px; padding: 2px 6px; margin: -2px -6px; transition: background .15s var(--ease); }
.wincon .wc-goal:hover { background: var(--panel-hi); }
.wincon .wc-goal.empty { color: var(--ink-faint); }
.wincon input.wc-input { flex: 1; font-family: var(--serif); font-style: italic; font-size: 21px; background: var(--bg2); border: 1px solid var(--orange); border-radius: 8px; color: var(--ink); padding: 6px 10px; outline: none; box-shadow: 0 0 0 3px var(--sel); }
.wincon .wc-edit { background: none; border: none; color: var(--ink-faint); cursor: pointer; padding: 6px; border-radius: 6px; flex: 0 0 auto; transition: all .15s var(--ease); }
.wincon .wc-edit:hover { color: var(--ink); background: var(--panel-hi); }

/* ---- My Day filter tiles ---- */
.myday { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.mdtile { display: flex; flex-direction: column; gap: 3px; padding: 13px 15px; border-radius: 12px; background: var(--panel); border: 1px solid var(--ring); box-shadow: var(--shadow); cursor: pointer; text-align: left;
  transition: transform .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease); }
.mdtile:hover { transform: translateY(-2px); border-color: var(--ring-str); box-shadow: var(--shadow-lift); }
.mdtile:active { transform: scale(.99); }
.mdtile:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.mdtile.on { border-color: var(--orange); background: color-mix(in srgb, var(--orange) 9%, var(--panel)); }
.mdtile .mdv { font-size: 26px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.mdtile.warn .mdv { color: var(--warn-fg); } .mdtile.down .mdv { color: var(--down-fg); } .mdtile.ok .mdv { color: var(--ok-fg); }
.mdtile .mdl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.filterbanner { display: flex; align-items: center; gap: 10px; padding: 9px 14px; margin-bottom: 14px; border-radius: 10px; background: color-mix(in srgb, var(--orange) 8%, var(--panel)); border: 1px solid var(--warn-ring); font-size: 12.5px; }
.filterbanner b { color: var(--ink); }
.filterbanner .clr { margin-left: auto; background: none; border: 1px solid var(--ring-str); color: var(--ink-dim); border-radius: var(--btn-radius); padding: 4px 10px; font-size: 11.5px; cursor: pointer; }
.filterbanner .clr:hover { color: var(--ink); border-color: var(--orange); }

/* ---- Filters bar ---- */
.kfilters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.seg { display: inline-flex; background: var(--panel-hi); border: 1px solid var(--ring); border-radius: 9px; padding: 3px; gap: 2px; }
.seg.wrap { flex-wrap: wrap; }
.seg button { display: inline-flex; align-items: center; gap: 6px; border: none; background: none; color: var(--ink-faint); font-weight: 550; font-size: 12.5px; padding: 6px 11px; border-radius: 6px; cursor: pointer; transition: all .15s var(--ease); }
.seg button:hover { color: var(--ink); }
.seg button.on { color: var(--ink); background: color-mix(in srgb, var(--orange) 14%, var(--panel)); box-shadow: inset 0 1px 0 var(--panel-hi); }
.kselect { background: var(--bg2); border: 1px solid var(--ring); border-radius: 8px; color: var(--ink); padding: 8px 11px; font-size: 12.5px; font-family: inherit; }
.kselect:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--sel); }
.ktoggle { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-dim); cursor: pointer; user-select: none; }
.ktoggle input { width: 15px; height: 15px; accent-color: var(--orange); }

/* ---- Board layout + activity rail ---- */
.tasksgrid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px; align-items: start; }
.kboard { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; }
.kcol { background: color-mix(in srgb, var(--ink) 2%, transparent); border: 1px solid var(--ring); border-radius: 13px; display: flex; flex-direction: column; min-height: 120px; }
.kcolhead { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 9px; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); }
.kcolhead .kcoln { background: var(--panel-hi); color: var(--ink-dim); border-radius: 999px; padding: 1px 8px; font-size: 10px; }
.kdrop { display: flex; flex-direction: column; gap: 10px; padding: 4px 10px 12px; min-height: 60px; flex: 1; border-radius: 0 0 13px 13px; transition: background .16s var(--ease), box-shadow .16s var(--ease); }
.kdrop.over { background: color-mix(in srgb, var(--orange) 8%, transparent); box-shadow: inset 0 0 0 2px var(--orange), inset 0 0 22px color-mix(in srgb, var(--orange) 16%, transparent); }
.kempty { text-align: center; color: var(--ink-faint); font-size: 11.5px; padding: 14px 0; border: 1px dashed var(--ring); border-radius: 9px; }
.kdrop.over .kempty { border-color: var(--orange); border-style: dashed; color: var(--warn-fg); }

.kcard { background: var(--panel); border: 1px solid var(--ring); border-radius: 11px; padding: 12px; cursor: grab; position: relative;
  box-shadow: 0 1px 0 var(--panel-hi) inset, 0 6px 16px -14px rgba(0,0,0,.7);
  transition: transform .18s var(--spring), box-shadow .16s var(--ease), border-color .16s var(--ease); }
.kcard:hover { transform: translateY(-2px); border-color: var(--ring-str); box-shadow: var(--shadow-lift); }
.kcard:focus-visible { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--sel); }
.kcard.dragging { opacity: .55; cursor: grabbing; transform: scale(1.02) rotate(2deg); box-shadow: 0 24px 46px -16px rgba(0,0,0,.85); }
.kblock { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 600; color: var(--down-fg); background: var(--down-bg); border: 1px solid var(--down-ring); border-radius: 6px; padding: 3px 8px; margin-bottom: 8px; }
.kblock.inline { margin: 0; }
.ktitle { font-size: 13.5px; font-weight: 500; line-height: 1.4; }
.kmeta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 9px; }
.kproj { font-family: var(--mono); font-size: 9.5px; color: var(--ink-faint); background: var(--panel-hi); border: 1px solid var(--ring); border-radius: 6px; padding: 2px 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kfoot { display: flex; align-items: center; gap: 9px; margin-top: 11px; }
.kcount { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.kcount svg { opacity: .7; }

.krail { position: sticky; top: 92px; background: var(--panel); border: 1px solid var(--ring); border-radius: 13px; box-shadow: var(--shadow); overflow: hidden; }
.krailhead { padding: 13px 15px; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); border-bottom: 1px solid var(--ring); }
.evlist { list-style: none; margin: 0; padding: 6px; max-height: 62vh; overflow: auto; }
.evlist li { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 8px; font-size: 12px; }
.evlist li:hover { background: var(--panel-hi); }
.evlist .ev { flex: 1; min-width: 0; color: var(--ink-faint); }
.evlist .ev b { color: var(--ink); font-weight: 600; }
.evlist .evt { display: block; color: var(--ink); font-size: 11.5px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.evlist .evage { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); white-space: nowrap; }

/* ---- Notifications bell ---- */
.bell-wrap { position: relative; }
.bell-btn { position: relative; background: var(--panel-hi); border: 1px solid var(--ring); color: var(--ink-dim); width: 36px; height: 34px; border-radius: var(--btn-radius); cursor: pointer; display: grid; place-items: center; transition: all .15s var(--ease); }
.bell-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); border-color: var(--ring-str); }
.bell-btn.ring svg { animation: bellring .4s var(--ease) 1; transform-origin: 50% 3px; }
@keyframes bellring { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-11deg); } 60% { transform: rotate(8deg); } }
.bell-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--orange); color: #0D0D0F; font-family: var(--mono); font-size: 10px; font-weight: 500; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); animation: badgepop .32s var(--spring); }
@keyframes badgepop { from { transform: scale(0); } to { transform: scale(1); } }
/* Messages top-bar button (mirrors the bell) */
.msg-btn { position: relative; background: var(--panel-hi); border: 1px solid var(--ring); color: var(--ink-dim); width: 36px; height: 34px; border-radius: var(--btn-radius); cursor: pointer; display: grid; place-items: center; transition: all .15s var(--ease); }
.msg-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); border-color: var(--ring-str); }
.msg-btn.ring svg { animation: bellring .4s var(--ease) 1; transform-origin: 50% 12px; }
.msg-badge { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--orange); color: #0D0D0F; font-family: var(--mono); font-size: 10px; font-weight: 500; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); animation: badgepop .32s var(--spring); }
/* Messages slide-over — iMessage-style chat */
.msgdrawer { display: flex; flex-direction: column; }
.msghead .dwkind { gap: 10px; }
.msghead .msgavs { display: inline-flex; }
.msghead .msgavs .uav { margin-right: -7px; box-shadow: 0 0 0 2px var(--panel); }
.msgscroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 16px 18px 10px; display: flex; flex-direction: column; gap: 2px; }
.msgday { text-align: center; margin: 14px 0 9px; }
.msgday span { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint); background: var(--panel-hi); padding: 3px 11px; border-radius: 999px; }
.msgb { display: flex; margin-top: 2px; animation: bubin .28s var(--ease) both; }
@keyframes bubin { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
.msgb.me { justify-content: flex-end; }
.msgb.them { justify-content: flex-start; }
.bub { max-width: 76%; padding: 8px 13px 7px; border-radius: 18px; font-size: 13.5px; line-height: 1.45; overflow-wrap: anywhere; }
.msgb.them .bub { background: var(--panel-hi); border: 1px solid var(--ring); border-bottom-left-radius: 6px; color: var(--ink); }
.msgb.me .bub { background: linear-gradient(180deg, color-mix(in srgb, var(--orange) 88%, #fff), var(--orange)); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 1px 6px color-mix(in srgb, var(--orange) 32%, transparent); }
.bub .bt { font-size: 9.5px; opacity: .6; margin-left: 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.msgb.me .bub .bt { color: rgba(255,255,255,.85); opacity: 1; }
.msgb.pending .bub { opacity: .55; }
.msgcomposer { display: flex; align-items: flex-end; gap: 9px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--ring); background: var(--panel); }
.msgcomposer textarea { flex: 1; resize: none; max-height: 140px; min-height: 20px; background: var(--bg2); border: 1px solid var(--ring); border-radius: 18px; color: var(--ink); padding: 8px 14px; font-size: 13.5px; font-family: inherit; line-height: 1.4; }
.msgcomposer textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--sel); }
.msgsend { flex: none; width: 34px; height: 34px; border-radius: 50%; border: none; background: var(--orange); color: #fff; cursor: pointer; display: grid; place-items: center; transition: transform .12s var(--ease), filter .15s var(--ease); }
.msgsend:hover { filter: brightness(1.08); }
.msgsend:active { transform: scale(.9); }
.msgsend svg { width: 16px; height: 16px; margin-left: -1px; }
.msgempty { margin: auto; text-align: center; color: var(--ink-faint); font-size: 13px; padding: 20px; }
.msgempty .mi { font-size: 30px; margin-bottom: 8px; }
.bell-drop { position: absolute; right: 0; top: 46px; width: 360px; max-width: 92vw; background: var(--panel-solid); border: 1px solid var(--ring-str); border-radius: 13px; box-shadow: var(--shadow-lift); z-index: 60; overflow: hidden; animation: pop .18s var(--ease); }
.bellhead { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--ring); font-size: 13px; }
.bellhead b { font-weight: 600; }
.bellread { background: none; border: none; color: var(--accent-2); font-size: 12px; font-weight: 600; cursor: pointer; }
.belllist { max-height: 60vh; overflow: auto; }
.bellrow { display: flex; gap: 10px; width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--ring); padding: 12px 14px; cursor: pointer; transition: background .14s var(--ease); }
.bellrow:hover { background: var(--panel-hi); }
.bellrow.unread { background: color-mix(in srgb, var(--orange) 6%, transparent); }
.belldot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; margin-top: 5px; }
.belldot.unread { background: var(--orange); box-shadow: 0 0 8px var(--orange); }
.belldot.read { background: transparent; border: 1px solid var(--idle-ring); }
.bellmain { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.belltitle { font-size: 12.5px; color: var(--ink); }
.bellprev { font-size: 12px; color: var(--ink-faint); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.bellage { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--ink-faint); }
.bellempty { padding: 26px 14px; text-align: center; color: var(--ink-faint); font-size: 12.5px; }

/* ---- Drawers (task detail + overview drill) ---- */
/* One shared sheet motion (Apple-native): translateX only, scrim fade synced.
   Out = 240ms (base), In = 320ms (.in overrides). closeDrawer() waits 240ms. */
.drawer-bg { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 58%, transparent); backdrop-filter: blur(0px); z-index: 95; opacity: 0; transition: opacity .24s var(--ease-ios), backdrop-filter .24s var(--ease-ios); }
.drawer-bg.in { opacity: 1; backdrop-filter: blur(4px); transition: opacity .32s var(--ease-ios), backdrop-filter .32s var(--ease-ios); }
.drawer { position: absolute; top: 0; right: 0; height: 100%; width: min(520px, 94vw); display: flex; flex-direction: column;
  background: var(--panel); border-left: 1px solid var(--ring-str); box-shadow: -24px 0 60px -20px rgba(0,0,0,.55);
  transform: translateX(100%); transition: transform .24s var(--ease-ios); will-change: transform; }
.drawer-bg.in .drawer { transform: none; transition: transform .32s var(--ease-ios); }
/* Staggered content reveal — children rise in 30ms apart. */
.drawer-bg.in .dwbody > * { animation: dwchild .34s var(--ease) both; }
.drawer-bg.in .dwbody > *:nth-child(1) { animation-delay: .04s; }
.drawer-bg.in .dwbody > *:nth-child(2) { animation-delay: .07s; }
.drawer-bg.in .dwbody > *:nth-child(3) { animation-delay: .10s; }
.drawer-bg.in .dwbody > *:nth-child(4) { animation-delay: .13s; }
.drawer-bg.in .dwbody > *:nth-child(5) { animation-delay: .16s; }
.drawer-bg.in .dwbody > *:nth-child(n+6) { animation-delay: .19s; }
@keyframes dwchild { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.dwhead { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--ring); }
.dwkind { display: flex; align-items: center; gap: 9px; font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); }
.dwx { background: var(--panel-hi); border: 1px solid var(--ring); color: var(--ink-faint); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-size: 13px; transition: all .15s var(--ease); }
.dwx:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.dwbody { flex: 1; overflow: auto; padding: 18px 20px; }
.dwtitle { width: 100%; background: transparent; border: 1px solid transparent; border-radius: 9px; color: var(--ink); font-size: 18px; font-weight: 550; line-height: 1.3; padding: 8px 10px; margin: -8px -10px 10px; resize: none; font-family: inherit; }
.dwtitle:hover { background: var(--panel-hi); }
.dwtitle:focus { outline: none; background: var(--bg2); border-color: var(--orange); box-shadow: 0 0 0 3px var(--sel); }
.dwrow { display: flex; gap: 14px; }
.dwrow > .dwfield { flex: 1; }
.dwfield { margin-bottom: 14px; }
.dwfield label { display: block; font-family: var(--mono); font-size: 10px; color: var(--ink-faint); margin-bottom: 6px; font-weight: 500; text-transform: uppercase; letter-spacing: .1em; }
.dwfield .hint, .hint { font-family: var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink-faint); font-weight: 500; font-size: 11px; }
.dwbody textarea, .dwbody input[type="date"], .dwbody .kselect { width: 100%; background: var(--bg2); border: 1px solid var(--ring); border-radius: 8px; color: var(--ink); padding: 9px 11px; font-size: 13px; font-family: inherit; }
.dwbody textarea:focus, .dwbody input:focus, .dwbody .kselect:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--sel); }
.dwbody .seg { display: flex; }
.dwbody .seg button { flex: 1; justify-content: center; }
.blockrow { margin: 4px 0 10px; }
.dwreason { margin-bottom: 14px; }
.dwcomments { border-top: 1px solid var(--ring); margin-top: 6px; padding-top: 16px; }
.dwsub { font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); margin-bottom: 12px; }
.dwsub .cnt { background: var(--panel-hi); border-radius: 999px; padding: 1px 8px; margin-left: 4px; }
.cmlist { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.cm { display: flex; gap: 10px; }
.cmbody { flex: 1; min-width: 0; }
.cmhead { display: flex; align-items: baseline; gap: 8px; }
.cmhead b { font-size: 12.5px; font-weight: 600; }
.cmage { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.cmtext { font-size: 12.5px; line-height: 1.5; color: var(--ink-dim); margin-top: 2px; word-wrap: break-word; }
.nocm { color: var(--ink-faint); font-size: 12.5px; }
.composer { position: relative; }
.mentbox { position: absolute; bottom: 46px; left: 0; background: var(--panel-solid); border: 1px solid var(--ring-str); border-radius: 9px; box-shadow: var(--shadow-lift); overflow: hidden; z-index: 5; min-width: 160px; }
.mentbox button { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: none; color: var(--ink); padding: 8px 11px; font-size: 12.5px; cursor: pointer; }
.mentbox button:hover { background: color-mix(in srgb, var(--orange) 12%, transparent); }
.composerbar { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.dwfoot { padding: 14px 20px; border-top: 1px solid var(--ring); }
.btn.danger { color: var(--down-fg); }
.btn.danger:hover { background: var(--down-bg); border-color: var(--down-ring); }
/* Overview drill drawer detail rows */
.drill-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ring); }
.drill-row:last-child { border-bottom: none; }
.drill-row .dl { color: var(--ink-faint); font-size: 12.5px; }
.drill-row .dv { margin-left: auto; font-size: 13px; font-weight: 550; }

/* ============ Founder Cockpit — Overview wave (2026-07-10) ============ */
/* Glanceable pills row — each drills into a diagnosis drawer */
/* POLISH-LOCK: cpills-composition — breathing room around the status dot (its halo is 3px wider
   than the dot), one-line values so all five pills sit at exactly the same height, and a clear
   band of air between the row and the hero below. */
.cpills { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 14px; margin-bottom: 20px; }
.cpill { display: flex; flex-direction: column; gap: 10px; padding: 15px 17px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--ring); box-shadow: var(--shadow); cursor: pointer; text-align: left; font: inherit; color: inherit;
  transition: transform .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease); }
.cpill:hover { transform: translateY(-2px); border-color: var(--ring-str); box-shadow: var(--shadow-lift); }
.cpill:active { transform: scale(.99); }
.cpill:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.cpill .cp-top { display: flex; align-items: center; gap: 10px; min-height: 15px; }
.cpill .cp-top .dot { margin: 3px 1px 3px 3px; }   /* halo + live ping never touch the label */
.cpill .cp-label { font-size: 9.5px; font-weight: 500; text-transform: uppercase; letter-spacing: .16em; color: var(--ink-faint); white-space: nowrap; }
.cpill .cp-arr { margin-left: auto; padding-left: 8px; color: var(--ink-faint); font-size: 13px; transition: transform .15s var(--ease), color .15s var(--ease); }
.cpill:hover .cp-arr { transform: translateX(2px); color: var(--accent-2); }
.cpill .cp-val { font-size: 15px; font-weight: 600; color: var(--ink); line-height: 1.3; letter-spacing: -0.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Money tiles drill — corner affordance mirrors .cardarr, appears on hover-capable pointers always */
.panel.stat.clik { position: relative; }
.panel.stat.clik .stat-arr { position: absolute; top: 12px; right: 14px; color: var(--ink-faint); font-size: 14px;
  transition: transform .15s var(--ease), color .15s var(--ease); }
.panel.stat.clik:hover .stat-arr { transform: translateX(2px); color: var(--accent-2); }
.timebomb.clik-row { cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s var(--ease); }
.timebomb.clik-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.timebomb.clik-row:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

/* Do-this-now ranked action cards */
.donow { display: flex; flex-direction: column; gap: 10px; }
.donow-item { display: flex; align-items: center; gap: 13px; padding: 13px 15px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--ring); box-shadow: var(--shadow);
  transition: transform .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease); }
.donow-item.clik-row { cursor: pointer; }
.donow-item.clik-row:hover { transform: translateY(-2px); border-color: var(--ring-str); box-shadow: var(--shadow-lift); }
.donow-item.clik-row:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.donow-ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; background: var(--panel-hi); border: 1px solid var(--ring); color: var(--ink-dim); }
.donow-item.sev-down .donow-ic { background: var(--down-bg); border-color: var(--down-ring); color: var(--down-fg); }
.donow-item.sev-warn .donow-ic { background: var(--warn-bg); border-color: var(--warn-ring); color: var(--warn-fg); }
.donow-main { flex: 1; min-width: 0; }
.donow-main .dn-label { font-size: 13.5px; font-weight: 600; color: var(--ink); }
.donow-main .dn-detail { font-size: 12px; color: var(--ink-faint); margin-top: 2px; line-height: 1.4; }
.donow-acts { display: flex; gap: 7px; flex: 0 0 auto; }
.donow-go { color: var(--ink-faint); font-size: 17px; line-height: 1; transition: transform .15s var(--ease), color .15s var(--ease); }
.donow-item.clik-row:hover .donow-go { transform: translateX(3px); color: var(--accent-2); }
.donow-empty { display: flex; align-items: center; gap: 9px; padding: 13px 4px 2px; color: var(--ink-dim); font-size: 13px; }
.donow-empty b { color: var(--ok-fg); font-weight: 600; }

/* What-changed items: clickable variant */
.wc-item.clik-row { cursor: pointer; }
.wc-item.clik-row:hover { background: var(--panel-hi); }
.wc-item.clik-row:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; border-radius: 8px; }
.wc-item .wc-go { margin-left: 8px; color: var(--ink-faint); font-size: 14px; }

/* Diagnose drawer telemetry */
.diag-load { color: var(--ink-dim); font-size: 13px; padding: 12px 2px; display: flex; align-items: center; gap: 9px; }
.diag-journal { max-height: 320px; overflow: auto; background: var(--bg2); border: 1px solid var(--ring); border-radius: 9px;
  padding: 12px 13px; font-family: var(--mono); font-size: 11.5px; line-height: 1.55; color: var(--ink-dim);
  white-space: pre-wrap; word-break: break-word; margin: 0; }

/* Generic clickable table rows (Ops / Uptime / logs) */
table.tbl tr.clik-row { cursor: pointer; }
table.tbl tr.clik-row:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
table.tbl tr.clik-row:focus-visible td:first-child { border-top-left-radius: 6px; border-bottom-left-radius: 6px; }

/* Sidebar footer — freshness pill + build stamp */
.sidefoot { margin-top: 9px; display: flex; flex-direction: column; gap: 6px; }
.freshpill { display: flex; align-items: center; gap: 8px; padding: 8px 11px; border-radius: 9px; background: var(--panel-hi);
  border: 1px solid var(--ring); font-family: var(--mono); font-size: 11px; color: var(--ink-faint); letter-spacing: .02em; }
.freshpill .fp-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.freshpill.amber { color: var(--warn-fg); border-color: var(--warn-ring); }
.freshpill.amber .fp-dot { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }
.freshpill.red { color: var(--down-fg); border-color: var(--down-ring); }
.freshpill.red .fp-dot { background: var(--down); box-shadow: 0 0 0 3px var(--down-bg); }
.buildstamp { text-align: center; font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; color: var(--ink-faint); opacity: .7; }
.buildstamp:empty { display: none; }

/* ---- Profile modal ---- */
.profile .prohead { display: flex; align-items: center; gap: 15px; margin-bottom: 8px; }
.proname { font-size: 17px; font-weight: 600; }
.prorole { font-family: var(--mono); font-size: 11px; color: var(--accent-2); font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; }
.promuted { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.prosec { font-family: var(--mono); font-size: 10px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-faint); margin: 20px 0 4px; border-top: 1px solid var(--ring); padding-top: 16px; }

/* ---- ⌘K command palette ---- */
.cmdk-bg { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg) 62%, transparent); backdrop-filter: blur(6px); z-index: 120; display: flex; justify-content: center; align-items: flex-start; padding-top: 14vh; animation: fadein .16s var(--ease); }
.cmdk { width: min(600px, 94vw); background: var(--panel-solid); border: 1px solid var(--ring-str); border-radius: 15px; box-shadow: var(--shadow-lift); overflow: hidden; animation: pop .2s var(--ease); }
.cmdk-top { display: flex; align-items: center; gap: 11px; padding: 15px 18px; border-bottom: 1px solid var(--ring); }
.cmdk-top svg { width: 17px; height: 17px; color: var(--ink-faint); flex: 0 0 17px; }
.cmdk-input { flex: 1; background: none; border: none; outline: none; color: var(--ink); font-size: 16px; font-family: inherit; }
.cmdk-input::placeholder { color: var(--ink-faint); }
.cmdk-esc { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); border: 1px solid var(--ring); border-radius: 4px; padding: 2px 6px; }
.cmdk-list { max-height: 52vh; overflow: auto; padding: 6px; }
.cmdk-group { font-family: var(--mono); font-size: 9px; text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-faint); padding: 10px 12px 5px; }
.cmdk-item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 9px; cursor: pointer; font-size: 13.5px; color: var(--ink-dim); }
.cmdk-item .ci-ic { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; flex: 0 0 22px; background: var(--panel-hi); font-size: 12px; color: var(--ink-dim); }
.cmdk-item .ci-main { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmdk-item .ci-main b { color: var(--ink); font-weight: 600; }
.cmdk-item .ci-sub { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); }
.cmdk-item.sel { background: color-mix(in srgb, var(--orange) 13%, var(--panel)); color: var(--ink); }
.cmdk-item.sel .ci-ic { background: color-mix(in srgb, var(--orange) 26%, transparent); color: var(--ink); }
.cmdk-empty { padding: 30px; text-align: center; color: var(--ink-faint); font-size: 13px; }

/* Shortcuts cheatsheet */
.sheet-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; margin-top: 6px; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--ring); font-size: 13px; }
.sheet-row kbd { font-family: var(--mono); font-size: 11px; background: var(--bg2); border: 1px solid var(--ring); border-radius: 4px; padding: 2px 7px; color: var(--ink-dim); white-space: nowrap; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1200px) { .g4 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(2, 1fr); } .myday { grid-template-columns: repeat(2, 1fr); } .cpills { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 900px) {
  :root { --nav-w: 62px; }
  .brand .name, .nav a span, .userbox .who, .nav a .badge, .theme-seg .tl { display: none; }
  .freshpill .ft, .buildstamp { display: none; }
  .freshpill { justify-content: center; padding: 8px; }
  .nav a { justify-content: center; }
  .userbox { justify-content: center; padding: 8px; }
  .donow-item { flex-wrap: wrap; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .content { padding: 20px 16px 52px; }
  .topbar { padding: 14px 16px; }
  .cmdk-hint span { display: none; }
}
@media (max-width: 560px) {
  .refresh-wrap .lastup { display: none; }
  .dealer .stats-strip { flex-wrap: wrap; }
  .dealer .stats-strip > div { flex: 1 0 50%; }
  .hero-status { flex-wrap: wrap; }
  .myday { grid-template-columns: repeat(2, 1fr); }
  /* POLISH-LOCK: cpills-mobile-snap — one swipeable row instead of a 2-col grid with an orphan pill */
  .cpills { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none; margin-inline: -16px; padding-inline: 16px; }
  .cpills::-webkit-scrollbar { display: none; }
  .cpill { flex: 0 0 44%; min-width: 148px; scroll-snap-align: start; }
  .wincon { flex-wrap: wrap; }
}
@media (max-width: 1200px) {
  .tasksgrid { grid-template-columns: 1fr; }
  .krail { position: static; }
  .evlist { max-height: 260px; }
}
@media (max-width: 900px) {
  .kboard { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .bell-drop { width: 320px; }
}
@media (max-width: 560px) {
  .kboard { grid-template-columns: 1fr; }
  .kfilters { gap: 9px; }
  .dwrow { flex-direction: column; gap: 0; }
}

/* POLISH-LOCK: touch-hit-targets — 44px minimum on touch devices only (desktop keeps its density) */
@media (pointer: coarse) {
  .btn, .btn.sm, .btn-refresh, .dwx, .cpill, .bell-btn { min-height: 44px; }
  .tbl td { padding-top: 12px; padding-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  *, ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .05ms !important; }
  .sweep i { animation: none; transform: scaleX(1); }
  .drawer { transition: none; }
  .dot.live::after { display: none; }
}
