/* =============================================================================
   AI Video Editor. Design system.
   Desktop-first (slim sidebar + capped content column + card grids); the mobile
   layout stacks and the sidebar becomes a drawer. Calm dark canvas with a single
   amber accent, glass cards, soft glows, spring pop-ins. Dark AND light themes
   are both first-class (data-theme on <html>, persisted). No em-dashes anywhere.
   ========================================================================== */

/* ---- theme tokens -------------------------------------------------------- */
:root, [data-theme='dark'] {
  --canvas: #0b0b10;
  --canvas-2: #0d0d14;
  --card: #14141d;
  --card-2: #1a1a25;
  --card-3: #202030;
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.13);

  --text: #f4f4f6;
  --text-muted: #b6b6c2;
  --text-dim: #7c7c8a;

  --accent: #fbbf24;                 /* the single brand accent, amber */
  --accent-2: #f59e0b;
  --accent-grad: linear-gradient(135deg, #fbbf24, #f59e0b);
  --accent-ink: #17130a;             /* text on amber */
  --accent-soft: rgba(251, 191, 36, 0.13);

  --ok: #34d399;      --ok-soft: rgba(52, 211, 153, 0.13);
  --info: #60a5fa;    --info-soft: rgba(96, 165, 250, 0.13);
  --violet: #a78bfa;  --violet-soft: rgba(167, 139, 250, 0.14);
  --coral: #fb7185;   --coral-soft: rgba(251, 113, 133, 0.14);
  --teal: #2dd4bf;    --teal-soft: rgba(45, 212, 191, 0.14);
  --danger: #f87171;  --danger-soft: rgba(248, 113, 113, 0.13);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-pop: 0 22px 60px rgba(0, 0, 0, 0.55);
  --glow: 0 0 26px rgba(251, 191, 36, 0.20);
  --scrim: rgba(4, 4, 8, 0.62);

  --radius: 12px;
  --radius-lg: 16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --sidebar-w: 236px;
  --content-max: 1120px;
  --ease-spring: cubic-bezier(.34, 1.4, .5, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

[data-theme='light'] {
  --canvas: #eef1f7;
  --canvas-2: #e9edf5;
  --card: #ffffff;
  --card-2: #f4f6fb;
  --card-3: #eaeef6;
  --border: rgba(20, 28, 54, 0.09);
  --border-strong: rgba(20, 28, 54, 0.16);

  --text: #12141c;
  --text-muted: #55606f;
  --text-dim: #8a93a3;

  --accent: #d97706;                 /* amber reads warmer/darker on light */
  --accent-2: #b45309;
  --accent-grad: linear-gradient(135deg, #f59e0b, #d97706);
  --accent-ink: #ffffff;
  --accent-soft: rgba(217, 119, 6, 0.12);

  --ok: #059669;      --ok-soft: rgba(5, 150, 105, 0.11);
  --info: #2563eb;    --info-soft: rgba(37, 99, 235, 0.10);
  --violet: #7c3aed;  --violet-soft: rgba(124, 58, 237, 0.11);
  --coral: #e11d48;   --coral-soft: rgba(225, 29, 72, 0.10);
  --teal: #0d9488;    --teal-soft: rgba(13, 148, 136, 0.11);
  --danger: #dc2626;  --danger-soft: rgba(220, 38, 38, 0.09);

  --shadow-card: 0 6px 22px rgba(20, 28, 54, 0.07);
  --shadow-pop: 0 26px 60px rgba(20, 28, 54, 0.20);
  --glow: none;
  --scrim: rgba(20, 28, 54, 0.34);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--canvas);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.015em; }
.num { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =============================================================================
   APP SHELL
   ========================================================================== */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh; z-index: 40;
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 14px 14px;
  border-right: 1px solid var(--border);
  background: color-mix(in srgb, var(--canvas-2) 74%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.logo { display: flex; align-items: center; gap: 11px; padding: 6px 8px 14px; min-width: 0; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--accent-grad); color: var(--accent-ink); box-shadow: var(--glow);
}
.logo-mark svg { width: 20px; height: 20px; }
.logo-text { min-width: 0; }
.logo-name { display: block; font-weight: 800; font-size: 15.5px; letter-spacing: -0.01em; line-height: 1.15; white-space: nowrap; }
.logo-sub { display: block; font-size: 11px; color: var(--text-dim); line-height: 1.1; white-space: nowrap; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: 10px;
  color: var(--text-muted); font-weight: 550; font-size: 14px;
  transition: background 0.16s ease, color 0.16s ease;
}
.nav-item:hover { background: var(--card-2); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--text); font-weight: 650; }
.nav-ico { display: grid; place-items: center; width: 20px; height: 20px; flex: none; opacity: 0.85; }
.nav-ico svg { width: 20px; height: 20px; }
.nav-item.active .nav-ico { color: var(--accent); opacity: 1; }

.side-foot { display: flex; flex-direction: column; gap: 10px; padding: 12px 10px 4px; border-top: 1px solid var(--border); margin-top: 6px; }
.runtime-pill { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.runtime-pill .dot { width: 7px; height: 7px; border-radius: 99px; background: var(--ok); box-shadow: 0 0 0 0 rgba(52,211,153,0.5); animation: pulse-dot 2.4s infinite; flex: none; }
/* Powered-by: the single brand credit (sidebar only). Real Brevibot logo, same
   inline SVG mark as the AI Employees dashboard. The footer duplicate is gone. */
.powered-link { display: flex; flex-direction: row; align-items: center; gap: 7px; text-decoration: none; color: var(--text-muted); transition: color 150ms ease; }
.powered-link:hover { color: var(--text); }
.powered-label { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
.brevibot-logo { height: 18px; width: auto; color: var(--text); flex: none; }

.main { min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 22px;
  background: color-mix(in srgb, var(--canvas) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.hamburger { display: none; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card); color: var(--text); cursor: pointer; }
.topbar-title { font-size: 16px; font-weight: 750; letter-spacing: -0.01em; }
.topbar-spacer { flex: 1; }
.demo-ribbon { font-size: 11px; font-weight: 700; letter-spacing: 0.02em; color: var(--accent); background: var(--accent-soft); border: 1px solid transparent; border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
@media (max-width: 480px) { .demo-ribbon { display: none; } }
.stamp { font-size: 11px; color: var(--text-dim); white-space: nowrap; }
@media (max-width: 560px) { .stamp { display: none; } }
.theme-toggle { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card); color: var(--text-muted); cursor: pointer; transition: color 0.14s, border-color 0.14s; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle .ico-sun { display: none; }
.theme-toggle .ico-moon { display: block; }
[data-theme='light'] .theme-toggle .ico-sun { display: block; }
[data-theme='light'] .theme-toggle .ico-moon { display: none; }

.content { flex: 1; width: 100%; max-width: var(--content-max); margin: 0 auto; padding: 26px 22px 20px; }

.app-foot { max-width: var(--content-max); margin: 0 auto; width: 100%; padding: 18px 22px 26px; display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--border); }
.foot-note { font-size: 12px; color: var(--text-dim); flex: 1; }

.scrim { position: fixed; inset: 0; z-index: 35; background: var(--scrim); backdrop-filter: blur(2px); }

/* mobile: sidebar becomes a drawer */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; width: 264px; height: 100dvh;
    transform: translateX(-106%); transition: transform 0.24s var(--ease-out);
    background: var(--canvas-2); border-right: 1px solid var(--border-strong); box-shadow: var(--shadow-pop); z-index: 60;
  }
  .sidebar.open { transform: none; }
  .hamburger { display: grid; }
  .content { padding: 20px 16px 16px; }
  .app-foot { padding: 16px; }
  /* Tap targets: at mobile widths the header controls and drawer rows must be at
     least 44px (WCAG 2.5.5 / platform guidance). The icons and header layout are
     unchanged; only the hit area grows. */
  .hamburger, .theme-toggle { width: 44px; height: 44px; flex: none; }
  .nav-item { min-height: 44px; padding-top: 11px; padding-bottom: 11px; }
}

/* =============================================================================
   PRIMITIVES  (cards, buttons, chips, inputs, toggles)
   ========================================================================== */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.card-pad { padding: 18px 20px; }
.glass { background: color-mix(in srgb, var(--card) 84%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.lift { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }
.lift:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow-pop); }

.page-head { margin: 2px 0 20px; }
.page-title { font-size: 22px; font-weight: 780; letter-spacing: -0.02em; }
.page-sub { font-size: 13.5px; color: var(--text-muted); margin-top: 5px; max-width: 68ch; line-height: 1.55; }
/* Page header row: title/sub on the left, the interface-tour pill on the right. */
.page-head-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.page-head-row .page-head-main { min-width: 0; }
@media (max-width: 620px) { .page-head-row { flex-direction: column; gap: 12px; } }

/* Interface-tour pill: an attention-drawing call to watch the walkthrough.
   Amber-tinted, soft pulsing glow, play glyph, and a "1 min" time chip. */
.tour-pill {
  flex: none; display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 14px 8px 10px; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 650; color: var(--accent);
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  -webkit-tap-highlight-color: transparent; white-space: nowrap;
  transition: transform 0.14s, background 0.14s, border-color 0.14s, box-shadow 0.14s;
  animation: tour-glow 2.8s ease-in-out infinite;
}
.tour-pill:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--accent) 18%, var(--card)); border-color: var(--accent); animation: none; box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 28%, transparent); }
.tour-pill:active { transform: translateY(0.5px); }
.tour-pill-play { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); flex: none; }
.tour-pill-play svg { width: 11px; height: 11px; margin-left: 1.5px; }
.tour-pill-time { font-size: 11px; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 16%, transparent); padding: 2px 8px; border-radius: 999px; letter-spacing: 0.01em; }
@media (max-width: 400px) { .tour-pill { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .tour-pill { animation: none; } }
.section-label { font-size: 11px; font-weight: 750; letter-spacing: 0.09em; text-transform: uppercase; color: var(--text-dim); margin: 24px 2px 12px; }
.section-label:first-child { margin-top: 4px; }

.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--border-strong); background: var(--card-2); color: var(--text);
  font: inherit; font-weight: 620; font-size: 14px; padding: 10px 15px; border-radius: 11px; cursor: pointer;
  min-height: 42px; -webkit-tap-highlight-color: transparent;
  transition: transform 0.14s, background 0.14s, border-color 0.14s, box-shadow 0.14s, filter 0.14s, opacity 0.14s;
}
.btn:hover:not(:disabled) { border-color: var(--text-dim); transform: translateY(-1px); }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn.primary { background: var(--accent-grad); color: var(--accent-ink); border-color: transparent; font-weight: 700; box-shadow: 0 4px 18px rgba(217, 119, 6, 0.28); }
.btn.primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.btn.warn { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.btn.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 7px 12px; font-size: 13px; border-radius: 9px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.02em;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap;
  background: var(--card-2); color: var(--text-muted); border: 1px solid transparent;
}
.chip .chip-dot { width: 6px; height: 6px; border-radius: 99px; background: currentColor; }
.chip.breathing .chip-dot { animation: pulse-dot 2.2s infinite; }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.warn { background: var(--accent-soft); color: var(--accent); }
.chip.violet { background: var(--violet-soft); color: var(--violet); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.neutral { background: var(--card-3); color: var(--text-dim); }

textarea, input[type='text'], input[type='datetime-local'], select {
  width: 100%; background: var(--card-2); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 10px 12px; font: inherit; font-size: 14px; resize: vertical;
  transition: border-color 0.14s, box-shadow 0.14s;
}
textarea:focus, input:focus, select:focus { outline: none; border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px var(--accent-soft); }
::placeholder { color: var(--text-dim); }
label.field { display: block; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 7px; }
.field-hint { font-size: 12px; color: var(--text-dim); margin-top: 6px; line-height: 1.5; }
/* Light theme: --text-dim (#8a93a3) on a white card is only 3.10:1 at this small
   size (below WCAG AA 4.5:1). Darken to #616a77 -> 5.47:1 on #fff, 5.06:1 on the
   #f4f6fb card. Dark theme is unchanged. */
[data-theme='light'] .field-hint { color: #616a77; }

/* switch (settings + toggles) */
.switch { position: relative; width: 42px; height: 24px; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch .tr { position: absolute; inset: 0; border-radius: 99px; background: var(--card-3); border: 1px solid var(--border-strong); transition: background 0.16s, border-color 0.16s; }
.switch .th { position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 99px; background: var(--text-muted); transition: transform 0.18s var(--ease-spring), background 0.18s; }
.switch input:checked ~ .tr { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 55%, transparent); }
.switch input:checked ~ .th { transform: translateX(18px); background: var(--accent); }

.notice { font-size: 13px; color: var(--accent); background: var(--accent-soft); border: 1px solid transparent; border-radius: 11px; padding: 12px 14px; line-height: 1.5; }
.notice.ok { color: var(--ok); background: var(--ok-soft); }
.notice.info { color: var(--info); background: var(--info-soft); }
.notice code { font-family: var(--mono); font-size: 12px; }

/* skeleton while a tab mounts */
.skeleton-block { height: 240px; border-radius: var(--radius-lg); background: linear-gradient(100deg, var(--card) 30%, var(--card-2) 50%, var(--card) 70%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border: 1px solid var(--border); }

/* toast */
.demo-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(16px);
  background: var(--card); color: var(--text); border: 1px solid var(--border-strong);
  font-size: 13px; font-weight: 550; padding: 12px 16px; border-radius: 12px;
  box-shadow: var(--shadow-pop); max-width: min(92vw, 460px); text-align: center;
  opacity: 0; pointer-events: none; transition: opacity 0.22s, transform 0.22s; z-index: 9999;
}
.demo-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* =============================================================================
   TABS
   ========================================================================== */
.tab-panel { animation: fade-up 0.34s var(--ease-out) both; }
.tab-panel[hidden] { display: none; }

/* the Gigi presence line, reused across tabs */
.gigi { display: flex; align-items: center; gap: 12px; }
.gigi-av { width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: var(--accent-ink); background: var(--accent-grad); box-shadow: var(--glow); overflow: hidden; position: relative; }
.gigi-av img { width: 100%; height: 100%; object-fit: cover; }
.gigi-av.working::after { content: ''; position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--ok); border: 2.5px solid var(--card); animation: pulse-dot 2.2s infinite; }
.gigi-lg .gigi-av { width: 48px; height: 48px; font-size: 19px; }
.gigi-name { font-weight: 700; font-size: 14px; }
.gigi-name b { color: var(--accent); font-weight: 700; }
.gigi-line { font-size: 13px; color: var(--text-muted); margin-top: 2px; line-height: 1.45; }

/* =============================================================================
   INPUT TAB  (upload surface + simulated upload + processing sequence)
   ========================================================================== */
.drop {
  display: block; cursor: pointer; text-align: center;
  border: 1.6px dashed var(--border-strong); border-radius: var(--radius-lg);
  padding: 38px 22px; background: var(--card);
  transition: border-color 0.16s, background 0.16s, transform 0.16s;
}
.drop:hover { border-color: color-mix(in srgb, var(--accent) 50%, var(--border-strong)); }
.drop.over { border-color: var(--accent); background: var(--accent-soft); transform: scale(1.006); }
.drop-ico { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 14px; color: var(--accent); background: var(--accent-soft); }
.drop-ico svg { width: 26px; height: 26px; }
.drop-title { display: block; font-weight: 700; font-size: 16px; }
.drop-sub { display: block; font-size: 13px; color: var(--text-dim); margin-top: 5px; }
.hidden-input { display: none; }

.uplist { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.upitem { background: var(--card-2); border: 1px solid var(--border); border-radius: 12px; padding: 11px 13px; animation: fade-up 0.3s ease both; }
.upitem-top { display: flex; align-items: center; gap: 10px; }
.upitem-name { font-size: 13.5px; font-weight: 560; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upitem-size { font-size: 11.5px; color: var(--text-dim); white-space: nowrap; }
.upitem-state { font-size: 11.5px; white-space: nowrap; color: var(--text-muted); }
.upitem-state.done { color: var(--ok); }
.upitem-state.err { color: var(--danger); }
.bar { height: 6px; border-radius: 999px; background: var(--card-3); overflow: hidden; margin-top: 9px; }
.bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width 0.2s; }
.upitem.done .bar > span { background: var(--ok); }
.batch-total { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 13px; color: var(--text-muted); font-weight: 600; }
.batch-total .bar { flex: 1; margin: 0 0 0 14px; height: 8px; }

.input-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .input-grid { grid-template-columns: 1fr; } }

/* processing sequence */
.proc-card { padding: 20px; }
.proc-steps { display: flex; flex-direction: column; gap: 12px; margin-top: 18px; }
.proc-step { display: flex; align-items: center; gap: 13px; font-size: 14px; color: var(--text-dim); transition: color 0.3s; }
.proc-step .pnum { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--card-3); color: var(--text-dim); font-size: 12px; font-weight: 700; transition: background 0.3s, color 0.3s; }
.proc-step.active { color: var(--text); }
.proc-step.active .pnum { background: var(--accent-soft); color: var(--accent); }
.proc-step.done { color: var(--text-muted); }
.proc-step.done .pnum { background: var(--ok-soft); color: var(--ok); }
.proc-step .pspin { width: 15px; height: 15px; border-radius: 50%; border: 2px solid var(--accent); border-top-color: transparent; animation: spin 0.8s linear infinite; margin-left: auto; }
.proc-step .pcheck { margin-left: auto; color: var(--ok); }

/* clip strip being scanned (shimmer sweep over the source thumbnails) */
.scan-strip { display: flex; gap: 10px; margin-top: 16px; overflow: hidden; }
.scan-thumb { position: relative; flex: 1; min-width: 0; aspect-ratio: 16 / 10; border-radius: 11px; overflow: hidden; border: 1px solid var(--border); background: var(--card-3) center/cover no-repeat; }
.scan-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, color-mix(in srgb, var(--accent) 45%, transparent) 50%, transparent 80%); background-size: 220% 100%; animation: shimmer 1.4s linear infinite; }
.scan-thumb .scan-line { position: absolute; left: 0; right: 0; top: 0; height: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: scan-y 2.1s ease-in-out infinite; }

/* sample input clips (proper video cards: poster + duration chip + filename) */
.inclips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
@media (max-width: 620px) { .inclips { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
.inclip { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--card); }
.inclip-media { position: relative; aspect-ratio: 3 / 4; background: var(--card-3) center/cover no-repeat; }
.inclip-media .play { position: absolute; inset: 0; margin: auto; width: 34px; height: 34px; border-radius: 50%; background: rgba(0,0,0,0.45); backdrop-filter: blur(4px); display: grid; place-items: center; color: #fff; }
.inclip-media .play svg { width: 15px; height: 15px; margin-left: 2px; }
.inclip-media .dur { position: absolute; bottom: 7px; right: 7px; font-size: 10px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.6); padding: 2px 6px; border-radius: 6px; font-variant-numeric: tabular-nums; }
.inclip-media .raw { position: absolute; top: 7px; left: 7px; font-size: 9px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: #fff; background: rgba(0,0,0,0.5); backdrop-filter: blur(4px); padding: 3px 7px; border-radius: 999px; }
.inclip-foot { padding: 8px 9px; }
.inclip-name { font-size: 11px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inclip-sub { font-size: 10.5px; color: var(--text-dim); margin-top: 2px; }

/* empty states */
.empty { text-align: center; padding: 46px 20px; }
.empty-art { width: 100%; max-width: 340px; margin: 0 auto 16px; aspect-ratio: 16 / 9; border-radius: 14px; background: var(--card-3) center/cover no-repeat; border: 1px solid var(--border); }
.empty-ico { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); }
.empty-ico svg { width: 26px; height: 26px; }
.empty-title { font-size: 16px; font-weight: 680; }
.empty-line { font-size: 13.5px; color: var(--text-dim); margin-top: 6px; max-width: 380px; margin-inline: auto; line-height: 1.55; }

/* =============================================================================
   VIDEOS TAB
   ========================================================================== */
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 8px; }
@media (max-width: 720px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat { padding: 16px 18px; }
.stat-value { font-size: 30px; font-weight: 760; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat-value.grad { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-label { font-size: 12.5px; color: var(--text-muted); font-weight: 550; margin-top: 6px; }

.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; margin-top: 14px; }
@media (max-width: 560px) { .vgrid { grid-template-columns: 1fr; } }

.vcard { display: flex; flex-direction: column; overflow: hidden; animation: fade-up 0.34s var(--ease-out) both; }
.vcard.st-approved { border-color: color-mix(in srgb, var(--ok) 38%, var(--border)); }
.vcard.st-scheduled, .vcard.st-published { border-color: color-mix(in srgb, var(--info) 38%, var(--border)); }
.vcard-media { position: relative; background: #000; height: 300px; }
.vcard-media video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
@media (max-width: 560px) { .vcard-media { height: auto; aspect-ratio: 9 / 16; max-height: 64vh; } }
.vcard-media .vtag { position: absolute; top: 10px; left: 10px; z-index: 2; }
.vcard-media .vlen { position: absolute; bottom: 10px; right: 10px; z-index: 2; font-size: 11px; font-weight: 700; color: #fff; background: rgba(0,0,0,0.6); padding: 3px 8px; border-radius: 7px; font-variant-numeric: tabular-nums; }
.vcard-body { padding: 15px 16px 16px; display: flex; flex-direction: column; gap: 0; }
.vcard-title { font-size: 15.5px; font-weight: 720; line-height: 1.28; letter-spacing: -0.01em; }
.vcard-desc { font-size: 13px; color: var(--text-muted); margin-top: 7px; line-height: 1.5; }
.vcard-cap { font-size: 12.5px; color: var(--text-muted); margin-top: 10px; }
.vcard-cap b { color: var(--accent); font-weight: 600; }

/* "from this original" chip -> opens the timeline analysis. A tappable row: a
   poster thumbnail (with a play glyph), a labelled title, and an affordance line,
   with a clear hover (accent tint, thumbnail lifts, arrow nudges). */
.from-src { display: flex; align-items: center; gap: 11px; margin-top: 14px; padding: 9px 11px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--card-2); cursor: pointer; text-align: left; width: 100%; transition: border-color 0.16s, background 0.16s, box-shadow 0.16s; }
.from-src:hover { border-color: color-mix(in srgb, var(--accent) 55%, var(--border-strong)); background: var(--accent-soft); box-shadow: 0 4px 16px rgba(0,0,0,0.12); }
.from-src .fs-thumb { position: relative; width: 46px; height: 60px; border-radius: 9px; flex: none; background: var(--card-3) center/cover no-repeat; border: 1px solid var(--border); overflow: hidden; transition: transform 0.16s; }
.from-src:hover .fs-thumb { transform: scale(1.04); }
.from-src .fs-thumb::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.35)); }
.from-src .fs-play { position: absolute; inset: 0; margin: auto; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,0.5); backdrop-filter: blur(3px); display: grid; place-items: center; color: #fff; z-index: 1; }
.from-src .fs-play svg { width: 11px; height: 11px; margin-left: 1px; }
.from-src .fs-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.from-src .fs-lead { display: inline-flex; align-items: center; gap: 5px; font-size: 10px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.from-src .fs-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex: none; }
.from-src .fs-name { display: block; font-size: 13px; font-weight: 640; color: var(--text); line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.from-src .fs-cta { display: block; font-size: 11px; color: var(--text-dim); font-weight: 550; }
.from-src:hover .fs-cta { color: var(--accent); }
.from-src .fs-arrow { color: var(--text-dim); flex: none; transition: transform 0.16s, color 0.16s; }
.from-src:hover .fs-arrow { color: var(--accent); transform: translateX(3px); }

/* version pills */
.versions { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 14px; }
.versions .vlabel { font-size: 10.5px; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); margin-right: 2px; }
.vpill { font-size: 12px; font-weight: 650; padding: 5px 11px; border-radius: 999px; cursor: pointer; background: var(--card-2); color: var(--text-muted); border: 1px solid var(--border-strong); min-height: 32px; display: inline-flex; align-items: center; transition: background 0.14s, color 0.14s; }
.vpill.active { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.vpill-note { font-size: 11.5px; color: var(--text-dim); margin-top: 6px; }

/* edit requests + review + publish blocks */
.reqlist { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.reqitem { background: var(--card-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; font-size: 12.5px; color: var(--text-muted); }
.reqitem .req-type { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); margin-right: 6px; }
.reqitem audio { width: 100%; margin-top: 6px; height: 34px; }

.editbox { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
.editbox-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); margin-bottom: 8px; }
.editbox-actions { display: flex; gap: 9px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.rec-status { font-size: 12px; color: var(--text-dim); }
.rec-status.live { color: var(--danger); }
.rec-status.live::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; margin-right: 6px; animation: pulse-dot 1s infinite; vertical-align: 1px; }

.vactions { display: flex; gap: 9px; margin-top: 14px; flex-wrap: wrap; }
.vactions .btn { flex: 1; min-width: 110px; }

.publish { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 14px; }
/* Publish actions: primary ("Publish now") full width on top, the two scheduling
   choices as an equal-width pair below. One gap value everywhere, matched heights,
   graceful stack at narrow widths. */
.publish-actions { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.publish-actions .pub-primary { width: 100%; }
.publish-secondary { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.publish-secondary .btn { width: 100%; min-width: 0; }
@media (max-width: 380px) { .publish-secondary { grid-template-columns: 1fr; } }
.chan-picker { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.chan-toggle { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--card-2); color: var(--text-dim); cursor: pointer; user-select: none; transition: all 0.14s; }
.chan-toggle.on { border-color: transparent; background: var(--accent-soft); color: var(--accent); }
.chan-toggle .cdot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.55; }
.chan-toggle.on .cdot { opacity: 1; }
.slot-suggest { margin-top: 11px; font-size: 13px; color: var(--text-muted); background: var(--info-soft); border-radius: 10px; padding: 11px 12px; }
.slot-suggest b { color: var(--info); }
.slot-suggest .et { color: var(--text-dim); font-size: 12px; }
.picker { margin-top: 11px; display: none; }
.picker.open { display: block; }
.picker .picker-row { display: flex; gap: 9px; margin-top: 9px; }
.sched-line { font-size: 13px; color: var(--text-muted); margin-top: 6px; }
.sched-line b { color: var(--info); }

/* =============================================================================
   TIMELINE ANALYSIS  (the aha feature)
   ========================================================================== */
.modal { position: fixed; inset: 0; z-index: 80; display: block; }
.modal[hidden] { display: none; }
.modal-back { position: absolute; inset: 0; z-index: 1; background: rgba(3, 3, 7, 0.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); animation: fade-up 0.2s ease; }
[data-theme='light'] .modal-back { background: rgba(20, 28, 54, 0.62); }
.modal-card { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(860px, 94vw); max-height: 92vh; overflow: auto; background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); animation: pop-in 0.26s var(--ease-spring); }
.modal-x { position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--card-2); color: var(--text-muted); cursor: pointer; display: grid; place-items: center; }
.modal-x:hover { color: var(--text); border-color: var(--text-dim); }
.modal-body { padding: 24px; }

/* Interface-tour modal: a compact player. Portrait by default, wider for the
   landscape source on desktop. Poster + graceful "coming shortly" fallback. */
.tour-modal .tour-card { width: min(420px, 94vw); overflow: hidden; }
.tour-modal .tour-card:has(.tour-stage.landscape) { width: min(880px, 94vw); }
.tour-stage { position: relative; background: #000; min-height: 260px; display: grid; place-items: center; aspect-ratio: 9 / 16; }
.tour-stage.landscape { aspect-ratio: 16 / 9; }
.tour-video { width: 100%; height: 100%; display: block; object-fit: contain; background: #000; }
.tour-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 24px; color: var(--text-dim); background: var(--canvas-2); }
.tour-fallback .empty-ico { margin-bottom: 12px; }
.tour-fallback .empty-title { color: var(--text); font-size: 15px; font-weight: 680; }
.tour-fallback .empty-line { font-size: 13px; margin-top: 6px; max-width: 300px; }

.tl-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 6px; padding-right: 44px; }
.tl-thumb { width: 68px; height: 44px; border-radius: 9px; flex: none; background: var(--card-3) center/cover no-repeat; border: 1px solid var(--border); }
.tl-title { font-size: 17px; font-weight: 760; letter-spacing: -0.01em; }
.tl-meta { font-size: 12.5px; color: var(--text-dim); margin-top: 3px; }
.tl-lead { font-size: 13.5px; color: var(--text-muted); margin: 14px 0 18px; line-height: 1.55; }
.tl-lead b { color: var(--accent); font-weight: 650; }

/* the horizontal source strip with coloured extracted segments */
.tl-strip-wrap { position: relative; }
.tl-ticks { position: relative; height: 16px; margin-bottom: 5px; }
.tl-tick { position: absolute; top: 0; font-size: 10px; color: var(--text-dim); transform: translateX(-50%); font-variant-numeric: tabular-nums; }
.tl-tick::after { content: ''; position: absolute; left: 50%; top: 13px; width: 1px; height: 5px; background: var(--border-strong); }
.tl-strip { position: relative; height: 62px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border-strong); background: repeating-linear-gradient(90deg, var(--card-2), var(--card-2) 2px, var(--card-3) 2px, var(--card-3) 4px); }
.tl-seg { position: absolute; top: 0; bottom: 0; border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1.5px solid; transition: transform 0.14s, filter 0.14s, box-shadow 0.14s; }
.tl-seg:hover, .tl-seg.hot { transform: scaleY(1.06); filter: brightness(1.08); box-shadow: 0 6px 20px rgba(0,0,0,0.35); z-index: 2; }
.tl-seg-label { font-size: 11px; font-weight: 700; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-strip-foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; font-size: 11.5px; color: var(--text-dim); }
.tl-strip-foot .mid { flex: 1; text-align: center; }
@media (max-width: 560px) { .tl-strip-foot .mid { display: none; } }

/* segment colour families (shared by chips + card accents) */
.c-amber { --seg: var(--accent); --seg-soft: var(--accent-soft); }
.c-info { --seg: var(--info); --seg-soft: var(--info-soft); }
.c-ok { --seg: var(--ok); --seg-soft: var(--ok-soft); }
.c-violet { --seg: var(--violet); --seg-soft: var(--violet-soft); }
.c-coral { --seg: var(--coral); --seg-soft: var(--coral-soft); }
.c-teal { --seg: var(--teal); --seg-soft: var(--teal-soft); }
.tl-seg { background: var(--seg-soft); border-color: var(--seg); color: var(--seg); }

/* the resulting clip cards under the strip */
.tl-results { margin-top: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tl-res { display: flex; gap: 11px; padding: 11px; border-radius: 12px; border: 1px solid var(--border); background: var(--card-2); cursor: pointer; transition: border-color 0.14s, background 0.14s, transform 0.14s; border-left: 3px solid var(--seg); }
.tl-res:hover, .tl-res.hot { background: var(--card-3); border-color: var(--seg); transform: translateY(-1px); }
.tl-res .r-thumb { width: 40px; height: 56px; border-radius: 7px; flex: none; background: var(--card-3) center/cover no-repeat; border: 1px solid var(--border); }
.tl-res .r-text { min-width: 0; }
.tl-res .r-text { display: flex; flex-direction: column; min-width: 0; }
.tl-res .r-name { display: block; font-size: 12.5px; font-weight: 650; line-height: 1.3; }
.tl-res .r-meta { display: block; font-size: 11px; color: var(--text-dim); margin-top: 4px; font-variant-numeric: tabular-nums; }
.tl-res .r-chip { margin-top: 6px; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--seg-soft); color: var(--seg); display: inline-block; align-self: flex-start; }

/* =============================================================================
   SCHEDULE TAB
   ========================================================================== */
.sched-legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 4px 0 18px; }
.sched-legend .lg { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-muted); }
.sched-legend .lg .sw { width: 11px; height: 11px; border-radius: 4px; }
.sw-sched { background: var(--info); } .sw-published { background: var(--ok); } .sw-now { background: var(--accent); }

.cal { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 14px; }
.cal-day { border: 1px solid var(--border); border-radius: 14px; background: color-mix(in srgb, var(--card) 84%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; box-shadow: var(--shadow-card); }
.cal-day.today { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent), var(--shadow-card); }
.cal-day-hd { padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--card-2); }
.cal-dow { font-size: 10.5px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); }
.cal-date { font-size: 15px; font-weight: 720; margin-top: 1px; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.cal-date .today-tag { font-size: 9.5px; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--accent-ink); background: var(--accent); padding: 2px 7px; border-radius: 999px; }
.cal-slots { padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.cal-slot-empty { font-size: 11.5px; color: var(--text-dim); text-align: center; padding: 14px 0; }

/* Scheduled/published item card: prominent time header (with a status dot),
   a poster thumbnail, a readable 2-line title, and tidy channel chips. Left
   accent stripe carries the status colour; matches the app's glass card look. */
.sitem { position: relative; border-radius: 12px; padding: 10px 11px 11px; border: 1px solid var(--border); background: var(--card); overflow: hidden; transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s; }
.sitem::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--seg); }
.sitem:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--seg) 45%, var(--border)); box-shadow: 0 6px 18px rgba(0,0,0,0.14); }
.sitem-hd { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }
.sitem-hd .s-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--seg); flex: none; }
.sitem .s-time { font-size: 12.5px; font-weight: 800; color: var(--seg); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.sitem .s-badge { margin-left: auto; font-size: 9px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--seg); background: var(--seg-soft); padding: 2px 7px; border-radius: 999px; }
.sitem-main { display: flex; gap: 9px; align-items: flex-start; }
.sitem .s-thumb { width: 34px; height: 48px; border-radius: 7px; flex: none; background: var(--card-3) center/cover no-repeat; border: 1px solid var(--border); }
.sitem .s-name { font-size: 12px; font-weight: 640; line-height: 1.32; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sitem .s-chans { display: flex; gap: 4px; margin-top: 7px; flex-wrap: wrap; }
.s-chan { width: 19px; height: 19px; border-radius: 5px; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--border); color: var(--text-muted); }
.s-chan svg { width: 11px; height: 11px; }
.sitem.done { --seg: var(--ok); }
.sitem.done .s-time { color: var(--ok); }

/* =============================================================================
   SETTINGS TAB
   ========================================================================== */
.set-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .set-grid { grid-template-columns: 1fr; } }
.set-card { padding: 20px; }
.set-card h3 { font-size: 15px; font-weight: 720; }
.set-card .set-desc { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; line-height: 1.5; }

.chan-list { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.chan-row { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-bottom: 1px solid var(--border); }
.chan-row:last-child { border-bottom: 0; }
.chan-ico { width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center; background: var(--card-2); border: 1px solid var(--border); color: var(--text-muted); }
.chan-ico svg { width: 18px; height: 18px; }
.chan-name { flex: 1; font-size: 14px; font-weight: 600; }
.chan-state { font-size: 11.5px; color: var(--text-dim); margin-right: 2px; }
/* Light theme: same small-text contrast fix as .field-hint. #8a93a3 -> 3.10:1;
   #616a77 -> 5.47:1 on the white settings card. Dark theme unchanged. */
[data-theme='light'] .chan-state { color: #616a77; }

.mode-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.mode-opt { display: flex; gap: 12px; padding: 13px 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--card-2); cursor: pointer; transition: border-color 0.14s, background 0.14s; }
.mode-opt.on { border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: var(--accent-soft); }
.mode-radio { width: 20px; height: 20px; border-radius: 50%; flex: none; border: 2px solid var(--border-strong); margin-top: 1px; display: grid; place-items: center; transition: border-color 0.14s; }
.mode-opt.on .mode-radio { border-color: var(--accent); }
.mode-opt.on .mode-radio::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.mode-opt .mo-title { display: block; font-size: 13.5px; font-weight: 650; }
.mode-opt .mo-desc { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; line-height: 1.5; }
/* Light theme: darken the mode-option description for a comfortable AA margin on
   both the plain (#f4f6fb) and the selected amber-tinted (#faefe1) card.
   #4c5663 -> 6.56:1 on the amber tint, 6.89:1 on #f4f6fb. Dark theme unchanged. */
[data-theme='light'] .mode-opt .mo-desc { color: #4c5663; }

.times-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.time-chip { font-size: 12.5px; font-weight: 650; padding: 7px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border-strong); color: var(--text-muted); font-variant-numeric: tabular-nums; }

/* =============================================================================
   REAL EXAMPLES  (was: showcase)
   ========================================================================== */
.showcase { padding-bottom: 20px; }
.sc-hero { padding: 4px 0 8px; }
.sc-eyebrow { display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); border-radius: 999px; padding: 5px 12px; margin-bottom: 14px; }
.sc-title { font-size: 28px; line-height: 1.14; font-weight: 800; letter-spacing: -0.02em; margin: 0 0 12px; }
.sc-lede { font-size: 15px; line-height: 1.6; color: var(--text-muted); margin: 0 0 18px; max-width: 62ch; }
.sc-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sc-hero-actions .btn { min-width: 168px; }

.sc-block { margin-top: 34px; }
.sc-h2 { font-size: 20px; font-weight: 760; letter-spacing: -0.01em; margin: 4px 0 6px; }
.sc-sub { font-size: 14px; color: var(--text-muted); margin: 0 0 16px; line-height: 1.55; max-width: 64ch; }

/* explainer: landscape stage on desktop, portrait on mobile (JS swaps source) */
.sc-explainer { position: relative; border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--canvas-2); min-height: 220px; display: grid; place-items: center; }
.sc-explainer.ready { background: #000; }
.sc-explainer-video { display: block; margin: 0 auto; background: #000; width: 100%; max-width: 100%; max-height: 74vh; object-fit: contain; }
.sc-explainer-fallback { text-align: center; padding: 46px 22px; color: var(--text-dim); }
.sc-explainer-fallback .empty-ico { margin-bottom: 12px; }
.sc-explainer-fallback .empty-title { font-size: 15px; font-weight: 650; margin-top: 0; color: var(--text); }
.sc-explainer-fallback .empty-line { font-size: 13px; margin-top: 6px; }

.sc-inputs, .sc-outputs { display: grid; grid-template-columns: 1fr; gap: 16px; }
.sc-clip { margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-card); }
.sc-out { border-color: color-mix(in srgb, var(--ok) 24%, var(--border)); }
.sc-video-wrap { position: relative; background: #000; }
.sc-video-wrap video { width: 100%; display: block; background: #000; aspect-ratio: 9 / 16; max-height: 72vh; object-fit: contain; }
.sc-tag { position: absolute; top: 10px; left: 10px; z-index: 2; display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; backdrop-filter: blur(6px); }
.sc-tag.raw { color: var(--text); background: color-mix(in srgb, var(--card) 72%, transparent); border: 1px solid var(--border-strong); }
.sc-tag.live { color: #071b12; background: var(--ok); }
.sc-live-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse-dot 1.1s infinite; }
.sc-clip-body { padding: 14px 15px 16px; }
.sc-clip-label { font-size: 13px; font-weight: 700; color: var(--text); }
.sc-clip-note { font-size: 12.5px; color: var(--text-dim); margin-top: 4px; line-height: 1.5; }
.sc-arrow { font-size: 12.5px; color: var(--accent); margin-top: 10px; font-weight: 600; border-top: 1px dashed var(--border-strong); padding-top: 10px; }
.sc-out-top { display: flex; align-items: baseline; gap: 10px; }
.sc-out-title { font-size: 16px; font-weight: 750; line-height: 1.25; margin: 0; flex: 1; letter-spacing: -0.01em; }
.sc-out-len { font-size: 12px; color: var(--text-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-out-desc { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; margin: 8px 0 0; }
.sc-links-label { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--text-dim); margin: 14px 0 9px; }
.sc-links { display: flex; flex-wrap: wrap; gap: 8px; }
.sc-plat { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; font-size: 12.5px; font-weight: 650; color: var(--text); background: var(--card-2); border: 1px solid var(--border-strong); padding: 8px 12px; border-radius: 10px; min-height: 40px; transition: border-color 0.14s, background 0.14s, transform 0.06s; }
.sc-plat:hover { border-color: var(--border-strong); background: var(--card-3); }
.sc-plat:active { transform: translateY(0.5px); }
.sc-plat svg { flex: none; }
.sc-plat.ig:hover { border-color: #d6336c; color: #f06595; }
.sc-plat.yt:hover { border-color: #dc2626; color: #ef4444; }

.sc-cta { margin-top: 40px; text-align: center; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px 22px; }
.sc-cta .sc-h2 { margin-bottom: 6px; }
.sc-cta .sc-sub { margin: 0 auto 16px; }
.sc-cta .btn { min-width: 220px; }
.sc-honest { font-size: 12px; color: var(--text-dim); margin-top: 14px; }

@media (min-width: 760px) {
  .sc-title { font-size: 32px; }
  .sc-inputs { grid-template-columns: repeat(3, 1fr); }
  .sc-outputs { grid-template-columns: repeat(2, 1fr); }
  .sc-video-wrap video { max-height: 520px; }
  /* explainer landscape on desktop */
  .sc-explainer.landscape .sc-explainer-video { aspect-ratio: 16 / 9; max-height: 62vh; }
}

/* =============================================================================
   KEYFRAMES
   ========================================================================== */
@keyframes pulse-dot { 0%, 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); } 50% { box-shadow: 0 0 0 5px rgba(52, 211, 153, 0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pop-in { from { opacity: 0; transform: translate(-50%, -50%) scale(0.96); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes tour-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.32); }
  50% { box-shadow: 0 0 0 6px rgba(245, 158, 11, 0); }
}
@keyframes scan-y { 0% { top: 0; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { top: 100%; opacity: 0; } }

/* ---- Live-install additions: stat filters, publishing fan-out, schedule
   period pills, recently-published list (Input tab). Inert on the demo except
   the stat-filter affordance, which works there too. ---- */
.stat[data-filter] { cursor: pointer; user-select: none; transition: border-color 0.15s, box-shadow 0.15s; }
.stat[data-filter]:hover { border-color: var(--text-dim); }
.stat.filter-active { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent) inset; }

.pubchans { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pubchan { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px 5px 6px; border-radius: 999px; border: 1px solid var(--border); background: var(--card-2); }
.pubchan .s-chan { border: 0; background: transparent; }
.pubchan-label { font-size: 11.5px; font-weight: 620; color: var(--text-muted); }
.pubchan.st-live { border-color: color-mix(in srgb, var(--ok) 45%, var(--border)); }
.pubchan.st-live .pubchan-label { color: var(--ok); }
.pubchan.st-live .s-chan { color: var(--ok); }
.pubchan.st-posting .s-chan { color: var(--accent); }
.pubchan.st-posting .pubchan-label { color: var(--accent); }
.pubchan.st-posting { border-color: color-mix(in srgb, var(--accent) 45%, var(--border)); animation: pulse-dot 2.2s infinite; }
.pubchan.st-queued { opacity: 0.6; }
.pubchan.st-failed { border-color: color-mix(in srgb, #e5484d 55%, var(--border)); }
.pubchan.st-failed .pubchan-label { color: #e5484d; }

.sched-pills { display: flex; gap: 8px; flex-wrap: wrap; margin: 2px 0 16px; }
.sched-pill { font-size: 12.5px; font-weight: 650; padding: 7px 12px; border-radius: 999px; background: var(--card-2); border: 1px solid var(--border-strong); color: var(--text-muted); cursor: pointer; }
.sched-pill .num { color: var(--text-dim); margin-left: 2px; }
.sched-pill:hover { color: var(--text); border-color: var(--text-dim); }
.sched-pill.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.sched-pill.active .num { color: var(--accent); }

.recent-pubs { display: flex; flex-direction: column; gap: 8px; }
.recent-pub { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--border); background: var(--card); cursor: pointer; font: inherit; color: inherit; }
.recent-pub:hover { border-color: var(--text-dim); }
.recent-pub .rp-thumb { width: 38px; height: 50px; border-radius: 8px; flex: none; background: var(--card-3) center/cover no-repeat; border: 1px solid var(--border); }
.recent-pub .rp-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.recent-pub .rp-name { font-size: 13px; font-weight: 640; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-pub .rp-meta { font-size: 11.5px; color: var(--text-muted); }
