/* Tartis design system. Shared tokens, components, then responsive layouts. */
:root{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-synthesis:none;color:var(--ink);background:var(--page);--page:#FFFFFF;--surface:#FFFFFF;--ink:#20242C;--muted:#606874;--accent:#3563B9;--accent-hover:#274D94;--soft:#F3F5F8;--line:#E1E5EB;--focus:#3563B9;--danger:#963F35;--danger-soft:#F8EAE5;--warning:#805D18;--warning-soft:#FCF1CF;--shadow:0 8px 32px #20242C04;--radius:12px;--panel:#F7F8FA;--accent-soft:#EAF1FC;--accent-line:#C6D5EF}
*{box-sizing:border-box}body{margin:0;min-width:300px;-webkit-font-smoothing:antialiased}h1,h2,h3,h4,p{margin:0}button,input,textarea{font:inherit}button{cursor:pointer;-webkit-tap-highlight-color:transparent;transition:background .15s,border-color .15s}button:disabled{opacity:.45;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible,summary:focus-visible{outline:2px solid var(--focus);outline-offset:4px}button:active:not(:disabled){filter:brightness(.96)}[hidden]{display:none!important}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}
h1{font-size:30px;font-weight:650;letter-spacing:-.035em;line-height:1.3}h2{font-size:20px;font-weight:600;letter-spacing:-.025em}h3{font-size:18px;font-weight:600;letter-spacing:-.025em}.subtitle{font-size:14px;line-height:1.7;color:var(--muted);margin-top:10px}.eyebrow,.review-eyebrow{font-size:10px;font-weight:600;letter-spacing:.13em;color:var(--muted)}.eyebrow{margin-bottom:12px}.full{width:100%;margin-top:18px}
.app-shell{max-width:540px;min-height:100svh;margin:auto;padding:env(safe-area-inset-top) 24px max(24px,env(safe-area-inset-bottom))}.header{min-height:80px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}.brand{display:flex;align-items:center;gap:10px;font-size:21px;font-weight:650;letter-spacing:-.04em}.logo{width:32px;height:32px;border-radius:9px;background:var(--ink);color:var(--surface);display:grid;place-items:center;flex-shrink:0}.logo svg{width:25px;height:25px;stroke-width:2.5}.connection{display:flex;align-items:center;gap:7px;padding:8px 11px;border-radius:6px;background:var(--soft);color:var(--muted);font-size:12px;line-height:1.4;max-width:100%}.connection:before{content:"";width:6px;height:6px;border-radius:50%;background:var(--accent);flex-shrink:0}.connection.offline{background:var(--warning-soft);color:var(--warning)}.connection.offline:before{background:var(--warning)}body[data-state=access] .connection,body[data-state=loading] .connection{display:none}
.primary,.secondary{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:11px 18px;border-radius:8px;font-size:14px;font-weight:550;line-height:1.4}.primary{background:var(--accent);border:1px solid var(--accent);color:var(--surface)}.primary:hover:not(:disabled){background:var(--accent-hover);border-color:var(--accent-hover)}.secondary{background:transparent;border:1px solid transparent;color:var(--muted)}.secondary:hover:not(:disabled){background:var(--soft);color:var(--ink)}.primary svg{width:17px;height:17px}.icon-button{width:44px;height:44px;border:1px solid var(--line);border-radius:50%;background:var(--surface);color:var(--accent);display:grid;place-items:center;flex-shrink:0}.icon-button:hover{background:var(--soft)}.desktop-toggle{display:none}.desktop-device .desktop-toggle{display:grid}.phone-device .desktop-toggle{display:none}
label{display:block;font-size:14px;font-weight:550;line-height:1.5;margin-bottom:10px}input,textarea{display:block;width:100%;padding:13px 15px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:16px;line-height:1.5}input{min-height:50px}textarea{resize:vertical}.form-error{font-size:13px;line-height:1.6;color:var(--danger);margin-top:12px;min-height:20px}.form-error:empty{display:none}.remember-option{display:flex;align-items:center;gap:12px;min-height:52px;margin-top:16px;cursor:pointer;font-weight:400}.remember-option input{width:18px;height:18px;min-height:18px;margin:0;padding:0;accent-color:var(--accent);flex-shrink:0}.remember-option small{display:block;font-size:12px;color:var(--muted);margin-top:3px}.access-panel,.pair-panel{max-width:390px;margin:56px auto 30px;text-align:center}.access-panel form,.pair-panel form{margin-top:30px;text-align:left}.access-panel h1{font-size:30px}.pair-input{font-size:24px;letter-spacing:.35em;text-align:center}
/* Pairing choices and focused approval. */
.desktop-device .pair-panel{max-width:780px;width:100%}.desktop-device .pair-panel>.eyebrow{display:none}.pair-intro{font-size:14px}.pair-options{display:grid;gap:24px;margin:28px 0 20px;text-align:center}.pair-option{min-width:0;padding:24px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}.pair-visual{height:184px;display:grid;place-items:center;margin-bottom:22px}.pair-option h2{font-size:17px;margin-bottom:10px}.pair-option p{font-size:14px;line-height:1.7;color:var(--muted)}.pair-description{min-height:42px}.pair-option .pair-copy-hint{font-size:11px;margin-top:14px}.pair-option #pair-expiry,.pair-option #qr-expiry{font-size:11px;margin:5px 0 18px;min-height:18px}.pair-code{display:block;width:100%;border:0;background:transparent;border-radius:8px;color:var(--ink);font-size:40px;font-weight:500;letter-spacing:.16em;font-variant-numeric:tabular-nums;padding:20px 8px 20px 16px}.pair-code:hover:not(:disabled){background:var(--soft)}.pair-option canvas{display:block;width:200px!important;max-width:100%;height:auto!important}.qr-placeholder{display:grid;place-items:center;width:180px;height:180px;border-radius:12px;background:var(--soft);color:var(--muted)}.qr-placeholder svg{width:50px;height:50px}.pair-visual:has(canvas:not([hidden])) .qr-placeholder{display:none}.pair-option .secondary{min-height:44px;border:1px solid var(--line);background:var(--surface);font-size:12px;padding:9px 15px}.pair-option .secondary:hover{background:var(--soft)}#switch-device{margin-top:12px;font-size:12px}.qr-approval{max-width:480px;margin:0 auto;padding:40px 30px;border:1px solid var(--line);border-radius:18px;background:var(--surface);box-shadow:var(--shadow);text-align:center}.qr-approval h2{font-size:22px;line-height:1.35;margin-bottom:16px}.qr-approval p{font-size:13px;color:var(--muted);line-height:1.7}.qr-confirm-code{display:block;font-size:38px;letter-spacing:8px;font-variant-numeric:tabular-nums;margin:30px 0;color:var(--ink)}.qr-approval .dialog-actions{justify-content:center;margin-top:28px}#qr-back{margin-top:14px}
body.desktop-device[data-state=pairing]:has(#qr-approval:not([hidden])) :is(.header,#pair-title,.pair-intro,.pair-options,#switch-device,.account-actions){display:none}body.desktop-device[data-state=pairing]:has(#qr-approval:not([hidden])) main{min-height:100svh;display:flex;flex-direction:column;justify-content:center;padding:32px 0}body.desktop-device[data-state=pairing]:has(#qr-approval:not([hidden])) .app-shell{padding-bottom:0}body.desktop-device[data-state=pairing]:has(#qr-approval:not([hidden])) .pair-panel{max-width:480px;margin:0 auto}
/* Recording and progress states. */
.heading{text-align:center;padding:24px 0}.compact-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;text-align:left}#record-title{overflow-wrap:anywhere}.record-area{text-align:center;padding:24px 0}.record-ring{width:160px;height:160px;margin:0 auto 20px;border:1px solid var(--line);border-radius:50%;background:var(--soft);display:grid;place-items:center}.record-button{width:124px;height:124px;border:0;border-radius:50%;background:var(--accent);color:var(--surface);display:grid;place-items:center;touch-action:none;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;box-shadow:0 8px 24px #3563b91A}.record-button svg{width:36px;height:36px}.record-button:hover{background:var(--accent-hover)}.recording .record-button{background:var(--danger)}.recording .record-button svg{display:none}.recording .record-button:after{content:"";width:28px;height:28px;border-radius:6px;background:var(--surface)}.recording .record-ring{animation:halo 2s ease-in-out infinite}.timer{font-size:28px;font-variant-numeric:tabular-nums;letter-spacing:2px}.record-hint{font-size:13px;line-height:1.65;color:var(--muted);margin-top:8px}.limit{font-size:10px;letter-spacing:.08em;color:var(--muted);margin-top:16px}.waveform{display:flex;justify-content:center;align-items:center;gap:4px;height:32px;margin-top:20px;color:var(--accent)}.waveform span{width:3px;height:5px;border-radius:5px;background:currentColor}.recording .waveform{color:var(--danger)}.recording .waveform span{height:var(--h);animation:wave .9s ease-in-out infinite alternate;animation-delay:var(--d)}
.state-panel{text-align:center;padding:40px 8px}.state-panel .subtitle{max-width:310px;margin:12px auto 0}.spinner{width:56px;height:56px;border-radius:50%;border:3px solid var(--line);border-top-color:var(--accent);animation:spin 1s linear infinite;margin:0 auto 26px}.processing-stage{font-size:14px;color:var(--accent-hover);margin-top:14px}.processing-detail{font-size:13px;line-height:1.7;color:var(--muted);margin-top:22px}.steps{list-style:none;max-width:280px;text-align:left;padding:0;margin:28px auto 0}.steps li{display:flex;align-items:center;gap:11px;font-size:13px;line-height:1.5;color:var(--muted);padding:12px 0}.step-dot{width:21px;height:21px;border:1px solid var(--line);border-radius:50%;display:grid;place-items:center;flex-shrink:0;font-size:10px}.steps li.active{color:var(--accent-hover);font-weight:600}.steps li.active .step-dot{border-color:var(--accent);background:var(--soft)}.steps li.done .step-dot{background:var(--accent);color:var(--surface);border-color:var(--accent)}.steps li.done .step-dot:before{content:'✓'}.steps li.done .step-dot span{display:none}.loading-wrap{min-height:calc(100svh - 120px);display:flex;flex-direction:column;justify-content:center;padding-bottom:40px}.loading-wrap .logo{width:56px;height:56px;border-radius:16px;margin:0 auto 28px}.loading-wrap .logo svg{width:36px;height:36px}.loading-wrap .state-panel{padding:0}.loading-complete{color:var(--accent-hover)}.error-icon{width:58px;height:58px;display:grid;place-items:center;background:var(--danger-soft);color:var(--danger);border-radius:50%;margin:0 auto 24px}.error-icon svg{width:28px;height:28px}.error-actions{max-width:300px;margin:24px auto 0}
/* Document, session controls and history. */
.card{border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);box-shadow:var(--shadow)}.empty-card{text-align:center;padding:40px 20px}.empty-icon{width:42px;height:42px;display:grid;place-items:center;border-radius:12px;background:var(--soft);color:var(--accent);margin:0 auto 16px}.empty-card h2{font-size:17px}.empty-card p{font-size:13px;color:var(--muted);margin-top:8px}.result-heading{display:flex;flex-direction:column;gap:16px;margin-bottom:18px}.document-heading h2{font-size:18px}.document-time{display:block;font-size:12px;color:var(--muted);margin-top:6px}.document-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.document-actions button{font-size:13px;padding:11px 16px;min-height:44px;white-space:nowrap}.document-actions .secondary{border:1px solid var(--line);background:var(--surface)}.result-card{padding:18px}.transcript{white-space:normal;overflow-wrap:anywhere;font-size:16px;line-height:1.8;user-select:text}.warning{font-size:13px;line-height:1.6;padding:12px;border-radius:8px;background:var(--warning-soft);color:var(--warning);margin-bottom:16px}.notice{font-size:12px;line-height:1.7;text-align:center;color:var(--muted);margin-top:14px}.notice:empty{display:none}.footnote{font-size:12px;line-height:1.7;text-align:center;color:var(--muted);margin-top:24px}.account-actions{display:flex;justify-content:center;gap:10px;border-top:1px solid var(--line);padding-top:16px;margin-top:24px}.account-actions button{font-size:12px}.new-record{margin-top:18px}.desktop-device .new-record{display:none}#history-panel{margin-top:26px;border-top:1px solid var(--line);padding-top:14px}#history-panel summary{cursor:pointer;font-size:13px;font-weight:550;color:var(--muted);min-height:38px;padding:8px 0}#history-list{margin-top:12px}.history-card{padding:20px;margin-top:12px}.history-card time{font-size:12px;color:var(--muted)}.history-card p{font-size:14px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere;margin-top:10px}.history-card button{font-size:12px;margin-top:8px;padding:8px 0;justify-content:flex-start}
dialog{width:calc(100% - 40px);max-width:420px;border:1px solid var(--line);border-radius:16px;padding:28px;background:var(--surface);color:var(--ink);box-shadow:0 20px 80px #20242C18}dialog h2{font-size:22px;line-height:1.4}dialog::backdrop{background:#20242C55;backdrop-filter:blur(4px)}.dialog-actions{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px;margin-top:24px}
/* Editor and AI review components. */
.review-workspace,.review-main,.review-sidebar{display:contents}.review-sidebar-idle{display:none}.review-toolbar{display:flex;flex-wrap:wrap;gap:6px;padding-bottom:14px;margin-bottom:14px;border-bottom:1px solid var(--line)}.review-toolbar button{font-size:12px;padding:9px 12px;min-height:40px;border:1px solid var(--line);border-radius:7px;background:var(--surface);color:var(--muted)}.review-toolbar button[aria-pressed=true]{color:var(--accent-hover);background:var(--soft);border-color:var(--accent-line)}.review-status{font-size:12px;line-height:1.6;color:var(--muted);margin-top:14px}.review-status:empty{display:none}.editor-footer{display:flex;flex-direction:column;gap:8px;border-top:1px solid var(--line);padding-top:14px;margin-top:18px;font-size:11px;color:var(--muted)}.editor-footer .draft-status{font-size:11px;margin:0}.document-metrics{white-space:nowrap;font-variant-numeric:tabular-nums}.cm-editor{min-height:220px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}.cm-editor.cm-focused{outline:2px solid var(--focus);outline-offset:3px}.cm-content{min-height:220px;padding:12px}.cm-line{padding:0 2px}.cm-editor .cm-scroller{font-family:inherit;font-size:16px;line-height:1.85;color:var(--ink)}.review-high{background:var(--accent-soft);text-decoration:underline;text-decoration-color:#6488CA;text-underline-offset:3px;cursor:pointer}.review-low{background:var(--warning-soft);text-decoration:underline;text-decoration-color:#A18532;text-underline-offset:3px;cursor:pointer}.review-learning{padding:18px;margin-top:16px;border:1px solid var(--line);border-radius:10px;background:var(--soft)}.review-learning p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px;line-height:1.6}.review-learning button{margin:10px 6px 0 0}.guest-device .review-learning{display:none!important}
.review-popup{padding:0;margin:20px 0 0;border:1px solid var(--line);border-radius:12px;background:var(--surface);overflow:hidden}.review-panel-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:20px 20px 0}.review-eyebrow{display:block;margin-bottom:6px}.review-panel-header h3{font-size:20px;line-height:1.3}.review-popup .review-close{width:34px;height:34px;min-height:34px;padding:0;font-size:24px;border:1px solid var(--line);border-radius:8px;background:var(--page);color:var(--muted)}.review-panel-intro{margin:8px 20px 18px;font-size:13px;line-height:1.7;color:var(--muted)}.review-panel-content{padding:0 20px 20px;min-width:0}.review-comparison{display:grid;gap:10px}.review-excerpt{padding:14px;border:1px solid var(--line);border-radius:9px;background:var(--panel);min-width:0}.review-current{background:var(--accent-soft);border-color:var(--accent-line)}.review-label{display:block;font-size:10px;font-weight:650;letter-spacing:.05em;color:var(--muted)}.review-popup p{overflow-wrap:anywhere}.review-excerpt p{white-space:pre-wrap;font-size:14px;line-height:1.7;margin-top:7px}.review-section-title{font-size:12px;font-weight:600;color:var(--muted);margin:20px 0 10px}.review-options{display:grid;gap:10px}.review-option{display:flex;flex-direction:column;gap:12px;padding:15px;border:1px solid var(--line);border-radius:9px;min-width:0}.review-option-body{min-width:0}.review-option p{white-space:pre-wrap;font-size:14px;line-height:1.7;margin-top:6px}.review-popup .review-use{width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--accent-line);border-radius:7px;background:var(--soft);color:var(--accent-hover);font-size:12px;line-height:1.4;font-weight:550;white-space:normal}.review-use:hover{background:#E4EDFC}.review-panel-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:16px 20px;border-top:1px solid var(--line);background:var(--panel)}.review-panel-actions button{min-height:44px;padding:9px 10px;border:1px solid var(--line);border-radius:7px;background:var(--surface);font-size:12px;text-align:center;white-space:normal}.review-custom{border-top:1px solid var(--line);margin-top:20px}.review-popup textarea{min-height:110px;margin-bottom:12px;font-size:15px}.review-loading{display:flex;align-items:center;gap:10px;font-size:13px;color:var(--muted);margin:20px 0}.review-loading:before{content:"";width:13px;height:13px;border:2px solid var(--line);border-top-color:var(--accent);border-radius:50%;animation:spin 1s linear infinite}
/* Responsive desktop pairing and document layout. */
@media(min-width:760px){.desktop-device[data-state=pairing] .app-shell{max-width:1240px;width:100%;padding-left:40px;padding-right:40px}.desktop-device[data-state=pairing] main{min-height:calc(100svh - 112px);display:flex;flex-direction:column;justify-content:center;padding:32px 0 48px}.desktop-device[data-state=pairing] .pair-panel{margin:0 auto}.pair-options{grid-template-columns:1fr 1fr;gap:20px;margin-top:28px}.pair-option{padding:28px 24px}.pair-scan{border:1px solid var(--accent-line)}.desktop-device[data-state=pairing] .account-actions{border:0;margin-top:8px;padding:0}}
@media(min-width:1000px){.desktop-device .app-shell{max-width:1440px;width:100%;padding-left:48px;padding-right:48px}.desktop-device .header{min-height:80px;border-bottom:1px solid var(--line);margin-bottom:32px}.desktop-device[data-state=pairing] .header{border:0;margin:0}.desktop-device .heading{display:flex;align-items:center;justify-content:space-between;text-align:left;padding:0 0 30px;gap:20px}.desktop-device #record-description{font-size:13px}.desktop-device .result-heading{flex-direction:row;align-items:center;justify-content:space-between;gap:20px}.desktop-device .document-actions{display:flex}.desktop-device .document-heading h2{font-size:17px}.desktop-device .result-card{padding:0;border:0;background:transparent;box-shadow:none}.desktop-device .review-workspace{display:grid;grid-template-columns:minmax(0,1fr) 336px;gap:28px;align-items:start}.desktop-device .review-main{display:flex;flex-direction:column;min-width:0;padding:24px 28px 20px;background:var(--surface);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow)}.desktop-device .review-sidebar{display:block;position:sticky;top:24px;min-width:0}.desktop-device .review-sidebar-idle{display:block;min-height:180px;padding:24px;border:1px solid var(--line);border-radius:12px;background:var(--panel)}.desktop-device .review-sidebar-idle h3{margin:10px 0;font-size:18px;font-weight:550;line-height:1.5}.desktop-device .review-sidebar-idle p{font-size:13px;line-height:1.8;color:var(--muted)}.desktop-device .review-sidebar:has(.review-popup:not([hidden])) .review-sidebar-idle{display:none}.desktop-device .review-popup{margin:0;max-height:calc(100svh - 48px);overflow:auto}.desktop-device .cm-editor{border:0;min-height:380px}.desktop-device .cm-content{min-height:380px;padding:8px 0 24px}.desktop-device .editor-footer{flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap}.desktop-device .empty-card{min-height:350px;display:flex;flex-direction:column;align-items:center;justify-content:center}.desktop-device #history-list{display:grid;grid-template-columns:1fr 1fr;gap:20px}.desktop-device .history-card{min-width:0;margin:0}.desktop-device .history-card p{max-height:140px;overflow:auto}.desktop-device .account-actions{justify-content:flex-end}.desktop-device .access-panel{margin:70px auto 0}.desktop-device #processing-screen,.desktop-device #error-screen{max-width:600px;margin:30px auto}.desktop-device .loading-wrap{max-width:600px;margin:auto}}
@media(max-width:759px){.pair-scan{border-color:var(--accent-line)}.pair-visual{height:180px}.pair-option canvas{width:180px!important}.qr-approval{padding:32px 20px}.qr-approval h2{font-size:20px}.qr-confirm-code{font-size:32px;letter-spacing:6px}}
@media(max-width:400px){.app-shell{padding-left:18px;padding-right:18px}.brand{font-size:20px}.connection{font-size:10px;padding:7px 9px}h1{font-size:25px}.review-panel-header{padding:18px 16px 0}.review-panel-intro{margin-left:16px;margin-right:16px}.review-panel-content{padding:0 16px 18px}.document-actions button{padding:10px;font-size:11px}}
@keyframes spin{to{transform:rotate(360deg)}}@keyframes wave{from{transform:scaleY(.35)}to{transform:scaleY(1)}}@keyframes halo{50%{box-shadow:0 0 0 8px #963f3510}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
/* State screens show only the controls relevant to the current action. */
body:is([data-state=recording],[data-state=processing],[data-state=error]) :is(#empty-card,#result-panel,#history-panel),
body.phone-device[data-state=ready] :is(#empty-card,#record-description),body.desktop-device[data-state=ready] #record-description{display:none}

/* Touch controls retain comfortable targets on narrow screens. */
@media(max-width:759px){.review-toolbar button{min-height:44px}.review-popup .review-close{width:44px;height:44px}.review-panel-actions button{font-size:13px}.document-actions button{padding:10px 8px}.pair-code{font-size:36px;letter-spacing:.12em}.review-sidebar{scroll-margin-top:20px}}
.review-toolbar button:hover:not(:disabled),.document-actions .secondary:hover,.review-panel-actions button:hover:not(:disabled){background:var(--soft);border-color:var(--accent-line)}

/* Voice lines are outside the document surface and never intercept input. */
body::before,body::after{content:"";position:fixed;top:0;bottom:0;width:clamp(80px,15vw,240px);background:url('/voice-lines.svg') center / 100% 100% no-repeat;pointer-events:none;z-index:0;animation:lineDrift 13s ease-in-out infinite alternate}
body::before{left:0}body::after{right:0;transform:scaleX(-1);animation-delay:-6s}
.app-shell{position:relative;z-index:1}
.desktop-toggle{position:relative}
.desktop-toggle::after{content:"";position:absolute;inset:-8px;border:1px solid #AFCBED;border-radius:50%;opacity:.48;pointer-events:none}
.recording .record-ring{position:relative}
.recording .record-ring::after{content:"";position:absolute;inset:-12px;border:1px solid #AFCBED;border-radius:50%;animation:recordPulse 2.4s ease-out infinite;pointer-events:none}
.review-popup:not([hidden]){animation:panelAppear .24s ease-out both}
.primary:hover:not(:disabled),.record-button:hover{box-shadow:0 4px 16px #3563B91A}
@keyframes lineDrift{to{translate:0 12px;opacity:.72}}
@keyframes recordPulse{0%{opacity:.6;scale:.94}75%,100%{opacity:0;scale:1.12}}
@keyframes panelAppear{from{opacity:0;translate:0 8px}to{opacity:1;translate:0 0}}
@media(max-width:759px){body::before,body::after{width:68px;opacity:.32}.recording .record-ring::after{inset:-8px}}
@media(prefers-reduced-motion:reduce){body::before,body::after,.recording .record-ring::after,.review-popup:not([hidden]){animation:none!important}.review-popup:not([hidden]){opacity:1;translate:none}}
/* Continuation preview, temporarily disabled. */
.testing-control{position:relative;display:inline-flex;align-items:center;justify-content:center;cursor:not-allowed}
.testing-control[hidden]{display:none}
.document-actions #continue-dictation{width:36px;min-height:36px;padding:8px;pointer-events:none;opacity:.45}
#continue-dictation svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.testing-tooltip{position:absolute;bottom:calc(100% + 8px);left:0;padding:7px 10px;border-radius:6px;background:var(--ink);color:var(--surface);font-size:12px;white-space:nowrap;z-index:5;visibility:hidden;pointer-events:none}
.testing-control:hover .testing-tooltip,.testing-control:focus-visible .testing-tooltip{visibility:visible}
.testing-control:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:8px}
.document-actions:has(.testing-control:not([hidden])){grid-template-columns:auto 1fr 1fr}

.install-entry{text-align:center;margin-top:16px}.install-entry button{font-size:12px;min-height:44px}
#install-dialog{max-width:440px;width:calc(100% - 32px);max-height:calc(100svh - 48px);overflow:auto}
#install-dialog h3{font-size:15px;margin:22px 0 8px}#install-dialog section p,.install-note{font-size:14px;line-height:1.7;color:var(--muted)}
.install-note{margin-top:20px;padding-top:16px;border-top:1px solid var(--line)}
@media(display-mode:standalone){.app-shell{padding-bottom:max(24px,env(safe-area-inset-bottom));padding-top:max(20px,env(safe-area-inset-top))}.install-entry{display:none}}
.install-platforms{display:flex;gap:8px;margin:20px 0 16px}.install-platforms button{flex:1;min-height:44px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--muted)}.install-platforms button[aria-pressed=true]{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent-hover)}
.install-demo{display:grid;place-items:center;padding:18px 12px 10px;border-radius:12px;background:var(--soft);overflow:hidden}.install-phone{width:174px;height:206px;border:2px solid var(--ink);border-radius:22px;background:var(--surface);padding:12px 9px;position:relative;box-shadow:0 8px 20px #20242c0c}.install-browser{display:flex;justify-content:space-between;align-items:center;background:var(--soft);border-radius:8px;padding:4px 10px;font-size:11px;color:var(--muted)}.install-browser span{font-size:18px;color:var(--accent)}.install-phone-content{display:grid;justify-items:center;gap:5px;padding-top:16px;font-size:13px}.install-phone-content img{border-radius:12px}.install-phone-content>span{font-size:10px;color:var(--muted)}.install-demo-action{position:absolute;bottom:12px;left:8px;right:8px;background:var(--accent-soft);border:1px solid var(--accent-line);color:var(--accent-hover);border-radius:8px;padding:9px 3px;text-align:center;font-size:11px;font-weight:600;animation:installReveal .45s ease-out both}.install-demo-action:after{content:'';position:absolute;right:13px;bottom:5px;width:16px;height:16px;border:2px solid var(--accent);border-radius:50%;animation:installTap 1.4s ease-out 2}.install-demo-caption{font-size:11px;color:var(--muted);margin-top:9px}.install-step-copy{min-height:142px;padding-top:18px}.install-step-copy>span{font-size:10px;letter-spacing:.1em;color:var(--accent);font-weight:650}#install-dialog .install-step-copy h3{margin:7px 0;font-size:18px}.install-step-copy p,.install-desktop p{font-size:14px;line-height:1.65;color:var(--muted)}.install-navigation{display:flex;align-items:center;justify-content:space-between;gap:4px}.install-navigation>button{padding:10px 12px}#install-dots{display:flex}#install-dots button{width:32px;min-height:44px;border:0;background:none;color:var(--muted);font-size:12px;border-radius:8px}#install-dots button[aria-current]{background:var(--accent-soft);color:var(--accent);font-weight:700}.install-desktop{margin-top:18px;font-size:12px;color:var(--muted)}.install-desktop summary{cursor:pointer;min-height:44px;display:flex;align-items:center}.install-desktop p{margin-top:8px}.install-note{font-size:12px;margin-top:8px}#install-dialog .dialog-actions{margin-top:12px}#install-dialog{padding:22px}
@keyframes installReveal{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes installTap{0%{transform:scale(.7);opacity:0}35%{opacity:.8}100%{transform:scale(1.6);opacity:0}}@media(prefers-reduced-motion:reduce){.install-demo-action,.install-demo-action:after{animation:none}.install-demo-action:after{display:none}}@media(max-width:360px){#install-dialog{padding:16px}.install-navigation>button{padding:10px 8px}#install-dots button{width:30px}}
@media(max-width:600px){#install-dialog{padding:18px}.install-phone{height:170px;width:156px}.install-phone-content{padding-top:10px}.install-phone-content img{width:36px;height:36px}.install-demo{padding-top:12px}.install-platforms{margin:12px 0}.install-step-copy{min-height:142px;padding-top:12px}.install-desktop{margin-top:8px}.install-note{line-height:1.5}#install-dialog .dialog-actions{margin-top:8px}}
/* Chrome guide: browser controls and menu are separate from the website. */
.install-demo[data-platform=android] .install-phone{width:244px;height:238px;padding:10px 8px;overflow:hidden}.install-demo[data-platform=android] .install-browser{background:transparent;gap:8px;padding:3px 2px;font-size:11px;border-bottom:1px solid var(--line);border-radius:0;height:38px}.install-demo[data-platform=android] .install-browser:before{content:'⌂';font-size:21px;color:var(--ink)}.install-demo[data-platform=android] #install-menu-icon{position:relative;width:30px;height:30px;display:grid;place-items:center;font-size:25px;color:var(--ink);border-radius:50%}.install-demo[data-platform=android][data-step='0'] #install-menu-icon{outline:2px solid var(--accent);background:var(--accent-soft)}.install-demo[data-platform=android][data-step='0'] #install-menu-icon:after{content:'';position:absolute;inset:-5px;border:2px solid var(--accent);border-radius:50%;animation:installTap 1.4s ease-out 2}.install-demo[data-platform=android] .install-phone-content{padding-top:32px}.install-demo[data-platform=android] .install-demo-action{padding:0;background:transparent;border:0;color:var(--ink);text-align:left;left:auto;right:8px;bottom:auto;top:48px;font-weight:400;animation:installReveal .25s ease-out both}.install-demo[data-platform=android] .install-demo-action:after{display:none}.chrome-hint{font-size:12px;color:var(--accent);background:var(--accent-soft);padding:7px 10px;border-radius:6px}.install-demo[data-platform=android][data-step='1'] .install-demo-action{top:20px;right:7px;width:204px;border:1px solid var(--line);border-radius:10px;background:var(--surface);box-shadow:0 4px 20px #20242c24;overflow:hidden;padding:5px 0}.chrome-menu-row{padding:8px 12px;font-size:11px;line-height:1.4}.chrome-highlight{background:var(--accent-soft);color:var(--accent-hover);border-left:3px solid var(--accent);font-weight:650}.install-demo[data-platform=android][data-step='2'] .install-demo-action{top:76px;left:10px;right:10px;padding:16px 12px;background:var(--surface);border:1px solid var(--line);border-radius:14px;box-shadow:0 0 0 120px #20242c20}.chrome-confirm-title{font-size:14px;font-weight:600}.chrome-app-name{font-size:12px;padding:16px 0}.chrome-confirm-buttons{font-size:12px;color:var(--accent);text-align:right}.install-demo[data-platform=android] .install-demo-caption{font-size:10px}@media(prefers-reduced-motion:reduce){.install-demo[data-platform=android] #install-menu-icon:after{animation:none!important}}
/* Focused install guide: a single primary action, secondary help on demand. */
#install-dialog{padding:24px;max-width:440px;max-height:calc(100svh - 32px)}.install-header{display:flex;align-items:center;justify-content:space-between;gap:12px}.install-header h2{font-size:20px!important}.install-header #install-close{width:44px;height:44px;border:0;border-radius:8px;background:transparent;color:var(--muted);font-size:26px}.install-header #install-close:hover{background:var(--soft)}#install-dialog .install-platforms{margin:12px 0 16px;padding:3px;background:var(--soft);border-radius:10px;gap:4px}#install-dialog .install-platforms button{border:0;background:transparent;min-height:40px;font-size:13px}#install-dialog .install-platforms button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:0 1px 4px #20242c12}#install-dialog .install-demo{padding:14px;background:var(--soft)}#install-dialog .install-demo-caption{display:none}#install-dialog .install-phone{height:210px}#install-dialog .install-step-copy{min-height:0;padding-top:18px;padding-bottom:18px}#install-dialog .install-step-copy h3{font-size:18px;margin:6px 0}#install-dialog .install-step-copy p{font-size:14px;line-height:1.6}#install-dialog #install-dots{display:none}#install-dialog .install-navigation{gap:12px}#install-dialog .install-navigation>button{min-width:100px}#install-dialog #install-prev{border:0;background:transparent;color:var(--muted)}#install-dialog .install-desktop{margin-top:10px;text-align:center}#install-dialog .install-desktop summary{display:list-item;list-style:none;min-height:32px;padding:8px;font-size:12px}#install-dialog .install-desktop summary:after{content:' +'}#install-dialog .install-desktop[open] summary:after{content:' −'}#install-dialog .install-desktop p{text-align:left;font-size:12px;margin-top:8px}#install-dialog .install-note{border:0;padding:0}#install-dialog .install-demo[data-platform=android][data-step='1'] .install-demo-action{top:12px}@media(max-width:480px){#install-dialog{padding:18px}.install-demo[data-platform=android] .install-phone{width:224px}#install-dialog .install-step-copy{padding-top:14px;padding-bottom:14px}}@media(max-height:720px){#install-dialog{padding:16px}#install-dialog .install-demo{padding:8px}#install-dialog .install-phone{height:190px}#install-dialog .install-platforms{margin:6px 0 10px}#install-dialog .install-step-copy{padding:10px 0}#install-dialog .install-desktop{margin-top:4px}}

/* Main screens: restrained secondary actions and a clear document surface. */
#pair-screen #switch-device{width:auto;min-height:44px;padding:10px 16px;background:transparent;border-color:transparent;color:var(--muted)}
#pair-screen #switch-device:hover{background:var(--soft);color:var(--ink)}
.pair-option .pair-description{font-size:13px}.pair-option .pair-copy-hint{font-size:12px}.pair-option #pair-expiry,.pair-option #qr-expiry{font-size:12px}
#refresh-qr{background:var(--accent-soft);border-color:var(--accent-line);color:var(--accent-hover)}
.account-actions{gap:12px}.account-actions .secondary,.install-entry .secondary{border-color:transparent;background:transparent;color:var(--muted);min-height:44px}.account-actions .secondary:hover,.install-entry .secondary:hover{background:var(--soft);color:var(--ink)}
body[data-state=pairing] .account-actions{justify-content:center!important;margin-top:0!important}.install-entry{margin-top:4px}
body:is([data-state=access],[data-state=pairing])::before,body:is([data-state=access],[data-state=pairing])::after{opacity:.18}
body.desktop-device[data-state=pairing]:has(#qr-approval:not([hidden])) .install-entry{display:none}
.access-panel>.eyebrow{display:none}.access-panel{padding:28px;border:1px solid var(--line);border-radius:16px;background:var(--surface)}
.review-toolbar{gap:8px}.review-toolbar button{min-height:44px}.review-main{overflow-wrap:anywhere}.document-actions{align-items:center}.document-time{line-height:1.6}.review-sidebar-idle .review-eyebrow{letter-spacing:.08em}
@media(min-width:1000px){.desktop-device .app-shell{max-width:1320px}.desktop-device .review-workspace{grid-template-columns:minmax(0,1fr) 304px;gap:24px}.desktop-device .review-main{padding:28px 32px}.desktop-device .cm-content{line-height:1.9}.desktop-device[data-state=pairing] main{padding:24px 0}.desktop-device[data-state=pairing] .pair-panel{max-width:760px}}
@media(max-width:759px){.pair-panel{margin-top:28px}.pair-options{gap:16px}.pair-option{padding:20px}.access-panel{padding:24px 20px;margin-top:28px}.account-actions{flex-wrap:wrap}.document-actions{gap:6px}}
