/* Portable project link (cross-browser, no sign-in) */
.portable-bar {
  margin: 0.85rem 0 1rem;
  padding: 0.9rem 1rem;
  background: rgba(52, 211, 153, 0.07);
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: var(--radius-sm);
}
.portable-copy {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.portable-copy strong {
  color: var(--success);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.portable-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}
.portable-row input {
  flex: 1 1 220px;
  min-width: 0;
  background: #050505;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--text);
}

/* Semi-auto X approval strip + worker panel */
.x-approve-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin: 0.85rem 0 1rem;
  padding: 0.9rem 1rem;
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.28);
  border-radius: var(--radius-sm);
}
.x-approve-copy {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 42rem;
}
.x-approve-copy strong {
  color: var(--accent);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.x-approve-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.x-panel {
  border-top: 1px solid rgba(245, 166, 35, 0.2);
  background: #0a0a0a;
  margin-top: 1.5rem;
}
.x-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.x-status {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--border-strong);
  color: var(--text-muted);
}
.x-status.busy { color: var(--accent); border-color: rgba(245, 166, 35, 0.45); }
.x-status.ok { color: var(--success); border-color: rgba(52, 211, 153, 0.4); }
.x-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin-bottom: 1rem;
}
@media (max-width: 800px) {
  .x-panel-grid { grid-template-columns: 1fr; }
}
.x-panel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: var(--radius-sm);
}
.x-card-h {
  font-weight: 800;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.65rem;
  color: var(--accent);
}
.x-tok-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
.x-tok-row input {
  flex: 1 1 140px;
  min-width: 0;
  background: #050505;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0.55rem 0.7rem;
  font-family: var(--mono);
  font-size: 0.8rem;
}
.x-cmd {
  margin: 0;
  padding: 0.75rem;
  background: #050505;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.72rem;
  line-height: 1.45;
  overflow-x: auto;
  color: var(--text-muted);
  white-space: pre-wrap;
}
.x-queue { margin-top: 0.5rem; }
.x-q-title {
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}
.x-q-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.45rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}
.x-q-dot { font-weight: 800; width: 1.1rem; }
.x-q-dot.ok { color: var(--success); }
.x-q-dot.bad { color: var(--danger); }
.x-q-dot.wait { color: var(--accent); }
.x-q-cap { color: var(--text); }
.x-err { color: var(--danger); font-size: 0.78rem; }
.x-note { color: var(--text-dim); font-size: 0.88rem; }

/* Tate Clipper — gold-on-black product UI (TRW-inspired) */
:root {
  --bg: #050505;
  --bg-elevated: #0a0a0a;
  --bg-card: #111111;
  --bg-card-hover: #161616;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f4;
  --text-muted: #9a9a9a;
  --text-dim: #6b6b6b;
  --accent: #f5a623;
  --accent-2: #e8941a;
  --accent-3: #ffc857;
  --accent-grad: linear-gradient(135deg, #ffc857 0%, #f5a623 45%, #e8941a 100%);
  --success: #34d399;
  --danger: #f87171;
  --warn: #fbbf24;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.65);
  --font: "Montserrat", "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

/* Ambient glow */
.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 75% 50% at 50% -15%, rgba(245, 166, 35, 0.2), transparent 58%),
    radial-gradient(ellipse 40% 30% at 90% 10%, rgba(245, 166, 35, 0.08), transparent 52%),
    radial-gradient(ellipse 35% 28% at 8% 30%, rgba(232, 148, 26, 0.06), transparent 55%),
    radial-gradient(ellipse 55% 35% at 50% 110%, rgba(245, 166, 35, 0.06), transparent 60%);
}

.container {
  width: min(1180px, calc(100% - 2.5rem));
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: rgba(7, 7, 12, 0.72);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
}

.logo-mark svg {
  width: 18px;
  height: 18px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-cta {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.7rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}

.btn:active {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--accent-grad);
  color: #0a0a0a;
  box-shadow: 0 8px 26px rgba(245, 166, 35, 0.4);
  font-weight: 800;
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.08) saturate(1.05);
  transform: translateY(-2px);
  box-shadow: 0 14px 38px rgba(245, 166, 35, 0.55);
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.04);
}

.btn-success {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.3);
}

.btn-lg {
  padding: 0.95rem 1.6rem;
  font-size: 1.05rem;
}

/* Hero */
.hero {
  padding: 5.5rem 0 3rem;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 10px var(--success);
}

.hero h1 {
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.08;
  max-width: 16ch;
  margin: 0 auto 1.1rem;
}

/* Gradient text works in any heading, not only the hero, so section headings can
   emphasise a word the same way. */
.hero h1 .grad,
h2 .grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-sub {
  color: var(--text-muted);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  max-width: 38rem;
  margin: 0 auto 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  justify-content: center;
  margin-bottom: 2.75rem;
}

/* Upload card */
.upload-card {
  width: min(720px, 100%);
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0.5rem;
  box-shadow: var(--shadow);
}

.upload-zone {
  border: 1.5px dashed rgba(139, 92, 246, 0.45);
  border-radius: 20px;
  padding: 2.75rem 1.5rem;
  background: rgba(10, 10, 18, 0.7);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.2s;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: #a78bfa;
  background: rgba(99, 102, 241, 0.08);
  transform: translateY(-1px);
}

.upload-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.15);
  display: grid;
  place-items: center;
  color: #c4b5fd;
}

.upload-zone h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.upload-zone p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.upload-zone .hint {
  margin-top: 0.85rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Social proof strip */
.proof {
  padding: 2.5rem 0 1rem;
  text-align: center;
}

.proof p {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1.25rem;
}

.proof-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
}

.chip {
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-head {
  text-align: center;
  margin-bottom: 2.75rem;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.035em;
  margin-bottom: 0.75rem;
}

.section-head p {
  color: var(--text-muted);
  max-width: 36rem;
  margin: 0 auto;
  font-size: 1.05rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

@media (max-width: 860px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s, background 0.2s;
}

.feature-card:hover {
  border-color: rgba(139, 92, 246, 0.35);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  letter-spacing: -0.02em;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.94rem;
}

/* How it works steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 900px) {
  .steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .steps {
    grid-template-columns: 1fr;
  }
}

.step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem;
  position: relative;
  overflow: hidden;
}

.step-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: #a78bfa;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
}

.step p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* FAQ */
.faq {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  margin-bottom: 0.65rem;
  overflow: hidden;
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 1rem 1.15rem;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  color: var(--text-muted);
  font-size: 1.2rem;
  font-weight: 400;
}

.faq-item[open] summary::after {
  content: "·";
}

.faq-item p {
  padding: 0 1.15rem 1.1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Footer CTA */
.footer-cta {
  text-align: center;
  padding: 4rem 0 3rem;
}

.footer-cta h2 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.footer-cta p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2rem;
  color: var(--text-dim);
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ========== Studio app ========== */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.app-main {
  flex: 1;
  width: min(1280px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.app-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.app-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.app-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.panel + .panel {
  margin-top: 1rem;
}

.panel-title {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-dim);
  font-weight: 700;
  margin-bottom: 0.9rem;
}

.layout-2 {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 1rem;
}

@media (max-width: 960px) {
  .layout-2 {
    grid-template-columns: 1fr;
  }
}

.field {
  margin-bottom: 0.9rem;
}

.field label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.field select,
.field input[type="number"] {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  outline: none;
}

.field select:focus,
.field input:focus {
  border-color: rgba(139, 92, 246, 0.55);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.toggle-row:last-child {
  border-bottom: none;
}

/* Custom checkbox */
.switch {
  position: relative;
  width: 42px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  background: #2a2a3d;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}

.switch span::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.2s;
}

.switch input:checked + span {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.switch input:checked + span::before {
  transform: translateX(18px);
}

/* Progress */
.progress-wrap {
  margin-top: 1rem;
}

.progress-bar {
  height: 8px;
  background: #1a1a28;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-grad);
  border-radius: 999px;
  transition: width 0.35s ease;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 0.55rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--mono);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
}

.status-pill.processing {
  color: #a5b4fc;
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(99, 102, 241, 0.12);
}

.status-pill.ready,
.status-pill.done {
  color: var(--success);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(52, 211, 153, 0.1);
}

.status-pill.error {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
}

/* Clip grid */
.clips-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.clip-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s;
}

.clip-card:hover {
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-2px);
}

.clip-card.selected {
  border-color: #8b5cf6;
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.4);
}

.clip-thumb {
  aspect-ratio: 9 / 16;
  background: #0a0a12;
  position: relative;
  overflow: hidden;
}

.clip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.clip-score {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: #c4b5fd;
}

.clip-check {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.clip-card.selected .clip-check {
  background: #8b5cf6;
  border-color: #8b5cf6;
}

.clip-check::after {
  content: "✓";
  font-size: 0.7rem;
  color: white;
  opacity: 0;
}

.clip-card.selected .clip-check::after {
  opacity: 1;
}

.clip-body {
  padding: 0.85rem;
}

.clip-body h4 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.clip-meta {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
  font-family: var(--mono);
}

.clip-reason {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--text);
  margin-bottom: 0.4rem;
}

/* File row after pick */
.url-row input[type="url"] {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  outline: none;
  font-size: 0.92rem;
}

.url-row input[type="url"]:focus {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}

.or-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.9rem 0;
  color: var(--text-dim);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.or-divider::before,
.or-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.file-picked {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 12px;
  margin-top: 1rem;
}

.file-picked .name {
  flex: 1;
  font-weight: 600;
  font-size: 0.92rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-picked .size {
  color: var(--text-dim);
  font-size: 0.8rem;
  font-family: var(--mono);
}

.hidden {
  display: none !important;
}

.error-box {
  margin-top: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #fca5a5;
  font-size: 0.9rem;
}

.exports-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.export-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 0.9rem;
}

.export-item a {
  color: #a5b4fc;
  font-weight: 600;
}

.export-item a:hover {
  text-decoration: underline;
}

/* Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Logo */
.logo-img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  flex-shrink: 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent-grad);
  display: grid;
  place-items: center;
}

.logo-mark svg {
  width: 16px;
  height: 16px;
}

/* Pricing cards */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.15rem;
  align-items: stretch;
}
@media (min-width: 1100px) {
  .pricing-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.price-card.featured {
  border-color: rgba(139, 92, 246, 0.7);
  box-shadow: 0 0 0 1px rgba(139, 92, 246, 0.35), 0 20px 60px rgba(124, 108, 255, 0.35), var(--shadow);
  background: linear-gradient(180deg, rgba(124, 108, 255, 0.18), var(--bg-card) 42%);
}
@media (min-width: 1100px) {
  .price-card.featured { transform: scale(1.04); }
}

.price-label {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #a78bfa;
}

.price-amount {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.price-amount span {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
}

.price-desc {
  color: var(--text-muted);
  font-size: 0.92rem;
  flex: 1;
}

.price-list {
  list-style: none;
  margin: 0.25rem 0 0.75rem;
  padding: 0;
}

.price-list li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.price-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
}

.trial-banner {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(139, 92, 246, 0.35);
  background: rgba(99, 102, 241, 0.12);
  color: #c4b5fd;
  font-size: 0.9rem;
}

.trial-banner a {
  color: #fff;
  font-weight: 600;
  text-decoration: underline;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  text-align: left;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
}

.admin-table th {
  color: var(--text-dim);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

textarea {
  font: inherit;
}

/* ===== Opus-style clip cards + score ===== */
.clip-card { position: relative; }
.clip-thumb { position: relative; overflow: hidden; }
.clip-score {
  position: absolute; top: 8px; left: 8px;
  font-weight: 800; font-size: 1.35rem; line-height: 1;
  padding: 4px 8px; border-radius: 10px;
  background: rgba(0,0,0,0.55); backdrop-filter: blur(4px);
  color: #6ee7a8; letter-spacing: -0.02em;
}
.clip-score.hi { color: #34e57e; text-shadow: 0 0 14px rgba(52,229,126,0.55); }
.clip-score.mid { color: #fbbf24; }
.clip-score.lo { color: #cbd5e1; }
.clip-dur {
  position: absolute; bottom: 8px; right: 8px;
  font-size: 0.72rem; font-weight: 600; color: #fff;
  background: rgba(0,0,0,0.6); padding: 2px 7px; border-radius: 999px;
}
.clip-info {
  position: absolute; top: 8px; right: 8px;
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25); background: rgba(0,0,0,0.5);
  color: #fff; font-style: italic; font-weight: 700; cursor: pointer;
  display: grid; place-items: center; font-size: 0.9rem;
}
.clip-info:hover { background: var(--accent); border-color: var(--accent); }
.clip-title {
  font-size: 0.95rem; font-weight: 700; line-height: 1.25;
  letter-spacing: -0.01em; margin-bottom: 0.5rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.clip-grades { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.grade {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--text-dim); background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 6px; padding: 2px 6px;
}
.grade em { font-style: normal; font-weight: 800; color: #34e57e; }
.clip-actions-row { margin-top: 0.5rem; display: flex; gap: 0.4rem; }
.clip-act {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; border: 1px solid var(--border-strong);
  color: var(--text); background: rgba(255,255,255,0.03);
}
.clip-act:hover { background: var(--accent); border-color: var(--accent); }

/* ===== Clip detail modal ===== */
.clip-modal {
  position: fixed; inset: 0; z-index: 200; display: none;
  background: rgba(4,4,10,0.72); backdrop-filter: blur(6px);
  padding: 4vh 1rem; overflow-y: auto;
}
.clip-modal.open { display: grid; place-items: start center; }
.modal-card {
  position: relative; width: min(880px, 100%);
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: 20px; box-shadow: var(--shadow); padding: 1.5rem;
}
.modal-x {
  position: absolute; top: 12px; right: 12px; width: 34px; height: 34px;
  border-radius: 50%; border: 1px solid var(--border); background: rgba(255,255,255,0.04);
  color: var(--text); cursor: pointer; font-size: 0.9rem;
}
/* The detail card is a fixed-size panel, not a page. Everything that can grow
   without limit (the demand evidence, a long transcript) scrolls inside its own
   pane, so the video and the score never get pushed off screen. */
.modal-card.det-card { width: min(1040px, 100%); max-height: 88vh; display: flex; flex-direction: column; }
.det-grid { display: grid; grid-template-columns: 104px 236px 1fr; gap: 1.15rem; align-items: start;
            min-height: 0; flex: 1; }
.det-info { display: flex; flex-direction: column; min-height: 0; max-height: 78vh; }

.det-tabs { display: flex; gap: 0.4rem; margin: 0.15rem 0 0.7rem; flex-wrap: wrap; }
.det-tab {
  border: 1px solid var(--border); background: rgba(255,255,255,0.03); color: var(--text-muted);
  border-radius: 999px; padding: 0.32rem 0.72rem; font-size: 0.79rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 0.35rem; white-space: nowrap;
}
.det-tab:hover { color: var(--text); border-color: var(--border-strong); }
.det-tab.is-on { background: rgba(122,162,255,0.14); border-color: rgba(122,162,255,0.5); color: #cfe0ff; }
.det-tab-dot { font-size: 0.85rem; line-height: 1; }

.det-panes { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding-right: 0.35rem; }
.det-pane { display: none; }
.det-pane.is-on { display: block; }
.det-panes::-webkit-scrollbar { width: 8px; }
.det-panes::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }

.det-actions { flex-shrink: 0; padding-top: 0.85rem; }

@media (max-width: 860px){
  .det-grid { grid-template-columns: 1fr; }
  .det-preview { max-width: 236px; margin: 0 auto; }
  .det-info { max-height: none; }
  .det-panes { overflow: visible; }
  .modal-card.det-card { max-height: 92vh; overflow-y: auto; }
}
.det-score { display: flex; flex-direction: column; gap: 0.5rem; }
.det-num { font-size: 2.6rem; font-weight: 800; line-height: 1; color: #34e57e; letter-spacing: -0.03em; }
.det-num span { font-size: 1rem; color: var(--text-dim); font-weight: 600; }
.det-num.mid { color: #fbbf24; } .det-num.lo { color: #cbd5e1; }
.det-grade { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--text-muted); }
.det-g { font-weight: 800; color: #34e57e; min-width: 1.6rem; }
.det-preview img { width: 100%; border-radius: 14px; border: 1px solid var(--border); }
.det-info h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 0.3rem; }
.det-meta { color: var(--text-dim); font-size: 0.85rem; margin-bottom: 0.9rem; }
.det-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); margin: 0.8rem 0 0.25rem; }
.det-analysis { color: var(--text); font-size: 0.95rem; }
.det-transcript { color: var(--text-muted); font-size: 0.9rem; max-height: 160px; overflow-y: auto; }
.det-actions { margin-top: 1.1rem; }

/* ===== Hero input + product mockup ===== */
.hero-input {
  display: flex; gap: 0.55rem; flex-wrap: wrap;
  width: min(560px, 100%); margin: 0 auto 0.6rem;
}
.hero-input input {
  flex: 1; min-width: 220px;
  background: #0a0a12; border: 1px solid var(--border-strong);
  border-radius: 999px; padding: 0.9rem 1.2rem; color: #fff; outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.hero-input input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.22);
}
.hero-input .btn { white-space: nowrap; }
.hero-input-hint {
  text-align: center; font-size: 0.8rem; color: var(--text-dim);
  margin-bottom: 3.25rem;
}

.hero-mockup { position: relative; width: min(1040px, 100%); margin: 0 auto; }
.hero-mockup .mock-glow {
  position: absolute; inset: -8% 6% auto 6%; height: 60%; z-index: 0;
  background: radial-gradient(ellipse 60% 100% at 50% 0%, rgba(124,108,255,0.5), transparent 70%);
  filter: blur(38px); pointer-events: none;
}
.mock-window {
  position: relative; z-index: 1;
  background: linear-gradient(180deg, #14141f, #0d0d16);
  border: 1px solid var(--border-strong);
  border-radius: 18px; overflow: hidden;
  box-shadow: 0 40px 120px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.02);
}
.mock-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem; border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.mock-dot { width: 11px; height: 11px; border-radius: 50%; }
.mock-url {
  margin-left: 0.75rem; font-size: 0.76rem; color: var(--text-dim);
  font-family: var(--mono);
  background: rgba(0,0,0,0.35); padding: 3px 12px; border-radius: 999px;
}
.mock-body { padding: 1.35rem 1.4rem 1.6rem; text-align: left; }
.mock-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.2rem; gap: 1rem;
}
.mock-title { font-size: 1.05rem; font-weight: 800; letter-spacing: -0.02em; }
.mock-sub { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.15rem; }
.mock-pill {
  font-size: 0.74rem; font-weight: 700; color: var(--success);
  background: rgba(52,211,153,0.12); border: 1px solid rgba(52,211,153,0.3);
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
}
.mock-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem;
}
.mock-clip {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 14px; padding: 0.6rem; transition: transform 0.2s, border-color 0.2s;
}
.mock-clip:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.mock-thumb {
  position: relative; aspect-ratio: 9/16; border-radius: 10px;
  margin-bottom: 0.55rem; overflow: hidden;
  background: #14141f;  /* shows while the frame loads */
}
/* Real render frames, cropped to fill the 9:16 tile at any card width. */
.mock-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mock-thumb::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(0,0,0,0.5));
}
.mock-num {
  position: absolute; top: 7px; left: 7px; z-index: 1;
  font-weight: 800; font-size: 1.15rem; line-height: 1;
  padding: 3px 7px; border-radius: 8px;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(3px);
}
.mock-num.hi { color: #34e57e; text-shadow: 0 0 12px rgba(52,229,126,0.6); }
.mock-num.mid { color: #fbbf24; }
.mock-dur {
  position: absolute; bottom: 7px; right: 7px; z-index: 1;
  font-size: 0.68rem; font-weight: 700; color: #fff;
  background: rgba(0,0,0,0.55); padding: 2px 7px; border-radius: 999px;
}
.mock-clip-title {
  font-size: 0.82rem; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em;
  margin-bottom: 0.5rem; min-height: 2.05rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mock-grades { display: flex; gap: 0.28rem; flex-wrap: wrap; }
.mg {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--text-dim); background: rgba(255,255,255,0.04);
  border: 1px solid var(--border); border-radius: 5px; padding: 2px 5px;
}
.mg em { font-style: normal; font-weight: 800; color: #34e57e; }
/* Demand verdict on a clip tile. Same palette as the app so the screenshot and the
   product read as the same thing. */
.mg.hot  { color: #fb923c; background: rgba(251,146,60,0.14); border-color: rgba(251,146,60,0.34); }
.mg.cold { color: #94a3b8; background: rgba(148,163,184,0.10); border-color: rgba(148,163,184,0.26); }
.mock-foot {
  margin: 1.1rem 0 0; font-size: 0.78rem; line-height: 1.55;
  color: var(--text-dim); text-align: center;
}

.price-badge {
  position: absolute; top: -0.7rem; left: 50%; transform: translateX(-50%);
  font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: #fff; background: var(--accent-grad);
  padding: 4px 12px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(124,108,255,0.5);
}
.price-card.featured { position: relative; }

@media (max-width: 900px) {
  .mock-grid { grid-template-columns: repeat(2, 1fr); }
  .mock-clip:nth-child(4) { display: none; }
}
@media (max-width: 520px) {
  .mock-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .mock-clip-title { font-size: 0.75rem; }
  .mock-url { display: none; }
}

/* ===== Studio genre grid (Opus-style) ===== */
.genre-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.genre-pill {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.42rem 0.7rem; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--text-muted); font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s, transform 0.1s;
}
.genre-pill:hover { border-color: var(--border-strong); color: var(--text); transform: translateY(-1px); }
.genre-pill.active {
  background: linear-gradient(135deg, rgba(139,92,246,0.28), rgba(99,102,241,0.22));
  border-color: var(--accent); color: #fff;
  box-shadow: 0 0 0 1px rgba(139,92,246,0.45);
}

/* ===== Studio caption presets ===== */
.cap-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 0.5rem; margin-top: 0.5rem;
}
.cap-preset {
  display: flex; flex-direction: column; align-items: center; gap: 0.4rem;
  padding: 0.5rem 0.35rem; border-radius: 12px;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); font-size: 0.72rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.cap-preset:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.cap-preset.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(139,92,246,0.45); color: #fff; }
.cap-demo {
  display: grid; place-items: center; width: 100%; height: 42px; border-radius: 8px;
  background: #05050a; font-weight: 800; font-size: 0.82rem; letter-spacing: 0.02em;
  overflow: hidden;
}
.cap-beasty { color: #111; background: #05050a; }
.cap-beasty { color: #fde047; text-shadow: 0 1px 0 #000; }
.cap-beasty { background: #05050a; }
.cap-hormozi { color: #fff; text-transform: uppercase; }
.cap-hormozi { box-shadow: inset 0 -14px 0 rgba(52,211,153,0.35); }
.cap-modern { color: #fff; }
.cap-yellow { color: #facc15; }
.cap-neon { color: #38bdf8; text-shadow: 0 0 8px rgba(56,189,248,0.8); }

/* ===== Studio launch card (Opus dashboard flow) ===== */
.launch { margin: 0 0 1.5rem; }
.launch-card {
  width: min(720px, 100%); margin: 0 auto;
  background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
  border: 1px solid var(--border-strong); border-radius: 20px;
  padding: 1.1rem; box-shadow: var(--shadow);
}
.launch-input {
  display: flex; align-items: center; gap: 0.6rem;
  background: #0a0a12; border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 0.85rem 1rem; transition: border-color 0.2s, box-shadow 0.2s;
}
.launch-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(139,92,246,0.2); }
.launch-input .li-ic { color: var(--text-dim); display: grid; place-items: center; }
.launch-input input { flex: 1; background: transparent; border: 0; outline: none; color: #fff; font-size: 0.98rem; }
.launch-actions { display: flex; align-items: center; justify-content: space-between; margin: 0.75rem 0.15rem; gap: 0.75rem; }
.launch-alt {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: 0; color: var(--text-muted); cursor: pointer;
  font-size: 0.88rem; font-weight: 600; padding: 0.2rem 0;
}
.launch-alt:hover { color: var(--text); }
.launch-cred { font-size: 0.8rem; color: var(--text-dim); }
.launch-go { width: 100%; font-size: 1rem; padding: 0.9rem; }
.launch-note { text-align: center; color: var(--text-dim); font-size: 0.82rem; margin-top: 0.9rem; }
.results-panel { margin-top: 0; }

/* ===== Segmented control (clip length / aspect) ===== */
.seg-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.5rem; }
.seg {
  padding: 0.45rem 0.8rem; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.03);
  color: var(--text-muted); font-size: 0.82rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.seg:hover:not(:disabled) { border-color: var(--border-strong); color: var(--text); }
.seg.active {
  background: linear-gradient(135deg, rgba(139,92,246,0.28), rgba(99,102,241,0.22));
  border-color: var(--accent); color: #fff; box-shadow: 0 0 0 1px rgba(139,92,246,0.45);
}
.seg:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== Config modal ===== */
.cfg-modal, .proc-modal {
  position: fixed; inset: 0; z-index: 210; display: none;
  background: rgba(4,4,10,0.74); backdrop-filter: blur(6px);
  padding: 4vh 1rem; overflow-y: auto;
}
.cfg-modal.open, .proc-modal.open { display: grid; place-items: start center; }
.cfg-card {
  position: relative; width: min(680px, 100%);
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: 20px; box-shadow: var(--shadow); overflow: hidden;
}
.cfg-head, .proc-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem;
  padding: 1.25rem 1.4rem 0.9rem; border-bottom: 1px solid var(--border);
}
.cfg-title, .proc-title { font-size: 1.2rem; font-weight: 800; letter-spacing: -0.02em; }
.cfg-src { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.2rem; max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-body { padding: 1.1rem 1.4rem; display: flex; flex-direction: column; gap: 1.15rem; max-height: 62vh; overflow-y: auto; }
.cfg-field label { display: block; font-size: 0.9rem; font-weight: 700; margin-bottom: 0.15rem; }
.cfg-field select {
  width: 100%; background: #0a0a12; border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 0.6rem 0.8rem; color: #fff; margin-top: 0.4rem;
}
.cfg-field textarea {
  width: 100%; background: #0a0a12; border: 1px solid var(--border-strong);
  border-radius: 12px; padding: 0.7rem 0.9rem; color: #fff; outline: none; resize: vertical;
  min-height: 3.2rem; margin-top: 0.4rem;
}
.cfg-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem 1.4rem; border-top: 1px solid var(--border); background: rgba(255,255,255,0.02);
}
.cfg-save { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; color: var(--text-muted); cursor: pointer; }
.cfg-foot .btn-primary { min-width: 210px; }

/* ===== Processing modal (log) ===== */
.proc-card {
  position: relative; width: min(640px, 100%);
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  border-radius: 20px; box-shadow: var(--shadow); overflow: hidden;
}
.proc-sub { font-size: 0.82rem; color: var(--text-dim); margin-top: 0.2rem; }
.proc-log {
  margin: 1.1rem 1.4rem; padding: 1rem 1.1rem;
  background: #05050a; border: 1px solid var(--border); border-radius: 12px;
  font-family: var(--mono); font-size: 0.82rem; line-height: 1.7; color: #a5b4fc;
  white-space: pre-wrap; word-break: break-word; min-height: 150px;
}
.proc-foot { display: flex; align-items: center; gap: 1rem; padding: 0 1.4rem 1.3rem; }
.proc-foot .progress-wrap { flex: 1; margin: 0; }

@media (max-width: 560px) {
  .cfg-foot { flex-direction: column; align-items: stretch; }
  .cfg-foot .btn-primary { min-width: 0; width: 100%; }
}

/* ===== Inline processing card (persistent dashboard status) ===== */
.proc-card-inline {
  display: flex; align-items: center; gap: 1rem; width: 100%; text-align: left;
  background: linear-gradient(180deg, rgba(139,92,246,0.12), var(--bg-card));
  border: 1px solid var(--accent); border-radius: 16px; padding: 1rem 1.1rem;
  cursor: pointer; color: var(--text); font: inherit;
  box-shadow: 0 0 0 1px rgba(139,92,246,0.25), 0 12px 40px rgba(124,108,255,0.18);
  transition: transform 0.15s, box-shadow 0.15s;
}
.proc-card-inline:hover { transform: translateY(-1px); box-shadow: 0 0 0 1px rgba(139,92,246,0.5), 0 16px 50px rgba(124,108,255,0.28); }
.pci-thumb {
  position: relative; flex: 0 0 auto; width: 66px; height: 66px; border-radius: 12px;
  background: #0a0a12; display: grid; place-items: center; overflow: hidden;
}
.pci-spin {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--accent);
  animation: pciSpin 0.8s linear infinite;
}
@keyframes pciSpin { to { transform: rotate(360deg); } }
.pci-eta {
  position: absolute; bottom: 4px; right: 4px; font-size: 0.62rem; font-weight: 800;
  color: #fff; background: rgba(0,0,0,0.6); padding: 1px 5px; border-radius: 999px;
}
.pci-info { flex: 1; min-width: 0; }
.pci-title { font-weight: 800; font-size: 0.98rem; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pci-stage { color: var(--text-muted); font-size: 0.83rem; margin: 0.15rem 0 0.5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pci-bar { height: 7px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.pci-fill { height: 100%; width: 0; background: var(--accent-grad); border-radius: 999px; transition: width 0.4s ease; }
.pci-open { flex: 0 0 auto; color: #c4b5fd; font-size: 0.85rem; font-weight: 700; white-space: nowrap; }
@media (max-width: 520px) { .pci-open { display: none; } }

/* ===== Decluttered Opus-style clip cards (score + tags + play) ===== */
.clip-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 52px; height: 52px; border-radius: 50%; border: none;
  background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); color: #fff;
  cursor: pointer; display: grid; place-items: center; padding-left: 2px;
  opacity: 0; transition: opacity 0.15s, transform 0.15s;
}
.clip-card:hover .clip-play { opacity: 1; }
.clip-play:hover { background: var(--accent); transform: translate(-50%, -50%) scale(1.08); }
.clip-scoreline { display: flex; align-items: center; gap: 0.55rem; margin-bottom: 0.3rem; }
.clip-score-num { font-weight: 800; font-size: 1.55rem; line-height: 1; letter-spacing: -0.03em; }
.clip-score-num.hi { color: #34e57e; text-shadow: 0 0 14px rgba(52,229,126,0.4); }
.clip-score-num.mid { color: #fbbf24; }
.clip-score-num.lo { color: #cbd5e1; }
.clip-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.ctag { display: inline-flex; align-items: center; font-size: 0.6rem; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.ctag.trend { color: #fb923c; background: rgba(251,146,60,0.14); border: 1px solid rgba(251,146,60,0.32); }
.ctag.eng { color: #fbbf24; background: rgba(251,191,36,0.12); border: 1px solid rgba(251,191,36,0.28); }
.ctag.weak { color: #94a3b8; background: rgba(148,163,184,0.10); border: 1px solid rgba(148,163,184,0.24); }
.clip-act { font-size: 0.78rem; padding: 0 11px; width: auto; height: 32px; gap: 4px; font-weight: 700; }

/* Detail modal video preview */
.det-video { width: 100%; border-radius: 14px; border: 1px solid var(--border); background: #000; aspect-ratio: 9 / 16; object-fit: cover; }
.det-video-note { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.4rem; text-align: center; }
.det-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }

/* Detail modal, evidence-backed demand panel. Neutral surface rather than the old
   orange "hot" wash, because the verdict is often NOT trending and the panel must
   not look like a hype badge when it is delivering bad news. */
.det-trend {
  margin: 0.9rem 0 0.2rem; padding: 0.85rem 1rem; border-radius: 12px;
  background: rgba(255,255,255,0.028);
  border: 1px solid var(--border);
}
.det-trend-head { font-size: 0.74rem; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; color: var(--text-dim); }
.det-trend-topic { font-size: 0.98rem; font-weight: 700; margin: 0.3rem 0 0.25rem; color: var(--text); letter-spacing: -0.01em; }
.det-trend-why { font-size: 0.85rem; color: var(--text-muted); line-height: 1.45; }
.det-trend-foot { font-size: 0.7rem; color: var(--text-dim); margin-top: 0.6rem; }

/* ---------------------------------------------------------------------------
   Landing: demand check, comparison, sticky paste bar
   --------------------------------------------------------------------------- */

.demand-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
@media (max-width: 860px) { .demand-wrap { grid-template-columns: 1fr; } }

.demand-card {
  background: rgba(255,255,255,0.028); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.15rem 1.25rem;
  /* Column layout so the source line can sit at the bottom of BOTH cards. The two
     verdicts have different amounts of content and the ragged bottom looked broken. */
  display: flex; flex-direction: column;
}
.demand-card .dm-src { margin-top: auto; padding-top: 0.8rem; }
.dm-head { margin-bottom: 0.6rem; }
.dm-chip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.74rem;
  font-weight: 800; padding: 4px 10px; border-radius: 999px; }
.dm-hot  { color: #fb923c; background: rgba(251,146,60,0.15); border: 1px solid rgba(251,146,60,0.38); }
.dm-cold { color: #94a3b8; background: rgba(148,163,184,0.12); border: 1px solid rgba(148,163,184,0.28); }
.dm-headline { font-size: 1.02rem; font-weight: 700; color: var(--text); line-height: 1.35; }
.dm-sub { font-size: 0.78rem; color: var(--text-dim); margin: 0.25rem 0 0.9rem; }
.dm-sig { padding: 0.55rem 0.7rem; border-radius: 10px; background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06); margin-bottom: 0.45rem; }
.dm-row { display: flex; justify-content: space-between; gap: 0.7rem; align-items: baseline; }
.dm-row span { font-size: 0.8rem; color: var(--text); font-weight: 600; }
.dm-row b { font-size: 0.84rem; color: var(--text); white-space: nowrap; }
.dm-read { font-size: 0.76rem; color: var(--text-muted); margin-top: 0.15rem; line-height: 1.4; }
.dm-against { margin-top: 0.3rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.dm-against-head { font-size: 0.7rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.04em; color: #f0a4a4; margin-bottom: 0.35rem; }
.dm-against-i { font-size: 0.78rem; color: var(--text-muted); line-height: 1.5;
  padding-left: 0.75rem; position: relative; }
.dm-against-i::before { content: "·"; position: absolute; left: 0; color: #f0a4a4; }
.dm-src { font-size: 0.68rem; color: var(--text-dim); margin-top: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.04em; }
.demand-note { text-align: center; margin: 1.6rem auto 0; max-width: 680px;
  color: var(--text-dim); font-size: 0.86rem; line-height: 1.65; }

/* Comparison */
.cmp { border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.cmp-row { display: grid; grid-template-columns: 1.3fr 1fr 1.2fr; gap: 1rem;
  padding: 0.85rem 1.1rem; border-bottom: 1px solid var(--border); font-size: 0.87rem;
  color: var(--text-muted); align-items: center; }
.cmp-row:last-child { border-bottom: 0; }
.cmp-row > div:first-child { color: var(--text); font-weight: 600; }
.cmp-head { background: rgba(255,255,255,0.04); font-weight: 800; color: var(--text);
  text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem; }
.cmp-head > div:first-child { font-weight: 800; }
.cmp-y { color: #7be8ab; }
.cmp-n { color: #94a3b8; }
@media (max-width: 760px) {
  .cmp-row { grid-template-columns: 1fr; gap: 0.25rem; padding: 0.9rem 1rem; }
  .cmp-head { display: none; }
  .cmp-y::before { content: "ClipLab: "; color: var(--text-dim); }
  .cmp-n::before { content: "Typical: "; color: var(--text-dim); }
}

/* Sticky paste bar */
.stickybar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  padding: 0.7rem 1rem calc(0.7rem + env(safe-area-inset-bottom, 0px));
  background: rgba(10,10,18,0.86); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
  transform: translateY(110%); transition: transform 0.28s ease;
  pointer-events: none;
}
.stickybar.show { transform: translateY(0); pointer-events: auto; }
.stickybar-inner { max-width: 720px; margin: 0 auto; display: flex; gap: 0.5rem; }
.stickybar input {
  flex: 1; min-width: 0; background: #0a0a12; border: 1px solid rgba(255,255,255,0.14);
  border-radius: 12px; padding: 0.75rem 0.95rem; color: #fff; outline: none; font-size: 0.9rem;
}
.stickybar input:focus { border-color: rgba(139,124,255,0.55); }
@media (max-width: 520px) { .stickybar .btn { padding-left: 0.9rem; padding-right: 0.9rem; } }

/* Batch scheduling panel */
.asched { margin: 0 0 1rem; padding: 1rem 1.1rem; border-radius: 14px;
  background: rgba(255,255,255,0.03); border: 1px solid var(--border); }
.asched-head { font-size: 0.9rem; font-weight: 700; color: var(--text); margin-bottom: 0.75rem; }
.asched-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 0.75rem; }
@media (max-width: 620px) { .asched-grid { grid-template-columns: 1fr; } }
.asched-field { display: flex; flex-direction: column; gap: 0.3rem; }
.asched-field span { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.04em; }
.asched-field select { background: #0a0a12; border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px; padding: 0.6rem 0.7rem; color: #fff; outline: none; font-size: 0.88rem; }
.asched-note { font-size: 0.8rem; color: var(--text-muted); margin: 0.75rem 0 0; line-height: 1.45; }
.asched-actions { display: flex; gap: 0.5rem; margin-top: 0.85rem; flex-wrap: wrap; }

/* Verdict chip */
.tr-chip { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.72rem; font-weight: 800;
  padding: 3px 9px; border-radius: 999px; letter-spacing: 0.01em; text-transform: none; }
/* Verdict colours are standalone so the same palette works on the big modal chip
   and on the small card chip, which only differ in sizing. */
.v-hot  { color: #fb923c; background: rgba(251,146,60,0.15); border: 1px solid rgba(251,146,60,0.38); }
.v-warm { color: #fbbf24; background: rgba(251,191,36,0.13); border: 1px solid rgba(251,191,36,0.34); }
.v-ever { color: #4ade80; background: rgba(74,222,128,0.12); border: 1px solid rgba(74,222,128,0.30); }
.v-cold { color: #94a3b8; background: rgba(148,163,184,0.12); border: 1px solid rgba(148,163,184,0.28); }

.tr-headline { font-size: 0.95rem; font-weight: 700; color: var(--text); margin: 0.45rem 0 0.15rem; line-height: 1.35; }
.tr-subject { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 0.6rem; }

/* One row per measured signal: what was measured, the number, what it means. */
.tr-sigs { display: grid; gap: 0.45rem; }
.tr-sig { padding: 0.5rem 0.6rem; border-radius: 9px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); }
.tr-sig-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; }
.tr-sig-label { font-size: 0.78rem; font-weight: 600; color: var(--text); }
.tr-sig-val { font-size: 0.82rem; font-weight: 800; color: var(--text); white-space: nowrap; }
.tr-sig-read { font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; margin-top: 0.15rem; }
.tr-sig-src { font-size: 0.66rem; color: var(--text-dim); margin-top: 0.25rem; text-transform: uppercase; letter-spacing: 0.04em; }

/* The honest counterweight. */
.tr-against { margin-top: 0.65rem; padding-top: 0.6rem; border-top: 1px solid var(--border); }
.tr-against-head { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: #f0a4a4; margin-bottom: 0.3rem; }
.tr-against-item { font-size: 0.78rem; color: var(--text-muted); line-height: 1.45; padding-left: 0.75rem; position: relative; }
.tr-against-item::before { content: "·"; position: absolute; left: 0; color: #f0a4a4; }

/* Auto-post + schedule block */
.pubblk { margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid var(--border); }
.pub-hint { font-size: 0.83rem; color: var(--text-dim); }
.pub-sched { margin-top: 0.85rem; }
.pub-lbl { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-bottom: 0.45rem; }
.slot-row { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 0.55rem; }
.slot-chip {
  padding: 0.4rem 0.7rem; border-radius: 999px; border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.03); color: var(--text-muted); font-size: 0.8rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.slot-chip:hover { border-color: var(--accent); color: #fff; }
.sched-row { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.sched-row input[type="datetime-local"] {
  flex: 1; min-width: 180px; background: #0a0a12; border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 0.55rem 0.7rem; color: #fff; outline: none; color-scheme: dark;
}
.pub-note { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.5rem; line-height: 1.4; }

.best-slot {
  display: flex; align-items: center; justify-content: space-between; gap: 0.6rem;
  padding: 0.6rem 0.75rem; margin-bottom: 0.7rem; border-radius: 12px;
  border: 1px solid rgba(124, 92, 255, 0.5);
  background: linear-gradient(135deg, rgba(124,92,255,0.14), rgba(124,92,255,0.04));
}
.best-slot-info { display: flex; flex-direction: column; gap: 0.15rem; }
.best-tag { font-size: 0.7rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); }
.best-when { font-size: 0.92rem; font-weight: 700; color: #fff; }
.best-accept { white-space: nowrap; padding: 0.5rem 0.9rem; }
.links-edit { margin: 0.75rem 0; border-top: 1px solid var(--border); padding-top: 0.7rem; }
.links-edit summary { cursor: pointer; font-size: 0.8rem; font-weight: 700; color: var(--text-muted); }
.links-edit summary:hover { color: #fff; }
.links-edit textarea {
  width: 100%; margin: 0.35rem 0 0.55rem; background: #0a0a12; border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 0.55rem 0.7rem; color: #fff; outline: none; font: inherit;
  font-size: 0.82rem; resize: vertical; box-sizing: border-box;
}
.pd-lbl { display: block; margin: 0.55rem 0 0.25rem; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); }
.pd-select {
  width: 100%; background: #0a0a12; border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 0.5rem 0.7rem; color: #fff; outline: none; font: inherit; font-size: 0.85rem; color-scheme: dark; box-sizing: border-box;
}

/* Results / testimonials cards (enabled once real numbers exist) */
.result-card {
  padding: 1.25rem; border-radius: 16px; border: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.result-jump { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.rj-from { font-size: 1rem; font-weight: 700; color: var(--text-dim); text-decoration: line-through; }
.rj-arrow { color: var(--accent); font-weight: 800; }
.rj-to { font-size: 1.6rem; font-weight: 800; color: #6ee7b7; }
.result-meta { font-size: 0.78rem; color: var(--text-dim); font-family: var(--mono); margin-bottom: 0.6rem; }
.result-quote { font-size: 0.9rem; color: var(--text-muted); line-height: 1.55; font-style: italic; }

.hero-cred {
  margin-top: 1rem; font-size: 0.85rem; color: var(--text-dim); text-align: center;
}
.hero-cred strong { color: var(--text-muted); }

/* Pricing: billing-period toggle */
.bill-toggle {
  display: flex; justify-content: center; gap: 0.3rem; margin: 0 auto 1.75rem;
  padding: 0.3rem; border-radius: 999px; border: 1px solid var(--border-strong);
  background: rgba(255,255,255,0.03); width: fit-content; max-width: 100%; flex-wrap: wrap;
}
.bt-btn {
  padding: 0.55rem 1.1rem; border-radius: 999px; border: none; cursor: pointer;
  background: transparent; color: var(--text-muted); font: inherit; font-size: 0.88rem; font-weight: 600;
  display: inline-flex; align-items: center; gap: 0.4rem; transition: background 0.15s, color 0.15s;
}
.bt-btn:hover { color: #fff; }
.bt-btn.active { background: var(--accent); color: #fff; }
.bt-save {
  font-size: 0.68rem; font-weight: 700; padding: 0.1rem 0.4rem; border-radius: 999px;
  background: rgba(52,211,153,0.2); color: #6ee7b7; text-transform: uppercase; letter-spacing: 0.03em;
}
.bt-btn.active .bt-save { background: rgba(255,255,255,0.22); color: #fff; }

/* First-run onboarding checklist */
.onb-panel { margin-bottom: 1.1rem; border-color: rgba(124,92,255,0.35); background: linear-gradient(135deg, rgba(124,92,255,0.07), rgba(124,92,255,0.01)); }
.onb-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.75rem; }
.onb-sub { font-size: 0.78rem; color: var(--text-dim); margin-top: 0.15rem; }
.onb-bar { height: 5px; border-radius: 99px; background: rgba(255,255,255,0.07); overflow: hidden; margin: 0.7rem 0 0.9rem; }
.onb-fill { height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), #ff5a78); transition: width 0.4s ease; }
.onb-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.onb-step { display: flex; align-items: center; gap: 0.65rem; padding: 0.5rem 0.6rem; border-radius: 10px; border: 1px solid transparent; }
.onb-step.next { border-color: rgba(124,92,255,0.45); background: rgba(124,92,255,0.08); }
.onb-step.done { opacity: 0.55; }
.onb-tick { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; background: rgba(255,255,255,0.07); color: var(--text-dim); }
.onb-step.done .onb-tick { background: rgba(52,211,153,0.18); color: #6ee7b7; }
.onb-step.next .onb-tick { background: rgba(124,92,255,0.22); color: #c4b5fd; }
.onb-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.onb-text strong { font-size: 0.88rem; color: #fff; }
.onb-text span { font-size: 0.76rem; color: var(--text-muted); }
.onb-step.done .onb-text strong { text-decoration: line-through; }
.onb-go { flex: 0 0 auto; padding: 0.4rem 0.85rem; font-size: 0.8rem; }

/* X worker setup panel */
.x-setup summary { cursor: pointer; display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
.x-status {
  padding: 0.15rem 0.55rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  background: rgba(148,163,184,0.14); color: var(--text-dim);
}
.x-status.ok { background: rgba(52,211,153,0.16); color: #6ee7b7; }
.x-status.busy { background: rgba(251,191,36,0.16); color: #fbbf24; }
.x-why { font-size: 0.83rem; color: var(--text-muted); line-height: 1.6; margin: 0.9rem 0; }
.x-steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.85rem; }
.x-steps li { font-size: 0.85rem; color: var(--text-muted); }
.x-steps b { color: #fff; display: block; margin-bottom: 0.3rem; }
.x-steps code {
  display: block; margin-top: 0.3rem; padding: 0.5rem 0.65rem; border-radius: 8px;
  background: #0a0a12; border: 1px solid var(--border-strong); color: #93c5fd;
  font-family: var(--mono); font-size: 0.78rem; line-height: 1.6; overflow-x: auto;
}
.x-note { font-size: 0.75rem; color: var(--text-dim); display: block; margin-top: 0.3rem; }
.x-token-row { display: flex; gap: 0.4rem; margin-top: 0.35rem; flex-wrap: wrap; }
.x-token-row input {
  flex: 1 1 260px; min-width: 0; background: #0a0a12; border: 1px solid var(--border-strong);
  border-radius: 8px; padding: 0.45rem 0.6rem; color: #fff; font-family: var(--mono); font-size: 0.78rem;
}
.x-queue { margin-top: 1.1rem; border-top: 1px solid var(--border); padding-top: 0.8rem; }
.x-q-title { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); margin-bottom: 0.45rem; }
.x-q-row { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; padding: 0.25rem 0; color: var(--text-muted); }
.x-q-dot { width: 18px; text-align: center; font-weight: 800; }
.x-q-dot.ok { color: #6ee7b7; }
.x-q-dot.bad { color: #f87171; }
.x-q-dot.wait { color: #fbbf24; }
.x-q-cap { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.x-err { color: #f87171; font-size: 0.72rem; }

/* Channel library, ranked long-form clip sources */
.lib-panel { margin-bottom: 1.25rem; }
.lib-list { display: flex; flex-direction: column; gap: 0.5rem; }
.lib-profile {
  padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700;
  background: rgba(124,92,255,0.16); color: #c4b5fd; border: 1px solid rgba(124,92,255,0.35);
  cursor: help;
}
.lib-empty { color: var(--text-dim); font-size: 0.85rem; padding: 0.5rem 0; }
.lib-row {
  display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem;
  border: 1px solid var(--border); border-radius: 12px; background: rgba(255,255,255,0.02);
  transition: border-color 0.15s;
}
.lib-row:hover { border-color: var(--border-strong); }
.lib-score {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 800; font-size: 1rem; background: rgba(148,163,184,0.12); color: var(--text-muted);
}
.lib-score.hi { background: rgba(52,211,153,0.16); color: #6ee7b7; }
.lib-score.mid { background: rgba(96,165,250,0.16); color: #93c5fd; }
.lib-score.lo { background: rgba(148,163,184,0.12); color: var(--text-dim); }
.lib-thumb { flex: 0 0 auto; width: 96px; height: 54px; object-fit: cover; border-radius: 8px; }
.lib-info { flex: 1 1 auto; min-width: 0; }
.lib-title { font-weight: 700; font-size: 0.9rem; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-why { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.lib-meta { font-size: 0.72rem; color: var(--text-dim); margin-top: 0.15rem; font-family: var(--mono); }
.lib-go { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 640px) {
  .lib-row { flex-wrap: wrap; }
  .lib-thumb { width: 72px; height: 40px; }
  .lib-go { width: 100%; }
}

.safety-line {
  margin-top: 0.75rem; padding: 0.6rem 0.7rem; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,0.02); font-size: 0.75rem;
}
.safety-line.ok { border-color: rgba(52, 211, 153, 0.4); background: rgba(52,211,153,0.06); }
.safety-line.warn { border-color: rgba(251, 191, 36, 0.45); background: rgba(251,191,36,0.07); }
.sl-head { font-weight: 700; color: #fff; margin-bottom: 0.4rem; }
.sl-body { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.4rem; }
.sl-tag {
  padding: 0.15rem 0.45rem; border-radius: 999px; background: rgba(52,211,153,0.14);
  color: #6ee7b7; font-size: 0.68rem; font-weight: 600;
}
.sl-tag.off { background: rgba(148,163,184,0.14); color: var(--text-dim); }
.sl-foot { color: var(--text-dim); line-height: 1.45; }
.sl-warn { color: #fbbf24; }

/* Performance page */
.perf-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; margin-bottom: 1.25rem; }
.perf-kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px; padding: 0.9rem 1rem; }
.perf-kpi-n { font-size: 1.6rem; font-weight: 800; letter-spacing: -0.03em; }
.perf-kpi-l { font-size: 0.78rem; color: var(--text-muted); margin-top: 0.15rem; }
.perf-table-wrap { overflow-x: auto; }
.perf-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.perf-table th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim); font-weight: 700; padding: 0.55rem 0.7rem; border-bottom: 1px solid var(--border); }
.perf-table th.num, .perf-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.perf-table td { padding: 0.7rem 0.7rem; border-bottom: 1px solid var(--border); }
.perf-table tr:hover td { background: rgba(255,255,255,0.02); }
.perf-title { color: var(--text); font-weight: 600; text-decoration: none; }
.perf-title:hover { color: #c4b5fd; text-decoration: underline; }
.perf-pct { font-weight: 800; }
.perf-pct.hi { color: #34e57e; } .perf-pct.mid { color: #fbbf24; } .perf-pct.lo { color: #cbd5e1; }
.perf-pending { color: var(--text-dim); font-size: 0.8rem; }
@media (max-width: 640px) { .perf-summary { grid-template-columns: repeat(2, 1fr); } }

/* Catalyst lessons + diagnosis */
.lessons-body { display: flex; flex-direction: column; gap: 0.5rem; }
.lesson { background: linear-gradient(180deg, rgba(139,92,246,0.10), rgba(139,92,246,0.03)); border: 1px solid rgba(139,92,246,0.28); border-radius: 12px; padding: 0.65rem 0.85rem; font-size: 0.9rem; line-height: 1.4; }
.btn-why { font-size: 0.78rem; padding: 0.3rem 0.6rem; white-space: nowrap; }
.diag-spin { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.15); border-top-color: var(--accent); animation: pciSpin 0.8s linear infinite; }
.diag-head { display: flex; align-items: center; gap: 0.9rem; margin-bottom: 0.5rem; }
.diag-score { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.diag-score.hi { color: #34e57e; } .diag-score.mid { color: #fbbf24; } .diag-score.lo { color: #f87171; }
.diag-verdict { font-size: 0.92rem; font-weight: 600; margin-top: 0.2rem; }
.diag-verdict.hi { color: #34e57e; } .diag-verdict.mid { color: #fbbf24; } .diag-verdict.lo { color: #fca5a5; }
.diag-ins { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.6rem 0 0.4rem; }
.diag-ins .ins { font-size: 0.8rem; color: var(--text-muted); background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.diag-ins .ins b { color: var(--text); }
.diag-why { color: var(--text); font-size: 0.95rem; line-height: 1.5; }
.diag-fixes { margin: 0.35rem 0 0; padding-left: 1.1rem; display: flex; flex-direction: column; gap: 0.4rem; }
.diag-fixes li { color: var(--text); font-size: 0.92rem; line-height: 1.45; }

/* Projects bar (multiple open projects) */
.projects-bar { display: flex; align-items: center; gap: 0.7rem; margin: -0.3rem 0 1rem; }
.pb-label { font-size: 0.74rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); white-space: nowrap; }
.pb-all { font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; text-decoration: none; flex-shrink: 0; }
.pb-all:hover { color: var(--text); }
.pb-list { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.2rem; }
.pb-chip {
  display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 999px;
  padding: 0.4rem 0.8rem; color: var(--text-muted); font-size: 0.83rem; font-weight: 600; cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}
.pb-chip:hover { border-color: var(--border-strong); color: var(--text); }
.pb-chip.active { border-color: var(--accent); color: #fff; box-shadow: 0 0 0 1px rgba(139,92,246,0.4); background: linear-gradient(180deg, rgba(139,92,246,0.14), var(--bg-card)); }
.pb-title { max-width: 15ch; overflow: hidden; text-overflow: ellipsis; }
.pb-count { font-size: 0.7rem; background: rgba(255,255,255,0.08); border-radius: 999px; padding: 1px 7px; color: var(--text); }
.pb-dot { width: 7px; height: 7px; border-radius: 50%; flex: 0 0 auto; }
.pb-dot.ready { background: var(--success); }
.pb-dot.busy { background: var(--accent-3); animation: pbPulse 1s ease-in-out infinite; }
@keyframes pbPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

/* ===== Studio edit-style (effects) presets ===== */
.fx-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.5rem; margin-top: 0.5rem;
}
.fx-preset {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0.25rem;
  padding: 0.65rem 0.7rem; border-radius: 12px; text-align: left;
  border: 1px solid var(--border); background: var(--bg-card);
  color: var(--text-muted); cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.fx-preset:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.fx-preset.active { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(139,92,246,0.45); }
.fx-preset.active .fx-name { color: #fff; }
.fx-name { font-size: 0.86rem; font-weight: 700; color: var(--text); }
.fx-name em {
  font-style: normal; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--accent); margin-left: 0.35rem;
  border: 1px solid var(--accent); border-radius: 999px; padding: 0.05rem 0.35rem;
}
.fx-hint { font-size: 0.74rem; line-height: 1.35; color: var(--text-dim); }
