/* Type: one family for everything. Segoe UI Variable (Windows 11) with its Display and Text optical sizes, the system
   font elsewhere. Headings and body then share letterforms, which reads calmer than a second display face. */
:root{
  color-scheme:light;
  --bg:#e9eff3;--paper:#ffffff;--paper-2:#f5f8fa;--paper-3:#eaf0f4;--line:#d6e0e7;--line-strong:#b9cad6;
  --ink:#172f44;--text:#243d50;--muted:#5f7686;--faint:#8a9cab;
  --accent:#265f91;--accent-ink:#193a56;--accent-soft:#e3edf6;
  --live:#137763;--live-soft:#dff0ea;--record:#b8372e;--record-soft:#f9e6e3;--warn:#8a6417;--warn-soft:#fff4dc;
  --focus:#e9b950;--shadow:0 10px 30px rgba(23,47,68,.08);
  --sp-1:#2c618e;--sp-1-bg:#e3eef8;--sp-2:#26725c;--sp-2-bg:#dff0ea;--sp-3:#74509a;--sp-3-bg:#ece4f6;--sp-4:#99642f;--sp-4-bg:#f8eadb;--sp-5:#a53a5a;--sp-5-bg:#fae4ea;--sp-6:#1f6f7a;--sp-6-bg:#dcf0f2;
  --display:"Segoe UI Variable Display","Segoe UI",system-ui,-apple-system,"SF Pro Display",sans-serif;--body:"Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,"SF Pro Text",sans-serif;--mono:"Cascadia Mono",Consolas,ui-monospace,SFMono-Regular,Menlo,monospace;
  --titlebar:46px;--rail:276px;--radius:10px;
}
/* Medium: a warm, low-glare tone between light and dark. Paper stays paper, so the parts of the app keep their edges. */
:root[data-theme="medium"]{
  color-scheme:light;
  --bg:#d3cfc6;--paper:#e8e4db;--paper-2:#e0dbd1;--paper-3:#d6d0c5;--line:#c3bcae;--line-strong:#a99e8d;
  --ink:#27261f;--text:#3a382f;--muted:#64604f;--faint:#857f72;
  --accent:#2f6180;--accent-ink:#244a62;--accent-soft:#cfd8db;
  --live:#2b6f57;--live-soft:#cfdfd3;--record:#a8463a;--record-soft:#e9d3cb;--warn:#7f5c12;--warn-soft:#eadfbf;
  --focus:#cf9f36;--shadow:0 10px 30px rgba(50,40,20,.12);
  --sp-1:#2f5f84;--sp-1-bg:#d5dde3;--sp-2:#2e6a53;--sp-2-bg:#d2dfd3;--sp-3:#6a4d8e;--sp-3-bg:#ddd5e3;--sp-4:#8d5f2c;--sp-4-bg:#e6d8c6;--sp-5:#9a3c57;--sp-5-bg:#e6d2d6;--sp-6:#226b74;--sp-6-bg:#cfdedf;
  --privacy:#634a9e;--privacy-soft:#ddd6e6;
}
:root[data-theme="dark"]{
  color-scheme:dark;
  --bg:#0d1a26;--paper:#142432;--paper-2:#182a3a;--paper-3:#1e3243;--line:#243c50;--line-strong:#34516a;
  --ink:#eef4f8;--text:#d7e3ec;--muted:#95abbd;--faint:#6d8597;
  --accent:#7fb3e2;--accent-ink:#bcd8f0;--accent-soft:#1d3850;
  --live:#5fcfae;--live-soft:#15382f;--record:#ef6b5f;--record-soft:#45211e;--warn:#f1cf7a;--warn-soft:#3a3019;
  --focus:#f3c95c;--shadow:0 12px 36px rgba(0,0,0,.45);
  --sp-1:#9cc6ec;--sp-1-bg:#1d3850;--sp-2:#8fdcc4;--sp-2-bg:#17433a;--sp-3:#c9b2ea;--sp-3-bg:#352a4d;--sp-4:#e8bd84;--sp-4-bg:#45311c;--sp-5:#f0a3b9;--sp-5-bg:#4a2432;--sp-6:#8fd8e2;--sp-6-bg:#163d44;
}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){
  color-scheme:dark;
  --bg:#0d1a26;--paper:#142432;--paper-2:#182a3a;--paper-3:#1e3243;--line:#243c50;--line-strong:#34516a;
  --ink:#eef4f8;--text:#d7e3ec;--muted:#95abbd;--faint:#6d8597;
  --accent:#7fb3e2;--accent-ink:#bcd8f0;--accent-soft:#1d3850;
  --live:#5fcfae;--live-soft:#15382f;--record:#ef6b5f;--record-soft:#45211e;--warn:#f1cf7a;--warn-soft:#3a3019;
  --focus:#f3c95c;--shadow:0 12px 36px rgba(0,0,0,.45);
  --sp-1:#9cc6ec;--sp-1-bg:#1d3850;--sp-2:#8fdcc4;--sp-2-bg:#17433a;--sp-3:#c9b2ea;--sp-3-bg:#352a4d;--sp-4:#e8bd84;--sp-4-bg:#45311c;--sp-5:#f0a3b9;--sp-5-bg:#4a2432;--sp-6:#8fd8e2;--sp-6-bg:#163d44;
}}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:var(--body);font-size:14px;color:var(--text);background:var(--bg);font-synthesis:none;font-optical-sizing:auto;-webkit-font-smoothing:antialiased;display:grid;grid-template-rows:var(--titlebar) minmax(0,1fr) auto;overflow:hidden}
button,select,input{font:inherit;color:inherit}
button,a,select,input,label{touch-action:manipulation}
p{margin:0;line-height:1.55}
h1,h2,h3{margin:0;font-family:var(--display);font-weight:600;letter-spacing:-.01em;color:var(--ink)}
a{color:var(--accent)}
[hidden]{display:none!important}
.sr-only{position:absolute;clip:rect(0,0,0,0);width:1px;height:1px;overflow:hidden}
kbd{font-family:var(--mono);font-size:11px;background:var(--paper-3);border:1px solid var(--line-strong);border-bottom-width:2px;border-radius:5px;padding:1px 6px;color:var(--ink)}
:is(button,a,input,select,[tabindex]):focus-visible,.file-button:focus-within{outline:3px solid var(--focus);outline-offset:2px}
::selection{background:var(--accent-soft);color:var(--ink)}

/* Buttons */
button{border:1px solid transparent;border-radius:8px;background:transparent;padding:8px 14px;cursor:pointer;font-weight:600;line-height:1.2;transition:background .15s,color .15s,border-color .15s,transform .1s}
button:disabled{opacity:.45;cursor:not-allowed}
.primary{background:var(--accent-ink);color:#fff;border-color:var(--accent-ink)}
:root[data-theme="dark"] .primary{color:#0d1a26}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) .primary{color:#0d1a26}}
.primary:hover:not(:disabled){filter:brightness(1.12)}
.ghost{background:var(--paper);border-color:var(--line-strong);color:var(--ink)}
.ghost:hover:not(:disabled){background:var(--paper-3)}
.danger{background:var(--record);color:#fff;border-color:var(--record)}
.small{padding:7px 12px;font-size:13px}
.text-button{border:0;padding:0;background:transparent;color:var(--accent);font-size:12px;font-weight:600;text-align:left}
.text-button:hover:not(:disabled){text-decoration:underline}
.text-button.inline{display:inline;font:inherit}
.icon-button{width:34px;height:34px;padding:0;display:inline-grid;place-items:center;border-radius:8px;color:var(--muted)}
.icon-button:hover:not(:disabled){background:var(--paper-3);color:var(--ink)}
.icon-button svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.icon-button svg [class$=glyph]{fill:currentColor;stroke:none}
select,input:not([type=checkbox],[type=radio]){background:var(--paper);border:1px solid var(--line-strong);border-radius:8px;padding:8px 10px;min-width:0;color:var(--ink)}
select:disabled,input:disabled{opacity:.5}
progress{width:100%;height:5px;accent-color:var(--accent);display:block;border:0;border-radius:3px;overflow:hidden;background:var(--paper-3)}
progress::-webkit-progress-bar{background:var(--paper-3)}
.hint{font-size:12px;color:var(--muted);line-height:1.5}
.hint.mono{font-family:var(--mono);font-size:11.5px;overflow-wrap:anywhere}
.icon-only{width:34px;padding:0;display:inline-grid;place-items:center;flex:none}
.icon-only svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:var(--accent)}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.row.end{justify-content:flex-end}
.pad{padding:0 22px 20px}
.eyebrow{font-size:11px;letter-spacing:.14em;text-transform:uppercase;font-weight:700;color:var(--accent)}

/* Title bar: becomes the window strip when installed with window-controls-overlay */
.titlebar{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;height:var(--titlebar);padding:0 10px 0 8px;background:var(--paper);border-bottom:1px solid var(--line);-webkit-app-region:drag;app-region:drag;position:relative;z-index:5}
.titlebar :is(button,a,input){-webkit-app-region:no-drag;app-region:no-drag}
.titlebar-left,.titlebar-right{display:flex;align-items:center;gap:6px}
.titlebar-right{justify-content:flex-end}
.titlebar-center{display:flex;justify-content:center}
@media(display-mode:window-controls-overlay){
  .titlebar{height:env(titlebar-area-height,var(--titlebar));width:env(titlebar-area-width,100%);margin-left:env(titlebar-area-x,0);padding-right:8px}
  body{grid-template-rows:env(titlebar-area-height,var(--titlebar)) minmax(0,1fr) auto}
}
.tb-button,.tb-switch{display:inline-flex;align-items:center;gap:7px;height:30px;padding:0 10px;border-radius:8px;font-size:13px;font-weight:600;color:var(--muted);border:1px solid transparent}
.tb-button svg,.tb-switch svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
.tb-button:hover{background:var(--paper-3);color:var(--ink)}
/* The privacy switch: a pill that sits inside the strip (28px in a 46px bar, or in the 33px window-controls strip),
   with a small state lamp instead of a second boxed label. */
.tb-switch{height:28px;padding:0 5px 0 9px;border-radius:14px;border-color:var(--line);background:var(--paper-2);color:var(--muted);margin-right:4px;transition:background .15s,border-color .15s,color .15s}
.tb-switch:hover{border-color:var(--privacy);color:var(--ink)}
.tb-state{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;padding:0 7px 0 6px;height:18px;border-radius:9px;background:var(--paper);color:var(--faint);border:1px solid var(--line)}
.tb-state::before{content:"";width:6px;height:6px;border-radius:50%;background:var(--faint)}
.tb-switch[aria-pressed=true]{background:var(--privacy-soft);border-color:var(--privacy);color:var(--privacy)}
.tb-switch[aria-pressed=true] .tb-state{background:var(--privacy);color:#fff;border-color:var(--privacy)}
.tb-switch[aria-pressed=true] .tb-state::before{background:#fff}
@media(display-mode:window-controls-overlay){.tb-switch{height:26px}.tb-button{height:28px}}
.brand{display:flex;align-items:center;gap:8px;font-family:var(--display);font-size:19px;font-weight:650;letter-spacing:-.02em;color:var(--ink);text-decoration:none;padding:0 6px}
.brand svg{width:20px;height:24px;stroke:var(--accent);fill:none;stroke-width:2.6;stroke-linecap:round}
.pill{display:inline-flex;align-items:center;gap:7px;padding:5px 11px;border-radius:30px;background:var(--paper-3);color:var(--muted);font-size:12px;font-weight:600;white-space:nowrap;max-width:50vw;overflow:hidden;text-overflow:ellipsis}
.pill::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--faint);flex:none}
.pill.ready{background:var(--live-soft);color:var(--live)}.pill.ready::before{background:var(--live)}
.pill.live{background:var(--record-soft);color:var(--record)}.pill.live::before{background:var(--record);animation:pulse 1.2s ease-in-out infinite}
.pill.busy::before{background:var(--accent);animation:pulse 1.2s ease-in-out infinite}
.pill.warn{background:var(--warn-soft);color:var(--warn)}.pill.warn::before{background:var(--warn)}
@keyframes pulse{0%,100%{opacity:1}50%{opacity:.25}}

/* Application area */
.app{display:grid;grid-template-columns:var(--rail) minmax(0,1fr);min-height:0;position:relative;transition:grid-template-columns .2s ease}
body.rail-hidden .app{grid-template-columns:0 minmax(0,1fr)}
.rail{display:flex;flex-direction:column;min-height:0;background:var(--paper-2);border-right:1px solid var(--line);overflow:hidden;width:var(--rail)}
body.rail-hidden .rail{visibility:hidden}
.rail-head{padding:14px 14px 10px;display:flex;flex-direction:column;gap:10px}
.rail-actions{display:flex;gap:8px}
.rail-head .primary{display:flex;align-items:center;gap:8px;justify-content:center;flex:1}
.rail-head .primary svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.rail-head input{font-size:13px;padding:7px 10px;background:var(--paper)}
.session-list{flex:1;overflow-y:auto;padding:0 8px 12px;scrollbar-width:thin}
.session-group{font-size:11px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;color:var(--faint);padding:14px 8px 6px}
.session{display:block;width:100%;text-align:left;padding:9px 10px;border-radius:9px;border:1px solid transparent;margin-bottom:2px;font-weight:500;color:var(--text)}
.session:hover{background:var(--paper-3)}
.session[aria-current="true"]{background:var(--paper);border-color:var(--line);box-shadow:0 1px 2px rgba(0,0,0,.05)}
.session-title{display:block;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}
.session-meta{display:flex;gap:6px;font-size:11px;color:var(--muted);margin-top:3px;font-variant-numeric:tabular-nums}
.session-meta .dot::before{content:"·";margin-right:6px}
.session-preview{display:block;font-size:12px;color:var(--muted);margin-top:4px;line-height:1.4;max-height:2.8em;overflow:hidden}
.session.live .session-title::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--record);margin-right:7px;animation:pulse 1.2s infinite}
.rail-empty{padding:28px 14px;font-size:13px;color:var(--muted);line-height:1.5}
.options{border-top:1px solid var(--line);background:var(--paper-2);flex:none;display:flex;flex-direction:column;min-height:0}
.options-head{display:flex;align-items:center;gap:10px;width:100%;padding:11px 14px;border-radius:0;text-align:left;color:var(--ink)}
.options-head:hover{background:var(--paper-3)}
.options-head>svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:var(--accent);flex:none}
.options-head .chevron{color:var(--faint);transition:transform .2s}
.options-head[aria-expanded=false] .chevron{transform:rotate(-90deg)}
.options-text{display:flex;flex-direction:column;flex:1;min-width:0;line-height:1.2}
.options-text>span:first-child{font-size:13px;font-weight:700}
/* Collapsed: the current setup as small tokens, so it is readable without taking the room of the full form. */
.options-summary{display:flex;flex-wrap:wrap;gap:4px;margin-top:5px}
.options-summary:empty{display:none}
.options-head[aria-expanded=true] .options-summary{display:none}
.options-summary span{display:inline-flex;align-items:center;gap:4px;font-size:11px;font-weight:600;color:var(--muted);background:var(--paper);border:1px solid var(--line);border-radius:6px;padding:1px 6px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.options-summary span.on{color:var(--live);border-color:color-mix(in srgb,var(--live) 35%,transparent);background:var(--live-soft)}
.options-summary span.off{color:var(--faint);text-decoration:line-through}
.options-body{display:flex;flex-direction:column;gap:6px;padding:2px 12px 12px;overflow-y:auto;scrollbar-width:thin}
.options-body .hint{padding:4px 2px 0;font-size:11.5px}
.opt{position:relative;display:grid;grid-template-columns:16px auto minmax(0,1fr);align-items:center;gap:8px;border:1px solid var(--line-strong);border-radius:9px;padding:0 6px 0 10px;background:var(--paper);height:36px;font-size:12px;color:var(--muted);font-weight:600;transition:border-color .15s,box-shadow .15s}
.opt:hover{border-color:var(--accent)}
.opt-icon{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:var(--accent)}
.opt-label{white-space:nowrap}
.opt select{border:0;background:transparent;padding:0 20px 0 2px;height:34px;font-size:13px;font-weight:600;color:var(--ink);width:100%;text-overflow:ellipsis;appearance:none;-webkit-appearance:none;cursor:pointer;text-align:right;direction:rtl}
.opt select option{direction:ltr;text-align:left}
.opt select:focus-visible{outline:none}
.opt:has(select)::after{content:"";position:absolute;right:11px;top:50%;width:6px;height:6px;border-right:1.6px solid var(--faint);border-bottom:1.6px solid var(--faint);transform:translateY(-70%) rotate(45deg);pointer-events:none}
.opt:has(select:disabled,input:disabled){opacity:.5}
.opt:focus-within{outline:3px solid var(--focus);outline-offset:2px}
#source-chip .opt-icon{display:none}
#source-chip[data-value=mic] [data-for=mic],#source-chip[data-value=system] [data-for=system],#source-chip[data-value=both] [data-for=both]{display:block}
.opt-toggle{cursor:pointer;padding-right:10px}
.opt-toggle .switch{justify-self:end}
.opt-toggle:has(input:checked) .opt-label{color:var(--ink)}
.opt-toggle:has(input:checked) .opt-icon{color:var(--live)}
.opt-input{grid-template-columns:16px minmax(0,1fr);cursor:text;padding-right:10px}
.opt-input .terms{min-width:0;border:0;background:transparent;height:34px;padding:0;font-size:12.5px;color:var(--ink);border-radius:0;width:100%}
.opt-input .terms:focus{outline:none}
.opt-input:focus-within{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset}
.opt-input .terms::placeholder{color:var(--faint)}
body.privacy .options{border-top-color:var(--privacy-soft)}
.rail-foot{padding:10px 16px;border-top:1px solid var(--line);font-size:11px;color:var(--faint)}
.rail-scrim{display:none}

.stage{display:flex;flex-direction:column;min-height:0;min-width:0;position:relative;background:var(--bg)}
.workspace{display:flex;flex-direction:column;min-height:0;flex:1}
.stage-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:18px 28px 10px}
.stage-title{min-width:0;flex:1}
.title-input{width:100%;border:1px solid transparent;background:transparent;font-family:var(--display);font-size:22px;font-weight:600;letter-spacing:-.015em;color:var(--ink);padding:2px 6px;margin-left:-6px;border-radius:7px;text-overflow:ellipsis}
.title-input:hover{border-color:var(--line)}
.title-input:focus{background:var(--paper);border-color:var(--line-strong);outline:none}
.title-input::placeholder{color:var(--faint)}
.stage-meta{display:flex;gap:12px;font-size:12px;color:var(--muted);margin-top:4px;flex-wrap:wrap;font-variant-numeric:tabular-nums}
.stage-meta span:empty{display:none}
.stage-meta .saved{color:var(--live)}
.stage-tools{display:flex;gap:8px;align-items:center;flex:none;padding-top:4px}
.stage-tools .ghost{font-size:13px;padding:7px 12px}
/* Export: one button, one menu beneath it. The last format is remembered and is what Ctrl+S repeats. */
.export-group{position:relative}
.menu-button .chevron{width:14px;height:14px;color:var(--faint);margin:0 -3px 0 -2px;transition:transform .15s}
.menu-button[aria-expanded=true]{background:var(--paper-3)}
.menu-button[aria-expanded=true] .chevron{transform:rotate(180deg)}
.menu{position:absolute;top:calc(100% + 6px);right:0;z-index:25;min-width:330px;padding:6px;background:var(--paper);border:1px solid var(--line-strong);border-radius:12px;box-shadow:var(--shadow);display:flex;flex-direction:column;gap:1px;animation:rise .12s ease-out}
.menu-heading{font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;font-weight:700;color:var(--faint);padding:6px 10px 4px}
.menu-sep{height:1px;background:var(--line);margin:5px 4px}
.menu [role^=menuitem]{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:8px;width:100%;text-align:left;padding:7px 10px 7px 8px;border-radius:8px;font-weight:500;font-size:13px;color:var(--text)}
.menu [role^=menuitem]:hover:not(:disabled),.menu [role^=menuitem]:focus-visible{background:var(--paper-3);color:var(--ink);outline:none}
.menu [role^=menuitem]:disabled{opacity:.45}
.menu-check{width:16px;height:16px;display:grid;place-items:center;color:var(--accent)}
.menu [aria-checked=true] .menu-check::before{content:"";width:8px;height:5px;border-left:2px solid currentColor;border-bottom:2px solid currentColor;transform:translateY(-1px) rotate(-45deg)}
.menu [aria-checked=true] .menu-label{font-weight:600;color:var(--ink)}
.menu-label{display:flex;flex-direction:column;gap:1px;min-width:0}
.menu-hint{font-size:11px;color:var(--muted);font-weight:400;line-height:1.35;white-space:normal}
.menu-ext{font-family:var(--mono);font-size:11px;color:var(--faint)}
.search-box{display:flex;align-items:center;gap:8px;background:var(--paper);border:1px solid var(--line-strong);border-radius:8px;padding:0 10px 0 0}
.search-box input{border:0;background:transparent;width:200px;font-size:13px}
.search-box span{font-size:11px;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.notice{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 28px 8px;font-size:13px;background:var(--warn-soft);color:var(--warn);border:1px solid color-mix(in srgb,var(--warn) 25%,transparent);border-radius:9px;padding:9px 6px 9px 14px}
.notice.error{background:var(--record-soft);color:var(--record);border-color:color-mix(in srgb,var(--record) 30%,transparent)}
.notice-body{flex:1;min-width:0}.notice-body progress{margin-top:7px;height:4px;accent-color:var(--warn)}.notice .icon-button{width:28px;height:28px;color:inherit;font-size:18px}

/* Transcript */
.transcript{flex:1;min-height:0;overflow-y:auto;padding:6px 28px 40px;scroll-behavior:smooth;scrollbar-width:thin;outline:none}
.transcript:focus-visible{outline:none;box-shadow:inset 0 0 0 3px var(--focus)}
.empty{height:100%;min-height:260px;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;color:var(--muted)}
.empty h2{font-size:24px;font-weight:500;margin-top:22px;color:var(--ink)}
.empty p{font-size:13px;margin-top:10px;max-width:420px}
.empty kbd{margin:0 2px}
.privacy-note{font-size:11px;letter-spacing:.02em;margin-top:26px;color:var(--faint)}
.empty-wave{display:flex;align-items:center;gap:6px;height:48px}
.empty-wave i{display:block;width:4px;border-radius:4px;background:var(--line-strong);height:15px}
.empty-wave i:nth-child(2n){height:32px}.empty-wave i:nth-child(3n){height:46px}.empty-wave i:nth-child(5){height:24px}
.listening{padding:30px 0;color:var(--muted);font-size:13px;display:flex;align-items:center;gap:12px}
.listening i{width:8px;height:8px;border-radius:50%;background:var(--record);animation:pulse 1.2s infinite}
.line{display:grid;grid-template-columns:60px minmax(0,1fr);gap:12px;padding:9px 10px 9px 6px;margin:0 -10px 0 -6px;border-radius:9px;border-left:3px solid transparent;transition:background .15s,border-color .15s}
.line.current{background:var(--paper);border-left-color:var(--accent);box-shadow:var(--shadow)}
.line.partial .line-text{color:var(--muted)}
.line.partial .line-text::after{content:"";display:inline-block;width:2px;height:1em;background:var(--record);margin-left:3px;vertical-align:-2px;animation:pulse 1s infinite}
.line.hidden-by-search{display:none}
.line-time{font-family:var(--mono);background:transparent;border:0;color:var(--faint);padding:3px 0;font-size:11.5px;text-align:left;align-self:start;font-variant-numeric:tabular-nums;border-radius:4px}
.line-time:hover:not(:disabled){color:var(--accent);text-decoration:underline}
.line-body{min-width:0}
.line-head{display:flex;align-items:center;gap:8px;margin-bottom:3px;flex-wrap:wrap}
/* Speaker chips: a shape per speaker in front of the label, so speakers are told apart before the label is read. */
.speaker{display:inline-flex;align-items:center;gap:5px;border:0;background:var(--sp-1-bg);color:var(--sp-1);font-size:11.5px;font-weight:700;padding:3px 8px 3px 6px;border-radius:6px;letter-spacing:.01em}
.speaker[data-color="1"],.turns [data-color="1"]{background:var(--sp-2-bg);color:var(--sp-2)}.speaker[data-color="2"],.turns [data-color="2"]{background:var(--sp-3-bg);color:var(--sp-3)}.speaker[data-color="3"],.turns [data-color="3"]{background:var(--sp-4-bg);color:var(--sp-4)}.speaker[data-color="4"],.turns [data-color="4"]{background:var(--sp-5-bg);color:var(--sp-5)}.speaker[data-color="5"],.turns [data-color="5"]{background:var(--sp-6-bg);color:var(--sp-6)}
.speaker-mark{width:11px;height:11px;flex:none;fill:currentColor;stroke:none}
.speaker.multi{background:var(--paper-3);color:var(--muted)}
.turns [data-color="0"]{background:var(--sp-1-bg);color:var(--sp-1)}
.turns .speaker-mark{width:9px;height:9px;margin-right:4px;vertical-align:-1px}
.speaker:hover:not(:disabled){filter:brightness(.92)}
.speaker:disabled{opacity:1;cursor:default}
.edited{font-size:10px;color:var(--faint);font-weight:600;text-transform:uppercase;letter-spacing:.08em}
.line-text{font-size:15px;line-height:1.7;color:var(--text);white-space:pre-wrap;overflow-wrap:anywhere;border-radius:6px;padding:0 4px;margin:0 -4px;border:1px solid transparent}
.line-text[contenteditable]{cursor:text}
.line-text[contenteditable]:hover{border-color:var(--line)}
.line-text:focus{background:var(--paper);border-color:var(--line-strong);outline:none;box-shadow:var(--shadow)}
.line-text mark{background:var(--focus);color:#1a1a1a;border-radius:3px;padding:0 1px}
.turns{display:flex;flex-wrap:wrap;gap:6px;font-size:11px;margin-top:6px;color:var(--muted)}
.turns button{font-size:11px;padding:2px 7px;border-radius:5px;background:var(--paper-3);color:var(--muted);font-weight:600}
.turns button:hover{color:var(--ink)}
.drop-overlay{position:absolute;inset:10px;border:2px dashed var(--accent);border-radius:14px;background:color-mix(in srgb,var(--accent-soft) 85%,transparent);display:grid;place-items:center;font-family:var(--display);font-size:26px;color:var(--accent-ink);z-index:4;pointer-events:none}

/* First run */
.setup{flex:1;overflow-y:auto;display:grid;place-items:center;padding:40px 28px}
.setup-inner{max-width:680px;width:100%;background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:40px 44px;box-shadow:var(--shadow)}
.setup h1{font-size:clamp(24px,3vw,34px);line-height:1.2;font-weight:600;margin:12px 0 14px;letter-spacing:-.02em}
.lede{font-size:15px;color:var(--muted);max-width:560px}
.profile-cards{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:26px 0 20px}
.profile-card{position:relative;display:flex;flex-direction:column;gap:4px;padding:16px 16px 14px;border:1px solid var(--line-strong);border-radius:12px;background:var(--paper-2);cursor:pointer;transition:border-color .15s,box-shadow .15s}
.profile-card:hover{border-color:var(--accent)}
.profile-card:has(input:checked){border-color:var(--accent);box-shadow:0 0 0 1px var(--accent) inset;background:var(--paper)}
.profile-card input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.profile-card:has(input:focus-visible){outline:3px solid var(--focus);outline-offset:2px}
.profile-name{font-family:var(--display);font-size:18px;font-weight:650;color:var(--ink)}
.profile-size{font-family:var(--mono);font-size:12px;color:var(--accent)}
.profile-note{font-size:12.5px;color:var(--muted);line-height:1.5;margin-top:4px}
.profile-state{font-size:11px;font-weight:700;color:var(--live);margin-top:6px;min-height:1em}
.profile-cards.compact{margin:10px 0 12px}
.profile-cards.compact .profile-card{padding:12px 14px}
.setup-steps{list-style:none;margin:26px 0 20px;padding:0;display:flex;flex-direction:column;gap:8px}
.setup-step{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:12px;background:var(--paper-2)}
.step-mark{width:22px;height:22px;border-radius:50%;border:2px solid var(--line-strong);display:grid;place-items:center;font-size:12px;font-weight:800;color:#fff}
.setup-step[data-state=active] .step-mark{border-color:var(--accent);background:conic-gradient(var(--accent) 0 25%,transparent 0);animation:spin 1s linear infinite}
.setup-step[data-state=done] .step-mark{border-color:var(--live);background:var(--live)}
.setup-step[data-state=done] .step-mark::after{content:"✓"}
.setup-step[data-state=failed] .step-mark{border-color:var(--record);background:var(--record)}
.setup-step[data-state=failed] .step-mark::after{content:"!"}
.setup-step[data-state=later] .step-mark{border-style:dashed}
@keyframes spin{to{transform:rotate(360deg)}}
.step-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.step-text strong{font-size:14px;color:var(--ink)}
.step-note{font-size:12px;color:var(--muted);line-height:1.4}
.step-state{font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);white-space:nowrap;font-variant-numeric:tabular-nums}
.setup-step[data-state=done] .step-state{color:var(--live)}
.setup-step[data-state=active] .step-state{color:var(--accent)}
.setup-size{opacity:.8;font-weight:500}
.setup-actions{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.setup-actions .primary{padding:12px 22px;font-size:15px}
.setup-progress{margin-top:18px}
.setup-progress p{font-size:12px;color:var(--muted);margin-top:8px;font-variant-numeric:tabular-nums}
.setup-foot{font-size:12px;color:var(--faint);margin-top:22px}

/* Transport deck: the signature element. Waveform above, controls below. */
.deck{background:var(--paper);border-top:1px solid var(--line);padding:0 20px 12px;position:relative;z-index:3}
.wave-wrap{position:relative;height:56px;margin:0 -20px 8px;border-bottom:1px solid var(--line);background:var(--paper-2)}
#wave{width:100%;height:100%;display:block}
.wave-hit{position:absolute;inset:0;width:100%;height:100%;padding:0;border:0;border-radius:0;background:transparent;cursor:pointer}
.wave-hit:disabled{cursor:default;opacity:1}
.wave-time{position:absolute;bottom:4px;left:14px;font-family:var(--mono);font-size:11px;color:var(--muted);background:color-mix(in srgb,var(--paper-2) 80%,transparent);padding:1px 5px;border-radius:4px;pointer-events:none;font-variant-numeric:tabular-nums}
.wave-time.right{left:auto;right:14px}
/* One row: transport in the middle of attention, file actions to the right. Options live in the rail. */
.deck-row{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
/* Switches: one look everywhere (deck chip and settings rows). */
.switch{appearance:none;width:30px;height:17px;border-radius:10px;background:var(--line-strong);position:relative;margin:0;transition:background .15s;cursor:pointer;flex:none}
.switch::after{content:"";position:absolute;top:2px;left:2px;width:13px;height:13px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:transform .15s}
.switch:checked{background:var(--live)}
.switch:checked::after{transform:translateX(13px)}
.deck-center{display:flex;align-items:center;gap:14px}
.play{width:40px;height:40px;border-radius:50%;border:1px solid var(--line-strong);background:var(--paper);color:var(--ink)}
.play .pause-glyph{display:none}
.play.playing .pause-glyph{display:block}.play.playing .play-glyph{display:none}
.record{display:flex;align-items:center;gap:12px;padding:6px 20px 6px 6px;border-radius:40px;background:var(--accent-ink);color:#fff;border:0;min-width:200px;text-align:left}
:root[data-theme="dark"] .record{color:#0d1a26}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]) .record{color:#0d1a26}}
.record:hover:not(:disabled){filter:brightness(1.12)}
.record-ring{width:40px;height:40px;border-radius:50%;background:rgba(255,255,255,.14);display:grid;place-items:center;flex:none}
.record-core{width:14px;height:14px;border-radius:50%;background:#ff8a7a;transition:border-radius .2s,background .2s,transform .2s}
.record-text{display:flex;flex-direction:column;line-height:1.15}
#record-label{font-size:15px;font-weight:700}
.record-sub{font-size:11px;opacity:.75;font-weight:500;font-variant-numeric:tabular-nums}
.record.active{background:var(--record);color:#fff}
.record.active .record-core{border-radius:2px;background:#fff;transform:scale(.9)}
.record.active .record-ring{animation:ring 1.4s ease-out infinite}
@keyframes ring{0%{box-shadow:0 0 0 0 rgba(255,255,255,.35)}100%{box-shadow:0 0 0 12px rgba(255,255,255,0)}}
.record.finishing .record-core{background:var(--focus);border-radius:50%}
.level-wrap{width:6px;height:40px;border-radius:3px;background:var(--paper-3);overflow:hidden;display:flex;align-items:flex-end}
.level{width:100%;height:0;background:var(--live);transition:height .08s}
.level.hot{background:var(--record)}
/* Buttons that carry an icon next to their label */
.with-icon,.file-button{display:inline-flex;align-items:center;gap:7px}
.with-icon svg,.file-button svg{width:16px;height:16px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;color:var(--accent)}
.with-icon:disabled svg,.file-button:has(input:disabled) svg{color:inherit}
.file-button{position:relative;border-radius:8px;padding:7px 12px;font-size:13px;font-weight:600;cursor:pointer;border:1px solid var(--line-strong);background:var(--paper);color:var(--ink)}
.file-button:hover:not(:has(input:disabled)){background:var(--paper-3)}
.file-button:has(input:disabled){opacity:.45;cursor:not-allowed}
.file-button input{position:absolute;width:1px;height:1px;opacity:0}
.deck-right .ghost{font-size:13px;padding:7px 12px}
.icon-button svg .dot-glyph{fill:currentColor;stroke:none}

/* Sheets, popover, toasts */
.sheet{border:1px solid var(--line);border-radius:16px;padding:0;width:min(640px,calc(100vw - 32px));max-height:calc(100vh - 48px);background:var(--paper);color:var(--text);box-shadow:var(--shadow)}
.sheet.narrow{width:min(440px,calc(100vw - 32px))}
.sheet::backdrop{background:rgba(10,24,36,.45);backdrop-filter:blur(2px)}
.sheet-head{display:flex;justify-content:space-between;align-items:center;padding:16px 16px 12px 22px;border-bottom:1px solid var(--line);margin:0}
.sheet-head h2{font-size:18px}
.sheet-head .icon-button{font-size:22px;font-weight:400}
.sheet-body{padding:6px 22px 22px;overflow-y:auto;max-height:calc(100vh - 130px)}
.sheet-body section{padding:18px 0;border-bottom:1px solid var(--line)}
.sheet-body section:last-child{border-bottom:0}
.sheet-body h3{font-size:13px;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);font-family:var(--body);font-weight:700;margin-bottom:10px}
.sheet-body select{font-size:13px;min-width:220px}
.sheet-body .hint+.hint{margin-top:6px}
.sheet-body .row{margin-top:10px}
/* Settings: a navigation of topics on the left, one panel at a time on the right. */
.sheet.settings{width:min(840px,calc(100vw - 32px));height:min(600px,calc(100vh - 48px))}
.sheet.settings[open]{display:flex;flex-direction:column}
.sheet.settings .sheet-head{flex:none}
.settings-layout{display:grid;grid-template-columns:200px minmax(0,1fr);flex:1;min-height:0}
.settings-nav{display:flex;flex-direction:column;gap:2px;padding:12px 10px;border-right:1px solid var(--line);background:var(--paper-2);overflow-y:auto}
.settings-nav button{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:9px;font-size:13px;font-weight:600;color:var(--muted);text-align:left;width:100%}
.settings-nav button svg{width:18px;height:18px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.settings-nav button svg .dot-glyph{fill:currentColor;stroke:none}
.settings-nav button:hover{background:var(--paper-3);color:var(--ink)}
.settings-nav button[aria-selected=true]{background:var(--paper);color:var(--accent-ink);box-shadow:0 0 0 1px var(--line) inset,0 1px 2px rgba(0,0,0,.06)}
.settings-nav button[aria-selected=true] svg{color:var(--accent)}
.settings-panels{overflow-y:auto;padding:22px 26px 26px;min-height:0;scrollbar-width:thin}
.panel h3{font-size:18px;margin-bottom:6px}
.panel-lede{font-size:13px;color:var(--muted);margin-bottom:14px;max-width:56ch}
.panel .row{margin-top:14px}
.panel .setup-progress{margin-top:14px}
.panel #model-source,.panel #storage-detail{margin-top:12px}
.setting{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:14px 0}
.setting+.setting{border-top:1px solid var(--line)}
label.setting{cursor:pointer}
.setting-text{display:flex;flex-direction:column;gap:3px;min-width:0}
.setting-label{font-size:14px;font-weight:600;color:var(--ink)}
.setting .hint{max-width:46ch}
.setting>*:last-child{flex:none}
.row.nowrap{flex-wrap:nowrap}
.link-list{list-style:none;padding:0;margin:0 0 14px;display:flex;flex-direction:column;gap:8px;font-size:13px}
.link-list .text-button{font-size:13px}
.segmented{display:inline-flex;border:1px solid var(--line-strong);border-radius:8px;overflow:hidden}
.segmented label{position:relative}
.segmented input{position:absolute;opacity:0;inset:0;margin:0;cursor:pointer}
.segmented span{display:block;padding:7px 14px;font-size:13px;font-weight:600;color:var(--muted);cursor:pointer}
.segmented label+label span{border-left:1px solid var(--line-strong)}
.segmented input:checked+span{background:var(--accent-soft);color:var(--accent-ink)}
.check{display:flex;align-items:center;gap:8px;font-size:13px;margin-top:8px;cursor:pointer}
.shortcut-list{display:grid;grid-template-columns:auto 1fr;gap:10px 18px;padding:16px 22px 8px;margin:0;font-size:13px;align-items:center}
.shortcut-list dt{text-align:right;white-space:nowrap}
.shortcut-list dd{margin:0;color:var(--text)}
.popover{position:fixed;z-index:30;background:var(--paper);border:1px solid var(--line-strong);border-radius:12px;padding:14px;box-shadow:var(--shadow);width:260px;display:flex;flex-direction:column;gap:8px}
.popover label{font-size:12px;font-weight:600;color:var(--muted)}
.popover input{font-size:14px}
.toasts{position:fixed;bottom:150px;left:50%;transform:translateX(-50%);display:flex;flex-direction:column;gap:8px;z-index:40;pointer-events:none;width:min(480px,calc(100vw - 32px));align-items:center}
.toast{pointer-events:auto;background:var(--ink);color:var(--bg);padding:10px 16px;border-radius:10px;font-size:13px;font-weight:500;box-shadow:var(--shadow);display:flex;gap:14px;align-items:center;animation:rise .2s ease-out;max-width:100%}
.toast button{color:var(--focus);padding:2px 4px;font-weight:700;border-radius:4px}
.toast button:hover{background:rgba(255,255,255,.12)}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}

/* About page */
.about{max-width:780px;margin:50px auto;padding:0 25px;font-size:15px;line-height:1.8}
.about h1{font-size:36px;margin:20px 0}
.about h2{margin:30px 0 10px;font-size:20px}
.about p,.about li{margin-bottom:14px}
.about code{background:var(--paper-3);padding:1px 5px;border-radius:4px;font-family:var(--mono);font-size:13px}
body.page{display:block;overflow:auto}

/* Responsive */
@media(max-width:1100px){.stage-head{flex-direction:column;align-items:stretch}.stage-tools{justify-content:flex-end}}
@media(max-width:860px){
  :root{--rail:280px}
  .menu{position:fixed;left:16px;right:16px;top:auto;min-width:0}
  .app{grid-template-columns:minmax(0,1fr)}
  body.rail-hidden .app{grid-template-columns:minmax(0,1fr)}
  .rail{position:fixed;top:var(--titlebar);bottom:0;left:0;z-index:20;box-shadow:var(--shadow);transform:translateX(0);transition:transform .2s}
  body.rail-hidden .rail{transform:translateX(-100%)}
  .rail-scrim{display:block;position:fixed;inset:var(--titlebar) 0 0 0;background:rgba(10,24,36,.35);z-index:19}
  .stage-head,.notice{padding-left:16px;padding-right:16px;margin-left:0;margin-right:0}
  .notice{margin:0 16px 8px}
  .transcript{padding:4px 16px 30px}
  .line{grid-template-columns:48px minmax(0,1fr);gap:8px}
  .title-input{font-size:20px}
  .setup{padding:20px 14px}.setup-inner{padding:26px 22px}.profile-cards{grid-template-columns:1fr}
  .deck{padding:0 12px 10px}.wave-wrap{margin:0 -12px 8px;height:44px}
  .deck-row{justify-content:center;gap:10px}
  .deck-center{justify-content:center;flex-basis:100%}
  .deck-right{justify-content:center}
  .record{min-width:0;flex:1;max-width:320px}
  .tb-label{display:none}
  .tb-button,.tb-switch{padding:0 7px}
  .sheet.settings{height:calc(100vh - 32px)}
  .settings-layout{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}
  .settings-nav{flex-direction:row;overflow-x:auto;overflow-y:hidden;border-right:0;border-bottom:1px solid var(--line);padding:8px;scrollbar-width:none}
  .settings-nav button{flex-direction:column;gap:4px;padding:8px 10px;font-size:11px;flex:none;width:auto}
  .settings-panels{padding:18px 16px 22px}
  .setting{flex-direction:column;align-items:flex-start;gap:10px}
  .search-box input{width:120px}
  .pill{max-width:36vw}
  .toasts{bottom:auto;top:60px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important;animation:none!important}}

/* Privacy mode: the whole app wears a frame so the state is impossible to miss. */
.shield svg .shield-glyph{fill:none}
.shield[aria-pressed=true]{color:var(--privacy);background:var(--privacy-soft)}
.shield[aria-pressed=true] svg .shield-glyph{fill:color-mix(in srgb,var(--privacy) 22%,transparent)}
:root{--privacy:#6d4fb3;--privacy-soft:#ece6f8}
:root[data-theme="medium"]{--privacy:#634a9e;--privacy-soft:#ddd6e6}
:root[data-theme="dark"]{--privacy:#b9a3ec;--privacy-soft:#2e2550}
@media(prefers-color-scheme:dark){:root:not([data-theme="light"]){--privacy:#b9a3ec;--privacy-soft:#2e2550}}
body.privacy{box-shadow:inset 0 0 0 3px var(--privacy)}
body.privacy .titlebar{border-bottom-color:var(--privacy)}
body.privacy .rail-head,body.privacy .session-list,body.privacy .rail-foot{display:none}
body.privacy .rail-privacy{flex:1}
body.privacy .pill.ready{background:var(--privacy-soft);color:var(--privacy)}body.privacy .pill.ready::before{background:var(--privacy)}
.rail-privacy{padding:22px 18px;display:flex;flex-direction:column;gap:10px;color:var(--muted);font-size:13px;line-height:1.5}
.rail-privacy svg{width:28px;height:28px;fill:none;stroke:var(--privacy);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.rail-privacy strong{color:var(--privacy);font-family:var(--display);font-size:16px}
.rail-privacy button{align-self:flex-start}

.intro-head{padding:26px 22px 8px;display:grid;grid-template-columns:auto 1fr;gap:4px 12px;align-items:center}
.intro-head svg{grid-row:1/3;width:40px;height:40px;fill:none;stroke:var(--privacy);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.intro-head svg .shield-glyph{fill:var(--privacy-soft)}
.intro-head h2{font-size:22px}
.intro-lede{font-size:13px;color:var(--muted)}
.intro-list{list-style:none;margin:10px 0 6px;padding:0 22px;display:flex;flex-direction:column;gap:12px}
.intro-list li{display:grid;grid-template-columns:22px 1fr;gap:12px;align-items:start;font-size:13.5px;line-height:1.5;color:var(--text)}
.intro-list svg{width:20px;height:20px;fill:none;stroke:var(--privacy);stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round;margin-top:2px}
.drawer-callout{margin-top:12px;padding:14px;border:1px solid var(--line);border-radius:12px;background:var(--paper-2);font-size:13px;color:var(--text);line-height:1.5}
.drawer-callout .row{margin-top:10px}
.setting-details{margin-top:8px;border-top:1px solid var(--line);padding-top:12px}
.setting-details summary{cursor:pointer;font-size:13px;font-weight:600;color:var(--muted)}
.setting-details .setting{border-top:0;padding-top:12px}

/* Summary drawer beside the transcript */
.stage-split{display:flex;min-height:0;flex:1}
.stage-split .transcript{flex:1}
.drawer{width:min(420px,46%);flex:none;display:flex;flex-direction:column;min-height:0;border-left:1px solid var(--line);background:var(--paper)}
.drawer-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;padding:16px 14px 10px 20px;border-bottom:1px solid var(--line)}
.drawer-head h3{font-size:17px}
.drawer-sub{display:block;font-size:11px;color:var(--faint);margin-top:2px}
.drawer-body{flex:1;overflow-y:auto;padding:14px 20px;scrollbar-width:thin}
.drawer-section{margin-bottom:18px}
.drawer-section h4{font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:14px 0 6px;font-family:var(--body)}
.drawer-section h4:first-child{margin-top:0}
.drawer-text{font-size:14px;line-height:1.65;color:var(--text);white-space:pre-wrap;min-height:1.6em}
.drawer-text.streaming::after{content:"";display:inline-block;width:2px;height:1em;background:var(--accent);margin-left:2px;vertical-align:-2px;animation:pulse 1s infinite}
.drawer-list{margin:0;padding-left:18px;font-size:13.5px;line-height:1.55;color:var(--text)}
.drawer-list li{margin-bottom:4px}
.drawer-list:empty::after{content:"–";color:var(--faint);margin-left:-18px}
details#summary-extractive-wrap{margin-top:10px;font-size:12.5px;color:var(--muted)}
details#summary-extractive-wrap summary{cursor:pointer;font-weight:600}
details#summary-extractive-wrap .drawer-list{margin-top:6px;font-size:13px}
.drawer-progress{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--accent);margin-bottom:14px;font-variant-numeric:tabular-nums}
.drawer-progress progress:indeterminate{background:linear-gradient(90deg,var(--paper-3),var(--accent-soft),var(--paper-3));background-size:200% 100%;animation:slide 1.4s linear infinite}
@keyframes slide{from{background-position:200% 0}to{background-position:-200% 0}}
.drawer-foot{border-top:1px solid var(--line);padding:10px 14px 12px 20px;display:flex;flex-direction:column;gap:8px}
.drawer-badges{display:flex;align-items:center;gap:12px;flex-wrap:wrap;min-height:18px}
.badge{font-size:11px;font-weight:700;color:var(--live);background:var(--live-soft);padding:3px 8px;border-radius:12px}
.check.small{font-size:12px;margin:0}
.spark-glyph{fill:currentColor;stroke:none}
.summary-open .stage-split .transcript{padding-right:20px}
@media(max-width:1000px){.drawer{position:absolute;right:0;top:0;bottom:0;width:min(420px,100%);box-shadow:var(--shadow);z-index:6}}

/* Dictation pill (Document Picture-in-Picture window, or a floating panel as fallback) */
.pill-host{position:fixed;right:18px;bottom:160px;width:360px;max-width:calc(100vw - 36px);z-index:35;border:1px solid var(--line-strong);border-radius:14px;background:var(--paper);box-shadow:var(--shadow);overflow:hidden}
.pill-app{display:flex;flex-direction:column;height:100%;min-height:200px;font-family:var(--body);color:var(--text);background:var(--paper)}
.pill-head{display:flex;align-items:center;gap:10px;padding:8px 8px 8px 12px;border-bottom:1px solid var(--line);-webkit-app-region:drag;app-region:drag}
.pill-head button{-webkit-app-region:no-drag;app-region:no-drag}
.pill-brand{display:flex;align-items:center;gap:6px;font-family:var(--display);font-weight:650;color:var(--ink);font-size:14px}
.pill-brand svg{width:16px;height:18px;stroke:var(--accent);fill:none;stroke-width:2.6;stroke-linecap:round}
.pill-status{flex:1;font-size:11px;color:var(--muted);font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pill-status.live{color:var(--record)}
.pill-text{flex:1;min-height:70px;padding:10px 12px;font-size:14px;line-height:1.55;overflow-y:auto;white-space:pre-wrap;outline:none}
.pill-text:empty::before{content:attr(data-placeholder);color:var(--faint)}
.pill-text .pending{color:var(--muted)}
.pill-raw{padding:0 12px 8px;font-size:11.5px;color:var(--faint);border-top:1px dashed var(--line);white-space:pre-wrap;max-height:70px;overflow-y:auto}
.pill-foot{display:flex;align-items:center;gap:6px;padding:8px;border-top:1px solid var(--line);flex-wrap:wrap}
.pill-mic{display:inline-flex;align-items:center;gap:6px;border-radius:20px;padding:6px 12px 6px 8px;background:var(--accent-ink);color:#fff;font-weight:700;font-size:13px}
.pill-mic svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.pill-mic[aria-pressed=true]{background:var(--record);animation:none}
.pill-select{font-size:12px;padding:5px 8px;border-radius:8px;max-width:130px}
.pill-check{font-size:11px;color:var(--muted);display:flex;align-items:center;gap:4px;margin-left:auto}
.pill-foot .ghost.small{padding:5px 9px;font-size:12px}

/* Settings additions */
.panel-sub{margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}
#typing-code{width:110px;font-family:var(--mono);letter-spacing:.12em}
#typing-port{width:80px;font-family:var(--mono)}
a.ghost.small{text-decoration:none;display:inline-flex;align-items:center;border-radius:8px;border:1px solid var(--line-strong);padding:7px 12px;font-size:13px;font-weight:600;color:var(--ink);background:var(--paper)}
a.ghost.small:hover{background:var(--paper-3)}
/* The dictation pill as its own document (Picture-in-Picture window) */
body.pill-doc{display:block;overflow:hidden;background:var(--paper);height:100vh}
body.pill-doc .pill-app{height:100vh}
#dictate-open.active{border-color:var(--record);color:var(--record)}
#dictate-open.active svg{color:var(--record)}

/* High-quality pass */
.edited.hq{color:var(--live)}
.hq-meta{color:var(--accent)}
.profile-cards.single{grid-template-columns:1fr}
.profile-card.static{cursor:default}
.profile-card.static:hover{border-color:var(--line-strong)}
#hq-card.off{opacity:.55}
