/* Medera BH-ASR live demo.
   Design: Medera's own system, taken from the product's frontend (frontend/src/styles/published-brand-v2.css
   for surfaces, text and tones; styles/theme.css for their dark values; styles/sticker-system.css for the
   sticker controls; brand/brand-v3.css for the display type, eyebrow pill, glossy primary with its arrow
   orb, card-in-card frame and the hand-drawn mark). Status colours are reserved for safety review and
   always come with an icon and a label. Pastels keep ink text in both themes. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-var.woff2") format("woff2");
  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: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/inter-latin-ext-var.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, 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: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/plex-arabic-400.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/plex-arabic-500.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "IBM Plex Sans Arabic"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/plex-arabic-600.woff2") format("woff2"); unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/baloo-2-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Baloo 2"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/baloo-2-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces Variable"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2-variations"), url("fonts/fraunces-latin-opsz-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces Variable"; font-style: italic; font-weight: 100 900; font-display: swap;
  src: url("fonts/fraunces-latin-full-italic.woff2") format("woff2-variations"), url("fonts/fraunces-latin-full-italic.woff2") format("woff2"); }

:root {
  color-scheme: light;
  /* brand ramps (brand-v3.css) */
  --sky-50: #f2f9ff; --sky-100: #e3f1ff; --sky-200: #bde3ff; --sky-300: #8fcefa; --sky-400: #5cb0ec;
  --sky-500: #338fd8; --sky-600: #2372b8; --sky-700: #1e5c94; --sky-800: #1e4f78;
  --ink-50: #f5f7fb; --ink-100: #eaeef5; --ink-200: #d7deea; --ink-300: #b3bfd1; --ink-900: #0e1726;
  --mint-50: #f1fcf5; --mint-100: #ddf7e7;
  /* surfaces and text (published-brand-v2.css) */
  --page: #f6f9fd;
  --paper: #ffffff;
  --surface-2: #f5f7fb;
  --surface-3: #eaeef5;
  --text: #0e1726;
  --text-soft: #3f4a5c;
  --text-muted: #5f6b7c;
  --line: rgba(14, 23, 38, 0.08);
  --line-2: rgba(14, 23, 38, 0.12);
  --line-strong: rgba(14, 23, 38, 0.20);
  --wash-hover: rgba(14, 23, 38, 0.04);
  --tint-active: rgba(189, 227, 255, 0.40);
  --tint-soft: rgba(189, 227, 255, 0.26);
  --link: #2372b8;
  /* tones */
  --sky-ink: #2372b8; --sky-wash: rgba(189, 227, 255, 0.40); --sky-line: #8fcefa;
  --lav-ink: #6355ab; --lav-wash: rgba(219, 217, 251, 0.45); --lav-line: #beb9f2;
  --sun-ink: #9c7a0c; --sun-wash: rgba(250, 232, 143, 0.40); --sun-line: #f2d75c;
  --mint-ink: #24864f; --mint-wash: rgba(184, 237, 202, 0.40); --mint-line: #8bdda9;
  --grey-ink: #565d68; --grey-wash: rgba(215, 222, 234, 0.50); --grey-line: #c9cdd3;
  --danger-ink: #dc2626; --danger-wash: #fef2f2; --danger-line: rgba(220, 38, 38, 0.32);
  /* sticker system */
  --stk-grey: #9aa1ab; --stk-grey-text: #565d68; --stk-hover: #6b7280; --stk-disabled: #c9cdd3; --stk-disabled-text: #a0a6ae;
  --stk-primary-face: #bde3ff; --stk-primary-hover: #8fcefa; --stk-primary-ink: #2372b8;
  --focus: #2372b8;
  --sel-face: rgba(189, 227, 255, 0.45); --sel-ink: #2372b8; --sel-text: var(--text); --hl: #2372b8;
  /* data marks */
  --speech: #2372b8; --silence: #c9cdd3; --data: #2372b8; --data-muted: #9aa1ab;
  /* chart series (validated with the dataviz palette validator on #ffffff and #1f1f1f) */
  --chart-bh: #2372b8; --chart-other: #a15c2a; --chart-track: rgba(14, 23, 38, 0.06); --chart-ci: #0e1726;
  /* speakers by detected role (validated with the dataviz palette validator, all pairs, on #ffffff and #1f1f1f) */
  --spk-clin: #2a78d6; --spk-pat: #eb6834; --spk-other: #1baf7a;
  /* depth (brand-v3.css) */
  --shadow-card: 0 1px 2px rgba(14, 23, 38, 0.04), 0 18px 40px -24px rgba(14, 23, 38, 0.22);
  --shadow-lift: 0 1px 2px rgba(14, 23, 38, 0.05), 0 30px 60px -30px rgba(14, 23, 38, 0.32);
  --shadow-pop: 0 3px 0 0 var(--stk-grey), 0 18px 50px rgba(14, 23, 38, 0.14);
  --dot-grid: rgba(14, 23, 38, 0.07);
  --wash-top:
    radial-gradient(46rem 26rem at 14% -8%, rgba(189, 227, 255, 0.5), transparent 62%),
    radial-gradient(40rem 24rem at 86% -6%, rgba(219, 217, 251, 0.45), transparent 64%);
  --topbar: rgba(255, 255, 255, 0.78);
  --eyebrow-bg: #ffffff;
  --eyebrow-shadow: inset 0 0 0 1px var(--line), 0 1px 2px rgba(14, 23, 38, 0.05), 0 8px 20px -14px rgba(14, 23, 38, 0.3);
  --frame-sky: var(--sky-50); --frame-sky-line: var(--sky-100);
  --frame-mint: var(--mint-50); --frame-mint-line: var(--mint-100);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ar: "IBM Plex Sans Arabic", "Geeza Pro", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Fraunces Variable", "Fraunces", Georgia, serif;
  --font-stk: "Baloo 2", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #171717; --paper: #1f1f1f; --surface-2: #262626; --surface-3: #2e2e2e;
    --text: #ffffff; --text-soft: #d4d4d4; --text-muted: #a3a3a3;
    --line: rgba(245, 247, 251, 0.08); --line-2: rgba(245, 247, 251, 0.12); --line-strong: #404040;
    --wash-hover: rgba(255, 255, 255, 0.06); --tint-active: rgba(255, 255, 255, 0.10); --tint-soft: rgba(255, 255, 255, 0.06);
    --link: #8fcefa;
    --sky-ink: #8fcefa; --sky-wash: rgba(143, 206, 250, 0.14); --sky-line: rgba(143, 206, 250, 0.45);
    --lav-ink: #beb9f2; --lav-wash: rgba(157, 148, 226, 0.18); --lav-line: rgba(157, 148, 226, 0.45);
    --sun-ink: #f1d36b; --sun-wash: rgba(227, 189, 46, 0.16); --sun-line: rgba(227, 189, 46, 0.45);
    --mint-ink: #7ad39b; --mint-wash: rgba(87, 197, 132, 0.16); --mint-line: rgba(87, 197, 132, 0.45);
    --grey-ink: #a3a3a3; --grey-wash: rgba(245, 247, 251, 0.08); --grey-line: rgba(245, 247, 251, 0.18);
    --danger-ink: #f87171; --danger-wash: rgba(248, 113, 113, 0.12); --danger-line: rgba(248, 113, 113, 0.4);
    --stk-grey: #737373; --stk-grey-text: #d4d4d4; --stk-hover: #a3a3a3; --stk-disabled: #404040; --stk-disabled-text: #737373;
    --sel-face: rgba(143, 206, 250, 0.16); --sel-ink: #8fcefa; --sel-text: #e3f1ff; --hl: #8fcefa; --focus: #8fcefa;
    --speech: #8fcefa; --silence: #404040; --data: #338fd8; --data-muted: #737373;
    --chart-bh: #338fd8; --chart-other: #b8744a; --chart-track: rgba(255, 255, 255, 0.07); --chart-ci: #ffffff;
    --spk-clin: #3987e5; --spk-pat: #d95926; --spk-other: #199e70;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -24px rgba(0, 0, 0, 0.6);
    --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.35), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
    --shadow-pop: 0 3px 0 0 var(--stk-grey), 0 18px 50px rgba(0, 0, 0, 0.5);
    --dot-grid: rgba(245, 247, 251, 0.06);
    --wash-top:
      radial-gradient(46rem 26rem at 14% -8%, rgba(30, 79, 120, 0.42), transparent 62%),
      radial-gradient(40rem 24rem at 86% -6%, rgba(42, 38, 80, 0.5), transparent 64%);
    --topbar: rgba(23, 23, 23, 0.78);
    --eyebrow-bg: rgba(255, 255, 255, 0.06);
    --eyebrow-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
    --frame-sky: rgba(30, 79, 120, 0.22); --frame-sky-line: rgba(143, 206, 250, 0.16);
    --frame-mint: rgba(26, 74, 46, 0.3); --frame-mint-line: rgba(139, 221, 169, 0.15);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #171717; --paper: #1f1f1f; --surface-2: #262626; --surface-3: #2e2e2e;
  --text: #ffffff; --text-soft: #d4d4d4; --text-muted: #a3a3a3;
  --line: rgba(245, 247, 251, 0.08); --line-2: rgba(245, 247, 251, 0.12); --line-strong: #404040;
  --wash-hover: rgba(255, 255, 255, 0.06); --tint-active: rgba(255, 255, 255, 0.10); --tint-soft: rgba(255, 255, 255, 0.06);
  --link: #8fcefa;
  --sky-ink: #8fcefa; --sky-wash: rgba(143, 206, 250, 0.14); --sky-line: rgba(143, 206, 250, 0.45);
  --lav-ink: #beb9f2; --lav-wash: rgba(157, 148, 226, 0.18); --lav-line: rgba(157, 148, 226, 0.45);
  --sun-ink: #f1d36b; --sun-wash: rgba(227, 189, 46, 0.16); --sun-line: rgba(227, 189, 46, 0.45);
  --mint-ink: #7ad39b; --mint-wash: rgba(87, 197, 132, 0.16); --mint-line: rgba(87, 197, 132, 0.45);
  --grey-ink: #a3a3a3; --grey-wash: rgba(245, 247, 251, 0.08); --grey-line: rgba(245, 247, 251, 0.18);
  --danger-ink: #f87171; --danger-wash: rgba(248, 113, 113, 0.12); --danger-line: rgba(248, 113, 113, 0.4);
  --stk-grey: #737373; --stk-grey-text: #d4d4d4; --stk-hover: #a3a3a3; --stk-disabled: #404040; --stk-disabled-text: #737373;
  --sel-face: rgba(143, 206, 250, 0.16); --sel-ink: #8fcefa; --sel-text: #e3f1ff; --hl: #8fcefa; --focus: #8fcefa;
  --speech: #8fcefa; --silence: #404040; --data: #338fd8; --data-muted: #737373;
  --chart-bh: #338fd8; --chart-other: #b8744a; --chart-track: rgba(255, 255, 255, 0.07); --chart-ci: #ffffff;
  --spk-clin: #3987e5; --spk-pat: #d95926; --spk-other: #199e70;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 18px 40px -24px rgba(0, 0, 0, 0.6);
  --shadow-lift: 0 1px 2px rgba(0, 0, 0, 0.35), 0 30px 60px -30px rgba(0, 0, 0, 0.7);
  --shadow-pop: 0 3px 0 0 var(--stk-grey), 0 18px 50px rgba(0, 0, 0, 0.5);
  --dot-grid: rgba(245, 247, 251, 0.06);
  --wash-top:
    radial-gradient(46rem 26rem at 14% -8%, rgba(30, 79, 120, 0.42), transparent 62%),
    radial-gradient(40rem 24rem at 86% -6%, rgba(42, 38, 80, 0.5), transparent 64%);
  --topbar: rgba(23, 23, 23, 0.78);
  --eyebrow-bg: rgba(255, 255, 255, 0.06);
  --eyebrow-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.14);
  --frame-sky: rgba(30, 79, 120, 0.22); --frame-sky-line: rgba(143, 206, 250, 0.16);
  --frame-mint: rgba(26, 74, 46, 0.3); --frame-mint-line: rgba(139, 221, 169, 0.15);
}

/* ── base ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body {
  margin: 0; min-height: 100vh; position: relative;
  background: var(--page); color: var(--text);
  font: 400 15px/1.55 var(--font); font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
[lang="ar"], .ar { font-family: var(--font-ar); }
h1, h2, h3, h4 { margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { width: 20px; height: 20px; flex: none; }
[hidden] { display: none !important; }
.sprite { display: none; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
code { font-family: var(--mono); font-size: 0.86em; background: var(--surface-2); border-radius: 6px; padding: 0.1em 0.35em; }
.emo { font-size: 1.05em; line-height: 1; }

.page-wash { position: absolute; inset: 0 0 auto 0; height: 760px; background-image: var(--wash-top); background-repeat: no-repeat; pointer-events: none; z-index: 0; }
.page { position: relative; z-index: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px 40px; }

/* ── top bar ──────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 64px; padding: 0 24px; background: var(--topbar); border-bottom: 1px solid var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); min-width: 0; }
.brand:hover { text-decoration: none; }
.logo { display: block; height: 28px; width: auto; }
.logo-dark, .logo-sm.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: block; }
}
.brand-sep { width: 1px; height: 22px; background: var(--line-strong); }
.brand-product { font: 700 18px/1 var(--font-stk); letter-spacing: -0.01em; padding-top: 0.12em; white-space: nowrap; }
.brand-tag { margin-left: 2px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.status { display: flex; gap: 6px; }
.status-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 9px; border-radius: 999px;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); font-size: 12.5px; color: var(--text-soft); white-space: nowrap;
}
.status-chip b { color: var(--text); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 999px; flex: none; background: var(--stk-grey); }
.dot.ready { background: #57c584; box-shadow: 0 0 0 3px rgba(87, 197, 132, 0.22); }
.dot.busy { background: #e3bd2e; animation: pulse 1.4s ease-in-out infinite; }
.dot.error { background: var(--danger-ink); }
@keyframes pulse { 50% { opacity: 0.35; } }

/* ── stickers (sticker-system.css) ────────────────────────────────────── */
.stk {
  --_h: 36px; --_r: 12px; --_f: 13px;
  --stk-ink: var(--stk-grey); --stk-text: var(--stk-grey-text); --stk-face: var(--paper);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--_h); min-height: var(--_h); padding: 0.06em 12px 0; border-radius: var(--_r);
  border: 1.5px solid var(--stk-ink); background: var(--stk-face); color: var(--stk-text);
  box-shadow: 0 2px 0 0 var(--stk-ink);
  font: 600 var(--_f)/1 var(--font-stk); letter-spacing: -0.005em; white-space: nowrap; text-decoration: none;
  transform: translateY(0);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.stk:hover { --stk-ink: var(--stk-hover); --stk-text: var(--text); transform: translateY(-1px); box-shadow: 0 3px 0 0 var(--stk-ink); text-decoration: none; }
.stk:active { transform: translateY(1px); box-shadow: 0 1px 0 0 var(--stk-ink); }
.stk:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.stk:disabled { --stk-ink: var(--stk-disabled); --stk-text: var(--stk-disabled-text); background: var(--surface-2); transform: none; box-shadow: 0 2px 0 0 var(--stk-ink); cursor: not-allowed; }
.stk[aria-pressed="true"], .stk[aria-selected="true"], .stk[aria-current="true"] { --stk-ink: var(--sel-ink); --stk-text: var(--sel-text); background: var(--sel-face); }
.stk.primary { --stk-face: var(--stk-primary-face); --stk-ink: var(--stk-primary-ink); --stk-text: var(--ink-900); }
.stk.primary:hover { background: var(--stk-primary-hover); }
.stk.sm { --_h: 28px; --_r: 9px; --_f: 12px; padding-left: 10px; padding-right: 10px; }
.stk.lg { --_h: 40px; --_r: 13px; --_f: 14px; }
.stk.icon { width: var(--_h); min-width: var(--_h); padding: 0; }
.stk svg { width: 14px; height: 14px; }
.stk.sm svg { width: 12px; height: 12px; }
/* toned stickers (suggested prompts): grey at rest with the tone on the icon; the whole sticker takes it on hover */
.stk.tone:hover, .stk.tone:focus-visible { --stk-ink: var(--stk-accent); --stk-text: var(--text); background: var(--stk-accent-tint); }
.tone-sky { --stk-accent: var(--sky-ink); --stk-accent-tint: var(--tint-soft); }
.tone-sun { --stk-accent: var(--sun-ink); --stk-accent-tint: var(--sun-wash); }
.tone-mint { --stk-accent: var(--mint-ink); --stk-accent-tint: var(--mint-wash); }
.tone-lav { --stk-accent: var(--lav-ink); --stk-accent-tint: var(--lav-wash); }
@media (prefers-reduced-motion: reduce) { .stk { transition: none; transform: none !important; } }

/* ── glossy pill with the arrow orb (brand-v3.css .mv3-btn) ────────────── */
.gloss {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; isolation: isolate;
  height: 48px; padding: 0 0.42rem 0 1.5rem; border: 0; border-radius: 999px; cursor: pointer; white-space: nowrap; text-decoration: none;
  font: 600 15px/1 var(--font); letter-spacing: -0.005em; color: var(--ink-900);
  background: linear-gradient(180deg, #dcf0ff 0%, #bde3ff 52%, #a9d8fb 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(35, 114, 184, 0.2), 0 1px 2px rgba(30, 79, 120, 0.16), 0 10px 24px -10px rgba(51, 143, 216, 0.6);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), filter 0.35s var(--ease), opacity 0.2s ease;
}
.gloss:hover:not(:disabled) { transform: translateY(-1px); text-decoration: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.95), inset 0 -1px 0 rgba(35, 114, 184, 0.2), 0 2px 4px rgba(30, 79, 120, 0.16), 0 16px 32px -12px rgba(51, 143, 216, 0.7); }
.gloss:active:not(:disabled) { transform: translateY(0) scale(0.98); }
.gloss:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.gloss:disabled { cursor: default; filter: saturate(0.6); opacity: 0.55; }
.orb { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 999px; background: var(--ink-900); color: #ffffff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16); transition: transform 0.45s var(--ease); }
.orb svg { width: 16px; height: 16px; transition: transform 0.45s var(--ease); }
.gloss:hover:not(:disabled) .orb svg { transform: translateX(2px); }
.gloss.sm { height: 38px; padding: 0 0.3rem 0 1rem; font-size: 13.5px; }
.gloss.sm .orb { width: 30px; height: 30px; }
.gloss.sm .orb svg { width: 14px; height: 14px; }
.gloss.ghost { color: var(--ink-900); background: rgba(255, 255, 255, 0.86); box-shadow: inset 0 0 0 1px rgba(14, 23, 38, 0.1), 0 1px 2px rgba(14, 23, 38, 0.05), 0 10px 22px -14px rgba(14, 23, 38, 0.28); }
.gloss.ghost:hover { background: #ffffff; }
.gloss.ghost .orb { background: var(--ink-50); color: var(--ink-900); }
:root[data-theme="dark"] .gloss.ghost { color: var(--text); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
:root[data-theme="dark"] .gloss.ghost .orb { background: rgba(255, 255, 255, 0.12); color: var(--text); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .gloss.ghost { color: var(--text); background: rgba(255, 255, 255, 0.06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.16); }
  :root:not([data-theme="light"]) .gloss.ghost .orb { background: rgba(255, 255, 255, 0.12); color: var(--text); }
}

/* ── eyebrow pill and tags ────────────────────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 14px; border-radius: 999px;
  background: var(--eyebrow-bg); box-shadow: var(--eyebrow-shadow); color: var(--text);
  font: 600 12.8px/1 var(--font); letter-spacing: -0.005em; white-space: nowrap;
}
.eyebrow-dot { width: 8px; height: 8px; border-radius: 999px; background: var(--sky-400); flex: none; }
.eyebrow-sep { width: 3px; height: 3px; border-radius: 999px; background: var(--text-muted); opacity: 0.6; }
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 999px; white-space: nowrap;
  background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); color: var(--text-soft); font: 500 12.5px/1 var(--font);
}
.tag-sky { height: 22px; padding: 0 9px; background: var(--sky-50); color: var(--sky-800); box-shadow: inset 0 0 0 1px var(--sky-200); font-weight: 600; font-size: 11.5px; }
.tag-dot { width: 6px; height: 6px; border-radius: 999px; background: var(--sky-400); }
:root[data-theme="dark"] .tag-sky { background: rgba(30, 79, 120, 0.22); color: var(--sky-200); box-shadow: inset 0 0 0 1px rgba(143, 206, 250, 0.16); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tag-sky { background: rgba(30, 79, 120, 0.22); color: var(--sky-200); box-shadow: inset 0 0 0 1px rgba(143, 206, 250, 0.16); } }

/* ── hero ─────────────────────────────────────────────────────────────── */
.hero { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 18px; padding: 56px 0 34px; }
.display { font: 500 clamp(36px, 5.4vw, 62px)/1.04 var(--font-display); letter-spacing: -0.028em; font-optical-sizing: auto; max-width: 21ch; text-wrap: balance; }
.display-2 { font: 500 clamp(26px, 3.3vw, 38px)/1.08 var(--font-display); letter-spacing: -0.024em; font-optical-sizing: auto; text-wrap: balance; }
.accent { font-style: italic; font-weight: 300; letter-spacing: -0.02em; }
.mark { position: relative; display: inline-block; white-space: nowrap; }
.mark > svg { position: absolute; left: -2%; right: -2%; bottom: -0.2em; width: 104%; height: 0.36em; overflow: visible; pointer-events: none; }
.mark > svg path { stroke: var(--sky-300); stroke-width: 5; fill: none; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1.1s var(--ease) 0.35s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.lede { max-width: 62ch; color: var(--text-soft); font-size: 16.5px; line-height: 1.6; text-wrap: pretty; }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 2px 0 0; padding: 0; list-style: none; }
.hero > * { animation: rise 0.7s var(--ease) both; }
.hero > :nth-child(2) { animation-delay: 0.08s; }
.hero > :nth-child(3) { animation-delay: 0.16s; }
.hero > :nth-child(4) { animation-delay: 0.26s; }
.bench { animation: rise 0.7s var(--ease) 0.34s both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ── card-in-card frame (brand-v3.css .mv3-frame) ─────────────────────── */
.frame { border-radius: 26px; padding: 7px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.frame.tone-sky { background: var(--frame-sky); box-shadow: inset 0 0 0 1px var(--frame-sky-line); }
.frame.tone-mint { background: var(--frame-mint); box-shadow: inset 0 0 0 1px var(--frame-mint-line); }
.frame-inner { border-radius: 20px; background: var(--paper); box-shadow: var(--shadow-card); }

/* ── bench: the recording, what happens next, analyze ─────────────────── */
.bench { position: relative; }
.bench-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.bench-col { padding: 22px 24px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.bench-col + .bench-col { border-left: 1px solid var(--line); }
.step-head { display: flex; align-items: center; gap: 10px; }
.step-head h2 { font: 600 15px/1.2 var(--font); letter-spacing: -0.01em; }
.step-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 8px; background: var(--ink-900); color: #fff; font: 700 13px/1 var(--font-stk); padding-top: 0.12em; }
:root[data-theme="dark"] .step-n { background: var(--sky-200); color: var(--ink-900); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .step-n { background: var(--sky-200); color: var(--ink-900); } }
.seg-tabs { display: flex; gap: 8px; }

.recorder { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "btn meta" "wave wave" "warn warn"; align-items: center; gap: 12px 16px;
  padding: 16px; border-radius: 16px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.mic-btn {
  --level: 0; grid-area: btn; position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 999px;
  border: 1.5px solid var(--stk-primary-ink); background: var(--stk-primary-face); color: var(--ink-900); box-shadow: 0 3px 0 0 var(--stk-primary-ink);
  transition: transform 0.16s var(--ease), box-shadow 0.16s var(--ease), background 0.15s ease;
}
.mic-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 0 0 var(--stk-primary-ink); background: var(--stk-primary-hover); }
.mic-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 0 var(--stk-primary-ink); }
.mic-btn svg { width: 26px; height: 26px; }
.mic-btn .stop-icon { display: none; }
.mic-btn[aria-pressed="true"] { background: var(--danger-ink); border-color: var(--danger-ink); color: #fff; box-shadow: 0 3px 0 0 #8f1d1d; }
.mic-btn[aria-pressed="true"] .mic-icon { display: none; }
.mic-btn[aria-pressed="true"] .stop-icon { display: block; width: 22px; height: 22px; }
.mic-ring { position: absolute; inset: -7px; border-radius: 999px; border: 2px solid var(--danger-ink); opacity: 0; transform: scale(calc(0.92 + var(--level) * 0.22)); transition: transform 0.08s linear, opacity 0.2s ease; pointer-events: none; }
.mic-btn[aria-pressed="true"] .mic-ring { opacity: 0.55; }
.rec-meta { grid-area: meta; min-width: 0; }
.rec-time { font: 600 24px/1.1 var(--font); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.rec-hint { color: var(--text-muted); font-size: 13px; }
.live-wave { grid-area: wave; width: 100%; height: 48px; display: block; }
.rec-warn { grid-area: warn; color: var(--sun-ink); font-size: 13px; }
.audio-notes { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.audio-notes li { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.audio-notes .emo { font-size: 14px; line-height: 1.3; }
.rec-warn:empty { display: none; }

.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 150px; padding: 20px; text-align: center; cursor: pointer;
  border: 1.5px dashed var(--stk-grey); border-radius: 16px; background: var(--surface-2); color: var(--text-soft); transition: background 0.15s ease, border-color 0.15s ease; }
.drop svg { width: 26px; height: 26px; color: var(--text-muted); }
.drop:hover, .drop.over { border-color: var(--hl); background: var(--tint-soft); }
.drop:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.drop-title { font-weight: 600; color: var(--text); }
.drop-sub { font-size: 12.5px; color: var(--text-muted); }

.clip { display: flex; align-items: center; gap: 12px; padding: 10px 10px 10px 12px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--hl), 0 2px 0 0 var(--hl); }
.clip-text { flex: 1; min-width: 0; }
.clip-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip-sub { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.field legend { padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.field-note { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }

.steps-col { background: var(--surface-2); border-radius: 0 20px 0 0; }
.auto-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.auto-steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; align-items: start; }
.auto-steps b { display: block; font: 600 14px/1.3 var(--font); color: var(--text); }
.auto-steps p { margin-top: 3px; font-size: 13px; line-height: 1.45; color: var(--text-muted); text-wrap: pretty; }
.auto-n { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--stk-grey), 0 2px 0 0 var(--stk-grey); font: 700 13px/1 var(--font-stk); padding-top: 0.12em; color: var(--text); }

.bench-run { display: flex; align-items: center; gap: 18px; padding: 18px 24px; border-top: 1px solid var(--line); }
.run-text { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.run-note { font-size: 13px; color: var(--text-soft); }
.run-hint { font-size: 12.5px; color: var(--text-muted); }

/* ── sections ─────────────────────────────────────────────────────────── */
.section-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; margin-bottom: 26px; }
.section-head.left { align-items: flex-start; text-align: left; }
.section-lede { max-width: 66ch; color: var(--text-soft); font-size: 15.5px; text-wrap: pretty; }
.verified, .service, .results { margin-top: 56px; }

/* ── results ──────────────────────────────────────────────────────────── */
.results-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.results-head h2 { display: flex; align-items: center; gap: 8px; font: 500 28px/1.1 var(--font-display); letter-spacing: -0.02em; }
.history { display: flex; gap: 6px; flex-wrap: wrap; }
.state { border-radius: 20px; }
.state.progress, .state.error { padding: 18px 20px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card); }
.progress-row { display: flex; align-items: center; gap: 14px; }
.progress-row > div:nth-child(2) { flex: 1; min-width: 0; }
.progress-title { font-weight: 600; }
.progress-sub { color: var(--text-muted); font-size: 13px; }
.spinner { width: 26px; height: 26px; border-radius: 999px; border: 3px solid var(--sky-wash); border-top-color: var(--sky-ink); animation: spin 0.9s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.bar { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 14px; }
.bar span { display: block; height: 100%; width: 4%; border-radius: 999px; background: var(--sky-ink); transition: width 0.6s var(--ease); }
.state.error { display: flex; gap: 12px; align-items: flex-start; box-shadow: inset 0 0 0 1.5px var(--danger-line), var(--shadow-card); background: var(--danger-wash); }
.state.error svg { color: var(--danger-ink); width: 22px; height: 22px; }
.state.error p { color: var(--text-soft); font-size: 13.5px; }

.result { display: flex; flex-direction: column; gap: 14px; }
.result-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.result-title { font-weight: 600; font-size: 17px; display: flex; flex-direction: column; gap: 2px; }
.result-title small { font-weight: 500; font-size: 12.5px; color: var(--text-muted); }
.result-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.safety { padding: 16px 18px; border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.safety-top { display: flex; gap: 12px; align-items: flex-start; }
.safety-top svg { width: 22px; height: 22px; margin-top: 1px; }
.safety-top b { font-size: 15.5px; }
.safety-top p { color: var(--text-soft); font-size: 13.5px; }
.s-critical { background: var(--danger-wash); box-shadow: inset 0 0 0 1.5px var(--danger-line); }
.s-critical .safety-top svg { color: var(--danger-ink); }
.s-warning { background: var(--sun-wash); box-shadow: inset 0 0 0 1.5px var(--sun-line); }
.s-warning .safety-top svg { color: var(--sun-ink); }
.s-denial { background: var(--mint-wash); box-shadow: inset 0 0 0 1.5px var(--mint-line); }
.s-denial .safety-top svg { color: var(--mint-ink); }
.s-info .safety-top svg { color: var(--sky-ink); }
.flags { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.flag { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 10px 12px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); }
.flag-main { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.flag-cat { font-weight: 600; font-size: 14px; margin-right: 2px; }
.flag-rule { font: 12px/1.6 var(--mono); color: var(--text-muted); }
.flag-quote { grid-column: 1 / -1; font-size: 13.5px; color: var(--text-soft); }
.expect { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; font-size: 13px; color: var(--text-soft); }
.safety-foot { margin-top: 12px; font-size: 12px; color: var(--text-muted); }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--surface-2); color: var(--text-soft); box-shadow: inset 0 0 0 1px var(--line-2); }
.pill svg { width: 12px; height: 12px; }
.p-critical { background: var(--danger-wash); color: var(--danger-ink); box-shadow: inset 0 0 0 1px var(--danger-line); }
.p-warning { background: var(--sun-wash); color: var(--sun-ink); box-shadow: inset 0 0 0 1px var(--sun-line); }
.p-good { background: var(--mint-wash); color: var(--mint-ink); box-shadow: inset 0 0 0 1px var(--mint-line); }
.p-accent { background: var(--sky-wash); color: var(--sky-ink); box-shadow: inset 0 0 0 1px var(--sky-line); }

.card { position: relative; border-radius: 18px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card); overflow: hidden; }
.card-head, details.card > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; }
details.card > summary { cursor: pointer; list-style: none; }
details.card > summary::-webkit-details-marker { display: none; }
.card-head h3, details.card h3 { font-size: 15px; font-weight: 600; }
.card-note { font-size: 12.5px; color: var(--text-muted); }
.card-body { padding: 0 18px 18px; }

.wave-wrap { position: relative; }
.wave { display: block; width: 100%; height: 118px; cursor: pointer; border-radius: 8px; }
.wave-cross, .wave-head { position: absolute; top: 0; bottom: 18px; width: 1.5px; pointer-events: none; opacity: 0; }
.wave-cross { background: var(--text-muted); }
.wave-head { background: var(--danger-ink); }
.wave-tip { position: absolute; top: -8px; transform: translate(-50%, -100%); max-width: 300px; padding: 8px 10px; border-radius: 10px; background: var(--paper); border: 1.5px solid var(--stk-grey); box-shadow: var(--shadow-pop); font-size: 12.5px; pointer-events: none; opacity: 0; z-index: 5; }
.tip-text { color: var(--text-soft); margin-top: 2px; }
.wave-foot { display: flex; align-items: center; gap: 14px; margin-top: 10px; flex-wrap: wrap; }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--text-muted); flex: 1; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.k-speech { background: var(--speech); }
.k-silence { background: var(--silence); }
.wave-time { font-variant-numeric: tabular-nums; font-size: 12.5px; color: var(--text-muted); }

.segs { display: flex; flex-direction: column; }
.seg-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.seg-row:first-child { border-top: 0; padding-top: 4px; }
.seg-row.playing { background: linear-gradient(90deg, var(--tint-soft), transparent 70%); border-radius: 10px; }
.seg-time button { border: 0; background: none; padding: 2px 0; font: 600 12.5px/1.4 var(--font); font-variant-numeric: tabular-nums; color: var(--link); }
.seg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.seg-text { font-size: 16px; line-height: 1.65; }
.seg-text[dir="rtl"] { font-size: 17.5px; line-height: 1.8; }
.empty-text { color: var(--text-muted); font-size: 14px; }
.seg-obs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.seg-details { margin-top: 8px; }
.seg-details summary { cursor: pointer; font-size: 12.5px; color: var(--text-muted); }
.votes { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.vote { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 10px; font-size: 13px; padding: 7px 10px; border-radius: 10px; background: var(--surface-2); }
.vote-name { font-weight: 600; color: var(--text-soft); }
.vote-s { color: var(--text-muted); font-variant-numeric: tabular-nums; }
mark { color: inherit; border-radius: 4px; padding: 0 2px; }
.m-term { background: var(--lav-wash); box-shadow: inset 0 -1.5px 0 var(--lav-line); }
.m-uncertain { background: var(--sun-wash); box-shadow: inset 0 -1.5px 0 var(--sun-ink); }
.m-safety-critical { background: var(--danger-wash); box-shadow: inset 0 -1.5px 0 var(--danger-ink); }
.m-safety-warning { background: var(--sun-wash); box-shadow: inset 0 -1.5px 0 var(--sun-ink); }
.m-safety-denial { background: var(--mint-wash); box-shadow: inset 0 -1.5px 0 var(--mint-ink); }
.m-safety-info { background: var(--sky-wash); box-shadow: inset 0 -1.5px 0 var(--sky-ink); }
.script-line { display: flex; gap: 10px; margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 13.5px; color: var(--text-soft); }

.mnote { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
pre.sbt, pre.json { margin: 0; padding: 14px; border-radius: 12px; background: var(--surface-2); font: 12.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; max-height: 420px; overflow: auto; }
.meta-line { font-size: 12px; color: var(--text-muted); line-height: 1.8; }

/* ── verified live on this Space ──────────────────────────────────────── */
.verified-inner { padding: 28px 28px 24px; }
.v-bar { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-size: 13.5px; color: var(--text-soft); }
.v-bar b { color: var(--text); }
.v-bar .grow { flex: 1; min-width: 200px; }
.v-progress { height: 6px; border-radius: 999px; background: var(--surface-3); overflow: hidden; margin-top: 6px; }
.v-progress i { display: block; height: 100%; border-radius: 999px; background: var(--hl); transition: width 0.6s var(--ease); }
.v-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-top: 14px; }
.v-card { padding: 14px 16px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); min-width: 0; }
.v-card h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font: 700 17px/1.2 var(--font-stk); padding-top: 0.1em; }
.v-card h3 small { font: 500 12px/1.3 var(--font); color: var(--text-muted); }
.v-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; margin-top: 10px; }
.v-stat { min-width: 0; }
.v-stat .k { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-muted); }
.v-stat .v { display: block; font: 500 22px/1.2 var(--font-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.v-stat .s { display: block; font-size: 12px; color: var(--text-muted); }
.v-table-wrap { margin-top: 14px; overflow-x: auto; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line-2); background: var(--paper); }
.v-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.v-table th, .v-table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.v-table thead th { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-2); }
.v-table tbody tr:last-child > * { border-bottom: 0; }
.v-ex { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 0; text-align: left; font: 600 13px/1.35 var(--font); color: var(--text); }
.v-ex .lang { font-size: 10.5px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.04em; }
.v-ex::after { content: "+"; color: var(--text-muted); font-weight: 600; margin-left: 2px; }
.v-ex[aria-expanded="true"]::after { content: "−"; }
.v-cell { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.v-num { font-variant-numeric: tabular-nums; color: var(--text-soft); white-space: nowrap; }
.v-detail td { background: var(--surface-2); }
.v-detail .dv + .dv { margin-top: 10px; }
.v-detail .dv-h { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.v-files { margin-top: 14px; font-size: 13px; color: var(--text-soft); }
.v-files summary { cursor: pointer; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.v-files summary::-webkit-details-marker { display: none; }
.v-files ul { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; }
.v-files li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 6px 10px; border-radius: 10px; background: var(--surface-2); font-size: 12.5px; }
.v-files li code { background: none; padding: 0; font-size: 11.5px; color: var(--text-muted); }
.v-files .fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 11.5px; }

/* word-level differences: the script (or the first run) against a transcript, as scored */
.diff { line-height: 2; font-size: 14px; word-spacing: 1px; }
.diff[dir="rtl"] { font-family: var(--font-ar); font-size: 15.5px; }
.diff .w-sub, .diff .w-del, .diff .w-ins { border-radius: 4px; padding: 1px 3px; }
.diff .w-del, .diff .w-sub del { text-decoration: line-through; text-decoration-thickness: 1.5px; color: var(--danger-ink); background: var(--danger-wash); }
.diff .w-sub ins, .diff .w-ins { text-decoration: none; color: var(--text); background: var(--sun-wash); box-shadow: inset 0 -1.5px 0 var(--sun-ink); }
.diff .w-sub { padding: 0; }
.diff .w-sub del, .diff .w-sub ins { border-radius: 4px; padding: 1px 3px; }
.diff-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.diff-legend span { display: inline-flex; align-items: center; gap: 6px; }
.diff-legend i { display: inline-block; width: 18px; height: 10px; border-radius: 3px; }
.diff-legend .k-del { background: var(--danger-wash); box-shadow: inset 0 0 0 1px var(--danger-line); }
.diff-legend .k-ins { background: var(--sun-wash); box-shadow: inset 0 -2px 0 var(--sun-ink); }

/* ── service ──────────────────────────────────────────────────────────── */
.ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.op { padding: 14px 16px; border-radius: 16px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-card); min-width: 0; }
.op .k { font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); }
.op .v { font: 500 26px/1.15 var(--font-display); letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.op .s { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.op .rows { margin-top: 6px; }
.op .rows div { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.op .rows b { font-variant-numeric: tabular-nums; }

/* ── top navigation between the four views ────────────────────────────── */
.views { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.view-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border: 0; border-radius: 10px;
  background: transparent; color: var(--text-soft); font: 600 13px/1 var(--font); white-space: nowrap; transition: background 0.15s ease, color 0.15s ease; }
.view-tab:hover { color: var(--text); background: var(--wash-hover); }
.view-tab[aria-selected="true"] { background: var(--paper); color: var(--text); box-shadow: 0 1px 2px rgba(14, 23, 38, 0.08), inset 0 0 0 1px var(--line-2); }
.view-tab .sm { display: none; }
.view { animation: fadein 0.35s var(--ease) both; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view > .section-head:first-child { padding-top: 48px; }
.view > .card, .view > section.card { margin-top: 14px; }

/* ── speakers: chips by detected role, the conversation ────────────────── */
.spk { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px 0 8px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--text); background: var(--paper); box-shadow: inset 0 0 0 1px var(--line-2); white-space: nowrap; }
.spk i { width: 9px; height: 9px; border-radius: 999px; background: var(--spk-other); flex: none; }
.spk-clin i { background: var(--spk-clin); }
.spk-pat i { background: var(--spk-pat); }
.spk-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.legend i.k-spk-clin { background: var(--spk-clin); }
.legend i.k-spk-pat { background: var(--spk-pat); }
.legend i.k-spk-other { background: var(--spk-other); }
.convo-card { box-shadow: inset 0 0 0 1.5px var(--sky-line), var(--shadow-lift); }
.convo-card .card-head h3 { font: 500 21px/1.2 var(--font-display); letter-spacing: -0.015em; }
.speakers-line { padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.bt .c-metric .sm { display: none; }
.who { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.who li { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13px; color: var(--text-soft); }

/* ── result: the live benchmark table ──────────────────────────────────── */
.bench-card { box-shadow: inset 0 0 0 1px var(--line-2), var(--shadow-card); }
.bench-head { align-items: flex-start; flex-wrap: wrap; }
.bench-head h3 { font: 500 21px/1.2 var(--font-display); letter-spacing: -0.015em; }
.bench-head .card-note { display: block; margin-top: 4px; max-width: 72ch; }
.chart-legend { flex: none; flex-wrap: wrap; gap: 6px 14px; }
.k-bh { background: var(--chart-bh); }
.k-other { background: var(--chart-other); }
.legend i.k-ci { width: 16px; height: 2px; border-radius: 0; background: var(--chart-ci); opacity: 0.55; }
.axis-note { color: var(--text-muted); }
.bench-best { font-size: 14px; margin: 0 0 10px; color: var(--text); }
.table-wrap { overflow-x: auto; position: relative; } /* positioned: visually hidden labels inside stay in the scroller */
table.bt { width: 100%; min-width: 660px; border-collapse: collapse; font-size: 13.5px; }
.bt th, .bt td { padding: 10px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
.bt thead th { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-2); white-space: nowrap; }
.bt thead th small { text-transform: none; letter-spacing: 0; font-weight: 500; }
.bt tbody tr:last-child > * { border-bottom: 0; }
.bt .c-rank { width: 34px; text-align: center; font: 700 15px/1 var(--font-stk); color: var(--text-muted); padding-top: 0.7em; }
.bt-row.is-bh > * { background: var(--tint-soft); }
.bt-row.is-bh .c-rank { color: var(--sky-ink); }
.bt-row.fresh > * { animation: fresh 1.8s var(--ease); }
@keyframes fresh { from { background-color: var(--sel-face); } }
.bt-sys { min-width: 210px; font-weight: 400; }
.bt-name { display: inline-flex; align-items: center; gap: 7px; padding: 0; border: 0; background: none; font: 600 14px/1.3 var(--font); color: var(--text); text-align: left; }
.bt-name:hover > span:first-child { text-decoration: underline; text-underline-offset: 3px; }
.bt-caret { width: 7px; height: 7px; border-right: 1.5px solid var(--text-muted); border-bottom: 1.5px solid var(--text-muted); transform: translateY(-2px) rotate(45deg); transition: transform 0.2s var(--ease); }
.bt-name[aria-expanded="true"] .bt-caret { transform: translateY(1px) rotate(225deg); }
.bt-org { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.bt-extra { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 4px; }
.mini { font-size: 11.5px; color: var(--sky-ink); font-weight: 600; }
.c-metric { min-width: 190px; width: 30%; }
.bt-val { display: flex; align-items: baseline; gap: 8px; }
.bt-val b { font: 600 15px/1.2 var(--font); font-variant-numeric: tabular-nums; }
.bt-val small { font-size: 12px; color: var(--text-muted); }
.bt-bar { display: block; height: 8px; margin-top: 6px; border-radius: 4px; background: var(--chart-track); overflow: hidden; }
.bt-bar i { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--chart-other); transition: width 0.5s var(--ease); }
.is-bh .bt-bar i { background: var(--chart-bh); }
.bt-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.spinner.sm { width: 14px; height: 14px; border-width: 2px; }
.muted { color: var(--text-muted); }
.num-good, .num-bad { font-weight: 600; font-variant-numeric: tabular-nums; }
.num-good { color: var(--mint-ink); }
.num-bad { color: var(--danger-ink); }
.bt-detail > td { background: var(--surface-2); padding: 12px 14px 14px; }
.bt-more { display: flex; flex-direction: column; gap: 12px; }
.bt-text { font-size: 15px; line-height: 1.6; }
.bt-text[lang="ar"] { font-size: 17px; line-height: 1.85; }
.dv-h { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 4px; }
.bt-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 13px; }
.bt-facts dt { color: var(--text-muted); font-weight: 600; }
.bt-facts dd { margin: 0; color: var(--text-soft); }
.bench-notes { margin: 12px 0 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: var(--text-muted); }
.only-head { margin-top: 18px; display: flex; flex-direction: column; gap: 4px; }
.only-head h3 { display: flex; align-items: center; gap: 8px; font: 500 23px/1.2 var(--font-display); letter-spacing: -0.015em; }
.only-head p { font-size: 13.5px; color: var(--text-soft); max-width: 82ch; }


/* ── leaderboard: every test set in one table ─────────────────────────── */
.hb-track { position: relative; display: block; height: 10px; border-radius: 4px; background: var(--chart-track); }
.hb-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 0 4px 4px 0; background: var(--chart-other); transition: width 0.5s var(--ease); }
.is-bh .hb-fill { background: var(--chart-bh); }
.hb-ci { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: var(--chart-ci); opacity: 0.55; }
.hb-ci::before, .hb-ci::after { content: ""; position: absolute; top: -3px; width: 2px; height: 8px; background: var(--chart-ci); }
.hb-ci::before { left: 0; }
.hb-ci::after { right: 0; }
.lb tr.lb-ceil > * { color: var(--text-muted); font-style: italic; border-top: 1px dashed var(--line-strong); }
.chart-cap { margin-top: 12px; font-size: 12.5px; color: var(--text-muted); max-width: 110ch; }
.board-table-card .card-body > .chart-legend { margin-bottom: 10px; }
.lb-all .lb-col { padding: 0; vertical-align: bottom; }
.lb-sort { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; padding: 9px 10px; border: 0; background: none; text-align: left;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; white-space: normal; min-width: 92px; }
.lb-sort small { font-size: 10.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--text-muted); }
.lb-sort:hover { color: var(--text); background: var(--wash-hover); }
.lb-sort:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.lb-arrow { font-size: 12px; line-height: 1; color: var(--hl); min-height: 12px; }
.lb-all td.lb-bar { min-width: 150px; }
.lb-val { display: block; margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.lb-all td.v-num { font-variant-numeric: tabular-nums; }
.lb-all .bt-name { font-weight: 600; }
.lb-all tr.open > * { border-bottom-color: transparent; }
table.lb { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.lb th, .lb td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; white-space: nowrap; }
.lb thead th { font-size: 11px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); background: var(--surface-2); }
.lb thead th.is-sorted { color: var(--text); box-shadow: inset 0 -2px 0 var(--hl); }
.lb tbody tr:last-child > * { border-bottom: 0; }
.lb tr.is-bh > * { background: var(--tint-soft); }
.lb td.is-sorted b, .lb td.is-sorted { font-weight: 600; }
.lb-sys a { font-weight: 600; color: var(--text); }
.lb-sys small { display: block; font-size: 12px; color: var(--text-muted); font-weight: 400; }
.lb td small { color: var(--text-muted); font-size: 12px; }
.lb .c-rank { width: 36px; text-align: center; font: 700 14px/1 var(--font-stk); color: var(--text-muted); padding-top: 0.9em; }
.lb tr.is-bh .c-rank { color: var(--sky-ink); }
table.lb.compact th, table.lb.compact td { padding: 8px 10px; }
.board-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; align-items: start; }
.prov { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 6px 14px; margin: 0; font-size: 13px; }
.prov dt { color: var(--text-muted); font-weight: 600; }
.prov dd { margin: 0; color: var(--text-soft); overflow-wrap: anywhere; }
.prov-h { font-size: 12px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-muted); margin: 14px 0 6px; }
.prov-slices { margin: 0; padding-left: 18px; font-size: 13px; color: var(--text-soft); display: flex; flex-direction: column; gap: 4px; }
.prov-slices code { margin-left: 6px; }

/* ── vocal biomarkers ─────────────────────────────────────────────────── */
.states { padding-top: 4px; }

/* ── about ────────────────────────────────────────────────────────────── */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }
.method { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-soft); }
.method b { color: var(--text); }

/* ── footer ───────────────────────────────────────────────────────────── */
.foot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 40px 24px 48px; margin-top: 40px; border-top: 1px solid var(--line); text-align: center; }
.foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.built { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px 10px; font-size: 13.5px; color: var(--text-soft); }
.logo-sm { display: block; height: 22px; width: auto; }
.built-sep { width: 4px; height: 4px; border-radius: 999px; background: var(--text-muted); opacity: 0.5; }
.fine { font-size: 12px; color: var(--text-muted); max-width: 80ch; }

/* ── dialogs ──────────────────────────────────────────────────────────── */
.dlg { width: min(680px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 1.5px solid var(--stk-grey); border-radius: 18px;
  background: var(--paper); color: var(--text); box-shadow: var(--shadow-pop); }
.dlg::backdrop { background: rgba(14, 23, 38, 0.35); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.dlg-head h2 { display: flex; align-items: center; gap: 8px; font: 500 22px/1.2 var(--font-display); letter-spacing: -0.02em; }
.dlg-body { padding: 12px 18px 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-soft); }
.dlg-body h3 { font-size: 13.5px; font-weight: 600; color: var(--text); margin-top: 6px; }
.dlg-body ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.code-wrap { position: relative; }
.code { margin: 0; padding: 12px 14px; padding-right: 84px; border-radius: 12px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font: 12.5px/1.6 var(--mono); white-space: pre; overflow-x: auto; color: var(--text); }
.code-wrap .stk { position: absolute; top: 8px; right: 8px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); padding: 9px 14px; border-radius: 12px; background: var(--ink-900); color: #fff; font-size: 13px; opacity: 0; transition: opacity 0.2s ease, transform 0.2s ease; z-index: 60; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ── responsive ───────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .board-meta, .about-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .topbar { height: auto; flex-wrap: wrap; row-gap: 8px; padding-top: 10px; padding-bottom: 8px; }
  .views { order: 3; width: 100%; overflow-x: auto; }
  .view-tab { flex: 1 0 auto; }
  html { scroll-padding-top: 120px; }
}
@media (max-width: 820px) {
  .bench-grid { grid-template-columns: minmax(0, 1fr); }
  .bench-col + .bench-col { border-left: 0; border-top: 1px solid var(--line); }
  .steps-col { border-radius: 0; }
  .status-chip .chip-state { display: none; }
}
@media (max-width: 600px) {
  .page { padding: 0 16px 32px; }
  .topbar { padding: 10px 16px 8px; }
  .logo { height: 24px; }
  .brand { gap: 9px; }
  .brand-tag, .status { display: none; }
  .hero { padding: 34px 0 24px; gap: 14px; }
  .lede { font-size: 15.5px; }
  .bench-col, .bench-run { padding-left: 16px; padding-right: 16px; }
  .bench-run { flex-direction: column; align-items: stretch; text-align: center; }
  .gloss#runBtn { width: 100%; }
  .seg-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .vote { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .c-hide-sm, .bt .c-time { display: none; }
  .bt .c-metric .lg { display: none; }
  .bt .c-metric .sm { display: inline; }
  table.bt { min-width: 0; }
  .bt-sys { min-width: 0; }
  .c-metric { min-width: 120px; }
  .view-tab { padding: 0 8px; font-size: 12.5px; gap: 4px; }
  .view-tab .lg { display: none; }
  .view-tab .sm { display: inline; }
  .card-head { flex-wrap: wrap; row-gap: 4px; }
  .view > .section-head:first-child { padding-top: 32px; }
  .bt-facts { grid-template-columns: minmax(0, 1fr); }
  .verified-inner { padding: 20px 16px 18px; }
  .v-stats { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .verified, .service, .results { margin-top: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero > *, .bench, .mark > svg path, .dot.busy, .spinner, .bt-row.fresh, .view { animation: none; }
  .mark > svg path { stroke-dashoffset: 0; }
  .gloss, .orb, .orb svg, .mic-btn, .bt-bar i, .hb-fill { transition: none; }
}

/* ── result: vocal biomarkers in progress ──────────────────────────────── */
.notice-card .card-head h3 { display: flex; align-items: center; gap: 4px; }
.notice-card .mnote { margin-top: 0; font-size: 13px; max-width: 80ch; }

/* ── leaderboard: the clean table; method and reproduction folded away ─── */
.lb-clean td.lb-bar { min-width: 120px; }
.lb-clean .hb-track { height: 6px; }
.lb-clean .lb-val { margin-bottom: 4px; }
.lb-clean td.is-full b { color: var(--mint-ink); }
.lb-clean td small { color: var(--text-muted); }
details.board-more { margin-top: 14px; }
details.board-more .board-meta { margin-top: 0; padding: 0 18px 18px; }
details.board-more .prov-h:first-child { margin-top: 0; }
.bench-how { margin-top: 10px; }
.bench-how > summary { cursor: pointer; font-size: 12.5px; color: var(--text-muted); width: max-content; }
.bench-how > summary:hover { color: var(--text-soft); }
details.board-more > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin-left: 4px; border-right: 1.5px solid var(--text-muted);
  border-bottom: 1.5px solid var(--text-muted); transform: translateY(-2px) rotate(45deg); transition: transform 0.2s var(--ease); }
details.board-more[open] > summary::after { transform: translateY(1px) rotate(225deg); }
details.board-more > summary .card-note { margin-left: auto; }
/* phone: the recogniser's name stays in view while the numbers scroll */
@media (max-width: 640px) {
  .lb-clean .c-rank { display: none; }
  .lb-clean .lb-sys { position: sticky; left: 0; z-index: 1; min-width: 132px; max-width: 150px; white-space: normal; background: var(--paper);
    box-shadow: 1px 0 0 var(--line); }
  .lb-clean thead .lb-sys, .lb-clean thead th:nth-child(2) { position: sticky; left: 0; z-index: 2; background: var(--surface-2); }
  .lb-clean tr.is-bh > .lb-sys { background: linear-gradient(var(--tint-soft), var(--tint-soft)), var(--paper); }
  .lb-clean .bt-name { font-size: 13px; text-align: left; }
  .lb-clean td.lb-bar { min-width: 86px; }
}
