/* Puhecast — design tokens (from the Puhecast design system) */
:root {
  color-scheme: dark;
  --canvas: #111312;
  --sidebar: #151716;
  --surface: #181b19;
  --surface-raised: #1f2320;
  --surface-hover: #262b27;
  --well: #151816;
  --moss: #1b2219;
  --hairline: #2a2f2b;
  --hairline-strong: #3a4038;
  --ink: #f2f4ef;
  --ink-muted: #a3a8a1;
  --ink-subtle: #80867e;
  --lime: #c8f56a;
  --lime-hover: #d6fa8a;
  --lime-ink: #11140f;
  --lime-tint: #2b3820;
  --lime-line: #4b6230;
  --amber: #e9b949;
  --amber-tint: #262111;
  --amber-line: #4a3c18;
  --coral: #f07a6a;
  --coral-tint: #6e352d;
  --coral-wash: #2a1a17;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --font-sans: "Manrope", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  /* Older names still read by scripts (waveform colours). */
  --accent: var(--lime);
  --subtle: var(--ink-subtle);
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body { margin: 0; min-width: 320px; background: var(--canvas); color: var(--ink); font: 400 14px/22px var(--font-sans); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--lime); text-decoration: none; }
a:hover { color: #dcff94; }
h1, h2, h3, p { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
.boot-mark { padding: 28px 40px; font: 800 22px var(--font-sans); letter-spacing: -.04em; }
.boot-mark span { color: var(--ink-muted); }
.mono { font-family: var(--font-mono); }
.eyebrow { margin: 0; color: var(--lime); font: 700 11px/16px var(--font-mono); letter-spacing: .18em; text-transform: uppercase; }
.eyebrow.subtle { color: var(--ink-subtle); font-size: 10px; }
.muted { color: var(--ink-muted); }
.subtle { color: var(--ink-subtle); }
.lead { max-width: 560px; color: var(--ink-muted); font-size: 15px; line-height: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink); font: 700 14px/1 var(--font-sans); white-space: nowrap; text-decoration: none; transition: background .12s ease, border-color .12s ease; }
.btn:hover, .button:hover { background: var(--surface-hover); color: var(--ink); }
.btn-primary, .button.primary { border-color: var(--lime); background: var(--lime); color: var(--lime-ink); }
.btn-primary:hover, .button.primary:hover { border-color: var(--lime-hover); background: var(--lime-hover); color: var(--lime-ink); }
.btn-sm, .button.small { height: 32px; padding: 0 12px; border-radius: var(--radius-sm); font-size: 12px; }
.btn-md { height: 40px; padding: 0 16px; font-size: 13px; }
.btn-ghost, .button.ghost { border-color: transparent; background: transparent; color: var(--ink-muted); }
.btn-ghost:hover, .button.ghost:hover { background: var(--surface-raised); color: var(--ink); }
.btn-danger, .button.danger { border-color: transparent; background: transparent; color: var(--coral); }
.btn-danger:hover, .button.danger:hover { background: var(--coral-wash); color: var(--coral); }
.btn-delete { border-color: var(--coral); background: var(--coral); color: #1d0d0a; }
.btn-delete:hover { border-color: #f59484; background: #f59484; color: #1d0d0a; }
.btn[aria-pressed="true"] { border-color: var(--lime-line); background: var(--lime-tint); color: var(--lime); }
.btn:disabled, .button:disabled { cursor: default; opacity: .45; }
.icon-btn { width: 32px; height: 32px; padding: 0; border-radius: var(--radius-sm); }
.btn svg { flex: none; }
.text-link { color: var(--lime); font-weight: 700; font-size: 13px; }
.link-button { padding: 0; border: 0; background: none; color: var(--lime); font-weight: 700; }

/* Form controls */
.lbl { color: var(--ink-muted); font-size: 11px; line-height: 16px; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span, .field > label { color: var(--ink); font-size: 12px; line-height: 18px; font-weight: 600; }
.input { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); outline: none; background: var(--surface-raised); color: var(--ink); font: 500 13px/1 var(--font-sans); }
.input:focus { border-color: var(--lime); }
.input::placeholder { color: var(--ink-subtle); }
.input.mono { font-family: var(--font-mono); font-size: 12px; }
.input-sm { height: 32px; padding: 0 10px; font: 500 12px/1 var(--font-mono); }
.input-sm.text { font-family: var(--font-sans); font-size: 13px; }
select.input { padding-right: 32px; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3a8a1' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-position: right 12px center; background-repeat: no-repeat; }
input[type="checkbox"] { width: 18px; height: 18px; flex: none; margin: 2px 0 0; accent-color: var(--lime); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 22px; cursor: pointer; }
.check small { display: block; color: var(--ink-muted); font-size: 12px; line-height: 18px; }
.check .tag { margin-left: 6px; color: var(--ink-subtle); font: 700 10px var(--font-mono); letter-spacing: .14em; }
input.switch { position: relative; width: 44px; height: 26px; flex: none; margin: 0; appearance: none; border: 1px solid var(--hairline-strong); border-radius: 999px; background: var(--surface-raised); cursor: pointer; transition: background .15s; }
input.switch::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: var(--ink-muted); content: ""; transition: transform .15s, background .15s; }
input.switch:checked { border-color: var(--lime); background: var(--lime); }
input.switch:checked::after { transform: translateX(18px); background: var(--lime-ink); }

/* Status dots and badges */
.dot { display: inline-block; width: 6px; height: 6px; flex: none; border-radius: 999px; background: var(--ink-subtle); }
.dot.lime { background: var(--lime); }
.dot.amber { background: var(--amber); }
.dot.coral { background: var(--coral); }
.status { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.status::before { width: 6px; height: 6px; flex: none; border-radius: 999px; background: var(--ink-subtle); content: ""; }
.status.ready, .status.ok { color: var(--lime); }
.status.ready::before, .status.ok::before { background: var(--lime); }
.status.waiting, .status.warn { color: var(--amber); }
.status.waiting::before, .status.warn::before { background: var(--amber); }
.status.live { color: var(--coral); }
.status.live::before { background: var(--coral); }
.status.bad { color: var(--coral); }
.status.bad::before { background: var(--coral); }
.status.plain { color: var(--ink-muted); }

/* Cards and notices */
.card { border: 1px solid var(--hairline); border-radius: var(--radius-lg); background: var(--surface); }
.card-pad { padding: 24px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.card h2 { font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -.01em; }
.card h3 { font-size: 15px; line-height: 22px; font-weight: 700; }
.notice { padding: 12px 14px; border: 1px solid var(--amber-line); border-radius: var(--radius-md); background: var(--amber-tint); color: var(--amber); font-size: 12px; line-height: 18px; }
.notice.alert { border-color: #5e2c25; background: var(--coral-wash); color: #f5a397; }
.notice.calm { border-color: var(--hairline); background: var(--well); color: var(--ink-muted); }
.notice.good { border-color: var(--lime-line); background: var(--lime-tint); color: var(--lime); }
.notice-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.empty { padding: 36px 16px; color: var(--ink-muted); text-align: center; font-size: 13px; }

/* Brand */
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.logo-tile { display: block; flex: none; }
.logo-button { display: flex; padding: 0; border: 0; border-radius: 9px; background: none; }
.brand-name { display: flex; flex-direction: column; }
.brand-name b { color: var(--ink); font-size: 20px; line-height: 22px; font-weight: 800; letter-spacing: -.04em; }
.brand-name b span { color: var(--ink-muted); }
.brand-name small { color: var(--ink-subtle); font: 400 9px/14px var(--font-mono); letter-spacing: .2em; }
.avatar { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; flex: none; border-radius: 999px; background: var(--lime-tint); color: var(--lime); font-size: 12px; font-weight: 800; }
.avatar.plain { border: 1px solid var(--hairline-strong); background: var(--surface-raised); color: var(--ink); }
.avatar.lg { width: 40px; height: 40px; font-size: 13px; }
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }

/* App shell: sidebar + main column */
.app-shell { display: flex; flex-wrap: wrap; min-height: 100vh; }
.sidebar { display: flex; flex: 1 1 236px; flex-direction: column; gap: 32px; max-width: 264px; padding: 28px 16px 20px; border-right: 1px solid var(--hairline); background: var(--sidebar); }
.sidebar .brand { padding: 0 10px; }
.nav-group { display: flex; flex-direction: column; gap: 6px; }
.nav-group .eyebrow { margin: 0 0 6px; padding: 0 14px; color: var(--ink-subtle); font-size: 10px; }
.nav-item { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; height: 44px; padding: 0 14px; border: 1px solid transparent; border-radius: var(--radius-md); background: transparent; color: var(--ink-muted); font-size: 14px; font-weight: 600; text-align: left; }
.nav-item:hover { background: #1b1e1c; color: var(--ink); }
.nav-item[aria-current="page"] { border-color: var(--hairline); background: var(--surface-raised); color: var(--ink); }
.nav-item[aria-current="page"]::before { position: absolute; top: 10px; bottom: 10px; left: -1px; width: 3px; border-radius: 999px; background: var(--lime); content: ""; }
.nav-item[aria-current="page"] svg { color: var(--lime); }
.sidebar-foot { display: flex; flex-direction: column; gap: 16px; margin-top: auto; }
.help-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; border: 1px solid var(--hairline); border-radius: var(--radius-lg); background: var(--surface); }
.help-card strong { font-size: 14px; }
.help-card p { color: var(--ink-muted); font-size: 12px; line-height: 18px; }
.help-card a { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; }
.profile { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.profile-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.profile-copy strong { overflow: hidden; font-size: 13px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { color: var(--ink-subtle); font-size: 11px; line-height: 16px; }
.main { flex: 999 1 560px; min-width: 0; padding: 36px clamp(16px, 4vw, 48px) 64px; }
.page { display: flex; flex-direction: column; gap: 32px; max-width: 1040px; margin: 0 auto; }
.page.wide { max-width: 1180px; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--ink-muted); font-size: 13px; }
.crumbs a, .crumbs button { padding: 0; border: 0; background: none; color: var(--ink-muted); font-weight: 400; }
.crumbs a:hover, .crumbs button:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--ink); font-weight: 700; }
.crumb-sep { color: #4a5049; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 10px; }
.page-head h1 { font-size: 44px; line-height: 48px; font-weight: 700; letter-spacing: -.035em; }
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* Sign in */
.auth-layout { display: flex; flex-wrap: wrap; min-height: 100vh; }
.auth-story { position: relative; display: flex; flex: 1 1 560px; flex-direction: column; justify-content: space-between; gap: 64px; min-width: 0; min-height: 560px; overflow: hidden; padding: 48px clamp(24px, 8vw, 120px); border-right: 1px solid var(--hairline); background: radial-gradient(60% 55% at 78% 46%, #253022 0%, #1a1f19 45%, #151716 100%); }
.auth-story .auth-rings { position: absolute; top: 50%; right: -200px; width: 640px; height: 640px; transform: translateY(-50%); pointer-events: none; }
.auth-story > * { position: relative; }
.auth-story .brand-name b { font-size: 22px; line-height: 24px; }
.auth-story .brand-name small { font-size: 10px; }
.auth-copy { display: flex; flex-direction: column; gap: 20px; max-width: 520px; }
.auth-copy h1 { font-size: clamp(44px, 5.4vw, 72px); line-height: 1.02; font-weight: 700; letter-spacing: -.04em; }
.auth-copy h1 em { color: var(--lime); font-style: normal; }
.auth-copy p { max-width: 420px; color: var(--ink-muted); font-size: 16px; line-height: 26px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 0; padding: 0; list-style: none; }
.chips li { display: flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: 999px; background: rgba(17, 19, 18, .6); color: var(--ink-muted); font: 400 11px var(--font-mono); }
.auth-foot { color: var(--ink-subtle); font-size: 12px; line-height: 18px; }
.auth-main { display: flex; flex: 1 1 420px; align-items: center; justify-content: center; min-width: 0; padding: 64px 24px; }
.auth-form { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 380px; }
.auth-form .intro { display: flex; flex-direction: column; gap: 8px; }
.auth-form h2 { font-size: 28px; line-height: 34px; font-weight: 700; letter-spacing: -.02em; }
.auth-form .intro p { color: var(--ink-muted); }
.auth-form .fields { display: flex; flex-direction: column; gap: 16px; }
.auth-form .input { height: 46px; background: var(--surface); font-size: 14px; }
.auth-form .btn { width: 100%; }
.auth-toggle { color: var(--ink-muted); font-size: 13px; text-align: center; }
.form-error { min-height: 1em; color: var(--coral); font-size: 13px; }
.form-error:empty { display: none; }

/* Overview */
.overview-row { display: flex; flex-wrap: wrap; gap: 16px; }
.hero { position: relative; display: flex; flex: 999 1 460px; flex-direction: column; justify-content: center; gap: 16px; min-width: 0; min-height: 252px; overflow: hidden; padding: 32px; border: 1px solid #2f3a2b; border-radius: var(--radius-lg); background: radial-gradient(70% 90% at 82% 70%, #26321f 0%, var(--moss) 60%); }
.hero > * { position: relative; }
.hero .rings { position: absolute; right: -40px; bottom: -150px; width: 340px; height: 340px; pointer-events: none; }
.hero h2 { max-width: 420px; font-size: 26px; line-height: 32px; font-weight: 700; letter-spacing: -.02em; }
.hero p { max-width: 420px; color: var(--ink-muted); }
.glance { display: flex; flex: 1 1 260px; flex-direction: column; gap: 20px; min-width: 0; padding: 24px; }
.glance h2 { color: var(--ink-muted); font-size: 13px; line-height: 18px; font-weight: 600; }
.glance-big { display: flex; align-items: baseline; gap: 10px; margin-top: auto; }
.glance-big b { font-size: 56px; line-height: 56px; font-weight: 700; letter-spacing: -.04em; }
.glance-big span { color: var(--ink-muted); font-size: 13px; }
.kv { display: flex; flex-direction: column; margin: 0; border-top: 1px solid var(--hairline); }
.kv > div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--hairline); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--ink-muted); font-size: 13px; }
.kv dd { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; font-weight: 600; text-align: right; }
.kv dd.mono { font-weight: 400; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.section-title h2 { font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -.01em; }
.section-title h2 span { color: var(--ink-subtle); font-weight: 500; }
.episode-list { display: flex; flex-direction: column; gap: 10px; }
.episode-row { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; width: 100%; padding: 14px 16px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--surface); color: var(--ink); text-align: left; }
.episode-row:hover { background: #1c201d; color: var(--ink); }
.episode-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border-radius: var(--radius-md); background: var(--lime-tint); }
.episode-title { display: flex; flex: 1 1 200px; flex-direction: column; min-width: 0; }
.episode-title b { font-size: 15px; line-height: 22px; }
.episode-title small { color: var(--ink-subtle); font-size: 12px; line-height: 18px; }
.episode-meta { display: flex; flex-direction: column; width: 140px; }
.episode-meta .eyebrow { color: var(--ink-subtle); font-size: 10px; letter-spacing: .14em; }
.episode-meta span:last-child { font-size: 13px; font-weight: 600; }
.episode-status { width: 130px; }
.episode-go { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: none; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--surface-raised); }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.fact { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--surface); }
.fact .eyebrow { color: var(--ink-subtle); font-size: 10px; }
.fact b { font-size: 16px; line-height: 22px; font-weight: 600; }
.empty-episodes { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 20px; border: 1px dashed var(--hairline-strong); border-radius: var(--radius-lg); color: var(--ink-muted); text-align: center; }
.empty-episodes h3 { color: var(--ink); font-size: 16px; }

/* New recording */
.setup-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.setup-steps { display: flex; flex: 999 1 560px; flex-direction: column; gap: 16px; min-width: 0; }
.setup-aside { display: flex; flex: 1 1 280px; flex-direction: column; gap: 16px; min-width: 0; }
.step-card { display: flex; flex-direction: column; gap: 18px; padding: 24px; }
.step-title { display: flex; align-items: center; gap: 12px; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex: none; border-radius: 999px; background: var(--lime-tint); color: var(--lime); font: 700 12px var(--font-mono); }
.step-card p { color: var(--ink-muted); font-size: 13px; }
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.link-row { display: flex; gap: 8px; }
.link-row .input { flex: 1; min-width: 0; }
.link-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--well); }
.link-meta span { display: flex; flex-direction: column; font-size: 12px; line-height: 18px; color: var(--ink-muted); }
.link-meta b { color: var(--ink); font-weight: 700; }
.limits h2 { margin-bottom: 8px; }
.safe-list { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 0; padding: 0; list-style: none; }
.safe-list li { display: flex; gap: 12px; color: var(--ink-muted); font-size: 13px; line-height: 20px; }
.safe-list .mono { color: var(--lime); font-size: 11px; line-height: 20px; }

/* Guest join / preflight */
.guest-shell { min-height: 100vh; background: var(--canvas); }
.guest-header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--hairline); background: var(--sidebar); }
.guest-header .brand-name b { font-size: 20px; }
.guest-header > span { color: var(--ink-subtle); font-size: 12px; }
.guest-main { display: flex; flex-direction: column; gap: 20px; max-width: 720px; margin: 0 auto; padding: 40px 16px 64px; }
.guest-main h1 { font-size: 40px; line-height: 44px; font-weight: 700; letter-spacing: -.035em; }
.guest-intro { display: flex; flex-direction: column; gap: 10px; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.progress li { display: flex; flex-direction: column; gap: 8px; color: var(--ink-subtle); font-size: 12px; font-weight: 600; }
.progress li span:first-child { height: 4px; border-radius: 999px; background: var(--hairline); }
.progress li.done { color: var(--ink-muted); }
.progress li.done span:first-child { background: var(--lime); }
.progress li[aria-current="step"] { color: var(--lime); }
.progress li[aria-current="step"] span:first-child { background: linear-gradient(90deg, var(--lime) 50%, var(--hairline) 50%); }
.check-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.check-card > p { color: var(--ink-muted); font-size: 13px; }
.meter { display: flex; gap: 3px; height: 18px; }
.meter span { flex: 1; border-radius: 2px; background: var(--surface-hover); }
.meter span.on { background: var(--lime); }
.meter span.hot { background: var(--amber); }
.meter.small { gap: 2px; height: 14px; }
.meter.dim { opacity: .4; }
.storage-bar { height: 8px; overflow: hidden; border-radius: 999px; background: var(--surface-hover); }
.storage-bar span { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.storage-bar.low span { background: var(--coral); }
.storage-row { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--ink-subtle); font: 400 11px var(--font-mono); }
.consent-list { display: flex; flex-direction: column; gap: 16px; padding: 16px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--well); }
.card-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.mic-check-line { color: var(--ink-muted); font-size: 12px; line-height: 18px; }

/* Recording room */
.room-shell { display: flex; flex-direction: column; min-height: 100vh; }
.room-header { display: flex; align-items: center; flex-wrap: wrap; gap: 16px; padding: 16px clamp(16px, 3vw, 40px); border-bottom: 1px solid var(--hairline); background: var(--sidebar); }
.room-title { display: flex; flex-direction: column; }
.room-title small { color: var(--ink-subtle); font: 400 10px/14px var(--font-mono); letter-spacing: .16em; }
.room-title b { font-size: 16px; line-height: 22px; }
.rec-pill { display: inline-flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border: 1px solid var(--hairline); border-radius: 999px; background: var(--surface-raised); font-size: 13px; font-weight: 800; color: var(--ink-muted); }
.rec-pill .light { width: 10px; height: 10px; border-radius: 999px; background: var(--ink-subtle); }
.rec-pill.on { border-color: var(--lime-line); background: var(--lime-tint); color: var(--lime); }
.rec-pill.on .light { background: var(--lime); box-shadow: 0 0 0 4px rgba(200, 245, 106, .18); animation: pulse 1.6s ease-in-out infinite; }
.rec-pill .mono { color: var(--ink); font-weight: 400; }
.room-limit { color: var(--ink-subtle); font: 400 11px var(--font-mono); }
.room-header .spacer { flex: 1; }
.room-main { flex: 1; padding: 28px clamp(16px, 3vw, 40px) 40px; }
.room-inner { display: flex; flex-direction: column; gap: 20px; max-width: 1180px; margin: 0 auto; }
.stepper { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; list-style: none; }
.stepper li { color: var(--ink-subtle); font: 400 11px var(--font-mono); }
.stepper li[aria-current="step"] { color: var(--lime); font-weight: 700; }
.stepper li.sep { color: var(--hairline-strong); }
.room-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.room-people { display: grid; flex: 999 1 640px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; min-width: 0; }
.room-aside { display: flex; flex: 1 1 280px; flex-direction: column; gap: 16px; min-width: 0; }
.person { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.person.caution { border-color: var(--amber-line); }
.person-head { display: flex; align-items: center; gap: 12px; }
.person-head > div { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.person-head h2 { font-size: 16px; line-height: 22px; }
.person-head h2 span { color: var(--ink-subtle); font-weight: 500; }
.person-head small { color: var(--ink-muted); font-size: 12px; }
.device-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--well); }
.device-box .row, .call-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.call-row { padding: 0 2px; }
.state-ok, .state-warn, .state-idle, .state-bad { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; }
.state-ok { color: var(--lime); }
.state-warn { color: var(--amber); }
.state-bad { color: var(--coral); }
.state-idle { color: var(--ink-muted); font-weight: 600; }
.state-ok::before, .state-warn::before, .state-idle::before, .state-bad::before { width: 7px; height: 7px; border-radius: 999px; background: currentColor; content: ""; }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; padding-top: 12px; border-top: 1px solid var(--hairline); }
.stats dt { color: var(--ink-muted); font-size: 12px; }
.stats dd { margin: 0; font: 400 12px var(--font-mono); }
.stats dd small { color: var(--ink-subtle); font-size: 11px; }
.person-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.log { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.log li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--hairline); font-size: 13px; }
.log li:last-child { border-bottom: 0; }
.log .mono { width: 64px; flex: none; color: var(--ink-subtle); font-size: 11px; }
.log .warn { color: var(--amber); }
.log .soft { color: var(--ink-muted); }
.room-footer { position: sticky; bottom: 0; z-index: 3; display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px clamp(16px, 3vw, 40px); border-top: 1px solid var(--hairline); background: var(--sidebar); }
.room-footer .note { color: var(--ink-subtle); font-size: 12px; }
.room-footer .output { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.room-footer .output label { color: var(--ink-muted); font-size: 12px; font-weight: 600; }
.room-footer .output .input { width: auto; min-width: 180px; }
.preflight { display: flex; flex: 999 1 640px; flex-direction: column; gap: 16px; min-width: 0; }

/* Uploads */
.track-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.track-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; }
.chunks { display: grid; grid-template-columns: repeat(auto-fill, minmax(10px, 1fr)); gap: 3px; }
.chunks span { height: 18px; border-radius: 3px; background: var(--lime); }
.chunks span.missing { background: transparent; box-shadow: inset 0 0 0 1px var(--hairline-strong); }
.chunks span.pending { background: var(--amber); }
.chunk-caption { color: var(--ink-subtle); font: 400 11px var(--font-mono); }
.checklist { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.checklist li { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); font-size: 13px; }
.checklist li::before { width: 16px; height: 16px; flex: none; border-radius: 999px; background: var(--lime-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23c8f56a' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E") center no-repeat; content: ""; }
.checklist li.todo::before { background: var(--surface-raised); box-shadow: inset 0 0 0 1px var(--hairline-strong); }
.partial-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 24px; }
.partial-card > div { display: flex; flex-direction: column; gap: 6px; max-width: 640px; }
.partial-card p, .track-card p { color: var(--ink-muted); font-size: 13px; }
.fine-print { color: var(--ink-subtle); font-size: 12px; }

/* Episode workspace: tabs + editor */
.workspace-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--sidebar); }
.tab { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-muted); font-size: 13px; font-weight: 600; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { background: var(--surface-raised); color: var(--ink); box-shadow: inset 0 0 0 1px var(--hairline); }
.save-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.unsaved { color: var(--amber); font-size: 12px; font-weight: 600; }
.unsaved:empty { display: none; }
.editor-grid { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.editor-col { display: flex; flex: 999 1 640px; flex-direction: column; gap: 16px; min-width: 0; }
.editor-side { display: flex; flex: 1 1 300px; flex-direction: column; gap: 16px; min-width: 0; }
.panel { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.panel > p { color: var(--ink-muted); font-size: 12px; line-height: 18px; }
.panel h2 { font-size: 15px; line-height: 22px; }
.transport { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.play-btn { width: 48px; height: 48px; padding: 0; border-radius: 999px; }
.transport-time { display: flex; flex: 1; flex-direction: column; min-width: 160px; }
.transport-time .mono { font-size: 20px; line-height: 26px; font-weight: 500; }
.transport-time .mono span { color: var(--ink-subtle); }
.transport-time small { color: var(--ink-muted); font-size: 12px; }
.listen { display: flex; flex-direction: column; gap: 4px; }
.listen .input { width: 210px; }
.scrubber { width: 100%; height: 4px; margin: 0; accent-color: var(--lime); }
.timeline { display: flex; flex-direction: column; gap: 12px; }
.ruler { position: relative; height: 18px; margin-left: 0; border-bottom: 1px solid var(--hairline); }
.ruler span { position: absolute; bottom: 3px; color: var(--ink-subtle); font: 400 10px var(--font-mono); transform: translateX(-2px); }
.lane { display: flex; flex-direction: column; gap: 8px; }
.lane-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; font-size: 13px; }
.lane-head strong { font-weight: 700; }
.lane-levels, .lane-note { color: var(--ink-subtle); font: 400 11px var(--font-mono); }
.lane-note { color: #f5a397; }
.lane-warning { color: var(--amber); }
.lane-tools { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.lane-tools .input-sm { width: 58px; }
.lane-toggle { width: 32px; height: 32px; padding: 0; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--surface-raised); color: var(--ink); font: 700 12px var(--font-mono); }
.lane-toggle[aria-pressed="true"] { border-color: var(--lime-line); background: var(--lime-tint); color: var(--lime); }
.lane-wave { position: relative; height: 64px; overflow: hidden; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--well); cursor: pointer; }
.lane-wave canvas { display: block; width: 100%; height: 100%; }
.lane.silenced .lane-wave { opacity: .35; }
.lane-playhead { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; background: var(--lime); pointer-events: none; }
.silence-panel { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--well); color: var(--ink-muted); font-size: 13px; }
.silence-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 6px; color: var(--ink); }
.silence-head strong span { color: var(--ink-subtle); font-weight: 500; }
.silence-row { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-top: 1px solid var(--hairline); }
.silence-at { min-width: 64px; color: var(--ink-subtle); font: 400 11px var(--font-mono); }
.silence-row > span:nth-child(2) { flex: 1; }
.transcript-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.transcript-tools .input { flex: 1; min-width: 180px; height: 40px; }
.lowc { text-decoration: underline dotted var(--ink-subtle); text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.transcript-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.transcript-line { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; grid-template-areas: "who text tools" "when text tools"; gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--hairline); }
.transcript-line:first-child { border-top: 0; }
.transcript-who { display: flex; grid-area: who; align-items: center; gap: 8px; flex-wrap: wrap; }
.transcript-speaker { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; color: var(--lime); font-size: 12px; font-weight: 700; text-align: left; cursor: pointer; }
.transcript-speaker:hover { text-decoration: underline; }
.muted-tag { color: #f5a397; font: 700 10px var(--font-mono); letter-spacing: .14em; }
.transcript-when { display: flex; grid-area: when; align-items: center; gap: 2px; }
.transcript-time { width: 62px; padding: 2px 4px; border: 1px solid transparent; border-radius: 4px; outline: 0; background: transparent; color: var(--ink-subtle); font: 400 11px var(--font-mono); }
.transcript-time:hover { border-color: var(--hairline); }
.transcript-time:focus { border-color: var(--lime); background: var(--well); color: var(--ink); }
.transcript-when .dash { color: var(--ink-subtle); font-size: 11px; }
.transcript-body { grid-area: text; min-width: 0; }
.transcript-body input[data-text] { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); outline: 0; background: var(--well); color: var(--ink); font-size: 14px; }
.transcript-body input[data-text]:focus { border-color: var(--lime); }
.transcript-words { display: block; font-size: 14px; line-height: 24px; user-select: none; -webkit-user-select: none; }
.transcript-tail { display: flex; grid-area: tools; align-items: flex-start; gap: 2px; }
.transcript-meta { min-width: 40px; padding-top: 6px; color: var(--ink-subtle); font: 400 11px var(--font-mono); text-align: right; }
.transcript-meta.low { color: var(--amber); }
.line-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--ink-subtle); }
.line-btn:hover { background: var(--surface-raised); color: var(--ink); }
.line-btn.remove:hover { color: var(--coral); }
.transcript-line.cut .transcript-words, .transcript-line.cut input[data-text] { color: var(--ink-subtle); text-decoration: line-through; }
.transcript-line.cut .transcript-speaker { color: var(--ink-subtle); }
.transcript-line.uncertain .transcript-words { text-decoration: underline dotted var(--ink-subtle); text-underline-offset: 4px; }
.word { padding: 1px 1px; border-radius: 4px; cursor: pointer; }
.word:hover { background: var(--surface-raised); }
.word.approximate { text-decoration: underline dotted var(--hairline-strong); text-underline-offset: 4px; }
.word.selected { background: rgba(200, 245, 106, .22); color: var(--ink); }
.word.current { outline: 1px solid var(--lime); outline-offset: 1px; }
.word.muted { color: #f5a397; text-decoration: line-through; text-decoration-color: rgba(240, 122, 106, .7); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 20px; color: var(--ink-subtle); font-size: 12px; }
.add-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 12px; border-top: 1px solid var(--hairline); }
.add-row .input { width: auto; min-width: 160px; height: 32px; }
.add-row .history { display: flex; gap: 4px; margin-left: auto; }
.selection-bar { position: sticky; top: 8px; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--lime-line); border-radius: var(--radius-md); background: var(--surface-raised); font-size: 12px; }
.selection-bar .transcript-time { width: 72px; height: 32px; padding: 0 8px; border-color: var(--hairline); background: var(--surface); color: var(--ink); font-size: 12px; }
.selection-length { color: var(--ink-subtle); font: 400 11px var(--font-mono); }
.selection-bar .divider { width: 1px; height: 20px; background: var(--hairline); }
.selection-tracks { display: inline-flex; flex-wrap: wrap; gap: 12px; color: var(--ink-muted); }
.selection-tracks label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.selection-tracks input { width: 16px; height: 16px; margin: 0; }
.selection-actions { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.rec-item { display: flex; flex-direction: column; gap: 12px; padding: 14px 0; border-top: 1px solid var(--hairline); }
.rec-item:first-of-type { border-top: 0; padding-top: 0; }
.rec-row { display: flex; align-items: center; gap: 10px; }
.rec-row > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.rec-row b { font-size: 13px; }
.rec-row small { color: var(--ink-subtle); font: 400 11px var(--font-mono); }
.offset-row { display: flex; gap: 6px; }
.offset-row .input { flex: 1; }
.clip-card { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--hairline); border-radius: var(--radius-md); background: var(--well); }
.clip-card .row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.clip-card .row b { font-size: 14px; }
.clip-card blockquote { margin: 0; color: var(--ink); font-size: 13px; line-height: 20px; }
.clip-card .why { color: var(--ink-muted); font-size: 12px; }
.clip-card .times { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.clip-card .times label, .clip-card .field-sm { display: flex; flex-direction: column; gap: 4px; }
.clip-card .actions { display: flex; gap: 6px; flex-wrap: wrap; }
.clip-card.approved { border-color: var(--lime-line); }
.export-group { display: flex; flex-direction: column; gap: 8px; }
.export-group .eyebrow { color: var(--ink-subtle); font-size: 10px; }
.export-group .buttons { display: flex; gap: 8px; flex-wrap: wrap; }
.export-group .buttons .btn { flex: 1; }
.check-sm { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.check-sm input { width: 16px; height: 16px; margin: 0; }
.export-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0; border-top: 1px solid var(--hairline); font-size: 12px; }
.export-row a { font-weight: 700; }
.export-row small { color: var(--ink-subtle); font-weight: 400; }

/* Data & deletion */
.data-table { overflow-x: auto; }
.data-table table { width: 100%; border-collapse: collapse; }
.data-table th { padding: 0 12px 10px 0; color: var(--ink-subtle); font: 700 10px var(--font-mono); letter-spacing: .14em; text-align: left; text-transform: uppercase; }
.data-table td { padding: 12px 12px 12px 0; border-top: 1px solid var(--hairline); font-size: 13px; vertical-align: middle; }
.data-table td span { color: var(--ink-subtle); }
.data-table .yes { color: var(--lime); font-weight: 700; }
.data-table .no { color: var(--ink-muted); }
.switch-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 24px; }
.switch-card > div { display: flex; flex-direction: column; gap: 6px; }
.switch-card p { color: var(--ink-muted); font-size: 13px; }
.retention { display: flex; flex-direction: column; margin: 0; }
.retention > div { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--hairline); }
.retention dt b { font-size: 13px; }
.retention dt small { display: block; color: var(--ink-subtle); font-size: 12px; }
.retention dd { margin: 0; font: 400 13px var(--font-mono); text-align: right; }
.delete-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-color: #4a2a24; }
.delete-card h2 { color: var(--coral); }
.delete-card p { color: var(--ink-muted); font-size: 13px; }
.delete-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.delete-list li { padding: 6px 10px; border: 1px solid var(--hairline); border-radius: var(--radius-sm); background: var(--well); color: var(--ink-muted); font-size: 12px; }
.delete-list .mono { color: var(--ink); }
.delete-confirm { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.delete-confirm .field { flex: 1; min-width: 220px; }
.activity { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.activity li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-top: 1px solid var(--hairline); font-size: 13px; }
.activity li .mono { color: var(--ink-subtle); font-size: 11px; }

/* Toasts and dialogs */
#toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 20; display: grid; gap: 8px; }
.toast { max-width: min(420px, calc(100vw - 28px)); padding: 12px 16px; border: 1px solid var(--lime-line); border-radius: var(--radius-md); background: #1c2419; color: var(--ink); box-shadow: 0 10px 35px #0008; font-size: 13px; line-height: 20px; animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 50% { box-shadow: 0 0 0 7px rgba(200, 245, 106, .08); } }

@media (max-width: 860px) {
  .sidebar { flex-basis: 100%; max-width: none; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 16px; border-right: 0; border-bottom: 1px solid var(--hairline); }
  .sidebar .nav-group { flex-direction: row; flex-wrap: wrap; }
  .sidebar .nav-group .eyebrow, .help-card { display: none; }
  .sidebar .nav-item { width: auto; height: 38px; }
  .sidebar-foot { margin: 0 0 0 auto; }
  .profile-copy { display: none; }
}
@media (max-width: 640px) {
  .page-head h1 { font-size: 34px; line-height: 38px; }
  .guest-main h1 { font-size: 30px; line-height: 34px; }
  .episode-meta, .episode-status { display: none; }
  .transcript-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "who tools" "when tools" "text text"; }
  .listen .input { width: 100%; }
  .listen { flex: 1 1 100%; }
  .room-footer .output { margin-left: 0; }
  .progress { grid-template-columns: repeat(2, 1fr); }
  .switch-card { flex-direction: column; }
}

.panel .status, .track-card .status { white-space: normal; }
.room-aside .link-row { flex-direction: column; }
.room-aside .link-meta { flex-direction: column; align-items: flex-start; }
