:root {
  --bg: #0a0b0d;
  --panel: #12151a;
  --panel-2: #171b21;
  --line: #232932;
  --line-soft: #1d2229;
  --text: #eef1f5;
  --body: #d8dee7;
  --muted: #8c95a3;
  --faint: #5f6875;
  --accent: #d8ff6a;
  --accent-dim: #b8e34f;
  --accent-ink: #101400;
  --green: #8ce99a;
  --amber: #ffbd66;
  --red: #ff8c8c;
  --blue: #86c8ff;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --font-display: "New York", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1000px 540px at 50% -240px, rgba(216, 255, 106, 0.115), transparent 64%),
    radial-gradient(820px 480px at 88% 6%, rgba(134, 200, 255, 0.06), transparent 62%),
    radial-gradient(700px 420px at 6% 18%, rgba(255, 189, 102, 0.04), transparent 60%);
}

::selection { background: var(--accent); color: var(--accent-ink); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

a { color: inherit; }

/* ---------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(10, 11, 13, 0.72);
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
}

.topbar-inner {
  max-width: 1120px;
  height: 64px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 4px 18px -6px rgba(216, 255, 106, 0.55);
}

.brand-mark svg { width: 18px; height: 18px; }
.brand-name { font-size: 15.5px; font-weight: 640; letter-spacing: -0.015em; }

.brand-tag {
  margin-left: 2px;
  padding: 3px 6px;
  border: 1px solid #2c333d;
  border-radius: 5px;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #7d8794;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #87909d;
  font-size: 11.5px;
  white-space: nowrap;
}

.status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(140, 233, 154, 0.09), 0 0 10px rgba(140, 233, 154, 0.35);
}

.status-pill.warn i {
  background: var(--amber);
  box-shadow: 0 0 0 3px rgba(255, 189, 102, 0.1);
}

/* ------------------------------------------------------------------ hero */

.hero {
  max-width: 920px;
  margin: 0 auto;
  padding: 82px 28px 54px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: #7f8997;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(216, 255, 106, 0.08);
}

.hero h1 {
  margin: 18px 0 20px;
  font-size: clamp(44px, 7.2vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.048em;
  font-weight: 620;
  color: #f5f7fa;
}

.hero h1 em {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--accent);
  padding-right: 0.04em;
  text-shadow: 0 0 46px rgba(216, 255, 106, 0.16);
}

.sub {
  max-width: 610px;
  margin: 0 auto;
  color: #a2abb8;
  font-size: 16px;
  line-height: 1.66;
  letter-spacing: -0.005em;
}

/* --------------------------------------------------------- setup banner */

.setup-banner {
  display: flex;
  gap: 12px;
  max-width: 780px;
  margin: 26px auto 0;
  padding: 14px 16px;
  text-align: left;
  border: 1px solid rgba(255, 189, 102, 0.26);
  border-radius: 14px;
  background: rgba(255, 189, 102, 0.055);
}

.setup-icon {
  flex: none;
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 189, 102, 0.15);
  color: var(--amber);
  font-size: 13px;
  font-weight: 750;
}

.setup-copy { min-width: 0; }

.setup-copy strong {
  display: block;
  margin-bottom: 3px;
  font-size: 12.5px;
  color: #f0d6ae;
}

.setup-copy p {
  margin: 0;
  color: #b29c80;
  font-size: 12px;
  line-height: 1.55;
}

.setup-copy code {
  display: block;
  margin-top: 8px;
  padding: 8px 10px;
  overflow-x: auto;
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.32);
  color: #ffd9a1;
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
}

/* -------------------------------------------------------------- composer */

.composer {
  max-width: 800px;
  margin: 28px auto 0;
  padding: 5px;
  text-align: left;
  border: 1px solid #2a3038;
  border-radius: 18px;
  background: linear-gradient(180deg, #16191f 0%, #111318 100%);
  box-shadow: 0 26px 70px -34px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.composer:focus-within {
  border-color: rgba(216, 255, 106, 0.42);
  box-shadow: 0 0 0 3px rgba(216, 255, 106, 0.07), 0 26px 70px -34px rgba(0, 0, 0, 0.95);
}

.composer-input { padding: 2px; }

.composer textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  max-height: 200px;
  padding: 15px 17px 11px;
  border: 0;
  border-radius: 13px;
  outline: 0;
  resize: none;
  overflow-y: auto;
  background: transparent;
  color: #e9edf2;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
}

.composer textarea::placeholder { color: #5e6774; }

.composer-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 11px 11px;
  border-top: 1px solid #22272f;
}

.settings { display: flex; gap: 9px; }

.field { display: flex; flex-direction: column; gap: 4px; }

.field > span {
  padding-left: 2px;
  color: #5f6976;
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 154px;
  height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid #2a303a;
  border-radius: 8px;
  outline: none;
  background-color: #171b21;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%237b8592' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  color: #dce2e9;
  font-family: var(--font-sans);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

#modelSelect { min-width: 196px; }

select:hover { border-color: #39414d; background-color: #1a1f26; }
select:focus-visible { border-color: rgba(216, 255, 106, 0.5); outline: none; }

.composer-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-family: var(--font-sans);
  font-size: 12.5px;
  font-weight: 620;
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, filter 0.15s ease, transform 0.1s ease;
}

.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; flex: none; }

.btn-ghost {
  border-color: #2b313b;
  background: transparent;
  color: #b7c0cb;
}

.btn-ghost:hover { border-color: #3a4350; background: #1a1f26; color: #eef2f6; }

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 8px 24px -10px rgba(216, 255, 106, 0.6);
}

.btn-primary:hover { filter: brightness(1.055); }
.btn-primary:disabled, .btn-ghost:disabled { opacity: 0.45; cursor: not-allowed; filter: none; }

.hint {
  margin: 14px 0 0;
  color: #5f6875;
  font-size: 11.5px;
  letter-spacing: -0.002em;
}

.hint kbd {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin: 0 1px;
  padding: 0 3px;
  border: 1px solid #2c333d;
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #151a20;
  color: #8d97a5;
  font-family: var(--font-sans);
  font-size: 10px;
}

.hint code {
  color: #7d8794;
  font-family: var(--font-mono);
  font-size: 10.5px;
}

/* ----------------------------------------------------------------- queue */

.queue-section {
  max-width: 980px;
  margin: 0 auto;
  padding: 22px 28px 76px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.section-title { display: flex; align-items: center; gap: 9px; }

.section-title h2 {
  margin: 0;
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  color: #cbd2db;
}

.count {
  display: inline-grid;
  place-items: center;
  min-width: 23px;
  height: 21px;
  padding: 0 7px;
  border: 1px solid #262d36;
  border-radius: 999px;
  background: #15191f;
  color: #808a97;
  font-size: 10.5px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.link-btn {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: #6f7986;
  font-family: var(--font-sans);
  font-size: 11.5px;
  cursor: pointer;
  transition: color 0.15s ease;
}

.link-btn:hover { color: #cfd6df; }

.job-list { display: grid; gap: 9px; }

/* empty state */

.empty {
  padding: 54px 24px;
  border: 1px dashed #2a3039;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.012);
  color: #79828f;
  text-align: center;
  font-size: 13px;
  line-height: 1.65;
}

.empty strong { color: #c9d1db; font-size: 14px; font-weight: 600; }
.empty p { margin: 0; }

.empty-wave {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 36px;
  margin-bottom: 17px;
}

.empty-wave i {
  width: 3px;
  height: 12px;
  border-radius: 3px;
  background: #39424e;
  animation: wave 1.7s ease-in-out infinite;
}

.empty-wave i:nth-child(1) { animation-delay: 0s; }
.empty-wave i:nth-child(2) { animation-delay: 0.08s; }
.empty-wave i:nth-child(3) { animation-delay: 0.16s; }
.empty-wave i:nth-child(4) { animation-delay: 0.24s; }
.empty-wave i:nth-child(5) { animation-delay: 0.32s; background: rgba(216, 255, 106, 0.55); }
.empty-wave i:nth-child(6) { animation-delay: 0.24s; }
.empty-wave i:nth-child(7) { animation-delay: 0.16s; }
.empty-wave i:nth-child(8) { animation-delay: 0.08s; }
.empty-wave i:nth-child(9) { animation-delay: 0s; }

@keyframes wave {
  0%, 100% { transform: scaleY(0.55); opacity: 0.55; }
  50% { transform: scaleY(1.75); opacity: 1; }
}

/* job cards */

.job {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 11px 12px;
  border: 1px solid #232932;
  border-radius: 14px;
  background: #12151a;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.job:hover { border-color: #2f3742; background: #14181d; }
.job.is-clickable { cursor: pointer; }
.job.is-clickable:hover { border-color: #3a4350; }

.thumb {
  position: relative;
  width: 116px;
  height: 65px;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #222933, #14181e);
  flex: none;
}

.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

.thumb.no-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 50%, rgba(216, 255, 106, 0.14), transparent 46%),
    repeating-linear-gradient(90deg, transparent 0 9px, rgba(255, 255, 255, 0.035) 9px 10px);
}

.thumb.no-thumb::before {
  content: "";
  position: absolute;
  z-index: 1;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  transform: translate(-40%, -50%);
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-left: 11px solid rgba(216, 255, 106, 0.7);
}

.job-main { min-width: 0; }

.job-top { display: flex; align-items: center; gap: 10px; }
.job-title {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #edf0f4;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.34;
  letter-spacing: -0.008em;
  overflow-wrap: anywhere;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: none;
  height: 20px;
  margin-left: auto;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 8.5px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  white-space: nowrap;
}

.pill i { width: 4.5px; height: 4.5px; border-radius: 50%; background: currentColor; }

.pill-queued { background: #191e25; border-color: #262d36; color: #8f99a6; }
.pill-running { background: rgba(216, 255, 106, 0.08); border-color: rgba(216, 255, 106, 0.22); color: var(--accent); }
.pill-running i { animation: pulse 1.4s ease-in-out infinite; }
.pill-completed { background: rgba(140, 233, 154, 0.07); border-color: rgba(140, 233, 154, 0.18); color: var(--green); }
.pill-failed { background: rgba(255, 140, 140, 0.07); border-color: rgba(255, 140, 140, 0.2); color: var(--red); }
.pill-cancelled { background: #191e25; border-color: #262d36; color: #7d8794; }

@keyframes pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(216, 255, 106, 0.25); }
  50% { opacity: 0.55; box-shadow: 0 0 0 3px rgba(216, 255, 106, 0); }
}

.meta {
  margin: 4px 0 0;
  overflow: hidden;
  color: #798391;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.meta .dot { margin: 0 5px; color: #414a56; }

.result-meta {
  margin: 5px 0 0;
  color: #707b88;
  font-size: 11px;
}

.result-meta b { color: #aeb8c4; font-weight: 600; }

.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.track {
  flex: 1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #222831;
}

.fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #a6d43d, var(--accent));
  box-shadow: 0 0 12px rgba(216, 255, 106, 0.28);
  transition: width 0.45s ease;
}

.percent {
  min-width: 31px;
  color: #8b95a2;
  font-family: var(--font-mono);
  font-size: 9.5px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.stage {
  margin: 6px 0 0;
  overflow: hidden;
  color: #8b95a2;
  font-size: 10.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.error {
  margin: 7px 0 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #ff9b9b;
  font-size: 11px;
  line-height: 1.45;
}

.job-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding-left: 4px;
}

.btn-view {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid #2e3641;
  border-radius: 8px;
  background: #1a1f26;
  color: #dfe5ec;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.btn-view:hover { border-color: rgba(216, 255, 106, 0.4); color: var(--accent); background: #1d232a; }

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex: none;
  padding: 0;
  border: 1px solid #2a303a;
  border-radius: 8px;
  background: transparent;
  color: #939daa;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn-icon svg { width: 15px; height: 15px; }
.btn-icon:hover { border-color: #3a4350; background: #1a1f26; color: #e8edf3; }
.btn-icon.danger:hover { border-color: rgba(255, 140, 140, 0.35); color: var(--red); }
.btn-icon:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------------------------------------------------------------- footer */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 980px;
  margin: 0 auto;
  padding: 20px 28px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #5d6672;
  font-size: 11px;
}

.footer a { color: #8792a0; text-decoration: none; }
.footer a:hover { color: var(--accent); }

/* ---------------------------------------------------------------- drawer */

.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 4, 6, 0.66);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.24s ease;
}

.drawer-overlay.open { opacity: 1; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 61;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  border-left: 1px solid #242a32;
  background: #0c0e11;
  box-shadow: -40px 0 100px rgba(0, 0, 0, 0.55);
  transform: translateX(102%);
  transition: transform 0.32s cubic-bezier(0.22, 0.8, 0.24, 1);
}

.drawer.open { transform: none; }

.drawer-head {
  padding: 20px 26px 17px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(13, 15, 18, 0.92);
}

.drawer-video { display: flex; align-items: flex-start; gap: 14px; }

.drawer-thumb {
  position: relative;
  width: 112px;
  height: 63px;
  flex: none;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(135deg, #222933, #14181e);
}

.drawer-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.drawer-thumb.no-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(216, 255, 106, 0.13), transparent 50%);
}

.drawer-headings { flex: 1; min-width: 0; }

.drawer-headings h2 {
  margin: 0 0 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: #f0f3f7;
  font-size: 18px;
  font-weight: 620;
  line-height: 1.3;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.drawer-meta { margin: 0 0 7px; color: #7f8996; font-size: 11px; }

.watch-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: rgba(216, 255, 106, 0.82);
  font-size: 11px;
  text-decoration: none;
}

.watch-link svg { width: 11px; height: 11px; }
.watch-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.drawer-close { margin-left: 10px; }

.drawer-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 53px;
  padding: 0 26px;
  border-bottom: 1px solid var(--line-soft);
  flex-wrap: wrap;
}

.tabs { display: flex; align-self: stretch; gap: 1px; }

.tab {
  position: relative;
  padding: 0 12px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: #828c99;
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 550;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.tab:hover { color: #d5dbe3; }
.tab.is-active { border-bottom-color: var(--accent); color: var(--accent); }

.drawer-tools-right { display: flex; align-items: center; gap: 8px; }

.search {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 31px;
  padding: 0 9px;
  border: 1px solid #272e37;
  border-radius: 8px;
  background: #13171d;
  transition: border-color 0.15s ease;
}

.search:focus-within { border-color: rgba(216, 255, 106, 0.35); }
.search svg { width: 13px; height: 13px; flex: none; color: #68727f; }

.search input {
  width: 150px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #d8dee6;
  font-family: var(--font-sans);
  font-size: 11.5px;
}

.search input::placeholder { color: #626c79; }
.search input::-webkit-search-cancel-button { filter: invert(0.55); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 30px 34px 64px;
  overscroll-behavior: contain;
}

.transcript { max-width: 700px; margin: 0 auto; }

.para {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 10px;
  margin: 0 0 17px;
}

.ts {
  padding-top: 6px;
  color: rgba(216, 255, 106, 0.62);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.ts:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }

.para p {
  margin: 0;
  color: var(--body);
  font-size: 16.5px;
  line-height: 1.72;
  letter-spacing: -0.006em;
}

mark {
  padding: 0 1px;
  border-radius: 2px;
  background: rgba(216, 255, 106, 0.22);
  color: #f4ffd6;
}

.code-block {
  margin: 0;
  padding: 18px 20px;
  overflow: auto;
  border: 1px solid #222831;
  border-radius: 12px;
  background: #090b0e;
  color: #c8d0da;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.body-empty {
  padding: 70px 24px;
  color: #7c8694;
  text-align: center;
  font-size: 13px;
  line-height: 1.6;
}

.body-empty strong { color: #c4ccd6; }

/* skeleton */

.skeleton { max-width: 700px; margin: 0 auto; }

.skeleton-line {
  height: 12px;
  margin-bottom: 11px;
  border-radius: 6px;
  background: linear-gradient(90deg, #171b21 25%, #20262e 50%, #171b21 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

.skeleton-line:nth-child(3n) { width: 86%; }
.skeleton-line:nth-child(4n) { width: 62%; margin-bottom: 28px; }

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* toasts */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  max-width: min(440px, calc(100vw - 32px));
  padding: 10px 15px;
  border: 1px solid #2d3540;
  border-radius: 10px;
  background: #171b21;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.55);
  color: #e4e9ef;
  font-size: 12px;
  line-height: 1.4;
  animation: toast-in 0.24s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.toast::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
}

.toast.error::before { background: var(--red); }
.toast.success::before { background: var(--green); }
.toast.out { opacity: 0; transform: translateY(5px); transition: opacity 0.2s ease, transform 0.2s ease; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

/* scrollbars */

.drawer-body::-webkit-scrollbar, .code-block::-webkit-scrollbar { width: 10px; height: 10px; }
.drawer-body::-webkit-scrollbar-thumb, .code-block::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 10px;
  background: #2e3641;
  background-clip: content-box;
}
.drawer-body::-webkit-scrollbar-track, .code-block::-webkit-scrollbar-track { background: transparent; }

/* -------------------------------------------------------------- responsive */

@media (max-width: 780px) {
  .topbar-inner { height: 58px; padding: 0 18px; }
  .hero { padding: 56px 18px 38px; }
  .hero h1 { font-size: clamp(40px, 11.5vw, 62px); }
  .sub { font-size: 14.5px; line-height: 1.6; }

  .composer-foot { align-items: stretch; flex-direction: column; gap: 11px; }
  .settings { width: 100%; }
  .field { flex: 1; min-width: 0; }
  select, #modelSelect { width: 100%; min-width: 0; }
  .composer-actions { justify-content: flex-end; }
  .hint { line-height: 1.9; }

  .queue-section { padding: 18px 18px 60px; }

  .job {
    grid-template-columns: 78px minmax(0, 1fr);
    gap: 12px;
    padding: 10px;
  }

  .thumb { width: 78px; height: 46px; }
  .job-title { font-size: 13px; }
  .job-top { align-items: flex-start; flex-wrap: wrap; gap: 4px 8px; }
  .pill { margin-left: 0; order: 3; }
  .job-actions {
    grid-column: 2;
    justify-content: flex-end;
    padding: 2px 0 0;
  }

  .drawer-head { padding: 16px 18px 14px; }
  .drawer-video { gap: 11px; }
  .drawer-thumb { width: 82px; height: 47px; }
  .drawer-headings h2 { font-size: 16px; }
  .drawer-tools { padding: 0 14px; min-height: 50px; }
  .tab { padding: 0 9px; font-size: 11.5px; }
  .search { display: none; }
  .drawer-body { padding: 22px 20px 52px; }
  .para { grid-template-columns: 38px minmax(0, 1fr); gap: 8px; margin-bottom: 15px; }
  .para p { font-size: 15.5px; line-height: 1.68; }
  .ts { font-size: 9.5px; padding-top: 5px; }

  .footer { flex-direction: column; align-items: flex-start; gap: 5px; padding: 18px 18px 26px; }
}

@media (max-width: 460px) {
  .brand-tag { display: none; }
  .status-pill span { display: none; }
  .composer-actions { width: 100%; }
  .composer-actions .btn { flex: 1; }
  .job-actions .btn-view { padding: 0 10px; }
  .drawer-headings h2 { font-size: 15px; }
  .drawer-meta { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* =================================================================== SaaS */

.brand-tag.tier-plus { border-color: rgba(134, 200, 255, 0.35); color: var(--blue); }
.brand-tag.tier-pro { border-color: rgba(216, 255, 106, 0.4); color: var(--accent); }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.usage { color: var(--muted); font-size: 12px; white-space: nowrap; }
.usage.warn { color: var(--amber); }

.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 9px; }
.btn-sm svg { width: 13px; height: 13px; }
#accountEmail { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.account { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 60;
  min-width: 190px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel-2);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
}
.menu button {
  display: block;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--body);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}
.menu button:hover, .menu button:focus-visible { background: #1f252d; color: var(--text); }

/* ---- signed-out view */

.auth-view { padding-bottom: 40px; }
.auth-card {
  width: min(400px, calc(100% - 32px));
  margin: 8px auto 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.7);
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 10px; background: #0e1014; }
.auth-tab, .interval {
  padding: 8px 10px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 560;
  cursor: pointer;
}
.auth-tab.is-active, .interval.is-active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.auth-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.auth-field span { color: var(--muted); font-size: 12px; font-weight: 560; }
.auth-field input {
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e1014;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.auth-field input:focus { border-color: rgba(216, 255, 106, 0.45); outline: none; }
.auth-submit { width: 100%; justify-content: center; margin-top: 4px; }
.auth-error { margin: 0 0 10px; color: var(--red); font-size: 12.5px; }
.auth-note { margin: 10px 0 0; color: var(--faint); font-size: 12px; text-align: center; }

/* ---- plans */

.plans-section { max-width: 980px; margin: 56px auto 0; padding: 0 16px; }
.interval-toggle { display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 0 auto 18px; padding: 4px; border-radius: 10px; background: #0e1014; }
.interval small { margin-left: 4px; color: var(--accent); font-size: 10.5px; font-weight: 600; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.plan.is-featured { border-color: rgba(216, 255, 106, 0.32); box-shadow: 0 0 0 1px rgba(216, 255, 106, 0.08), 0 20px 50px -30px rgba(216, 255, 106, 0.35); }
.plan.is-current { border-color: rgba(140, 233, 154, 0.35); }
.plan header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan h3 { margin: 0; font-size: 15px; font-weight: 640; }
.plan-badge { padding: 3px 7px; border-radius: 999px; background: rgba(216, 255, 106, 0.12); color: var(--accent); font-size: 10.5px; font-weight: 650; }
.plan-price { margin: 12px 0 14px; color: var(--muted); font-size: 13px; }
.plan-price b { color: var(--text); font-family: var(--font-display); font-size: 34px; font-weight: 500; letter-spacing: -0.02em; margin-right: 3px; }
.plan ul { flex: 1; margin: 0 0 18px; padding: 0; list-style: none; }
.plan li { display: flex; gap: 8px; margin-bottom: 8px; color: var(--body); font-size: 13px; line-height: 1.4; }
.plan li svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--green); }
.plan-btn { width: 100%; justify-content: center; }

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(4px);
}
.modal {
  width: min(960px, 100%);
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #0f1216;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { margin: 0 0 4px; font-size: 19px; font-weight: 640; }
.modal-head p { margin: 0; color: var(--muted); font-size: 13px; }

.toast span { flex: 1; }
.toast-action {
  flex: none;
  padding: 5px 9px;
  border: 1px solid rgba(216, 255, 106, 0.35);
  border-radius: 7px;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
}

select option:disabled { color: #5f6875; }

@media (max-width: 780px) {
  .plans { grid-template-columns: 1fr; }
  .usage { display: none; }
  #accountEmail { max-width: 110px; }
}
@media (max-width: 460px) {
  .topbar-right { gap: 6px; }
  #accountEmail { display: none; }
}

/* ---- uploads */

.composer { position: relative; }
.composer.is-dragging { border-color: rgba(216, 255, 106, 0.55); box-shadow: 0 0 0 4px rgba(216, 255, 106, 0.08); }
.drop-hint {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  border-radius: inherit;
  background: rgba(10, 11, 13, 0.82);
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
  pointer-events: none;
}
.upload-status {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  padding: 10px 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--body);
  font-size: 12.5px;
}
.upload-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-status .track { grid-column: 1 / -1; grid-row: 2; height: 4px; border-radius: 4px; background: #1d2229; overflow: hidden; }
.upload-status .fill { height: 100%; width: 0; background: var(--accent); transition: width 0.2s ease; }
span.ts:hover { color: inherit; text-decoration: none; }

/* ---- account settings */

.modal-narrow { width: min(460px, 100%); }
.settings-form { display: flex; flex-direction: column; padding: 16px 0 4px; border-top: 1px solid var(--line-soft); }
.settings-form h3 { margin: 0 0 12px; font-size: 14px; font-weight: 640; }
.settings-form .btn { align-self: flex-start; }
.auth-note.left { text-align: left; margin: 0 0 12px; }
.settings-form .auth-note.left:last-child { margin: 10px 0 0; }
.danger-zone { margin-top: 12px; }
.btn-danger {
  border: 1px solid rgba(255, 140, 140, 0.35);
  background: rgba(255, 140, 140, 0.08);
  color: var(--red);
}
.btn-danger:hover { background: rgba(255, 140, 140, 0.14); }

/* =================================================== OpenRouter plans & features */

.lock {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(134, 200, 255, 0.12);
  color: var(--blue);
  font-size: 10px;
  font-style: normal;
  font-weight: 650;
  letter-spacing: 0.02em;
  vertical-align: 1px;
}

.model-chip {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0e1014;
  color: var(--body);
  font-family: var(--font-mono);
  font-size: 11.5px;
  white-space: nowrap;
}

.field.options { gap: 5px; }
.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--body);
  font-size: 12.5px;
  cursor: pointer;
  user-select: none;
}
.toggle input { width: 15px; height: 15px; margin: 0; accent-color: var(--accent); }
.toggle.is-locked { color: var(--faint); cursor: help; }

/* drawer */
.download-wrap { position: relative; }
.download-wrap .menu { min-width: 220px; }
.menu a {
  display: block;
  padding: 9px 11px;
  border-radius: 7px;
  color: var(--body);
  font-size: 13px;
  text-decoration: none;
}
.menu a:hover, .menu a:focus-visible { background: #1f252d; color: var(--text); }
.menu .is-locked { color: var(--faint); }
.tab .lock { margin-left: 5px; }

.speakers-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 22px;
  border-bottom: 1px solid var(--line-soft);
  background: #101318;
}
.speakers-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 0 12px; }
.speakers-fields .auth-field { margin-bottom: 4px; }
.speakers-fields input { height: 36px; }
.speakers-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.speakers-actions .toggle { margin-right: auto; }

.speaker { color: var(--accent); font-weight: 650; }
.transcript.is-raw .para { grid-template-columns: 1fr; }
.plan-note {
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(134, 200, 255, 0.2);
  border-radius: 10px;
  background: rgba(134, 200, 255, 0.05);
  color: var(--body);
  font-size: 12.5px;
}

.insights { color: var(--body); font-size: 14px; line-height: 1.6; }
.insights h3 { margin: 20px 0 6px; color: var(--text); font-size: 13px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.insights h3:first-child { margin-top: 0; }
.insights p { margin: 0; }
.insights ul { margin: 0; padding-left: 18px; }
.insights li { margin-bottom: 4px; }
.insights-note { margin-top: 22px !important; color: var(--faint); font-size: 12px; }

/* settings */
.settings-form textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e1014;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  resize: vertical;
}
.settings-form.is-locked { opacity: 0.6; }
.settings-form h3 .lock { font-size: 10px; }
.api-actions { display: flex; gap: 8px; margin-bottom: 10px; }
.code-block.api-token, .code-block.api-example {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 11.5px;
  white-space: pre-wrap;
  word-break: break-all;
}
.code-block.api-token { color: var(--accent); user-select: all; }
.modal-narrow { width: min(560px, 100%); max-height: calc(100vh - 32px); overflow-y: auto; }

@media (max-width: 780px) {
  .composer-foot .settings { flex-wrap: wrap; }
}

/* fixes */
code.model-chip { height: 36px; letter-spacing: 0; text-transform: none; }
.toggles { display: flex; flex-direction: column; gap: 4px; justify-content: center; min-height: 36px; }
.toggle { white-space: nowrap; }
.composer-foot { flex-wrap: wrap; row-gap: 12px; }
.composer-foot .settings { flex-wrap: wrap; }
.composer-actions { margin-left: auto; }

/* ---- plan cards: same panels, type and accent as the rest of the site */
.plans { align-items: stretch; gap: 16px; }
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 24px 22px 22px;
  border: 1px solid #2a3038;
  border-radius: 18px;
  background: linear-gradient(180deg, #16191f 0%, #111318 100%);
  box-shadow: 0 26px 70px -34px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.plan.plan-plus {
  border-color: rgba(216, 255, 106, 0.42);
  box-shadow: 0 0 0 3px rgba(216, 255, 106, 0.06), 0 26px 70px -34px rgba(0, 0, 0, 0.95);
}
.plan.is-current { border-color: rgba(140, 233, 154, 0.4); box-shadow: 0 0 0 3px rgba(140, 233, 154, 0.06); }
.plan .plan-head { display: block; margin: 0 0 4px; padding: 0; }
.plan .plan-head::before { content: none; }
.plan-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plan-head h3 { margin: 0; color: var(--text); font-size: 15px; font-weight: 640; letter-spacing: -0.01em; }
.plan-badge {
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(216, 255, 106, 0.12);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 650;
}
.plan .plan-price { margin: 14px 0 4px; color: var(--muted); font-size: 13px; }
.plan .plan-price b {
  margin-right: 4px;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 500;
  letter-spacing: -0.02em;
}
.plan-plus .plan-price b { color: var(--accent); }
.plan-tagline { margin: 0; color: var(--faint); font-size: 12px; }
.plan h4 {
  margin: 20px 0 9px;
  padding-left: 2px;
  color: #5f6976;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.plan-model {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0e1014;
  color: var(--body);
  font-family: var(--font-mono);
  font-size: 11.5px;
}
.plan ul { flex: none; margin: 0; padding: 0; list-style: none; }
.plan li { display: flex; gap: 9px; margin-bottom: 8px; color: var(--body); font-size: 13px; line-height: 1.45; }
.plan li svg { width: 14px; height: 14px; flex: none; margin-top: 2px; color: var(--green); }
.plan-plus li svg, .plan-pro li svg { color: var(--accent); }
.plan > ul:last-of-type { margin-bottom: 22px; }
.plan .plan-btn { width: 100%; margin-top: auto; justify-content: center; }
.plan .plan-price s { margin-right: 8px; color: var(--faint); font-size: 18px; text-decoration-thickness: 1.5px; }
.plan-pro .plan-price b { color: var(--accent); }

/* =====================================================================
   Simple, plain-language layout (signed-out steps, start card, options)
   ===================================================================== */

.topbar-inner > #signInTop { margin-left: auto; }

/* ---- signed out */
.steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  max-width: 760px;
  margin: -22px auto 28px;
  padding: 0 16px;
  list-style: none;
}
.steps li { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.steps li strong { color: var(--text); font-weight: 620; }
.steps b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(216, 255, 106, 0.12);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}
.auth-title { margin: 0 0 16px; font-size: 19px; font-weight: 640; letter-spacing: -0.015em; text-align: center; }
.auth-plan {
  margin: -6px 0 16px;
  padding: 10px 12px;
  border: 1px solid rgba(216, 255, 106, 0.25);
  border-radius: 10px;
  background: rgba(216, 255, 106, 0.05);
  color: var(--body);
  font-size: 13px;
  line-height: 1.5;
}
.auth-plan b { color: var(--accent); }
.auth-plan .link-btn { margin-left: 2px; }
.auth-field small { color: var(--faint); font-size: 12px; }
.auth-back { display: block; margin: -4px 0 12px; color: var(--muted); font-size: 13px; }
.auth-back:hover { color: var(--text); }
.section-sub .link-btn { color: var(--accent); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.auth-switch { margin: 14px 0 0; color: var(--muted); font-size: 13.5px; text-align: center; }
.auth-switch .link-btn, .auth-plan .link-btn { color: var(--accent); font-size: inherit; text-decoration: underline; text-underline-offset: 3px; }
.btn-lg { height: 46px; padding: 0 20px; font-size: 15px; border-radius: 11px; }
.section-heading { margin: 0 0 6px; font-size: 24px; font-weight: 640; letter-spacing: -0.02em; text-align: center; }
.section-sub { margin: 0 0 22px; color: var(--muted); font-size: 14.5px; text-align: center; }

/* ---- signed in: start card */
.hero.hero-small { padding: 48px 20px 20px; }
.hero.hero-small h1 { margin: 0; font-size: clamp(30px, 5vw, 46px); line-height: 1.08; }
.start-card {
  position: relative;
  max-width: 760px;
  margin: 0 auto;
  padding: 8px;
  border: 1px solid #2a3038;
  border-radius: 20px;
  background: linear-gradient(180deg, #16191f 0%, #111318 100%);
  box-shadow: 0 26px 70px -34px rgba(0, 0, 0, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.start-card.is-dragging { border-color: rgba(216, 255, 106, 0.55); box-shadow: 0 0 0 4px rgba(216, 255, 106, 0.08); }
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 36px 20px 30px;
  border: 1.5px dashed #313844;
  border-radius: 14px;
  text-align: center;
}
.start-card.is-dragging .dropzone { border-color: var(--accent); }
.dz-icon { width: 34px; height: 34px; color: var(--accent); }
.dz-title { margin: 4px 0 0; color: var(--text); font-size: 18px; font-weight: 620; }
.dz-or { margin: 0; color: var(--faint); font-size: 13px; }
.dz-help { margin: 6px 0 0; color: var(--faint); font-size: 12.5px; line-height: 1.5; }
.start-card .upload-status { margin-top: 8px; border-top: 0; border-radius: 12px; background: #0e1014; }

.link-row { padding: 18px 12px 6px; }
.link-row label { display: block; margin-bottom: 8px; color: var(--muted); font-size: 13.5px; font-weight: 560; }
.link-input { display: flex; gap: 8px; }
.link-input input {
  flex: 1;
  min-width: 0;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e1014;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.link-input input:focus { border-color: rgba(216, 255, 106, 0.45); outline: none; }
.link-input input::placeholder { color: #5e6774; }
.link-input .btn { height: 42px; }

.more-options { margin: 8px 12px 6px; border-top: 1px solid var(--line-soft); }
.more-options summary {
  padding: 12px 0 6px;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 560;
  cursor: pointer;
  list-style-position: inside;
}
.more-options summary:hover { color: var(--text); }
.options-grid { display: flex; flex-direction: column; gap: 14px; padding: 10px 0 8px; }
.option-field { display: flex; flex-direction: column; gap: 6px; max-width: 280px; }
.option-field span { color: var(--muted); font-size: 12.5px; font-weight: 560; }
.option-field select {
  height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e1014;
  color: var(--text);
  font: inherit;
  font-size: 14px;
}
.options-grid .toggle { align-items: flex-start; gap: 10px; white-space: normal; font-size: 14px; }
.options-grid .toggle input { margin-top: 3px; }
.options-grid .toggle span { display: flex; flex-direction: column; gap: 2px; }
.options-grid .toggle strong { color: var(--text); font-weight: 580; }
.options-grid .toggle small { color: var(--faint); font-size: 12.5px; }
.model-line { margin: 0; color: var(--faint); font-size: 12px; }
.model-line code { font-family: var(--font-mono); font-size: 11.5px; color: var(--muted); }

/* ---- jobs */
.job .stage { margin: 6px 0 6px; color: var(--body); font-size: 13.5px; }
.job-actions .btn-sm { height: 32px; }

/* ---- account + transcript */
.settings-form.advanced summary { cursor: pointer; list-style-position: inside; }
.settings-form.advanced summary h3 { display: inline; }
.settings-form.advanced[open] summary { margin-bottom: 12px; }
.speakers-help { margin: 0 0 10px; color: var(--muted); font-size: 13px; }
.toggle.small { font-size: 12.5px; }

@media (max-width: 560px) {
  .steps { flex-direction: column; align-items: flex-start; width: max-content; max-width: 100%; margin-top: -16px; }
  .start-card { margin: 0 16px; }
  .dropzone { padding: 28px 14px 24px; }
  .link-input { flex-direction: column; }
  .link-input input { flex: none; }
  .link-input .btn { width: 100%; }
  .drawer-tools-right { flex-wrap: wrap; }
}

/* ---- rotating word in the signed-out headline */
.rotator {
  display: inline-block;
  white-space: nowrap;
  text-align: left;
  vertical-align: bottom;
  transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rotator .word { display: inline-block; }
.rotator .word i { display: inline-block; font-style: normal; }
.rotator .word.in i {
  animation: heroLetterIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  animation-delay: calc(var(--i) * 40ms);
}
.rotator .word.out i {
  animation: heroLetterOut 0.26s ease-in both;
  animation-delay: calc(var(--i) * 18ms);
}
@keyframes heroLetterIn {
  0% { opacity: 0; transform: translateY(0.5em) rotate(10deg) scale(0.7); color: var(--accent); }
  60% { opacity: 1; color: var(--accent); }
  100% { opacity: 1; transform: none; }
}
@keyframes heroLetterOut {
  to { opacity: 0; transform: translateY(-0.45em) rotate(-8deg) scale(0.9); }
}
@media (max-width: 560px) {
  /* Phones: the word gets its own line, so long ones ("YouTube video") never make the headline jump */
  .rotator { display: block; width: auto !important; text-align: center; }
  .rotator + br { display: none; }
}

/* ---- plan changes for paying customers: a short note above the button */
.plan .plan-note { margin: auto 0 0; padding: 4px 2px 0; border: 0; background: none; color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.plan .plan-note + .plan-btn { margin-top: 8px; }

/* ---- legal pages (terms, privacy, refunds) and the consent line on sign-up */
.auth-legal { margin: 8px 0 0; color: var(--faint); font-size: 11.5px; line-height: 1.5; text-align: center; }
.auth-legal a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.legal-page { min-height: 100vh; }
.legal-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 760px; margin: 0 auto; padding: 22px 20px;
}
.legal-top .brand { color: var(--text); text-decoration: none; font-weight: 640; }
.legal-top nav { display: flex; gap: 16px; }
.legal-top nav a { color: var(--muted); font-size: 13.5px; text-decoration: none; }
.legal-top nav a:hover, .legal-top nav a[aria-current="page"] { color: var(--accent); }
.legal { max-width: 760px; margin: 0 auto; padding: 16px 20px 56px; color: var(--body); font-size: 15px; line-height: 1.7; }
.legal h1 { margin: 12px 0 4px; color: var(--text); font-size: clamp(30px, 5vw, 40px); letter-spacing: -0.03em; line-height: 1.1; }
.legal-meta { margin: 0 0 28px; color: var(--faint); font-size: 13px; }
.legal h2 { margin: 34px 0 10px; color: var(--text); font-size: 18px; letter-spacing: -0.01em; }
.legal p { margin: 0 0 14px; }
.legal ul { margin: 0 0 14px; padding-left: 20px; }
.legal li { margin-bottom: 7px; }
.legal a { color: var(--accent); text-underline-offset: 3px; }
.legal strong { color: var(--text); font-weight: 620; }
.legal-summary { margin: 0 0 8px; padding: 16px 20px 6px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); }
.legal-summary p { margin-bottom: 8px; }
.legal-page .footer { max-width: 760px; flex-wrap: wrap; }
@media (max-width: 560px) {
  .legal-top { flex-direction: column; align-items: flex-start; }
  .legal { font-size: 14.5px; }
}

/* ---- Settings page (full page, with Settings / Account tabs) */
.settings-page { max-width: 960px; margin: 0 auto; padding: 36px 20px 60px; }
.settings-head { margin-bottom: 26px; }
.back-link { display: inline-block; margin-bottom: 14px; color: var(--muted); font-size: 13.5px; text-decoration: none; }
.back-link:hover { color: var(--text); }
.settings-head h1 { margin: 0; font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.03em; }
.settings-layout { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-tabs { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 4px; }
.settings-tab {
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 560;
  text-decoration: none;
}
.settings-tab:hover { background: var(--panel); color: var(--text); }
.settings-tab.is-active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.settings-panel { display: flex; flex-direction: column; gap: 16px; }
.settings-panel[hidden] { display: none; }
.settings-panel .settings-form {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}
.settings-panel .settings-form h3 { font-size: 15px; }
.settings-panel .settings-form textarea { min-height: 96px; }
.settings-panel .danger-zone { border-color: rgba(255, 140, 140, 0.25); }
.account-facts { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 10px 16px; margin: 0 0 18px; font-size: 14px; }
.account-facts dt { color: var(--faint); }
.account-facts dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.settings-panel .account-actions .btn { align-self: auto; }
@media (max-width: 720px) {
  .settings-page { padding-top: 24px; }
  .settings-layout { grid-template-columns: 1fr; gap: 18px; }
  .settings-tabs { position: static; flex-direction: row; gap: 6px; padding: 4px; border-radius: 12px; background: #0e1014; }
  .settings-tab { flex: 1; text-align: center; }
  .settings-panel .settings-form { padding: 18px 16px; }
}

/* ---- Usage tab */
.usage-big { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.usage-big b { margin-right: 6px; color: var(--text); font-family: var(--font-display); font-size: 34px; font-weight: 500; letter-spacing: -0.02em; }
.usage-meter { height: 8px; margin-bottom: 12px; border-radius: 8px; background: #0e1014; overflow: hidden; }
.usage-meter div { height: 100%; width: 0; border-radius: 8px; background: var(--accent-dim); transition: width 0.4s ease; }
.usage-meter div.warn { background: var(--amber); }
.settings-panel .usage-now .auth-note.left { margin: 0; }

.usage-chart { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; height: 190px; margin: 6px 0 18px; }
.usage-scale { display: flex; flex-direction: column; justify-content: space-between; padding-bottom: 22px; color: var(--faint); font-size: 11px; text-align: right; }
.usage-bars {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 2px;
  padding-bottom: 22px;
  border-bottom: 1px solid transparent;
  background: linear-gradient(var(--line-soft), var(--line-soft)) 0 0 / 100% 1px no-repeat,
              linear-gradient(var(--line), var(--line)) 0 calc(100% - 22px) / 100% 1px no-repeat;
}
.usage-col { position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; outline: none; cursor: default; }
.usage-bar { width: min(26px, 70%); border-radius: 4px 4px 0 0; background: var(--accent-dim); opacity: 0.55; transition: opacity 0.15s ease; }
.usage-col.is-current .usage-bar { opacity: 1; }
.usage-col:hover .usage-bar, .usage-col:focus-visible .usage-bar { opacity: 1; }
.usage-month { position: absolute; bottom: -20px; color: var(--faint); font-size: 11px; white-space: nowrap; }
.usage-col.is-current .usage-month { color: var(--text); }
.usage-value { margin-bottom: 4px; color: var(--text); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.usage-col[data-tip]:hover::after, .usage-col[data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  z-index: 3;
  transform: translateX(-50%);
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  pointer-events: none;
}
.usage-col:first-child[data-tip]:hover::after, .usage-col:nth-child(2)[data-tip]:hover::after { left: 0; transform: none; }
.usage-col:last-child[data-tip]:hover::after, .usage-col:nth-last-child(2)[data-tip]:hover::after { left: auto; right: 0; transform: none; }

.usage-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.usage-table th { padding: 8px 0; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.usage-table td { padding: 9px 0; color: var(--body); border-bottom: 1px solid var(--line-soft); }
.usage-table th:not(:first-child), .usage-table td:not(:first-child) { text-align: right; }

.usage-items { display: flex; flex-direction: column; }
.usage-item { display: flex; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.usage-item:last-child { border-bottom: 0; }
.usage-item-main { flex: 1; min-width: 0; }
.usage-item-title { margin: 0; overflow: hidden; color: var(--text); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.usage-item-meta { margin: 3px 0 0; color: var(--faint); font-size: 12.5px; }
.usage-item-minutes { margin: 0; color: var(--text); font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.usage-tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: rgba(216, 255, 106, 0.1); color: var(--accent); font-size: 11px; }
.usage-tag.muted { background: #1d2229; color: var(--muted); }
@media (max-width: 560px) {
  .usage-month { font-size: 9.5px; }
  .usage-chart { height: 160px; }
}

/* ---- Developers tab */
.settings-panel code { padding: 1px 5px; border-radius: 5px; background: #0e1014; color: var(--body); font-family: var(--font-mono); font-size: 0.88em; }
.token-create { display: flex; gap: 8px; margin: 4px 0 10px; }
.token-create input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: #0e1014; color: var(--text); font: inherit; font-size: 14px;
}
.token-create input:focus { border-color: rgba(216, 255, 106, 0.45); outline: none; }
.token-create .btn { align-self: auto; height: 38px; }
.token-new { margin: 6px 0 12px; padding: 12px 14px; border: 1px solid rgba(216, 255, 106, 0.3); border-radius: 12px; background: rgba(216, 255, 106, 0.05); }
.token-new p { margin: 0 0 8px; color: var(--body); font-size: 13.5px; }
.token-copy { display: flex; align-items: center; gap: 8px; }
.token-copy code { flex: 1; min-width: 0; padding: 8px 10px; overflow-x: auto; white-space: nowrap; font-size: 12.5px; }
.settings-panel .token-copy .btn { align-self: auto; }
.token-list { display: flex; flex-direction: column; }
.token-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.token-info { flex: 1; min-width: 0; }
.token-name { margin: 0; color: var(--text); font-size: 14px; }
.token-meta { margin: 3px 0 0; color: var(--faint); font-size: 12.5px; }
.settings-panel .token-row .btn { align-self: auto; }
.token-empty { margin: 4px 0 0 !important; }

.dev-steps { margin: 0 0 16px; padding-left: 20px; color: var(--body); font-size: 14px; line-height: 1.6; }
.dev-steps li { margin-bottom: 4px; }
.dev-steps b { color: var(--text); }
.dev-subhead { margin-top: 22px !important; }
.code-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; padding: 4px; border-radius: 10px; background: #0e1014; }
.code-tabs button {
  padding: 6px 11px; border: 0; border-radius: 7px; background: none; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 560; cursor: pointer;
}
.code-tabs button:hover { color: var(--text); }
.code-tabs button.is-active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.code-wrap { position: relative; }
.settings-panel .code-copy { position: absolute; top: 8px; right: 8px; z-index: 1; align-self: auto; height: 28px; background: var(--panel); }
.code-sample {
  margin: 0; padding: 14px 16px; max-height: 460px; overflow: auto;
  border: 1px solid var(--line); border-radius: 12px; background: #0b0d10;
  color: #cfd6df; font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55; tab-size: 4; white-space: pre;
}
#codeNote { margin: 8px 0 0; }
.endpoint-table-wrap { overflow-x: auto; }
.endpoint-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.endpoint-table th { padding: 8px 10px 8px 0; color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--line); }
.endpoint-table td { padding: 10px 10px 10px 0; color: var(--body); line-height: 1.5; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.endpoint-table td:first-child { white-space: nowrap; }
@media (max-width: 720px) {
  .token-create { flex-direction: column; }
  .endpoint-table td:first-child { white-space: normal; word-break: break-all; }
}
/* Long code lines must scroll inside their box, never widen the page */
.settings-layout > *, .settings-panel, .settings-panel .settings-form, .code-wrap { min-width: 0; }
.code-sample, .endpoint-table-wrap { max-width: 100%; }

/* ---- Developers tab: command line + MCP cards */
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.settings-panel .card-head h3 { margin: 0; }
.seg { display: flex; gap: 4px; padding: 3px; border-radius: 9px; background: #0e1014; }
.seg button { padding: 5px 10px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: 12px; font-weight: 560; cursor: pointer; }
.seg button.is-active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.dev-label { margin: 14px 0 6px; color: var(--text); font-size: 13px; font-weight: 600; }
.code-sample.code-short { padding-right: 80px; }
.dev-steps-text { margin: 4px 0 8px; color: var(--body); font-size: 13.5px; line-height: 1.55; }
.mcp-tools { margin: 0 0 10px; padding-left: 18px; color: var(--body); font-size: 13.5px; line-height: 1.7; }
.settings-panel #devMcp .auth-note.left:last-child { margin-bottom: 0; }

/* ---- Settings menu: Developers dropdown with sub-pages */
.tab-group { display: flex; flex-direction: column; gap: 2px; }
.tab-group-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%;
  border: 0; background: none; font: inherit; font-size: 14px; font-weight: 560; text-align: left; cursor: pointer;
}
.tab-group-toggle svg { width: 15px; height: 15px; flex: none; transition: transform 0.18s ease; }
.tab-group.is-open .tab-group-toggle svg { transform: rotate(180deg); }
.tab-group-toggle.has-active { color: var(--text); }
.settings-subtabs { display: flex; flex-direction: column; gap: 2px; margin: 2px 0 4px 14px; padding-left: 10px; border-left: 1px solid var(--line); }
.settings-subtabs[hidden] { display: none; }
.settings-subtab { padding: 8px 12px; border-radius: 9px; color: var(--muted); font-size: 13.5px; font-weight: 520; text-decoration: none; }
.settings-subtab:hover { background: var(--panel); color: var(--text); }
.settings-subtab.is-active { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.settings-eyebrow { margin: 0 0 4px; color: var(--accent); font-size: 12px; font-weight: 650; letter-spacing: 0.12em; text-transform: uppercase; }

/* Developer pages: cross-links */
.dev-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dev-card {
  display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #0e1014; color: var(--body); text-decoration: none; transition: border-color 0.15s ease;
}
.dev-card:hover { border-color: rgba(216, 255, 106, 0.45); }
.dev-card b { color: var(--text); font-size: 14px; }
.dev-card span { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.settings-panel a:not(.btn):not(.dev-card) { color: var(--accent); text-underline-offset: 3px; }
.dev-inline-link { font-weight: 500; font-size: 12.5px; }
.dev-need-token { margin-top: -4px !important; }

@media (max-width: 720px) {
  .settings-tabs { flex-wrap: wrap; }
  .tab-group { display: contents; }
  .tab-group-toggle { flex: 1; justify-content: center; width: auto; }
  .settings-subtabs { order: 10; flex: 1 0 100%; flex-direction: row; overflow-x: auto; margin: 4px 0 0; padding: 4px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .settings-subtab { flex: 1; text-align: center; white-space: nowrap; padding: 7px 10px; }
  .dev-cards { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .token-create input { flex: none; height: 40px; }
}
/* Touch screens keep :hover after a tap; don't let that look like the selected tab */
@media (hover: none) {
  .settings-tab:not(.is-active):hover, .settings-subtab:not(.is-active):hover { background: none; color: var(--muted); }
}

/* ---- naming and renaming tokens */
.token-label { display: block; margin: 6px 0 6px; color: var(--text); font-size: 13px; font-weight: 600; }
.token-label span { margin-left: 6px; color: var(--faint); font-weight: 400; }
.token-actions { display: flex; gap: 6px; }
.token-actions[hidden] { display: none; }
.settings-panel .token-actions .btn { align-self: auto; }
.token-rename { display: flex; flex-wrap: wrap; gap: 6px; }
.token-rename input {
  flex: 1 1 180px; min-width: 0; height: 32px; padding: 0 10px;
  border: 1px solid rgba(216, 255, 106, 0.45); border-radius: 8px; background: #0e1014; color: var(--text); font: inherit; font-size: 14px;
}
.token-rename input:focus { outline: none; }
.settings-panel .token-rename .btn { align-self: auto; height: 32px; }

/* ---- syntax highlighting for the developer examples (dark theme, lime accent) */
.code-sample { color: #d6dde6; }
.tok-comment { color: #6f7b8b; font-style: italic; }
.tok-string { color: #c3e88d; }
.tok-key { color: #89ddff; }
.tok-keyword { color: #c792ea; }
.tok-function { color: #82aaff; }
.tok-number { color: #f78c6c; }
.tok-flag { color: #ffcb6b; }
.tok-variable { color: #f07178; }

/* ---- connect the CLI (browser sign-in) */
.connect-card h3 { font-size: 18px !important; }
.connect-code {
  margin: 4px 0 14px; padding: 14px; border: 1px dashed rgba(216, 255, 106, 0.4); border-radius: 12px; background: #0e1014;
  color: var(--accent); font-family: var(--font-mono); font-size: 30px; font-weight: 600; letter-spacing: 0.12em; text-align: center;
}
.connect-warn { margin: 0 0 16px; padding: 10px 12px; border-radius: 10px; background: rgba(255, 189, 102, 0.08); color: var(--body); font-size: 13.5px; line-height: 1.5; }
.connect-warn strong { color: var(--amber); }
.connect-actions { display: flex; gap: 8px; }
.settings-panel .connect-actions .btn, .settings-panel #connectDone .btn { align-self: auto; }
.dev-lock-inline { margin-top: 10px; }
