/* Banner Hooks Engine — design port from the original product mock
   Token system, type scale, and every component rule below is a 1:1
   port of /tmp/bannerdesign/bnrhook/project/styles.css with the
   production-only additions at the bottom (error screen, batch list,
   mobile drawer, reduced-motion, filter empty states, hook index). */

:root {
  --font-body: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;

  --bg:        #0A0A0B;
  --bg-2:      #111113;
  --card:      #141416;
  --card-2:    #1A1A1D;
  --line:      rgba(255,255,255,0.07);
  --line-2:    rgba(255,255,255,0.12);
  --ink:       #EDEBE4;
  --ink-mute:  rgba(237,235,228,0.60);
  /* Bumped 0.38 -> 0.58 so secondary body copy clears WCAG AA (~5.9:1 on the
     #0A0A0B background). Decorative-only uses (--ink-ghost) are unaffected. */
  --ink-dim:   rgba(237,235,228,0.58);
  --ink-ghost: rgba(237,235,228,0.18);

  /* Crimson (design finalised). Only on icons / highlights / primary button. */
  --accent:        #D96A6A;
  --accent-soft:   rgba(217,106,106,0.16);
  --accent-ring:   rgba(217,106,106,0.42);

  --success:      #6EEBA0;
  --warn:         #F5B25C;
  --error:        #EF6B6B;
  --error-soft:   rgba(239,107,107,0.10);

  --radius:    16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --results-rail: min(992px, calc(100vw - 48px));
  --transcript-rail: min(880px, 100%);
  --title-rail: min(460px, 100%);
}

/* v24.0 — two-mode home + composer UI from the Bannerhook UX reference.
   Scope: landing, Normal input composer, and Pro setup only. Results,
   progress, API payloads, and generation behavior stay on the existing
   production paths. */
.home2 {
  width: 100%;
  min-height: calc(100vh - 130px); min-height: calc(100dvh - 130px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 44px;
  padding: 24px 24px 64px;
  overflow: hidden;
  isolation: isolate;
}
.home2-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.home2-mark {
  display: grid;
  place-items: center;
  color: var(--accent);
  filter: drop-shadow(0 0 36px rgba(217,106,106,0.20));
  animation: home2-float 9s ease-in-out infinite;
}
@keyframes home2-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.home2-word {
  margin: 0;
  font-size: clamp(44px, 5.4vw, 76px);
  font-weight: 620;
  line-height: 0.96;
  letter-spacing: 0;
  color: var(--ink);
}
.home2-tagline {
  max-width: 46ch;
  font-size: clamp(15px, 1.25vw, 17px);
  line-height: 1.45;
  color: var(--ink-mute);
}
.home-actions {
  width: min(1040px, calc(100vw - 36px));
  display: grid;
  gap: 22px;
}
.home-actions__primary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.home-action {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(20,20,22,0.92);
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 18px;
  padding: 24px;
  color: var(--ink);
  box-shadow: 0 28px 80px rgba(0,0,0,0.28);
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}
.home-action:hover {
  border-color: rgba(217,106,106,0.42);
  background: rgba(24,24,26,0.96);
  transform: translateY(-1px);
}
.home-action:focus-visible {
  border-color: rgba(217,106,106,0.42);
  background: rgba(24,24,26,0.96);
  transform: translateY(-1px);
  outline: 2px solid var(--accent-ring);
  outline-offset: 3px;
}
.home-action__icon,
.more-context__icon,
.more-context__mini-icon {
  width: 54px;
  height: 54px;
  display: inline-grid;
  place-items: center;
  border-radius: 16px;
  background: rgba(217,106,106,0.12);
  color: var(--accent);
}
.home-action__icon svg,
.more-context__icon svg,
.more-context__mini-icon svg {
  width: 24px;
  height: 24px;
}
.home-action__label {
  font-size: 22px;
  font-weight: 650;
  letter-spacing: 0;
}
.home-action__mode {
  min-height: 24px;
  padding: 4px 10px;
  border: 1px solid rgba(217,106,106,0.34);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(217,106,106,0.08);
  font-size: 12px;
  font-weight: 650;
}
.more-context {
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(80% 100% at 50% 0%, rgba(217,106,106,0.06) 0%, transparent 58%),
    rgba(20,20,22,0.92);
  overflow: hidden;
  box-shadow: 0 26px 80px rgba(0,0,0,0.26);
}
.more-context--open {
  border-color: rgba(217,106,106,0.34);
  box-shadow: 0 0 0 1px rgba(217,106,106,0.12) inset, 0 28px 86px rgba(0,0,0,0.30);
}
.more-context__head {
  width: 100%;
  min-height: 104px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas:
    "icon title chev"
    "icon sub chev";
  align-items: center;
  gap: 4px 18px;
  padding: 24px 30px;
  text-align: left;
}
.more-context__head:hover {
  background: rgba(255,255,255,0.025);
}
.more-context__head:focus-visible {
  background: rgba(255,255,255,0.025);
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.more-context__icon { grid-area: icon; }
.more-context__title {
  grid-area: title;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 25px;
  font-weight: 680;
  letter-spacing: 0;
}
.more-context__pro,
.more-context__optional {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(217,106,106,0.42);
  border-radius: 999px;
  color: var(--accent);
  background: rgba(217,106,106,0.08);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.more-context__sub {
  grid-area: sub;
  color: var(--ink-dim);
  font-size: 16px;
  line-height: 1.35;
}
.more-context__chev {
  grid-area: chev;
  color: var(--accent);
  font-size: 26px;
  line-height: 1;
}
.more-context__body {
  display: grid;
  gap: 24px;
  padding: 0 30px 30px;
  border-top: 1px solid var(--line);
}
.more-context__intro {
  margin: 24px 0 0;
  max-width: 78ch;
  color: var(--ink-mute);
  font-size: 15px;
  line-height: 1.45;
}
.more-context__section {
  display: grid;
  gap: 16px;
  padding-top: 28px;
}
.more-context__section-head {
  display: grid;
  grid-template-columns: auto minmax(0, auto) auto 1fr;
  align-items: center;
  gap: 14px;
}
.more-context__mini-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(255,255,255,0.035);
}
.more-context__section-title {
  font-size: 21px;
  font-weight: 650;
}
.more-context__section-hint {
  min-width: 0;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.35;
}
.more-context__or {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
}
.more-context__or span {
  height: 1px;
  background: var(--line);
}
.more-context__or b {
  min-height: 32px;
  padding: 6px 14px;
  border: 1px solid rgba(217,106,106,0.42);
  border-radius: 999px;
  background: rgba(217,106,106,0.08);
}
.more-context__notice {
  margin-top: 20px;
  border: 1px solid rgba(217,106,106,0.34);
  border-radius: 14px;
  background: rgba(217,106,106,0.08);
  color: var(--accent);
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.4;
}
.comp {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.comp-stage {
  width: 100%;
  max-width: 720px;
  margin: 16px auto 80px;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.comp-stage--pro { max-width: 760px; }
.back-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  padding: 0 14px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-mute);
  font-size: 13px;
  transition: background 140ms, border-color 140ms, color 140ms;
}
.back-btn:hover,
.back-btn:focus-visible {
  color: var(--ink);
  border-color: var(--line-2);
  background: rgba(255,255,255,0.045);
  outline: none;
}
.comp-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
}
.comp-title-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(217,106,106,0.30);
  border-radius: 16px;
  color: var(--accent);
  background: radial-gradient(circle at 50% 38%, rgba(217,106,106,0.22), rgba(217,106,106,0.05) 58%, transparent 78%);
}
.comp-title-icon svg {
  width: 24px;
  height: 24px;
}
.comp-title-block {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.comp-title-eyebrow {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.comp-title-eyebrow.pro-eyebrow { color: var(--accent); }
.comp-h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(30px, 4.2vw, 36px);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 650;
}
.pro-intro {
  max-width: 60ch;
  margin: 2px 0 0;
  color: var(--ink-dim);
  font-size: 13.5px;
  line-height: 1.5;
}
.composer-body {
  margin: 0;
}
.pro-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-2);
  margin: 0;
}
.pro-tabs__btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink-dim);
  font-size: 13px;
  font-weight: 560;
  white-space: nowrap;
}
.pro-tabs__btn:hover {
  color: var(--ink-mute);
}
.pro-tabs__btn[data-active="true"] {
  color: var(--ink);
  background: rgba(255,255,255,0.055);
  box-shadow: inset 0 0 0 1px var(--line);
}
.pro-tabs__btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pro-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.pro-label {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,0.025);
}
.pro-label-icon {
  width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid rgba(217,106,106,0.28);
  border-radius: 8px;
  background: rgba(217,106,106,0.10);
  color: var(--accent);
}
.pro-label-icon svg {
  width: 15px;
  height: 15px;
}
.pro-label-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
  white-space: nowrap;
}
.pro-label--source .pro-label-title,
.pro-label--request .pro-label-title {
  color: var(--accent);
}
.pro-label-hint {
  margin-left: auto;
  color: var(--ink-ghost);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pro-section--source {
  position: relative;
  margin-top: 6px;
  padding-top: 30px;
}
.pro-section--source::before {
  content: "+";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  transform: translateX(-50%);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  background: var(--bg);
}
.pro-request__ta {
  min-height: 108px;
}
.pro-status {
  margin: -2px 0 0;
  color: var(--ink-dim);
  font-size: 13px;
  text-align: center;
}
.pro-status[data-state="ready"] { color: var(--accent); }
.composer-cta {
  justify-content: space-between;
  padding-top: 0;
}
.btn-generate {
  min-height: 50px;
  min-width: 272px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 20px;
  border: 1px solid rgba(217,106,106,0.50);
  border-radius: 14px;
  background: var(--accent);
  color: #160606;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(255,255,255,0.22) inset, 0 16px 32px rgba(0,0,0,0.30);
  transition: transform 150ms, filter 150ms, opacity 150ms;
}
.btn-generate:hover:not([disabled]) {
  transform: translateY(-1px);
  filter: brightness(1.04);
}
.btn-generate:focus-visible:not([disabled]) {
  transform: translateY(-1px);
  filter: brightness(1.04);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.btn-generate[disabled] {
  opacity: 1;
  cursor: not-allowed;
  transform: none;
  filter: none;
  color: var(--ink-dim);
  border-color: var(--line);
  background: rgba(255,255,255,0.045);
  box-shadow: none;
}
.btn-generate .bg-icon {
  display: inline-flex;
}
.btn-generate.pro-submit {
  min-width: 282px;
  min-height: 46px;
}
.input-summary {
  margin: 0;
}

@media (max-width: 820px) {
  .home2 {
    justify-content: flex-start;
    padding-top: 44px;
  }
  .home-actions {
    width: min(620px, calc(100vw - 24px));
  }
  .home-actions__primary {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .home-action {
    min-height: 92px;
    grid-template-columns: auto 1fr;
    align-content: center;
    justify-items: start;
    text-align: left;
    padding: 18px 22px;
    border-radius: 20px;
  }
  .home-action__icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }
  .home-action__label {
    font-size: 22px;
  }
  .more-context__head {
    min-height: 92px;
    padding: 18px 22px;
    gap: 3px 14px;
  }
  .more-context__title {
    font-size: 22px;
  }
  .more-context__sub {
    font-size: 15px;
  }
  .more-context__body {
    padding: 0 18px 22px;
  }
  .more-context__section-head {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .more-context__section-hint {
    grid-column: 2 / -1;
  }
  .comp-stage {
    max-width: none;
    width: calc(100vw - 24px);
    padding: 0;
    margin-top: 12px;
    margin-bottom: 48px;
  }
  .comp-title-row {
    gap: 14px;
  }
  .comp-title-icon {
    width: 48px;
    height: 48px;
  }
  .pro-tabs {
    grid-template-columns: 1fr;
  }
  .pro-label {
    align-items: flex-start;
  }
  .pro-label-hint {
    white-space: normal;
    text-align: right;
  }
  .composer-cta {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-generate {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .home2 {
    gap: 30px;
  }
  .home2-word {
    font-size: clamp(42px, 15vw, 66px);
  }
  .home2-mark svg {
    width: 94px;
    height: 94px;
  }
  .comp-h1 {
    font-size: 30px;
  }
  .pro-label {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 6px 10px;
  }
  .pro-label-hint {
    grid-column: 2;
    margin-left: 0;
    text-align: left;
  }
  .fileline {
    grid-template-columns: 24px minmax(0, 1fr) auto 28px;
  }
  .fileline__status {
    display: none;
  }
}

.pro-urlbox {
  width: 100%;
}

.pro-foot-row {
  padding-left: 0;
}

.drop--pro {
  width: 100%;
  min-height: 138px;
}

.files--pro {
  margin-bottom: 8px;
}

.pro-request__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.pro-request__chip {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ink-mute);
  background: rgba(255,255,255,0.03);
  font-size: 12.5px;
}

.pro-request__chip:hover,
.pro-request__chip:focus-visible {
  border-color: var(--accent-ring);
  color: var(--ink);
  outline: none;
}

/* v25 home reference: primary actions first, optional full source second,
   transcript-only as a separate blue utility. */
.home2 {
  justify-content: center;
  gap: clamp(24px, 4vh, 44px);
  padding: clamp(26px, 4vh, 44px) 24px 70px;
}
.home2-hero { gap: 12px; }
.home2-brand {
  display: grid;
  justify-items: center;
  gap: 12px;
}
.home2-mark {
  width: 92px;
  height: 92px;
}
.home2-mark svg {
  width: 82px;
  height: 82px;
}
.home2-word {
  font-size: clamp(48px, 4.8vw, 68px);
  font-weight: 580;
}
.home2-tagline {
  max-width: 48ch;
  color: rgba(237,235,228,0.58);
  font-size: clamp(16px, 1.15vw, 20px);
  line-height: 1.35;
}
.home-actions {
  width: min(1060px, calc(100vw - 80px));
  gap: clamp(26px, 4.2vh, 48px);
}
.home-actions__primary { gap: 20px; }
.home-action {
  min-height: 148px;
  border-radius: 24px;
  gap: 14px;
  padding: 20px 20px;
  background: rgba(20,20,22,0.84);
  box-shadow: 0 24px 72px rgba(0,0,0,0.22);
}
.home-action:hover {
  border-color: rgba(255,255,255,0.17);
  background: rgba(23,23,25,0.92);
  transform: translateY(-2px);
}
.home-action:focus-visible {
  border-color: rgba(255,255,255,0.17);
  background: rgba(23,23,25,0.92);
  transform: translateY(-2px);
  outline: 2px solid var(--accent-ring);
  outline-offset: 3px;
}
.home-action__icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: rgba(217,106,106,0.15);
  box-shadow: 0 14px 34px rgba(0,0,0,0.22);
}
.home-action__icon svg {
  width: 24px;
  height: 24px;
}
.home-action__label {
  font-size: clamp(21px, 1.45vw, 25px);
  font-weight: 680;
  line-height: 1.08;
}
.home-link-platforms {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  color: var(--ink-dim);
  background: rgba(255,255,255,0.025);
  font-size: 17px;
}
.home-link-platforms__dot {
  color: rgba(237,235,228,0.22);
  font-size: 13px;
}

.more-context--compact {
  width: min(680px, 100%);
  justify-self: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}
.more-context--compact.more-context--open {
  width: min(820px, 100%);
  border: 1px solid rgba(217,106,106,0.30);
  border-radius: 24px;
  background:
    radial-gradient(90% 130% at 50% 100%, rgba(217,106,106,0.10) 0%, transparent 66%),
    rgba(20,20,22,0.90);
  box-shadow: 0 0 0 1px rgba(217,106,106,0.10) inset, 0 30px 100px rgba(0,0,0,0.28);
  overflow: hidden;
}
.more-context--compact:not(.more-context--open) .more-context__head {
  min-height: 0;
  display: flex;
  justify-content: center;
  padding: 0;
  background: transparent;
}
.more-context--compact:not(.more-context--open) .more-context__head:hover {
  background: transparent;
}
.more-context--compact:not(.more-context--open) .more-context__head:focus-visible {
  background: transparent;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.more-context--compact .more-context__home-copy {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 18px;
  color: var(--ink);
}
.more-context--compact .more-context__more {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 22px;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.28em;
}
.more-context--compact .more-context__more::before,
.more-context--compact .more-context__more::after {
  content: "";
  height: 1px;
  background: rgba(255,255,255,0.055);
}
.more-context__optional-line {
  max-width: 100%;
  box-sizing: border-box;
  text-align: center;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: clamp(13px, 1vw, 16px);
  font-weight: 800;
  letter-spacing: 0.34em;
  text-transform: uppercase;
}
.more-context__home-line {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 14px;
  color: var(--ink);
  font-size: clamp(20px, 1.55vw, 25px);
  font-weight: 690;
  line-height: 1.18;
}
.more-context__plus {
  color: var(--accent);
  font-size: 24px;
  font-weight: 440;
  line-height: 1;
}
.more-context--compact .more-context__home-line .more-context__pro {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  line-height: 1;
}
.more-context--compact:not(.more-context--open) .more-context__chev { display: none; }
.more-context--compact.more-context--open .more-context__head {
  min-height: 92px;
  padding: 24px 28px;
  display: flex;
  align-items: center;
}
.more-context--compact.more-context--open .more-context__home-copy {
  gap: 8px;
  justify-items: start;
  text-align: left;
}
.more-context--compact.more-context--open .more-context__more { display: none; }
.more-context--compact.more-context--open .more-context__optional-line {
  color: var(--accent);
  font-size: 12px;
  letter-spacing: 0.18em;
}
.more-context--compact.more-context--open .more-context__home-line {
  justify-content: flex-start;
  font-size: 22px;
}
.more-context--compact.more-context--open .more-context__body {
  padding: 0 28px 28px;
}
.more-context--compact .more-context__intro { margin-top: 18px; }

.transcribe-home {
  width: min(500px, 100%);
  justify-self: center;
  display: grid;
  gap: 18px;
}
.transcribe-home__divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 18px;
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.26em;
}
.transcribe-home__divider span {
  height: 1px;
  background: rgba(255,255,255,0.075);
}
.transcribe-card {
  min-height: 72px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  border: 1px solid rgba(90,149,242,0.42);
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(47,98,173,0.24), rgba(35,71,132,0.13));
  color: #8fbaff;
  text-align: left;
  box-shadow: 0 22px 80px rgba(23,70,140,0.10);
}
.transcribe-card:hover,
.transcribe-card:focus-visible {
  outline: none;
  border-color: rgba(110,169,255,0.72);
  background: linear-gradient(135deg, rgba(47,98,173,0.30), rgba(35,71,132,0.18));
}
.transcribe-card__icon,
.transcribe-card__arrow {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(110,169,255,0.34);
  border-radius: 14px;
  background: rgba(52,103,190,0.16);
  color: #7db1ff;
}
.transcribe-card__copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}
.transcribe-card__title {
  color: #9fc5ff;
  font-size: 17px;
  font-weight: 680;
  line-height: 1.2;
}
.transcribe-card__sub {
  color: rgba(126,177,255,0.64);
  font-size: 14px;
  line-height: 1.25;
}

.transcribe-only {
  width: min(1220px, calc(100vw - 64px));
  min-height: calc(100vh - 132px); min-height: calc(100dvh - 132px);
  margin: 0 auto;
  padding: clamp(36px, 8vh, 94px) 0 72px;
  display: grid;
  align-content: start;
  gap: 30px;
}
.transcribe-only .back-btn { justify-self: start; }
.transcribe-only__head {
  display: grid;
  gap: 18px;
  text-align: left;
}
.transcribe-only__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #74adff;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.28em;
}
.transcribe-only__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #74adff;
  box-shadow: 0 0 0 7px rgba(116,173,255,0.10);
}
.transcribe-only__title {
  margin: 0;
  color: var(--ink);
  font-size: clamp(46px, 6vw, 68px);
  font-weight: 660;
  line-height: 0.96;
  letter-spacing: 0;
}
.transcribe-only__sub {
  margin: 0;
  max-width: 70ch;
  color: var(--ink-mute);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.3;
}
.transcribe-only__tabs {
  width: max-content;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(20,20,22,0.90);
}
.transcribe-only__tab {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 20px;
  border-radius: 13px;
  color: var(--ink-mute);
  font-size: 20px;
}
.transcribe-only__tab.is-active {
  color: var(--ink);
  background: rgba(255,255,255,0.055);
}
.transcribe-only__form {
  display: grid;
  gap: 18px;
}
.transcribe-only__labelrow {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  color: var(--ink-dim);
  font-size: 20px;
}
.transcribe-only__labelrow span:first-child {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.28em;
}
.transcribe-urlbox {
  min-height: 78px;
  padding: 0 28px;
  border-radius: 18px;
}
.transcribe-urlbox .urlbox__input { font-size: 24px; }
.transcribe-only__status {
  min-height: 22px;
  color: var(--ink-dim);
  font-size: 14px;
}
.transcribe-only__status.is-error,
.transcribe-only__error { color: var(--error); }
.transcribe-only__notice {
  color: var(--ink-dim);
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.035);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
}
.drop--transcribe { min-height: 210px; }
.transcribe-only__cta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 32px;
}
.transcribe-only__note {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.34em;
}
.transcribe-only__btn {
  min-width: 230px;
  background: #486c95;
  color: #07101d;
  box-shadow: 0 22px 76px rgba(56,103,160,0.18);
}
.transcribe-result {
  margin-top: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(20,20,22,0.92);
  overflow: hidden;
}
.transcribe-result__head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}
.transcribe-result__head h2 {
  margin: 0;
  color: var(--ink);
  font-size: 22px;
}
.transcribe-result__head p {
  margin: 6px 0 0;
  color: var(--ink-dim);
}
.transcribe-result__actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.transcribe-result__body {
  margin: 0;
  max-height: 420px;
  overflow: auto;
  padding: 24px;
  color: var(--ink-mute);
  white-space: pre-wrap;
  word-break: break-word;
  font: 15px/1.65 var(--font-body);
}

@media (max-width: 820px) {
  .home2 {
    gap: 26px;
    padding: 26px 16px 64px;
  }
  .home2-brand {
    gap: 10px;
  }
  .home2-mark {
    width: 74px;
    height: 74px;
  }
  .home2-mark svg {
    width: 66px;
    height: 66px;
  }
  .home2-word {
    font-size: clamp(42px, 13vw, 58px);
  }
  .home2-tagline {
    max-width: min(34ch, calc(100vw - 34px));
    font-size: 17px;
  }
  .home-actions {
    width: min(560px, calc(100vw - 28px));
    gap: 28px;
  }
  .home-actions__primary { gap: 18px; }
  .home-action {
    min-height: 116px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    gap: 14px;
    padding: 20px 18px;
    border-radius: 22px;
  }
  .home-action__icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
  }
  .home-action__label { font-size: 23px; }
  .more-context--compact { width: 100%; }
  .more-context--compact .more-context__home-copy { gap: 18px; }
  .more-context__home-line {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, auto) auto;
    gap: 12px;
    font-size: 22px;
  }
  .more-context__home-title {
    min-width: 0;
    text-align: left;
  }
  .more-context__optional-line {
    padding-inline: 10px;
    font-size: 12px;
    letter-spacing: 0.20em;
    line-height: 1.6;
  }
  .more-context--compact.more-context--open { width: 100%; }
  .more-context--compact.more-context--open .more-context__head,
  .more-context--compact.more-context--open .more-context__body {
    padding-left: 22px;
    padding-right: 22px;
  }
  .transcribe-home { width: min(500px, 100%); }
  .transcribe-card {
    min-height: 76px;
    padding: 14px;
  }
  .transcribe-card__title { font-size: 18px; }
  .transcribe-only {
    width: calc(100vw - 28px);
    padding: 32px 0 56px;
    gap: 26px;
  }
  .transcribe-only__title {
    font-size: clamp(48px, 13vw, 64px);
  }
  .transcribe-only__sub { font-size: 24px; }
  .transcribe-only__tabs { width: 100%; }
  .transcribe-only__labelrow {
    display: grid;
    gap: 8px;
    font-size: 18px;
  }
  .transcribe-urlbox {
    min-height: 76px;
    padding: 0 18px;
  }
  .transcribe-urlbox .urlbox__input { font-size: 21px; }
  .transcribe-only__cta {
    display: grid;
    justify-content: stretch;
  }
  .transcribe-only__btn { width: 100%; }
  .transcribe-only__note {
    text-align: center;
    font-size: 13px;
  }
  .transcribe-result__head { display: grid; }
  .transcribe-result__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.pro-badge {
  color: var(--accent);
}

@media (max-width: 760px) {
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-feature-settings: "ss01","cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* ──────────────── App shell ──────────────── */
.app { position: relative; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; }
.bg { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
/* Soft corner glows. Built as radial-gradients, NOT blur(120px) on a solid
   circle: a 120px filter on a 640px element forces a huge offscreen blur buffer
   that pins low-end mobile GPUs and makes the whole app feel laggy. A gradient
   is the same look for ~zero cost. */
.bg__a, .bg__b { position: absolute; border-radius: 50%; }
.bg__a { width: 920px; height: 920px; left: -300px; bottom: -380px; background: radial-gradient(circle, rgba(255,255,255,0.05), rgba(255,255,255,0) 70%); }
.bg__b { width: 760px; height: 760px; right: -300px; top: -340px; background: radial-gradient(circle, rgba(255,255,255,0.04), rgba(255,255,255,0) 70%); }

.topbar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; gap: 12px; }
.topbar__left,
.topbar__right {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.topbar__left { flex: 1 1 auto; }
.topbar__right { flex: 0 0 auto; justify-content: flex-end; }
.topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  min-height: 44px;
  box-sizing: border-box;
  padding: 5px 9px 5px 5px;
  border-radius: 12px;
  color: var(--ink);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}
.topbar__brand:hover { background: rgba(255,255,255,0.045); }
.topbar__brand:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.topbar__brandmark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex: 0 0 auto;
}
.topbar__brandword {
  font-family: var(--font-display, var(--font-body));
  font-size: 15px;
  font-weight: 560;
  letter-spacing: 0;
  white-space: nowrap;
}
.topbar__history {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 7px 12px; border-radius: 99px;
  font-size: 12px; color: var(--ink-mute);
  border: 1px solid var(--line); transition: all 150ms;
}
.topbar__history:hover { border-color: var(--line-2); color: var(--ink); background: var(--card); }
.topbar__kbd {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-dim); padding: 2px 6px;
  border: 1px solid var(--line); border-radius: 5px;
}

/* v16.0 — Topbar Clerk UserButton slot.
   The Clerk-mounted button replaces the inner content. We just give it
   a predictable anchor position on the right and a height that matches
   the History chip. */
.topbar__user {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
}
.topbar__account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 3px 4px 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-mute);
  background: rgba(255,255,255,0.025);
  cursor: pointer;
}
.topbar__account:hover {
  color: var(--ink);
  border-color: var(--line-2);
  background: var(--card);
}
.topbar__account-label {
  font-size: 12px;
  font-weight: 560;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════════
   v16.0 — Auth screens (splash + sign-in)
   ══════════════════════════════════════════════════════════════════ */

.auth-splash {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  color: var(--ink-mute);
  padding: 40px 20px;
  text-align: center;
}
.auth-splash__logo {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display, var(--font-sans));
  font-size: 24px;
  font-weight: 520;
  color: var(--ink);
  letter-spacing: 0;
  margin-bottom: 8px;
}
.auth-splash__mark {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
}
.auth-splash__word { line-height: 1; }
.auth-splash__msg {
  font-size: 14px;
  color: var(--ink-dim);
}
.auth-splash__dp {
  margin-top: 6px;
}
.auth-splash__err {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--error, #ef6b6b);
  background: rgba(239, 107, 107, 0.06);
  border: 1px solid rgba(239, 107, 107, 0.25);
  border-radius: 10px;
  padding: 10px 14px;
  max-width: 520px;
  word-break: break-word;
  margin-top: 6px;
}
.auth-splash__actions {
  display: flex; gap: 10px;
  margin-top: 12px;
}
.auth-splash__diag {
  margin-top: 16px;
  font-size: 12px;
  color: var(--ink-dim);
  max-width: 560px;
  width: 100%;
}
.auth-splash__diag summary {
  cursor: pointer;
  padding: 6px 0;
  color: var(--ink-mute);
}
.auth-splash__diag pre {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-mute);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  overflow: auto;
  max-height: 220px;
  white-space: pre-wrap;
  word-break: break-word;
}

.auth-screen {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center;
  padding: 60px 20px 40px;
  gap: 28px;
}
.auth-screen__brand {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px;
  max-width: 440px;
  text-align: center;
}
.auth-screen__mark {
  color: var(--accent);
  display: inline-flex;
  filter: drop-shadow(0 6px 20px rgba(217,106,106,0.25));
}
.auth-screen__logo {
  font-size: 36px;
  font-weight: 520;
  letter-spacing: 0;
  color: var(--ink);
  line-height: 1;
}
.auth-screen__tag {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink-dim);
}
.auth-screen__clerk {
  /* Clerk mounts its own card here; we just make sure the wrapper
     centres and caps at a reasonable width. */
  width: 100%;
  max-width: 440px;
  display: flex;
  justify-content: center;
}

/* Clerk's card sometimes ships a white background — force-match the
   dark palette via CSS variables passed to mountSignIn() */
.cl-card,
.cl-rootBox,
.cl-formButtonPrimary {
  font-family: 'Inter Tight', system-ui, sans-serif !important;
}

/* v16.0.4 — CSS failsafe for the UserButton dropdown. Clerk's internal
   classnames (cl-userButtonPopoverActionButton etc.) get baseline light-
   mode colours from their default stylesheet. The appearance={} prop
   should win, but occasional specificity inversions can leave action-
   button text dim on our dark background. These rules make sure the
   "Manage account" / "Sign out" rows are always legible. */
.cl-userButtonPopoverCard,
.cl-userButtonPopoverMain,
.cl-userButtonPopoverActions {
  background-color: #141416 !important;
}
.cl-userButtonPopoverActionButton,
.cl-userButtonPopoverActionButton__manageAccount,
.cl-userButtonPopoverActionButton__signOut {
  color: #F5F5F7 !important;
}
.cl-userButtonPopoverActionButton:hover,
.cl-userButtonPopoverActionButton__manageAccount:hover,
.cl-userButtonPopoverActionButton__signOut:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
}
.cl-userButtonPopoverActionButtonText {
  color: #F5F5F7 !important;
}
.cl-userButtonPopoverActionButtonIcon {
  color: #a5a5ac !important;
}
.cl-userButtonPopoverFooter {
  background-color: #0A0A0B !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}
.cl-userPreview .cl-userPreviewMainIdentifier {
  color: #F5F5F7 !important;
}
.cl-userPreview .cl-userPreviewSecondaryIdentifier {
  color: #a5a5ac !important;
}

.auth-screen__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  margin-bottom: 16px;
  padding: 7px 10px;
  border-radius: 10px;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  text-decoration: none;
  font-size: 13px;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}
.auth-screen__back:hover {
  color: var(--ink);
  background: var(--card);
  border-color: var(--line-2);
}
.auth-screen__back:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.stage {
  position: relative; z-index: 1;
  flex: 1;
  display: flex; justify-content: center; align-items: center;
  padding: 32px 24px 80px;
  min-height: calc(100vh - 62px); min-height: calc(100dvh - 62px);
}

/* Screen visibility — kept mounted, toggled to preserve input DOM */
.screen { display: none; width: 100%; justify-content: center; align-items: center; }
.screen[data-active="true"] { display: flex; flex-direction: column; }
.screen:focus { outline: none; }

/* ──────────────── v19.0 Brand wordmark primitives ──────────────── */
/* `banner·hook.` — centred dot between the words + crimson period.
   Shared by hero, auth splash, sign-in, and any future lockup. */
.mid-dot {
  display: inline-block;
  width: 0.2em; height: 0.2em;
  border-radius: 50%;
  background: currentColor;
  margin: 0 0.14em;
  vertical-align: 0.32em;
  opacity: 0.85;
}
.brand-dot {
  color: var(--accent);
}

/* ──────────────── Hero (v19.0 logo port) ──────────────── */
.hero {
  width: 100%; max-width: 820px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
/* The mark sits in a soft crimson glow, matching the design file's
   radial-gradient treatment. Bigger (140px) to let the new 120px
   fishing-hook SVG breathe. */
.hero__mark {
  width: 140px; height: 140px;
  display: grid; place-items: center;
  border-radius: 36px;
  background: radial-gradient(circle at 30% 30%, rgba(217,106,106,0.12), transparent 65%);
  color: var(--accent);
  margin-bottom: 24px;
  filter: drop-shadow(0 12px 32px rgba(217,106,106,0.18));
}
/* Wordmark: banner·hook. — hero size. Matches the design lockup. */
.hero__wordmark {
  font-size: 64px;
  line-height: 1.0;
  letter-spacing: 0;
  font-weight: 520;
  margin: 0 0 12px;
  text-wrap: balance;
}
.hero__tag {
  font-size: 15px;
  color: var(--ink-mute);
  margin: 0 0 40px;
  max-width: 46ch;
  line-height: 1.5;
}
.hero__h {
  font-size: 52px;
  line-height: 1.04;
  letter-spacing: 0;
  font-weight: 520;
  margin: 0 0 40px;
  text-wrap: balance;
  max-width: 16ch;
}

.picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  width: 100%;
  max-width: 580px;
}
.pick {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 32px 16px 26px;
  border-radius: var(--radius-lg);
  background: var(--card);
  border: 1px solid var(--line);
  transition: all 180ms cubic-bezier(.2,.7,.2,1);
  position: relative; overflow: hidden;
  text-align: center;
}
.pick:hover {
  transform: translateY(-3px);
  border-color: var(--accent-ring);
  background: var(--card-2);
}
.pick:focus-visible { outline: 2px solid var(--accent-ring); outline-offset: 3px; }
.pick__icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}
.pick__title { font-size: 14.5px; font-weight: 540; letter-spacing: 0; color: var(--ink); }

/* ──────────────── Input Card ──────────────── */
.card {
  width: 100%; max-width: 620px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 24px 26px 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  position: relative;
}
.card__back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-mute);
  padding: 5px 10px 5px 6px; border-radius: 8px;
  margin-bottom: 10px; margin-left: -8px;
}
.card__back:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.card__badge {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
}
.card__title { font-size: 20px; letter-spacing: 0; font-weight: 540; margin: 0; }
.card__body { margin-bottom: 16px; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.stack__item { display: flex; flex-direction: column; gap: 6px; }
.stack__head { display: flex; justify-content: space-between; align-items: center; padding: 0 2px; }
.stack__n { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-dim); }
.stack__x {
  width: 22px; height: 22px; border-radius: 6px;
  display: grid; place-items: center;
  color: var(--ink-dim);
}
.stack__x:hover { background: rgba(255,255,255,0.06); color: var(--ink); }
.stack__item--row { display: flex; flex-direction: row; align-items: center; gap: 10px; }
.stack__rownum {
  font-family: var(--font-mono);
  font-size: 11px; color: var(--ink-dim);
  width: 20px; text-align: center;
}
.stack__x--align { align-self: center; }
.stack__foot { padding: 4px 2px 0; }
.stack__foot--row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-left: 30px;
}
.platform-pill {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-dim);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 7px;
  background: rgba(255,255,255,0.025);
}

.ta {
  width: 100%; min-height: 120px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  resize: vertical;
  font-size: 14px; line-height: 1.6;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.ta::placeholder { color: var(--ink-dim); }
.ta:focus { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }

.urlbox {
  flex: 1;
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: border-color 150ms, box-shadow 150ms;
}
.urlbox:focus-within { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.urlbox:has(.urlbox__input[aria-invalid="true"]) {
  border-color: rgba(255,124,124,0.58);
  box-shadow: 0 0 0 3px rgba(255,124,124,0.08);
}
.urlbox__icon { color: var(--ink-dim); display: inline-flex; }
.urlbox__input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  background: transparent;
  border: 0;
  outline: none;
  font-size: 14px;
  line-height: 1.35;
}
.urlbox__input::placeholder { color: var(--ink-dim); }
.ta[aria-invalid="true"] {
  border-color: rgba(255,124,124,0.58);
  box-shadow: 0 0 0 3px rgba(255,124,124,0.08);
}

.addmore {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 12px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 99px;
  border: 1px dashed var(--line-2);
  font-size: 12.5px; color: var(--ink-mute);
  transition: all 150ms;
}
.addmore:hover {
  border-color: var(--accent-ring);
  background: var(--accent-soft);
  color: var(--accent);
  border-style: solid;
}

.addmore--url {
  gap: 8px;
  min-height: 48px;
  margin-top: 14px;
  margin-bottom: 10px;
  padding: 9px 17px;
  border-color: rgba(255,255,255,0.22);
  color: rgba(246,240,235,0.76);
  font-size: 13.5px;
  font-weight: 520;
  background: rgba(255,255,255,0.018);
}

.addmore--url:hover,
.addmore--url:focus-visible {
  border-color: rgba(217,106,106,0.55);
  background: rgba(217,106,106,0.08);
  color: var(--ink);
  outline: none;
}

.addmore--url svg {
  width: 15px;
  height: 15px;
}

.transcript-upload {
  width: 100%;
  min-height: 68px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  background: rgba(255,255,255,0.018);
  display: grid;
  grid-template-columns: 42px 1fr auto;
  align-items: center;
  gap: 12px;
  color: var(--ink-mute);
  text-align: left;
  transition: border-color 160ms, background 160ms, color 160ms, box-shadow 160ms;
}
.transcript-upload:hover,
.transcript-upload:focus-visible {
  border-color: var(--accent-ring);
  background: var(--accent-soft);
  color: var(--ink);
}
.transcript-upload--over {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: 0 0 0 4px var(--accent-ring);
  color: var(--ink);
}
.transcript-upload__icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  color: var(--accent);
  background: rgba(255,255,255,0.04);
}
.transcript-upload__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.transcript-upload__title {
  font-size: 13.5px;
  color: var(--ink);
}
.transcript-upload__sub {
  font-size: 12px;
  line-height: 1.35;
  color: var(--ink-dim);
}
.transcript-upload__action {
  font-size: 12px;
  color: var(--accent);
  border: 1px solid var(--accent-ring);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255,124,124,0.055);
}
@media (max-width: 560px) {
  .transcript-upload {
    grid-template-columns: 42px 1fr;
  }
  .transcript-upload__action {
    grid-column: 2;
    justify-self: start;
  }
}

.drop {
  width: 100%; min-height: 180px;
  background: var(--bg-2);
  border: 1px dashed var(--line-2);
  border-radius: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; transition: all 180ms;
  position: relative;
}
.drop:hover { border-color: var(--accent-ring); background: var(--accent-soft); }
.drop--over {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: scale(1.003);
  box-shadow: 0 0 0 6px var(--accent-ring);
}
.drop__ring {
  width: 44px; height: 44px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04); color: var(--accent);
  display: grid; place-items: center;
}
.drop__title { font-size: 14px; color: var(--ink); }
.drop__sub { font-size: 12px; color: var(--ink-dim); }

.files { display: flex; flex-direction: column; gap: 2px; }
.fileline {
  display: grid;
  grid-template-columns: 28px 1fr auto auto 28px;
  align-items: center; gap: 12px;
  padding: 11px 12px; border-radius: 10px;
  transition: background 120ms;
}
.fileline:hover { background: rgba(255,255,255,0.025); }
.fileline__n { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); }
.fileline__name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fileline__size { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-dim); }
.fileline__status {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--success);
  border: 1px solid rgba(110,235,160,0.22);
  background: rgba(110,235,160,0.06);
  border-radius: 999px;
  padding: 2px 7px;
}
.fileline__x { width: 24px; height: 24px; border-radius: 6px; color: var(--ink-dim); display: grid; place-items: center; }
.fileline__x:hover { background: rgba(255,255,255,0.06); color: var(--ink); }

.files__drop {
  margin-top: 10px;
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  border: 1px dashed var(--line-2);
  border-radius: 12px;
  font-size: 13px; color: var(--ink-dim);
  cursor: pointer;
  transition: all 160ms;
}
.files__drop:hover { border-color: var(--accent-ring); color: var(--ink); background: var(--accent-soft); }
.files__drop--over {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--ink);
  box-shadow: 0 0 0 4px var(--accent-ring);
}
.files__drop-hint { font-size: 11.5px; opacity: 0.7; }

.foot { display: flex; justify-content: space-between; padding: 8px 2px 0; }
.foot--pad { padding-top: 12px; }
.foot__hint { font-size: 12px; color: var(--ink-dim); transition: color 160ms; }
.foot__hint--ok { color: var(--accent); }
.foot__hint--err { color: var(--error); }

.file-notices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.file-notice {
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-mute);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(255,255,255,0.025);
}
.file-notice[data-kind="error"] {
  color: var(--error);
  border-color: rgba(239,107,107,0.28);
  background: var(--error-soft);
}

.input-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  color: var(--ink-dim);
  font-size: 12.5px;
}
.input-summary[data-state="ready"] {
  border-color: rgba(110,235,160,0.22);
  color: var(--ink-mute);
}
.input-summary[data-state="error"] {
  border-color: rgba(239,107,107,0.3);
  background: var(--error-soft);
  color: var(--error);
}
.input-summary__main { font-weight: 520; color: var(--ink); }
.input-summary[data-state="error"] .input-summary__main { color: var(--error); }
.input-summary__limit { font-family: var(--font-mono); font-size: 11px; white-space: nowrap; }

.card__cta { display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding-top: 6px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 14px; font-weight: 560;
  letter-spacing: 0;
  transition: all 160ms;
}
.btn--primary {
  background: var(--accent); color: #111;
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 10px 28px rgba(0,0,0,0.3);
}
.btn--primary:hover:not([disabled]) { transform: translateY(-1px); filter: brightness(1.04); }
.btn--primary[disabled] { opacity: 0.4; cursor: not-allowed; }
.btn--ghost {
  color: var(--ink-mute); border: 1px solid var(--line-2);
  padding: 9px 14px;
}
.btn--ghost:hover { color: var(--ink); border-color: var(--ink-ghost); }
.btn--small { padding: 7px 11px; border-radius: 10px; font-size: 12px; }

/* ──────────────── Results (Done - list variant) ──────────────── */
.res {
  width: 100%; max-width: 760px;
  display: flex; flex-direction: column; gap: 18px;
  /* Centered column on any viewport width. The surrounding .screen is
     flex-direction:column, so align-self controls horizontal placement. */
  align-self: center;
  margin-left: auto; margin-right: auto;
}
.res--hooks,
.batch--scroll {
  width: var(--results-rail);
  max-width: none;
}
.res--hooks {
  gap: 14px;
}
.mobile-results-chrome { display: none; }
.mobile-results-wordmark {
  font-size: 52px;
  line-height: 0.95;
  letter-spacing: 0;
  font-weight: 760;
  color: var(--ink);
}
.mobile-results-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mobile-results-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.018);
  color: var(--ink-mute);
  font-size: 21px;
  line-height: 1;
}
.mobile-more {
  position: relative;
}
.mobile-more__menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 190px;
  padding: 8px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(20,20,22,0.98);
  box-shadow: 0 18px 45px rgba(0,0,0,0.4);
  z-index: 60;
}
.mobile-more__item {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  color: var(--ink-mute);
  font-size: 15px;
  text-align: left;
}
.mobile-more__item:hover {
  color: var(--ink);
  background: rgba(255,255,255,0.055);
}
.mobile-more__item[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.mobile-more__sep {
  height: 1px;
  background: var(--line);
  margin: 6px 4px;
}
.res__back {
  align-self: flex-start;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-mute);
  padding: 5px 10px 5px 6px; border-radius: 8px;
  margin-left: -8px;
}
.res__back:hover { color: var(--ink); background: rgba(255,255,255,0.04); }
.res--hooks > .res__back { display: none; }
.res__head { padding: 4px 0 0; }
.res--hooks .res__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}
.res__source {
  font-family: var(--font-mono);
  font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-dim); margin-bottom: 8px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.res--hooks .res__source {
  display: none;
}
.res__title {
  margin: 0 0 12px;
  font-size: 34px; line-height: 1.08;
  letter-spacing: 0; font-weight: 520;
  text-wrap: balance;
}
.res--hooks .res__title {
  margin-bottom: 0;
  width: var(--title-rail);
  max-width: var(--title-rail);
  font-size: clamp(28px, 2.3vw, 34px);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}
.res__meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}
.res__meta strong {
  color: var(--ink);
  font-weight: 650;
}
.res__pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill {
  font-size: 11.5px; padding: 4px 10px;
  border-radius: 99px; border: 1px solid var(--line);
  color: var(--ink-mute);
}
.pill--accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-ring); }
.pill--warn { color: var(--error); border-color: rgba(239,107,107,0.35); background: var(--error-soft); }

.thinkbtn {
  display: inline-flex; align-items: center; gap: 10px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 12px; border-radius: 10px;
  font-size: 13px; color: var(--ink-mute);
  align-self: flex-start; border: 1px solid transparent;
}
.thinkbtn:hover { background: var(--card); color: var(--ink); border-color: var(--line); }
.thinkbtn__chev { font-size: 10px; color: var(--ink-dim); transition: transform 200ms; }
.thinkbtn[data-open="true"] .thinkbtn__chev { transform: rotate(90deg); color: var(--accent); }
.thinkbtn__hint { color: var(--ink-dim); font-size: 12px; }

.think {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 4px 2px;
}
.think__row {
  display: grid; grid-template-columns: 120px 1fr; gap: 16px;
  padding: 12px 16px; border-top: 1px solid var(--line);
}
.think__row:first-child { border-top: 0; }
.think__k { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-dim); padding-top: 3px; }
.think__v { font-size: 13.5px; line-height: 1.55; text-wrap: pretty; }
.think__v[data-accent="true"] { color: var(--accent); }

/* v15 — Transcript block (collapsible, sits above "The thinking") */
.transcript {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px 10px;
  display: flex; flex-direction: column; gap: 10px;
}
.res--hooks .transcript {
  width: var(--transcript-rail);
  align-self: center;
  min-height: 177px;
  padding: 17px 17px 0;
  border-radius: 14px;
}
.transcript__label {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
  font-weight: 700;
}
.transcript__body {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 4px;
  text-wrap: pretty;
}
.res--hooks .transcript__body {
  position: relative;
  max-height: 86px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-mute);
  overflow: hidden;
  padding-right: 0;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 66%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 66%, transparent 100%);
}
.res--hooks .transcript[data-expanded="true"] .transcript__body {
  max-height: min(52vh, 440px);
  overflow-y: auto;
  -webkit-mask-image: none;
  mask-image: none;
}
.transcript__foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding: 14px 0 13px;
  border-top: 1px solid var(--line);
}
.transcript__toggle,
.transcript__copy {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  box-sizing: border-box;
  color: var(--ink-dim);
  font-size: 14px;
  border-radius: 8px;
  padding: 0 10px;
}
.transcript__toggle:hover,
.transcript__copy:hover {
  color: var(--ink-mute);
  background: rgba(255,255,255,0.035);
}
.transcript__copy[data-copied="true"] {
  color: var(--success);
}

/* Magnets — the deep-analysis diagnosis row at the top of The Thinking */
.magnets { display: flex; flex-direction: column; gap: 6px; }
.magnet {
  display: grid; grid-template-columns: 38px 1fr auto; gap: 10px;
  align-items: center;
  padding: 6px 10px; border-radius: 8px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
}
.magnet--miss {
  background: var(--error-soft);
  border-color: rgba(239,107,107,0.35);
}
.magnet__code {
  font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.06em; color: var(--accent); font-weight: 600;
}
.magnet--miss .magnet__code { color: var(--error); }
.magnet__name { font-size: 13px; color: var(--ink); }
.magnet__pct {
  font-family: var(--font-mono); font-size: 10.5px;
  color: var(--ink-mute);
  padding: 2px 7px; border-radius: 99px;
  background: rgba(255,255,255,0.04);
}

.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.chips__spacer { flex: 1; }
.chip {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px;
  box-sizing: border-box;
  font-size: 12px; padding: 6px 13px; border-radius: 99px;
  color: var(--ink-mute); border: 1px solid var(--line-2);
  transition: all 140ms;
}
.chip:hover:not([disabled]) { color: var(--ink); border-color: var(--ink-ghost); }
.chip[data-on="true"] { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-ring); }
.chip--ghost { color: var(--ink-dim); border-color: transparent; }
.chip--ghost:hover:not([disabled]) { background: rgba(255,255,255,0.04); color: var(--ink); }
.chip[disabled] { opacity: 0.4; cursor: not-allowed; }
.res > .chips,
.batch--scroll > .chips {
  position: static;
  top: auto;
  z-index: auto;
  padding: 0;
  margin: 4px 0 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}
.results-toolbar {
  width: 100%;
  justify-content: space-between;
  gap: 16px;
}
.results-toolbar__filters,
.results-toolbar__actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
.results-toolbar__actions {
  justify-content: flex-end;
  gap: 18px;
}
.results-toolbar__actions .chip {
  border-color: transparent;
  background: transparent;
  padding-left: 10px;
  padding-right: 10px;
  border-radius: 8px;
}

.hook-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 15px;
  align-items: start;
}
.hook-split[data-single="true"] {
  grid-template-columns: minmax(0, 1fr);
}
.hook-group {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
}
.hook-group__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 54px 48px 48px;
  align-items: center;
  min-height: 46px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--line);
}
.hook-group__title {
  margin: 0;
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-wrap: nowrap;
}
.hook-group__labels {
  display: contents;
}
.hook-group__label {
  justify-self: center;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.05;
  color: var(--ink-dim);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}
.hook-group__label--emoji { max-width: 42px; white-space: normal; }

/* Hooks list — two-panel results surface */
.hooks {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: hidden;
}
.hooks--split { min-width: 0; }

.hook {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 54px 48px 48px;
  align-items: center;
  gap: 0;
  padding: 0 14px 0 10px;
  border-top: 1px solid var(--line);
  transition: background 120ms;
  min-width: 0;
  min-height: 53px;
}
/* Legacy/restored rows without a session_id render no emoji (col 3) or refine
   (col 5) button; collapse to a 3-track grid so Copy sits flush with no empty
   tracks. */
.hook--no-actions {
  grid-template-columns: 48px minmax(0, 1fr) 48px;
}
.hook--no-actions .hook__copy { grid-column: 3; }
.hooks > .hook:first-child { border-top: 0; }

/* 2026-04-25 — Data-grounded set composite score header.
   Tier colours map to thresholds in app/banner_score.py:
     ≥ 80 = great, ≥ 60 = pass, ≥ 40 = mid, < 40 = low. */
.set-score {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin: 0 0 10px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12.5px;
}
.set-score__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.set-score__value {
  font-weight: 700;
  font-size: 16px;
}
.set-score__tier {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.set-score__summary {
  flex: 1;
  color: var(--ink-dim);
  font-size: 11.5px;
  text-align: right;
}
.set-score--great { border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.05); }
.set-score--great .set-score__tier { background: rgba(34, 197, 94, 0.15); color: #22c55e; }
.set-score--pass  { border-color: rgba(47, 111, 237, 0.35); background: rgba(47, 111, 237, 0.05); }
.set-score--pass  .set-score__tier { background: rgba(47, 111, 237, 0.15); color: #2f6fed; }
.set-score--mid   { border-color: rgba(234, 179, 8, 0.35); background: rgba(234, 179, 8, 0.05); }
.set-score--mid   .set-score__tier { background: rgba(234, 179, 8, 0.15); color: #eab308; }
.set-score--low   { border-color: rgba(239, 68, 68, 0.35); background: rgba(239, 68, 68, 0.05); }
.set-score--low   .set-score__tier { background: rgba(239, 68, 68, 0.15); color: #ef4444; }

.clip-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 2px;
}

.hook:hover { background: rgba(255,255,255,0.022); }
.hook[data-kind="allcaps"] .hook__text {
  text-transform: uppercase; letter-spacing: 0.04em;
  font-weight: 560; font-size: 14px;
}
.hook__main {
  display: contents;
}
.hook__idx {
  display: none;
}
.hook__fav { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: var(--ink-mute); transition: all 120ms; grid-column: 1; justify-self: center; }
.hook__fav:hover { color: var(--accent); background: var(--accent-soft); }
.hook__fav[data-on="true"] { color: var(--accent); }
.hook__text {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 44px;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: normal;
  hyphens: none;
  min-width: 0;
  grid-column: 2;
  color: var(--ink);
  text-align: left;
  border-radius: 8px;
  padding: 6px 7px;
  margin: -6px -7px;
  cursor: copy;
}
.hook__text:hover {
  background: rgba(255,255,255,0.035);
}
.hook__text:focus-visible,
.hook__fav:focus-visible,
.hook__copy:focus-visible,
.hook__emoji-btn:focus-visible,
.hook__refine-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.hook__actions {
  display: contents;
}
.hook__copy {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 0; font-weight: 650; color: var(--ink-mute);
  width: 44px;
  min-height: 44px;
  padding: 0; border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  opacity: 1; transition: all 120ms;
  grid-column: 4;
  justify-self: center;
}
.hook__copy:hover { background: rgba(237,235,228,0.07); border-color: rgba(237,235,228,0.14); color: var(--ink); }
.hook__copy[data-copied="true"] { color: var(--success); border-color: rgba(110,235,160,0.25); background: rgba(110,235,160,0.08); opacity: 1; }

/* v15.4 — Per-banner Refine button. Distinct color from Copy/Star so
   the user sees it's a different kind of action (edit this one, rather
   than capture it). Always visible on wider screens to satisfy the
   "each banner should have a side button" requirement. */
.hook__refine-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  font-size: 0; font-weight: 500;
  color: #75cfff;
  background: transparent;
  border: 1px solid transparent;
  width: 44px;
  min-height: 44px;
  padding: 0; border-radius: 10px;
  transition: all 160ms;
  cursor: pointer;
  white-space: nowrap;
  grid-column: 5;
  justify-self: center;
}
.hook__refine-btn span { display: none; }
.hook__refine-btn:hover {
  background: rgba(117,207,255,0.10);
  color: #9bdcff;
  border-color: rgba(117,207,255,0.25);
}
.hook__refine-btn--on {
  background: rgba(117,207,255,0.16);
  color: #9bdcff;
  border-color: rgba(117,207,255,0.30);
  box-shadow: 0 0 0 3px rgba(117,207,255,0.10);
}

/* Flash animation when a banner was just refined — catches the eye so
   the user sees the change landed without visually diffing the list. */
@keyframes hook-flash {
  0%   { background: var(--accent-soft); }
  100% { background: transparent; }
}
.hook--flash {
  animation: hook-flash 1.6s ease-out;
}

/* v15.4 — Inline per-banner refine panel (slides in right under the
   banner being refined). Looks like a speech bubble attached to the
   banner above it. */
.hook-refine {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--line);
  background: rgba(180, 60, 90, 0.04);
}
.hook-refine__inner {
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px 18px 18px;
}
.hook-refine__hint {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: var(--accent);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hook-refine__arrow {
  font-size: 14px;
  transform: rotate(180deg) scaleX(-1);
  display: inline-block;
  color: var(--accent);
}
.hook-refine__hintlabel {
  font-weight: 500;
}
.hook-refine__note {
  margin-top: -4px;
  color: var(--accent);
  font-size: 12.5px;
  line-height: 1.4;
}
.hook-refine__row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}
.hook-refine__input {
  background: var(--bg);
  border: 1px solid var(--accent-ring);
  border-radius: 8px;
  color: var(--ink);
  font-size: 13.5px;
  padding: 10px 12px;
  line-height: 1.4;
  transition: border-color 120ms, box-shadow 120ms;
}
.hook-refine__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.hook-refine__input::placeholder {
  color: var(--ink-dim);
}
.hook-refine__send {
  min-height: 44px;
  padding: 9px 14px;
  font-size: 12.5px;
}
.hook-refine__cancel {
  min-height: 44px;
  font-size: 11.5px;
  padding: 6px 12px;
}

/* v15.4 — Intent toggle chips (Refine all vs Add more).
   Two side-by-side chip-style buttons with a clear active state,
   positioned above the text input in both chat panels. */
.intent {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
  padding: 6px 0;
}
.intent__chip {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 44px;
  box-sizing: border-box;
  font-size: 12px; font-weight: 500;
  color: var(--ink-mute);
  background: transparent;
  border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 8px;
  transition: all 140ms;
  cursor: pointer;
}
.intent__chip:hover {
  color: var(--ink);
  border-color: var(--ink-dim);
}
.intent__chip[data-on="true"] {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-ring);
}
.intent__chip-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; border-radius: 4px;
  background: rgba(255,255,255,0.04);
  font-size: 11px;
  font-weight: 600;
}
.intent__chip[data-on="true"] .intent__chip-icon {
  background: var(--accent);
  color: #160606;
}
.intent__sep {
  color: var(--ink-dim);
  margin: 0 2px;
}

/* v18.1 compact live-progress bar used during refines. Reuses the
   overall-bar visuals from .live but scoped smaller (no step strip). */
.live--mini {
  padding: 12px 14px;
  gap: 8px;
}
.live--mini .live__overall-top {
  padding-bottom: 0;
}
.live--mini .live__overall-pct {
  font-size: 18px;
}
.live--mini .live__sub {
  font-size: 11.5px;
  color: var(--ink-mute);
}
.live--mini .live__overall-track {
  height: 6px;
}
.live--mini .live__retry {
  color: var(--accent);
  font-size: 11px;
}

/* ─── Chat panel (talk to your banners) ─── */
.chat {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  padding: 18px 18px 14px;
  display: flex; flex-direction: column; gap: 14px;
}
.chat__head {
  display: flex; flex-direction: column; gap: 3px;
}
.chat__title { margin: 0; font-size: 14.5px; font-weight: 560; letter-spacing: 0; }
.chat__sub { font-size: 12px; color: var(--ink-dim); }

.chat__log { display: flex; flex-direction: column; gap: 8px; }
.chat__turn {
  display: flex; flex-direction: column; gap: 6px;
  padding: 10px 12px; border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.chat__turn--user { background: var(--accent-soft); border-color: var(--accent-ring); }
.chat__turn--assistant { background: var(--bg-2); border-color: var(--line); }
.chat__meta { display: flex; align-items: center; gap: 8px; }
.chat__role {
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--ink-mute);
}
.chat__turn--user .chat__role { color: var(--accent); }
.chat__scope {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--ink-dim);
  padding: 1px 6px; border-radius: 99px;
  background: rgba(255,255,255,0.04); border: 1px solid var(--line);
}
.chat__body {
  font-size: 13.5px; line-height: 1.45;
  color: var(--ink); text-wrap: pretty;
}
.chat__note {
  font-size: 12px; color: var(--ink-mute);
  font-style: italic;
  border-left: 2px solid var(--accent-ring);
  padding-left: 10px;
}
.chat__diff { display: flex; flex-direction: column; gap: 4px; padding-top: 4px; }
.chat__change {
  display: flex; gap: 8px; flex-wrap: wrap;
  font-size: 12.5px; line-height: 1.4;
  align-items: baseline;
}
.chat__change-n {
  font-family: var(--font-mono);
  font-size: 10px; color: var(--ink-dim);
  min-width: 24px;
}
.chat__change del {
  color: var(--ink-dim);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(237,235,228,0.3);
}
.chat__change ins {
  color: var(--accent);
  text-decoration: none;
}
.chat__change-more { font-size: 11.5px; color: var(--ink-dim); margin-top: 2px; }

.chat__scopes {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
}
.chip__close { font-size: 13px; margin-left: 4px; opacity: 0.6; }

.chat__input-row {
  display: flex; gap: 10px; align-items: stretch;
}
.chat__input {
  flex: 1;
  min-height: 52px; max-height: 200px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit; font-size: 14px; line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.chat__input::placeholder { color: var(--ink-dim); }
.chat__input:focus { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.chat__input[disabled] { opacity: 0.6; cursor: not-allowed; }
.chat__send {
  align-self: flex-end;
  min-height: 44px;
  padding: 0 16px;
}
.chat__kbd {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--ink-dim);
  justify-content: flex-end;
}
.chat__kbd kbd {
  font-family: var(--font-mono); font-size: 10.5px;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--line);
}

/* Empty filter state */
.hooks--empty {
  padding: 36px 24px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-dim);
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius);
}

/* ──────────────── Drawer (history) ──────────────── */
.drawer {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0,0,0,0.66);
  display: flex; justify-content: flex-end;
}
.drawer__sheet {
  width: 380px; max-width: 90vw; height: 100%;
  background: var(--bg-2);
  border-left: 1px solid var(--line-2);
  padding: 20px 18px;
  display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto;
}
.drawer__head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 8px; }
.drawer__head h3 { margin: 0; font-size: 15px; letter-spacing: 0; font-weight: 560; }
.drawer__head-actions { display: flex; gap: 6px; }
.drawer__head button { width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center; color: var(--ink-dim); }
.drawer__head button:hover { background: var(--line); color: var(--ink); }
.drawer__clear { padding: 0 10px; width: auto !important; font-size: 11px; color: var(--ink-dim); transition: background 140ms ease, color 140ms ease, border-color 140ms ease; }
.drawer__clear[disabled] { opacity: 0.5; cursor: wait; }
.drawer__clear--armed { color: #fff; background: #ef4444; border-color: #ef4444; }
.drawer__clear--armed:hover { background: #dc2626; border-color: #dc2626; }
.drawer__empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 20px 10px;
  font-size: 13px;
  color: var(--ink-dim);
}
.drawer__empty-action { margin-left: -2px; }
.drawer__list { display: flex; flex-direction: column; gap: 2px; }
/* Wave 12 — per-row container with main button + delete affordance. */
.drawer__row {
  display: flex;
  align-items: stretch;
  gap: 4px;
  border-radius: 10px;
}
.drawer__row:hover { background: var(--card); }
.drawer__row:hover .drawer__delete { opacity: 1; }
.drawer__item {
  text-align: left;
  padding: 12px 12px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  background: transparent;
  cursor: pointer;
}
/* Hover handled by parent .drawer__row to avoid double-tint. */
.drawer__delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  flex-shrink: 0;
  background: transparent;
  color: var(--ink-ghost);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  opacity: 0;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}
.drawer__delete:hover { color: #ef4444; background: rgba(239, 68, 68, 0.10); }
.drawer__delete--armed {
  width: auto;
  min-width: 68px;
  padding: 0 8px;
  color: #fff;
  background: #ef4444;
  border-color: #ef4444;
  opacity: 1;
  font-size: 11px;
}
.drawer__delete--armed:hover { color: #fff; background: #dc2626; }
.drawer__delete:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -1px;
  opacity: 1;
}
.drawer__title { font-size: 13.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drawer__sub { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-dim); }
.drawer__loading {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
}

/* v16.2 — Drawer TTL footer. Sits beneath the history list; quiet
   reminder that history isn't stored forever. */
.drawer__ttl {
  margin-top: auto;
  padding: 16px 12px 4px;
  font-size: 11.5px;
  color: var(--ink-dim);
  border-top: 1px solid var(--line);
  line-height: 1.5;
}

/* ──────────────── Batch results list (multi-clip summary) ──────────────── */
.batch {
  width: 100%; max-width: 760px;
  display: flex; flex-direction: column; gap: 14px;
  align-self: center;
  margin-left: auto; margin-right: auto;
}
.batch__head { display: flex; justify-content: space-between; align-items: baseline; }
.batch__title { font-size: 28px; letter-spacing: 0; font-weight: 520; margin: 0; }
.batch__sub { font-size: 13px; color: var(--ink-dim); }
.batch__list { display: flex; flex-direction: column; gap: 8px; }
.batch__row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 14px; align-items: center;
  padding: 14px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  text-align: left;
  transition: border-color 150ms, transform 150ms;
}
.batch__row:hover { border-color: var(--accent-ring); transform: translateY(-1px); }
.batch__row[data-status="error"] { border-color: rgba(239,107,107,0.25); }
.batch__row[data-status="error"]:hover { border-color: rgba(239,107,107,0.45); }
.batch__n { font-family: var(--font-mono); font-size: 11.5px; color: var(--ink-dim); text-align: center; }
.batch__name { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.batch__status {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; padding: 3px 10px; border-radius: 99px;
}
.batch__status[data-status="processing"] { color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-ring); }
.batch__status[data-status="done"] { color: var(--success); background: rgba(110,235,160,0.08); border: 1px solid rgba(110,235,160,0.25); }
.batch__status[data-status="error"] { color: var(--error); background: var(--error-soft); border: 1px solid rgba(239,107,107,0.3); }
.batch__status[data-status="queued"] { color: var(--ink-dim); border: 1px solid var(--line); }
.batch__chev { color: var(--ink-dim); display: inline-flex; }
.batch__error {
  grid-column: 1 / -1;
  font-size: 12px; color: var(--error);
  padding: 8px 10px; background: var(--error-soft);
  border: 1px solid rgba(239,107,107,0.2);
  border-radius: 10px;
  margin-top: 6px;
}
.batch__cancel {
  grid-column: 1 / -1;
  font-size: 12px;
  color: var(--warn);
  padding: 8px 10px;
  background: rgba(245, 178, 92, 0.06);
  border: 1px solid rgba(245, 178, 92, 0.22);
  border-radius: 10px;
  margin-top: 6px;
}

/* v15 — batch header: title + mode toggle, stacked left-right */
.batch__head {
  flex-wrap: wrap;
  gap: 12px;
}
.batch__headleft {
  display: flex; flex-direction: column; gap: 2px;
  min-width: 0;
}
.batch__modebar {
  display: inline-flex; gap: 4px;
  margin-left: auto;
}

/* v25 — queue-first multi-clip progress. Only the truly active clip gets
   a detailed live bar; waiting clips stay calm and static. */
.batch--queue {
  width: var(--results-rail);
  max-width: none;
  gap: 12px;
}
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.queue-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 18px;
}
.queue-row[data-state="waiting"] {
  background: rgba(255,255,255,0.025);
  border-color: rgba(255,255,255,0.06);
}
.queue-row[data-state="error"] {
  border-color: rgba(239,107,107,0.3);
  background: rgba(239,107,107,0.035);
}
.queue-row[data-state="cancelled"] {
  border-color: rgba(245, 178, 92, 0.28);
  background: rgba(245, 178, 92, 0.035);
}
.queue-row__head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}
.queue-row__num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
}
.queue-row__title {
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  line-height: 1.2;
  font-weight: 620;
}
.queue-row__status {
  font-size: 11.5px;
  color: var(--ink-mute);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  padding: 4px 9px;
}
.queue-row[data-state="running"] .queue-row__status {
  color: var(--accent);
  border-color: var(--accent-ring);
  background: var(--accent-soft);
}
.queue-row[data-state="done"] .queue-row__status {
  color: var(--success);
  border-color: rgba(110,235,160,0.25);
  background: rgba(110,235,160,0.06);
}
.queue-row[data-state="error"] .queue-row__status {
  color: var(--error);
  border-color: rgba(239,107,107,0.3);
  background: var(--error-soft);
}
.queue-row[data-state="cancelled"] .queue-row__status {
  color: var(--warn);
  border-color: rgba(245, 178, 92, 0.32);
  background: rgba(245, 178, 92, 0.08);
}
.queue-row__note,
.queue-row__error,
.queue-row__cancel,
.queue-row__hint {
  color: var(--ink-mute);
  font-size: 13px;
}
.queue-row__error { color: var(--error); }
.queue-row__cancel { color: var(--warn); }
.queue-row__hint { color: var(--ink-dim); }
.queue-row__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* v15 — scroll-through batch view */
.batch--scroll { gap: 16px; }

/* Sticky mini-nav: jump chips for each clip section */
.batch__nav {
  position: sticky;
  top: 10px;
  z-index: 5;
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px 10px;
  background: rgba(10, 10, 11, 0.94);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  align-self: stretch;
}
.batch__navchip {
  font-family: var(--font-mono);
  padding: 5px 10px;
  text-decoration: none;
}

/* v15.1 — Each clip is a distinct card in scroll-through view */
.clip-section {
  display: flex; flex-direction: column; gap: 16px;
  padding: 32px 32px 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  scroll-margin-top: 80px;   /* leave room for sticky nav when jumping */
}
/* Extra spacing between cards — user reads "one clip, one card" */
.batch--scroll .clip-section + .clip-section { margin-top: 8px; }

.clip-section__head {
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.clip-section__num {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: 0.14em;
  color: var(--accent); flex-shrink: 0;
}
.clip-section__title {
  margin: 0;
  font-size: 24px; letter-spacing: 0; font-weight: 540;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
  text-wrap: pretty;
}
.clip-section__open {
  font-size: 11.5px;
  color: var(--ink-mute);
  padding: 5px 11px;
  border: 1px solid var(--line-2);
  border-radius: 99px;
  transition: all 140ms;
}
.clip-section__open:hover {
  color: var(--accent);
  border-color: var(--accent-ring);
  background: var(--accent-soft);
}
.clip-section__open[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.clip-section__status {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-mute);
  padding: 10px 0;
}
.clip-section__err {
  font-size: 13px; color: var(--error);
  padding: 16px 18px;
  background: var(--error-soft);
  border: 1px solid rgba(239,107,107,0.25);
  border-radius: 14px;
  display: flex; flex-direction: column; gap: 12px;
}
.clip-section__err--cancelled {
  color: var(--warn);
  background: rgba(245, 178, 92, 0.055);
  border-color: rgba(245, 178, 92, 0.24);
}
.clip-section__errmsg {
  font-weight: 500;
  line-height: 1.45;
}
.clip-section__erractions {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.clip-section__err .thinkbtn--transcript {
  margin-top: 4px;
}
.clip-section__err .transcript {
  background: rgba(0,0,0,0.12);
  border-color: rgba(239,107,107,0.2);
}
.clip-section__err .transcript__body {
  color: var(--ink);   /* transcript text stays neutral, not red */
}

/* v15.3 — Live backend progression panel (replaces the old fake ring).
   Rendered inside .clip-section while the clip is still processing. */
.live {
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 20px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 14px;
}

/* v16.1 — Overall progress header. */
.live__overall {
  display: flex; flex-direction: column; gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}
.live__overall-top {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px;
}
.live__overall-pct {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
  font-variant-numeric: tabular-nums;
}
.live__overall-track {
  height: 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.105);
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035);
}
.live__overall-fill {
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  /* v27 — flowing gradient sheen so the bar reads as "alive" during the long
     writer phase. background-position animates independently of the JS-driven
     scaleX transform, so it never fights the RAF animator. */
  background: linear-gradient(90deg, var(--accent) 0%, #d96a6a 30%, #f0a0a0 50%, #d96a6a 70%, var(--accent) 100%);
  background-size: 220% 100%;
  animation: live-flow 2.4s linear infinite;
  border-radius: 4px;
  transition: transform 220ms linear;
  box-shadow: 0 0 12px rgba(180, 60, 90, 0.35);
}
@keyframes live-flow {
  0%   { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
/* v19.9/v26 — RAF-driven variant: the JS animator writes transform at
   ~60fps, so the CSS transition would fight it and cause stutter.
   Disable transitions on any fill tagged --raf. Will-change hints the
   compositor to promote to its own layer for smoother transform changes. */
.live__overall-fill--raf {
  transition: none;
  will-change: transform;
}
.live--detailed {
  gap: 10px;
  padding: 14px 0 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.live__topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
}
.live__stagehead {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.live__stagebadge {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  border: 1px solid var(--accent-ring);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 8px;
  font-variant-numeric: tabular-nums;
}
.live__stagetitle {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 15px;
  font-weight: 650;
}
.live__stages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  gap: 6px;
}
.live__stagechip {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-mute);
  background: rgba(255, 255, 255, 0.025);
  font-size: 11px;
  line-height: 1;
  padding: 7px 9px;
  text-align: center;
}
.live__stagechip[data-state="done"] {
  color: var(--success);
  border-color: rgba(110, 235, 160, 0.22);
  background: rgba(110, 235, 160, 0.06);
}
.live__stagechip[data-state="active"] {
  color: var(--ink);
  border-color: var(--accent-ring);
  background: var(--accent-soft);
  box-shadow: 0 0 0 1px rgba(224, 99, 99, 0.05) inset;
  animation: live-chip-pulse 1.9s ease-in-out infinite;
}
@keyframes live-chip-pulse {
  0%, 100% { box-shadow: 0 0 0 1px rgba(224, 99, 99, 0.05) inset; }
  50%      { box-shadow: 0 0 0 1px rgba(224, 99, 99, 0.20) inset, 0 0 10px rgba(224, 99, 99, 0.16); }
}
/* v27 — respect reduced-motion: keep the bar/chip static for users who ask. */
@media (prefers-reduced-motion: reduce) {
  .live__overall-fill { animation: none; }
  .live__stagechip[data-state="active"] { animation: none; }
}
@media (max-width: 640px) {
  .live__topline {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
  .live__stages {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .queue-row__head {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .queue-row__status {
    grid-column: 2;
    justify-self: start;
  }
}
/* v28 — Honest progress RING. The .live--detailed panel renders the SAME
   progressbar as the old bar (role + aria on .live__overall-track, the fill is
   .live__overall-fill driven by setProgressFill via stroke-dashoffset) but as
   an SVG arc instead of a horizontal bar. Same backend-owned percent, circular
   presentation. The semantic classes are reused so behavior + a11y are intact;
   only the look changes here. */
.live--ring {
  position: relative;
  align-items: center;
  text-align: center;
}
.live--ring .live__ring-wrap {
  position: relative;
  width: clamp(176px, 44vw, 224px);
  aspect-ratio: 1 / 1;
  margin: 2px auto 4px;
}
/* Neutralise the horizontal-bar look; the track becomes the ring's canvas. */
.live--ring .live__overall-track {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: none;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.live__ring-svg {
  display: block;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);   /* start the arc at 12 o'clock, grow clockwise */
  overflow: visible;
}
.live__ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.10);
  stroke-width: 8;
}
.live__ring-arc {
  fill: none;
  /* The base .live__overall-fill rule sets transform: scaleX(0) (the bar's
     collapsed start state); on the ring that would crush the arc to a zero-width
     sliver. The arc fills purely via stroke-dashoffset, so reset the transform. */
  transform: none;
  /* Solid system-accent stroke. A per-instance SVG url(#gradient) reference
     resolves against the document base URL and can fail to paint on the deployed
     routes, leaving the arc advancing (offset moves) but showing no colour. A CSS
     stroke is robust and always paints the system pink as the ring fills. */
  stroke: var(--accent);
  stroke-width: 9;
  stroke-linecap: round;
  /* Static glow only. An animated filter: drop-shadow repaints a blur every
     frame, which janks low-end mobile GPUs; the rotating gradient sheen already
     gives the arc life for free. */
  filter: drop-shadow(0 0 7px rgba(217, 106, 106, 0.45));
}
/* The RAF animator writes stroke-dashoffset ~60fps; drop the CSS transition so
   it never fights the animator (mirrors the bar's --raf rule). */
.live__ring-arc.live__overall-fill--raf {
  transition: none;
  will-change: stroke-dashoffset;
}
/* Centre stack sits on top of the ring. */
.live--ring .live__info {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 0 16%;
  margin: 0;
  border: none;
}
/* .live__info in the selector so this out-specifies the base `.live__info
   .live__pct` rule (weight 500) that appears later in the file; without it the
   big centred ring number silently renders at 500 instead of 600. */
.live--ring .live__info .live__pct {
  font-family: var(--font-mono);
  font-size: clamp(30px, 8vw, 38px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.live--ring .live__stagetitle {
  max-width: 100%;
  white-space: normal;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.live__ring-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-mute);
  font-variant-numeric: tabular-nums;
}
.live--ring .live__stagebadge { font-size: 10px; padding: 2px 7px; }
.live--ring .live__time { color: var(--ink-mute); }
.live--ring .live__cancel {
  margin: 12px auto 0;
}
.live__ring-support {
  display: block;
  margin-top: 12px;
  color: var(--ink-mute);
  font-size: 12px;
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  .live__ring-arc { animation: none; }
}

/* v19.9 — smooth fade-out when a clip's progress completes. Applied by
   the animator ~250ms after the 'done' snapshot so the 100% flash
   lingers briefly before the panel dissolves. */
.live--fading {
  transition: opacity 260ms ease-out;
  opacity: 0;
}

/* v19.10 — minimal single-bar UI. One clean track, full width, nothing
   else. Replaces the multi-row layout that was too noisy. All the backend accuracy
   still drives the fill width via the RAF animator. */
.live--minimal {
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}
.live--minimal .live__overall-track {
  height: 6px;
  border-radius: 3px;
}
.live--minimal .live__overall-fill {
  border-radius: 3px;
}
.live--mini.live--minimal .live__overall-track {
  height: 4px;
  border-radius: 2px;
}

/* v20 — compact info row under the bar: substep on the left, pct% on
   the right. Single line only; no wrapping, no multi-row return to
   the pre-v19.10 noise. */
.live__info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  row-gap: 4px;
  margin-top: 0;
  font-size: 13px;
  color: var(--ink-mute);
  font-feature-settings: "tnum";
  min-width: 0;
}
.live__info--pctonly {
  justify-content: flex-end;
}
.live__info .live__substep {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
  padding-right: 12px;
}
.live__info .live__substep--notice {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
}
.live__info .live__pct {
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.live__info .live__time {
  flex: 0 0 auto;
  color: var(--ink-mute);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  margin-left: auto;
  padding-right: 12px;
}
.live__info--mini {
  margin-top: 6px;
  font-size: 12px;
}
.live__retry--mini {
  margin-top: 4px;
  color: var(--warn);
  font-size: 11.5px;
}

/* v20 — skeleton banner rows under the live progress bar while a clip
   is generating. Variable widths + gentle shimmer so the space feels
   alive instead of empty. */
.banner-skeleton-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}
.banner-skeleton {
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.09) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  background-size: 200% 100%;
  animation: banner-skeleton-shimmer 1.6s ease-in-out infinite;
}
@keyframes banner-skeleton-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
/* v20 — error card: friendly message + hint + 3-button action row +
   collapsed technical details. Replaces the raw-error-text wall that
   used to be the only UX on a failed clip. */
.clip-section__errhint {
  margin-top: 6px;
  color: var(--ink-mute);
  font-size: 14px;
  line-height: 1.45;
}
.clip-section__erractions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}
.clip-section__errdetails {
  margin-top: 12px;
  font-size: 13px;
}
.clip-section__errdetails summary {
  cursor: pointer;
  color: var(--ink-mute);
  user-select: none;
  padding: 4px 0;
}
.clip-section__errdetails summary:hover { color: var(--ink); }
.clip-section__errraw {
  margin-top: 6px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  color: var(--ink-mute);
  font-family: ui-monospace, SF Mono, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* v20 — disabled chip state for Copy-All + filter chips during
   processing. */
.chip[disabled],
.chip[aria-disabled="true"] {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}
.live__strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  align-items: start;
  padding-bottom: 4px;
  border-bottom: 1px dashed var(--line);
}
.live__step {
  display: flex; flex-direction: column; align-items: center;
  gap: 4px;
  opacity: 0.5;
  transition: opacity 220ms ease;
}
.live__step[data-state="done"] { opacity: 0.85; }
.live__step[data-state="active"] { opacity: 1; }
.live__step-dot {
  width: 10px; height: 10px; border-radius: 50%;
  border: 1.5px solid var(--ink-dim);
  background: transparent;
  transition: all 220ms ease;
}
.live__step[data-state="done"] .live__step-dot {
  background: var(--success, #6eeba0);
  border-color: var(--success, #6eeba0);
}
.live__step[data-state="active"] .live__step-dot {
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: live-pulse 1.4s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--accent-soft); }
  50%      { box-shadow: 0 0 0 8px transparent; }
}
.live__step-label {
  font-size: 10.5px;
  color: var(--ink-dim);
  text-align: center;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.live__step[data-state="active"] .live__step-label {
  color: var(--ink);
  font-weight: 500;
}

.live__head {
  display: flex; align-items: flex-start; gap: 14px;
}
.live__dotpulse {
  margin-top: 6px;
}
.live__textcol {
  display: flex; flex-direction: column; gap: 4px;
  min-width: 0; flex: 1;
}
.live__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0;
}
.live__sub {
  font-size: 13px;
  color: var(--ink-mute);
  line-height: 1.4;
  word-break: break-word;
}
.live__dot {
  opacity: 0.5;
}
.live__retry {
  color: var(--accent);
  font-weight: 500;
}

.live__bar {
  height: 6px;
  border-radius: 3px;
  background: var(--line);
  overflow: hidden;
}
.live__bar-fill {
  height: 100%;
  background: var(--accent);
  transition: width 400ms linear;
  border-radius: 3px;
}
.live__bar--retry .live__bar-fill {
  background: linear-gradient(90deg, var(--accent) 0%, rgba(239,107,107,0.5) 100%);
}

/* v15.3 — live progression renders inside error-state cards too when
   a retry is in flight. Slightly tighter padding inside the already-
   padded error box. */
.clip-section__err .live {
  padding: 14px 16px;
}

/* v15.2 — Retry button for failed rows in the compact batch view */
.batch__retry {
  grid-column: 1 / -1;
  margin-top: 8px;
  justify-self: start;
}
.batch__status[data-status="retrying"] {
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
}

/* Transcript inside the card sits tighter (no double border) */
.clip-section .transcript {
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.clip-section .transcript__body { max-height: 300px; }

/* v15.1 — Per-clip inline refine input at the bottom of each card */
.clip-refine {
  display: flex; flex-direction: column; gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.clip-refine__head {
  display: flex; flex-direction: column; gap: 2px;
}
.clip-refine__label {
  font-size: 13px; font-weight: 540; color: var(--ink);
}
.clip-refine__hint {
  font-size: 11.5px; color: var(--ink-dim);
}
.clip-refine__row {
  display: flex; gap: 10px; align-items: stretch;
}
.clip-refine__input {
  flex: 1;
  min-height: 44px; max-height: 140px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  color: var(--ink);
  font-family: inherit; font-size: 13.5px; line-height: 1.5;
  resize: vertical;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.clip-refine__input::placeholder { color: var(--ink-dim); }
.clip-refine__input:focus { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.clip-refine__input[disabled] { opacity: 0.6; cursor: not-allowed; }
.clip-refine__send {
  align-self: flex-end;
  height: 38px;
  padding: 0 14px;
  font-size: 13px;
}
.clip-refine__lastnote {
  font-size: 12px;
  color: var(--ink-mute);
  font-style: italic;
  padding: 6px 10px;
  border-left: 2px solid var(--accent-ring);
  background: var(--accent-soft);
  border-radius: 0 8px 8px 0;
}

@media (max-width: 640px) {
  .batch__nav { top: 4px; padding: 6px 8px; }
  .clip-section { padding: 20px 16px 18px; border-radius: 18px; }
  .clip-section__title { font-size: 20px; }
  .clip-refine__row { flex-direction: column; }
  .clip-refine__send { align-self: stretch; min-height: 44px; }
}

/* ──────────────── Error screen ──────────────── */
.errscreen {
  width: 100%; max-width: 720px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 16px;
}
.errscreen__ring {
  width: 56px; height: 56px; border-radius: 16px;
  display: grid; place-items: center;
  background: var(--error-soft); color: var(--error);
  border: 1px solid rgba(239,107,107,0.28);
}
.errscreen__title { font-size: 22px; letter-spacing: 0; font-weight: 540; margin: 0; }
.errscreen__body {
  font-size: 15px; color: var(--ink); line-height: 1.55;
  text-align: center;
  font-weight: 500;
  margin-top: 4px;
}
/* v20.1 — platform-specific hint under the headline message. */
.errscreen__hint {
  font-size: 13.5px; color: var(--ink-mute); line-height: 1.55;
  text-align: center;
  max-width: 440px;
  margin: -6px 0 4px;
}
.errscreen__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 640px;
}
.errscreen__actions .btn {
  justify-content: center;
  min-height: 46px;
}
.errscreen__actions .btn--ghost {
  background: rgba(255, 255, 255, 0.025);
}
@media (max-width: 640px) {
  .errscreen { max-width: 100%; }
  .errscreen__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .errscreen__actions .btn {
    width: 100%;
  }
}

/* v20.1 — collapsed support details. User-facing details stay safe:
   public code + request id + copyable support bundle only. */
.errscreen__details {
  margin-top: 18px;
  width: 100%;
  max-width: 520px;
  font-size: 12.5px;
}
.errscreen__details summary {
  cursor: pointer;
  color: var(--ink-mute);
  user-select: none;
  padding: 4px 0;
  text-align: center;
  list-style: none;
}
.errscreen__details summary::-webkit-details-marker { display: none; }
.errscreen__details summary:hover { color: var(--ink); }
.errscreen__meta {
  margin: 8px 0 0;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(70px, max-content) 1fr;
  gap: 6px 10px;
  text-align: left;
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
  color: var(--ink-mute);
  font-family: ui-monospace, SF Mono, Menlo, monospace;
  font-size: 11.5px;
}
.errscreen__meta dt { color: var(--ink-faint); }
.errscreen__meta dd { margin: 0; word-break: break-word; }
.errscreen__raw {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  color: var(--ink-mute);
  font-family: ui-monospace, SF Mono, Menlo, monospace;
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

/* Spinner dots */
.dotpulse { display: inline-flex; gap: 3px; align-items: center; }
.dotpulse span {
  width: 4px; height: 4px; border-radius: 99px;
  background: currentColor;
  animation: dp 1.2s ease-in-out infinite;
}
.dotpulse span:nth-child(2) { animation-delay: .15s; }
.dotpulse span:nth-child(3) { animation-delay: .3s; }
@keyframes dp { 0%,80%,100%{opacity:.2}40%{opacity:1} }

/* Toast — errors that don't warrant a screen */
.toast {
  position: fixed; left: 50%; top: 24px; transform: translateX(-50%);
  z-index: 80;
  padding: 10px 16px; border-radius: 12px;
  background: var(--card-2); border: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink);
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
  max-width: calc(100vw - 32px);
}
.toast[data-kind="error"] { color: var(--error); border-color: rgba(239,107,107,0.35); }

.quota-popover {
  position: fixed;
  right: 20px;
  top: 62px;
  z-index: 35;
  width: min(360px, calc(100vw - 32px));
  padding: 14px;
  border: 1px solid var(--line-2);
  border-radius: 16px;
  background: rgba(18, 18, 20, 0.96);
  box-shadow: 0 24px 70px rgba(0,0,0,0.48);
  color: var(--ink);
}
.quota-popover__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.quota-popover__head h3 { margin: 0; font-size: 15px; font-weight: 560; }
.quota-popover__close {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--ink-dim);
}
.quota-popover__close:hover { color: var(--ink); background: rgba(255,255,255,0.06); }
.quota-popover__stats {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 8px 12px;
  margin: 0;
  font-size: 13px;
}
.quota-popover__stats dt {
  color: var(--ink-dim);
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.quota-popover__stats dd { margin: 0; color: var(--ink-mute); line-height: 1.35; }
.quota-popover__note {
  margin: 12px 0 0;
  color: var(--ink-dim);
  font-size: 12px;
  line-height: 1.4;
}

.copy-fallback {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(0,0,0,0.72);
}
.copy-fallback__sheet {
  width: min(560px, 100%);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: var(--card-2);
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
  padding: 16px;
}
.copy-fallback__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.copy-fallback__head h3 { margin: 0; font-size: 16px; font-weight: 560; }
.copy-fallback__close {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: var(--ink-dim);
  display: flex;
  align-items: center;
  justify-content: center;
}
.copy-fallback__close:hover { background: rgba(255,255,255,0.06); color: var(--ink); }
.copy-fallback__hint {
  margin: 0 0 12px;
  color: var(--ink-mute);
  font-size: 13px;
  line-height: 1.45;
}
.copy-fallback__text {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-2);
  color: var(--ink);
  padding: 12px;
  font-size: 13px;
  line-height: 1.5;
}

/* ──────────────── Responsive ──────────────── */
@media (max-width: 640px) {
  .hero__h { font-size: 36px; }
  .hero__wordmark { font-size: 44px; }
  .hero__mark { width: 104px; height: 104px; margin-bottom: 18px; }
  .hero__mark svg { width: 84px !important; height: 84px !important; }
  .picker { grid-template-columns: 1fr; max-width: 400px; }
  .pick { padding: 24px 16px 22px; }
  .pick__icon { width: 52px; height: 52px; }
  .card { padding: 20px 18px 16px; }
  .res__title, .batch__title { font-size: 24px; }
  .res { gap: 14px; }
  .think__row { grid-template-columns: 90px 1fr; gap: 10px; padding: 10px 12px; }
  /* Wave 11 mobile .hook grid layout removed: v27.1 block D (max-width:700px)
   * is the single source of truth for the mobile grid, and the 44px tap sizing
   * lives in the dedicated touch-target block. The per-banner signal badge is
   * never rendered, so it stays hidden here. */
  .hook__signal { display: none; }
  .hook__emoji-btn span:not(.hook__emoji-btn__icon) { display: none; }
  .input-summary {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .input-summary__limit { white-space: normal; }
  .stack__foot--row { padding-left: 0; }
  .fileline {
    grid-template-columns: 24px 1fr 44px;
    gap: 8px;
  }
  .fileline__size,
  .fileline__status { display: none; }
  .fileline__x { width: 44px; height: 44px; }
  .hook-refine__row { grid-template-columns: 1fr; gap: 8px; }
  .hook-refine__send, .hook-refine__cancel { justify-self: stretch; text-align: center; }
  .chat__input-row { flex-direction: column; gap: 8px; }
  .chat__send { align-self: stretch; }
  .stage { padding: 20px 16px 80px; }
  .topbar { padding: 12px 12px; gap: 8px; }
  .topbar__left,
  .topbar__right { gap: 6px; }
  .topbar__brand { padding: 4px; gap: 6px; }
  .topbar__brandword { display: none; }
  .topbar__history { padding: 7px 9px; }
  .topbar__history span:not(.topbar__kbd) { display: none; }
  .topbar__kbd { display: none; }
  .topbar__account {
    min-width: 38px;
    padding: 2px;
    border-color: transparent;
    background: transparent;
  }
  .topbar__account-label { display: none; }
  .topbar__user { min-width: 34px; }
  .topbar__quota {
    max-width: 92px;
    padding-left: 9px !important;
    padding-right: 9px !important;
  }
  .drawer__delete { opacity: 1; }
  .quota-popover {
    top: 56px;
    right: 12px;
    left: 12px;
    width: auto;
  }

  /* Drawer as bottom-sheet on mobile */
  .drawer { align-items: flex-end; }
  .drawer__sheet {
    width: 100%; max-width: 100%;
    height: 78vh; max-height: 78vh;
    height: 78dvh; max-height: 78dvh;
    border-left: 0;
    border-top: 1px solid var(--line-2);
    border-radius: 22px 22px 0 0;
  }
}

@media (max-width: 820px) {
  .hook-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }
}

/* ──────────────── Reduced motion ──────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .pick:hover { transform: none; }
  .btn--primary:hover:not([disabled]) { transform: none; }
  .batch__row:hover { transform: none; }
}

/* ─── v23.3 — Site footer (legal links) ────────────────────────── */
.site-footer {
  position: static;
  padding: 10px 20px 14px;
  text-align: center;
  font-size: 11px;
  color: var(--ink-dim);
  background: none;
  pointer-events: none;
  z-index: 1;
}
.site-footer nav { pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; }
.site-footer a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  box-sizing: border-box;
  color: var(--ink-dim);
  text-decoration: none;
  padding: 4px 6px;
  border-radius: 3px;
  transition: color 140ms ease;
}
.site-footer a:hover { color: var(--ink); }
.site-footer a:focus-visible {
  outline: 1px solid var(--ink-dim);
  outline-offset: 1px;
}
.site-footer span { color: var(--ink-ghost); }

/* On the legal doc pages, the footer can be in-flow (not fixed). */
.doc-page + .site-footer {
  position: static;
  background: none;
  padding-top: 0;
}

@media (max-width: 560px) {
  .site-footer { font-size: 10.5px; padding-bottom: 10px; }
}

/* ─── Wave 10 (2026-04-27) — Add emoji button + picker popover ─── */
.hook__emoji-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  width: 44px;
  min-height: 44px;
  padding: 0;
  font-size: 12px;
  line-height: 1;
  background: transparent;
  color: var(--ink-dim);
  border: 1px solid transparent;
  border-radius: 10px;
  cursor: pointer;
  grid-column: 3;
  justify-self: center;
  white-space: nowrap;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.hook__emoji-btn span:not(.hook__emoji-btn__icon) { display: none; }
.hook__emoji-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.16);
}
.hook__emoji-btn--applied {
  color: var(--accent);
  border-color: var(--accent-ring);
  background: var(--accent-soft);
}
.hook__emoji-btn:focus-visible {
  outline: 2px solid var(--accent, #2f6fed);
  outline-offset: 2px;
}
.hook__emoji-btn__icon {
  font-size: 14px;
  line-height: 1;
}

.hook-emoji-picker {
  grid-column: 1 / -1;
  margin: 4px 0 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  overflow: hidden;
  animation: emojiPickerIn 180ms ease;
}
@keyframes emojiPickerIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hook-emoji-picker__inner {
  padding: 12px 14px;
}
.hook-emoji-picker__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.hook-emoji-picker__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.hook-emoji-picker__close {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  background: transparent;
  color: var(--ink-dim);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.hook-emoji-picker__close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
}
.hook-emoji-picker__loading,
.hook-emoji-picker__empty {
  font-size: 13px;
  color: var(--ink-dim);
  padding: 8px 0;
}
.hook-emoji-picker__retry { margin-top: 4px; }
.hook-emoji-picker__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
}
.hook-emoji-picker__choice {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease, border-color 120ms ease;
  text-align: center;
}
.hook-emoji-picker__choice:hover {
  background: rgba(47, 111, 237, 0.10);
  border-color: rgba(47, 111, 237, 0.32);
  transform: translateY(-1px);
}
.hook-emoji-picker__choice:focus-visible {
  outline: 2px solid var(--accent, #2f6fed);
  outline-offset: 2px;
}
.hook-emoji-picker__choice:disabled {
  opacity: .5;
  cursor: progress;
  pointer-events: none;
}
.hook-emoji-picker__char {
  font-size: 24px;
  line-height: 1;
}
.hook-emoji-picker__why {
  font-size: 11px;
  color: var(--ink-dim);
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.live-note {
  margin: 10px 0;
  color: var(--ink-dim);
  font-size: 13px;
  line-height: 1.4;
}

.live__cancel {
  min-height: 34px;
  white-space: nowrap;
}

.live__cancel--mini {
  align-self: flex-start;
  margin-top: 8px;
}

/* Any device without a reliable hover (touch) must show the per-row history
   delete affordance, since the hover reveal can never fire there. */
@media (hover: none) {
  .drawer__delete { opacity: 1; }
}

/* Modern iPhone touch/readability pass.
   Playwright and some browser/device combinations do not consistently expose
   pointer: coarse, so this is keyed to modern phone-sized viewports. The
   landscape clause catches iPhone 15/16 class devices rotated sideways without
   pulling tablet and desktop layouts into the touch-target treatment. */
@media (max-width: 700px), (max-width: 950px) and (max-height: 480px) {
  body {
    -webkit-text-size-adjust: 100%;
  }

  .topbar {
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .topbar__brand,
  .topbar__history,
  .topbar__account,
  .res__back,
  .thinkbtn,
  .chip,
  .hook__fav,
  .hook__copy,
  .hook__emoji-btn,
  .hook__refine-btn,
  .hook-refine__send,
  .hook-refine__cancel,
  .drawer__head button,
  .drawer__clear,
  .drawer__delete,
  .hook-emoji-picker__close,
  .quota-popover__close,
  .live__cancel,
  .btn--small,
  .queue-row__actions .btn,
  .clip-section__erractions .btn {
    min-width: 44px;
    min-height: 44px;
  }

  /* Touch devices 641-700px (and short landscape) never get the hover reveal,
     so keep the per-row history delete affordance visible without a hover. */
  .drawer__delete { opacity: 1; }

  /* Keep the quota popover close glyph centered once it grows to a 44px target. */
  .quota-popover__close {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .topbar__brand {
    padding: 8px;
  }

  .topbar__history {
    padding: 10px 12px;
    font-size: 14px;
  }

  .res__back {
    padding: 10px 12px 10px 8px;
    font-size: 14px;
  }

  .thinkbtn {
    padding: 11px 14px;
    font-size: 15px;
    line-height: 1.4;
  }

  .thinkbtn__chev {
    font-size: 14px;
  }

  .thinkbtn__hint {
    font-size: 14px;
  }

  .think__v,
  .transcript__body {
    font-size: 16px;
    line-height: 1.5;
  }
  .res--hooks .transcript__body {
    font-size: 16px;
    line-height: 1.5;
  }

  .transcript__body {
    max-height: min(52vh, 460px);
  }

  .chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 13px;
    font-size: 14px;
    line-height: 1.25;
  }

  .hook-group__title {
    font-size: 17px;
    line-height: 1.35;
  }

  .hook-group__count {
    min-height: 28px;
    padding: 5px 10px;
    font-size: 14px;
  }

  .hook {
    gap: 8px;
  }

  .hook__idx {
    font-size: 12px;
  }

  .hook__text {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 16px;
    line-height: 1.45;
    padding: 8px 10px;
    margin: -8px -10px;
  }

  .hook__fav,
  .hook__copy,
  .hook__emoji-btn,
  .hook__refine-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    font-size: 14px;
    justify-content: center;
  }

  .hook__copy span,
  .hook__refine-btn span,
  .hook__emoji-btn span:not(.hook__emoji-btn__icon) {
    display: none;
  }

  .hook__copy svg,
  .hook__refine-btn svg {
    width: 18px;
    height: 18px;
  }

  .hook__emoji-btn__icon {
    font-size: 18px;
  }

  .hook-refine__inner {
    padding: 16px 14px 18px;
  }

  .hook-refine__hint {
    font-size: 14px;
    line-height: 1.35;
    letter-spacing: 0.02em;
  }

  .hook-refine__note {
    font-size: 14px;
    line-height: 1.45;
  }

  .hook-refine__input {
    min-height: 48px;
    font-size: 16px;
    line-height: 1.45;
    padding: 12px 14px;
  }

  .hook-refine__send,
  .hook-refine__cancel {
    font-size: 15px;
  }

  .intent__chip {
    min-height: 44px;
    padding: 10px 14px;
    font-size: 14px;
  }

  .intent__chip-icon {
    width: 20px;
    height: 20px;
    font-size: 14px;
  }

  .chat__send {
    min-height: 44px;
    height: 44px;
    font-size: 15px;
  }

  .chat__kbd {
    display: none;
  }

  .site-footer nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .site-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 8px;
    font-size: 14px;
  }

  .site-footer span {
    font-size: 14px;
  }

  .drawer__sheet {
    padding-left: max(18px, env(safe-area-inset-left));
    padding-right: max(18px, env(safe-area-inset-right));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }

  .drawer__head h3 {
    font-size: 18px;
  }

  .drawer__clear {
    padding: 0 14px;
    font-size: 14px;
  }

  .drawer__item {
    min-height: 58px;
    padding: 14px 12px;
  }

  .drawer__title {
    white-space: normal;
    font-size: 16px;
    line-height: 1.35;
  }

  .drawer__sub,
  .drawer__ttl {
    font-size: 13.5px;
    line-height: 1.45;
  }

  .hook-emoji-picker__title {
    font-size: 14px;
  }

  .hook-emoji-picker__choice {
    min-height: 64px;
    padding: 12px 10px;
  }

  .hook-emoji-picker__why {
    font-size: 13.5px;
    line-height: 1.35;
  }
}

@media (max-width: 700px), (max-width: 950px) and (max-height: 480px) {
  .stage {
    padding-bottom: max(88px, calc(72px + env(safe-area-inset-bottom)));
  }

  .res--hooks,
  .batch--scroll,
  .batch--queue {
    width: min(100%, calc(100vw - 24px));
    max-width: none;
  }

  /* v27.1 block D (max-width:700px) is the single source of truth for the
     mobile .hook grid layout; the inert named-grid + stacked action layout
     here was order-shadowed and has been removed (44px tap sizing lives in
     the dedicated touch-target block). */

  .topbar__brand {
    min-width: 44px;
    min-height: 44px;
  }

  .topbar__history {
    min-width: 44px;
    min-height: 44px;
  }

  .topbar__account {
    min-width: 44px;
    min-height: 44px;
    padding: 4px;
  }
}

/* Reference results layout: phone-specific composition overrides. */
@media (max-width: 700px), (max-width: 950px) and (max-height: 480px) {
  .app[data-screen="done"] > .topbar,
  .app[data-screen="results"] > .topbar {
    display: none;
  }

  .app[data-screen="done"] .stage,
  .app[data-screen="results"] .stage {
    padding: max(12px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom));
  }

  .mobile-results-chrome {
    width: calc(100vw - 24px);
    display: flex;
    flex-direction: column;
    gap: 54px;
    align-self: center;
    margin: 0 auto 18px;
  }

  .res--hooks,
  .batch--queue {
    width: calc(100vw - 24px);
    gap: 22px;
  }

  .res--hooks > .res__back,
  .batch > .res__back,
  .batch--queue > .res__back,
  .batch--scroll > .res__back {
    display: none;
  }

  .batch--queue .batch__head {
    margin-top: -26px;
  }

  .res--hooks .res__head {
    gap: 12px;
    padding-top: 4px;
  }

  .res--hooks .res__source {
    display: block;
    max-width: 100%;
    margin: 0 0 2px;
    font-size: 13px;
    letter-spacing: 0.24em;
    text-align: center;
  }

  .res--hooks .res__title {
    width: 100%;
    max-width: 690px;
    font-size: clamp(34px, 7.8vw, 46px);
    line-height: 1.08;
    letter-spacing: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .res__meta {
    font-size: 22px;
    gap: 9px;
    flex-wrap: wrap;
    white-space: normal;
    justify-content: center;
    max-width: 100%;
  }

  .res--hooks .transcript {
    width: 100%;
    min-height: 290px;
    padding: 28px 28px 0;
    border-radius: 26px;
  }

  .transcript__label {
    font-size: 13px;
    letter-spacing: 0.21em;
  }

  .res--hooks .transcript__body {
    max-height: 126px;
    margin-top: 4px;
    font-size: 22px;
    line-height: 1.45;
  }

  .res--hooks .transcript[data-expanded="true"] .transcript__body {
    max-height: min(48vh, 520px);
  }

  .transcript__foot {
    padding: 20px 0 22px;
  }

  .transcript__toggle,
  .transcript__copy {
    min-height: 44px;
    font-size: 21px;
    padding: 0 16px;
  }

  .results-toolbar {
    display: block;
    overflow: hidden;
    margin-top: 2px;
  }

  .results-toolbar__filters {
    /* Mobile: wrap the filter chips so all of them (incl. Questions) stay
       visible. The old nowrap + hidden-scrollbar overflow hid the last chip
       off-screen with no affordance. */
    width: 100%;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 2px;
  }

  .results-toolbar__actions {
    display: none;
  }

  .results-toolbar .chip {
    min-height: 56px;
    flex: 0 0 auto;
    padding: 0 22px;
    font-size: 21px;
  }

  .hook-split {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .hook-group {
    border-radius: 26px;
  }

  .hook-group__head {
    grid-template-columns: minmax(0, 1fr);
    min-height: 66px;
    padding: 0 28px;
  }

  .hook-group__title {
    font-size: 17px;
    letter-spacing: 0.19em;
  }

  .hook-group__labels {
    display: none;
  }

  /* v27.1 block D (max-width:700px) is the single source of truth for the
     mobile .hook grid layout; the previously stacked layout here was
     order-shadowed and has been removed. Only the non-grid emoji icon size
     remains. */
  .hook__emoji-btn__icon {
    font-size: 23px;
  }
}

/* v27 — Composer scale correction.
   Scope: landing, Normal input composer, More Context / Pro setup, and
   transcript-only. Results keep their dedicated reference layout above. */
.app[data-screen="input"] .stage,
.app[data-screen="pro"] .stage,
.app[data-screen="transcribe"] .stage {
  align-items: flex-start;
  padding-top: clamp(22px, 4vh, 42px);
  padding-bottom: clamp(44px, 7vh, 72px);
}

.home2 {
  min-height: auto;
  gap: clamp(18px, 3vh, 34px);
  padding: clamp(18px, 3.2vh, 34px) 20px clamp(44px, 6vh, 64px);
}

.home2-mark {
  width: 78px;
  height: 78px;
}

.home2-mark svg {
  width: 70px;
  height: 70px;
}

.home2-word {
  font-size: clamp(44px, 4.1vw, 58px);
}

.home2-tagline {
  font-size: clamp(15px, 1vw, 18px);
  margin-bottom: 2px;
}

.home-actions {
  width: min(920px, calc(100vw - 64px));
  gap: clamp(20px, 3.2vh, 34px);
}

.home-actions__primary {
  gap: 16px;
}

.home-action {
  min-height: 124px;
  padding: 18px;
  border-radius: 20px;
  gap: 12px;
}

.home-action__icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
}

.home-action__icon svg {
  width: 22px;
  height: 22px;
}

.home-action__label {
  font-size: clamp(18px, 1.25vw, 22px);
}

.home-link-platforms {
  min-height: 30px;
  font-size: 14px;
  padding: 0 14px;
}

.more-context--compact {
  width: min(620px, 100%);
}

.more-context--compact.more-context--open {
  width: min(760px, 100%);
}

.more-context--compact .more-context__more {
  font-size: 11px;
  letter-spacing: 0.24em;
}

.more-context__optional-line {
  font-size: clamp(11px, 0.86vw, 13px);
  letter-spacing: 0.24em;
}

.more-context__home-line {
  gap: 11px;
  font-size: clamp(18px, 1.25vw, 22px);
}

.more-context--compact.more-context--open .more-context__head {
  min-height: 72px;
  padding: 18px 22px;
}

.more-context--compact.more-context--open .more-context__body {
  padding: 0 22px 22px;
}

.more-context .ta {
  height: 136px;
  min-height: 136px;
}

.more-context .drop {
  min-height: 138px;
}

.more-context .urlbox {
  min-height: 58px;
}

.comp-stage {
  width: min(760px, calc(100vw - 64px));
  max-width: 760px;
  gap: 16px;
  padding: 0;
  margin: 0 auto clamp(38px, 6vh, 62px);
}

.comp-stage--pro {
  width: min(820px, calc(100vw - 64px));
  max-width: 820px;
}

.comp-title-row {
  gap: 14px;
  margin-top: 2px;
}

.comp-title-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
}

.comp-title-icon svg {
  width: 20px;
  height: 20px;
}

.comp-title-eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.22em;
}

.comp-h1 {
  font-size: clamp(30px, 2.8vw, 42px);
  line-height: 1.05;
}

.pro-tabs {
  width: min(620px, 100%);
  min-height: 54px;
  padding: 5px;
  border-radius: 16px;
}

.pro-tabs__btn {
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 16px;
  gap: 9px;
}

.composer-body {
  margin-top: 4px;
}

.ta {
  min-height: 176px;
  border-radius: 14px;
  padding: 16px;
  /* 16px (not 15) so iOS Safari does not auto-zoom the page when focused. */
  font-size: 16px;
  line-height: 1.5;
}

.urlbox {
  min-height: 64px;
  padding: 9px 16px;
  border-radius: 14px;
}

.urlbox__input {
  min-height: 44px;
  font-size: 16px;
}

.drop {
  min-height: 174px;
  border-radius: 18px;
}

.drop__ring {
  width: 46px;
  height: 46px;
}

.drop__title {
  font-size: 15px;
}

.drop__sub {
  font-size: 12px;
}

.transcript-upload {
  min-height: 62px;
  padding: 10px 12px;
}

.addmore {
  margin-top: 10px;
}

.input-summary {
  margin-top: 2px;
}

.composer-cta {
  justify-content: center;
  padding-top: 2px;
}

.composer-cta .btn-generate {
  width: min(330px, 100%);
}

.ta.pro-request__ta {
  min-height: 92px;
}

.stack__foot--row.pro-foot-row {
  padding-left: 0;
}

.drop.drop--pro {
  min-height: 132px;
}

.pro-request__chips {
  gap: 8px;
}

.pro-request__chip {
  min-height: 44px;
  padding: 0 12px;
}

.transcribe-only {
  width: min(860px, calc(100vw - 64px));
  min-height: auto;
  padding: clamp(24px, 4.5vh, 48px) 0 clamp(44px, 7vh, 70px);
  gap: 22px;
}

.transcribe-only__head {
  gap: 12px;
}

.transcribe-only__eyebrow {
  font-size: 13px;
  letter-spacing: 0.24em;
}

.transcribe-only__title {
  font-size: clamp(36px, 4.4vw, 54px);
  line-height: 1;
}

.transcribe-only__sub {
  max-width: 58ch;
  font-size: clamp(17px, 1.45vw, 22px);
}

.transcribe-only__tabs {
  grid-template-columns: repeat(2, minmax(112px, 1fr));
}

.transcribe-only__tab {
  min-height: 48px;
  padding: 0 16px;
  font-size: 16px;
}

.transcribe-only__labelrow {
  font-size: 15px;
}

.transcribe-only__labelrow span:first-child {
  font-size: 12px;
  letter-spacing: 0.22em;
}

.transcribe-urlbox {
  min-height: 64px;
  padding: 0 18px;
}

.transcribe-urlbox .urlbox__input {
  font-size: 18px;
}

.drop.drop--transcribe {
  min-height: 172px;
}

.transcribe-only__cta {
  gap: 20px;
}

.transcribe-only__note {
  font-size: 12px;
  letter-spacing: 0.26em;
}

.transcribe-only__btn {
  min-width: 200px;
}

@media (max-width: 820px) {
  .app[data-screen="input"] .stage,
  .app[data-screen="pro"] .stage,
  .app[data-screen="transcribe"] .stage {
    padding-top: max(16px, env(safe-area-inset-top));
    padding-bottom: max(48px, calc(40px + env(safe-area-inset-bottom)));
  }

  .home2 {
    padding: 16px 14px 52px;
    gap: 24px;
  }

  .home2-mark {
    width: 68px;
    height: 68px;
  }

  .home2-mark svg {
    width: 60px;
    height: 60px;
  }

  .home2-word {
    font-size: clamp(40px, 11vw, 54px);
  }

  .home-actions {
    width: min(520px, calc(100vw - 28px));
    gap: 24px;
  }

  .home-action {
    min-height: 108px;
    border-radius: 20px;
  }

  .comp-stage,
  .comp-stage--pro,
  .transcribe-only {
    width: min(520px, calc(100vw - 28px));
    max-width: min(520px, calc(100vw - 28px));
    gap: 15px;
  }

  .comp-title-row {
    gap: 12px;
  }

  .comp-h1 {
    font-size: clamp(30px, 8.6vw, 38px);
  }

  .pro-tabs {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .pro-tabs::-webkit-scrollbar {
    display: none;
  }

  .pro-tabs__btn {
    flex: 1 0 auto;
    min-width: max-content;
    font-size: 15px;
  }

  .ta {
    min-height: 160px;
    font-size: 16px;
  }

  .urlbox {
    min-height: 60px;
  }

  .drop {
    min-height: 160px;
  }

  .more-context--compact,
  .more-context--compact.more-context--open {
    width: min(520px, 100%);
  }

  .more-context__home-line {
    font-size: 19px;
  }

  .more-context--compact.more-context--open .more-context__head,
  .more-context--compact.more-context--open .more-context__body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .transcribe-only__title {
    font-size: clamp(40px, 11vw, 52px);
  }

  .transcribe-only__sub {
    font-size: 19px;
  }

  .transcribe-only__cta {
    display: grid;
    gap: 14px;
    justify-content: stretch;
  }

  .transcribe-only__btn {
    width: 100%;
  }
}

/* v28 — Composer density correction.
   The v27 pass stopped full-width stretching, but the active composer
   still read visually zoomed: rails were too wide, the heading was too
   large, and the transcript/drop inputs occupied too much vertical mass.
   Keep results unchanged; tighten only the entry/composer/pro/transcribe
   surfaces. */
.app[data-screen="input"] .stage,
.app[data-screen="pro"] .stage,
.app[data-screen="transcribe"] .stage {
  padding-top: clamp(16px, 3vh, 30px);
  padding-bottom: clamp(34px, 5vh, 56px);
}

.home2 {
  gap: clamp(14px, 2.4vh, 26px);
  padding: clamp(14px, 2.4vh, 26px) 20px clamp(34px, 5vh, 54px);
}

.home2-mark {
  width: 66px;
  height: 66px;
}

.home2-mark svg {
  width: 58px;
  height: 58px;
}

.home2-word {
  font-size: clamp(38px, 3.35vw, 50px);
}

.home2-tagline {
  font-size: clamp(14px, 0.92vw, 16px);
}

.home-actions {
  width: min(780px, calc(100vw - 96px));
  gap: clamp(16px, 2.4vh, 26px);
}

.home-actions__primary {
  gap: 12px;
}

.home-action {
  min-height: 96px;
  padding: 10px 12px;
  border-radius: 18px;
  gap: 6px;
}

.home-action__icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.home-action__icon svg {
  width: 17px;
  height: 17px;
}

.home-action__label {
  font-size: clamp(16px, 1.08vw, 19px);
}

.link-platforms {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--ink-dim);
}

.link-platforms__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 8px;
  color: rgba(237,235,228,0.58);
}

.link-platforms__mark--youtube { color: rgba(255,120,120,0.72); }
.link-platforms__mark--instagram { color: rgba(236,160,198,0.72); }
.link-platforms__mark--tiktok { color: rgba(126,214,238,0.72); }
.link-platforms__mark--drive { color: rgba(177,205,142,0.72); }

.home-link-platforms {
  min-height: 22px;
  padding: 0 8px;
  gap: 6px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(255,255,255,0.025);
}

.home-link-platforms .link-platforms__mark {
  width: 14px;
  height: 14px;
}

.home-link-platforms svg {
  width: 11px;
  height: 11px;
}

.comp-stage {
  width: min(650px, calc(100vw - 96px));
  max-width: 650px;
  gap: 12px;
  margin-bottom: clamp(28px, 4.5vh, 48px);
}

.comp-stage--pro {
  width: min(700px, calc(100vw - 96px));
  max-width: 700px;
}

.comp-title-row {
  gap: 11px;
  margin-top: 0;
}

.comp-title-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.comp-title-icon svg {
  width: 17px;
  height: 17px;
}

.comp-title-eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.2em;
}

.comp-h1 {
  font-size: clamp(26px, 2.15vw, 31px);
  line-height: 1.05;
}

.pro-tabs {
  width: min(560px, 100%);
  min-height: 48px;
  padding: 4px;
  border-radius: 14px;
}

.pro-tabs__btn {
  min-height: 44px;
  padding: 0 13px;
  border-radius: 11px;
  font-size: 14.5px;
  gap: 7px;
}

.ta {
  min-height: 132px;
  padding: 13px;
  border-radius: 13px;
  font-size: 14px;
  line-height: 1.45;
}

.urlbox {
  min-height: 54px;
  padding: 6px 12px;
  border-radius: 13px;
  gap: 10px;
}

.urlbox__icon svg {
  width: 20px;
  height: 20px;
}

.urlbox__input {
  min-height: 44px;
  /* 16px so iOS Safari does not auto-zoom when the link field is focused. */
  font-size: 16px;
}

.urlbox__platforms {
  flex: 0 0 auto;
  gap: 7px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.urlbox__platforms .link-platforms__mark {
  width: 18px;
  height: 18px;
}

.urlbox__platforms svg {
  width: 14px;
  height: 14px;
}

.drop {
  min-height: 138px;
  border-radius: 16px;
}

.drop__ring {
  width: 40px;
  height: 40px;
}

.drop__ring svg {
  width: 18px;
  height: 18px;
}

.drop__title {
  font-size: 14px;
}

.drop__sub {
  font-size: 11.5px;
}

.transcript-upload {
  min-height: 54px;
  padding: 8px 10px;
}

.more-context--compact {
  width: min(540px, 100%);
}

.more-context--compact.more-context--open {
  width: min(660px, 100%);
}

.more-context__home-line {
  font-size: clamp(16px, 1.08vw, 19px);
}

.more-context--compact.more-context--open .more-context__head {
  min-height: 62px;
  padding: 15px 18px;
}

.more-context--compact.more-context--open .more-context__body {
  padding: 0 18px 18px;
}

.more-context .ta {
  height: 112px;
  min-height: 112px;
}

.more-context .drop {
  min-height: 118px;
}

.more-context .urlbox {
  min-height: 52px;
}

.ta.pro-request__ta {
  min-height: 78px;
}

.drop.drop--pro {
  min-height: 118px;
}

.input-summary {
  margin-top: 0;
}

.composer-cta .btn-generate {
  width: min(292px, 100%);
  min-height: 54px;
}

.transcribe-only {
  width: min(720px, calc(100vw - 96px));
  gap: 18px;
  padding: clamp(18px, 3.5vh, 36px) 0 clamp(34px, 5vh, 58px);
}

.transcribe-only__title {
  font-size: clamp(32px, 3.6vw, 44px);
}

.transcribe-only__sub {
  font-size: clamp(15px, 1.2vw, 18px);
}

.transcribe-urlbox {
  min-height: 54px;
  padding: 0 14px;
}

.transcribe-urlbox .urlbox__input {
  font-size: 16px;
}

.drop.drop--transcribe {
  min-height: 138px;
}

@media (max-width: 820px) {
  .home2 {
    gap: 18px;
    padding: 12px 14px 42px;
  }

  .home2-mark {
    width: 58px;
    height: 58px;
  }

  .home2-mark svg {
    width: 50px;
    height: 50px;
  }

  .home2-word {
    font-size: clamp(34px, 9.4vw, 46px);
  }

  .home-actions {
    width: min(430px, calc(100vw - 32px));
    gap: 18px;
  }

  .home-action {
    min-height: 96px;
    padding: 13px;
  }

  .comp-stage,
  .comp-stage--pro,
  .transcribe-only {
    width: min(430px, calc(100vw - 32px));
    max-width: min(430px, calc(100vw - 32px));
    gap: 12px;
  }

  .comp-h1 {
    font-size: clamp(25px, 6.6vw, 29px);
  }

  .pro-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pro-tabs__btn {
    min-height: 44px;
    min-width: 0;
    padding: 0 6px;
    font-size: 12.5px;
    gap: 5px;
  }

  .pro-tabs__btn svg {
    width: 16px;
    height: 16px;
  }

  .ta {
    min-height: 126px;
    font-size: 15px;
  }

  .urlbox {
    min-height: 54px;
  }

  .urlbox__platforms {
    gap: 4px;
    padding-left: 7px;
  }

  .urlbox__platforms .link-platforms__mark {
    width: 15px;
    height: 15px;
  }

  .urlbox__platforms svg {
    width: 12px;
    height: 12px;
  }

  .drop {
    min-height: 132px;
  }

  .more-context--compact,
  .more-context--compact.more-context--open {
    width: min(430px, 100%);
  }

  .more-context__home-line {
    font-size: 17px;
  }

  .more-context .ta {
    height: 104px;
    min-height: 104px;
  }

  .more-context .drop {
    min-height: 112px;
  }

  .transcribe-only__title {
    font-size: clamp(32px, 9vw, 42px);
  }

  .transcribe-only__sub {
    font-size: 16px;
  }
}

@media (min-width: 821px) and (max-height: 760px) {
  .home2-mark {
    width: 66px;
    height: 66px;
  }

  .home2-mark svg {
    width: 58px;
    height: 58px;
  }

  .home2-word {
    font-size: clamp(40px, 3.6vw, 52px);
  }

  .home-action {
    min-height: 112px;
  }

  .ta {
    min-height: 148px;
  }

  .drop {
    min-height: 150px;
  }
}

/* v29 — Home reference scale/spacing match.
   The supplied desktop reference uses a compact centered lockup: a thin
   topbar, smaller wordmark, three narrower/taller cards, and clear air
   between the primary cards, More Context, and Transcript Only surfaces.
   Scope this correction to the home screen so the composer/results rails
   keep their existing working layouts. */
.app[data-screen="hero"] > .topbar {
  min-height: 54px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.035);
}

.app[data-screen="hero"] .topbar__brand,
.app[data-screen="hero"] .topbar__history,
.app[data-screen="hero"] .topbar__user {
  min-height: 44px;
}

.app[data-screen="hero"] .topbar__brandmark {
  width: 24px;
  height: 24px;
}

.app[data-screen="hero"] .topbar__brandword {
  font-size: 14px;
}

.app[data-screen="hero"] .stage {
  align-items: flex-start;
  padding-top: clamp(72px, 10vh, 116px);
  padding-bottom: clamp(46px, 7vh, 82px);
}

.home2 {
  min-height: auto;
  gap: 0;
  padding: 0 20px;
}

.home2-hero {
  gap: 12px;
}

.home2-mark {
  width: 52px;
  height: 52px;
  margin-bottom: 12px;
}

.home2-mark svg {
  width: 46px;
  height: 46px;
}

.home2-word {
  font-size: clamp(38px, 2.9vw, 42px);
  line-height: 0.98;
}

.home2-tagline {
  margin-top: 10px;
  font-size: clamp(13px, 0.88vw, 15px);
  line-height: 1.45;
}

.home-actions {
  width: min(632px, calc(100vw - 96px));
  gap: 0;
  margin-top: clamp(46px, 6.3vh, 62px);
}

.home-actions__primary {
  gap: 10px;
}

.home-action {
  min-height: 132px;
  padding: 14px 12px;
  border-radius: 17px;
  gap: 12px;
  box-shadow: none;
}

.home-action__icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.home-action__icon svg {
  width: 18px;
  height: 18px;
}

.home-action__label {
  font-size: clamp(14px, 0.98vw, 16px);
  line-height: 1.12;
}

.home-link-platforms {
  min-height: 22px;
  padding: 0 9px;
  gap: 6px;
}

.home-link-platforms .link-platforms__mark {
  width: 14px;
  height: 14px;
}

.home-link-platforms svg {
  width: 11px;
  height: 11px;
}

.more-context--compact {
  width: min(480px, 100%);
  margin-top: clamp(44px, 5.7vh, 52px);
}

.more-context--compact .more-context__home-copy {
  gap: 10px;
}

.more-context--compact .more-context__more {
  font-size: 10px;
  letter-spacing: 0.25em;
}

.more-context--compact .more-context__optional-line {
  margin-top: 0;
  font-size: 10px;
  letter-spacing: 0.33em;
}

.more-context--compact:not(.more-context--open) .more-context__head {
  padding: 0;
}

.more-context--compact .more-context__home-line {
  margin-top: 4px;
  font-size: clamp(15px, 1.05vw, 17px);
}

.transcribe-home {
  width: min(300px, 100%);
  gap: 12px;
  margin-top: clamp(72px, 9.2vh, 86px);
}

.transcribe-home__divider {
  gap: 12px;
  font-size: 10px;
  letter-spacing: 0.26em;
}

.transcribe-card {
  min-height: 44px;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 11px;
}

.transcribe-card__icon,
.transcribe-card__arrow {
  width: 30px;
  height: 30px;
  border-radius: 8px;
}

.transcribe-card__icon svg,
.transcribe-card__arrow svg {
  width: 15px;
  height: 15px;
}

.transcribe-card__title {
  font-size: 11px;
}

.transcribe-card__sub {
  margin-top: 1px;
  font-size: 10px;
}

@media (max-width: 820px) {
  .app[data-screen="hero"] > .topbar {
    min-height: 58px;
    padding: 9px 12px;
  }

  .app[data-screen="hero"] .stage {
    padding-top: max(24px, calc(18px + env(safe-area-inset-top)));
    padding-bottom: max(48px, calc(40px + env(safe-area-inset-bottom)));
  }

  .home2 {
    padding: 0 14px 42px;
  }

  .home2-mark {
    width: 54px;
    height: 54px;
    margin-bottom: 8px;
  }

  .home2-mark svg {
    width: 48px;
    height: 48px;
  }

  .home2-word {
    font-size: clamp(34px, 9.2vw, 42px);
  }

  .home2-tagline {
    margin-top: 8px;
    font-size: 14px;
  }

  .home-actions {
    width: min(430px, calc(100vw - 32px));
    margin-top: 34px;
  }

  .home-actions__primary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-action {
    min-height: 92px;
    padding: 13px;
    gap: 9px;
  }

  .home-action__label {
    font-size: 17px;
  }

  .more-context--compact {
    width: min(430px, 100%);
    margin-top: 42px;
  }

  .transcribe-home {
    width: min(360px, 100%);
    margin-top: 58px;
  }

  .transcribe-card {
    min-height: 58px;
    border-radius: 14px;
  }

  .transcribe-card__icon,
  .transcribe-card__arrow {
    width: 40px;
    height: 40px;
    border-radius: 11px;
  }

  .transcribe-card__title {
    font-size: 14px;
  }

  .transcribe-card__sub {
    font-size: 12px;
  }
}

/* v27.1 — compact transcript-only and specific-request polish. */
.transcribe-card {
  grid-template-columns: 34px minmax(0, 1fr) 26px;
  gap: 12px;
  padding: 9px 10px 9px 12px;
  border-color: rgba(86, 145, 245, 0.56);
  background:
    linear-gradient(112deg, rgba(42, 91, 170, 0.28) 0%, rgba(19, 46, 94, 0.18) 58%, rgba(9, 18, 36, 0.15) 100%);
}

.transcribe-home {
  width: min(370px, 100%);
}

.transcribe-card__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(91, 154, 255, 0.16);
  transform: translateY(-2px);
}

.transcribe-card__arrow {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(91, 154, 255, 0.12);
  align-self: end;
}

.transcribe-card__title {
  max-width: 38ch;
  color: #bcd7ff;
  font-size: 12.5px;
  font-weight: 760;
  line-height: 1.18;
  letter-spacing: 0;
}

.transcribe-card__sub {
  display: none;
}

.pro-section--request.is-collapsed {
  display: grid;
  justify-items: center;
  margin-top: 2px;
}

.pro-section--request.is-collapsed .pro-label {
  display: none;
}

.pro-request-add {
  min-height: 44px;
  width: min(360px, 100%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid rgba(99, 163, 255, 0.58);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(37, 88, 172, 0.23), rgba(22, 54, 111, 0.12)),
    rgba(10, 15, 28, 0.72);
  color: #a9ccff;
  box-shadow: 0 14px 44px rgba(37, 88, 172, 0.13);
}

.pro-request-add:hover,
.pro-request-add:focus-visible {
  border-color: rgba(126, 184, 255, 0.86);
  background:
    linear-gradient(135deg, rgba(48, 105, 196, 0.30), rgba(24, 63, 130, 0.18)),
    rgba(12, 19, 35, 0.82);
  outline: none;
}

.pro-request-add svg {
  width: 14px;
  height: 14px;
  color: #7fb5ff;
}

.pro-request-add span {
  color: #c7dcff;
  font-size: 13px;
  font-weight: 760;
  letter-spacing: 0;
}

.pro-request-add b {
  color: rgba(151, 196, 255, 0.68);
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.pro-section--request.is-open {
  display: grid;
  gap: 9px;
}

.pro-section--request.is-open .pro-label {
  min-height: 40px;
  padding: 8px 10px;
  border-color: rgba(99, 163, 255, 0.32);
  background: rgba(31, 74, 145, 0.10);
}

.pro-section--request.is-open .pro-label-icon {
  border-color: rgba(99, 163, 255, 0.34);
  background: rgba(99, 163, 255, 0.12);
  color: #8dbdff;
}

.pro-section--request.is-open .pro-label--request .pro-label-title {
  color: #bcd7ff;
}

.pro-section--request.is-open .pro-label-hint {
  color: rgba(151, 196, 255, 0.66);
}

.pro-section--request .pro-request {
  gap: 5px;
}

.ta.pro-request__ta {
  min-height: 68px;
  height: 68px;
  padding: 11px 12px;
  border-color: rgba(99, 163, 255, 0.28);
  background: rgba(13, 18, 31, 0.82);
}

.pro-request__chips {
  gap: 6px;
  margin-top: 5px;
}

.pro-request__chip {
  min-height: 44px;
  padding: 0 10px;
  border-color: rgba(99, 163, 255, 0.30);
  background: rgba(38, 86, 166, 0.11);
  color: #a9ccff;
  font-size: 11.5px;
}

.pro-request__chip:hover,
.pro-request__chip:focus-visible {
  border-color: rgba(126, 184, 255, 0.72);
  color: #d6e6ff;
}

.pro-section--request .stack__head {
  min-height: 0;
}

.pro-section--request .stack__n {
  color: rgba(151, 196, 255, 0.70);
}

.app[data-screen="input"] .addmore--url {
  min-height: 48px;
  margin-top: 14px;
  margin-bottom: 12px;
  padding: 9px 18px;
  font-size: 13.5px;
}

@media (max-width: 820px) {
  .transcribe-card {
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    min-height: 62px;
    padding: 10px 12px;
  }

  .transcribe-card__icon {
    width: 38px;
    height: 38px;
  }

  .transcribe-card__arrow {
    width: 30px;
    height: 30px;
  }

  .transcribe-card__title {
    font-size: 13px;
  }

  .pro-request-add {
    width: 100%;
    min-height: 44px;
  }

  .more-context .pro-tabs {
    grid-template-columns: 1fr;
    gap: 6px;
    min-height: 0;
    padding: 6px;
  }

  .more-context .pro-tabs__btn {
    justify-content: flex-start;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.055);
    background: rgba(255, 255, 255, 0.018);
    font-size: 13px;
    line-height: 1.15;
    text-align: left;
    white-space: normal;
  }

  .more-context .pro-tabs__btn[data-active="true"] {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
  }
}

/* v30 — Composer rail alignment.
   The input pages use a different structure than the home page; older density
   passes left them visually "almost centered" because the title, tabs, body,
   summary, and CTA were each sizing themselves independently. This final
   scoped layer gives transcript/link/upload one centered rail while keeping
   the back affordance at the rail's left edge. */
.app[data-screen="input"] .stage {
  align-items: center;
}

.app[data-screen="input"] .comp-stage {
  width: min(580px, calc(100vw - 112px));
  max-width: 580px;
  gap: 14px;
  margin-inline: auto;
}

.app[data-screen="input"] .back-btn.solo {
  align-self: flex-start;
  margin-bottom: 2px;
}

.app[data-screen="input"] .comp-title-row,
.app[data-screen="input"] .composer-body,
.app[data-screen="input"] .input-summary,
.app[data-screen="input"] .composer-cta {
  width: 100%;
}

.app[data-screen="input"] .stack__item--row,
.app[data-screen="input"] .urlbox {
  min-width: 0;
}

.app[data-screen="input"] .urlbox {
  width: 100%;
  box-sizing: border-box;
}

.app[data-screen="input"] .comp-title-row,
.app[data-screen="input"] .composer-cta {
  align-self: center;
}

.app[data-screen="input"] .comp-title-row {
  max-width: 560px;
  margin-inline: auto;
}

.app[data-screen="input"] .composer-cta {
  justify-content: center;
}

.app[data-screen="input"] .composer-cta .btn-generate {
  width: min(300px, 100%);
  min-width: 0;
}

@media (max-width: 820px) {
  .app[data-screen="input"] .comp-stage {
    width: min(430px, calc(100vw - 32px));
    max-width: min(430px, calc(100vw - 32px));
  }
}

@media (max-width: 360px) {
  .app[data-screen="input"] .urlbox {
    gap: 8px;
    padding-inline: 10px;
  }

  .app[data-screen="input"] .urlbox__platforms {
    gap: 5px;
    padding-left: 8px;
  }

  .app[data-screen="input"] .urlbox__platforms .link-platforms__mark {
    width: 16px;
    height: 16px;
  }

  .app[data-screen="input"] .urlbox__platforms svg {
    width: 12px;
    height: 12px;
  }
}

/* v27.1 — mobile result rows must stay readable while preserving 44px
   tap targets. Earlier mobile rules let action columns squeeze banner text
   to ~113px at 375px wide, creating tall stacked rows. */
@media (max-width: 700px) {
  .hook {
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px 44px;
    grid-template-rows: minmax(44px, auto);
    column-gap: 3px;
    row-gap: 0;
    padding: 4px 6px;
    min-height: 52px;
  }

  .hook__main,
  .hook__actions {
    display: contents;
  }

  .hook__fav {
    grid-column: 1;
    grid-row: 1;
  }

  .hook__text {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
    min-height: 44px;
    font-size: 16px;
    line-height: 1.2;
    padding: 3px 4px;
    margin: -3px -4px;
  }

  .hook__emoji-btn,
  .hook__copy,
  .hook__refine-btn {
    grid-row: 1;
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .hook__emoji-btn { grid-column: 3; }
  .hook__copy { grid-column: 4; }
  .hook__refine-btn { grid-column: 5; }
}

/* ── iOS Safari: prevent focus auto-zoom on small text fields ──
   Safari zooms the viewport whenever a focused input/textarea renders below
   16px, which feels broken on a phone. This block is intentionally LAST in the
   file so it wins over the several earlier phone media blocks (760/700/820px)
   that set these same fields below 16px. Every typeable field is forced to 16px
   at phone widths; non-input chrome (labels, kbd, notes) is untouched. */
@media (max-width: 820px), (max-width: 950px) and (max-height: 480px) {
  .ta,
  .urlbox__input,
  .transcribe-urlbox .urlbox__input,
  .hook-refine__input,
  .chat__input,
  .clip-refine__input,
  .copy-fallback__text {
    font-size: 16px;
  }
}
