/* Digo Voice — design system (Sep 2026 redesign)
   Direction: ElevenLabs / Sarvam. Warm off-white, black ink, hairline borders,
   pill buttons, big soft corners; colour only in the orbs and in small status
   chips. Geist for everything, Geist Mono for numbers, Instrument Serif for
   greetings. Light by default, dark done properly. */

@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/geist-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/geist-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/geist-mono-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url(fonts/geist-mono-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Instrument Serif"; font-style: normal; font-weight: 400; font-display: swap;
  src: url(fonts/instrument-serif-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Instrument Serif"; font-style: italic; font-weight: 400; font-display: swap;
  src: url(fonts/instrument-serif-latin-400-italic.woff2) format("woff2"); }

:root, [data-theme="light"] {
  --font: "Geist", "Noto Sans Malayalam", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-ml: "Noto Sans Malayalam", "Geist", system-ui, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --font-serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;

  --frame: #f3f2f0;        /* behind the page on big screens */
  --page: #ffffff;         /* the page */
  --soft: #f6f5f3;         /* wells, tracks, hover */
  --soft-2: #eeece9;       /* pressed, active tab */
  --surface: #ffffff;      /* cards */
  --ink: #0d0d0e;
  --ink-2: #5c5752;
  --ink-3: #9d978f;
  --line: #ecebe8;
  --line-2: #dfdcd8;
  --primary: #0d0d0e;
  --on-primary: #ffffff;
  --brand: #6b4dff;
  --brand-2: #ff7d57;

  --green: #1a7f45;  --green-bg: #e8f5ec;
  --amber: #a85600;  --amber-bg: #fcf1e0;
  --red: #c3372c;    --red-bg: #fcebe8;
  --blue: #2d5bd6;   --blue-bg: #ebf0fd;
  --violet: #5a45dd; --violet-bg: #f0edff;

  --bubble-bot: #f3f0ff;
  --bubble-lead: #f6f5f3;
  --shadow-xs: 0 1px 2px rgba(24, 20, 16, 0.04);
  --shadow-sm: 0 1px 2px rgba(24, 20, 16, 0.04), 0 3px 10px rgba(24, 20, 16, 0.04);
  --shadow-md: 0 2px 6px rgba(24, 20, 16, 0.04), 0 14px 34px rgba(24, 20, 16, 0.09);
  --shadow-lg: 0 10px 24px rgba(24, 20, 16, 0.06), 0 30px 80px rgba(24, 20, 16, 0.16);
  --glass: rgba(255, 255, 255, 0.82);
  --dots: rgba(13, 13, 14, 0.09);
  --grain-opacity: 0.45;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

[data-theme="dark"] {
  --frame: #050506;
  --page: #0c0c0d;
  --soft: #161618;
  --soft-2: #1e1e21;
  --surface: #111113;
  --ink: #f5f4f2;
  --ink-2: #aaa49e;
  --ink-3: #6f6a65;
  --line: rgba(255, 255, 255, 0.075);
  --line-2: rgba(255, 255, 255, 0.13);
  --primary: #f5f4f2;
  --on-primary: #0d0d0e;
  --brand: #9b86ff;
  --brand-2: #ff9474;

  --green: #4fd18b;  --green-bg: rgba(79, 209, 139, 0.12);
  --amber: #f5b64a;  --amber-bg: rgba(245, 182, 74, 0.12);
  --red: #ff7b70;    --red-bg: rgba(255, 123, 112, 0.12);
  --blue: #86a8ff;   --blue-bg: rgba(134, 168, 255, 0.13);
  --violet: #b3a3ff; --violet-bg: rgba(179, 163, 255, 0.14);

  --bubble-bot: #1c1830;
  --bubble-lead: #19191c;
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 3px 10px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.35), 0 14px 34px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.4), 0 30px 80px rgba(0, 0, 0, 0.6);
  --glass: rgba(12, 12, 13, 0.78);
  --dots: rgba(255, 255, 255, 0.07);
  --grain-opacity: 0.3;
  color-scheme: dark;
}

/* ------------------------------------------------------------ base */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--frame); color: var(--ink);
  font: 400 14px/1.5 var(--font); letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01" on;
  min-height: 100vh; min-height: 100dvh;
  overflow-x: clip;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { -webkit-tap-highlight-color: transparent; }
::selection { background: color-mix(in srgb, var(--brand) 22%, transparent); }
:focus-visible { outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; border-radius: 8px; }
img, svg, canvas { display: block; }

.ml { font-family: var(--font-ml); line-height: 1.7; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 0.92em; letter-spacing: -0.01em; }
.serif { font-family: var(--font-serif); font-weight: 400; letter-spacing: -0.01em; }
.muted { color: var(--ink-3); }
.soft { color: var(--ink-2); }
.small { font-size: 13px; }
.xs { font-size: 12px; }
.strong { font-weight: 550; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.row.wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 16px; }
.stack-sm > * + * { margin-top: 10px; }
.stack-lg > * + * { margin-top: 28px; }
.hidden { display: none !important; }
.icon { width: 16px; height: 16px; flex-shrink: 0; }
.icon.sm { width: 14px; height: 14px; }
.icon.lg { width: 20px; height: 20px; }
.icon.xl { width: 24px; height: 24px; }
.tone-green { color: var(--green); } .tone-amber { color: var(--amber); } .tone-red { color: var(--red); }
.tone-blue { color: var(--blue); } .tone-violet { color: var(--violet); }

/* ------------------------------------------------------------ brand */
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); }
.logo-mark { width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 32% 28%, #fff1ea 0%, rgba(255, 241, 234, 0) 38%),
    radial-gradient(circle at 78% 82%, #ff7d57 0%, rgba(255, 125, 87, 0) 58%),
    radial-gradient(circle at 50% 50%, #9d86ff 0%, #5a3cf0 100%);
  box-shadow: inset 0 -2px 6px rgba(40, 20, 120, 0.35), 0 1px 2px rgba(40, 20, 120, 0.2); }
.logo-mark::after, .av::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.9 -0.3'/%3E%3C/filter%3E%3Crect width='96' height='96' filter='url(%23n)'/%3E%3C/svg%3E");
  mix-blend-mode: overlay; opacity: var(--grain-opacity); }
.logo-word { font-size: 18px; font-weight: 620; letter-spacing: -0.045em; line-height: 1; }
.logo-word span { color: var(--ink-3); font-weight: 450; letter-spacing: -0.03em; margin-left: 1px; }

/* ------------------------------------------------------------ shell */
.shell { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.sidebar { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; padding: 18px 12px 14px; }
.sidebar .logo { padding: 4px 10px 22px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 12px; color: var(--ink-3); padding: 18px 12px 7px; font-weight: 450; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 12px; border-radius: 11px;
  color: var(--ink-2); font-weight: 450; font-size: 14px; cursor: pointer; border: 0; background: none; width: 100%; text-align: left;
  transition: background .15s, color .15s, box-shadow .15s;
}
.nav-item .icon { width: 18px; height: 18px; color: var(--ink-3); transition: color .15s; }
.nav-item:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 4%, transparent); }
.nav-item:hover .icon { color: var(--ink-2); }
.nav-item.active { background: var(--page); color: var(--ink); box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); font-weight: 500; }
.nav-item.active .icon { color: var(--ink); }
.nav-count { margin-left: auto; font-size: 11.5px; font-weight: 550; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; background: var(--soft-2); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.nav-count.hot { background: var(--amber-bg); color: var(--amber); }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.agent-card { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 16px; background: var(--page);
  box-shadow: var(--shadow-xs), 0 0 0 1px var(--line); cursor: pointer; transition: box-shadow .2s; }
.agent-card:hover { box-shadow: var(--shadow-sm), 0 0 0 1px var(--line-2); }
.foot-actions { display: flex; gap: 2px; padding: 0 4px; }
.content { min-width: 0; padding: 8px 8px 8px 0; }
.panel { background: var(--page); border-radius: 18px; box-shadow: 0 0 0 1px var(--line), var(--shadow-xs); min-height: calc(100vh - 16px); min-height: calc(100dvh - 16px); }
.page { max-width: 1120px; margin: 0 auto; padding: 36px 44px 110px; }
.topbar, .bottombar { display: none; }
.route > .stack-lg > * { animation: rise .5s var(--ease, cubic-bezier(.2, .8, .2, 1)) backwards; }
.route > .stack-lg > *:nth-child(2) { animation-delay: .04s; }
.route > .stack-lg > *:nth-child(3) { animation-delay: .08s; }
.route > .stack-lg > *:nth-child(4) { animation-delay: .12s; }
.route > .stack-lg > *:nth-child(5) { animation-delay: .16s; }
.route > .stack-lg > *:nth-child(n+6) { animation-delay: .2s; }
.login-box { animation: rise .6s var(--ease, cubic-bezier(.2, .8, .2, 1)) backwards; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------ page header */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; }
.page-title { font-size: 28px; font-weight: 520; letter-spacing: -0.035em; line-height: 1.15; margin: 0; }
.page-title.hello { font-family: var(--font-serif); font-weight: 400; font-size: 46px; letter-spacing: -0.015em; line-height: 1.05; }
.page-desc { color: var(--ink-3); margin: 8px 0 0; max-width: 620px; font-size: 14.5px; }
.page-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-3); font-size: 13.5px; margin-bottom: 14px; transition: color .15s; }
.back:hover { color: var(--ink); }
.eyebrow { font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); }

/* ------------------------------------------------------------ cards */
.card { background: var(--surface); border-radius: 20px; box-shadow: 0 0 0 1px var(--line), var(--shadow-xs); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 4px; min-height: 52px; }
.card-title { font-size: 14.5px; font-weight: 550; margin: 0; letter-spacing: -0.012em; display: flex; align-items: center; gap: 8px; }
.card-sub { font-size: 13px; color: var(--ink-3); margin: 1px 0 0; }
.card-body { padding: 14px 20px 20px; }
.card-body.tight { padding: 6px 8px 8px; }
.card-foot { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); }
.well { background: var(--soft); border-radius: 16px; padding: 14px 16px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); }
.grid-main-r { grid-template-columns: minmax(0, 1fr) minmax(0, 360px); }
.grid-rev { grid-template-columns: minmax(0, 1fr) minmax(0, 1.75fr); }

/* stats: one card, figures split by hairlines */
.stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stat { padding: 18px 20px 18px; min-width: 0; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 1px; background: var(--line); }
.stat-label { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-3); }
.stat-label .icon { width: 14px; height: 14px; }
.stat-value { font-size: 30px; font-weight: 480; letter-spacing: -0.04em; margin-top: 8px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-value.tone-amber { color: var(--amber); } .stat-value.tone-green { color: var(--green); }
.stat-hint { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }

/* ------------------------------------------------------------ buttons */
.btn {
  --h: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: var(--h); padding: 0 16px;
  border-radius: 999px; border: 0; background: var(--surface); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-2), var(--shadow-xs);
  font-weight: 500; font-size: 14px; letter-spacing: -0.01em; cursor: pointer; white-space: nowrap; user-select: none;
  transition: background .15s, box-shadow .15s, opacity .15s, transform .12s var(--ease, ease);
}
.btn:hover { background: var(--soft); }
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn.primary { background: var(--primary); color: var(--on-primary); box-shadow: 0 1px 2px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .08); }
.btn.primary:hover { background: color-mix(in srgb, var(--primary) 86%, var(--page)); }
.btn.danger { background: var(--red); color: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .12); }
.btn.danger:hover { background: color-mix(in srgb, var(--red) 88%, #000); }
.btn.ghost { background: transparent; box-shadow: none; color: var(--ink-2); }
.btn.ghost:hover { background: var(--soft); color: var(--ink); }
.btn.soft { background: var(--soft); box-shadow: none; }
.btn.soft:hover { background: var(--soft-2); }
.btn.sm { --h: 32px; padding: 0 13px; font-size: 13px; gap: 6px; }
.btn.xs { --h: 28px; padding: 0 11px; font-size: 12.5px; gap: 5px; }
.btn.lg { --h: 46px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.icon-btn { width: var(--h); padding: 0; }
.btn .icon { width: 15px; height: 15px; }
.btn.lg .icon { width: 17px; height: 17px; }
.spin { animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ badges */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap; letter-spacing: -0.005em;
  background: var(--soft); color: var(--ink-2);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.green { background: var(--green-bg); color: var(--green); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }
.badge.blue { background: var(--blue-bg); color: var(--blue); }
.badge.violet { background: var(--violet-bg); color: var(--violet); }
.badge.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-2); }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* live dot with rings */
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.live-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid var(--green); opacity: 0; animation: ring 1.8s ease-out infinite; }
.live-dot.ringing { background: var(--amber); }
.live-dot.ringing::after { border-color: var(--amber); }
@keyframes ring { 0% { transform: scale(.5); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

/* ------------------------------------------------------------ forms */
.field { display: block; min-width: 0; }
.field-label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 7px; color: var(--ink); }
.field-hint { display: block; font-size: 12.5px; color: var(--ink-3); margin-top: 7px; line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 13px; border-radius: 12px; border: 0; background: var(--surface); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-xs); outline: none; transition: box-shadow .15s, background .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--ink-3); }
.input:hover, .select:hover, .textarea:hover { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent), var(--shadow-xs); }
.input:focus, .select:focus, .textarea:focus { box-shadow: inset 0 0 0 1px var(--ink-2), 0 0 0 4px color-mix(in srgb, var(--ink) 7%, transparent); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--soft); color: var(--ink-2); }
.textarea { height: auto; min-height: 88px; padding: 10px 13px; resize: vertical; line-height: 1.55; border-radius: 14px; }
.select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239d978f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 11px center; }
input[type="datetime-local"].input, input[type="time"].input { padding-right: 8px; }
.search { position: relative; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search .input { padding-left: 38px; border-radius: 999px; height: 38px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }

.switch { position: relative; display: inline-flex; width: 38px; height: 22px; flex-shrink: 0; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .2s; }
.switch .thumb { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .22s var(--ease, ease); box-shadow: 0 1px 3px rgba(0, 0, 0, .22); }
.switch input:checked + .track { background: var(--ink); }
[data-theme="dark"] .switch input:checked + .track { background: var(--green); }
.switch input:checked ~ .thumb { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 2px solid color-mix(in srgb, var(--brand) 60%, transparent); outline-offset: 2px; }

/* Rows that scroll sideways (tabs, pills, tables, code) never scroll up and down: with only
   overflow-x set, overflow-y turns to auto too, and a row 1px taller inside than out
   caught every vertical swipe that started on it, so the page didn't move. */

/* segmented control (a pill track, the chosen one lifts) */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--soft); border-radius: 999px; max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.seg::-webkit-scrollbar { display: none; }
.seg button { border: 0; background: transparent; height: 30px; padding: 0 14px; border-radius: 999px; font-size: 13px; font-weight: 500;
  color: var(--ink-3); cursor: pointer; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; transition: color .15s, background .15s, box-shadow .15s; }
.seg button:hover { color: var(--ink); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.seg .count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* underline tabs */
.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; border: 0; background: none; padding: 10px 0 12px; font-size: 14px; font-weight: 450; color: var(--ink-3); cursor: pointer;
  white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; transition: color .15s; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); font-weight: 500; }
.tab.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: 2px; background: var(--ink); }
.tab .count { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; font-weight: 450; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line-2); border-radius: 999px; height: 32px; padding: 0 14px;
  font-size: 13px; font-weight: 500; cursor: pointer; color: var(--ink-2); transition: all .15s; }
.chip.on { background: var(--ink); color: var(--on-primary); box-shadow: none; }

/* ------------------------------------------------------------ tables & lists */
.table-wrap { overflow-x: auto; overflow-y: hidden; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 450; font-size: 12.5px; color: var(--ink-3); padding: 12px 16px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { cursor: pointer; transition: background .12s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--soft) 70%, transparent); }
.table .right { text-align: right; }
.table th:first-child, .table td:first-child { padding-left: 20px; }
.table th:last-child, .table td:last-child { padding-right: 20px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; cursor: pointer; transition: background .12s; min-width: 0; }
.list-item:hover { background: var(--soft); }
.list-item + .list-item { margin-top: 1px; }
.divided > * + * { border-top: 1px solid var(--line); }
.list-title { font-weight: 500; letter-spacing: -0.01em; }
.lead-cards, .call-cards { display: none; }

/* person orbs */
.av { position: relative; width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0; overflow: hidden;
  box-shadow: inset 0 -2px 6px rgba(0, 0, 0, .08), inset 0 0 0 1px rgba(0, 0, 0, .04); }
.av.xs { width: 18px; height: 18px; box-shadow: inset 0 -1px 3px rgba(0, 0, 0, .14); }
.av.sm { width: 28px; height: 28px; }
.av.lg { width: 52px; height: 52px; }
.av.xl { width: 72px; height: 72px; }
.av-bot { display: grid; place-items: center; color: #fff; }

/* ------------------------------------------------------------ empty, skeleton, callout */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px 44px; }
.empty-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--soft); color: var(--ink-3); display: grid; place-items: center; margin-bottom: 14px; }
.empty-title { font-weight: 550; letter-spacing: -0.01em; }
.empty-desc { color: var(--ink-3); margin-top: 4px; max-width: 380px; font-size: 13.5px; }
.empty .btn { margin-top: 16px; }
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--soft) 0%, var(--soft-2) 40%, var(--soft) 80%); background-size: 300% 100%; animation: shimmer 1.6s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -50% 0; } }
.callout { display: flex; gap: 12px; align-items: flex-start; border-radius: 16px; padding: 14px 16px; font-size: 13.5px; background: var(--soft); }
.callout > .icon { margin-top: 2px; }
.callout.amber { background: var(--amber-bg); } .callout.amber > .icon { color: var(--amber); }
.callout.blue { background: var(--blue-bg); } .callout.blue > .icon { color: var(--blue); }
.callout.red { background: var(--red-bg); } .callout.red > .icon { color: var(--red); }
.callout.violet { background: var(--violet-bg); } .callout.violet > .icon { color: var(--violet); }
.callout-title { font-weight: 550; letter-spacing: -0.01em; }
.callout-body { color: var(--ink-2); margin-top: 2px; line-height: 1.5; }

/* ------------------------------------------------------------ drawer, dialog, toast */
.backdrop { position: fixed; inset: 0; background: rgba(12, 10, 8, .28); backdrop-filter: blur(2px); -webkit-backdrop-filter: blur(2px); z-index: 40; animation: fade .2s ease-out; }
[data-theme="dark"] .backdrop { background: rgba(0, 0, 0, .55); }
.backdrop, .drawer, .dialog { margin: 0 !important; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 8px; right: 8px; bottom: 8px; width: min(540px, calc(100vw - 16px)); z-index: 41; background: var(--page);
  border-radius: 22px; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  animation: slidein .32s var(--ease, cubic-bezier(.2, .8, .2, 1));
}
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.drawer-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 22px 18px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 4px 22px 32px; overscroll-behavior: contain; }
.dialog { position: fixed; inset: 0; z-index: 41; display: grid; place-items: center; padding: 16px; pointer-events: none; }
.dialog-card { pointer-events: auto; width: min(440px, 100%); background: var(--page); border-radius: 22px; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); animation: pop .22s var(--ease, ease-out); }
.dialog-card .card-foot { border-top: 0; padding-top: 4px; }
@keyframes pop { from { transform: scale(.96) translateY(6px); opacity: 0; } }
.toasts { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--primary); color: var(--on-primary); padding: 10px 16px; border-radius: 20px; font-size: 13.5px; font-weight: 500; line-height: 1.45;
  box-shadow: var(--shadow-lg); animation: toastin .3s var(--ease, ease-out); display: flex; gap: 9px; align-items: flex-start; max-width: min(92vw, 460px);
  overflow-wrap: anywhere; }
.toast .icon { margin-top: 2px; }
.toast.error { background: var(--red); color: #fff; }
@keyframes toastin { from { transform: translateY(10px) scale(.97); opacity: 0; } }

/* ------------------------------------------------------------ the orb */
.orb { position: relative; width: var(--orb); height: var(--orb); flex-shrink: 0; }
.orb canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.orb-css { display: none; position: absolute; inset: 10%; border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #fff1ea 0%, transparent 40%), radial-gradient(circle at 75% 80%, #ff7d57 0%, transparent 60%), radial-gradient(circle, #a28cff, #5a3cf0);
  animation: breathe 3.2s ease-in-out infinite; }
.orb.orb-fallback canvas { display: none; }
.orb.orb-fallback .orb-css { display: block; }
.orb.orb-fallback[data-state="talking"] .orb-css { animation-duration: .7s; }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
.orb-center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.orb-pill { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 20px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .94); color: #0d0d0e; font-weight: 550; font-size: 14.5px; letter-spacing: -0.01em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 8px 24px rgba(40, 20, 90, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: transform .15s var(--ease, ease), background .15s; }
.orb-pill:hover { background: #fff; transform: scale(1.03); }
.orb-pill:active { transform: scale(.97); }
.orb-pill:disabled { opacity: .7; cursor: default; transform: none; }
.orb-pill.end { color: var(--red); }
.orb-stage { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 36px 20px;
  background-image: radial-gradient(var(--dots) 1px, transparent 1.2px); background-size: 18px 18px; background-position: center; }
.orb-stage::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 30%, var(--surface) 78%); }
.orb-stage > * { position: relative; }
.state-pill { display: inline-flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px; border-radius: 999px; font-size: 12.5px; font-weight: 500;
  background: var(--surface); box-shadow: 0 0 0 1px var(--line), var(--shadow-xs); color: var(--ink-2); }

/* live waveform bars (canvas) */
.wave-canvas { width: 100%; height: 28px; }

/* ------------------------------------------------------------ overview hero */
.hero { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 8px 26px; padding: 22px 26px 22px 18px; overflow: hidden; position: relative; }
.hero-title { font-size: 20px; font-weight: 520; letter-spacing: -0.03em; line-height: 1.25; }
.hero-sub { color: var(--ink-2); margin-top: 4px; max-width: 560px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.hero-live { display: flex; flex-direction: column; gap: 6px; margin-top: 14px; }
.hero-live a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; background: var(--soft); transition: background .15s; }
.hero-live a:hover { background: var(--soft-2); }

/* ------------------------------------------------------------ live call */
.live-dock { position: fixed; right: 22px; bottom: 22px; z-index: 30; display: flex; flex-direction: column; gap: 8px; }
.live-pill { display: flex; align-items: center; gap: 12px; min-width: 290px; background: var(--glass); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-radius: 20px; padding: 8px 10px 8px 8px; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); cursor: pointer; animation: toastin .35s var(--ease, ease-out); }
.call-stage { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 560px; }
.call-stage .orb-stage { border-right: 1px solid var(--line); border-radius: 20px 0 0 20px; }
.call-name { font-size: 24px; font-weight: 520; letter-spacing: -0.035em; text-align: center; line-height: 1.2; }
.call-meta { color: var(--ink-3); text-align: center; font-size: 13.5px; margin-top: 4px; }
.call-timer { font-family: var(--font-mono); font-size: 13px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.speakers { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.speaker { display: inline-flex; align-items: center; gap: 10px; height: 40px; padding: 0 14px 0 6px; border-radius: 999px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line), var(--shadow-xs); transition: box-shadow .25s, background .25s; min-width: 0; }
.speaker .av { width: 28px; height: 28px; }
.speaker .who { font-size: 13px; font-weight: 500; }
.speaker .what { font-size: 12px; color: var(--ink-3); }
.speaker.on { box-shadow: 0 0 0 1.5px var(--ink), var(--shadow-sm); }
.speaker .wave-canvas { width: 46px; height: 20px; color: var(--ink-3); }
.speaker.on .wave-canvas { color: var(--ink); }
.transcript-pane { display: flex; flex-direction: column; min-height: 0; }
.transcript-pane .pane-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 18px 20px 10px; }

/* ------------------------------------------------------------ transcript */
.transcript { display: flex; flex-direction: column; gap: 10px; padding: 10px 20px 22px; }
.transcript.scroll { max-height: 560px; overflow-y: auto; }
.msg { display: flex; flex-direction: column; max-width: 84%; }
.msg.bot { align-self: flex-start; }
.msg.lead { align-self: flex-end; align-items: flex-end; }
.msg-who { font-size: 12px; font-weight: 500; color: var(--ink-3); margin: 0 6px 5px; display: flex; gap: 8px; align-items: center; }
.bubble { padding: 10px 14px; border-radius: 18px; font-family: var(--font-ml); line-height: 1.6; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.msg.bot .bubble { background: var(--bubble-bot); border-top-left-radius: 6px; }
.msg.lead .bubble { background: var(--bubble-lead); border-top-right-radius: 6px; }
.msg.note { align-self: center; max-width: 92%; }
.msg.note .bubble { background: transparent; box-shadow: inset 0 0 0 1px var(--line-2); color: var(--ink-3); font-size: 12px; font-family: var(--font); padding: 5px 12px; border-radius: 999px; }
.msg.new .bubble { animation: toastin .35s var(--ease, ease-out); }
.typing { display: inline-flex; gap: 4px; padding: 13px 14px; border-radius: 18px; background: var(--bubble-lead); align-self: flex-end; border-top-right-radius: 6px; }
.typing.bot { align-self: flex-start; background: var(--bubble-bot); border-top-right-radius: 18px; border-top-left-radius: 6px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); animation: bounce 1.1s infinite ease-in-out; }
.typing i:nth-child(2) { animation-delay: .14s; } .typing i:nth-child(3) { animation-delay: .28s; }
@keyframes bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ------------------------------------------------------------ recording player */
.player { display: flex; align-items: center; gap: 14px; }
.play-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; cursor: pointer; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .14); transition: transform .12s var(--ease, ease); }
.play-btn:active { transform: scale(.94); }
.play-btn .icon { width: 17px; height: 17px; }
.scrub { position: relative; flex: 1; height: 44px; cursor: pointer; display: flex; align-items: center; min-width: 0; }
.wave { display: flex; align-items: center; gap: 2px; width: 100%; height: 40px; }
.wave i { flex: 1; border-radius: 3px; background: var(--line-2); min-height: 3px; transition: background .15s; }
.wave i.done { background: var(--ink); }
.speed { font-size: 12px; font-weight: 550; border: 0; box-shadow: inset 0 0 0 1px var(--line-2); border-radius: 999px; padding: 3px 9px; background: transparent; cursor: pointer; color: var(--ink-2); }

/* ------------------------------------------------------------ chart */
.chart-card { border-top: 1px solid var(--line); padding: 18px 20px 16px; }
.chart-card .chart { margin-top: 14px; }
.chart { position: relative; }
.chart svg { width: 100%; height: 190px; overflow: visible; }
.chart .axis { font-size: 11.5px; fill: var(--ink-3); font-family: var(--font); }
.chart .grid-line { stroke: var(--line); stroke-width: 1; }
.chart-tip { position: absolute; transform: translate(-50%, -100%); background: var(--surface); border-radius: 12px; padding: 8px 11px; font-size: 12.5px; pointer-events: none;
  box-shadow: 0 0 0 1px var(--line), var(--shadow-md); white-space: nowrap; }
.chart-x { position: relative; height: 18px; margin-top: 10px; }
.chart-x span { position: absolute; transform: translateX(-50%); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; transition: color .15s; }
.chart-x span.on { color: var(--ink); font-weight: 500; }
.chart-dot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); pointer-events: none;
  box-shadow: 0 0 0 3px var(--surface), 0 1px 4px rgba(0, 0, 0, .2); transform: translate(-50%, -50%); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-3); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 0; }

/* ------------------------------------------------------------ login */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 20px; position: relative; overflow: hidden;
  background:
    radial-gradient(46% 38% at 38% 0%, rgba(143, 123, 255, 0.16), rgba(143, 123, 255, 0) 100%),
    radial-gradient(40% 34% at 64% 0%, rgba(255, 150, 110, 0.18), rgba(255, 150, 110, 0) 100%),
    var(--page); }
[data-theme="dark"] .login { background:
    radial-gradient(46% 38% at 38% 0%, rgba(143, 123, 255, 0.20), rgba(143, 123, 255, 0) 100%),
    radial-gradient(40% 34% at 64% 0%, rgba(255, 150, 110, 0.12), rgba(255, 150, 110, 0) 100%),
    var(--page); }
.login-box { width: min(380px, 100%); display: flex; flex-direction: column; align-items: center; text-align: center; position: relative; }
.login-title { font-family: var(--font-serif); font-size: 44px; line-height: 1.05; letter-spacing: -0.015em; margin: 6px 0 8px; font-weight: 400; }
.login-sub { color: var(--ink-3); margin-bottom: 26px; }
.login form { width: 100%; }
.login-foot { position: absolute; bottom: calc(18px + env(safe-area-inset-bottom)); left: 0; right: 0; text-align: center; color: var(--ink-3); font-size: 12.5px; }

/* ------------------------------------------------------------ test call */
.test-grid { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr) minmax(0, 1fr); overflow: hidden; }
.call-stage { overflow: hidden; }
.call-grid-side { position: sticky; top: 24px; align-self: start; }
.test-grid > * + * { border-left: 1px solid var(--line); }
.test-grid .orb-stage { min-height: 520px; }
.test-settings { padding: 20px; }
details.more > summary { cursor: pointer; list-style: none; color: var(--ink-2); font-size: 13.5px; display: inline-flex; align-items: center; gap: 6px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more[open] > summary .icon { transform: rotate(90deg); }
details.more > summary .icon { transition: transform .2s var(--ease, ease); }
.kv { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 10px 14px; font-size: 13.5px; margin: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.code { font-family: var(--font-mono); font-size: 12px; background: var(--soft); border-radius: 12px; padding: 12px 14px; overflow-x: auto; overflow-y: hidden; white-space: pre; line-height: 1.6; }
.code.log { max-height: 320px; overflow-y: auto; }

/* settings rows */
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-title { font-weight: 500; letter-spacing: -0.01em; }
.set-desc { color: var(--ink-3); font-size: 13px; margin-top: 2px; }

/* timeline */
.timeline { position: relative; }
.timeline-item { position: relative; display: block; padding: 0 0 18px 24px; }
.timeline-item::before { content: ""; position: absolute; left: 5px; top: 12px; bottom: -4px; width: 1px; background: var(--line-2); }
.timeline-item:last-child::before { display: none; }
.timeline-dot { position: absolute; left: 0; top: 5px; width: 11px; height: 11px; border-radius: 50%; box-shadow: 0 0 0 3px var(--page); background: var(--ink-3); }
.timeline-dot.green { background: var(--green); } .timeline-dot.amber { background: var(--amber); } .timeline-dot.violet { background: var(--violet); } .timeline-dot.red { background: var(--red); }

/* ------------------------------------------------------------ in between */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stats .stat:nth-child(4)::before { display: none; }
  .stats .stat:nth-child(n+4) { border-top: 1px solid var(--line); }
  .test-grid { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
  .test-grid .test-transcript { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 1024px) {
  .grid-main, .grid-main-r, .grid-rev { grid-template-columns: minmax(0, 1fr); }
  .page { padding: 30px 28px 110px; }
}

/* ------------------------------------------------------------ phone */
/* Phones: no backdrop blur anywhere. A blurred bar re-blurs whatever moves under it on
   every frame of a scroll, and on a mid-range Android that is where scrolling stuttered;
   the bars sit on the page colour anyway, so solid looks the same. */
@media (max-width: 860px) {
  body { background: var(--page); }
  .shell { display: block; }
  .sidebar { display: none; }
  .content { padding: 0; }
  .panel { border-radius: 0; box-shadow: none; min-height: 0; }
  .topbar {
    display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; gap: 10px;
    height: calc(56px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 16px 0;
    background: var(--page); border-bottom: 1px solid var(--line);
  }
  .topbar .logo-word { font-size: 17px; }
  .bottombar {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: var(--page); border-top: 1px solid var(--line);
  }
  .backdrop, .live-pill, .orb-pill { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .bottombar a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; letter-spacing: 0;
    color: var(--ink-3); padding: 4px 0 2px; position: relative; min-width: 0; transition: color .15s; }
  .bottombar .tab-ic { width: 52px; height: 30px; border-radius: 999px; display: grid; place-items: center; transition: background .2s var(--ease, ease); }
  .bottombar .icon { width: 21px; height: 21px; }
  .bottombar a.active { color: var(--ink); }
  .bottombar a.active .tab-ic { background: var(--soft-2); }
  .bottombar .nav-count { position: absolute; top: 2px; left: calc(50% + 6px); height: 17px; min-width: 17px; font-size: 10.5px; padding: 0 5px;
    background: var(--red); color: #fff; box-shadow: 0 0 0 2px var(--page); }
  .bottombar .tab-label { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .page { padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
  .page-title { font-size: 25px; }
  .page-title.hello { font-size: 38px; }
  .page-desc { font-size: 14px; margin-top: 6px; }
  .page-head { flex-direction: column; align-items: stretch; gap: 14px; }
  .page-actions { width: 100%; }
  .page-actions > * { flex: 1 1 0; }
  .stack-lg > * + * { margin-top: 22px; }
  .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stats .stat::before { display: none !important; }
  .stats .stat { border-top: 1px solid var(--line); padding: 16px; }
  .stats .stat:nth-child(1), .stats .stat:nth-child(2) { border-top: 0; }
  .stats .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .stats .stat:last-child:nth-child(odd) { grid-column: span 2; }
  .stat-value { font-size: 26px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid .span-2 { grid-column: auto; }
  .hide-phone { display: none !important; }
  .lead-table, .call-table { display: none; }
  .lead-cards, .call-cards { display: block; }
  .live-dock { left: 12px; right: 12px; bottom: calc(78px + env(safe-area-inset-bottom)); }
  .live-pill { min-width: 0; background: var(--surface); }
  .drawer { inset: 0; width: 100vw; border-radius: 0; animation: sheetup .34s var(--ease, cubic-bezier(.2, .8, .2, 1)); padding-top: env(safe-area-inset-top); }
  @keyframes sheetup { from { transform: translateY(24px); opacity: 0; } }
  .drawer-head { padding: 18px 16px 14px; }
  .drawer-body { padding: 4px 16px calc(28px + env(safe-area-inset-bottom)); }
  .hero { grid-template-columns: minmax(0, 1fr); justify-items: center; text-align: center; padding: 8px 18px 22px; }
  .hero-meta { justify-content: center; }
  .hero-live { width: 100%; text-align: left; }
  .call-stage { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .call-stage .orb-stage { border-right: 0; border-bottom: 1px solid var(--line); border-radius: 20px 20px 0 0; padding: 28px 16px 24px; }
  .transcript.scroll { max-height: none; overflow: visible; }  /* part of the page: one scroll, never a box inside it */
  .code.log { max-height: none; overflow-y: hidden; }
  .test-grid { grid-template-columns: minmax(0, 1fr); }
  .test-grid > * { border-left: 0 !important; border-top: 1px solid var(--line); }
  .test-grid > .orb-stage { min-height: 0; order: -2; padding: 30px 16px 26px; border-top: 0; }
  .test-grid > .test-transcript { order: -1; }
  .test-settings { padding: 18px 16px 20px; }
  .toolbar { flex-direction: column; align-items: stretch !important; }
  .toolbar > * { width: 100% !important; }
  .call-grid-side { position: static !important; }
  .card-head { padding: 16px 16px 2px; }
  .card-body { padding: 12px 16px 16px; }
  .kv { grid-template-columns: 110px minmax(0, 1fr); }
  .msg { max-width: 90%; }
  .transcript { padding: 10px 14px 18px; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .tabs { margin: 0 -16px; padding: 0 16px; }
  .set-row { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
@media (min-width: 861px) { .show-phone { display: none !important; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
