/* ScriptYT — stenographer's notepad.
   Paper sheets on a pale green desk, navy ink, a red margin rule, highlighter for the spoken word. */

:root {
  --desk: #E6ECE2;
  --paper: #F5F8F1;
  --ink: #1C2433;
  --ink-soft: #46526A;
  --rule: #C8383B;
  --ruled: #D3DFD8;
  --stamp: #5E7385;
  --mark: #F4DE6A;
  --line: rgba(28, 36, 51, 0.16);
  --ok: #2F6B4F;
  --ink-hover: #2B3850;
  --placeholder: #7D8798;
  --mark-soft: rgba(244, 222, 106, .45);
  --on-mark: #1C2433;
  --hit: rgba(200, 56, 59, .16);
  --shadow: rgba(28, 36, 51, .45);
  --shadow-soft: rgba(28, 36, 51, .08);
  --logo-bg: #1C2433;
  color-scheme: light;

  --ui: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --type: "Courier Prime", "Courier New", Courier, monospace;

  --lh: 1.75rem;          /* one ruled line on the sheet */
  --margin: 4.75rem;      /* timestamp column, left of the red rule */
  --wrap: 72rem;
  --accent: #0B7A86; --accent-soft: rgba(11, 122, 134, .1);
}

/* Night: the same notepad under a desk lamp. Dark slate paper, chalk ink, the red rule kept. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --desk: #11151B; --paper: #1A2029; --ink: #E3E8EF; --ink-soft: #A7B1BF; --rule: #E2585B;
    --ruled: #252D38; --stamp: #8C9CAD; --mark: #F1D963; --line: rgba(227, 232, 239, .12);
    --ink-hover: #C9D1DC; --placeholder: #7F8A99; --mark-soft: rgba(241, 217, 99, .22); --on-mark: #141820;
    --hit: rgba(226, 88, 91, .28); --shadow: rgba(0, 0, 0, .7); --shadow-soft: rgba(0, 0, 0, .3);
    --logo-bg: #2A3341; color-scheme: dark;
    --accent: #5FD8EA; --accent-soft: rgba(95, 216, 234, .12);
  }
}
:root[data-theme="dark"] {
  --desk: #11151B; --paper: #1A2029; --ink: #E3E8EF; --ink-soft: #A7B1BF; --rule: #E2585B;
  --ruled: #252D38; --stamp: #8C9CAD; --mark: #F1D963; --line: rgba(227, 232, 239, .12);
  --ink-hover: #C9D1DC; --placeholder: #7F8A99; --mark-soft: rgba(241, 217, 99, .22); --on-mark: #141820;
  --hit: rgba(226, 88, 91, .28); --shadow: rgba(0, 0, 0, .7); --shadow-soft: rgba(0, 0, 0, .3);
  --logo-bg: #2A3341; color-scheme: dark;
  --accent: #5FD8EA; --accent-soft: rgba(95, 216, 234, .12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--ui);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
[hidden] { display: none !important; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rule); }
:focus-visible { outline: 2px solid var(--rule); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3 { margin: 0; font-weight: 800; letter-spacing: -0.015em; line-height: 1.1; }
p { margin: 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--paper); padding: .5rem .75rem; z-index: 10; }
.skip:focus { left: 1rem; top: 1rem; }

/* ── Header / footer ─────────────────────────────────────────── */
.top {
  max-width: var(--wrap); margin: 0 auto; padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.2rem; text-decoration: none; letter-spacing: -0.01em; }
.brand-mark { width: 1.75rem; height: 1.75rem; }
.top nav { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: .95rem; }
.top nav a { text-decoration: none; color: var(--ink-soft); }
.top nav a:hover { color: var(--ink); }
.top-right { display: flex; align-items: center; gap: 1.25rem; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}

.foot { max-width: var(--wrap); margin: 0 auto; padding: 3rem 1.5rem 3.5rem; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: .95rem; display: grid; gap: .6rem; }
.foot-links { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.foot-small { font-size: .85rem; }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  max-width: 46rem; margin: 0 auto; padding: 4rem 1.5rem 4rem;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 2.75rem;
}
.hero-copy { display: flex; flex-direction: column; align-items: center; width: 100%; }
.hero h1 { font-size: clamp(2.4rem, 5.6vw, 4rem); line-height: 1.02; letter-spacing: -0.03em; max-width: 16ch; }
.lede { margin-top: 1.25rem; font-size: 1.2rem; line-height: 1.5; color: var(--ink-soft); max-width: 34rem; }

.tx-form { margin-top: 2rem; width: 100%; max-width: 38rem; }
.hero .pillars { justify-content: center; gap: .75rem 2.5rem; }
.hero .pillars div { border-left: 0; padding-left: 0; }
.hero .demo { width: 100%; max-width: 30rem; text-align: left; font-size: .9rem; }
.hero .demo .sheet-body { padding: calc(var(--lh) * .5) 1.25rem calc(var(--lh) * .5) 0; }
.field {
  display: flex; background: var(--paper); border: 2px solid var(--ink); border-radius: 10px; padding: 5px;
  box-shadow: 0 2px 0 var(--ink);
}
.field:focus-within { box-shadow: 0 2px 0 var(--ink), 0 0 0 4px rgba(200, 56, 59, .22); }
.field input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
  font: 400 1.05rem var(--ui); padding: .8rem .85rem;
}
.field input:focus { outline: none; }
.field input::placeholder { color: var(--placeholder); }
.field button {
  border: 0; border-radius: 7px; background: var(--ink); color: var(--paper);
  font: 700 1rem var(--ui); padding: .8rem 1.2rem; cursor: pointer; white-space: nowrap;
}
.field button:hover { background: var(--ink-hover); }
.field button:disabled, .field input:disabled { cursor: not-allowed; opacity: .6; }
.consent { display: flex; gap: .6rem; align-items: flex-start; margin-top: .9rem; font-size: .92rem; color: var(--ink-soft); cursor: pointer; }
.consent input { margin-top: .25rem; width: 1.05rem; height: 1.05rem; accent-color: var(--ink); flex: none; }
.opening { margin-top: .9rem; font-size: .95rem; color: var(--ink-soft); }
.pillars { margin: 2.25rem 0 0; display: flex; flex-wrap: wrap; gap: .75rem 2rem; max-width: 36rem; }
.pillars div { border-left: 2px solid var(--rule); padding-left: .7rem; }
.pillars dt { font-weight: 700; font-size: 1rem; line-height: 1.25; }
.pillars dd { margin: .1rem 0 0; font-size: .84rem; color: var(--stamp); }
.form-msg { margin-top: .5rem; font-size: .92rem; color: var(--rule); font-weight: 500; }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--ink); }

/* ── The sheet (the one memorable thing) ─────────────────────── */
.sheet {
  margin: 0; position: relative;
  background-color: var(--paper);
  background-image:
    linear-gradient(to right, transparent calc(var(--margin) - 1.5px), var(--rule) calc(var(--margin) - 1.5px), var(--rule) calc(var(--margin) + .5px), transparent calc(var(--margin) + .5px)),
    repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--lh) - 1px), var(--ruled) calc(var(--lh) - 1px), var(--ruled) var(--lh));
  background-position: 0 0, 0 calc(var(--head, 3.5rem));
  border-radius: 4px;
  box-shadow: 0 1px 0 var(--shadow-soft), 0 18px 40px -24px var(--shadow);
  font: 400 1.02rem/var(--lh) var(--type);
  color: var(--ink);
}
.sheet-head {
  height: var(--head, 3.5rem); display: flex; align-items: center; gap: .6rem;
  padding: 0 1.25rem 0 calc(var(--margin) + 1rem);
  font: 700 .95rem/1.2 var(--ui); color: var(--ink);
  background: var(--paper); border-bottom: 2px solid var(--ink); border-radius: 4px 4px 0 0;
  position: relative;
}
.rec { position: absolute; left: calc(var(--margin) / 2 - 5px); width: 10px; height: 10px; border-radius: 50%; background: var(--rule); }
.sheet-body { padding: var(--lh) 1.5rem var(--lh) 0; }
.para { display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); margin: 0 0 var(--lh); }
.para:last-child { margin-bottom: 0; }
.stamp {
  justify-self: end; margin-right: .7rem; align-self: start;
  border: 0; background: none; padding: 0 .2rem; border-radius: 3px;
  font: 700 .8rem/var(--lh) var(--type); color: var(--stamp); cursor: pointer;
}
.stamp:hover { color: var(--rule); }
.ptext { padding-left: 1rem; overflow-wrap: anywhere; }
.demo .stamp { cursor: default; }
.demo .stamp:hover { color: var(--stamp); }

/* demo typing: words get revealed by app.js */
.demo .w { opacity: 0; }
.demo .w.on { opacity: 1; }
.demo.static .w { opacity: 1; }

/* ── Result: an app view that fills the window ──────────────── */
body.in-app { overflow: hidden; }
body.in-app .top, body.in-app .hero, body.in-app .band, body.in-app .foot { display: none; }
.app {
  height: 100vh; height: 100dvh; display: flex; flex-direction: column;
  max-width: 88rem; margin: 0 auto; padding: 0 1.5rem 1.25rem;
}
.app-bar {
  position: relative; flex: none; display: flex; align-items: center; gap: .9rem;
  padding: .9rem 0; border-bottom: 2px solid var(--ink); margin-bottom: 1.1rem;
}
.r-info { flex: 1; min-width: 0; }
.r-info h2 { font-size: 1.2rem; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-status { margin-top: .15rem; color: var(--ink-soft); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-status.error { color: var(--rule); font-weight: 500; white-space: normal; }
.progress { position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: transparent; overflow: hidden; }
.progress i { display: block; height: 100%; width: 4%; background: var(--rule); transition: width .4s ease; }
.app.done .progress { display: none; }

.icon-btn {
  flex: none; display: inline-grid; place-items: center; width: 2.4rem; height: 2.4rem; padding: 0;
  border: 1.5px solid var(--ink); border-radius: 8px; background: var(--paper); color: var(--ink); cursor: pointer;
}
.icon-btn svg { width: 1.2rem; height: 1.2rem; }
.icon-btn:hover:not(:disabled) { background: var(--ink); color: var(--paper); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.small { width: 2rem; height: 2rem; border: 0; background: transparent; border-radius: 6px; }
.icon-btn.small:hover:not(:disabled) { background: var(--ruled); color: var(--ink); }

.app-actions { flex: none; display: flex; gap: .5rem; align-items: center; }
.btn-quiet, .btn-solid {
  display: inline-block; border: 1.5px solid var(--ink); border-radius: 8px; padding: .55rem .95rem;
  font: 600 .95rem var(--ui); text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn-quiet { background: var(--paper); color: var(--ink); }
.btn-quiet:hover { background: var(--ruled); color: var(--ink); }
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: var(--ink-hover); }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu summary::after { content: ""; display: inline-block; margin-left: .5rem; vertical-align: .15em;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; }
.menu-list {
  position: absolute; right: 0; top: calc(100% + .4rem); z-index: 20; min-width: 12rem; padding: .35rem;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 10px; box-shadow: 0 12px 28px -14px var(--shadow);
}
.menu-list a { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem .7rem; border-radius: 6px; text-decoration: none; font-weight: 500; }
.menu-list a span { color: var(--stamp); font-family: var(--type); font-size: .85rem; }
.menu-list a:hover { background: var(--ruled); color: var(--ink); }

.app-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.2fr); gap: 1.75rem; }
.player-col { display: flex; flex-direction: column; gap: .9rem; min-height: 0; }
.player-frame { position: relative; aspect-ratio: 16 / 9; background: #000; border-radius: 8px; overflow: hidden; flex: none; }
.player-frame iframe, .player-frame #yt-player { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.follow { display: flex; gap: .5rem; align-items: center; font-size: .92rem; color: var(--ink-soft); cursor: pointer; }
.follow input { accent-color: var(--ink); width: 1rem; height: 1rem; }
.legend { font-size: .88rem; color: var(--ink-soft); max-width: 34rem; }
.lc-sample, .w.lc { text-decoration: underline wavy rgba(200, 56, 59, .55); text-decoration-thickness: 1px; text-underline-offset: 4px; }

.app-body > * { min-width: 0; }
.reader { position: relative; min-height: 0; display: flex; flex-direction: column; gap: .75rem; }
.find {
  flex: none; display: flex; align-items: center; gap: .25rem; padding: 0 .35rem 0 .75rem;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 10px;
}
.find:focus-within { box-shadow: 0 0 0 4px rgba(200, 56, 59, .18); }
.find-icon { width: 1.1rem; height: 1.1rem; color: var(--stamp); flex: none; }
.find input { flex: 1; min-width: 0; border: 0; background: transparent; font: 400 1rem var(--ui); color: var(--ink); padding: .7rem .4rem; }
.find input:focus { outline: none; }
.find input::-webkit-search-cancel-button { cursor: pointer; }
.find-count { font-size: .85rem; color: var(--stamp); white-space: nowrap; padding: 0 .25rem; font-variant-numeric: tabular-nums; }
.find-count.none { color: var(--rule); }

/* The transcript sheet scrolls on its own; the page stays put. */
.live {
  --head: 0rem; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  background-attachment: local; scroll-padding: 3rem 0;
  font: 400 1.0625rem/var(--lh) var(--ui); letter-spacing: .002em;
}
.live:focus-visible { outline-offset: -2px; }
.live .para { margin-bottom: calc(var(--lh) * 1); }
.live .w { cursor: pointer; border-radius: 3px; transition: background-color .15s; }
.live .w:hover { background: var(--mark-soft); }
.live .w.now { background: var(--mark); color: var(--on-mark); box-shadow: 0 0 0 2px var(--mark); transition: none; }
.live .w.hit { background: var(--hit); box-shadow: 0 0 0 1px var(--hit); }
.live .w.hit.cur { background: var(--rule); color: #fff; box-shadow: 0 0 0 2px var(--rule); }
.gap {
  display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); margin: 0 0 var(--lh);
  color: var(--stamp); font-style: italic;
}
.gap .ptext { font-family: var(--ui); font-size: .92rem; }
.missing .ptext { color: var(--rule); font-family: var(--ui); font-size: .92rem; }
.pending { display: grid; grid-template-columns: var(--margin) minmax(0, 1fr); padding: 0 1.5rem var(--lh) 0; color: var(--stamp); margin: 0; }
.stamp-static { justify-self: end; margin-right: .9rem; font: 700 .8rem/var(--lh) var(--type); }
.dots { padding-left: 1rem; font-family: var(--ui); font-size: .92rem; }
.dots::after { content: ""; display: inline-block; width: 1.2em; text-align: left; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
@media (prefers-reduced-motion: reduce) { .dots::after { animation: none; content: "..."; } .live .w { transition: none; } }
.resume {
  position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 5;
  border: 0; border-radius: 999px; background: var(--ink); color: var(--paper); padding: .55rem 1rem;
  font: 600 .9rem var(--ui); cursor: pointer; box-shadow: 0 10px 24px -12px var(--shadow);
}

/* ── History panel ─────────────────────────────────────────────── */
:root { --side: 17.5rem; }
.history {
  position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: var(--side); max-width: 86vw;
  display: flex; flex-direction: column; gap: .25rem; padding: .9rem .75rem .75rem;
  background: var(--paper); border-right: 1.5px solid var(--line);
  transform: translateX(-100%); visibility: hidden;
  transition: transform .22s ease, visibility 0s linear .22s;
}
body.hist-open .history { transform: none; visibility: visible; transition: transform .22s ease; box-shadow: 18px 0 40px -28px var(--shadow); }
.hist-backdrop { position: fixed; inset: 0; z-index: 39; background: rgba(10, 14, 20, .38); }
@media (prefers-reduced-motion: reduce) { .history, body.hist-open .history { transition: none; } }
.hist-head { display: flex; align-items: center; justify-content: space-between; padding: 0 .25rem .6rem; }
.hist-head .brand { font-size: 1.05rem; }
.hist-head .brand-mark { width: 1.5rem; height: 1.5rem; }
.hist-new {
  display: flex; align-items: center; gap: .55rem; width: 100%; padding: .65rem .75rem; margin-bottom: .6rem;
  border: 1.5px solid var(--ink); border-radius: 9px; background: var(--paper); color: var(--ink);
  font: 600 .95rem var(--ui); cursor: pointer; text-align: left;
}
.hist-new svg { width: 1.05rem; height: 1.05rem; }
.hist-new:hover { background: var(--ink); color: var(--paper); }
.hist-label { font-size: .8rem; font-weight: 700; color: var(--stamp); padding: .4rem .5rem .2rem; letter-spacing: 0; }
.hist-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; overscroll-behavior: contain; }
.hist-list:empty { flex: 0 0 auto; }
.hist-list:empty ~ .hist-empty { flex: 1; }
.hist-item { position: relative; border-radius: 8px; }
.hist-item:hover, .hist-item.current { background: var(--ruled); }
.hist-item.current::before { content: ""; position: absolute; left: 0; top: .5rem; bottom: .5rem; width: 2px; background: var(--rule); border-radius: 2px; }
.hist-link { display: flex; gap: .6rem; align-items: center; padding: .45rem 2rem .45rem .5rem; text-decoration: none; color: var(--ink); }
.hist-link:hover { color: var(--ink); }
.hist-thumb { width: 3.4rem; height: 1.9rem; object-fit: cover; border-radius: 4px; flex: none; background: var(--ruled); }
.hist-text { min-width: 0; display: grid; gap: .05rem; }
.hist-title { font-size: .9rem; font-weight: 500; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hist-meta { display: flex; gap: .5rem; font-size: .76rem; color: var(--stamp); }
.hist-del {
  position: absolute; right: .3rem; top: 50%; transform: translateY(-50%); width: 1.6rem; height: 1.6rem;
  display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: var(--stamp);
  cursor: pointer; opacity: 0;
}
.hist-del svg { width: .95rem; height: .95rem; }
.hist-item:hover .hist-del, .hist-del:focus-visible { opacity: 1; }
.hist-del:hover { color: var(--rule); background: var(--paper); }
@media (hover: none) { .hist-del { opacity: .7; } }
.hist-empty { padding: .5rem; font-size: .88rem; color: var(--ink-soft); }
.hist-foot { border-top: 1px solid var(--line); padding: .6rem .5rem 0; display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .78rem; color: var(--stamp); }
.hist-clear { border: 0; background: none; color: var(--ink-soft); font: 500 .8rem var(--ui); cursor: pointer; padding: .25rem; text-decoration: underline; text-underline-offset: 3px; }
.hist-clear:hover { color: var(--rule); }

/* Wide screens, transcript open: the panel docks to the left like a sidebar. */
.hist-rail { display: none; }
@media (min-width: 1000px) {
  /* Docked: open = full panel, collapsed = slim strip with logo, open and new buttons (like Claude). */
  body.docked .history { transition: none; box-shadow: none; }
  body.docked.hist-open { padding-left: var(--side); }
  body.docked:not(.hist-open) { padding-left: 3.5rem; }
  body.docked:not(.hist-open) .hist-rail {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 40; width: 3.5rem;
    display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: .95rem 0;
    background: var(--paper); border-right: 1.5px solid var(--line);
  }
  .rail-logo { display: block; width: 1.75rem; height: 1.75rem; margin-bottom: .4rem; }
  .rail-logo svg { width: 100%; height: 100%; }
  body.docked .app .hist-toggle, body.docked .top .hist-toggle, body.docked .top .brand { display: none; }
  body.docked .top { justify-content: flex-end; }
}

/* ── Transcript type, minutes left, account ─────────────────────── */
.under-field { display: flex; align-items: center; justify-content: center; gap: .6rem; flex-wrap: wrap; margin-top: .7rem; }
.under-field .mode-help { margin-top: 0; }
.model-pick { position: relative; flex: none; }
.model-btn {
  list-style: none; display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; white-space: nowrap;
  padding: .35rem .55rem .35rem .8rem; border-radius: 999px; font: 700 .88rem var(--ui); color: var(--accent);
  background: var(--accent-soft); border: 1.5px solid color-mix(in srgb, var(--accent) 45%, transparent);
}
.model-btn::-webkit-details-marker { display: none; }
.model-btn svg { width: 1rem; height: 1rem; transition: transform .15s; }
.model-pick[open] .model-btn svg { transform: rotate(180deg); }
.model-btn:hover, .model-pick[open] .model-btn { border-color: var(--accent); }
.model-menu {
  position: absolute; left: 0; top: calc(100% + .5rem); z-index: 30; width: 19rem; padding: .35rem;
  background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px; text-align: left;
  box-shadow: 0 16px 34px -18px var(--shadow);
}
.model-opt { position: relative; display: grid; gap: .1rem; padding: .65rem 2.4rem .65rem .8rem; border-radius: 8px; cursor: pointer; }
.model-opt:hover { background: var(--ruled); }
.model-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.model-opt:has(input:focus-visible) { outline: 2px solid var(--rule); outline-offset: -2px; }
.mo-name { font-weight: 700; font-size: .95rem; color: var(--ink); }
.model-opt:has(input:checked) .mo-name { color: var(--accent); }
.mo-desc { font-size: .82rem; color: var(--ink-soft); }
.mo-check { position: absolute; right: .75rem; bottom: .8rem; width: 1.1rem; height: 1.1rem; color: var(--ink); opacity: 0; }
.model-opt:has(input:checked) .mo-check { opacity: 1; }
.badge-free {
  position: absolute; top: .6rem; right: .7rem; font-size: .7rem; font-weight: 700;
  padding: .1rem .45rem; border-radius: 999px; background: var(--ok); color: #fff;
}
.mode-help { margin-top: .7rem; font-size: .88rem; color: var(--ink-soft); }
.mode-help a { font-weight: 600; }
.fine { margin-top: .2rem; font-size: .8rem; color: var(--stamp); }
.fine a { color: inherit; }

.signin-link { font-weight: 600; text-decoration: none; padding: .45rem .8rem; border: 1.5px solid var(--ink); border-radius: 8px; font-size: .92rem; }
.signin-link:hover { background: var(--ink); color: var(--paper); }
.acct-menu { position: relative; }
.acct-btn { list-style: none; cursor: pointer; display: grid; place-items: center; }
.acct-btn::-webkit-details-marker { display: none; }
.acct-menu summary::after { display: none; }
.avatar { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; background: var(--ruled); flex: none; }
.avatar-letter { display: grid; place-items: center; font-weight: 700; text-transform: uppercase; color: var(--ink); }
.menu-who { padding: .45rem .7rem .55rem; font-size: .85rem; color: var(--stamp); border-bottom: 1px solid var(--line); margin-bottom: .3rem; }

.hist-account { display: flex; align-items: center; gap: .6rem; padding: .7rem .5rem 0; flex-wrap: wrap; }
.hist-account .avatar { width: 1.75rem; height: 1.75rem; }
.acct-text { display: grid; min-width: 0; flex: 1; }
.acct-name { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acct-mins { font-size: .76rem; color: var(--stamp); }
.acct-signin { width: 100%; text-align: center; }
.acct-note { font-size: .78rem; color: var(--stamp); width: 100%; }
.hist-signin { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .55rem; padding: 1rem .75rem 3rem; }
.hist-signin svg { width: 2rem; height: 2rem; color: var(--stamp); margin-bottom: .2rem; }
.hs-title { font-weight: 700; font-size: 1rem; }
.hs-text { font-size: .86rem; color: var(--ink-soft); max-width: 15rem; margin-bottom: .4rem; }
.hist-signin .acct-note { text-align: center; }

.r-line { display: flex; align-items: center; gap: .5rem; min-width: 0; margin-top: .15rem; }
.r-line .r-status { margin-top: 0; }
.kind {
  flex: none; font-size: .74rem; font-weight: 700; padding: .12rem .45rem; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-soft); background: var(--paper);
}
.kind.ai { border-color: var(--ink); color: var(--ink); }

.notice {
  flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding: .75rem .9rem;
  border: 1.5px solid var(--ink); border-left: 4px solid var(--rule); border-radius: 10px; background: var(--paper);
  font-size: .93rem;
}
.notice p { flex: 1 1 18rem; color: var(--ink); }
.notice-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.notice .btn-solid, .notice .btn-quiet { padding: .45rem .8rem; font-size: .9rem; }

/* ── Content bands ───────────────────────────────────────────── */
.band { max-width: var(--wrap); margin: 0 auto; padding: 3.5rem 1.5rem; border-top: 1px solid var(--line); }
.band h2 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); max-width: 22ch; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step); display: inline-grid; place-items: center; width: 2rem; height: 2rem; margin-bottom: .9rem;
  border: 2px solid var(--ink); border-radius: 50%; font: 700 .95rem var(--type);
}
.steps h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.steps p { color: var(--ink-soft); max-width: 30rem; }

.why { margin: 2rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem 3rem; }
.why div { border-left: 2px solid var(--rule); padding-left: 1rem; }
.why dt { font-weight: 700; font-size: 1.1rem; }
.why dd { margin: .35rem 0 0; color: var(--ink-soft); max-width: 32rem; }

.faq { margin-top: 1.5rem; max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 1.1rem 2rem 1.1rem 0; font-weight: 700; font-size: 1.1rem; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: 1rem; font: 400 1.4rem var(--ui); color: var(--stamp); }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 1.25rem; color: var(--ink-soft); max-width: 42rem; }

/* ── Legal pages ─────────────────────────────────────────────── */
.legal { max-width: 46rem; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.legal h1 { font-size: clamp(2rem, 4vw, 2.8rem); }
.legal .updated { margin-top: .6rem; color: var(--ink-soft); }
.legal h2 { font-size: 1.3rem; margin: 2rem 0 .6rem; }
.legal p, .legal li { color: var(--ink-soft); }
.legal p + p { margin-top: .8rem; }
.legal ul { padding-left: 1.2rem; }

/* ── Small screens ───────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero { gap: 2rem; padding-top: 2rem; }
  .app { padding: 0 .75rem .75rem; }
  .app-bar { padding: .6rem 0; margin-bottom: .6rem; gap: .6rem; }
  .app-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: .6rem; }
  .player-col .legend, .player-col .follow { display: none; }
  .reader { gap: .5rem; }
  .steps { grid-template-columns: 1fr; gap: 1.75rem; }
  .why { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  :root { --margin: 3.6rem; --lh: 1.65rem; }
  .top { flex-wrap: nowrap; padding: 1rem 1rem; }
  .top nav { display: none; }
  .field { flex-wrap: wrap; gap: 5px; }
  .field input { flex: 1 1 100%; }
  .field button#go { flex: 1; }
  .model-menu { width: min(19rem, 90vw); left: 50%; transform: translateX(-50%); }
  .pillars { gap: .6rem 1.4rem; margin-top: 1.6rem; }
  .signin-link { padding: .35rem .6rem; }
  .sheet { font-size: .95rem; }
  .ptext { padding-left: .75rem; }
  .sheet-body { padding-right: 1rem; }
  .r-info h2 { font-size: 1rem; }
  .app-actions .btn-quiet { display: none; }
  .btn-solid { padding: .5rem .75rem; }
  .live { font-size: 1rem; }
}

/* ── Bulk (Pro) ──────────────────────────────────────────────────── */
.pro-badge {
  display: inline-block; padding: .05rem .45rem; border-radius: 999px; font: 700 .7rem var(--ui);
  letter-spacing: .02em; color: var(--accent); background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); vertical-align: middle;
}
.bulk { max-width: 46rem; margin: 0 auto; padding: 3rem 1rem 4rem; }
.bulk h1 { font-size: clamp(2rem, 5vw, 2.8rem); line-height: 1.05; letter-spacing: -.02em; margin-top: .4rem; }
.bulk .lede { margin-top: .6rem; font-size: 1.05rem; }
.bulk-card, .bulk-lock {
  margin-top: 1.6rem; padding: 1.1rem; background: var(--paper); border: 1.5px solid var(--ink); border-radius: 12px;
  box-shadow: 0 2px 0 var(--ink);
}
.bulk-lock { display: grid; gap: .8rem; justify-items: start; }
.bulk-label { display: block; font-size: .8rem; font-weight: 700; color: var(--stamp); margin-bottom: .35rem; }
#bulk-text {
  width: 100%; padding: .7rem .8rem; border: 1.5px solid var(--line); border-radius: 8px; resize: vertical;
  background: var(--desk); color: var(--ink); font: 400 .95rem/1.5 var(--type);
}
#bulk-text:focus { outline: none; border-color: var(--accent); }
.bulk-row { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-top: .8rem; }
.bulk-hint { font-size: .85rem; color: var(--stamp); }
.bulk-pick-head { margin-top: 0; justify-content: space-between; }
.bulk-all { display: inline-flex; align-items: center; gap: .45rem; font-weight: 700; }
.bulk-total { font-size: .88rem; color: var(--ink-soft); }
.bulk-list { list-style: none; margin: .7rem 0 0; padding: 0; max-height: 26rem; overflow-y: auto; border-top: 1px solid var(--line); }
.bulk-list.run { max-height: none; }
.bulk-item { border-bottom: 1px solid var(--line); }
.bulk-check, .bulk-list.run .bulk-item { display: flex; align-items: center; gap: .65rem; padding: .5rem .2rem; }
.bulk-check { cursor: pointer; }
.bulk-check input, .bulk-all input, .bm input { accent-color: var(--accent); width: 1rem; height: 1rem; flex: none; }
.bulk-thumb { width: 4.5rem; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 5px; background: var(--ruled); flex: none; }
.bulk-title { flex: 1; min-width: 0; font-size: .92rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
a.bulk-title { text-decoration: none; }
a.bulk-title:hover { text-decoration: underline; }
.bulk-len { font: 700 .82rem var(--type); color: var(--stamp); flex: none; }
.bulk-problems { margin-top: .6rem; font-size: .85rem; color: var(--rule); }
.bulk-mode { border: 0; padding: 0; margin: 1rem 0 .4rem; display: grid; gap: .4rem; }
.bm { display: flex; gap: .55rem; align-items: baseline; font-size: .9rem; color: var(--ink-soft); cursor: pointer; }
.bm strong { color: var(--ink); margin-right: .3rem; }
.bulk-run-head { margin-top: 0; justify-content: space-between; }
.bulk-progress { font-weight: 700; }
.bulk-bar { height: 6px; margin-top: .7rem; border-radius: 6px; background: var(--ruled); overflow: hidden; }
.bulk-bar span { display: block; height: 100%; width: 3%; background: var(--accent); transition: width .4s ease; }
.bulk-mid { flex: 1; min-width: 0; display: grid; gap: .1rem; }
.bulk-mid .bulk-title { flex: none; }
.bulk-note { font-size: .8rem; color: var(--stamp); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-item.failed .bulk-note { color: var(--rule); }
.bulk-state { flex: none; font-size: .75rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: var(--ruled); color: var(--ink-soft); }
.bulk-state.running { color: var(--accent); background: var(--accent-soft); }
.bulk-state.done { color: #fff; background: var(--ok); }
.bulk-state.failed { color: #fff; background: var(--rule); }
.bulk-one { flex: none; font-size: .78rem; font-weight: 700; color: var(--ink-soft); }
.bulk-dl { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-top: 1rem; }
.bulk-dl .bulk-label { margin: 0 .3rem 0 0; }
.bulk-dl .btn-solid, .bulk-dl .btn-quiet { padding: .45rem .85rem; font-size: .9rem; }
#bulk-new { margin-top: 1rem; }
@media (max-width: 560px) {
  .bulk-thumb { width: 3.4rem; }
  .bulk-one { display: none; }
}
.bulk-sel { font-weight: 700; }
.bulk-sel .bulk-total { font-weight: 500; }
.bulk-selbtns { display: flex; gap: .4rem; }
.bulk-selbtns .btn-quiet { padding: .35rem .7rem; font-size: .85rem; }
.bulk-batches { margin-top: .7rem; padding: .55rem .7rem; border-radius: 8px; font-size: .86rem; color: var(--ink); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 40%, transparent); }
.bulk-item:has(> .bulk-bn) { border-top: 2px solid var(--accent); }
.bulk-item > .bulk-bn { display: block; padding: .45rem .2rem 0; font-size: .75rem; font-weight: 700; color: var(--accent); }
.bulk-group { padding: .7rem .2rem .3rem; font-size: .8rem; font-weight: 700; color: var(--accent); border-bottom: 1px solid var(--line); }

/* ── Pricing page ────────────────────────────────────────────────── */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin-top: 1.6rem; }
.plan { padding: 1.2rem; background: var(--paper); border: 1.5px solid var(--line); border-radius: 12px; display: grid; gap: .6rem; align-content: start; }
.plan-pro { border-color: var(--ink); box-shadow: 0 2px 0 var(--ink); }
.plan h2 { margin: 0; font-size: 1.2rem; display: flex; align-items: center; gap: .5rem; }
.plan .price { font-size: 2.2rem; font-weight: 800; color: var(--ink); line-height: 1; }
.plan .price span { font-size: .95rem; font-weight: 500; color: var(--ink-soft); }
.plan ul { margin: 0 0 .4rem; display: grid; gap: .35rem; }
.plan .btn-solid, .plan .btn-quiet { justify-self: start; }
.pricing { max-width: 64rem; }
.plans-note { margin-top: .9rem; font-size: .9rem; }
.pricing .plans { grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr)); }
.pricing .plan .price { font-size: 2rem; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.plan .hours { font-size: .95rem; color: var(--ink-soft); }
.plan .hours strong { color: var(--ink); font-size: 1.05rem; }
.feats { list-style: none; padding: 0 !important; margin: .2rem 0 .6rem !important; display: grid; gap: .4rem; }
.feats li { display: flex; gap: .5rem; align-items: baseline; font-size: .92rem; color: var(--ink); }
.feats li.off { color: var(--stamp); }
.feats .mk { flex: none; width: 1rem; text-align: center; font-weight: 800; }
.feats .mk.yes { color: var(--accent); }
.feats .mk.no { opacity: .6; }
.plan .hours .hrs { display: block; font-size: .82rem; color: var(--stamp); }
.plan-soon { font-size: .82rem; color: var(--accent); margin-top: -.2rem; }
.plan-get:disabled { cursor: default; opacity: .75; }
.bulk-saved { flex: none; font-size: .72rem; font-weight: 700; padding: .05rem .45rem; border-radius: 999px; color: var(--accent); background: var(--accent-soft); }
.bulk-name { font-weight: 800; font-size: 1.05rem; margin-bottom: .5rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-name:empty { display: none; }
.folder-icon { display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.folder-icon svg { width: 1.2rem; height: 1.2rem; }

/* ── Pricing popup on the bulk page ─────────────────────────────── */
.pmodal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.pmodal[hidden] { display: none; }
.pmodal-back { position: absolute; inset: 0; background: rgba(10, 14, 20, .55); }
.pmodal-box {
  position: relative; width: min(60rem, 100%); max-height: calc(100vh - 2rem); overflow-y: auto;
  padding: 1.6rem 1.4rem 1.2rem; margin: 0; background: var(--desk); border: 1.5px solid var(--ink); border-radius: 14px;
  box-shadow: 0 24px 60px -20px var(--shadow);
}
.pmodal-box h2 { margin: 0 2.5rem .4rem 0; font-size: 1.5rem; }
.pmodal-box .plans { margin-top: 1rem; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
.pmodal-x { position: absolute; top: .8rem; right: .8rem; }
body.modal-open { overflow: hidden; }

/* Uploading a file: drop box above the link bar */
.dropzone {
  display: flex; flex-direction: column; align-items: center; gap: .35rem; cursor: pointer;
  padding: 1.6rem 1.25rem 1.4rem; border-radius: 12px; background: var(--paper);
  border: 2px dashed color-mix(in srgb, var(--ink) 35%, transparent);
  transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone:focus-visible, body.dragging .dropzone {
  border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--paper)); outline: none;
}
.dropzone.busy { cursor: progress; border-style: solid; border-color: var(--accent); }
.dz-icon { width: 1.9rem; height: 1.9rem; color: var(--accent); }
.dz-title { font-weight: 700; font-size: 1.08rem; }
.dz-sub { font-size: .86rem; color: var(--ink-soft); }
.dz-link { color: var(--accent); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.or-line { display: flex; align-items: center; gap: .8rem; margin: 1rem 0 .9rem; font-size: .85rem; color: var(--stamp); }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: color-mix(in srgb, var(--ink) 15%, transparent); }
.player-frame video, .player-frame audio { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.player-frame.is-audio { aspect-ratio: auto; height: 3.5rem; background: transparent; }
.player-frame.is-audio audio { position: static; height: 3.5rem; background: transparent; }
@media (max-width: 600px) {
  .dropzone { padding: 1.2rem 1rem 1.1rem; }
}
.player-frame .no-media { padding: .9rem 1rem; font-size: .88rem; color: var(--ink-soft); background: var(--paper); border: 1px dashed color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 8px; }
.player-frame.is-audio:has(.no-media) { height: auto; }
.pending .wait-note { grid-column: 2; display: block; margin-top: .2rem; padding-left: 1rem; font-size: .88rem; line-height: 1.45; color: var(--ink-soft); max-width: 52ch; min-height: 1.3em; transition: opacity .25s; }
.pending .wait-note.fade { opacity: 0; }
@media (prefers-reduced-motion: reduce) { .pending .wait-note { transition: none; } }

/* Signed-out preview: end of the first hour */
.preview-end { margin: 1.5rem 1rem 1rem 5.7rem; padding: 1.1rem 1.25rem; border-radius: 12px; background: color-mix(in srgb, var(--accent) 9%, var(--paper)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); }
.preview-end .pe-title { font-weight: 700; font-size: 1.05rem; }
.preview-end .pe-text { margin: .25rem 0 .85rem; color: var(--ink-soft); }
.preview-end .pe-btn { display: inline-block; text-decoration: none; }
@media (max-width: 600px) { .preview-end { margin-left: .5rem; margin-right: .5rem; } }

/* Signed out: the locked three quarters of a Whisper transcript */
.w.locked { filter: blur(4.5px); user-select: none; -webkit-user-select: none; pointer-events: none; color: var(--ink-soft); }
.w.revealed { background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 3px; padding: 0 2px; }
.lock-bar { margin: 1.4rem 1rem 1.2rem 5.7rem; padding: 1.1rem 1.25rem; border-radius: 12px; background: color-mix(in srgb, var(--accent) 9%, var(--paper)); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); position: relative; z-index: 1; }
.lock-bar .lock-title { font-weight: 700; font-size: 1.05rem; }
.lock-bar .lock-text { margin: .25rem 0 .85rem; color: var(--ink-soft); font-size: .92rem; }
.lock-bar .lock-btn { display: inline-block; text-decoration: none; }
@media (max-width: 600px) { .lock-bar { margin-left: .5rem; margin-right: .5rem; } }
@media print { .w.locked { display: none; } }
.lock-bar .lock-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
