/* Project 2231 Recorder · app stylesheet
   One instrument on a clean document workspace: ivory ground, white sheets, navy dock and rail,
   Montserrat, the orb as the only live thing. Built from the locked comps (review/comps-r3). */

@font-face{font-family:'Montserrat';font-style:normal;font-weight:100 900;font-display:swap;src:url('/fonts/montserrat-latin.woff2') format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Montserrat';font-style:normal;font-weight:100 900;font-display:swap;src:url('/fonts/montserrat-latin-ext.woff2') format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

:root{
  --ivory:#f8f8f6;--ivory-2:#efefeb;--ivory-3:#e6e7e2;--white:#fff;
  --navy:#172b4d;--navy-deep:#0e1c34;--navy-ink:#232b38;--navy-2:#24446b;
  --muted:#5f6a7b;--subtle:#68728a;--line:#dadee4;--line-strong:#a9b2c0;
  --rec:#d92f3c;--rec-2:#c62633;--amber:#946014;--danger:#b3261e;
  --on-navy:#f4f6fc;--on-navy-muted:#aeb9d1;
  --ease:cubic-bezier(.16,1,.3,1);
  --shadow-sheet:0 -18px 40px -30px rgba(14,28,52,.35);
  --shadow-card:0 18px 40px -30px rgba(14,28,52,.35);
  --shadow-dock:0 22px 44px -20px rgba(14,28,52,.8);
  --danger-wash:#fbeceb;
  /* keys */
  --key-h:56px;--key-r:2px;
  --rec-lo:#c4262f;
  /* sheet keys (keys round 2, option E): every key is a small white sheet on the ivory, same depth system as the cards; pressing raises it */
  --sheet-rest:0 1px 0 rgba(14,28,52,.06),0 6px 14px -8px rgba(14,28,52,.28),0 14px 30px -20px rgba(14,28,52,.35);
  --sheet-hover:0 1px 0 rgba(14,28,52,.06),0 10px 18px -8px rgba(14,28,52,.32),0 22px 40px -20px rgba(14,28,52,.42);
  --sheet-press:0 1px 0 rgba(14,28,52,.06),0 16px 26px -8px rgba(14,28,52,.36),0 30px 54px -22px rgba(14,28,52,.5);
  --sheet-rec:0 12px 26px -14px rgba(217,47,60,.5);--sheet-rec-hover:0 16px 30px -14px rgba(217,47,60,.55);--sheet-rec-press:0 22px 40px -16px rgba(217,47,60,.6);
  --safe-bottom:env(safe-area-inset-bottom,0px);
  --dock-h:64px;
  --page-x:24px;
  /* legacy aliases used by JS-rendered modules */
  --text:var(--navy-ink);--text-muted:var(--muted);--text-subtle:var(--subtle);--bg:var(--ivory);
  --surface:var(--white);--surface-soft:var(--ivory-2);--surface-2:var(--ivory-3);--accent:var(--navy-2);--accent-2:#3a6fd8;--success:#2f6b4f;--control-edge:var(--line-strong);--focus:var(--navy-2);
}

*{box-sizing:border-box;margin:0;padding:0;-webkit-tap-highlight-color:transparent}
html{height:100%;scrollbar-color:var(--line-strong) transparent}
body{font-family:'Montserrat',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;background:var(--ivory);color:var(--navy-ink);min-height:100vh;min-height:100dvh;-webkit-font-smoothing:antialiased;font-feature-settings:"tnum" 1;font-variant-numeric:tabular-nums;line-height:1.45;overscroll-behavior-y:contain;caret-color:var(--navy)}
button,input,textarea,select{font:inherit;color:inherit;touch-action:manipulation}
button{background:none;border:0;cursor:pointer}
button:disabled{cursor:default}
a{color:inherit;text-decoration:none}
img,svg,canvas{display:block}
[hidden]{display:none!important}
::selection{background:#d2def0;color:#142b4b}
:focus{outline:none}
:focus-visible{outline:2px solid var(--navy-2);outline-offset:3px;border-radius:6px}
h1:focus,h2:focus,h3:focus{outline:none}
mark{background:#f3e3a8;color:inherit;border-radius:2px;padding:0 1px}
.sr-only,.visually-hidden-input{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.tnum{font-variant-numeric:tabular-nums}
.icon{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.75;stroke-linecap:round;stroke-linejoin:round;flex:none}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--navy-2);flex:none}

/* ---------- Keys (the one control family) ---------- */
/* ---------- Keys: the one control family ----------
   Filled (navy = safe, red = capture): 2-stop grade, top sheen, two-layer offset shadow.
   Edged (white + hairline): the secondary. Quiet: text only. Every tier shares one press. */
.key,.transcript-export-btn,.slack-button,.drive-action,#recording-actions .start-btn,#recording-actions .pause-btn,#recording-actions .stop-btn,.note-actions .submit-note,.export-submit,.record-btn,#connection-list button,#secondary-connection-list button,.account-logout{position:relative;isolation:isolate;display:inline-flex;align-items:center;justify-content:center;gap:10px;min-height:var(--key-h);padding:0 22px;border:0;border-radius:var(--key-r);font-weight:600;font-size:16px;line-height:1.2;letter-spacing:0;text-align:center;text-decoration:none;background:#fff;color:var(--navy);box-shadow:var(--sheet-rest),inset 0 -1px 0 var(--ivory-3);transition:box-shadow .2s var(--ease),transform .2s var(--ease),background-color .18s,color .18s;-webkit-tap-highlight-color:transparent;user-select:none}
/* state layer: the label colour laid over the sheet at 5% hover / 10% press (Material state overlays) */
.key::after,.transcript-export-btn::after,.slack-button::after,.drive-action::after,#recording-actions button::after,.note-actions .submit-note::after,.export-submit::after,.record-btn::after,#connection-list button::after,#secondary-connection-list button::after,.account-logout::after{content:"";position:absolute;inset:0;border-radius:inherit;background:currentColor;opacity:0;transition:opacity .16s var(--ease);pointer-events:none;z-index:-1}
.key:hover::after,.transcript-export-btn:hover::after,.slack-button:hover::after,.drive-action:hover::after,#recording-actions button:hover::after,.note-actions .submit-note:hover::after,.export-submit:hover::after,.record-btn:hover::after,#connection-list button:hover::after,#secondary-connection-list button:hover::after,.account-logout:hover::after{opacity:.05}
.key:active::after,.transcript-export-btn:active::after,.slack-button:active::after,.drive-action:active::after,#recording-actions button:active::after,.note-actions .submit-note:active::after,.export-submit:active::after,.record-btn:active::after,#connection-list button:active::after,#secondary-connection-list button:active::after,.account-logout:active::after{opacity:.1}
.key:hover,.transcript-export-btn:hover,#recording-actions .pause-btn:hover,#connection-list button:hover,#secondary-connection-list button:hover{background:#fff;box-shadow:var(--sheet-hover),inset 0 -1px 0 var(--ivory-3);transform:translateY(-1px)}
.key:active,.transcript-export-btn:active,.slack-button:active,.drive-action:active,#recording-actions button:active,.note-actions .submit-note:active,.export-submit:active,.record-btn:active,#connection-list button:active,#secondary-connection-list button:active,.account-logout:active{background:#fff;box-shadow:var(--sheet-press),inset 0 -1px 0 var(--ivory-3);transform:translateY(-3px);transition-duration:.1s}
.key:disabled,.transcript-export-btn:disabled,.slack-button:disabled,.drive-action:disabled,#recording-actions button:disabled,.note-actions .submit-note:disabled,.export-submit:disabled,.record-btn:disabled,#connection-list button:disabled,#secondary-connection-list button:disabled,.account-logout:disabled{opacity:.5;transform:none;cursor:default}
.key:disabled::after,.transcript-export-btn:disabled::after,.slack-button:disabled::after,.drive-action:disabled::after,#recording-actions button:disabled::after,.note-actions .submit-note:disabled::after,.export-submit:disabled::after,.record-btn:disabled::after,#connection-list button:disabled::after,#secondary-connection-list button:disabled::after,.account-logout:disabled::after{opacity:0}
[aria-busy="true"]{cursor:progress}
/* navy sheet = primary, red sheet = capture. Same sheet, different paper. */
.key.navy,#recording-actions .stop-btn,.note-actions .submit-note,.export-submit,.slack-button,.drive-action,.transcript-export-btn.is-primary,.transcript-ledger .keys .transcript-agent-action:not([hidden]),.record-btn.recording,.pin-keypad .key.submit{background:var(--navy);color:#fff;box-shadow:var(--sheet-rest),inset 0 -1px 0 var(--navy-deep)}
.key.navy:hover,#recording-actions .stop-btn:hover,.note-actions .submit-note:hover,.export-submit:hover,.slack-button:hover,.drive-action:hover,.transcript-export-btn.is-primary:hover,.transcript-ledger .keys .transcript-agent-action:not([hidden]):hover,.record-btn.recording:hover,.pin-keypad .key.submit:hover{background:var(--navy);box-shadow:var(--sheet-hover),inset 0 -1px 0 var(--navy-deep);transform:translateY(-1px)}
.key.navy:active,#recording-actions .stop-btn:active,.note-actions .submit-note:active,.export-submit:active,.slack-button:active,.drive-action:active,.transcript-export-btn.is-primary:active,.transcript-ledger .keys .transcript-agent-action:not([hidden]):active,.record-btn.recording:active{background:var(--navy);box-shadow:var(--sheet-press),inset 0 -1px 0 var(--navy-deep);transform:translateY(-3px)}
.key.rec,#recording-actions .start-btn,#recording-actions .pause-btn.paused,#recording-actions[data-mode="confirm"] .stop-btn,.record-btn{background:var(--rec);color:#fff;box-shadow:var(--sheet-rest),var(--sheet-rec),inset 0 -1px 0 var(--rec-lo)}
.key.rec:hover,#recording-actions .start-btn:hover,#recording-actions .pause-btn.paused:hover,#recording-actions[data-mode="confirm"] .stop-btn:hover,.record-btn:hover{background:var(--rec);box-shadow:var(--sheet-hover),var(--sheet-rec-hover),inset 0 -1px 0 var(--rec-lo);transform:translateY(-1px)}
.key.rec:active,#recording-actions .start-btn:active,#recording-actions .pause-btn.paused:active,#recording-actions[data-mode="confirm"] .stop-btn:active,.record-btn:active{background:var(--rec);box-shadow:var(--sheet-press),var(--sheet-rec-press),inset 0 -1px 0 var(--rec-lo);transform:translateY(-3px)}
.record-btn.paused{background:var(--amber);color:#fff;box-shadow:var(--sheet-rest),inset 0 -1px 0 rgba(0,0,0,.25)}
.slack-button.secondary,.drive-action.secondary,.transcript-ledger .keys:has(.transcript-agent-action:not([hidden])) .transcript-export-btn.is-primary{background:#fff;color:var(--navy);box-shadow:var(--sheet-rest),inset 0 -1px 0 var(--ivory-3);transform:none}
.slack-button.secondary:hover,.drive-action.secondary:hover,.transcript-ledger .keys:has(.transcript-agent-action:not([hidden])) .transcript-export-btn.is-primary:hover{background:#fff;box-shadow:var(--sheet-hover),inset 0 -1px 0 var(--ivory-3);transform:translateY(-1px)}
/* quiet = ink on the ground, no sheet */
.key.quiet,.note-actions .note-cancel-btn,.account-logout{background:transparent;color:var(--muted);box-shadow:none;min-height:48px;transform:none}
.key.quiet::after,.note-actions .note-cancel-btn::after,.account-logout::after{display:none}
.key.quiet:hover,.note-actions .note-cancel-btn:hover,.account-logout:hover{background:transparent;color:var(--navy);box-shadow:none;transform:none}
.key.quiet:active,.note-actions .note-cancel-btn:active,.account-logout:active{background:transparent;box-shadow:none;transform:none}
.key.danger,.account-logout{color:var(--danger)}
.key.danger:hover,.account-logout:hover{background:transparent;color:var(--danger)}
.key.small{min-height:48px;font-size:14px;padding:0 18px}
.keys{display:grid;grid-template-columns:1fr;gap:12px}
.keys.two{grid-template-columns:1fr 1fr}
.key svg,.transcript-export-btn svg,.slack-button svg,.drive-action svg,.account-logout svg{width:18px;height:18px;flex:none;stroke-width:1.75}
.key-brand{width:26px;height:26px;flex:none;display:grid;place-items:center;background:#fff;border-radius:2px;margin-left:-4px;box-shadow:0 1px 2px rgba(14,28,52,.35)}
.key-brand img{width:16px;height:16px;display:block}

/* ---------- Top bar ---------- */
.top{display:none;align-items:center;justify-content:space-between;padding:20px var(--page-x) 0;min-height:52px}
body.is-authenticated .top{display:flex}
.brand{display:flex;align-items:center;gap:10px}
.brand img.p{height:26px;width:auto}
.brand img.r{height:14px;width:auto}
.top .who{font-size:14px;color:var(--muted);font-weight:500;max-width:45%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.top .who:empty{display:none}
body.has-preview .top{padding-top:44px}
.preview-notice{position:fixed;top:0;left:0;right:0;z-index:40;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;text-align:center;padding:6px 12px;background:var(--navy-ink);color:#fff}

/* ---------- Dock (mobile) ---------- */
.account-bar{position:fixed;left:20px;right:20px;bottom:calc(18px + var(--safe-bottom));z-index:30;background:var(--navy);border-radius:20px;box-shadow:var(--shadow-dock);padding:6px}
.account-bar[hidden]{display:none!important}
body.is-keyboard-open .account-bar{display:none}
.primary-nav{display:grid;grid-template-columns:1fr 1fr 1fr;gap:4px;transition:grid-template-columns .45s var(--ease)}
@media (max-width:1023px){
  .primary-nav:has(button:nth-child(1)[aria-current="page"]){grid-template-columns:2.2fr 1fr 1fr}
  .primary-nav:has(button:nth-child(2)[aria-current="page"]){grid-template-columns:1fr 2.2fr 1fr}
  .primary-nav:has(button:nth-child(3)[aria-current="page"]){grid-template-columns:1fr 1fr 2.2fr}
}
.primary-nav button{display:grid;grid-template-columns:auto 0fr;justify-content:center;align-items:center;column-gap:0;min-height:52px;min-width:0;border-radius:15px;color:var(--on-navy-muted);font-size:14px;font-weight:600;transition:background .3s var(--ease),color .3s var(--ease)}
.primary-nav button .icon{width:22px;height:22px}
.primary-nav button span{min-width:0;overflow:hidden;white-space:nowrap;opacity:0;transition:opacity .25s var(--ease)}
.primary-nav button[aria-current="page"]{grid-template-columns:auto max-content;column-gap:10px;background:rgba(255,255,255,.12);color:#fff}
.primary-nav button[aria-current="page"] span{opacity:1;transition-delay:.12s}
.primary-nav button:focus-visible{outline-color:#fff;outline-offset:-3px;border-radius:15px}
body.has-active-capture .primary-nav button:not([aria-current="page"]){color:rgba(174,185,209,.55)}

/* ---------- Screens ---------- */
.screen{display:none;padding:8px var(--page-x) calc(var(--dock-h) + 44px + var(--safe-bottom));animation:screen-in .4s var(--ease) both}
.screen.active{display:block}
@keyframes screen-in{from{opacity:0;transform:scale(.985)}to{opacity:1;transform:none}}
.screen-header{display:flex;align-items:center;gap:4px;min-height:44px;margin:0 0 6px -10px}
.screen-header .back-btn{display:inline-flex;align-items:center;gap:4px;min-height:44px;padding:0 10px;border-radius:12px;font-size:14px;font-weight:600;color:var(--muted)}
.screen-header .back-btn .icon{width:18px;height:18px}
.screen-header .back-btn:hover{color:var(--navy);background:var(--ivory-2)}
.screen-header h1{font-size:14px;font-weight:600;color:var(--muted)}
.page-title{font-size:30px;font-weight:600;letter-spacing:-.025em;line-height:1.1;color:var(--navy-ink);margin:10px 0 18px}
.classification-breadcrumb{display:none}

/* ---------- Login ---------- */
#login-screen{display:none;min-height:100dvh;padding:56px 24px 40px;grid-template-columns:min(360px,100%);justify-content:center;align-content:start;text-align:center}
#login-screen.active{display:grid}
#login-screen .login-logo{width:min(132px,100%);height:auto;margin:24px auto 14px}
#login-screen .login-recorder-wordmark{width:min(150px,100%);height:auto;margin:0 auto 44px}
.login-methods{display:grid;gap:16px;width:100%;justify-items:stretch}
.google-signin{width:100%;display:inline-flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:12px;min-height:56px;padding:12px 22px;border-radius:var(--key-r);background:#fff;color:#1f1f1f;border:1px solid #747775;font-family:'Google Sans','Roboto',Montserrat,sans-serif;font-size:15px;font-weight:500;letter-spacing:.01em}
.google-signin:hover{background:#f7f8fa}
.google-signin:disabled{opacity:.6}
.login-method-status{font-size:13px;color:var(--muted);min-height:1em}
.login-method-status:empty{display:none}
.login-error{font-size:14px;line-height:1.5;color:var(--danger);text-wrap:balance}
.login-error[data-tone="info"]{color:var(--navy-2)}
.login-error:empty{display:none}
.pin-option{margin-top:8px}
.pin-option summary{list-style:none;cursor:pointer;font-size:14px;font-weight:600;color:var(--muted);min-height:44px;display:grid;place-items:center;border-radius:12px}
.pin-option summary::-webkit-details-marker{display:none}
.pin-option summary:hover{color:var(--navy)}
.pin-entry{display:grid;gap:18px;justify-items:center;padding-top:8px}
#pin-instructions{font-size:14px;color:var(--muted)}
.pin-display{display:flex;gap:16px}
.pin-dot{width:14px;height:14px;border-radius:50%;border:2px solid var(--line-strong);transition:background .15s,border-color .15s}
.pin-dot.filled{background:var(--navy);border-color:var(--navy)}
.pin-dot.error{border-color:var(--rec)}
.pin-keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;width:min(236px,100%)}
.pin-keypad .key{min-height:0;aspect-ratio:1;padding:0;border-radius:var(--key-r);font-size:22px;font-weight:500;background:#fff;box-shadow:var(--sheet-rest),inset 0 -1px 0 var(--ivory-3)}
.pin-keypad .key:hover{background:#fff;box-shadow:var(--sheet-hover),inset 0 -1px 0 var(--ivory-3)}
.pin-keypad .key.clear{font-size:13px;font-weight:600;color:var(--muted);background:transparent;box-shadow:none}
.pin-keypad .key.submit{font-size:15px;font-weight:600}

/* ---------- Record ---------- */
#recording-screen{padding-top:0;padding-left:0;padding-right:0;display:flex;flex-direction:column;min-height:calc(100dvh - 72px)}
#recording-screen.active{display:flex}
body.has-preview #recording-screen{min-height:calc(100dvh - 116px)}
.hero{flex:1;display:flex;align-items:center;justify-content:center;position:relative;padding:8px 24px 0;min-height:calc(var(--orb) + 24px)}
:root{--orb:clamp(150px,calc(100dvh - 470px),300px)}
.record-orb{position:relative;width:var(--orb);height:var(--orb);flex:none}
.record-orb canvas{width:100%;height:100%}
.record-orb .glow{position:absolute;inset:-6%;border-radius:50%;background:radial-gradient(circle,rgba(120,90,255,.16) 0,rgba(120,90,255,0) 64%);opacity:0;transition:opacity .6s var(--ease);pointer-events:none}
.record-orb[data-state="recording"] .glow{opacity:1}
.record-orb-state{position:absolute;left:50%;bottom:-6px;transform:translate(-50%,100%);font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--subtle);white-space:nowrap;opacity:0}
.recording-signal{display:none!important}
.orb-demo-label{display:none;font-size:11px;color:var(--amber);text-align:center;padding:4px 24px 0}
.orb-demo-label.is-visible{display:block}
.capture-visual{display:contents}

.sheet{background:var(--white);border-radius:30px 30px 0 0;padding:26px 28px calc(var(--dock-h) + 40px + var(--safe-bottom));box-shadow:var(--shadow-sheet);display:grid;gap:18px;position:relative;z-index:2;flex:none;margin-top:8px}
.sheet .head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:16px}
.sheet .titling{min-width:0;display:grid;gap:6px}
.title-input{width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:22px;font-weight:600;letter-spacing:-.02em;line-height:1.25;color:var(--navy-ink);background:transparent;border:0;border-bottom:1px solid transparent;padding:0;min-height:32px;transition:border-color .2s}
.title-input::placeholder{color:var(--subtle);font-weight:500;opacity:1}
.title-input:hover{border-bottom-color:var(--line)}
.title-input:focus{border-bottom-color:var(--navy);outline:none;border-radius:0}
.title-input:focus-visible{outline:2px solid var(--navy-2);outline-offset:4px;border-radius:2px}
.title-input:disabled{opacity:1;-webkit-text-fill-color:var(--navy-ink)}
.sheet .ctx{font-size:14px;color:var(--muted);line-height:1.45}
.sheet .ctx .sep{margin:0 4px}
@media (max-width:1023px){.title-input{font-size:20px}}
@media (max-width:359px){:root{--orb:clamp(104px,calc(100dvh - 500px),300px)}.sheet .head{grid-template-columns:1fr;align-items:start;gap:6px}.sheet .head .time{font-size:40px;justify-self:start}.title-input{font-size:19px}.sheet .ctx{font-size:13px}.sheet{gap:12px;padding:20px 20px calc(var(--dock-h) + 40px + var(--safe-bottom))}.sheet .line{margin-top:-4px}}
.sheet .ctx b{color:var(--navy-ink);font-weight:600}
.sheet .ctx .sep::before{content:"·"}
.sheet .time{font-size:48px;font-weight:200;letter-spacing:-.04em;line-height:1;color:var(--navy);white-space:nowrap}
@media (max-width:1023px){.sheet .time{font-size:44px}}
.status{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);min-height:16px}
.status .dot{transition:background .3s,box-shadow .3s}
.status[data-state="recording"],.status[data-state="starting"]{color:var(--rec)}
.status[data-state="recording"] .dot{background:var(--rec);box-shadow:0 0 0 4px rgba(230,57,70,.15)}
.status[data-state="paused"]{color:var(--amber)}
.status[data-state="paused"] .dot{background:var(--amber)}
.status[data-state="failed"]{color:var(--amber)}
.status[data-state="failed"] .dot{background:var(--amber);box-shadow:0 0 0 4px rgba(183,121,31,.15)}
.status[data-state="complete"] .dot{background:var(--navy-2)}
.status .recording-status{display:none}
.sheet .line{font-size:14px;line-height:1.55;color:var(--muted);margin-top:-8px;min-height:1.55em}
.sheet .line:empty{display:none}
.sheet .line b{color:var(--navy-ink);font-weight:600}
.recording-progress{height:4px;border-radius:2px;background:var(--ivory-3);overflow:hidden;margin-top:-8px}
.recording-progress:not(.show){display:none}
.recording-progress span{display:block;height:100%;width:0;border-radius:2px;background:var(--navy);transition:width .3s var(--ease)}
#recording-actions{display:grid;grid-template-columns:1fr;gap:12px}
#recording-actions[data-mode="active"],#recording-actions[data-mode="confirm"]{grid-template-columns:1fr 1fr}
#recording-actions .stop-action{display:contents!important}
#recording-actions .start-btn,#recording-actions .pause-btn,#recording-actions .stop-btn{min-height:60px;padding:0 18px;border-radius:var(--key-r)}
#recording-actions .start-btn::before{content:"";width:12px;height:12px;border-radius:50%;background:#fff;flex:none}
#recording-actions .pause-btn::before{content:"";width:4px;height:14px;background:currentColor;border-radius:1px;box-shadow:6px 0 0 currentColor;margin-right:6px;flex:none}
#recording-actions .pause-btn.paused::before{width:12px;height:12px;border-radius:50%;box-shadow:none;margin:0}
#recording-actions[data-mode="confirm"] .pause-btn::before{display:none}
#recording-actions .stop-btn::before{content:"";width:12px;height:12px;border-radius:3px;background:#fff;flex:none}
#recording-actions[data-mode="retry"] .stop-btn::before{display:none}
#recording-actions .stop-btn:disabled{opacity:.6}
.recording-action-help{grid-column:1/-1;font-size:13px;color:var(--muted);text-align:center;line-height:1.5}
#recording-actions[data-mode="ready"] .recording-action-help,#recording-actions[data-mode="processing"] .recording-action-help{display:none}
#recording-actions[data-mode="ready"] .stop-btn,#recording-actions[data-mode="ready"] .pause-btn,#recording-actions[data-mode="processing"] .stop-btn{display:none!important}
.capture-options{display:grid;gap:14px}
.capture-options details{border-top:1px solid var(--line);padding-top:4px}
.capture-options summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;min-height:44px;font-size:14px;font-weight:600;color:var(--muted)}
.capture-options summary::-webkit-details-marker{display:none}
.capture-options summary::after{content:"";width:8px;height:8px;border-right:1.75px solid currentColor;border-bottom:1.75px solid currentColor;transform:rotate(45deg);margin-right:4px;transition:transform .2s}
.capture-options details[open] summary::after{transform:rotate(-135deg)}
.capture-options summary:hover{color:var(--navy)}
.capture-options label:not(.agent-choice){display:block;font-size:13px;font-weight:600;color:var(--muted);margin:10px 0 6px}
.capture-options label span{font-weight:400}
.capture-options textarea{width:100%;min-height:88px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--ivory);font-size:15px;line-height:1.5;resize:vertical}
.capture-options textarea:focus{border-color:var(--navy);outline:none}
.agent-choice{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:52px;padding:6px 0;border-top:1px solid var(--line);font-size:15px;font-weight:600;color:var(--navy-ink);cursor:pointer}
.agent-choice input{order:2;margin:0}
.capture-options .agent-choice{margin-top:4px}
.capture-hint{font-size:13px;color:var(--muted);line-height:1.5}
.capture-hint:empty{display:none}
.quick-note-entry{display:inline-flex;align-items:center;gap:8px;min-height:44px;font-size:14px;font-weight:600;color:var(--navy-2);justify-self:start;padding:0 4px;border-radius:10px}
.quick-note-entry:hover{color:var(--navy);background:var(--ivory-2)}
.quick-note-entry .icon{width:18px;height:18px}
.sheet .note{font-size:13px;color:var(--muted);text-align:center;line-height:1.5;padding-top:2px}
.capture-options{padding-top:6px}
.sheet .note:empty{display:none}
body.has-active-capture .capture-options details,body.has-active-capture .quick-note-entry{display:none}
body.has-active-capture .title-input{pointer-events:none}

/* landscape phones: orb and sheet side by side */
@media (max-height:520px) and (min-width:640px) and (max-width:1023px){
  :root{--orb:clamp(140px,calc(100dvh - 120px),240px)}
  #recording-screen{flex-direction:row;align-items:stretch;min-height:0}
  .hero{flex:0 0 45%;padding:16px}
  .sheet{flex:1;border-radius:30px 0 0 0;margin-top:0}
}

/* ---------- Library ---------- */
.library-search{display:flex;align-items:center;gap:12px;min-height:54px;padding:0 22px;border-radius:var(--key-r);background:#fff;border:0;color:var(--subtle);font-size:15px;box-shadow:var(--sheet-rest),inset 0 -1px 0 var(--ivory-3);transition:box-shadow .22s var(--ease)}
.library-search:focus-within{box-shadow:inset 0 0 0 2px var(--navy-2),var(--sheet-rest)}
.library-search .icon{width:18px;height:18px;color:var(--muted)}
.library-search .search-input{flex:1;min-width:0;border:0;background:transparent;font-size:15px;color:var(--navy-ink);min-height:44px}
.library-search .search-input::placeholder{color:var(--subtle)}
.library-search .search-input:focus{outline:none}
.library-search:focus-within{box-shadow:var(--sheet-hover),0 0 0 2px var(--navy-2)}
.library-search .search-input::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}
.library-filters{display:flex;gap:10px;font-size:14px;font-weight:600;color:var(--subtle);margin-top:10px;margin-left:-8px}
.library-filters button{position:relative;min-height:44px;padding:8px 8px 10px;color:inherit;border-radius:4px 4px 0 0}
.library-filters button:hover{color:var(--navy-2)}
.library-filters button[aria-pressed="true"]{color:var(--navy)}
.library-filters button[aria-pressed="true"]::after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;border-radius:2px;background:var(--navy)}
.search-hint{font-size:13px;color:var(--muted);margin:10px 2px 0;min-height:1em}
.search-hint:empty{display:none}
.library-body{display:grid;gap:6px;margin-top:14px}
.day{display:grid;gap:0}
.day h3{font-size:22px;font-weight:600;letter-spacing:-.02em;line-height:1.2;margin:14px 0 4px;display:flex;align-items:baseline;gap:12px}
.day h3 small{font-size:14px;font-weight:500;color:var(--subtle)}
.row-list{display:grid}
.recording-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 16px;padding:18px 0;border-top:1px solid var(--line);align-items:start;text-align:left;width:100%;border-radius:0;color:inherit}
.recording-card:first-child{border-top:0}
.recording-card:hover .recording-card-title{color:var(--navy-2)}
.recording-card:focus-visible{outline-offset:-2px;border-radius:12px}
.recording-card.is-disabled{opacity:.7}
.recording-card-title{font-size:17px;font-weight:600;line-height:1.3;letter-spacing:-.01em;color:var(--navy-ink);min-width:0;overflow-wrap:anywhere}
.recording-card .len{font-size:15px;color:var(--navy);font-weight:500;justify-self:end}
.recording-card-meta{font-size:14px;color:var(--muted);display:flex;gap:6px;flex-wrap:wrap}
.recording-card .st{font-size:13px;font-weight:600;color:var(--navy-2);justify-self:end;white-space:nowrap}
.recording-card .st.busy{color:var(--amber)}
.recording-card .st.busy::before{content:"";display:inline-block;width:6px;height:6px;border-radius:50%;background:var(--amber);margin-right:8px;vertical-align:2px}
.recording-card .st.warn{color:var(--amber)}
.recording-card-snippet{grid-column:1/-1;font-size:14px;line-height:1.5;color:var(--muted);overflow-wrap:anywhere}
.recording-card-hint{grid-column:1/-1;font-size:13px;color:var(--subtle)}
.trail{grid-column:1/-1;display:flex;gap:14px;font-size:13px;color:var(--subtle);flex-wrap:wrap;margin-top:2px}
.trail span{display:inline-flex;align-items:center;gap:6px}
.trail span.ok{color:var(--navy-2);font-weight:600}
.trail span.wait{color:var(--amber);font-weight:600}
.trail span.warn{color:var(--amber);font-weight:600}
.trail .icon{width:15px;height:15px}
.note-history-empty{font-size:15px;color:var(--muted);line-height:1.5;padding:12px 0}
.library-empty{display:grid;justify-items:center;text-align:center;gap:14px;padding:40px 12px 20px}
.library-empty .orbwrap{width:180px;height:180px;opacity:.75}
.library-empty h3{font-size:20px;font-weight:600;letter-spacing:-.02em}
.library-empty p{font-size:15px;color:var(--muted);line-height:1.5;max-width:28ch}
.library-empty .key{min-height:54px;font-size:15px;padding:0 26px}
.skeleton-card{display:grid;gap:10px;padding:18px 0;border-top:1px solid var(--line)}
.skeleton-card:first-child{border-top:0}
.skeleton-line{height:12px;border-radius:6px;background:var(--ivory-3)}
.skeleton-line.w60{width:60%}.skeleton-line.w35{width:35%}
.library-notes{margin-top:28px;display:grid;gap:4px}
.library-notes h2{font-size:22px;font-weight:600;letter-spacing:-.02em;margin-bottom:4px}
.library-note{display:grid;gap:8px;padding:16px 0;border-top:1px solid var(--line)}
.library-note:first-child{border-top:0}
.library-note time{font-size:13px;color:var(--subtle)}
.library-note p{font-size:15px;line-height:1.55;color:var(--navy-ink);overflow-wrap:anywhere}
.library-note-actions{display:flex;flex-wrap:wrap;gap:2px;margin:0 -8px}
.library-note-actions button{min-height:40px;padding:0 10px;border-radius:10px;font-size:13px;font-weight:600;color:var(--navy-2)}
.library-note-actions button:hover{background:var(--ivory-2);color:var(--navy)}
.library-preview{display:none}

/* ---------- Transcript ---------- */
#transcript-detail-screen .screen-header{margin-bottom:0}
.transcript-detail-head{display:grid;gap:14px;padding-bottom:6px}
.transcript-detail-title{font-size:26px;font-weight:600;letter-spacing:-.025em;line-height:1.15;text-wrap:balance;overflow-wrap:anywhere}
.transcript-title-row{display:flex;gap:10px;align-items:flex-start;justify-content:space-between}
.transcript-title-text{display:grid;gap:4px;min-width:0}
.title-provenance{font-size:13px;color:var(--muted);line-height:1.4}
.title-rename{flex:none;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;margin:-8px -8px 0 0;border:0;border-radius:12px;background:transparent;color:var(--navy);font-size:14px;font-weight:600;-webkit-tap-highlight-color:transparent}
.title-rename:hover{background:var(--ivory-2)}
.title-rename svg{width:18px;height:18px;stroke-width:1.75}
.title-edit-form{display:grid;gap:12px;width:100%}
.title-edit-form .title-input{border-bottom-color:var(--line)}
.title-edit-form .keys{display:flex;gap:10px;flex-wrap:wrap}
.transcript-detail-sub{display:flex;gap:6px;flex-wrap:wrap;font-size:14px;color:var(--muted);line-height:1.5;align-items:center}
.transcript-detail-sub b{color:var(--navy-ink);font-weight:600}
.transcript-status-chip{font-size:13px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--navy-2);display:inline-flex;align-items:center;gap:8px}
.transcript-status-chip::before{content:"";width:8px;height:8px;border-radius:50%;background:currentColor}
.transcript-status-chip.is-pending{color:var(--amber)}
.transcript-status-chip.is-failed{color:var(--amber)}
.detail-tabs{display:flex;gap:24px;font-size:15px;font-weight:600;color:var(--subtle);border-bottom:1px solid var(--line);align-items:flex-end}
.detail-tabs .tab-row{display:flex;gap:24px;align-items:flex-end}
.detail-tab{padding:8px 0 12px;position:relative;color:inherit;border-radius:6px 6px 0 0}
.detail-tab:hover{color:var(--navy-2)}
.detail-tab.is-active{color:var(--navy)}
.detail-tab.is-active::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;background:var(--navy)}
.detail-tabs .deliver{margin-left:auto;margin-bottom:8px;min-height:48px;padding:0 20px;border-radius:var(--key-r);font-size:15px;align-self:center}
.detail-tabs .deliver svg{width:18px;height:18px;flex:none}
.detail-tabs .deliver[aria-expanded="true"]{background:var(--navy-2)}
.transcript-ledger{display:grid;gap:12px}
@media (max-width:1023px){
  .transcript-detail-head:has(#transcript-deliver)+.transcript-ledger{display:none}
  .transcript-detail-head:has(#transcript-deliver)+.transcript-ledger.is-open{display:grid;background:var(--white);border-radius:22px;padding:18px;box-shadow:var(--shadow-card);margin:4px 0 12px;animation:screen-in .3s var(--ease) both}
}
.ledger-quiet{display:grid;gap:2px;padding:2px 0 0;border-top:1px solid var(--line);margin-top:2px}
.ledger-quiet button{display:inline-flex;align-items:center;gap:10px;min-height:44px;padding:0 10px;border-radius:12px;font-size:14px;font-weight:600;color:var(--navy);justify-content:flex-start;text-align:left;background:transparent}
.ledger-quiet button:hover{background:var(--ivory-2)}
.ledger-quiet button svg{width:18px;height:18px;flex:none;stroke-width:1.75}
.ledger-quiet .transcript-delete-btn{color:var(--danger)}
.ledger-quiet .transcript-delete-btn:hover{background:var(--danger-wash)}
#capture-delivery-status{display:inline}
#capture-delivery-status .agent-choice{margin-top:8px}
#capture-delivery-status .slack-button.secondary{display:inline-flex;min-height:36px;padding:0 12px;margin-left:6px;font-size:13px;border-radius:var(--key-r)}
.transcript-ledger h4,.transcript-ledger dl{display:none}
.transcript-ledger .foot{font-size:13px;color:var(--muted);text-align:center}
.facts-list{display:none}
.hero .under{display:none}
.transcript-ledger .keys{display:flex;flex-wrap:wrap;gap:10px}
.transcript-ledger .keys .transcript-export-btn{flex:1 1 140px}
.transcript-export-btn{min-height:52px;padding:0 18px;border-radius:var(--key-r);font-size:15px}
.transcript-player-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:14px;padding:10px 12px 10px 10px;border-radius:16px;background:var(--white);border:1px solid var(--line)}
@media (max-width:1023px){
  .transcript-player-row{position:fixed;left:20px;right:20px;bottom:calc(44px + var(--dock-h) + var(--safe-bottom));z-index:29;border-color:transparent;box-shadow:0 18px 40px -22px rgba(14,28,52,.55)}
  body.is-keyboard-open .transcript-player-row{display:none}
  #transcript-detail-screen.active{padding-bottom:calc(var(--dock-h) + 120px + var(--safe-bottom))}
}
.transcript-player-row .transcript-play{width:40px;height:40px;border-radius:50%;background:var(--navy);color:#fff;display:grid;place-items:center;padding:0;flex:none}
.transcript-player-row .transcript-play:hover{background:var(--navy-2)}
.transcript-player-row .transcript-play .icon{width:16px;height:16px;fill:currentColor;stroke:none}
.transcript-player-row .transcript-play[data-playing="true"] .icon.play{display:none}
.transcript-player-row .transcript-play:not([data-playing="true"]) .icon.pause{display:none}
.player-bar{height:4px;border-radius:2px;background:var(--ivory-3);position:relative;cursor:pointer;min-width:60px}
.player-bar::after{content:"";position:absolute;left:0;top:0;bottom:0;width:var(--played,0%);border-radius:2px;background:var(--navy-2);transition:width .2s linear}
.player-time{font-size:13px;color:var(--muted);white-space:nowrap}
#capture-playback{display:none!important}
.capture-context-note{border:1px solid var(--line);border-radius:14px;padding:4px 14px;margin:6px 0 10px}
.capture-context-note summary{cursor:pointer;min-height:40px;display:flex;align-items:center;font-size:13px;font-weight:600;color:var(--muted)}
.capture-context-note p{font-size:14px;line-height:1.55;color:var(--navy-ink);padding:0 0 12px}
#transcript-panel{display:grid;gap:0;padding-top:4px}
.transcript-segment{display:grid;grid-template-columns:52px minmax(0,1fr);gap:4px 14px;padding:14px 0;border-top:1px solid var(--line)}
.transcript-segment:first-of-type{border-top:0}
.transcript-segment-head{display:contents}
.transcript-time{grid-column:1;grid-row:1/3;font-size:13px;color:var(--subtle);padding-top:3px;font-variant-numeric:tabular-nums}
.transcript-speaker{grid-column:2;font-size:14px;font-weight:600;color:var(--navy)}
.transcript-text{grid-column:2;font-size:16px;line-height:1.6;color:var(--navy-ink);overflow-wrap:anywhere}
.transcript-message{font-size:15px;line-height:1.55;color:var(--muted);padding:18px 0}
.transcript-card{background:var(--white);border-radius:22px;padding:22px;display:grid;gap:10px;box-shadow:var(--shadow-card);margin-top:4px}
.transcript-card h2,.transcript-card h3{font-size:18px;font-weight:600;letter-spacing:-.01em;display:flex;align-items:center;gap:10px}
.transcript-card h2::before,.transcript-card h3::before{content:"";width:8px;height:8px;border-radius:50%;background:var(--amber);flex:none}
.transcript-card p{font-size:15px;color:var(--muted);line-height:1.5}
.transcript-card .keys{margin-top:6px}
.transcript-progress-track{height:4px;border-radius:2px;background:var(--ivory-3);overflow:hidden;margin-top:4px}
.transcript-progress-track span{display:block;height:100%;width:38%;border-radius:2px;background:var(--amber);animation:track-breathe 1.8s ease-in-out infinite alternate}
@keyframes track-breathe{from{opacity:.35;width:26%}to{opacity:1;width:60%}}
.transcript-progress-steps{list-style:none;display:flex;gap:18px;font-size:13px;font-weight:600;color:var(--subtle)}
.transcript-progress-steps li{display:inline-flex;align-items:center;gap:6px}
.transcript-progress-steps li.is-done{color:var(--navy-2)}
.transcript-progress-steps li[aria-current="step"]{color:var(--amber)}
.transcript-progress-steps svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.transcript-check-status{font-size:13px;color:var(--muted)}
.skel{display:grid;gap:10px;margin-top:6px}
.skel i{display:block;height:12px;border-radius:6px;background:var(--ivory-3)}
.skel i:nth-child(2){width:88%}.skel i:nth-child(3){width:70%}
#summary-panel{padding-top:10px}
.summary-document{display:grid;gap:18px;max-width:68ch}
.summary-doc-title{font-size:22px;font-weight:600;letter-spacing:-.02em;line-height:1.2}
.summary-doc-meta{font-size:13px;color:var(--muted);display:grid;gap:2px}
.summary-doc-empty{font-size:15px;color:var(--muted)}
.summary-doc-section{display:grid;gap:10px}
.summary-doc-section h2{font-size:13px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--navy-2)}
.summary-doc-section h3{font-size:16px;font-weight:600}
.summary-doc-section p,.summary-doc-section li{font-size:16px;line-height:1.6;color:var(--navy-ink)}
.summary-doc-section ul{padding-left:20px;display:grid;gap:6px}
.summary-note-label{font-size:13px;color:var(--muted);line-height:1.5;border-top:1px solid var(--line);padding-top:12px}
#capture-delivery-status{font-size:14px;color:var(--navy-ink);font-weight:500;line-height:1.4;padding:0;display:inline}
#capture-delivery-status:empty{display:none}
#capture-delivery-status .slack-button{min-height:36px;padding:0 12px;font-size:13px;border-radius:var(--key-r)}
#capture-delivery-status .agent-choice{min-height:36px;font-size:13px;width:100%}

/* ---------- Notepad ---------- */
.notes-success,.note-editing-banner{font-size:14px;font-weight:600;color:var(--navy-2);padding:10px 0}
.notepad-textarea{width:100%;min-height:220px;padding:18px;border:1px solid var(--line);border-radius:22px;background:var(--white);font-size:16px;line-height:1.6;resize:vertical;box-shadow:var(--shadow-card)}
.notepad-textarea:focus{border-color:var(--navy);outline:none}
.note-actions{display:grid;grid-template-columns:1fr;gap:12px;margin:14px 0 8px}
.note-actions .submit-note{min-height:60px;border-radius:var(--key-r)}
.note-actions .note-cancel-btn{font-weight:600;border-radius:var(--key-r)}
.note-actions .note-cancel-btn:hover{background:var(--ivory-2);color:var(--navy)}
#notepad-screen .agent-choice{margin-top:12px}
.note-history{margin-top:26px;display:grid;gap:4px}
.note-history-title{font-size:22px;font-weight:600;letter-spacing:-.02em;margin-bottom:6px}
.note-card{display:grid;gap:8px;padding:16px 0;border-top:1px solid var(--line)}
.note-card:first-child{border-top:0}
.note-card-body{font-size:15px;line-height:1.55;white-space:pre-wrap;overflow-wrap:anywhere}
.note-card-meta{display:flex;flex-wrap:wrap;gap:8px 14px;align-items:center;font-size:13px;color:var(--subtle)}
.note-card-sync:empty{display:none}
.note-card-buttons{margin-left:auto;display:flex;gap:8px}
.note-icon-btn{min-height:44px;padding:0 12px;border-radius:10px;font-size:13px;font-weight:600;color:var(--navy-2)}
.note-icon-btn:hover{background:var(--ivory-2)}
.note-icon-btn.danger{color:var(--danger)}
.note-icon-btn.danger:hover{background:var(--danger-wash)}

/* ---------- Voice enrollment ---------- */
.voice-form{display:grid;gap:16px;max-width:640px}
.voice-note{font-size:14px;line-height:1.6;color:var(--muted)}
.voice-input{width:100%;min-height:54px;padding:0 16px;border:1px solid var(--line);border-radius:16px;background:var(--white);font-size:16px}
.voice-input:focus{border-color:var(--navy);outline:none}
.section-title{font-size:13px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--navy-2)}
.voice-prompt{font-size:16px;line-height:1.7;background:var(--white);border-radius:22px;padding:20px 22px;box-shadow:var(--shadow-card)}
.voice-name-slot{font-weight:600;color:var(--navy)}
.voice-name-slot[data-empty="true"]{color:var(--subtle);font-style:italic;font-weight:500}
.record-btn{min-height:60px;border-radius:var(--key-r)}
#voice-enrollment-screen .recording-timer{font-size:48px;font-weight:200;letter-spacing:-.04em;color:var(--navy);text-align:center}
#voice-enrollment-screen .recording-status{font-size:14px;color:var(--muted);text-align:center}
#voice-enrollment-screen .stop-btn{display:inline-flex;align-items:center;justify-content:center;min-height:60px;border-radius:var(--key-r);font-weight:600;font-size:16px;background:var(--navy);color:#fff}

/* ---------- Export modal ---------- */
.export-modal-backdrop{position:fixed;inset:0;z-index:50;background:rgba(14,28,52,.45);display:none;align-items:flex-end;justify-content:center;padding:16px}
.export-modal-backdrop.show{display:flex}
.export-modal{width:min(480px,100%);background:var(--white);border-radius:26px;padding:22px 22px calc(22px + var(--safe-bottom));box-shadow:0 30px 60px -30px rgba(14,28,52,.6);display:grid;gap:16px}
.export-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.export-modal-title{font-size:20px;font-weight:600;letter-spacing:-.02em}
.export-modal-close{width:44px;height:44px;border-radius:50%;display:grid;place-items:center;color:var(--muted)}
.export-modal-close:hover{background:var(--ivory-2);color:var(--navy)}
.export-modal-close svg{width:20px;height:20px}
.export-modal-body{display:grid}
.export-row{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:56px;padding:8px 0;border-top:1px solid var(--line);font-size:15px;font-weight:500;cursor:pointer}
.export-row:first-child{border-top:0}
.export-select{min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:12px;background:var(--ivory);font-size:15px;color:var(--navy-ink)}
.export-check{width:22px;height:22px;accent-color:var(--navy)}
.export-modal-actions{display:grid;grid-template-columns:1fr;gap:10px}
.export-modal-actions .slack-link{order:2;min-height:48px;font-size:14px;font-weight:600;color:var(--muted);border-radius:14px}
.export-modal-actions .slack-link:hover{background:var(--ivory-2);color:var(--navy)}
.export-submit{border-radius:var(--key-r)}

/* ---------- Toast & banners ---------- */
.toast{position:fixed;left:50%;bottom:calc(var(--dock-h) + 36px + var(--safe-bottom));transform:translate(-50%,16px);z-index:60;max-width:min(560px,calc(100% - 40px));padding:14px 18px;border-radius:16px;background:var(--navy-ink);color:#fff;font-size:14px;line-height:1.5;font-weight:500;box-shadow:0 20px 40px -20px rgba(14,28,52,.8);opacity:0;pointer-events:none;transition:opacity .25s var(--ease),transform .25s var(--ease)}
.toast.show{opacity:1;transform:translate(-50%,0)}
body.has-active-capture .toast{bottom:auto;top:var(--capture-toast-top,12px);transform:translate(-50%,-16px)}
body.has-active-capture .toast.show{transform:translate(-50%,0)}
.pending-banner{position:fixed;left:20px;right:20px;bottom:calc(var(--dock-h) + 36px + var(--safe-bottom));z-index:29;display:none;min-height:48px;padding:10px 18px;border-radius:16px;background:var(--amber);color:#fff;font-size:14px;font-weight:600;text-align:left;box-shadow:0 20px 40px -20px rgba(183,121,31,.7)}
.pending-banner.show{display:block}
.pending-banner.offline{background:var(--navy-2)}

/* ---------- Shared dialogs (Slack, Drive, connections) ---------- */
.slack-dialog,.drive-sheet,.connection-dialog{border:0;border-radius:26px;padding:26px;background:var(--white);color:var(--navy-ink);box-shadow:0 30px 60px -30px rgba(14,28,52,.6);max-width:min(520px,calc(100% - 32px))}
.slack-dialog::backdrop,.drive-sheet::backdrop,.connection-dialog::backdrop{background:rgba(14,28,52,.45)}
.slack-button,.drive-action{min-height:50px;padding:0 20px;border-radius:var(--key-r);font-size:14px}
.slack-link{min-height:44px;padding:0 8px;border-radius:10px;font-size:14px;font-weight:600;color:var(--navy-2);background:transparent;border:0}
.slack-link:hover{background:var(--ivory-2);color:var(--navy)}

/* ---------- Desktop ---------- */
@media (min-width:1024px){
  :root{--page-x:56px;--orb:420px}
  body.is-authenticated{display:grid;grid-template-columns:220px minmax(0,1fr);grid-template-rows:auto 1fr;column-gap:40px;padding:0 var(--page-x) 40px;min-height:100dvh}
  body.is-authenticated>*{grid-column:2}
  body.is-authenticated>.top{grid-column:1/-1;grid-row:1;padding:28px 0 0;margin-bottom:16px}
  body.is-authenticated>.account-bar{grid-column:1;grid-row:2;position:sticky;top:28px;align-self:start;left:auto;right:auto;bottom:auto;background:transparent;box-shadow:none;border-radius:0;padding:8px 0 0;width:220px}
  body.is-keyboard-open .account-bar{display:block}
  .primary-nav,.primary-nav:has(button[aria-current="page"]){grid-template-columns:1fr;row-gap:18px;justify-items:start;transition:none}
  .primary-nav button,.primary-nav button[aria-current="page"]{grid-template-columns:auto max-content;column-gap:0;min-height:0;padding:2px 0;border-radius:6px;font-size:28px;font-weight:600;letter-spacing:-.02em;color:var(--subtle);background:none;justify-content:start;transition:color .2s var(--ease)}
  .primary-nav button .icon{display:none}
  .primary-nav button span{max-width:none;opacity:1;overflow:visible;padding-right:6px}
  .primary-nav button:hover{color:var(--navy-2)}
  .primary-nav button[aria-current="page"]{flex:none;background:none;color:var(--navy)}
  .primary-nav button:focus-visible{outline-color:var(--navy-2);outline-offset:4px}
  body.has-active-capture .primary-nav button:not([aria-current="page"]){color:var(--line-strong)}
  .screen{grid-row:2;padding:0 0 40px;animation:none;max-width:1100px}
  .screen-header{margin-left:-10px}
  .page-title{font-size:34px}
  .toast{bottom:32px}
  .pending-banner{left:auto;right:56px;bottom:32px;max-width:420px}
  /* Login: own full-viewport stage, centred both ways; larger lockup on desktop */
  #login-screen{grid-column:1/-1;max-width:none;width:100%;grid-template-columns:min(400px,100%);justify-content:center;align-content:center;padding:48px var(--page-x) 72px}
  #login-screen .login-logo{width:min(216px,100%);margin:0 auto 18px}
  #login-screen .login-recorder-wordmark{width:min(236px,100%);margin:0 auto 52px}
  /* Top bar: lockup carries the page on desktop */
  .brand{gap:18px}
  .brand img.p{height:48px}
  .brand img.r{height:34px}

  /* Record: hero centre, facts column right */
  #recording-screen,#recording-screen.active{display:grid;grid-template-columns:minmax(0,1fr) 300px;align-items:center;gap:40px;min-height:calc(100dvh - 160px);padding-bottom:40px}
  .hero{flex-direction:column;gap:26px;padding:0;min-height:0;align-self:center;grid-column:1;grid-row:1}
  .orb-demo-label{grid-column:1;grid-row:2;text-align:center;padding:0}
  .hero .under{display:flex;flex-direction:column;align-items:center;gap:14px}
  .hero .under .time{font-size:64px;font-weight:200;letter-spacing:-.04em;line-height:1;color:var(--navy)}
  .sheet{grid-column:2;grid-row:1;background:none;box-shadow:none;border-radius:0;padding:0;margin:0;gap:14px;align-self:center}
  .sheet .head{grid-template-columns:minmax(0,1fr)}
  .sheet .head .time{display:none}
  .sheet .ctx{display:none}
  .hero .under .status{font-size:13px}
  .facts-list[hidden]{display:none!important}
  .facts-list{display:grid;grid-template-columns:auto 1fr;gap:12px 20px;font-size:14px;border-top:1px solid var(--line);padding-top:16px;margin-top:4px}
  .facts-list dt{color:var(--muted)}
  .facts-list dd{color:var(--navy-ink);font-weight:500;overflow-wrap:anywhere}
  .sheet .line{margin-top:0}
  #recording-actions{margin-top:8px}
  #recording-actions[data-mode="active"],#recording-actions[data-mode="confirm"]{grid-template-columns:1fr}
  #recording-actions .start-btn,#recording-actions .pause-btn,#recording-actions .stop-btn{min-height:54px;font-size:15px}
  .sheet .note{text-align:left}
  .title-input{font-size:24px}

  /* Library: list + preview */
  #past-recordings-screen.active{display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:40px;align-items:start}
  #past-recordings-screen>*{grid-column:1}
  #past-recordings-screen .library-preview{grid-column:2;grid-row:1/20;display:grid;gap:18px;align-content:start;background:var(--white);border-radius:28px;padding:32px;box-shadow:0 24px 50px -34px rgba(14,28,52,.45);position:sticky;top:28px}
  .library-preview:empty{display:none!important}
  .library-preview .kind{font-size:13px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--navy-2);display:flex;align-items:center;gap:8px}
  .library-preview .kind.busy{color:var(--amber)}
  .library-preview .kind.busy .dot{background:var(--amber)}
  .library-preview h3{font-size:24px;font-weight:600;letter-spacing:-.02em;line-height:1.2;text-wrap:balance;overflow-wrap:anywhere}
  .library-preview .meta{font-size:14px;color:var(--muted)}
  .library-preview p{font-size:15px;line-height:1.6;color:var(--navy-ink)}
  .library-preview p em{font-style:normal;font-weight:600;color:var(--navy);display:block;font-size:13px;margin-bottom:2px}
  .library-preview .more{font-size:13px;color:var(--muted)}
  .library-preview .keys{grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin-top:8px}
  .library-preview .key{min-height:52px;font-size:15px;white-space:nowrap}
  .library-search{max-width:460px}
  .recording-card.is-selected{background:var(--white);margin:0 -16px;padding:18px 16px;border-radius:16px;border-top-color:transparent;box-shadow:0 14px 30px -22px rgba(14,28,52,.35)}
  .recording-card.is-selected+.recording-card{border-top-color:transparent}

  /* Transcript: script + ledger */
  #transcript-detail-screen.active{display:grid;grid-template-columns:minmax(0,760px) 300px;gap:0 48px;align-items:start}
  #transcript-detail-screen>*,#transcript-detail-body>*{grid-column:1}
  #transcript-detail-body{display:contents}
  #transcript-detail-screen .transcript-ledger{grid-column:2;grid-row:1/30;position:sticky;top:28px;background:var(--white);border-radius:24px;padding:26px 26px 22px;box-shadow:0 24px 50px -34px rgba(14,28,52,.45)}
  .transcript-ledger h4{font-size:13px;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:var(--muted)}
  .transcript-ledger dl{display:grid;grid-template-columns:auto 1fr;gap:14px 18px;font-size:14px;align-items:start}
  .transcript-ledger dt{color:var(--muted)}
  .transcript-ledger dd{color:var(--navy-ink);font-weight:500;line-height:1.4;overflow-wrap:anywhere}
  .transcript-ledger dd small{display:block;color:var(--subtle);font-weight:400;font-size:13px}
  .transcript-ledger dd.wait{color:var(--amber)}
  .transcript-ledger .keys{grid-template-columns:1fr;margin-top:8px}
  .transcript-ledger .transcript-export-btn{min-height:52px;font-size:15px}
  .transcript-ledger .foot{font-size:13px;color:var(--muted);text-align:center}
  .transcript-detail-title{font-size:34px}
  .detail-tabs .deliver{display:none}
  .transcript-segment{grid-template-columns:64px minmax(0,1fr);padding:16px 0}
  .transcript-player-row{max-width:560px}
}
@media (min-width:1024px){
  .transcript-ledger dl{display:grid}
}
/* the ledger's dl is a desktop reading; on phones the keys row alone carries the actions */

/* ---------- Motion & a11y ---------- */
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation:none!important;transition:none!important}
}
@media (forced-colors:active){
  .key,.primary-nav button,.transcript-export-btn,.slack-button,.drive-action{border:1px solid ButtonText}
  .primary-nav button[aria-current="page"]{outline:2px solid Highlight}
}

/* Delivery sheet: the one question after Stop, and the Send key for existing recordings. */
.delivery-sheet{border:0;border-radius:26px 26px 0 0;padding:22px 20px calc(22px + env(safe-area-inset-bottom));width:min(100%,560px);max-width:100%;margin:auto auto 0;background:var(--white);color:var(--navy-ink);box-shadow:0 30px 60px -30px rgba(14,28,52,.6)}
.delivery-sheet::backdrop{background:rgba(14,28,52,.45)}
.delivery-sheet h2{margin:0 0 12px;font-size:22px;line-height:1.2}
.delivery-title-label{display:block;font-weight:600;margin:4px 0 6px}.delivery-title-label span{font-weight:400;opacity:.7}
.delivery-sheet .title-input{width:100%;box-sizing:border-box}
.delivery-hint,.delivery-status{margin:6px 0 0;font-size:14px;opacity:.75;min-height:1.2em}
.delivery-choices{display:grid;gap:10px;margin:16px 0}
.delivery-choice{display:flex;align-items:center;gap:12px;min-height:56px;padding:0 16px;border-radius:var(--key-r);background:var(--white);box-shadow:var(--sheet-rest);font-weight:600;cursor:pointer;-webkit-tap-highlight-color:transparent}
.delivery-choice:has(input:checked){outline:2px solid var(--navy);outline-offset:-2px}
.delivery-choice:has(input:disabled){opacity:.55;cursor:default}
.delivery-choice input{width:22px;height:22px;margin:0;accent-color:var(--navy);flex:0 0 auto}
.delivery-choice .key-brand{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;border-radius:8px;background:#fff;box-shadow:inset 0 0 0 1px rgba(14,28,52,.12);flex:0 0 auto;font-weight:800}
.delivery-sheet .keys{display:flex;gap:10px;margin-top:8px}.delivery-sheet .keys .key{flex:1}
.recording-card .trail .quiet{font-weight:400}
@media(min-width:720px){.delivery-sheet{border-radius:26px;margin:auto}}
