/* ============================================================
   The Gym — KGB Enterprises. Session-first sales rehearsal.
   Design language: "precision instrument" — Geist, tabular
   figures, cool neutrals, ONE accent (KGB blue). Light + dark.
   ============================================================ */
@font-face {
  font-family: "Geist";
  src: url("/static/fonts/Geist.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/static/fonts/GeistMono.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
  font-style: normal;
}

/* ---------------------------------------------------------------
   TOKENS — light is the base; dark overrides. Theme resolution:
   no [data-theme]  -> follow the OS
   [data-theme=...] -> explicit user choice (persisted per user)
   --------------------------------------------------------------- */
:root {
  color-scheme: light;

  /* surfaces (cool-tinted neutrals, one gray family) */
  --bg: #f6f7f9;
  --sunken: #eef0f4;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --surface-3: #e9ecf1;
  --line: #e0e4ea;
  --line-strong: #c6ccd6;

  /* ink — ink-3 holds 4.6:1 on --surface, so small text stays AA */
  --ink: #11161c;
  --ink-2: #495260;
  --ink-3: #69727f;

  /* accent: KGB blue, darkened for light mode so white text on a
     filled button clears AA (4.5:1). Never more than one accent. */
  --accent: #0a6c93;
  --accent-hover: #08556f;
  --accent-ink: #ffffff;
  --accent-soft: rgba(1, 148, 212, 0.10);
  --accent-line: rgba(1, 148, 212, 0.38);
  --accent-text: #0a6c93;

  /* semantic — always paired with a number or word, never colour alone */
  --ok: #0f7a52;
  --warn: #8a5a06;
  --bad: #b3261e;
  --ok-soft: rgba(15, 122, 82, 0.10);
  --warn-soft: rgba(138, 90, 6, 0.10);
  --bad-soft: rgba(179, 38, 30, 0.09);

  /* categorical marks for the four call motions (muted on purpose:
     the accent owns interaction, these only label content) */
  --cat-leak: #35648f;
  --cat-cold: #2b6f51;
  --cat-creator: #614a91;
  --cat-live: #8a5a12;

  /* tinted shadows — carry the neutral hue, never flat black */
  --shadow-1: 0 1px 2px rgba(17, 22, 28, 0.05), 0 1px 1px rgba(17, 22, 28, 0.03);
  --shadow-2: 0 8px 24px -8px rgba(17, 22, 28, 0.14), 0 2px 6px -2px rgba(17, 22, 28, 0.06);
  --shadow-3: 0 24px 56px -20px rgba(17, 22, 28, 0.24);
  --grain-opacity: 0.018;

  /* radii — varied, not uniform: tighter inside, softer outside */
  --r-xs: 6px;
  --r-sm: 8px;
  --r-md: 11px;
  --r-lg: 14px;
  --r-xl: 20px;
  --r-pill: 999px;

  /* type scale (1.28–1.33 steps, no mush) */
  --fs-display: 2.125rem;  /* 34 */
  --fs-1: 1.5625rem;       /* 25 */
  --fs-2: 1.1875rem;       /* 19 */
  --fs-3: 1rem;            /* 16 */
  --fs-4: 0.875rem;        /* 14 */
  --fs-5: 0.8125rem;       /* 13 */
  --fs-6: 0.75rem;         /* 12 */
  --fs-micro: 0.6875rem;   /* 11 */

  /* spacing — 4px base */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;
  --sp-8: 72px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --t: 180ms var(--ease);
  --t-slow: 320ms var(--ease);

  --focus: var(--accent);
  --maxw: 1180px;
  --topbar-h: 56px;

  --z-sticky: 10;
  --z-overlay: 40;
  --z-dialog: 50;
  --z-toast: 60;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark;
    --bg: #0b0e12;
    --sunken: #070a0d;
    --surface: #12161b;
    --surface-2: #171c23;
    --surface-3: #1f252d;
    --line: #242b34;
    --line-strong: #363f4b;
    --ink: #eef1f5;
    --ink-2: #a6b0bc;
    --ink-3: #7f8996;
    --accent: #0194d4;
    --accent-hover: #35abe1;
    --accent-ink: #041520;
    --accent-soft: rgba(1, 148, 212, 0.16);
    --accent-line: rgba(1, 148, 212, 0.46);
    --accent-text: #5cc5f2;
    --ok: #45c48a;
    --warn: #e0a33a;
    --bad: #f2685c;
    --ok-soft: rgba(69, 196, 138, 0.14);
    --warn-soft: rgba(224, 163, 58, 0.14);
    --bad-soft: rgba(242, 104, 92, 0.13);
    --cat-leak: #7fb2e0;
    --cat-cold: #6ec49a;
    --cat-creator: #b6a0e4;
    --cat-live: #dda861;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-2: 0 10px 28px -10px rgba(0, 0, 0, 0.65), 0 2px 6px -2px rgba(0, 0, 0, 0.4);
    --shadow-3: 0 28px 64px -22px rgba(0, 0, 0, 0.8);
    --grain-opacity: 0.03;
  }
}
:root[data-theme="dark"] { color-scheme: dark;
  --bg: #0b0e12;
  --sunken: #070a0d;
  --surface: #12161b;
  --surface-2: #171c23;
  --surface-3: #1f252d;
  --line: #242b34;
  --line-strong: #363f4b;
  --ink: #eef1f5;
  --ink-2: #a6b0bc;
  --ink-3: #7f8996;
  --accent: #0194d4;
  --accent-hover: #35abe1;
  --accent-ink: #041520;
  --accent-soft: rgba(1, 148, 212, 0.16);
  --accent-line: rgba(1, 148, 212, 0.46);
  --accent-text: #5cc5f2;
  --ok: #45c48a;
  --warn: #e0a33a;
  --bad: #f2685c;
  --ok-soft: rgba(69, 196, 138, 0.14);
  --warn-soft: rgba(224, 163, 58, 0.14);
  --bad-soft: rgba(242, 104, 92, 0.13);
  --cat-leak: #7fb2e0;
  --cat-cold: #6ec49a;
  --cat-creator: #b6a0e4;
  --cat-live: #dda861;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 10px 28px -10px rgba(0, 0, 0, 0.65), 0 2px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 28px 64px -22px rgba(0, 0, 0, 0.8);
  --grain-opacity: 0.03;
}

/* honour a user's OS request for more contrast */
@media (prefers-contrast: more) {
  :root { --line: var(--line-strong); --ink-2: var(--ink); --ink-3: var(--ink-2); --grain-opacity: 0; }
}

/* ---------------------------------------------------------------
   BASE
   --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
/* a class-level `display` outranks the UA rule for [hidden], which would leave
   hidden-but-styled elements (e.g. the admin rep switcher) visible */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: var(--fs-4);
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* grain: breaks the digital flatness without reading as texture */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: var(--fs-1); }
h2 { font-size: var(--fs-2); }
h3 { font-size: var(--fs-3); }
p { margin: 0; text-wrap: pretty; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button, input, textarea, select { font: inherit; color: inherit; }
::placeholder { color: var(--ink-3); opacity: 1; }
/* every number in the product is tabular — it is a data instrument */
.num, .mono { font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
:where(td, th, .num, .timer, .score) { font-variant-numeric: tabular-nums; }

/* one focus treatment everywhere, keyboard-only */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
.skip {
  position: fixed; top: -60px; left: var(--sp-4); z-index: var(--z-toast);
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 10px 16px; font-weight: 550; box-shadow: var(--shadow-2);
  transition: top var(--t);
}
.skip:focus { top: var(--sp-3); }
/* focus is moved to #main on every view change so screen readers land in the
   new content — it is a container, not a control, so it must not paint a ring */
#main:focus, #main:focus-visible { outline: none; }
.vh {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
::selection { background: var(--accent-soft); }

/* ---------------------------------------------------------------
   SHELL
   --------------------------------------------------------------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; position: relative; z-index: 2; }
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(16px, 4vw, 32px); }

.topbar {
  position: sticky; top: 0; z-index: var(--z-sticky);
  min-height: var(--topbar-h);
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-2) clamp(16px, 4vw, 32px);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__brand { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.topbar__sep { width: 1px; height: 18px; background: var(--line-strong); flex: none; }
.topbar__product { font-size: var(--fs-5); font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; }
.topbar__spacer { flex: 1; }
.topbar__right { display: flex; align-items: center; gap: var(--sp-2); }

/* KGB identity — light-on-transparent artwork painted as a mask in a
   theme token, so it inverts correctly in light and dark. */
.kgbmark {
  display: block; flex: none; height: 11px; width: 49px;
  background: var(--ink);
  -webkit-mask: url("/static/img/kgb-mark.png") left center/contain no-repeat;
  mask: url("/static/img/kgb-mark.png") left center/contain no-repeat;
}
.kgblock {
  display: block; height: 30px; width: 107px;
  background: var(--ink);
  -webkit-mask: url("/static/img/kgb-enterprises-mask.png") left center/contain no-repeat;
  mask: url("/static/img/kgb-enterprises-mask.png") left center/contain no-repeat;
}

/* primary nav */
.nav { display: flex; align-items: center; gap: var(--sp-1); }
.nav a {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: var(--r-sm);
  font-size: var(--fs-5); font-weight: 550; color: var(--ink-2);
  text-decoration: none; transition: background var(--t), color var(--t);
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.nav svg { width: 15px; height: 15px; flex: none; }
@media (max-width: 720px) { .nav a span { display: none; } .nav a { padding: 8px 10px; } }

/* ---------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------- */
.btn {
  --btn-bg: var(--surface-2);
  --btn-ink: var(--ink);
  --btn-line: var(--line);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 8px 15px;
  background: var(--btn-bg); color: var(--btn-ink);
  border: 1px solid var(--btn-line); border-radius: var(--r-sm);
  font-size: var(--fs-5); font-weight: 550; letter-spacing: -0.005em;
  cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}
.btn:hover { background: var(--surface-3); border-color: var(--line-strong); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; pointer-events: none; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn--primary { --btn-bg: var(--accent); --btn-ink: var(--accent-ink); --btn-line: transparent; box-shadow: var(--shadow-1); font-weight: 600; }
.btn--primary:hover { --btn-bg: var(--accent-hover); --btn-line: transparent; }
.btn--quiet { --btn-bg: transparent; --btn-ink: var(--ink-2); --btn-line: transparent; }
.btn--quiet:hover { --btn-bg: var(--surface-2); --btn-ink: var(--ink); --btn-line: transparent; }
.btn--danger { --btn-bg: transparent; --btn-ink: var(--bad); --btn-line: color-mix(in srgb, var(--bad) 45%, transparent); }
.btn--danger:hover { --btn-bg: var(--bad-soft); --btn-line: var(--bad); }
.btn--lg { min-height: 46px; padding: 12px 22px; font-size: var(--fs-4); border-radius: var(--r-md); }
.btn--block { width: 100%; }
.btn--cue { animation: cue 1.2s var(--ease) 3; }
@keyframes cue { 50% { box-shadow: 0 0 0 5px var(--accent-soft); } }

.iconbtn {
  display: grid; place-items: center; flex: none;
  width: 36px; height: 36px; border-radius: var(--r-sm);
  background: transparent; color: var(--ink-2);
  border: 1px solid transparent; cursor: pointer;
  transition: background var(--t), color var(--t), border-color var(--t);
}
.iconbtn:hover { background: var(--surface-2); color: var(--ink); border-color: var(--line); }
.iconbtn svg { width: 17px; height: 17px; }

/* command-palette trigger */
.cmdk {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  min-height: 36px; padding: 0 10px 0 12px;
  background: var(--surface-2); color: var(--ink-2);   /* ink-3 fell just under AA on surface-2 */
  border: 1px solid var(--line); border-radius: var(--r-sm);
  font-size: var(--fs-5); cursor: pointer; transition: var(--t);
}
.cmdk:hover { border-color: var(--line-strong); color: var(--ink-2); }
.cmdk svg { width: 14px; height: 14px; }
.kbd {
  font-family: "Geist Mono", monospace; font-size: 10.5px; line-height: 1;
  padding: 4px 5px; border: 1px solid var(--line-strong); border-bottom-width: 2px;
  border-radius: var(--r-xs); background: var(--surface); color: var(--ink-3);
}
@media (max-width: 860px) { .cmdk__label, .cmdk .kbd { display: none; } .cmdk { width: 36px; justify-content: center; padding: 0; } }

/* ---------------------------------------------------------------
   FORM CONTROLS
   --------------------------------------------------------------- */
.field { display: block; }
.field > span { display: block; font-size: var(--fs-6); color: var(--ink-2); margin-bottom: 6px; font-weight: 500; }
.input, .select, textarea.input {
  width: 100%; min-height: 40px; padding: 9px 12px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  font-size: 16px;                       /* 16px: stops iOS zoom-on-focus */
  transition: border-color var(--t), box-shadow var(--t);
}
.input:hover, .select:hover { border-color: var(--ink-3); }
.input:focus-visible, .select:focus-visible, textarea.input:focus-visible {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
textarea.input { resize: vertical; line-height: 1.55; }
.err { color: var(--bad); font-size: var(--fs-6); min-height: 18px; }

/* segmented control */
.seg {
  display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  gap: 2px; padding: 3px;
  background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r-md);
}
.seg button {
  min-height: 32px; padding: 5px 12px; border: 0; border-radius: var(--r-xs);
  background: transparent; color: var(--ink-2);
  font-size: var(--fs-6); font-weight: 550; cursor: pointer;
  transition: background var(--t), color var(--t);
}
.seg button:hover { color: var(--ink); }
.seg button[aria-selected="true"], .seg button[aria-pressed="true"] {
  background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1);
}

/* ---------------------------------------------------------------
   CARDS / SURFACES
   --------------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-1);
}
.card--flat { box-shadow: none; }
.panel { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); }

/* labels — sentence case, not shouty all-caps */
.label {
  font-size: var(--fs-micro); font-weight: 600; color: var(--ink-3);
  letter-spacing: 0.02em;
}
.eyebrow {
  font-family: "Geist Mono", monospace;
  font-size: var(--fs-micro); font-weight: 500; color: var(--ink-3);
  letter-spacing: 0.06em; text-transform: uppercase;
}

/* motion tag for a call motion (leak check / cold / creator / live) */
.tag {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-micro); font-weight: 600; letter-spacing: 0.01em;
  padding: 3px 8px; border-radius: var(--r-xs);
  border: 1px solid; background: transparent;
}
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 2px; background: currentColor; }
.tag--client { color: var(--cat-leak); border-color: color-mix(in srgb, var(--cat-leak) 38%, transparent); background: color-mix(in srgb, var(--cat-leak) 9%, transparent); }
.tag--automation { color: var(--cat-cold); border-color: color-mix(in srgb, var(--cat-cold) 38%, transparent); background: color-mix(in srgb, var(--cat-cold) 9%, transparent); }
.tag--influencer { color: var(--cat-creator); border-color: color-mix(in srgb, var(--cat-creator) 38%, transparent); background: color-mix(in srgb, var(--cat-creator) 9%, transparent); }
.tag--live_prospect { color: var(--cat-live); border-color: color-mix(in srgb, var(--cat-live) 38%, transparent); background: color-mix(in srgb, var(--cat-live) 9%, transparent); }

/* avatar — squircle, not a circle */
.avatar {
  display: grid; place-items: center; flex: none;
  width: 38px; height: 38px; border-radius: var(--r-md);
  background: var(--surface-3); border: 1px solid var(--line);
  font-weight: 600; font-size: var(--fs-5); color: var(--ink-2);
  letter-spacing: -0.01em;
}
.avatar--client { color: var(--cat-leak); background: color-mix(in srgb, var(--cat-leak) 12%, transparent); border-color: color-mix(in srgb, var(--cat-leak) 30%, transparent); }
.avatar--automation { color: var(--cat-cold); background: color-mix(in srgb, var(--cat-cold) 12%, transparent); border-color: color-mix(in srgb, var(--cat-cold) 30%, transparent); }
.avatar--influencer { color: var(--cat-creator); background: color-mix(in srgb, var(--cat-creator) 12%, transparent); border-color: color-mix(in srgb, var(--cat-creator) 30%, transparent); }
.avatar--live_prospect { color: var(--cat-live); background: color-mix(in srgb, var(--cat-live) 12%, transparent); border-color: color-mix(in srgb, var(--cat-live) 30%, transparent); }
.avatar--lg { width: 56px; height: 56px; border-radius: var(--r-lg); font-size: var(--fs-2); }

/* difficulty — bars PLUS a readable value, never colour alone */
.meter { display: inline-flex; align-items: center; gap: 7px; }
.meter__bars { display: inline-flex; gap: 2px; }
.meter__bars i { width: 3px; height: 12px; border-radius: 1.5px; background: var(--line-strong); display: block; }
.meter[data-d="1"] i:nth-child(-n+1),
.meter[data-d="2"] i:nth-child(-n+2),
.meter[data-d="3"] i:nth-child(-n+3),
.meter[data-d="4"] i:nth-child(-n+4),
.meter[data-d="5"] i:nth-child(-n+5) { background: var(--ink-2); }
.meter__val { font-family: "Geist Mono", monospace; font-size: var(--fs-micro); color: var(--ink-3); }

/* ---------------------------------------------------------------
   VIEW: TONIGHT (the call sheet) — the home screen
   --------------------------------------------------------------- */
.view { padding: clamp(24px, 5vw, 48px) 0 var(--sp-8); }
.view--full { padding: 0; }

.sheet__head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-5); flex-wrap: wrap; margin-bottom: var(--sp-6);
}
.sheet__title { display: flex; flex-direction: column; gap: 6px; }
.sheet__title h1 { font-size: var(--fs-display); letter-spacing: -0.03em; font-weight: 600; }
.sheet__sub { color: var(--ink-2); font-size: var(--fs-4); }
.sheet__stats { display: flex; gap: var(--sp-5); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat__v { font-family: "Geist Mono", monospace; font-size: var(--fs-2); font-weight: 500; letter-spacing: -0.02em; }
.stat__k { font-size: var(--fs-micro); color: var(--ink-3); }

/* progress track across tonight's calls */
.track { display: flex; align-items: center; gap: 6px; margin-bottom: var(--sp-5); }
.track__seg { height: 4px; flex: 1; border-radius: 2px; background: var(--surface-3); overflow: hidden; }
.track__seg--done { background: var(--ok); }
.track__seg--cur { background: var(--accent); }

/* the call list. Each row is ONE button — keyboard reachable, 44px+ */
.calls { display: flex; flex-direction: column; gap: var(--sp-3); list-style: none; margin: 0; padding: 0; }
.callrow {
  display: grid; grid-template-columns: 30px 38px 1fr auto; align-items: center;
  gap: var(--sp-3); width: 100%; min-height: 68px;
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  text-align: left; cursor: pointer; color: inherit;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t), background var(--t);
}
.callrow:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-1px); }
.callrow[disabled] { opacity: 1; cursor: default; background: transparent; box-shadow: none; border-style: dashed; }
.callrow[disabled] .callrow__name { color: var(--ink-3); }
.callrow__n { font-family: "Geist Mono", monospace; font-size: var(--fs-5); color: var(--ink-3); text-align: center; }
.callrow__main { min-width: 0; }
.callrow__name { font-size: var(--fs-3); font-weight: 550; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.callrow__meta { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; margin-top: 3px; font-size: var(--fs-6); color: var(--ink-3); }
.callrow__right { display: flex; align-items: center; gap: var(--sp-3); }
.callrow__done { color: var(--ok); display: grid; place-items: center; }
.callrow__done svg { width: 18px; height: 18px; }

/* the current call is the one thing that matters — give it presence */
.callrow--cur {
  grid-template-columns: 30px 56px 1fr; align-items: start;
  min-height: 0; padding: var(--sp-5);
  border-color: var(--accent-line); border-width: 1px;
  background: linear-gradient(180deg, var(--accent-soft), transparent 120px), var(--surface);
  box-shadow: var(--shadow-2);
  cursor: default;
}
.callrow--cur:hover { transform: none; }
.callrow--cur .callrow__name { font-size: var(--fs-1); white-space: normal; }
.callrow--cur .callrow__n { padding-top: 8px; }
.cur__body { min-width: 0; }
.cur__pers { color: var(--ink-2); margin: var(--sp-3) 0 var(--sp-4); max-width: 62ch; }
.cur__cta { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

.score {
  font-family: "Geist Mono", monospace; font-weight: 500;
  font-size: var(--fs-3); letter-spacing: -0.02em;
}
.score--ok { color: var(--ok); }
.score--warn { color: var(--warn); }
.score--bad { color: var(--bad); }

.sheet__foot { margin-top: var(--sp-6); display: flex; flex-direction: column; gap: var(--sp-3); }
.linkrow {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
  width: 100%; min-height: 56px; padding: var(--sp-3) var(--sp-4);
  background: transparent; border: 1px solid var(--line); border-radius: var(--r-md);
  color: inherit; cursor: pointer; text-align: left; text-decoration: none;
  transition: background var(--t), border-color var(--t);
}
.linkrow:hover { background: var(--surface-2); border-color: var(--line-strong); }
.linkrow__t { font-size: var(--fs-4); font-weight: 550; }
.linkrow__s { font-size: var(--fs-6); color: var(--ink-3); margin-top: 1px; }
.linkrow svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }

/* ---------------------------------------------------------------
   VIEW: DOSSIER (pre-call brief)
   --------------------------------------------------------------- */
.dossier { max-width: 760px; margin: 0 auto; }
.backlink {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: var(--sp-5);
  background: none; border: 0; padding: 6px 8px 6px 6px; margin-left: -6px;
  border-radius: var(--r-sm); color: var(--ink-2); font-size: var(--fs-5); cursor: pointer;
}
.backlink:hover { background: var(--surface-2); color: var(--ink); }
.backlink svg { width: 15px; height: 15px; }
.dossier__head { display: flex; align-items: center; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.dossier__head h1 { font-size: var(--fs-1); }
.dossier__meta { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-top: 6px; color: var(--ink-2); font-size: var(--fs-5); }
.dossier__pers { font-size: var(--fs-3); line-height: 1.65; color: var(--ink); margin: var(--sp-5) 0; max-width: 62ch; }
.block { margin: var(--sp-6) 0; }
.block > h2 {
  font-size: var(--fs-5); font-weight: 600; color: var(--ink-2);
  margin-bottom: var(--sp-3); letter-spacing: 0;
}
.intel {
  padding: var(--sp-4) var(--sp-5); border-radius: var(--r-md);
  background: var(--surface-2); border: 1px solid var(--line);
  line-height: 1.65; color: var(--ink);
}
.intel--play { background: var(--accent-soft); border-color: var(--accent-line); }
.quotes { display: flex; flex-direction: column; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.quote {
  padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--line);
  color: var(--ink-2); font-size: var(--fs-4);
}
.quote q { color: var(--ink); font-style: normal; }
.dossier__cta {
  position: sticky; bottom: 0; z-index: var(--z-sticky);
  display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap;
  margin-top: var(--sp-6); padding: var(--sp-4) 0;
  background: linear-gradient(transparent, var(--bg) 40%);
}
.notes { margin-top: var(--sp-6); }
.notes__hint { font-weight: 400; color: var(--ink-3); font-size: var(--fs-6); }

/* meeting-prep panel (spine / facts / objections) */
.mprep { margin-top: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-3); }
.mprep__head h2 { font-size: var(--fs-2); }
.mprep__head p { color: var(--ink-2); margin-top: 4px; }
.mprep-sec { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.mprep-sec > summary {
  padding: var(--sp-3) var(--sp-4); cursor: pointer; font-weight: 550; font-size: var(--fs-4);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  list-style: none;
}
.mprep-sec > summary::-webkit-details-marker { display: none; }
.mprep-sec > summary::after { content: "+"; color: var(--ink-3); font-family: "Geist Mono", monospace; }
.mprep-sec[open] > summary::after { content: "–"; }
.mprep-sec > summary:hover { background: var(--surface-2); }
.mprep-body { padding: 0 var(--sp-4) var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.mprep-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-3); }
.mprep-beat { padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.mprep-beat:first-child { border-top: 0; }
.mprep-beat__h { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.mprep-beat__n {
  font-family: "Geist Mono", monospace; font-size: var(--fs-micro);
  width: 20px; height: 20px; display: grid; place-items: center; flex: none;
  border-radius: var(--r-xs); background: var(--surface-3); color: var(--ink-2);
}
.mprep-tag { font-size: var(--fs-micro); color: var(--ink-3); border: 1px solid var(--line); border-radius: var(--r-xs); padding: 2px 6px; }
.mprep-goal { color: var(--ink-2); font-size: var(--fs-5); margin-top: 4px; }
.mprep-say, .mprep-obj__a { margin-top: 6px; font-size: var(--fs-5); line-height: 1.6; }
.mprep-say > span, .mprep-obj__a > span {
  display: inline-block; margin-right: 6px;
  font-family: "Geist Mono", monospace; font-size: var(--fs-micro);
  color: var(--accent-text); text-transform: uppercase; letter-spacing: 0.06em;
}
.mprep-watch { margin-top: 6px; font-size: var(--fs-5); color: var(--ink-3); }
.mprep-obj { padding: var(--sp-3) 0; border-top: 1px solid var(--line); }
.mprep-obj:first-child { border-top: 0; }
.mprep-obj__q { font-weight: 550; }
.mprep-obj__m { font-size: var(--fs-5); color: var(--ink-3); margin-top: 3px; }
.mprep-obj__t { font-size: var(--fs-5); color: var(--ink-2); margin-top: 6px; }
.mprep-fnum { font-family: "Geist Mono", monospace; font-size: var(--fs-micro); color: var(--ink-3); margin-right: 8px; }

/* ---------------------------------------------------------------
   VIEW: CALL — focus mode. No nav, no distractions: a performance.
   --------------------------------------------------------------- */
body.in-call .topbar { display: none; }
.call { min-height: 100dvh; display: flex; flex-direction: column; background: var(--sunken); }
.call__bar {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) clamp(16px, 4vw, 32px);
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.call__id { display: flex; align-items: center; gap: var(--sp-3); min-width: 0; }
.call__name { font-size: var(--fs-4); font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.call__sub { font-size: var(--fs-6); color: var(--ink-3); }
.call__spacer { flex: 1; }
.timer {
  font-family: "Geist Mono", monospace; font-size: var(--fs-5);
  padding: 6px 10px; border-radius: var(--r-sm);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
}
.live {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-micro); font-weight: 600; color: var(--bad);
}
.live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

/* stage progress */
.srail { display: flex; gap: 6px; padding: var(--sp-3) clamp(16px, 4vw, 32px); background: var(--surface); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.srail::-webkit-scrollbar { display: none; }
.schip {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  min-height: 32px; padding: 5px 11px; border-radius: var(--r-pill);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2);
  font-size: var(--fs-6); font-weight: 550; cursor: pointer; white-space: nowrap;
  transition: var(--t);
}
.schip:hover { border-color: var(--line-strong); color: var(--ink); }
.schip__n { font-family: "Geist Mono", monospace; font-size: 10px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3); }
.schip--done .schip__n { background: var(--ok); color: var(--surface); }
.schip--cur { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.schip--cur .schip__n { background: color-mix(in srgb, var(--accent-ink) 22%, transparent); color: var(--accent-ink); }

/* transcript */
.feed { flex: 1; min-height: 0; overflow-y: auto; padding: var(--sp-5) clamp(16px, 4vw, 32px); }
.feed__inner { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: var(--sp-4); }
.msg { max-width: 82%; display: flex; flex-direction: column; gap: 4px; }
.msg__who { font-family: "Geist Mono", monospace; font-size: var(--fs-micro); letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-3); padding: 0 2px; }
.msg__body { padding: 11px 15px; border-radius: var(--r-lg); font-size: var(--fs-4); line-height: 1.55; white-space: pre-wrap; overflow-wrap: break-word; }
.msg--persona { align-self: flex-start; }
.msg--persona .msg__body { background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: var(--r-xs); }
.msg--rep { align-self: flex-end; align-items: flex-end; }
.msg--rep .msg__body { background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: var(--r-xs); }
.typing { align-self: flex-start; display: flex; gap: 4px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); border-bottom-left-radius: var(--r-xs); }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: blink 1.2s var(--ease) infinite; }
.typing i:nth-child(2) { animation-delay: 0.18s; }
.typing i:nth-child(3) { animation-delay: 0.36s; }
@keyframes blink { 0%, 60%, 100% { opacity: 0.25; } 30% { opacity: 1; } }

/* composer */
.composer { padding: var(--sp-3) clamp(16px, 4vw, 32px) var(--sp-4); background: var(--surface); border-top: 1px solid var(--line); }
.composer__inner { max-width: 720px; margin: 0 auto; display: flex; align-items: flex-end; gap: var(--sp-2); }
.composer textarea {
  flex: 1; resize: none; min-height: 44px; max-height: 160px; padding: 11px 14px;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  font-size: 16px; line-height: 1.5;
}
.composer textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.mic {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px;
  border-radius: var(--r-md); background: var(--surface-2);
  border: 1px solid var(--line-strong); color: var(--ink-2); cursor: pointer;
  transition: var(--t);
}
.mic:hover { border-color: var(--accent); color: var(--accent-text); }
.mic svg { width: 18px; height: 18px; }
.mic--on, .v-on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-text); }
.v-rec { border-color: var(--bad); color: var(--bad); }
.v-speak { border-color: var(--ok); color: var(--ok); }

/* voice call mode: the orb */
.cm { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-5); padding: var(--sp-6) clamp(16px, 4vw, 32px); text-align: center; }
.orb {
  position: relative; width: clamp(120px, 26vw, 176px); aspect-ratio: 1;
  border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  background: radial-gradient(120% 120% at 30% 25%, var(--surface-3), var(--surface-2));
  border: 1px solid var(--line-strong); color: var(--ink-2);
  transition: border-color var(--t), color var(--t), transform var(--t);
}
.orb:hover { border-color: var(--accent); }
.orb svg { width: 34px; height: 34px; }
.orb::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--accent); opacity: 0;
  transform: scale(calc(1 + var(--level, 0) * 0.12)); transition: opacity var(--t);
}
.orb.v-on::before, .orb.v-listen::before { opacity: 0.5; }
.orb.v-rec { border-color: var(--bad); color: var(--bad); }
.orb.v-rec::before { border-color: var(--bad); opacity: 0.8; }
.orb.v-speak { border-color: var(--ok); color: var(--ok); }
.orb.v-speak::before { border-color: var(--ok); opacity: 0.6; animation: pulse 1.6s var(--ease) infinite; }
@keyframes pulse { 50% { transform: scale(1.07); opacity: 0.25; } }
.cm__status { font-size: var(--fs-5); color: var(--ink-2); min-height: 22px; }
.cm__cap { max-width: 60ch; min-height: 3em; font-size: var(--fs-3); line-height: 1.6; color: var(--ink); }
/* the engine injects <span class="cap__who">Name</span>text */
.cap__who { display: block; font-family: "Geist Mono", monospace; font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); font-weight: 500; margin-bottom: 4px; }

/* call-mode action buttons */
.cmbtn {
  display: inline-flex; flex-direction: column; align-items: center; gap: 5px;
  min-width: 84px; min-height: 64px; padding: 10px 14px;
  background: var(--surface); color: var(--ink-2);
  border: 1px solid var(--line); border-radius: var(--r-md);
  cursor: pointer; transition: var(--t);
}
.cmbtn:hover { border-color: var(--line-strong); color: var(--ink); }
.cmbtn svg { width: 20px; height: 20px; }
.cmbtn__l { font-size: var(--fs-6); font-weight: 550; }
.cmbtn--talk { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cmbtn--talk:hover { background: var(--accent-hover); color: var(--accent-ink); }
.cmbtn--talk.active { background: var(--bad); border-color: var(--bad); color: #fff; }
.cmbtn--end { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.cmbtn--end:hover { background: var(--bad-soft); border-color: var(--bad); color: var(--bad); }
.seg--mic { font-size: var(--fs-6); }

/* live voice status strip (solid indicator — never a pulsing dot) */
.vstatus {
  display: none; align-items: center; gap: 7px;
  max-width: 720px; margin: 0 auto 8px;
  font-size: var(--fs-6); font-weight: 550; color: var(--ink-2);
}
.vstatus.on { display: flex; }
.vstatus .pip { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.vs-listen { color: var(--accent-text); }
.vs-rec { color: var(--bad); }
.vs-think { color: var(--ink-3); }
.vs-speak { color: var(--ok); }
.cm__meter { width: min(280px, 70vw); height: 5px; border-radius: 3px; background: var(--surface-3); position: relative; overflow: hidden; }
/* driven every audio frame -> scaleX (composited), never width (layout thrash) */
.cm__meter i { display: block; height: 100%; width: 100%; background: var(--accent); border-radius: 3px; transform: scaleX(var(--lvl, 0)); transform-origin: left center; transition: transform 90ms linear; }
.cm__meter b { position: absolute; top: -3px; width: 2px; height: 11px; background: var(--ink-3); border-radius: 1px; }
.cm__row { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; justify-content: center; }
.cm__foot { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; justify-content: center; }

/* ---------------------------------------------------------------
   VIEW: DEBRIEF (scorecard)
   --------------------------------------------------------------- */
.debrief { max-width: 760px; margin: 0 auto; }
.verdict { display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.ring { --v: 0; position: relative; width: 104px; height: 104px; flex: none; display: grid; place-items: center; }
.ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 8; }
.ring__bg { stroke: var(--surface-3); }
.ring__bar { stroke: var(--grade, var(--accent)); stroke-linecap: round; transition: stroke-dashoffset 900ms var(--ease); }
.ring__num { font-family: "Geist Mono", monospace; font-size: var(--fs-1); font-weight: 500; letter-spacing: -0.03em; }
.verdict__txt { min-width: 0; flex: 1; }
.verdict__txt h1 { font-size: var(--fs-2); }
.verdict__txt p { color: var(--ink-2); margin-top: 6px; max-width: 54ch; }

.dims { display: flex; flex-direction: column; gap: var(--sp-3); }
.dim { display: grid; grid-template-columns: minmax(120px, 190px) 1fr 42px; align-items: center; gap: var(--sp-3); }
.dim__k { font-size: var(--fs-5); color: var(--ink-2); }
.dim__bar { height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.dim__bar i { display: block; height: 100%; border-radius: 3px; background: var(--grade, var(--accent)); }
.dim__v { font-family: "Geist Mono", monospace; font-size: var(--fs-5); text-align: right; color: var(--ink-2); }
@media (max-width: 560px) { .dim { grid-template-columns: 1fr 42px; } .dim__bar { grid-column: 1 / -1; } }

.crit { display: flex; flex-direction: column; gap: var(--sp-2); list-style: none; margin: 0; padding: 0; }
.crit li { padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); border-left: 1px solid var(--line); }
.crit--won li { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 26%, transparent); }
.crit--lost li { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 26%, transparent); }
.saidbetter { display: grid; gap: var(--sp-2); padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line); }
.saidbetter__you, .saidbetter__try { font-size: var(--fs-4); line-height: 1.6; }
.saidbetter__you { color: var(--ink-3); }
.saidbetter b { display: block; font-family: "Geist Mono", monospace; font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 3px; font-weight: 500; }
.saidbetter__try b { color: var(--accent-text); }

/* ---------------------------------------------------------------
   VIEW: PROGRESS
   --------------------------------------------------------------- */
.grid-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: var(--sp-3); margin-bottom: var(--sp-6); }
.statcard { padding: var(--sp-4); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.statcard__v { font-family: "Geist Mono", monospace; font-size: var(--fs-1); font-weight: 500; letter-spacing: -0.03em; }
.statcard__k { font-size: var(--fs-6); color: var(--ink-3); margin-top: 2px; }
.statcard__d { font-size: var(--fs-6); margin-top: 6px; }
.up { color: var(--ok); } .down { color: var(--bad); }

.spark { display: flex; align-items: flex-end; gap: 3px; height: 56px; margin: var(--sp-2) 0 var(--sp-5); }
.spark i { flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; background: var(--accent-soft); border-top: 2px solid var(--accent); }

.rows { display: flex; flex-direction: column; gap: 2px; }
.row2 {
  display: grid; grid-template-columns: 38px 1fr auto auto; align-items: center; gap: var(--sp-3);
  width: 100%; min-height: 56px; padding: var(--sp-2) var(--sp-3);
  background: none; border: 0; border-radius: var(--r-md); cursor: pointer; color: inherit; text-align: left;
  transition: background var(--t);
}
.row2:hover { background: var(--surface-2); }
.row2__n { font-size: var(--fs-4); font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row2__s { font-size: var(--fs-6); color: var(--ink-3); }
.row2__d { font-family: "Geist Mono", monospace; font-size: var(--fs-6); color: var(--ink-3); }

/* ---------------------------------------------------------------
   VIEW: TEAM (admin) — a real data table: many reps x many metrics is
   exactly what tables are for. Scrolls inside its own box on narrow screens
   so the page itself never scrolls sideways.
   --------------------------------------------------------------- */
.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--shadow-1);
}
.dtable { width: 100%; border-collapse: collapse; font-size: var(--fs-5); }
.dtable thead th {
  text-align: left; font-weight: 600; font-size: var(--fs-micro);
  letter-spacing: 0.02em; color: var(--ink-3); white-space: nowrap;
  padding: var(--sp-3) var(--sp-3); border-bottom: 1px solid var(--line);
  background: var(--surface-2); position: sticky; top: 0;
}
.dtable tbody th, .dtable td {
  padding: var(--sp-2) var(--sp-3); border-bottom: 1px solid var(--line);
  text-align: left; font-weight: 400; vertical-align: middle; white-space: nowrap;
}
.dtable tbody tr:last-child th, .dtable tbody tr:last-child td { border-bottom: 0; }
.dtable tbody tr:hover { background: var(--surface-2); }
.dtable td.num { font-family: "Geist Mono", monospace; }

.teamrep {
  display: flex; align-items: center; gap: var(--sp-3);
  background: none; border: 0; padding: 4px; margin: -4px;
  border-radius: var(--r-sm); cursor: pointer; color: inherit; text-align: left;
}
.teamrep:hover { background: var(--surface-3); }
.teamrep__n { font-size: var(--fs-4); font-weight: 550; }
.teamrep__s { font-size: var(--fs-micro); }

/* tonight's completion, as a bar plus the raw count — never bar alone */
.tprog { display: inline-flex; align-items: center; gap: var(--sp-2); }
.tprog__bar { width: 74px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; flex: none; }
.tprog__bar i { display: block; height: 100%; border-radius: 3px; background: var(--ink-3); }
.tprog__bar i.tprog--ok { background: var(--ok); }
.tprog__bar i.tprog--warn { background: var(--warn); }
.tprog__bar i.tprog--bad { background: var(--bad); }
.tprog .num { font-size: var(--fs-6); color: var(--ink-2); }

.linky {
  background: none; border: 0; padding: 4px 6px; margin: -4px -6px;
  border-radius: var(--r-xs); color: var(--accent-text);
  font: inherit; font-family: "Geist Mono", monospace; font-size: var(--fs-6);
  cursor: pointer; text-decoration: underline; text-underline-offset: 2px;
}
.linky:hover { background: var(--accent-soft); }

/* ---------------------------------------------------------------
   VIEW: ROSTER (free practice)
   --------------------------------------------------------------- */
.roster__bar { display: flex; gap: var(--sp-3); align-items: center; flex-wrap: wrap; margin-bottom: var(--sp-5); }
.roster__bar .input { max-width: 320px; }
.roster__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: var(--sp-3); }
.pcard {
  display: flex; flex-direction: column; gap: var(--sp-3);
  padding: var(--sp-4); min-height: 132px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  cursor: pointer; text-align: left; color: inherit; box-shadow: var(--shadow-1);
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.pcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.pcard__top { display: flex; align-items: center; gap: var(--sp-3); }
.pcard__name { font-size: var(--fs-4); font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__arch { font-size: var(--fs-6); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.roster__group { grid-column: 1 / -1; margin-top: var(--sp-4); }

/* ---------------------------------------------------------------
   VIEW: PLAN
   --------------------------------------------------------------- */
.plan__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.weeks { display: flex; flex-direction: column; gap: var(--sp-2); }
.week { display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: var(--sp-3); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface); }
.week--cur { border-color: var(--accent-line); background: var(--accent-soft); }
.week--done { color: var(--ink-3); }
.week__n { font-family: "Geist Mono", monospace; font-size: var(--fs-6); color: var(--ink-3); }
.week__t { font-size: var(--fs-4); font-weight: 550; }
.week__s { font-size: var(--fs-6); color: var(--ink-3); margin-top: 2px; }

/* ---------------------------------------------------------------
   FEEDBACK: empty, skeleton, toast, dialog
   --------------------------------------------------------------- */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--sp-3); padding: var(--sp-8) var(--sp-4); }
.empty__mark { width: 46px; height: 46px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-3); }
.empty__mark svg { width: 22px; height: 22px; }
.empty h2 { font-size: var(--fs-2); }
.empty p { color: var(--ink-2); max-width: 46ch; }

/* skeletons match the shape of what is loading, not a spinner */
.sk { background: var(--surface-3); border-radius: var(--r-xs); position: relative; overflow: hidden; }
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 60%, transparent), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { 100% { transform: translateX(200%); } }
.sk--row { height: 68px; border-radius: var(--r-lg); margin-bottom: var(--sp-3); }
.sk--line { height: 12px; margin-bottom: var(--sp-2); }
.sk--title { height: 26px; width: 45%; margin-bottom: var(--sp-4); }

.toast {
  position: fixed; left: 50%; bottom: var(--sp-5); z-index: var(--z-toast);
  transform: translate(-50%, 18px); opacity: 0; pointer-events: none;
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 16px; border-radius: var(--r-md);
  background: var(--ink); color: var(--bg);
  box-shadow: var(--shadow-3); font-size: var(--fs-5); font-weight: 500;
  transition: opacity var(--t), transform var(--t-slow);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast--err { background: var(--bad); color: #fff; }

dialog {
  padding: 0; border: 0; background: transparent; color: inherit;
  max-width: min(560px, calc(100vw - 32px)); width: 100%;
}
dialog::backdrop { background: color-mix(in srgb, var(--sunken) 70%, transparent); backdrop-filter: blur(3px); }
.sheetbox {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); box-shadow: var(--shadow-3);
  padding: var(--sp-5); display: flex; flex-direction: column; gap: var(--sp-4);
}
.sheetbox h2 { font-size: var(--fs-2); }
.sheetbox p { color: var(--ink-2); font-size: var(--fs-5); }
.sheetbox__foot { display: flex; justify-content: flex-end; gap: var(--sp-2); }

/* command palette */
.cmd { padding: 0; }
.cmd__in { display: flex; align-items: center; gap: var(--sp-3); padding: var(--sp-4); border-bottom: 1px solid var(--line); }
.cmd__in svg { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.cmd__in input { flex: 1; background: none; border: 0; outline: none; font-size: var(--fs-3); }
.cmd__list { max-height: min(60vh, 420px); overflow-y: auto; padding: var(--sp-2); margin: 0; list-style: none; }
.cmd__item {
  display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: var(--sp-3);
  width: 100%; min-height: 46px; padding: var(--sp-2) var(--sp-3);
  background: none; border: 0; border-radius: var(--r-sm); cursor: pointer; color: inherit; text-align: left;
}
.cmd__item:hover, .cmd__item[aria-selected="true"] { background: var(--surface-2); }
.cmd__item[aria-selected="true"] { box-shadow: inset 2px 0 0 var(--accent); }
.cmd__t { font-size: var(--fs-4); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd__s { font-size: var(--fs-6); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cmd__empty { padding: var(--sp-6); text-align: center; color: var(--ink-3); font-size: var(--fs-5); }

/* account / theme menu */
.menu { position: relative; }
.menu__pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: var(--z-dialog);
  min-width: 232px; padding: var(--sp-2);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-md); box-shadow: var(--shadow-3);
}
.menu__pop[hidden] { display: none; }
.menu__who { padding: var(--sp-2) var(--sp-3) var(--sp-3); border-bottom: 1px solid var(--line); margin-bottom: var(--sp-2); }
.menu__name { font-size: var(--fs-4); font-weight: 550; }
.menu__role { font-size: var(--fs-6); color: var(--ink-3); }
.menu__block { padding: var(--sp-2) var(--sp-3); }
.menu__block > span { display: block; font-size: var(--fs-micro); color: var(--ink-3); margin-bottom: 6px; }
.menu__item {
  display: flex; align-items: center; gap: var(--sp-3); width: 100%;
  min-height: 40px; padding: var(--sp-2) var(--sp-3);
  background: none; border: 0; border-radius: var(--r-sm);
  font-size: var(--fs-5); color: var(--ink); cursor: pointer; text-align: left;
}
.menu__item:hover { background: var(--surface-2); }
.menu__item svg { width: 16px; height: 16px; color: var(--ink-3); }
.avatar--me { width: 30px; height: 30px; border-radius: var(--r-sm); font-size: var(--fs-6); background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }

/* ---------------------------------------------------------------
   THE FORGE — micro-skill drilling, walled off from live calls.
   Same tokens as the Gym so the two read as one product.
   --------------------------------------------------------------- */
.fg-top {
  position: sticky; top: 0; z-index: var(--z-sticky);
  display: flex; align-items: center; gap: var(--sp-4);
  padding: var(--sp-2) clamp(16px, 4vw, 32px); min-height: var(--topbar-h);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.fg-brand { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-5); font-weight: 600; letter-spacing: -0.015em; }
.fg-brand em { font-style: normal; color: var(--ink-3); font-size: var(--fs-6); font-weight: 400; }
.fg-back { margin-left: auto; font-size: var(--fs-5); color: var(--ink-2); text-decoration: none; padding: 7px 12px; border-radius: var(--r-sm); }
.fg-back:hover { background: var(--surface-2); color: var(--ink); }
.fg-main { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: clamp(24px, 5vw, 48px) clamp(16px, 4vw, 32px) var(--sp-8); }

.fg-hero { max-width: 62ch; margin-bottom: var(--sp-6); }
.fg-hero h1 { font-size: var(--fs-display); letter-spacing: -0.03em; }
.fg-hero p { color: var(--ink-2); margin-top: var(--sp-3); }
.fg-gauntlet { margin-top: var(--sp-4); }
.fg-gauntlet span { font-weight: 400; opacity: 0.8; }
.fg-belthelp { margin-top: var(--sp-4); font-size: var(--fs-6); color: var(--ink-3); }
.fg-belthelp b { color: var(--ink-2); font-weight: 600; }

.fg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(272px, 1fr)); gap: var(--sp-3); }
.fg-card {
  display: flex; flex-direction: column; gap: var(--sp-2);
  padding: var(--sp-4); text-align: left; cursor: pointer; color: inherit;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-1);
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.fg-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.fg-card.is-due { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-soft), transparent 70px), var(--surface); }
.fg-card__top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.fg-card h3 { font-size: var(--fs-4); font-weight: 600; }
.fg-card__foot { margin-top: auto; padding-top: var(--sp-2); display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); }
.fg-fixes { font-size: var(--fs-6); color: var(--ink-3); }
.fg-acc { font-family: "Geist Mono", monospace; font-size: var(--fs-micro); color: var(--ink-3); }

.fg-belt, .fg-tag, .fg-due {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-micro); font-weight: 600; padding: 3px 8px;
  border: 1px solid var(--line); border-radius: var(--r-xs); color: var(--ink-2);
}
.fg-due { color: var(--accent-text); border-color: var(--accent-line); background: var(--accent-soft); }
.b-blocked { color: var(--ink-2); }
.b-gauntlet { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 38%, transparent); background: var(--warn-soft); }
.b-retained { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 38%, transparent); background: var(--ok-soft); }
.fg-dots { font-family: "Geist Mono", monospace; font-size: var(--fs-micro); color: var(--ink-3); letter-spacing: 0.14em; }
.fg-dots.done { color: var(--ok); letter-spacing: 0; }

.fg-drill { max-width: 760px; margin: 0 auto; }
.fg-drillhead { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; margin-bottom: var(--sp-5); }
.fg-now { display: flex; align-items: center; gap: var(--sp-2); font-size: var(--fs-5); }
.fg-now em { font-style: normal; color: var(--ink-3); font-size: var(--fs-6); }
.fg-streak { margin-left: auto; font-family: "Geist Mono", monospace; font-size: var(--fs-6); color: var(--ink-3); }

.fg-buyer { padding: var(--sp-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.fg-buyer__tag { display: block; font-family: "Geist Mono", monospace; font-size: var(--fs-micro); text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-3); margin-bottom: var(--sp-2); }
.fg-buyer p { font-size: var(--fs-2); line-height: 1.5; letter-spacing: -0.015em; }

.fg-verdict { margin-top: var(--sp-4); padding: var(--sp-4); border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface-2); }
.fg-verdict.pass { border-color: color-mix(in srgb, var(--ok) 32%, transparent); background: var(--ok-soft); }
.fg-verdict.fail { border-color: color-mix(in srgb, var(--bad) 32%, transparent); background: var(--bad-soft); }
.fg-event { font-weight: 600; font-size: var(--fs-4); }
.fg-why { margin-top: 6px; color: var(--ink-2); font-size: var(--fs-5); }
.fg-say { margin-top: var(--sp-3); font-size: var(--fs-5); line-height: 1.6; }
.fg-verdict__head { display: flex; align-items: center; gap: var(--sp-2); flex-wrap: wrap; }
.fg-verdict .fg-mark { font-weight: 600; font-size: var(--fs-4); }
.fg-verdict.pass .fg-mark { color: var(--ok); }
.fg-verdict.fail .fg-mark { color: var(--bad); }
.fg-say p { margin-top: 4px; }
.fg-say span, .fg-why span, .fg-say__lbl {
  display: inline-block; margin-right: 6px;
  font-family: "Geist Mono", monospace; font-size: var(--fs-micro);
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-text);
}

.fg-answer { margin-top: var(--sp-4); }
.fg-answer textarea {
  width: 100%; resize: vertical; min-height: 84px; padding: 12px 14px;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  font-size: 16px; line-height: 1.55;
}
.fg-answer textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fg-answer__row { display: flex; align-items: center; gap: var(--sp-2); margin-top: var(--sp-3); }
.fg-mic {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px;
  border-radius: var(--r-md); background: var(--surface-2);
  border: 1px solid var(--line-strong); color: var(--ink-2); cursor: pointer; transition: var(--t);
}
.fg-mic:hover { border-color: var(--accent); color: var(--accent-text); }
.fg-mic.busy, .fg-mic.rec { border-color: var(--bad); color: var(--bad); background: var(--bad-soft); }
.fg-mic svg { width: 18px; height: 18px; }
.fg-send { margin-left: auto; }
.fg-next { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); flex-wrap: wrap; }

/* ---------------------------------------------------------------
   LOGIN
   --------------------------------------------------------------- */
.loginpage { background: var(--sunken); }
.loginwrap { min-height: 100dvh; display: grid; place-items: center; padding: var(--sp-5); position: relative; z-index: 2; }
.login {
  width: 100%; max-width: 384px; padding: var(--sp-6) var(--sp-5) var(--sp-5);
  border-radius: var(--r-xl); box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: var(--sp-3);
}
.login__brand { margin-bottom: var(--sp-4); }
.login__brand h1 { margin-top: var(--sp-5); font-size: var(--fs-1); }
.login__brand p { margin-top: 4px; color: var(--ink-2); font-size: var(--fs-5); }
.login .btn { margin-top: var(--sp-3); }

/* Paired title/subtitle text must be block-level: as inline spans they ignore
   min-width:0 and text-overflow, so long archetypes spilled out of their card. */
.cell { display: block; min-width: 0; }
.linkrow__t, .linkrow__s,
.pcard__name, .pcard__arch,
.row2__n, .row2__s,
.cmd__t, .cmd__s,
.callrow__name, .callrow__meta,
.stat__v, .stat__k { display: block; }
.callrow__meta { display: flex; }

/* ---------------------------------------------------------------
   TOUCH TARGETS — last in the file on purpose: these must override the
   component defaults above, which are sized for a mouse. A 31px nav link is
   fine with a cursor and a miss-tap with a thumb, and reps may drill on a phone.
   --------------------------------------------------------------- */
@media (pointer: coarse) {
  .nav a, .cmdk, .iconbtn, .btn, .seg button, .menu__item, .backlink { min-height: 44px; }
  .iconbtn, .cmdk { min-width: 44px; }
  .schip { min-height: 40px; }
}

/* Phones. The brand block must not shrink — when it did, "The Gym" overflowed
   its own container and collided with the nav. Below 520px the KGB mark alone
   carries the identity, so the product label steps aside. */
@media (max-width: 520px) {
  .topbar { gap: var(--sp-2); }
  .topbar__brand { flex: none; }
  .topbar__sep, .topbar__product { display: none; }
  /* .callrow FIRST, .callrow--cur after: equal specificity, so the modifier
     must come later or the 4-column grid wins and squeezes the body. */
  .callrow { grid-template-columns: 20px 34px 1fr auto; gap: var(--sp-2); }
  .callrow--cur { grid-template-columns: 20px 1fr; padding: var(--sp-4); }
  /* drop the big avatar rather than the number: hiding a grid child shifts
     every later child one column left, and the number keeps the sheet legible */
  .callrow--cur .avatar--lg { display: none; }
  .callrow--cur .callrow__name { font-size: var(--fs-2); }
  /* full-width CTAs are easier to hit with a thumb */
  .cur__cta { flex-direction: column; align-items: stretch; }
  .cur__cta .btn { width: 100%; }
  .sheet__stats { gap: var(--sp-4); }
  .sheet__title h1 { font-size: 1.75rem; }
}

/* utility */
.hr { height: 1px; background: var(--line); border: 0; margin: var(--sp-6) 0; }
.stack { display: flex; flex-direction: column; }
.muted { color: var(--ink-2); }
.faint { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
