/* Shared brand and semantic tokens. Both product surfaces consume this source. */
:root {
  color-scheme: dark;
  --bg: #101217;
  --bg-2: #14171d;
  --sidebar: #14171d;
  --surface: #191d25;
  --surface-2: #202630;
  --surface-3: #29313e;
  --input: #12161d;
  --line: #303846;
  --line-2: #465266;
  --text: #f0f2f7;
  --text-2: #c2c9d6;
  --muted: #9ca8bc;
  --brand: #7054cd;
  --brand-hi: #c3b4ff;
  --brand-soft: #26213e;
  --brand-line: #8d77d3;
  --teal: #79dbc8;
  --teal-soft: #173931;
  --gradient: linear-gradient(135deg, #7054cd, #7054cd);
  --me: #c3b4ff;
  --them: #79dbc8;
  --success: #79dbc8;
  --success-soft: #173931;
  --warn: #f3cd83;
  --warn-soft: #392e1d;
  --danger: #ffaaaa;
  --danger-soft: #3f242b;
  --r: 10px;
  --r-lg: 16px;
  --shadow: 0 8px 24px #0002;
  --shadow-sm: 0 2px 8px #0002;
  --font: 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
}
/* ============================================================
   ClariPrompt design system
   ============================================================ */
:root { --r-sm: 8px; --mono: Consolas, monospace; }
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
#root { height: 100%; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 24px; font-weight: 650; }
h2 { font-size: 18px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
a { color: var(--brand-hi); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; }
code { font-family: var(--mono); font-size: 12px; background: var(--input); border: 1px solid var(--line); border-radius: 5px; padding: 1px 5px; }
::selection { background: rgba(123, 107, 255, 0.35); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #262b38; border-radius: 10px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #333a4b; background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

.muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); }
.spacer { flex: 1; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.top { align-items: flex-start; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.kbd {
  display: inline-flex; align-items: center; font: 600 11px var(--font); color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 5px; padding: 0 6px; height: 20px; white-space: nowrap;
}
.eyebrow { font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.icon { width: 18px; height: 18px; flex: none; }
.icon.sm { width: 15px; height: 15px; }
.icon.lg { width: 22px; height: 22px; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); height: 100vh; }
.sidebar {
  background: var(--sidebar); border-right: 1px solid var(--line); display: flex; flex-direction: column;
  padding: 18px 12px 12px; min-height: 0;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 20px; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-name { font: 700 17px var(--font-display); letter-spacing: -0.02em; }
.brand-name span { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 10px; border-radius: var(--r-sm);
  background: transparent; color: var(--text-2); font: 500 14px var(--font); border: 0; cursor: pointer; text-align: left;
}
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--brand-soft); color: var(--text); }
.nav-item.active .icon { color: var(--brand-hi); }
.nav-item .kbd { margin-left: auto; opacity: 0; transition: opacity 0.15s; }
.nav-item:hover .kbd { opacity: 1; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); animation: pulse 1.4s infinite; flex: none; }
.nav-item .live-dot { margin-left: auto; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.credits-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.credits-top { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.credits-num { font: 700 20px var(--font-display); }
.credits-num small { font: 500 12px var(--font); color: var(--muted); margin-left: 4px; }
.bar { height: 6px; border-radius: 6px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 6px; background: var(--gradient); }
.bar.low > i { background: var(--warn); }
.credits-card .btn { width: 100%; margin-top: 10px; }
.account-row {
  display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--r-sm); cursor: pointer;
  background: transparent; border: 0; color: var(--text); width: 100%; text-align: left; font: inherit;
}
.account-row:hover { background: var(--surface-2); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--gradient); color: #fff; font-weight: 700; font-size: 13px;
}
.account-email { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-plan { font-size: 11.5px; color: var(--muted); }

.main { overflow-y: auto; min-width: 0; }
.page { max-width: 1160px; margin: 0 auto; padding: 28px 32px 48px; }
.page.wide { max-width: none; }
.page-head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 14px;
  border-radius: var(--r-sm); border: 1px solid var(--line-2); background: var(--surface-2); color: var(--text);
  font: 600 13.5px var(--font); cursor: pointer; white-space: nowrap; transition: background 0.12s, border-color 0.12s, filter 0.12s;
}
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: #353c4f; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn:focus-visible, .nav-item:focus-visible, .seg button:focus-visible, .tier:focus-visible, .list-item:focus-visible {
  outline: 2px solid var(--brand-hi); outline-offset: 2px;
}
.btn-primary { background: var(--brand); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(123, 107, 255, 0.28); }
.btn-primary:hover:not(:disabled) { background: var(--brand-hi); border-color: transparent; }
.btn-gradient { background: var(--gradient); border: 0; color: #fff; box-shadow: 0 6px 20px rgba(95, 139, 255, 0.28); }
.btn-gradient:hover:not(:disabled) { filter: brightness(1.08); background: var(--gradient); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); border-color: transparent; color: var(--text); }
.btn-danger { background: var(--danger); border-color: transparent; color: #210707; }
.btn-danger:hover:not(:disabled) { background: #fb8c8c; border-color: transparent; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--danger); }
.btn-danger-ghost:hover:not(:disabled) { background: var(--danger-soft); border-color: transparent; }
.btn-lg { height: 46px; padding: 0 22px; font-size: 15px; border-radius: var(--r); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; gap: 6px; }
.btn-icon { width: 34px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--text); }

/* ---------- Inputs ---------- */
input, textarea, select {
  width: 100%; background: var(--input); color: var(--text); border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: inherit; padding: 9px 12px; transition: border-color 0.12s, box-shadow 0.12s;
}
input, select { height: 40px; }
textarea { resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: #5d6577; }
input:hover, textarea:hover, select:hover { border-color: #353c4f; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
input:disabled, textarea:disabled, select:disabled { opacity: 0.55; }
select {
  appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c8496' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 16px;
}
select option { background: var(--surface); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field-hint { font-size: 12px; color: var(--muted); }
.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon input { padding-left: 36px; }
textarea.code { font-family: var(--mono); font-size: 12.5px; }

/* Segmented control */
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--input); border: 1px solid var(--line-2); border-radius: var(--r); }
.seg button {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); font: 600 13px var(--font); cursor: pointer; white-space: nowrap;
}
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface-3); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35); }
.seg.sm button { height: 26px; padding: 0 9px; font-size: 12px; }

/* Fast / Pro tier picker */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tier {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 12px 14px; border-radius: var(--r);
  background: var(--input); border: 1px solid var(--line-2); color: var(--text); cursor: pointer; font: inherit;
}
.tier:hover { border-color: #3a4256; }
.tier.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(123, 107, 255, 0.1); }
.tier-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); flex: none; }
.tier.on .tier-icon { background: var(--brand); color: #fff; }
.tier.pro.on .tier-icon { background: var(--gradient); }
.tier-name { font-weight: 650; display: flex; align-items: center; gap: 8px; }
.tier-hint { font-size: 12px; color: var(--muted); margin-top: 1px; }

/* Switch rows (settings) */
.switch-row { display: flex; align-items: flex-start; gap: 16px; padding: 14px 0; border-top: 1px solid var(--line); cursor: pointer; }
.switch-row:first-child { border-top: 0; padding-top: 2px; }
.switch-row .switch-text { flex: 1; min-width: 0; }
.switch-row .switch-title { font-weight: 600; }
.switch-row .switch-desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.switch { position: relative; width: 38px; height: 22px; flex: none; margin-top: 1px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; height: 22px; }
.switch span { position: absolute; inset: 0; border-radius: 22px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background 0.15s; pointer-events: none; }
.switch span::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #c3c8d4; transition: transform 0.15s, background 0.15s;
}
.switch input:checked + span { background: var(--brand); border-color: var(--brand); }
.switch input:checked + span::after { transform: translateX(16px); background: #fff; }
.switch input:focus-visible + span { outline: 2px solid var(--brand-hi); outline-offset: 2px; }

/* Checkbox rows */
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 5px 0; }
.check input { width: 16px; height: 16px; margin: 3px 0 0; flex: none; accent-color: var(--brand); padding: 0; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.card.flush { padding: 0; }
.card.tight { padding: 14px 16px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head .sub { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.card-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-hi); flex: none; }
.card-icon.teal { background: var(--teal-soft); color: var(--teal); }
.section-title { font-size: 12px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.07em; margin: 0 0 8px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

/* ---------- Feedback ---------- */
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r); font-size: 13px; border: 1px solid; }
.alert .icon { margin-top: 1px; }
.alert-error { background: var(--danger-soft); border-color: rgba(248, 113, 113, 0.35); color: #fecaca; }
.alert-warn { background: var(--warn-soft); border-color: rgba(245, 185, 74, 0.35); color: #fde3b0; }
.alert-info { background: var(--brand-soft); border-color: var(--brand-line); color: #d9d4ff; }
.alert-success { background: var(--success-soft); border-color: rgba(52, 211, 153, 0.35); color: #bbf7d0; }
.alert ul { margin: 4px 0 0; padding-left: 18px; }
.badge {
  display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge.brand { background: var(--brand-soft); color: #c9c2ff; }
.badge.teal { background: var(--teal-soft); color: var(--teal); }
.badge.success { background: var(--success-soft); color: var(--success); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 48px 24px; color: var(--muted); }
.empty-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); }
.empty h3 { color: var(--text); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.2); border-top-color: currentColor; animation: spin 0.7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.typing { display: inline-flex; gap: 4px; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

/* ---------- Live ---------- */
.live-setup { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; }
.start-row { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.checklist { display: flex; flex-direction: column; gap: 2px; }
.check-item {
  display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: var(--r-sm); background: transparent; border: 0;
  color: var(--text); text-align: left; font: inherit; width: 100%; cursor: pointer;
}
.check-item:hover { background: var(--surface-2); }
.check-item .ci-icon { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); }
.check-item.ok .ci-icon { background: var(--success-soft); color: var(--success); }
.check-item.warn .ci-icon { background: var(--warn-soft); color: var(--warn); }
.check-item.bad .ci-icon { background: var(--danger-soft); color: var(--danger); }
.ci-title { font-weight: 600; font-size: 13px; }
.ci-desc { font-size: 12px; color: var(--muted); }
.tips { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.tip { display: flex; gap: 8px; font-size: 12.5px; color: var(--text-2); align-items: center; }

.controlbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; margin: -6px 0 18px; background: rgba(19, 22, 29, 0.92); backdrop-filter: blur(10px);
  border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.live-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--danger-soft); color: #fecaca; font-weight: 700; font-size: 12px; letter-spacing: 0.04em;
}
.live-pill .timer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-2); letter-spacing: 0; }
.meter-group { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.meter { width: 70px; height: 6px; background: var(--surface-3); border-radius: 6px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 6px; transition: width 80ms linear; }
.vsep { width: 1px; height: 22px; background: var(--line-2); }

.live-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.answer-card { position: relative; overflow: hidden; border-color: #2c2a52; background: linear-gradient(180deg, rgba(123, 107, 255, 0.07), rgba(19, 22, 29, 0) 140px), var(--surface); }
.answer-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 2px; background: var(--gradient); }
.answer-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sugg-status { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.say { font: 500 21px/1.5 var(--font-display); color: var(--text); letter-spacing: -0.005em; }
.say.muted { color: var(--muted); }
.points { margin: 12px 0 0; padding-left: 20px; color: var(--text-2); font-size: 14.5px; }
.points li { margin: 4px 0; }
.points li::marker { color: var(--brand-hi); }
.cues { margin: 2px 0 6px; padding-left: 26px; font: 600 23px/1.55 var(--font-display); }
.cues li::marker { color: var(--teal); font-weight: 700; }
.say-small { font-size: 13px; color: var(--muted); margin-top: 6px; }
.note-warn { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; font-size: 13px; color: #fde3b0; background: var(--warn-soft); border-radius: var(--r-sm); padding: 8px 10px; }
.next-q { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: 13px; color: var(--text-2); }
.next-q .eyebrow { margin-bottom: 4px; }
.next-q div + div { margin-top: 2px; }
.older-list { margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.older { display: flex; gap: 10px; font-size: 13px; color: var(--muted); }
.older .badge { flex: none; }
.answer-empty { display: flex; gap: 12px; align-items: center; color: var(--muted); }

.transcript-card { margin-top: 18px; }
.collapsible-head { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.transcript { max-height: 420px; overflow-y: auto; margin-top: 12px; padding-right: 4px; }
.transcript.short { max-height: 260px; }
.line { display: flex; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.line:first-child { border-top: 0; }
.line .who { width: 58px; flex: none; font-weight: 650; font-size: 12.5px; padding-top: 1px; }
.line.me .who { color: var(--me); }
.line.them .who { color: var(--them); }
.line .text { color: var(--text-2); }
.line.interim .text { color: var(--muted); font-style: italic; }
.notes-col { position: sticky; top: 76px; max-height: calc(100vh - 110px); overflow-y: auto; }
.notes-sec { margin-top: 14px; }
.notes-sec ul { margin: 6px 0 0; padding-left: 18px; }
.notes-sec li { margin: 3px 0; font-size: 13.5px; color: var(--text-2); }
.notes-summary { color: var(--text-2); font-size: 13.5px; }

/* Summary */
.summary-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.summary-text { color: var(--text-2); font-size: 14.5px; }
.review-item { padding: 12px 0; border-top: 1px solid var(--line); }
.review-item:first-of-type { border-top: 0; padding-top: 6px; }
.review-q { display: flex; gap: 10px; align-items: baseline; font-weight: 600; }
.review-said { margin-top: 4px; font-size: 13px; color: var(--muted); }
.review-better { margin-top: 6px; font-size: 13.5px; color: var(--text-2); background: var(--surface-2); border-left: 2px solid var(--brand); border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: 8px 10px; }

/* ---------- Two-pane (History, Profiles) ---------- */
.two-pane { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; align-items: start; }
.list-pane { position: sticky; top: 0; display: flex; flex-direction: column; gap: 10px; max-height: calc(100vh - 150px); }
.list-scroll { overflow-y: auto; display: flex; flex-direction: column; gap: 4px; padding-right: 2px; }
.list-group { font-size: 11.5px; font-weight: 650; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 12px 4px 4px; }
.list-item {
  display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; padding: 10px 12px;
  border-radius: var(--r); background: transparent; border: 1px solid transparent; color: var(--text); cursor: pointer; font: inherit;
}
.list-item:hover { background: var(--surface); border-color: var(--line); }
.list-item.active { background: var(--brand-soft); border-color: var(--brand-line); }
.list-item-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item-meta { font-size: 12px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.list-item-body { min-width: 0; flex: 1; }
.mode-dot { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text-2); }
.mode-dot.interview { background: var(--brand-soft); color: var(--brand-hi); }
.mode-dot.job { background: rgba(95, 139, 255, 0.14); color: #8fb0ff; }
.mode-dot.sales { background: var(--teal-soft); color: var(--teal); }
.mode-dot.custom { background: var(--warn-soft); color: var(--warn); }
.detail-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 18px; }
.detail-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 6px; color: var(--muted); font-size: 12.5px; }
.hist-sugg { display: flex; gap: 8px; font-size: 12.5px; color: #c9c2ff; padding: 6px 0 6px 70px; border-top: 1px solid var(--line); }

/* Profiles */
.mode-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.mode-card {
  display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 14px; border-radius: var(--r);
  background: var(--input); border: 1px solid var(--line-2); color: var(--text); cursor: pointer; font: inherit;
}
.mode-card:hover { border-color: #3a4256; }
.mode-card.on { border-color: var(--brand); background: var(--brand-soft); }
.mode-card .desc { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.title-input { font: 650 22px var(--font-display); background: transparent; border-color: transparent; padding: 4px 8px; margin-left: -8px; height: auto; }
.title-input:hover { border-color: var(--line-2); }
.step { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-hi); font-size: 12px; font-weight: 700; flex: none; }
.note-list { margin-top: 14px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); max-height: 240px; overflow-y: auto; }
.note-item { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-top: 1px solid var(--line); }
.note-item:first-child { border-top: 0; }
.note-item .icon { color: var(--muted); }
.note-title { font-weight: 600; font-size: 13px; display: flex; gap: 8px; align-items: center; }
.note-preview { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
textarea.kb { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; min-height: 360px; }

/* ---------- Practice ---------- */
.practice-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.q-card { padding: 28px; }
.q-text { font: 500 23px/1.5 var(--font-display); margin: 10px 0 16px; white-space: pre-wrap; }
.dots { display: flex; gap: 6px; }
.dots i { width: 22px; height: 6px; border-radius: 6px; background: var(--surface-3); }
.dots i.cur { background: var(--brand); }
.dots i.good { background: var(--success); }
.dots i.mid { background: var(--warn); }
.dots i.low { background: var(--danger); }
.heard { min-height: 110px; font-size: 15px; color: var(--text-2); padding: 12px; background: var(--input); border: 1px dashed var(--line-2); border-radius: var(--r-sm); }
.score {
  display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; flex: none;
  font: 700 20px var(--font-display); background: var(--surface-3); border: 3px solid var(--line-2);
}
.score.sm { width: 34px; height: 34px; font-size: 13px; border-width: 2px; }
.score.lg { width: 84px; height: 84px; font-size: 30px; border-width: 4px; }
.score.good { border-color: var(--success); color: var(--success); background: var(--success-soft); }
.score.mid { border-color: var(--warn); color: var(--warn); background: var(--warn-soft); }
.score.low { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
.fb-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 14px; }
.fb-box { background: var(--surface-2); border-radius: var(--r); padding: 12px 14px; }
.fb-box ul { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); font-size: 13.5px; }
.fb-box.good .eyebrow { color: var(--success); }
.fb-box.improve .eyebrow { color: var(--warn); }
.fb-better { margin-top: 14px; }
.fb-better p { margin: 6px 0 0; font-size: 14.5px; color: var(--text-2); white-space: pre-wrap; }
.fb-better pre { background: var(--input); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; font: 12.5px/1.55 var(--mono); overflow-x: auto; }
.results-list { list-style: none; padding: 0; margin: 0; }
.results-list li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--line); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 6, 10, 0.7); backdrop-filter: blur(3px); display: grid; place-items: center; z-index: 50; }
.modal { width: min(680px, 92vw); background: var(--surface); border: 1px solid var(--line-2); border-radius: 16px; padding: 22px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5); }

/* ---------- Sign-in ---------- */
.auth { display: grid; grid-template-columns: 1.05fr 1fr; height: 100vh; }
.auth-brand {
  position: relative; overflow: hidden; padding: 48px; display: flex; flex-direction: column;
  background: radial-gradient(800px 500px at 0% 0%, rgba(123, 107, 255, 0.35), transparent 60%),
    radial-gradient(700px 500px at 100% 100%, rgba(54, 208, 189, 0.22), transparent 60%), #0d0f17;
  border-right: 1px solid var(--line);
}
.auth-brand h1 { font-size: 34px; line-height: 1.2; margin-top: auto; max-width: 440px; }
.auth-brand .lead { color: var(--text-2); font-size: 15px; margin-top: 12px; max-width: 420px; }
.feature-list { display: flex; flex-direction: column; gap: 14px; margin: 32px 0 auto; }
.feature { display: flex; gap: 12px; align-items: flex-start; }
.feature .card-icon { background: rgba(255, 255, 255, 0.06); color: #fff; }
.feature-title { font-weight: 600; }
.feature-desc { font-size: 13px; color: var(--muted); }
.auth-form { display: grid; place-items: center; padding: 48px; }
.auth-box { width: min(380px, 100%); display: flex; flex-direction: column; gap: 16px; }
.code-input { font: 650 24px var(--mono); letter-spacing: 0.5em; text-align: center; height: 56px; }
.auth-legal { font-size: 12px; color: var(--muted); text-align: center; }
.splash { height: 100vh; display: grid; place-items: center; }

/* ---------- Settings ---------- */
.settings-grid { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { position: sticky; top: 0; display: flex; flex-direction: column; gap: 2px; }
.plan-card { display: flex; gap: 18px; align-items: center; padding: 18px; border-radius: var(--r); background: linear-gradient(135deg, rgba(123, 107, 255, 0.16), rgba(54, 208, 189, 0.08)); border: 1px solid var(--brand-line); }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat-num { font: 700 22px var(--font-display); }
.stat-label { font-size: 12px; color: var(--muted); }
.shortcut-row { display: flex; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.shortcut-row:first-child { border-top: 0; }
.shortcut-row .kbd + .kbd { margin-left: 4px; }

/* ---------- Overlay window (side panel) ---------- */
body.overlay-body { background: var(--surface); }
.ov { display: flex; flex-direction: column; height: 100vh; }
.ov-head { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-bottom: 1px solid var(--line); -webkit-app-region: drag; user-select: none; }
.ov-head button, .ov-tabs, .ov-foot, .ov-head .seg { -webkit-app-region: no-drag; }
.ov-head .brand-mark { width: 20px; height: 20px; }
.ov-title { font-weight: 650; font-size: 13px; }
.ov-tabs { display: flex; align-items: center; gap: 4px; padding: 8px 10px 0; }
.ov-tab { background: transparent; border: 0; color: var(--muted); font: 600 12.5px var(--font); padding: 6px 10px; border-radius: 7px; cursor: pointer; }
.ov-tab.on { color: var(--text); background: var(--surface-3); }
.ov-body { flex: 1; overflow-y: auto; padding: 12px 14px; }
.ov-body .say { font-size: calc(17px * var(--ov-scale, 1)); }
.ov-body .cues { font-size: calc(18px * var(--ov-scale, 1)); }
.ov-body .points, .ov-body .note-warn, .ov-body .next-q { font-size: calc(13px * var(--ov-scale, 1)); }
.ov-lines { border-top: 1px solid var(--line); padding: 4px 14px; max-height: 120px; overflow-y: auto; font-size: 12px; }
.ov-lines .line .who { width: 48px; font-size: 11.5px; }
.ov-foot { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line); flex-wrap: wrap; }

/* ---------- Under-camera strip ---------- */
body.camera-body { background: transparent; overflow: hidden; }
.cam { position: relative; height: 100vh; display: flex; flex-direction: column; user-select: none; }
.cam-box { flex: 1; min-height: 0; border-radius: 14px; padding: 4px 18px 34px; display: flex; flex-direction: column; }
.cam-text {
  flex: 1; min-height: 0; overflow: hidden; text-align: center; font-weight: 700; line-height: 1.3;
  color: var(--cam-color, #ffe45c); font-size: 28px; font-family: var(--font-display);
  text-shadow: -1.5px -1.5px 0 #000, 1.5px -1.5px 0 #000, -1.5px 1.5px 0 #000, 1.5px 1.5px 0 #000, 0 0 4px #000, 0 0 10px rgba(0, 0, 0, 0.85);
}
.cam-text.faint { font-size: 15px !important; font-weight: 600; opacity: 0.75; }
.cam-dots { letter-spacing: 6px; animation: pulse 1.2s infinite; }
.cam-error { text-align: center; font-size: 13px; color: #ffb4b4; text-shadow: 0 0 3px #000, 0 0 6px #000; }
.cam-bar {
  position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); display: flex; align-items: center; gap: 2px;
  background: rgba(14, 16, 22, 0.9); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 6px;
  opacity: 0.4; transition: opacity 0.15s;
}
.cam-bar:hover { opacity: 1; }
.cam-bar button { display: inline-flex; align-items: center; gap: 4px; background: transparent; border: 0; color: var(--text); padding: 4px 8px; font: 600 12px var(--font); border-radius: 999px; cursor: pointer; }
.cam-bar button:hover { background: var(--surface-3); }
.cam-grip { -webkit-app-region: drag; cursor: move; color: var(--muted); padding: 2px 6px; display: inline-flex; }
.cam-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--cam-color); border: 1px solid #000; }
/* Workspace hierarchy and responsive reflow. */
.shell { grid-template-columns: 218px minmax(0, 1fr); }
.sidebar { padding-top: 28px; }
.workspace-label { margin: 32px 16px 8px; font-size: 10px; color: var(--muted); }
.page { max-width: 1340px; padding: 40px 36px 64px; }
.page-head { margin-bottom: 32px; }
.page-head h1 { font-size: clamp(26px, 2.5vw, 34px); letter-spacing: -.035em; }
.page-head .sub { max-width: 660px; margin-top: 10px; font-size: 14px; }
.card { box-shadow: none; }
.live-setup { grid-template-columns: minmax(0, 1fr) 292px; gap: 24px; }
.setup-card { padding: 28px; }
.setup-card h2 { font-size: 22px; letter-spacing: -.025em; }
.setup-intro { margin: 8px 0 24px; max-width: 52ch; }
.setup-card .grid-2 { grid-template-columns: 1fr; gap: 20px; }
.capture-notice { display: flex; align-items: flex-start; gap: 12px; padding: 16px 0; margin: 20px 0 8px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 13px; }
.capture-notice .icon { margin-top: 3px; color: var(--teal); }
.start-row { flex-wrap: wrap; gap: 16px; margin-top: 24px; }
.start-row .small { max-width: 230px; }
.btn-gradient, .btn-primary { background: var(--brand); box-shadow: none; color: #fff; }
.btn-gradient:hover:not(:disabled), .btn-primary:hover:not(:disabled) { background: #7c60d9; filter: none; }
.btn:active:not(:disabled) { transform: translateY(1px); }
button, input, select, textarea { font: inherit; }
input, select { min-height: 42px; }
.text-button { color: var(--brand-hi); padding: 0; border: 0; background: none; cursor: pointer; font: inherit; text-align: inherit; }
.text-button:hover { text-decoration: underline; }
.text-button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 100; padding: 12px 20px; background: var(--brand); color: #fff; border-radius: 8px; }
.skip:focus { top: 12px; }
.collapsible-head { width: 100%; color: var(--text); border: 0; background: none; padding: 0; text-align: left; }
.transcript-title { font-weight: 650; font-size: 15px; }
dialog.modal { color: var(--text); max-height: 90vh; overflow-y: auto; }
dialog.modal::backdrop { background: #05060bbd; }
.auth { min-height: 100vh; height: auto; }
.auth-brand { background: var(--sidebar); border-right: 1px solid var(--line); padding: 48px; gap: 24px; }
.auth-brand h1 { margin-top: 48px; font-size: clamp(28px, 3vw, 44px); letter-spacing: -.035em; }
.auth-brand .lead { font-size: 16px; line-height: 1.7; }
.auth-form { min-width: 0; }
.auth-legal { line-height: 1.7; }
.check-item { text-align: left; }
.ci-desc { overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 184px minmax(0, 1fr); }
  .nav-item .kbd { display: none; }
  .page { padding: 28px 24px 48px; }
  .live-setup, .live-grid { grid-template-columns: 1fr; }
  .checklist { display: grid; grid-template-columns: 1fr 1fr; }
  .auth-brand, .auth-form { padding: 32px; }
  .two-pane { grid-template-columns: 200px minmax(0, 1fr); }
}
@media (max-width: 650px) {
  .shell { display: block; height: auto; min-height: 100vh; }
  .sidebar { position: static; padding: 16px; border-bottom: 1px solid var(--line); }
  .sidebar .brand { margin: 0 0 16px; }
  .sidebar .nav { display: flex; flex-direction: row; flex-wrap: wrap; overflow: visible; padding: 0 0 8px; }
  .nav-item { flex: none; width: auto; padding: 10px; font-size: 13px; }
  .nav-item .icon { display: none; }
  .sidebar-foot, .workspace-label { display: none; }
  .main { overflow: visible; }
  .page { padding: 24px 16px 48px; }
  .page-head, .controlbar, .row { flex-wrap: wrap; }
  .setup-card { padding: 20px; }
  .grid-2, .two-pane, .mode-grid, .tiers { grid-template-columns: 1fr; }
  .seg { flex-wrap: wrap; max-width: 100%; }
  .card { min-width: 0; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-nav .nav-item { white-space: nowrap; }
  .checklist { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 24px; }
  .auth-brand h1 { margin-top: 16px; }
  .auth-brand .feature-list { display: none; }
  .auth-form { padding: 32px 24px; }
  .modal .row { align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
