/* clipchute — light theme, violet brand (2026-08-19 redesign)
   Brand: violet #7c3aed, gradient to fuchsia #d946ef. Light surfaces, zinc text.
   Design language: pill CTAs with brand glow, kicker labels, alternating bands,
   card hover lift — pattern inspiration from brandmic, zero shared code/assets. */

:root {
  --bg: #ffffff;
  --alt: #fafafa;
  --panel: #ffffff;
  --border: #e4e4e7;
  --text: #18181b;
  --muted: #52525b;
  --faint: #a1a1aa;
  --brand: #7c3aed;
  --brand-hover: #8b5cf6;
  --brand-2: #d946ef;
  --brand-soft: rgba(124, 58, 237, 0.08);
  --brand-glow: rgba(124, 58, 237, 0.25);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
}

/* Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 1px 0 var(--border), 0 8px 32px rgba(24, 24, 27, 0.08);
}

.site-nav {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.brand .brand-accent { color: var(--brand); }

.nav-links {
  display: flex;
  align-items: center;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 1.25rem;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active:not(.cta) {
  color: var(--text);
  background: var(--brand-soft);
}

.nav-links a.cta {
  background: var(--brand);
  color: #fff;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  box-shadow: 0 4px 14px var(--brand-glow);
}

.nav-links a.cta:hover { background: var(--brand-hover); color: #fff; }

/* Mobile nav burger + panel */
.nav-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.nav-burger span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-header.is-open .nav-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.site-header.is-open .nav-burger span:nth-child(2) { opacity: 0; }
.site-header.is-open .nav-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  height: calc(100vh - 65px);
  background: var(--bg);
  flex-direction: column;
  padding: 1.5rem;
  gap: 0.25rem;
  z-index: 49;
  border-top: 1px solid var(--border);
  overflow-y: auto;
}

.site-header.is-open .nav-mobile { display: flex; }

.nav-mobile a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 0.85rem 1rem;
  border-radius: 8px;
}

.nav-mobile a:hover { color: var(--text); background: var(--alt); }
.nav-mobile a.active:not(.cta) { color: var(--text); background: var(--brand-soft); }

.nav-mobile a.cta {
  background: var(--brand);
  color: #fff;
  text-align: center;
  margin-top: 0.5rem;
}

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.flash-messages {
  max-width: 1080px;
  margin: 1rem auto 0;
  padding: 0 1.5rem;
}

.flash {
  background: var(--brand-soft);
  border: 1px solid var(--brand);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text);
}

/* Buttons */
a.cta, button.cta {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  border: none;
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 24px var(--brand-glow);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

a.cta:hover, button.cta:hover {
  background: var(--brand-hover);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px var(--brand-glow);
}

a.secondary {
  display: inline-block;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.8rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

a.secondary:hover { border-color: var(--faint); transform: translateY(-2px); }

/* Hero */
.hero {
  position: relative;
  text-align: center;
  padding: 3rem 0 4rem;
}

.hero::before {
  content: "";
  position: absolute;
  top: -6rem;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  max-width: 100%;
  height: 480px;
  background: radial-gradient(ellipse at center, var(--brand-soft) 0%, rgba(217, 70, 239, 0.05) 45%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 1.25rem;
}

.grad {
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kicker {
  display: inline-block;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(124, 58, 237, 0.2);
  border-radius: 999px;
  padding: 0.35rem 1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.lede {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 640px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Stat bar */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0;
  margin: 1rem 0 3.5rem;
  background: var(--alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.stat {
  padding: 2rem 1.5rem;
  text-align: center;
}

.stat + .stat { border-left: 1px solid var(--border); }

.stat-number {
  font-size: 2.25rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text);
}

.stat p { color: var(--muted); margin: 0.5rem 0 0; font-size: 0.95rem; }

/* Sections */
.process, .why, .personas, .feature-list-section, .pricing-section { margin: 4rem 0; }
#how-it-works, #features, #pricing { scroll-margin-top: 90px; }
.process h2, .why h2, .personas h2, .roadmap h2, .closer h2, .feature-list-section h2, .pricing-section h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  margin-bottom: 2rem;
}

.pricing-note { text-align: center; margin-top: -1.25rem; }

/* Steps */
.steps { list-style: none; padding: 0; counter-reset: step; max-width: 720px; margin: 0 auto; }
.steps li {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem 1.25rem 4.25rem;
  margin-bottom: 1rem;
  position: relative;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  counter-increment: step;
}

.steps li:hover {
  border-color: rgba(124, 58, 237, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 1.25rem;
  top: 1.35rem;
  width: 2rem;
  height: 2rem;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.95rem;
}

.steps h3 { margin: 0 0 0.35rem; font-size: 1.05rem; }
.steps p { color: var(--muted); margin: 0; font-size: 0.95rem; }

/* Cards */
.highlights, .feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.highlight, .feature {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.highlight:hover, .feature:hover {
  border-color: rgba(124, 58, 237, 0.35);
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07);
}

.highlight h3, .feature h3 { margin-top: 0; font-size: 1.05rem; }
.highlight p, .feature p { color: var(--muted); margin-bottom: 0; font-size: 0.95rem; }

/* Persona chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }
.chip {
  background: var(--alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
  cursor: default;
}

.chip:hover {
  border-color: rgba(124, 58, 237, 0.4);
  color: var(--text);
  transform: translateY(-2px);
}

/* Roadmap band */
.roadmap {
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.06), rgba(217, 70, 239, 0.05));
  border: 1px solid rgba(124, 58, 237, 0.25);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  margin: 4rem 0;
  text-align: center;
}

.roadmap-label {
  display: inline-block;
  color: var(--brand);
  background: #fff;
  border: 1px solid rgba(124, 58, 237, 0.35);
  border-radius: 999px;
  padding: 0.25rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 1rem;
}

.roadmap p { color: var(--muted); max-width: 640px; margin: 0 auto; }
.roadmap p.roadmap-label { color: var(--brand); }

/* Closer */
.closer {
  text-align: center;
  padding: 3.5rem 1.5rem;
  margin: 4rem -1.5rem 0;
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.07), rgba(217, 70, 239, 0.03) 60%, transparent);
  border-top: 1px solid rgba(124, 58, 237, 0.12);
}

.closer h2 { margin-bottom: 2rem; }

/* Page headers */
.page-header { margin-bottom: 2rem; text-align: center; }
.page-header h1 { margin-bottom: 0.5rem; font-weight: 900; letter-spacing: -0.02em; }

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.price-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.price-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.07); }

.price-card.featured {
  border-color: rgba(124, 58, 237, 0.45);
  box-shadow: 0 12px 32px var(--brand-glow);
}

.price-card.featured::before {
  content: "Most Popular";
  position: absolute;
  top: -0.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.9rem;
  border-radius: 999px;
}

.price-card h3 { margin-top: 0; }
.price-card .price { font-size: 2rem; font-weight: 900; margin: 0.25rem 0; }
.price-card .videos { color: var(--muted); margin-bottom: 1.5rem; }

.guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 2rem auto 0;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 600;
}
.guarantee-icon { font-size: 1.1rem; }

/* Auth forms */
.auth-form {
  max-width: 380px;
  margin: 0 auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}

.auth-form h1 { margin-top: 0; text-align: center; font-weight: 900; }
.auth-form form { display: flex; flex-direction: column; gap: 0.35rem; }
.auth-form label { font-size: 0.9rem; color: var(--muted); margin-top: 0.6rem; }
.auth-form input {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.75rem;
  color: var(--text);
  font-size: 1rem;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

.auth-form button { margin-top: 1.25rem; }
.auth-form p { text-align: center; color: var(--muted); font-size: 0.9rem; }
.auth-form p a { color: var(--brand); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--faint);
  font-size: 0.85rem;
  padding: 1.75rem;
  margin-top: 3rem;
}

@media (max-width: 640px) {
  .hero h1 { font-size: 2.1rem; }
  .stat + .stat { border-left: none; border-top: 1px solid var(--border); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a.cta, button.cta, a.secondary, .steps li, .highlight, .feature, .chip, .price-card {
    transition: none;
  }
}


/* ===== Logged-in app (dashboard) ===== */
.dash-wrap{max-width:960px;margin:0 auto;padding:48px 24px 80px}
.dash-title{font-size:2rem;font-weight:800;letter-spacing:-0.02em;margin:10px 0 22px}
.paste-form{display:flex;gap:10px;flex-wrap:wrap}
.paste-form input[type=url]{flex:1;min-width:260px;padding:13px 18px;border:1px solid var(--border);border-radius:999px;font-size:1rem;background:var(--panel);color:var(--text)}
.paste-form input[type=url]:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.paste-hint{color:var(--muted);font-size:.9rem;margin-top:10px}
.dash-sub{font-size:1.15rem;font-weight:700;margin:40px 0 14px}
.joblist{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:10px}
.job-row a{display:flex;align-items:center;gap:14px;padding:14px 18px;border:1px solid var(--border);border-radius:14px;background:var(--panel);text-decoration:none;color:var(--text);transition:border-color .15s,box-shadow .15s}
.job-row a:hover{border-color:var(--brand);box-shadow:0 4px 18px var(--brand-soft)}
.job-url{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.95rem}
.job-meta{color:var(--faint);font-size:.85rem;white-space:nowrap}
.empty{color:var(--muted);padding:28px;border:1px dashed var(--border);border-radius:14px;text-align:center}
.badge{display:inline-flex;align-items:center;padding:3px 11px;border-radius:999px;font-size:.75rem;font-weight:600;white-space:nowrap;text-transform:capitalize}
.badge-queued,.badge-pending{background:#fef3c7;color:#92400e;box-shadow:inset 0 0 0 1px #fcd34d}
.badge-downloading,.badge-transcribing,.badge-scoring,.badge-rendering{background:#dbeafe;color:#1e40af;box-shadow:inset 0 0 0 1px #93c5fd}
.badge-ready_for_review,.badge-approved{background:#d1fae5;color:#065f46;box-shadow:inset 0 0 0 1px #6ee7b7}
.badge-failed,.badge-rejected{background:#fee2e2;color:#991b1b;box-shadow:inset 0 0 0 1px #fca5a5}
.badge-needs_edit{background:#e0e7ff;color:#3730a3;box-shadow:inset 0 0 0 1px #a5b4fc}
.badge-scheduled{background:#dbeafe;color:#1e40af;box-shadow:inset 0 0 0 1px #93c5fd}
.badge-published{background:#d1fae5;color:#065f46;box-shadow:inset 0 0 0 1px #6ee7b7}
.badge-publish_failed{background:#fee2e2;color:#991b1b;box-shadow:inset 0 0 0 1px #fca5a5}
.badge-unscheduled{background:#f4f4f5;color:#52525b;box-shadow:inset 0 0 0 1px #d4d4d8}
.calendar-row{flex-wrap:wrap}
.reschedule-form{display:flex;gap:8px;align-items:center;margin-left:auto}
.reschedule-form input{padding:6px 10px;border:1px solid var(--border);border-radius:8px;font-size:.82rem}
.calendar-error{width:100%;color:#991b1b;font-size:.8rem;margin-top:4px}
.settings-wrap h2.dash-sub:first-of-type{margin-top:24px}
.cadence-form{display:flex;gap:12px;align-items:center;margin:14px 0 28px}
.cadence-form input[type=number]{width:100px;padding:9px 12px;border:1px solid var(--border);border-radius:10px;font-size:.9rem}
.publish-settings-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin-top:14px}
.platform-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:12px;margin-top:14px}
.platform-card{display:flex;align-items:center;gap:12px;border:1px solid var(--border);border-radius:14px;background:var(--panel);padding:14px 16px;transition:border-color .15s,box-shadow .15s}
.platform-card:hover{border-color:var(--brand);box-shadow:0 4px 16px rgba(24,24,27,.06)}
.platform-card.is-connected{border-color:var(--brand-soft);background:var(--brand-soft)}
.platform-dot{width:10px;height:10px;border-radius:50%;flex-shrink:0}
.platform-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.platform-name{font-weight:600;font-size:.92rem}
.platform-status{font-size:.78rem;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.platform-status.is-connected{color:#16a34a;font-weight:600}
.platform-connect-btn{flex-shrink:0;text-decoration:none}
.publish-settings-card{border:1px solid var(--border);border-radius:14px;background:var(--panel);padding:16px;display:flex;flex-direction:column;gap:8px}
.publish-settings-card h3{margin:0;text-transform:capitalize;font-size:1rem}
.publish-settings-card textarea{width:100%;padding:8px 10px;border:1px solid var(--border);border-radius:10px;font-size:.85rem;font-family:inherit;color:var(--text);background:var(--panel);resize:vertical}
.job-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:14px 0 4px}
.job-head h1{font-size:1.35rem;font-weight:800;margin:0;overflow-wrap:anywhere}
.back-link{color:var(--brand);text-decoration:none;font-size:.9rem}
.back-link:hover{text-decoration:underline}
.job-error{background:#fee2e2;color:#991b1b;border:1px solid #fca5a5;border-radius:12px;padding:12px 16px;margin:14px 0;font-size:.9rem;overflow-wrap:anywhere}
.log-panel{margin:22px 0;border:1px solid var(--border);border-radius:14px;background:var(--panel)}
.log-panel summary{cursor:pointer;padding:13px 18px;font-weight:600;font-size:.95rem}
.log-panel ul{list-style:none;margin:0;padding:4px 18px 14px;max-height:320px;overflow-y:auto}
.log-panel li{font-size:.83rem;color:var(--muted);padding:4px 0;border-top:1px solid var(--alt);display:flex;gap:10px}
.log-step{color:var(--brand);font-weight:600;white-space:nowrap}
.log-at{color:var(--faint);white-space:nowrap;margin-left:auto}
.clip-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(290px,1fr));gap:16px;margin-top:14px}
.clip-card{border:1px solid var(--border);border-radius:16px;background:var(--panel);padding:18px;display:flex;flex-direction:column;gap:10px}
.clip-top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.clip-range{font-weight:700;font-size:.95rem}
.clip-reason{color:var(--faint);font-size:.78rem}
.clip-text{color:var(--muted);font-size:.88rem;line-height:1.5;max-height:96px;overflow:hidden;margin:0}
.review-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:auto;align-items:center}
.review-actions form{display:inline}
.btn-sm{padding:7px 14px;border-radius:999px;border:1px solid var(--border);background:var(--panel);color:var(--text);font-size:.82rem;font-weight:600;cursor:pointer;transition:all .15s}
.btn-approve:hover{border-color:#059669;color:#065f46;background:#d1fae5}
.btn-edit:hover{border-color:#6366f1;color:#3730a3;background:#e0e7ff}
.btn-reject:hover{border-color:#dc2626;color:#991b1b;background:#fee2e2}
.btn-download{padding:8px 16px;border-radius:999px;background:var(--brand);color:#fff;font-size:.82rem;font-weight:600;text-decoration:none;display:inline-flex;align-items:center}
.btn-download:hover{background:var(--brand-hover)}
.progress-note{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.9rem;margin:14px 0}
.spinner{width:14px;height:14px;border:2px solid var(--brand-soft);border-top-color:var(--brand);border-radius:50%;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
@media (max-width:640px){.dash-wrap{padding:28px 16px 60px}}

.auth-note{color:var(--muted);font-size:.88rem;line-height:1.55;margin:10px 0}

.paste-form-wrap{display:flex;flex-direction:column;gap:8px}
.topic-input{padding:11px 18px;border:1px solid var(--border);border-radius:999px;font-size:.88rem;background:var(--panel);color:var(--text)}
.topic-input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.caption-fix{margin-top:8px}
.caption-fix summary{cursor:pointer;color:var(--muted);font-size:.85rem}
.caption-fix textarea{width:100%;padding:8px 10px;margin-top:6px;border:1px solid var(--border);border-radius:10px;font-size:.85rem;line-height:1.5;color:var(--text);background:var(--panel);resize:vertical}
.caption-fix .btn-sm{margin-top:6px}

/* ===== Direct file upload intake (BR-015 supersession, 2026-08-21) ===== */
.upload-form-wrap{display:flex;flex-direction:column;gap:10px}
.upload-dropzone{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  border:2px dashed var(--border);border-radius:18px;background:var(--alt);
  padding:36px 20px;text-align:center;cursor:pointer;
  transition:border-color .15s,background .15s,box-shadow .15s;
}
.upload-dropzone:hover{border-color:var(--brand);background:var(--brand-soft)}
.upload-dropzone.dragover{border-color:var(--brand);background:var(--brand-soft);box-shadow:0 0 0 3px var(--brand-soft)}
.upload-dz-text{font-weight:700;font-size:1rem;color:var(--text)}
.upload-dz-hint{color:var(--faint);font-size:.82rem}
.upload-file-input-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.intake-alt{margin-top:18px;border:1px solid var(--border);border-radius:14px;background:var(--panel);padding:4px 18px}
.intake-alt summary{cursor:pointer;padding:11px 0;font-weight:600;font-size:.88rem;color:var(--muted)}
.intake-alt .paste-form-wrap{margin:6px 0 14px}
/* Sidebar redesign (2026-08-30, Report B-5, BR-029): Studio -> Clips and
   Settings -> Connections cross-links, after the job list / connect grid
   moved to their own pages. */
.dash-jobs-link{margin-top:32px}

/* ===== Dashboard redesign (2026-08-29, Top-10 Dominance pass, CHECKLIST-REPORTS
   Report B-3) -- thumbnail-first clip cards, status-dot + color (not text-only)
   badges, honest same-job relative score bar instead of a bare/fake-precise
   number, and an at-a-glance status roll-up no researched competitor shows
   because none of them are autonomous-by-default (BR-020). ===== */

.status-dot{display:inline-block;width:6px;height:6px;border-radius:50%;background:currentColor;margin-right:6px;vertical-align:middle}

.dash-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:4px 0 32px}
.dstat{display:flex;flex-direction:column;gap:2px;border:1px solid var(--border);border-left:4px solid var(--border);border-radius:12px;background:var(--panel);padding:14px 16px}
.dstat-n{font-size:1.6rem;font-weight:900;letter-spacing:-0.02em}
.dstat-label{color:var(--muted);font-size:.82rem;font-weight:600}
.dstat-published{border-left-color:#059669}
.dstat-published .dstat-n{color:#065f46}
.dstat-scheduled{border-left-color:#3b82f6}
.dstat-scheduled .dstat-n{color:#1e40af}
.dstat-progress{border-left-color:var(--brand)}
.dstat-progress .dstat-n{color:var(--brand)}
.dstat-attention{border-left-color:#dc2626}
.dstat-attention .dstat-n{color:#991b1b}
.dstat-attention-clear{border-left-color:#d4d4d8}
.dstat-attention-clear .dstat-n{color:var(--faint)}

.job-thumb{width:48px;height:64px;object-fit:cover;border-radius:8px;flex-shrink:0;background:var(--alt);vertical-align:middle;margin-right:14px}
.job-thumb-empty{display:inline-flex;align-items:center;justify-content:center;color:var(--faint);font-size:.75rem;font-weight:700;border:1px dashed var(--border);box-sizing:border-box}
.calendar-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px 14px;padding:14px 18px;border:1px solid var(--border);border-radius:14px;background:var(--panel)}
.calendar-row .job-thumb{margin-right:0}
.calendar-row .reschedule-form{display:flex;gap:8px;align-items:center;width:100%}

.empty-first-run{display:flex;flex-direction:column;gap:8px;text-align:center;padding:36px 24px}
.empty-title{font-weight:800;font-size:1.1rem;color:var(--text);margin:0}
.empty-first-run p:not(.empty-title){margin:0;color:var(--muted)}

.clip-thumb-wrap{position:relative;border-radius:12px;overflow:hidden;background:var(--alt);aspect-ratio:9/16}
.clip-thumb{width:100%;height:100%;object-fit:cover;display:block}
.clip-thumb-empty{width:100%;height:100%;display:flex;align-items:center;justify-content:center;color:var(--faint);font-size:.85rem;background:var(--alt)}
.rank-flag{position:absolute;top:8px;left:8px;background:rgba(24,24,27,.72);color:#fff;font-size:.72rem;font-weight:700;padding:3px 10px;border-radius:999px}
.rank-flag-top{background:var(--brand)}

.score-row{display:flex;align-items:center;gap:10px}
.score-bar-wrap{flex-shrink:0;width:64px;height:6px;border-radius:999px;background:var(--alt);overflow:hidden}
.score-bar-fill{height:100%;background:linear-gradient(90deg,var(--brand),var(--brand-2));border-radius:999px}

@media (max-width:640px){
  .clip-thumb-wrap{aspect-ratio:auto;height:200px}
}

/* ===== Authenticated app shell — persistent left sidebar (BR-027, 2026-08-30)
   Top-10 research (OpusClip, Klap, Vidyo.ai/Quso, Submagic, Vizard + Linear/
   Stripe/Vercel-class SaaS): every credible dashboard uses a fixed ~240px left
   sidebar for primary nav, collapsing to an off-canvas drawer on narrow
   viewports -- never a flat top-nav bar once a user is inside the app. ===== */

body.app-body{background:var(--alt);min-height:100vh}

.app-sidebar{
  position:fixed;top:0;left:0;bottom:0;width:240px;
  background:var(--panel);border-right:1px solid var(--border);
  display:flex;flex-direction:column;padding:22px 14px;z-index:60;overflow-y:auto;
}

.app-brand{display:block;font-weight:900;font-size:1.25rem;letter-spacing:-0.02em;color:var(--text);text-decoration:none;padding:4px 10px 26px}
.app-brand .brand-accent{color:var(--brand)}

.app-nav{display:flex;flex-direction:column;gap:2px;flex:1}

.app-nav-link{display:flex;align-items:center;gap:11px;color:var(--muted);text-decoration:none;font-weight:600;font-size:.92rem;padding:10px 12px;border-radius:10px;transition:color .15s ease,background .15s ease}
.app-nav-link:hover{color:var(--text);background:var(--alt)}
.app-nav-link.active{color:var(--brand);background:var(--brand-soft)}
.app-nav-icon{width:18px;height:18px;flex-shrink:0}

.app-sidebar-footer{border-top:1px solid var(--border);margin-top:10px;padding-top:10px;display:flex;flex-direction:column;gap:4px}
.app-user-email{color:var(--faint);font-size:.78rem;padding:0 12px 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.app-logout:hover{color:#991b1b;background:#fee2e2}

.app-burger{
  display:none;position:fixed;top:14px;left:14px;z-index:70;
  flex-direction:column;justify-content:center;gap:5px;width:40px;height:40px;
  background:var(--panel);border:1px solid var(--border);border-radius:8px;
  box-shadow:0 2px 10px rgba(24,24,27,.08);cursor:pointer;
}
.app-burger span{display:block;width:18px;height:1.5px;background:var(--text);border-radius:2px;margin:0 auto}

.app-scrim{display:none;position:fixed;inset:0;background:rgba(24,24,27,.4);z-index:55}
.app-scrim.is-open{display:block}

.app-main{margin:0 0 0 240px;max-width:none;padding:32px 32px 80px;min-height:100vh}
.app-main .dash-wrap{max-width:880px;margin:0;padding:0}
.app-flash{margin-left:240px;max-width:none;padding:16px 32px 0}

@media (max-width:900px){
  .app-sidebar{transform:translateX(-100%);transition:transform .25s ease;box-shadow:0 0 40px rgba(0,0,0,.15)}
  .app-sidebar.is-open{transform:translateX(0)}
  .app-burger{display:flex}
  .app-main{margin-left:0;padding:76px 20px 60px}
  .app-flash{margin-left:0;padding:0 20px;margin-top:66px}
}
