:root {
  color-scheme: dark;

  /* Core palette */
  --bg: #030305;
  --bg-elevated: #0a0a0e;
  --bg-elevated-2: #101015;
  --ink: #ffffff;
  --ink-soft: #fff4e8;
  --muted: #a0938a;
  --muted-2: #7d7169;
  --muted-3: #4a4540;

  /* Brand */
  --red: #ff3028;
  --red-soft: rgba(255, 48, 40, 0.22);
  --red-glow: rgba(255, 48, 40, 0.45);
  --amber: #f78a3d;
  --gold: #f7b85a;
  --gold-soft: rgba(247, 184, 90, 0.22);
  --gold-glow: rgba(247, 184, 90, 0.40);
  --green: #8affc1;
  --green-soft: rgba(138, 255, 193, 0.15);

  /* Surfaces & lines */
  --surface: rgba(255, 244, 232, 0.045);
  --surface-2: rgba(255, 244, 232, 0.085);
  --surface-3: rgba(255, 244, 232, 0.12);
  --line: rgba(255, 244, 232, 0.08);
  --line-strong: rgba(255, 244, 232, 0.14);
  --line-gold: rgba(247, 184, 90, 0.25);

  /* Shadows */
  --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 18px 60px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 34px 110px rgba(0, 0, 0, 0.45);
  --shadow-glow-red: 0 0 80px rgba(255, 48, 40, 0.18);
  --shadow-glow-gold: 0 0 80px rgba(247, 184, 90, 0.15);

  /* Typography */
  --font-display: "SF Pro Display", "Inter", "Manrope", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", "Manrope", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Menlo", monospace;

  /* Layout */
  --shell: min(1200px, calc(100% - 48px));
  --radius-sm: 14px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-xl: 36px;
  --radius-full: 999px;

  /* Scroll-driven animation vars */
  --scroll: 0;
  --glow-x: 50%;
  --glow-y: 30%;

  /* Theme RGB tuples for gradients */
  --theme-a: 255, 48, 40;
  --theme-b: 247, 184, 90;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -3;
}

body::before {
  background:
    radial-gradient(circle at calc(20% + var(--scroll) * 55%) calc(25% + var(--scroll) * 25%), rgba(var(--theme-a), 0.22), transparent 34%),
    radial-gradient(circle at calc(82% - var(--scroll) * 50%) 18%, rgba(var(--theme-b), 0.16), transparent 30%),
    radial-gradient(circle at 50% 90%, rgba(var(--theme-a), 0.08), transparent 45%),
    linear-gradient(180deg, #030305 0%, #08080c 55%, #030305 100%);
  transition: background 0.8s ease;
}

body::after {
  z-index: -2;
  opacity: 0.12;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 70%);
}

img, video {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* Typography helpers */
h1, h2, h3, h4 {
  font-family: 'Fraunces', Georgia, serif;
  margin: 0;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--ink);
}

h1 { font-size: clamp(44px, 7vw, 88px); }
h2 { font-size: clamp(32px, 4.5vw, 56px); }
h3 { font-size: clamp(22px, 2.5vw, 30px); }
h4 { font-size: 20px; }

p {
  margin: 0;
}

.lead {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.6;
  color: var(--muted);
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--gold);
  margin-bottom: 16px;
}

.section-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red-glow);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

/* Layout */
.shell {
  width: var(--shell);
  margin-inline: auto;
}

.section {
  padding: 120px 0;
  position: relative;
}

.section-head {
  max-width: 720px;
  margin-bottom: 64px;
}

.section-head.center {
  margin-inline: auto;
  text-align: center;
}

.section-head h2 {
  margin-bottom: 18px;
}

.section-head p {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.65;
}

.page-hero {
  padding: 140px 0 80px;
  text-align: center;
}

.page-hero h1 {
  max-width: 900px;
  margin: 0 auto 22px;
}

.page-hero .lead {
  max-width: 680px;
  margin: 0 auto 36px;
}

.page-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--surface);
}

.page-tabs a {
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
}

.page-tabs a:hover,
.page-tabs a.active {
  color: var(--ink);
  background: var(--surface-2);
}

/* Header */
.site-header {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  width: min(1180px, calc(100% - 32px));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 12px 10px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background:
    linear-gradient(120deg, rgba(255, 48, 40, 0.06), transparent 30%, transparent 70%, rgba(247, 184, 90, 0.05)),
    rgba(5, 5, 6, 0.72);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: var(--shadow-md);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line-gold);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 20%, rgba(247, 184, 90, 0.18), transparent 62%),
    var(--surface);
  box-shadow: 0 10px 28px rgba(255, 48, 40, 0.18);
}

.brand-mark img {
  width: 82%;
  height: 82%;
  object-fit: contain;
}

.brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: -0.03em;
}

.brand small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.nav a {
  padding: 9px 14px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.nav a:hover {
  color: var(--ink);
  background: var(--surface);
}

.nav a.active {
  color: var(--ink);
  background: var(--surface-2);
}

.nav-cta {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--surface);
}

.lang-switch a {
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.2s ease;
}

.lang-switch a.active {
  background: var(--surface-2);
  color: var(--ink);
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink-soft);
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.12) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.btn:hover::after {
  transform: translateX(100%);
}

/* Admin cockpit: no shimmer sweep — highlight the element itself instead */
.admin-body .btn::after {
  content: none;
}

.admin-body .btn {
  transition: transform 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.admin-body .btn.primary:hover,
.admin-body .btn.primary:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 90, 61, 0.28), 0 14px 42px rgba(255, 48, 40, 0.42), inset 0 1px 0 rgba(255,255,255,0.2);
}

.admin-body .btn.ghost:hover,
.admin-body .btn.ghost:focus-visible {
  border-color: var(--gold);
  background: var(--gold-soft);
  box-shadow: 0 0 0 3px rgba(247, 184, 90, 0.16);
  color: var(--ink);
}

.admin-body .btn.active,
.admin-body .toolbar-btn.active,
.admin-body .subtitle-style-card.active,
.admin-body .option-card.active {
  box-shadow: 0 0 0 2px var(--gold-soft), 0 0 20px rgba(247, 184, 90, 0.22);
}

.btn.primary {
  background: linear-gradient(135deg, var(--red) 0%, #ff5a3d 100%);
  color: #fff;
  box-shadow: 0 10px 32px rgba(255, 48, 40, 0.32), inset 0 1px 0 rgba(255,255,255,0.15);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 42px rgba(255, 48, 40, 0.42), inset 0 1px 0 rgba(255,255,255,0.2);
}

.btn.ghost {
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink-soft);
}

.btn.ghost:hover {
  border-color: var(--line-gold);
  background: var(--surface-2);
  transform: translateY(-2px);
}

.btn.lg {
  padding: 16px 30px;
  font-size: 15px;
}

.btn.sm {
  padding: 9px 16px;
  font-size: 13px;
}

.btn.xs {
  padding: 6px 10px;
  font-size: 11px;
}

/* Cards */
.card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 30% 0%, rgba(247, 184, 90, 0.06), transparent 45%),
    var(--surface);
  transition: all 0.35s ease;
}

.card:hover {
  border-color: var(--line-gold);
  background:
    radial-gradient(circle at 30% 0%, rgba(247, 184, 90, 0.1), transparent 50%),
    var(--surface-2);
  transform: translateY(-4px);
  box-shadow: var(--shadow-glow-gold);
}

.card h3 {
  margin-bottom: 10px;
  font-size: 20px;
}

.card p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  margin-bottom: 18px;
  color: var(--gold);
}

.card-icon svg {
  width: 22px;
  height: 22px;
}

/* Bento grids */
.bento {
  display: grid;
  gap: 20px;
}

.bento-2 { grid-template-columns: repeat(2, 1fr); }
.bento-3 { grid-template-columns: repeat(3, 1fr); }
.bento-4 { grid-template-columns: repeat(4, 1fr); }

.bento-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 48, 40, 0.05), transparent 40%),
    var(--surface);
  transition: all 0.35s ease;
}

.bento-card:hover {
  border-color: var(--line-gold);
  transform: translateY(-3px);
  box-shadow: var(--shadow-glow-gold);
}

.bento-card.featured {
  background:
    radial-gradient(circle at 30% 0%, rgba(255, 48, 40, 0.1), transparent 45%),
    radial-gradient(circle at 80% 100%, rgba(247, 184, 90, 0.08), transparent 45%),
    var(--surface-2);
  border-color: var(--line-gold);
}

@media (max-width: 1024px) {
  .bento-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .bento-2,
  .bento-3,
  .bento-4 { grid-template-columns: 1fr; }
}

/* Hero */
.hero {
  min-height: 100svh;
  padding: 100px 0 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-inner {
  width: var(--shell);
  max-width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-canvas::before {
  content: "";
  position: absolute;
  inset: -20%;
  background:
    radial-gradient(circle at 50% 0%, rgba(247, 184, 90, 0.20), transparent 48%),
    radial-gradient(circle at 80% 70%, rgba(255, 48, 40, 0.16), transparent 42%),
    radial-gradient(circle at 20% 80%, rgba(255, 48, 40, 0.12), transparent 42%);
  filter: blur(60px);
  animation: hero-aurora 16s ease-in-out infinite alternate;
}

.hero-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 244, 232, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 244, 232, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
}

.hero-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.hero-particles i {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.35;
  filter: blur(1px);
  animation: particle-float 8s ease-in-out infinite;
}

.hero-particles i:nth-child(1) { left: 18%; top: 22%; animation-delay: 0s; }
.hero-particles i:nth-child(2) { left: 82%; top: 18%; animation-delay: 1.5s; background: var(--red); }
.hero-particles i:nth-child(3) { left: 74%; top: 74%; animation-delay: 3s; }
.hero-particles i:nth-child(4) { left: 26%; top: 68%; animation-delay: 4.5s; background: var(--amber); }
.hero-particles i:nth-child(5) { left: 50%; top: 14%; animation-delay: 2s; }

@keyframes particle-float {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.35; }
  50% { transform: translateY(-18px) scale(1.25); opacity: 0.6; }
}

@keyframes hero-aurora {
  from { transform: translate(-2%, -2%) scale(1); }
  to { transform: translate(2%, 2%) scale(1.08); }
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin-bottom: 32px;
}

.hero-copy h1 {
  margin-bottom: 18px;
  letter-spacing: -0.05em;
  line-height: 1.02;
  text-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  font-size: clamp(38px, 5.2vw, 64px);
}

.hero-copy h1 span {
  background: linear-gradient(135deg, var(--gold) 0%, var(--red) 45%, var(--amber) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradient-shift 6s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.hero-copy .lead {
  max-width: 600px;
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 19px);
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  margin-bottom: 22px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 12px var(--red-glow);
  animation: live-pulse 1.8s ease-in-out infinite;
}

@keyframes live-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(0.85); }
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.hero-glow {
  box-shadow: 0 0 40px var(--red-glow), 0 0 80px rgba(255, 48, 40, 0.18);
  animation: glow-breathe 4s ease-in-out infinite;
}

@keyframes glow-breathe {
  0%, 100% { box-shadow: 0 0 40px var(--red-glow), 0 0 80px rgba(255, 48, 40, 0.18); }
  50% { box-shadow: 0 0 60px var(--red-glow), 0 0 110px rgba(255, 48, 40, 0.28); }
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 32px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 13px;
}

.hero-meta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--ink);
  letter-spacing: -0.03em;
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 28px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
  transition: border-color 0.3s;
}

.scroll-cue:hover { border-color: var(--line-strong); }

.scroll-cue span {
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--gold);
  animation: scroll-wheel 1.8s ease-in-out infinite;
}

@keyframes scroll-wheel {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.4; transform: translateY(8px); }
}

/* Hero stage */
.hero-stage {
  position: relative;
  z-index: 2;
  width: min(84%, 560px);
  perspective: 1200px;
}

.stage-frame {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 244, 232, 0.06), rgba(255, 244, 232, 0.015)),
    rgba(5, 5, 7, 0.55);
  backdrop-filter: blur(20px);
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(255, 244, 232, 0.04) inset,
    0 0 60px rgba(247, 184, 90, 0.08);
  overflow: hidden;
  transform-style: preserve-3d;
  transition: transform 0.15s ease-out;
  position: relative;
}

.stage-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(247,184,90,0.35), rgba(255,244,232,0.18), rgba(247,184,90,0.35));
  background-size: 200% 200%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: border-glow 5s ease-in-out infinite;
  pointer-events: none;
  opacity: 0.7;
}

@keyframes border-glow {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--red);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stage-meta {
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.stage-viewport {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated);
  overflow: hidden;
}

.stage-viewport video,
.stage-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stage-hud {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  pointer-events: none;
  background: radial-gradient(circle at 50% 50%, transparent 32%, rgba(3, 3, 5, 0.55) 100%);
}

.hud-readout {
  display: none; /* hidden: collided with the video's baked-in centre wordmark */
  flex-direction: row;
  gap: 18px;
  text-align: center;
}

.hud-readout div { display: flex; flex-direction: column; align-items: center; gap: 2px; }

.hud-readout b {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hud-readout span {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.stage-timeline {
  padding: 18px 22px 24px;
}

.timeline-rail {
  position: relative;
  height: 4px;
  background: var(--surface-2);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 14px;
}

.timeline-progress {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  box-shadow: 0 0 16px var(--red-glow);
  transition: width 0.4s ease;
}

.timeline-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.timeline-labels span {
  transition: color 0.35s;
  flex: 1;
  text-align: center;
}

.timeline-labels span.active {
  color: var(--ink);
  font-weight: 700;
}

@media (max-width: 900px) {
  .hero { padding: 120px 0 80px; }
  .hero-stage { width: min(96%, 720px); }
  .hud-readout span { font-size: 16px; }
}

@media (max-height: 960px) and (min-width: 1024px) {
  .hero { padding: 120px 0 70px; }
  .hero-copy { margin-bottom: 32px; }
  .hero-copy h1 { font-size: clamp(36px, 5.2vw, 64px); }
  .hero-copy .lead { font-size: clamp(16px, 1.7vw, 19px); margin-bottom: 28px; }
  .hero-meta { margin-top: 32px; gap: 28px; }
  .hero-meta strong { font-size: 26px; }
  .hero-stage { width: min(90%, 780px); }
  .stage-header { padding: 14px 18px; }
  .stage-timeline { padding: 14px 18px 18px; }
  .hud-readout span { font-size: 15px; }
}

@media (max-width: 640px) {
  .hero-copy h1 { font-size: clamp(34px, 10.5vw, 54px); }
  .hero-meta { gap: 22px; }
  .hero-meta strong { font-size: 24px; }
  .stage-header { padding: 14px 16px; }
  .stage-timeline { padding: 14px 16px 18px; }
  .timeline-labels { font-size: 9px; letter-spacing: 0.02em; }
}

/* UK hero: longer title needs tighter sizing to avoid bottom crop on short desktops */
html[lang="uk"] .hero-copy h1 {
  font-size: clamp(32px, 4.6vw, 56px);
}

@media (max-height: 960px) and (min-width: 1024px) {
  html[lang="uk"] .hero-copy h1 { font-size: clamp(30px, 4.2vw, 52px); }
  html[lang="uk"] .hero-copy .lead { font-size: clamp(14px, 1.45vw, 17px); margin-bottom: 22px; }
  html[lang="uk"] .hero-meta { margin-top: 22px; gap: 24px; }
  html[lang="uk"] .hero-stage { width: min(78%, 520px); }
}

@media (max-height: 820px) and (min-width: 1024px) {
  html[lang="uk"] .hero { padding: 110px 0 34px; }
  html[lang="uk"] .hero-copy { margin-bottom: 22px; }
  html[lang="uk"] .hero-copy h1 { font-size: clamp(28px, 3.8vw, 46px); }
  html[lang="uk"] .hero-stage { width: min(72%, 460px); }
}

/* Trust bar */
.trust-bar {
  padding: 28px 0;
  border-block: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  position: relative;
}

.trust-bar::before,
.trust-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}

.trust-bar::before { left: 0; background: linear-gradient(90deg, var(--bg), transparent); }
.trust-bar::after { right: 0; background: linear-gradient(-90deg, var(--bg), transparent); }

.trust-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: trust-scroll 28s linear infinite;
}

.trust-track span {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

.trust-track span::before {
  content: "●";
  color: var(--red);
  font-size: 8px;
}

@keyframes trust-scroll {
  to { transform: translateX(-50%); }
}

/* How it works */
.hiw-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.hiw-card {
  position: relative;
  padding: 32px 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.3s ease;
}

.hiw-card:hover {
  border-color: var(--line-gold);
  background: var(--surface-2);
  transform: translateY(-4px);
}

.hiw-card::before {
  content: attr(data-step);
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-3);
}

.hiw-card .hiw-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--gold);
  margin-bottom: 22px;
}

.hiw-card h3 {
  font-size: 20px;
  margin-bottom: 10px;
}

.hiw-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .hiw-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .hiw-grid { grid-template-columns: 1fr; }
}

/* Production team */
.team-section {
  position: relative;
}

.team-viz {
  position: relative;
  width: min(96%, 760px);
  aspect-ratio: 1 / 1;
  margin: 0 auto;
}

.team-core {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 148px;
  height: 148px;
  border-radius: 50%;
  border: 1px solid var(--line-gold);
  background:
    radial-gradient(circle at 50% 30%, rgba(247, 184, 90, 0.18), transparent 55%),
    var(--surface-2);
  display: grid;
  place-items: center;
  box-shadow: 0 0 80px rgba(247, 184, 90, 0.12);
  z-index: 2;
}

.team-core img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}

.team-node {
  position: absolute;
  width: 164px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  text-align: center;
  z-index: 3;
  transition: all 0.3s ease;
}

.team-node:hover {
  border-color: var(--line-gold);
  background: var(--surface-2);
  transform: translate(-50%, -50%) scale(1.03);
}

.team-node b {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
  margin-bottom: 3px;
}

.team-node small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.4;
}

/* Nodes are children 3-8 (svg = child 1, .team-core = child 2). Each of the
   six positions matches an SVG connector endpoint so every line meets a node. */
.team-node:nth-child(3) { top: 8%;    left: 50%; transform: translate(-50%, -50%); } /* Researcher — top centre */
.team-node:nth-child(4) { top: 18%;   left: 78%; transform: translate(-50%, -50%); } /* Script doctor — upper right */
.team-node:nth-child(5) { top: 82%;   left: 78%; transform: translate(-50%, -50%); } /* Motion designer — lower right */
.team-node:nth-child(6) { top: 92%;   left: 50%; transform: translate(-50%, -50%); } /* Voice artist — bottom centre */
.team-node:nth-child(7) { top: 82%;   left: 22%; transform: translate(-50%, -50%); } /* Render engineer — lower left */
.team-node:nth-child(8) { top: 18%;   left: 22%; transform: translate(-50%, -50%); } /* Publisher — upper left */

.team-connections {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.team-connections line {
  stroke: rgba(247, 184, 90, 0.18);
  stroke-width: 1.5;
  stroke-dasharray: 6 4;
  animation: dash-flow 1.5s linear infinite;
}

.team-connections line:nth-child(2) { animation-delay: 0.25s; }
.team-connections line:nth-child(3) { animation-delay: 0.5s; }
.team-connections line:nth-child(4) { animation-delay: 0.75s; }
.team-connections line:nth-child(5) { animation-delay: 1s; }
.team-connections line:nth-child(6) { animation-delay: 1.25s; }

@keyframes dash-flow {
  to { stroke-dashoffset: -20; }
}

@media (max-width: 768px) {
  .team-viz { width: min(100%, 520px); }
  /* Compact role chips on mobile: the radial hexagon has too little vertical
     room for full description cards, so show the role title only. */
  .team-node {
    width: 108px;
    padding: 9px 10px;
  }
  .team-node b { font-size: 12px; margin-bottom: 0; }
  .team-node small { display: none; }
  .team-core { width: 92px; height: 92px; }
  .team-core img { width: 46px; height: 46px; }
  /* Keep the same endpoint percentages as the SVG lines so connectors stay attached. */
  .team-node:nth-child(3) { top: 8%;    left: 50%; transform: translate(-50%, -50%); }
  .team-node:nth-child(4) { top: 18%;   left: 78%; transform: translate(-50%, -50%); }
  .team-node:nth-child(5) { top: 82%;   left: 78%; transform: translate(-50%, -50%); }
  .team-node:nth-child(6) { top: 92%;   left: 50%; transform: translate(-50%, -50%); }
  .team-node:nth-child(7) { top: 82%;   left: 22%; transform: translate(-50%, -50%); }
  .team-node:nth-child(8) { top: 18%;   left: 22%; transform: translate(-50%, -50%); }
}

/* Pipeline bento */
.pipeline-bento {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  overflow: hidden;
}

.pipeline-rail {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pipeline-rail button {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  transition: all 0.2s ease;
}

.pipeline-rail button:hover,
.pipeline-rail button.active {
  background: var(--surface-2);
  border-color: var(--line-gold);
  color: var(--ink);
}

.pipeline-rail button i {
  font-family: var(--font-mono);
  font-size: 12px;
  font-style: normal;
  color: var(--muted-3);
}

.pipeline-rail button.active i {
  color: var(--gold);
}

.pipeline-rail button span {
  display: block;
  font-size: 12px;
  color: var(--muted-2);
}

.pipeline-preview {
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pipeline-preview video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-elevated-2);
}

.pipeline-label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.pipeline-label em {
  color: var(--gold);
  font-style: normal;
}

.pipeline-progress {
  height: 3px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}

.pipeline-progress i {
  display: block;
  height: 100%;
  width: 16.6%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 2px;
  transition: width 0.4s ease;
}

@media (max-width: 900px) {
  .pipeline-bento { grid-template-columns: 1fr; }
  .pipeline-rail { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .pipeline-rail button { min-width: 140px; flex-direction: column; gap: 6px; text-align: center; }
}

/* Control panel */
.control-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 20px;
}

.control-grid .bento-card {
  min-height: 320px;
}

.control-grid .bento-card:first-child {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.model-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
}

.model-row span {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.model-row select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink-soft);
  font-size: 13px;
  min-width: 160px;
}

.cost-total {
  font-family: var(--font-display);
  font-size: 56px;
  color: var(--ink);
  letter-spacing: -0.04em;
  margin: 10px 0 4px;
}

.cost-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.cost-list span {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
}

.cost-list i {
  height: 5px;
  background: var(--line);
  border-radius: 3px;
  overflow: hidden;
}

.cost-list i em {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 3px;
}

.queue-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.queue-list span {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
}

.queue-list b { color: var(--ink); font-weight: 600; }
.queue-list i { color: var(--muted); font-style: normal; }
.queue-list em { color: var(--gold); font-style: normal; font-weight: 700; }

@media (max-width: 1024px) {
  .control-grid { grid-template-columns: 1fr; }
}

/* Quality gate */
.quality-bento {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  overflow: hidden;
}

.quality-editor {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.quality-editor p {
  font-size: 22px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 20px 0;
}

.quality-editor button {
  display: inline;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px dashed var(--line-gold);
  background: var(--surface);
  color: var(--gold);
  font-weight: 700;
  cursor: pointer;
}

.quality-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quality-tags span {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.quality-preview {
  padding: 36px;
  background:
    radial-gradient(circle at 70% 20%, rgba(255, 48, 40, 0.08), transparent 45%),
    var(--surface);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.quality-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--line);
}

.quality-frame video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.quality-frame strong {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  font-family: var(--font-display);
  font-size: 20px;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.6);
}

.quality-timeline {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 6px;
}

.quality-timeline i {
  flex: 1;
  height: 100%;
  background: var(--line);
  border-radius: 3px;
}

.quality-timeline em {
  width: 24%;
  height: 100%;
  background: linear-gradient(90deg, var(--red), var(--gold));
  border-radius: 3px;
}

@media (max-width: 900px) {
  .quality-bento { grid-template-columns: 1fr; }
}

/* Proof */
.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 64px;
}

.proof-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.3s ease;
}

.proof-card:hover {
  border-color: var(--line-gold);
  transform: translateY(-4px);
}

.proof-card span {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.proof-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 40px;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.proof-card em {
  font-size: 13px;
  color: var(--gold);
  font-style: normal;
  font-weight: 600;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 20% 0%, rgba(247, 184, 90, 0.06), transparent 45%),
    var(--surface);
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  border-color: var(--line-gold);
  transform: translateY(-4px);
}

.testimonial-stars {
  color: var(--gold);
  font-size: 18px;
  margin-bottom: 18px;
}

.testimonial-card p {
  flex: 1;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 24px;
}

.testimonial-person {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
}

.testimonial-person b {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.testimonial-person small {
  color: var(--muted);
  font-size: 12px;
}

.testimonial-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-gold);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  width: fit-content;
}

@media (max-width: 1024px) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .proof-grid { grid-template-columns: 1fr; }
}

/* Compare table */
.compare-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
}

.compare-table th,
.compare-table td {
  padding: 20px 24px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.compare-table thead th {
  background: var(--bg-elevated);
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
}

.compare-table tbody th {
  font-weight: 500;
  color: var(--ink-soft);
}

.compare-table tbody td {
  color: var(--muted);
}

.compare-table tbody td.after {
  color: var(--green);
  font-weight: 600;
}

.compare-table tbody td.before {
  color: var(--muted-2);
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

/* Scale metrics */
.scale-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 20px;
}

.growth-card {
  position: relative;
  overflow: hidden;
}

.growth-card strong {
  font-family: var(--font-display);
  font-size: 64px;
  color: var(--ink);
  letter-spacing: -0.04em;
}

.growth-card svg {
  position: absolute;
  bottom: 28px;
  left: 28px;
  right: 28px;
  width: calc(100% - 56px);
  height: auto;
  opacity: 0.35;
}

.growth-card svg path {
  fill: none;
  stroke: var(--green);
  stroke-width: 3;
  stroke-linecap: round;
}

.savings-card strong {
  font-family: var(--font-display);
  font-size: 52px;
  color: var(--ink);
  letter-spacing: -0.04em;
}

.savings-card div {
  display: flex;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
}

.savings-card div:last-child { border-bottom: none; }
.savings-card b { color: var(--ink); font-size: 20px; }

.calendar-days {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.calendar-days i {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 4px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11px;
  color: var(--muted);
  font-style: normal;
}

.calendar-days b {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
}

@media (max-width: 1024px) {
  .scale-grid { grid-template-columns: 1fr; }
}

/* Pricing */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.price-card {
  padding: 36px 32px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transition: all 0.35s ease;
}

.price-card:hover {
  border-color: var(--line-gold);
  transform: translateY(-4px);
}

.price-card.featured {
  background:
    radial-gradient(circle at 50% 0%, rgba(255, 48, 40, 0.1), transparent 45%),
    radial-gradient(circle at 50% 100%, rgba(247, 184, 90, 0.08), transparent 45%),
    var(--surface-2);
  border-color: var(--line-gold);
  box-shadow: var(--shadow-glow-red);
}

.price-card span:first-child {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 8px;
}

.price-card h3 {
  font-size: 26px;
  margin-bottom: 20px;
}

.price-card strong {
  font-family: var(--font-display);
  font-size: 56px;
  color: var(--ink);
  letter-spacing: -0.04em;
  line-height: 1;
}

.price-card .period {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 24px;
}

.price-card ul {
  flex: 1;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.price-card li {
  position: relative;
  padding-left: 24px;
  font-size: 14px;
  color: var(--muted);
}

.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

.price-card .btn {
  width: 100%;
}

.pricing-note {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-note { grid-template-columns: 1fr; }
}

/* FAQ */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-item:hover {
  border-color: var(--line-strong);
}

.faq-item.active {
  border-color: var(--line-gold);
  background: var(--surface-2);
}

.faq-question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 24px;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
}

.faq-question svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--muted);
  transition: transform 0.3s ease;
}

.faq-item.active .faq-question svg {
  transform: rotate(180deg);
  color: var(--gold);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  padding: 0 24px 22px;
}

.faq-answer p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

/* Final CTA */
.final-cta {
  position: relative;
  padding: 100px 0;
  text-align: center;
  overflow: hidden;
}

.final-cta::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 48, 40, 0.12), transparent 60%);
  pointer-events: none;
}

.final-cta img {
  width: 100px;
  height: 100px;
  margin: 0 auto 28px;
  opacity: 0.9;
}

.final-cta h2 {
  max-width: 640px;
  margin: 0 auto 18px;
}

.final-cta p {
  max-width: 520px;
  margin: 0 auto 32px;
  color: var(--muted);
  font-size: 18px;
}

/* Footer */
.site-footer {
  padding: 80px 0 40px;
  border-top: 1px solid var(--line);
  background: var(--bg-elevated);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 60px;
}

.footer-brand p {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 320px;
}

.footer-links b {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 16px;
}

.footer-links a {
  display: block;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 10px;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--muted-2);
}

.footer-lang {
  display: flex;
  gap: 6px;
}

.footer-lang a {
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  transition: all 0.2s ease;
}

.footer-lang a.active {
  background: var(--surface-2);
  color: var(--ink);
}

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
}

@media (max-width: 640px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

/* Page-specific: Product */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.timeline-step {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.3s ease;
}

.timeline-step:hover {
  border-color: var(--line-gold);
  transform: translateX(6px);
}

.timeline-step > span {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--gold);
}

.timeline-step b {
  display: block;
  color: var(--ink);
  font-size: 17px;
  margin-bottom: 4px;
}

.timeline-step small {
  color: var(--muted);
  font-size: 13px;
}

.timeline-step em {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted-3);
  font-style: normal;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
}

.product-screen {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  overflow: hidden;
}

.screen-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
}

.screen-top strong {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--green-soft);
  background: var(--green-soft);
}

.screen-body {
  display: grid;
  grid-template-columns: 220px 1fr;
}

.screen-side {
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--surface);
}

.screen-side img {
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
}

.screen-side span {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
}

.screen-side span.active {
  background: var(--surface-2);
  color: var(--ink);
}

.screen-main {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.run-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.2s ease;
}

.run-row:hover {
  border-color: var(--line-gold);
}

.run-row > i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px var(--gold-glow);
}

.run-row b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 2px;
}

.run-row small {
  color: var(--muted);
  font-size: 12px;
}

.run-row em {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  color: var(--muted-2);
  font-style: normal;
}

.video-duo {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.demo-card {
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  transition: all 0.3s ease;
}

.demo-card:hover {
  border-color: var(--line-gold);
  transform: translateY(-4px);
}

.demo-card video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.demo-card h3 {
  padding: 22px 24px 8px;
  font-size: 20px;
}

.demo-card p {
  padding: 0 24px 24px;
  color: var(--muted);
  font-size: 14px;
}

.cta-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 48px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    radial-gradient(circle at 0% 0%, rgba(255, 48, 40, 0.08), transparent 45%),
    var(--surface);
}

.cta-band h2 {
  margin-bottom: 10px;
}

.cta-band p {
  color: var(--muted);
  max-width: 520px;
}

@media (max-width: 900px) {
  .screen-body { grid-template-columns: 1fr; }
  .screen-side { display: none; }
  .video-duo { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; text-align: center; }
}

@media (max-width: 640px) {
  .timeline-step { grid-template-columns: 48px 1fr; }
  .timeline-step em { display: none; }
}

/* Page-specific: Workflows */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.workflow-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.3s ease;
  position: relative;
}

.workflow-card:hover {
  border-color: var(--line-gold);
  transform: translateY(-4px);
}

.workflow-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 28px;
  right: 28px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.workflow-card:hover::before {
  opacity: 1;
}

.workflow-card b {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--ink);
  margin-bottom: 8px;
}

.workflow-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.split-screen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.rich-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.rich-list li {
  padding: 22px 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.rich-list b {
  color: var(--ink);
}

@media (max-width: 1024px) {
  .workflow-grid { grid-template-columns: repeat(2, 1fr); }
  .split-screen { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .workflow-grid { grid-template-columns: 1fr; }
}

/* Page-specific: Use cases */
.usecase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.case-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--surface);
  transition: all 0.3s ease;
}

.case-card:hover {
  border-color: var(--line-gold);
  transform: translateY(-4px);
}

.case-card strong {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-gold);
  background: var(--gold-soft);
  margin-bottom: 16px;
}

.case-card b {
  display: block;
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  margin-bottom: 10px;
}

.case-card span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .usecase-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .usecase-grid { grid-template-columns: 1fr; }
}

/* Feature grid (reused) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* Section split layout */
.section-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.section-split h2 {
  margin-bottom: 18px;
}

.section-split .section-copy {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
}

@media (max-width: 900px) {
  .section-split { grid-template-columns: 1fr; gap: 40px; }
}

/* Animations & reveals */
[data-reveal] {
  opacity: 1;
  transform: translateY(0);
}

.js [data-reveal].is-visible {
  animation: reveal-up 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.js [data-reveal="delay"].is-visible {
  animation-delay: 0.12s;
}

.js [data-reveal="delay-2"].is-visible {
  animation-delay: 0.22s;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.animate-pulse-glow {
  animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 40px rgba(247, 184, 90, 0.15); }
  50% { box-shadow: 0 0 70px rgba(247, 184, 90, 0.3); }
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Responsive */
@media (max-width: 1024px) {
  .section { padding: 90px 0; }
  .page-hero { padding: 120px 0 60px; }
  .hero { padding: 140px 0 80px; }
}

@media (max-width: 900px) {
  .site-header {
    padding: 10px 12px;
  }

  .nav-toggle {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 82px;
    left: 16px;
    right: 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(5, 5, 6, 0.96);
    backdrop-filter: blur(24px);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.25s ease;
  }

  body.nav-open .nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav a {
    padding: 14px 16px;
  }

  .nav-cta {
    display: block;
  }

  .header-actions .btn.primary {
    display: none;
  }

  body.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  body.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
}

@media (max-width: 640px) {
  :root {
    --shell: min(1200px, calc(100% - 28px));
  }

  .section { padding: 72px 0; }
  .page-hero { padding: 110px 0 50px; }
  .hero { padding: 120px 0 60px; }

  .hero-meta {
    gap: 20px;
    margin-top: 36px;
  }

  .hero-meta strong {
    font-size: 22px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .page-tabs {
    flex-direction: column;
    width: 100%;
  }

  .page-tabs a {
    text-align: center;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .cta-band {
    padding: 32px;
  }
}

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

  [data-reveal] {
    opacity: 1;
    transform: none;
  }

  .trust-track {
    animation: none;
  }
}

/* Admin SPA isolation guard */
.admin-body {
  background: var(--bg);
  color: var(--ink-soft);
}

.admin-body .site-header,
.admin-body .site-footer,
.admin-body .hero,
.admin-body .section,
.admin-body .brand,
.admin-body .brand-mark,
.admin-body .btn,
.admin-body .hero-actions,
.admin-body .section-copy,
.admin-body .section-kicker {
  all: revert;
}


/* Admin SPA additions */
.admin-body {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.admin-body .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.admin-body .btn:hover { transform: translateY(-1px); }

.admin-body .btn.primary {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
  box-shadow: 0 0 30px var(--red-glow);
}

.admin-body .btn.primary:hover {
  background: #ff4d3f;
  box-shadow: 0 0 40px var(--red-glow);
}

.admin-body .btn.ghost {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}

.admin-body .btn.ghost:hover {
  background: var(--surface);
  border-color: var(--line-gold);
  color: var(--ink);
}

.admin-body .btn:disabled,
.admin-body .btn[data-loading="true"] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.admin-sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px;
  border-right: 1px solid var(--line);
  background: var(--bg-elevated);
  display: flex;
  flex-direction: column;
  gap: 24px;
  overflow-y: auto;
}

.admin-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-sidebar-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
}

.admin-sidebar-toggle.mobile { display: none; }

.admin-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 10, 0.55);
  z-index: 90;
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.admin-sidebar .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.admin-sidebar .brand strong {
  display: block;
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--ink);
}

.admin-sidebar .brand small {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

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

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: var(--surface-2);
  color: var(--ink);
}

.admin-main {
  padding: 32px;
  overflow-x: hidden;
}

.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.admin-top h1 {
  font-size: clamp(32px, 4vw, 56px);
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.admin-top .section-copy {
  color: var(--muted);
  font-size: 16px;
  max-width: 640px;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}

.admin-panel {
  grid-column: span 6;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 24px;
}

.admin-panel.full {
  grid-column: 1 / -1;
}

.admin-panel.wide {
  grid-column: span 8;
}

.admin-panel .screen-top {
  margin: -24px -24px 24px;
  width: calc(100% + 48px);
}

.admin-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.admin-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-form .field.wide {
  grid-column: 1 / -1;
}

.admin-form .field > span {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink-soft);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
  border-color: var(--line-gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.admin-form textarea {
  resize: vertical;
  min-height: 120px;
}

.check-row {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.check-row label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  cursor: pointer;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--red);
}

.subtitle-config {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  overflow: hidden;
}

.subtitle-config.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.subtitle-config .screen-top {
  margin: 0;
  width: 100%;
}

.subtitle-config .config-grid {
  padding: 16px;
}

.subtitle-size-field {
  display: grid;
  grid-template-columns: 1fr 72px;
  gap: 12px;
  align-items: center;
}

.subtitle-size-field input[type="number"] {
  padding: 10px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  text-align: center;
}

.subtitle-style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.subtitle-style-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--ink-soft);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.subtitle-style-card:hover {
  border-color: var(--line-gold);
}

.subtitle-style-card.active {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px var(--gold-soft);
}

.subtitle-style-card b {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.subtitle-style-card small {
  font-size: 11px;
  color: var(--muted-2);
  line-height: 1.3;
}

.subtitle-style-mini {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated-2);
  overflow: hidden;
  margin-bottom: 4px;
}

.subtitle-style-mini span {
  font-size: 18px;
  font-weight: 800;
  white-space: nowrap;
}

.subtitle-preview {
  padding: 32px 24px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35em;
  text-align: center;
  background: radial-gradient(circle at 50% 0%, rgba(247, 184, 90, 0.08), transparent 55%), var(--surface);
  border-top: 1px solid var(--line);
}

.subtitle-preview .word {
  display: inline-block;
  font-size: clamp(24px, 4vw, var(--caption-size, 52px));
  font-weight: 800;
  color: var(--ink);
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
  animation-duration: 2.6s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}

/* Per-style preview animation tokens */
.subtitle-preview[data-style="clean-editorial"] .word,
.subtitle-preview[data-style="minimal-clean"] .word {
  animation-name: preview-fade-up;
  animation-delay: calc(var(--word-index) * 0.12s);
}

.subtitle-preview[data-style="word-pop"] .word,
.subtitle-preview[data-style="bold-impact"] .word {
  animation-name: preview-pop;
  animation-delay: calc(var(--word-index) * 0.18s);
}

.subtitle-preview[data-style="karaoke-focus"] .word {
  animation-name: preview-karaoke;
  animation-duration: 3s;
  animation-delay: calc(var(--word-index) * 0.28s);
}

.subtitle-preview[data-style="highlight-box"] .word {
  animation-name: preview-box;
  animation-duration: 3s;
  animation-delay: calc(var(--word-index) * 0.28s);
}

.subtitle-preview[data-style="premium-glow"] .word {
  color: var(--gold);
  text-shadow: 0 0 24px var(--gold-glow), 0 0 48px var(--red-glow);
  animation-name: preview-glow;
  animation-delay: calc(var(--word-index) * 0.18s);
}

.subtitle-preview[data-style="classic-cinema"] .word {
  color: #f5f1e8;
  animation-name: preview-dissolve;
  animation-delay: calc(var(--word-index) * 0.16s);
}

.subtitle-preview[data-style="tiktok-bounce"] .word {
  animation-name: preview-tiktok;
  animation-delay: calc(var(--word-index) * 0.16s);
}

.subtitle-preview[data-style="news-ticker"] {
  overflow: hidden;
  justify-content: flex-start;
}

.subtitle-preview[data-style="news-ticker"] .word {
  animation-name: preview-ticker;
  animation-duration: 5s;
  animation-timing-function: linear;
  animation-delay: calc(var(--word-index) * 0.5s);
}

.subtitle-preview[data-style="gradient-flow"] .word {
  background: linear-gradient(90deg, #ffbd66, #ff5e62, #ffbd66);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation-name: preview-gradient;
  animation-duration: 2.2s;
  animation-delay: calc(var(--word-index) * 0.12s);
}

.subtitle-preview[data-style="outline-punch"] .word {
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  animation-name: preview-outline;
  animation-delay: calc(var(--word-index) * 0.18s);
}

.subtitle-preview[data-style="mega-word"] {
  flex-wrap: nowrap;
}

.subtitle-preview[data-style="mega-word"] .word {
  color: var(--ink);
  -webkit-text-stroke: 3px var(--gold);
  paint-order: stroke fill;
  animation-name: preview-mega;
  animation-duration: 2.4s;
  animation-delay: calc(var(--word-index) * 0.7s);
}

.subtitle-preview[data-style="typewriter-mono"] {
  justify-content: flex-start;
  background: rgba(6, 10, 8, 0.78);
}

.subtitle-preview[data-style="typewriter-mono"] .word {
  color: #78ffc1;
  text-shadow: 0 0 12px rgba(120, 255, 193, 0.55);
  animation-name: preview-typewriter;
  animation-duration: 0.9s;
  animation-delay: calc(var(--word-index) * 0.45s);
}

/* Mini cards inherit style look */
.subtitle-style-mini[data-style="premium-glow"] span { color: var(--gold); text-shadow: 0 0 12px var(--gold-glow); }
.subtitle-style-mini[data-style="highlight-box"] span { padding: 0.1em 0.3em; border-radius: 6px; background: var(--red); color: #fff; }
.subtitle-style-mini[data-style="karaoke-focus"] span { background: linear-gradient(90deg, var(--gold) 50%, var(--muted-3) 50%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.subtitle-style-mini[data-style="mega-word"] span { font-size: 1.3em; -webkit-text-stroke: 1.5px var(--gold); color: var(--ink); }
.subtitle-style-mini[data-style="typewriter-mono"] span { padding: 0.1em 0.35em; border-radius: 4px; background: rgba(6,10,8,.78); color: #78ffc1; font-family: "Space Grotesk", monospace; }
.subtitle-style-mini[data-style="classic-cinema"] span { color: #f5f1e8; }
.subtitle-style-mini[data-style="tiktok-bounce"] span { color: #69c9d0; text-shadow: 2px 0 #ee1d52, -2px 0 #000; }
.subtitle-style-mini[data-style="gradient-flow"] span { background: linear-gradient(90deg, #ffbd66, #ff5e62); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.subtitle-style-mini[data-style="outline-punch"] span { color: transparent; -webkit-text-stroke: 1.5px var(--ink); }

@keyframes preview-fade-up {
  0% { opacity: 0; transform: translateY(12px); }
  20%, 80% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0.25; }
}

@keyframes preview-pop {
  0% { opacity: 0; transform: scale(0.35); }
  45% { opacity: 1; transform: scale(1.08); }
  60%, 85% { transform: scale(1); }
  100% { opacity: 0.35; }
}

@keyframes preview-karaoke {
  0%, 18% { color: var(--muted-3); }
  20%, 50% { color: var(--gold); text-shadow: 0 0 18px var(--gold-glow); }
  52%, 100% { color: var(--muted-3); }
}

@keyframes preview-box {
  0%, 18% { background: transparent; color: var(--ink); }
  20%, 50% { background: var(--red); color: #fff; border-radius: 6px; padding: 0.08em 0.22em; }
  52%, 100% { background: transparent; color: var(--ink); }
}

@keyframes preview-glow {
  0%, 40% { text-shadow: 0 0 24px var(--gold-glow), 0 0 48px var(--red-glow); }
  60% { text-shadow: 0 0 48px var(--gold), 0 0 80px var(--red-glow); }
  80%, 100% { text-shadow: 0 0 24px var(--gold-glow), 0 0 48px var(--red-glow); }
}

@keyframes preview-dissolve {
  0% { opacity: 0; filter: blur(4px); transform: translateY(8px); }
  25%, 75% { opacity: 1; filter: blur(0); transform: translateY(0); }
  100% { opacity: 0.4; }
}

@keyframes preview-tiktok {
  0%, 100% { transform: translate(0, 0) scale(1); text-shadow: 2px 0 #ee1d52, -2px 0 #000; }
  25% { transform: translate(0, -4px) scale(1.08); }
  50% { transform: translate(2px, 0) scale(1); }
  75% { transform: translate(-2px, 0) scale(1.04); }
}

@keyframes preview-ticker {
  0% { transform: translateX(120%); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateX(-120%); opacity: 0; }
}

@keyframes preview-gradient {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes preview-outline {
  0%, 100% { -webkit-text-stroke-color: var(--ink); text-shadow: none; }
  50% { -webkit-text-stroke-color: var(--gold); text-shadow: 0 0 20px var(--gold-glow); }
}

@keyframes preview-mega {
  0% { opacity: 0; transform: scale(2.2); }
  22% { opacity: 1; transform: scale(1); }
  32% { transform: scale(1.12); }
  42%, 78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(0.9); }
}

@keyframes preview-typewriter {
  0% { clip-path: inset(0 100% 0 0); opacity: 0.4; }
  15% { opacity: 1; }
  60%, 100% { clip-path: inset(0 0 0 0); opacity: 1; }
}

.voice-preview-control {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.voice-preview-control .btn {
  padding: 10px 18px;
  font-size: 13px;
}

.voice-preview-control small {
  font-size: 12px;
  color: var(--muted);
}

.provider-health-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.provider-health {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  cursor: default;
  transition: all 0.2s ease;
}

.provider-health.active {
  border-color: var(--line-gold);
  color: var(--ink);
}

.provider-health i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}

.provider-health.available i {
  background: #39ff14;
  box-shadow: 0 0 8px #39ff14, 0 0 14px rgba(57, 255, 20, 0.45);
  animation: neon-breathe 2.2s ease-in-out infinite;
}

.provider-health.unavailable i {
  background: #ff2d2d;
  box-shadow: 0 0 8px #ff2d2d, 0 0 14px rgba(255, 45, 45, 0.45);
  animation: neon-breathe 2.2s ease-in-out infinite;
}

.provider-warning {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--gold);
}

@keyframes neon-breathe {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.72; transform: scale(0.92); }
}

/* Create page — VidNext-inspired composer */
.create-panel {
  position: relative;
  padding-bottom: 0;
}

.create-layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 32px;
  align-items: start;
}

.create-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.create-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.create-mode {
  display: inline-flex;
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.create-mode-option {
  cursor: pointer;
  position: relative;
}

.create-mode-option input {
  position: absolute;
  opacity: 0;
}

.create-mode-option span {
  display: flex;
  flex-direction: column;
  padding: 7px 16px;
  border-radius: var(--radius-full);
  transition: all 0.2s ease;
}

.create-mode-option span b {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  line-height: 1.2;
}

.create-mode-option span small {
  font-size: 10px;
  color: var(--muted-2);
  line-height: 1.2;
}

.create-mode-option input:checked + span,
.create-mode-option.active span {
  background: var(--surface-2);
  box-shadow: 0 0 0 1px var(--line-gold), 0 4px 14px rgba(0,0,0,0.25);
}

.create-mode-option input:checked + span b,
.create-mode-option.active span b {
  color: var(--ink);
}

.create-header-actions {
  display: flex;
  gap: 10px;
  position: relative;
}

.create-header-actions .btn.sm {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
}

.create-header-actions .btn.sm small {
  color: var(--muted-2);
  font-weight: 500;
}

.stage-readiness-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.stage-readiness-badge.ready {
  border-color: var(--green-soft);
  color: var(--green);
  background: rgba(57, 255, 20, 0.06);
}

.stage-readiness-badge.ready i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}

.stage-readiness-badge.pending {
  border-color: var(--gold-soft);
  color: var(--gold);
  background: rgba(247, 184, 90, 0.08);
}

.stage-readiness-badge.pending i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.preset-popover,
.channel-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 280px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preset-popover b,
.channel-popover b {
  font-size: 14px;
}

.preset-popover span,
.channel-popover span {
  font-size: 12px;
  color: var(--muted);
}

.channel-popover input {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated-2);
  color: var(--ink-soft);
}

.prompt-composer {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.prompt-label {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  text-align: center;
}

.prompt-box {
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.prompt-box:focus-within {
  border-color: var(--line-gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.prompt-box textarea {
  width: 100%;
  min-height: 150px;
  padding: 20px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}

.prompt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 244, 232, 0.02);
}

.prompt-toolbar-group {
  display: inline-flex;
  padding: 3px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-elevated-2);
}

.toolbar-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.toolbar-btn:hover {
  color: var(--ink);
}

.toolbar-btn.active {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.prompt-toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--line);
}

.toolbar-select {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated-2);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.toolbar-select:focus {
  border-color: var(--line-gold);
}

.prompt-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}

.prompt-actions .btn.xs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
}

.prompt-actions .btn.xs.active {
  background: var(--red-soft);
  border-color: var(--red);
  color: var(--red);
}

.prompt-chars {
  margin-left: auto;
  font-size: 11px;
  color: var(--muted-2);
}

.user-asset-drawer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.user-asset-drawer[hidden] {
  display: none;
}

.user-asset-drawer .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.user-asset-drawer .field span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.user-asset-drawer textarea,
.user-asset-drawer input {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  outline: none;
}

.user-asset-drawer small {
  grid-column: 1 / -1;
  font-size: 11px;
  color: var(--muted-2);
}

.create-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.2s ease;
}

.option-card:hover {
  border-color: var(--line-gold);
  background: var(--surface);
}

.option-card.active {
  border-color: var(--line-gold);
  background:
    linear-gradient(135deg, rgba(247, 184, 90, 0.10), rgba(255, 48, 40, 0.06)),
    var(--surface);
  box-shadow: 0 0 20px rgba(247, 184, 90, 0.10);
}

.option-card input {
  position: absolute;
  opacity: 0;
}

.option-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  display: grid;
  place-items: center;
  color: var(--gold);
  flex-shrink: 0;
}

.option-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.option-body b {
  font-size: 13px;
  color: var(--ink);
}

.option-body small {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.35;
}

.quick-topics {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.quick-topics .chip {
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-topics .chip:hover {
  border-color: var(--line-gold);
  color: var(--ink);
  background: var(--surface);
}

.advanced-drawer {
  display: none;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  animation: drawer-in 0.3s ease;
}

.advanced-drawer.open {
  display: flex;
}

@keyframes drawer-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.advanced-drawer .config-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.advanced-drawer .field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.advanced-drawer .field > span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.advanced-drawer input,
.advanced-drawer select,
.advanced-drawer textarea {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated-2);
  color: var(--ink-soft);
  font-size: 13px;
  outline: none;
}

.advanced-drawer input:focus,
.advanced-drawer select:focus,
.advanced-drawer textarea:focus {
  border-color: var(--line-gold);
  box-shadow: 0 0 0 2px var(--gold-soft);
}

.what-next {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

.what-next h4 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--ink);
}

.what-next ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.what-next li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.what-next li b {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--line-gold);
  background: var(--gold-soft);
  color: var(--gold);
  display: grid;
  place-items: center;
  font-size: 11px;
  flex-shrink: 0;
}

.create-error {
  color: var(--red);
  font-size: 14px;
  min-height: 20px;
}

.create-sticky-bar {
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  margin: 24px -24px -24px;
  border-top: 1px solid var(--line);
  background: rgba(5, 5, 7, 0.82);
  backdrop-filter: blur(16px);
  z-index: 5;
}

.create-sticky-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.create-sticky-status strong {
  color: var(--gold);
}

.create-submit {
  min-width: 160px;
}

.create-submit[data-loading="true"]::after,
.preview-action[data-loading="true"]::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
}

.create-preview {
  position: sticky;
  top: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 30% 0%, rgba(247, 184, 90, 0.12), transparent 45%),
    var(--surface);
  box-shadow: var(--shadow-md), 0 0 60px rgba(247, 184, 90, 0.08);
  overflow: hidden;
}

.preview-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated-2);
  overflow: hidden;
}

.preview-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-gold);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.preview-play::before {
  content: "";
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 48, 40, 0.85);
  box-shadow: 0 0 40px var(--red-glow);
}

.preview-play::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-left: 16px solid #fff;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}

.preview-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.preview-body h3 {
  font-size: 20px;
}

.preview-meta {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.preview-meta li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
}

.preview-meta b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-credits {
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  text-align: center;
}

.preview-credits strong {
  display: block;
  font-family: var(--font-display);
  font-size: 44px;
  color: var(--ink);
  letter-spacing: -0.04em;
  line-height: 1;
}

.preview-credits span {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.preview-action {
  width: 100%;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Videos page */
.videos-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.videos-toolbar-left {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.videos-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.videos-search {
  position: relative;
  display: flex;
  align-items: center;
}

.videos-search svg {
  position: absolute;
  left: 12px;
  color: var(--muted-2);
}

.videos-search input {
  padding: 8px 12px 8px 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--ink-soft);
  font-size: 13px;
  min-width: 200px;
  outline: none;
}

.videos-search input:focus {
  border-color: var(--line-gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

.videos-filters .chip {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.videos-filters .chip:hover,
.videos-filters .chip.active {
  background: var(--surface-2);
  border-color: var(--line-gold);
  color: var(--ink);
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.videos-empty {
  grid-column: 1 / -1;
  padding: 64px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-lg);
  color: var(--muted);
}

.videos-empty b {
  display: block;
  color: var(--ink);
  font-size: 20px;
  margin-bottom: 8px;
}

.videos-empty span {
  display: block;
  margin-bottom: 20px;
}

.video-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.video-card:hover {
  transform: translateY(-6px);
  border-color: var(--line-gold);
  box-shadow: var(--shadow-glow-gold);
}

.video-card:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

.video-card-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated-2);
  overflow: hidden;
}

.video-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.video-card:hover .video-card-thumb img {
  transform: scale(1.05);
}

.video-card-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  background: rgba(3, 3, 5, 0.35);
}

.video-card:hover .video-card-play {
  opacity: 1;
}

.video-card-play::before {
  content: "";
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 48, 40, 0.9);
  box-shadow: 0 0 30px var(--red-glow);
}

.video-card-play::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-left: 14px solid #fff;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  margin-left: 3px;
}

.video-card-duration {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(3, 3, 5, 0.75);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink);
}

.video-card-format {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(3, 3, 5, 0.75);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.video-card-body {
  padding: 18px;
}

.video-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.video-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.video-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.video-card-top em {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  font-style: normal;
}

.video-card h4 {
  font-size: 17px;
  margin-bottom: 8px;
  line-height: 1.25;
}

.video-card p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 12px;
}

.video-card-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--muted-2);
}

.video-card-meta span {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
}

/* Modal */
.admin-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.admin-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.admin-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 3, 5, 0.75);
  backdrop-filter: blur(8px);
}

.admin-modal-panel {
  position: relative;
  width: 100%;
  max-width: 760px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 48, 40, 0.08), transparent 45%),
    var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  padding: 28px;
}

.admin-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 22px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-modal-close:hover {
  border-color: var(--line-gold);
  background: var(--surface-2);
}

.admin-modal-body h3 {
  font-size: 26px;
  margin-bottom: 18px;
  padding-right: 40px;
}

.modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.modal-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  color: var(--ink-soft);
}

.modal-meta > span > b {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal-meta > span > i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.modal-prompt {
  margin-bottom: 24px;
}

.modal-prompt b {
  display: block;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 8px;
}

.modal-prompt p {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.65;
}

.modal-player {
  margin-bottom: 24px;
}

.modal-player video {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-elevated-2);
  margin-bottom: 12px;
}

.modal-player.empty {
  padding: 48px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
}

.modal-status {
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-gold);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 13px;
  margin-bottom: 20px;
}

.modal-status b {
  display: block;
  margin-bottom: 4px;
}

.admin-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

/* Responsive admin */
@media (max-width: 1024px) {
  .admin-body {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--line);
  }

  .admin-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .admin-main {
    padding: 20px;
  }

  .admin-top {
    flex-direction: column;
    gap: 16px;
  }

  .create-layout {
    grid-template-columns: 1fr;
  }

  .create-preview {
    position: static;
  }

  .videos-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .admin-form,
  .create-form .config-grid,
  .create-form .config-grid.compact {
    grid-template-columns: 1fr;
  }

  .admin-panel {
    grid-column: 1 / -1;
  }

  .videos-grid {
    grid-template-columns: 1fr;
  }

  .videos-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .videos-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .admin-modal-panel {
    padding: 20px;
  }

  .admin-modal-actions {
    flex-direction: column;
  }

  .admin-modal-actions .btn {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(280px, 82vw);
    height: 100vh;
    transform: translateX(-100%);
    border-right: 1px solid var(--line);
    border-bottom: none;
    z-index: 100;
    transition: transform 0.25s ease;
  }

  .admin-sidebar.open {
    transform: translateX(0);
  }

  .admin-sidebar .admin-sidebar-toggle,
  .admin-sidebar-toggle.mobile {
    display: inline-flex;
  }

  .admin-sidebar-overlay {
    display: block;
  }

  .admin-body.sidebar-open .admin-sidebar-overlay {
    opacity: 1;
    pointer-events: auto;
  }

  .admin-top {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .admin-top > div {
    min-width: 0;
  }

  .admin-top h1 {
    font-size: clamp(26px, 7vw, 36px);
    margin-bottom: 4px;
  }

  .admin-top .section-copy {
    font-size: 13px;
  }

  .hero-actions {
    display: none;
  }
}


/* Admin sidebar v2 */
.admin-nav-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.admin-nav-group.soon-group a {
  color: var(--muted-2);
}

.admin-nav-group > span {
  padding: 0 14px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-2);
  margin-bottom: 6px;
}

.admin-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.2s ease;
}

.admin-nav a svg {
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.admin-nav a:hover,
.admin-nav a.active {
  background: var(--surface-2);
  color: var(--ink);
}

.admin-nav a:hover svg,
.admin-nav a.active svg {
  opacity: 1;
  color: var(--gold);
}

.admin-sidebar-footer {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-lang-switch {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--surface);
}

.admin-lang-switch button {
  flex: 1;
  padding: 6px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.admin-lang-switch button.active {
  background: var(--surface-2);
  color: var(--ink);
}

.admin-mini {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
}

.admin-mini b {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin: 8px 0 2px;
}

.admin-mini small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.45;
}

/* Placeholder sections */
.placeholder-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 420px;
  gap: 16px;
  background:
    radial-gradient(circle at 50% 0%, rgba(247, 184, 90, 0.08), transparent 45%),
    var(--surface);
}

.placeholder-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 1px solid var(--line-gold);
  background: var(--gold-soft);
  display: grid;
  place-items: center;
  color: var(--gold);
}

.placeholder-icon svg {
  width: 28px;
  height: 28px;
}

.placeholder-panel h2 {
  font-size: 26px;
}

.placeholder-panel p {
  max-width: 420px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.placeholder-badge {
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-gold);
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Runs monitor */
.runs-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.runs-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.runs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.runs-filters .chip {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.runs-filters .chip:hover,
.runs-filters .chip.active {
  background: var(--surface-2);
  border-color: var(--line-gold);
  color: var(--ink);
}

.runs-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.runs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.runs-table thead th {
  position: sticky;
  top: 0;
  padding: 14px 16px;
  text-align: left;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.runs-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  vertical-align: middle;
  white-space: nowrap;
}

.runs-table tbody tr:last-child td {
  border-bottom: none;
}

.runs-table tbody tr {
  transition: background 0.2s ease;
}

.runs-table tbody tr:hover {
  background: var(--surface);
  cursor: pointer;
}

.runs-table tbody tr:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: -2px;
}

.runs-table code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted-2);
  background: var(--surface);
  padding: 3px 6px;
  border-radius: 6px;
}

.runs-table .runs-actions {
  text-align: right;
}

.runs-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  white-space: normal;
}

.runs-empty b {
  display: block;
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 6px;
}

.run-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
}

.run-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-color, var(--muted-2));
  box-shadow: 0 0 12px var(--status-glow, transparent);
}

.run-detail-modal .admin-modal-panel {
  max-width: 880px;
}

.run-detail-body {
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 8px;
}

.run-detail-body h3 {
  font-size: 26px;
  margin-bottom: 14px;
  padding-right: 40px;
}

.run-detail-body h4 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink);
  margin-bottom: 14px;
}

.run-detail-meta .modal-meta {
  margin-bottom: 0;
}

.run-config-summary {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.run-stages,
.run-credits,
.run-artifacts,
.run-scene-plan {
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
}

.run-scene-plan .run-empty-note {
  margin: 4px 0 14px;
}

.scene-plan-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.scene-plan-row {
  display: grid;
  grid-template-columns: 76px 120px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  font-size: 12px;
}

.scene-plan-time {
  font-family: var(--font-mono);
  color: var(--muted);
}

.scene-plan-category {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  text-align: center;
  border: 1px solid var(--line);
  color: var(--muted-2);
}

.scene-plan-category.cat-motion { color: var(--gold); border-color: var(--gold-soft); background: var(--gold-soft); }
.scene-plan-category.cat-movie { color: #f5f1e8; border-color: rgba(245, 241, 232, 0.3); background: rgba(245, 241, 232, 0.08); }
.scene-plan-category.cat-anime { color: #ff8fb1; border-color: rgba(255, 143, 177, 0.3); background: rgba(255, 143, 177, 0.1); }
.scene-plan-category.cat-youtube { color: var(--red); border-color: var(--red-soft); background: var(--red-soft); }

.scene-plan-query {
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scene-plan-status {
  font-weight: 600;
  white-space: nowrap;
}

.scene-plan-status.status-ok { color: var(--green); }
.scene-plan-status.status-warn { color: var(--gold); }
.scene-plan-status.status-err { color: var(--red); }
.scene-plan-status.status-pending { color: var(--muted); }

@media (max-width: 640px) {
  .scene-plan-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

.run-stages-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stage-step {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.stage-step.current {
  border-color: var(--line-gold);
  background:
    radial-gradient(circle at 0% 0%, rgba(247, 184, 90, 0.08), transparent 45%),
    var(--bg-elevated);
}

.stage-step-main {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
}

.stage-step-order {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold);
}

.stage-step-info b {
  display: block;
  color: var(--ink);
  font-size: 14px;
  margin-bottom: 2px;
}

.stage-step-info span {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.stage-step-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stage-step-status em {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  font-style: normal;
}

.stage-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.stage-step-actions .btn.approve {
  border-color: var(--green-soft);
  color: var(--green);
}

.stage-step-actions .btn.approve:hover {
  background: var(--green-soft);
}

.stage-step-actions .btn.retry,
.stage-step-actions .btn.regenerate {
  border-color: var(--red-soft);
  color: var(--red);
}

.stage-step-actions .btn.retry:hover,
.stage-step-actions .btn.regenerate:hover {
  background: var(--red-soft);
}

.stage-step-actions .btn.sync,
.stage-step-actions .btn.execute {
  border-color: var(--gold-soft);
  color: var(--gold);
}

.stage-step-actions .btn.sync:hover,
.stage-step-actions .btn.execute:hover {
  background: var(--gold-soft);
}

.run-credits-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.run-credit-row {
  display: grid;
  grid-template-columns: 1fr auto 2fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  font-size: 13px;
}

.run-credit-stage {
  color: var(--ink);
  font-weight: 600;
}

.run-credit-amount {
  font-family: var(--font-mono);
  color: var(--gold);
  font-weight: 700;
}

.run-credit-reason {
  color: var(--muted);
  text-align: right;
}

.run-credits-total {
  margin-top: 12px;
  text-align: right;
  font-size: 13px;
  color: var(--muted);
}

.run-credits-total strong {
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 15px;
}

.run-artifacts-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.run-artifact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  flex-wrap: wrap;
}

.run-artifact-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 140px;
}

.run-artifact-main b {
  color: var(--ink);
  font-size: 13px;
}

.run-artifact-main span {
  font-size: 12px;
  color: var(--muted);
}

.run-artifact-key {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  background: var(--surface);
  padding: 4px 8px;
  border-radius: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-empty-note {
  padding: 18px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 768px) {
  .runs-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .runs-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .runs-table {
    min-width: 760px;
  }

  .stage-step-main {
    grid-template-columns: 36px 1fr;
    gap: 10px;
  }

  .stage-step-status {
    grid-column: 1 / -1;
    justify-content: space-between;
  }

  .stage-step-actions {
    justify-content: flex-start;
  }

  .run-credit-row {
    grid-template-columns: 1fr auto;
  }

  .run-credit-reason {
    grid-column: 1 / -1;
    text-align: left;
  }

  .run-artifact-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .run-artifact-key {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .run-detail-body h3 {
    font-size: 22px;
  }

  .stage-step-main {
    grid-template-columns: 1fr;
  }

  .stage-step-order {
    width: 28px;
    height: 28px;
  }
}

/* Worker monitor */
.worker-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.worker-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.worker-panel-head .section-kicker {
  margin-bottom: 10px;
}

.worker-panel-head h2 {
  font-size: clamp(22px, 2.5vw, 30px);
}

.worker-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.worker-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 64px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  border: 1px solid var(--line);
}

.worker-stat b {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
}

.worker-stat span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.worker-stat.pending b { color: var(--muted-2); }
.worker-stat.running b { color: var(--amber); }
.worker-stat.completed b { color: var(--green); }
.worker-stat.failed b { color: var(--red); }
.worker-stat.leases b { color: var(--gold); }

.worker-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.worker-slot {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-soft);
}

.worker-slot i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-3);
}

.worker-slot.active {
  border-color: var(--line-gold);
  background: var(--gold-soft);
  color: var(--gold);
}

.worker-slot.active i {
  background: var(--amber);
  box-shadow: 0 0 10px var(--gold-glow);
}

.worker-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.worker-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.worker-filters .chip {
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.worker-filters .chip:hover,
.worker-filters .chip.active {
  background: var(--surface-2);
  border-color: var(--line-gold);
  color: var(--ink);
}

.worker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.worker-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  transition: all 0.25s ease;
}

.worker-card:hover {
  border-color: var(--line-gold);
  background: var(--surface);
}

.worker-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.worker-card-type {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.worker-card-type b {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--ink);
  letter-spacing: -0.02em;
  word-break: break-word;
}

.worker-copy-id {
  align-self: flex-start;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
}

.worker-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--status-color);
  white-space: nowrap;
}

.worker-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--status-color);
  box-shadow: 0 0 10px var(--status-glow);
}

.worker-card-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}

.worker-field {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.worker-field.links {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.worker-field span {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-2);
}

.worker-field b {
  font-size: 13px;
  color: var(--ink-soft);
  font-weight: 600;
  word-break: break-word;
}

.worker-field.error b {
  color: var(--red);
  font-weight: 500;
}

.worker-id-link {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--line-gold);
  text-underline-offset: 2px;
}

.worker-id-link:hover {
  color: var(--ink);
}

.worker-empty {
  grid-column: 1 / -1;
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
}

.worker-empty b {
  display: block;
  color: var(--ink);
  font-size: 18px;
  margin-bottom: 6px;
}

.worker-empty span {
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 768px) {
  .worker-summary {
    justify-content: center;
  }

  .worker-slots {
    width: 100%;
    margin-left: 0;
    justify-content: center;
  }

  .worker-filters {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .worker-grid {
    grid-template-columns: 1fr;
  }

  .worker-card-body {
    grid-template-columns: 1fr;
  }
}

/* Vision locate review */
.vision-locate-controls {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 24px 24px;
}

.vision-locate-controls .field {
  flex: 1 1 320px;
  margin: 0;
}

.vision-locate-empty {
  margin: 0;
  padding: 16px 24px;
  color: var(--muted);
  font-size: 14px;
}

.vision-locate-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 0 24px 24px;
}

.vision-locate-grid .empty-state {
  grid-column: 1 / -1;
}

.vision-locate-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.vision-locate-card.status-editor-approved {
  border-color: var(--green-soft);
}

.vision-locate-card.status-failed {
  border-color: var(--red-soft);
}

.vision-locate-thumb {
  aspect-ratio: 16 / 9;
  background: var(--bg-elevated-2);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}

.vision-locate-thumb span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.04em;
}

.vision-locate-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1 1 auto;
}

.vision-locate-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.vision-locate-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  color: var(--muted);
}

.vision-locate-badge.confidence,
.vision-locate-badge.relevance {
  color: var(--gold);
  border-color: var(--gold-soft);
  background: var(--gold-soft);
}

.vision-locate-badge.status.candidate {
  color: var(--muted);
  border-color: var(--line);
  background: var(--bg-elevated);
}

.vision-locate-badge.status.editor-approved {
  color: var(--green);
  border-color: var(--green-soft);
  background: var(--green-soft);
}

.vision-locate-badge.status.failed {
  color: var(--red);
  border-color: var(--red-soft);
  background: var(--red-soft);
}

.vision-locate-description {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
}

.vision-locate-fields {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.vision-locate-fields b {
  display: block;
  color: var(--muted-2);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 10px;
  margin-bottom: 2px;
}

.vision-locate-actions {
  margin-top: auto;
  display: flex;
  gap: 8px;
}

.vision-locate-actions .btn.approve {
  border-color: var(--green-soft);
  color: var(--green);
}

.vision-locate-actions .btn.approve:hover {
  background: var(--green-soft);
}

@media (max-width: 1024px) {
  .vision-locate-grid {
    grid-template-columns: 1fr;
  }
}

/* Material mix sliders */
.material-mix { margin-top: 18px; }
.material-mix .screen-top { margin-bottom: 12px; }
.material-mix input[type="range"] {
  width: 100%;
  accent-color: var(--red);
  margin-top: 8px;
}
.material-mix .field span {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.material-mix .field b {
  font-weight: 600;
  color: var(--red);
}
.material-mix-total {
  margin-top: 10px;
  font-size: 12px;
  color: var(--muted);
  text-align: right;
}
.material-mix-total.warning {
  color: var(--gold);
  font-weight: 600;
}

.material-mix-note {
  margin: 14px 0 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px dashed var(--line);
  background: var(--bg-elevated);
  font-size: 12px;
  line-height: 1.55;
  color: var(--muted-2);
}


/* ============================================================
   TZ-82 — Landing enhancements: Live composer showcase +
   production-capability strip. Uses existing design tokens
   only; self-contained; prefers-reduced-motion honored.
   ============================================================ */
.composer-showcase {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.composer-panel {
  position: relative;
  padding: 26px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}
.composer-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 80% at 12% 0%, var(--red-soft), transparent 60%);
  opacity: .5;
  pointer-events: none;
}
.composer-panelhead {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.composer-panelhead b {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: .01em;
  color: var(--ink);
}
.composer-panelhead span {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.composer-prompt {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-strong);
  background: var(--bg-elevated);
  padding: 16px 18px;
  min-height: 96px;
}
.composer-prompt small {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--muted-3);
  margin-bottom: 8px;
}
.composer-prompt p {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.composer-prompt .type-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  vertical-align: -2px;
  margin-left: 2px;
  background: var(--red);
  animation: composer-caret 1s steps(1) infinite;
}
@keyframes composer-caret { 50% { opacity: 0; } }
.composer-controls {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.composer-controls span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  color: var(--muted);
}
.composer-controls span b {
  color: var(--ink-soft);
  font-weight: 600;
}
.composer-generate {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  border-radius: var(--radius-full);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  color: #0a0406;
  background: linear-gradient(90deg, var(--red), var(--amber));
  box-shadow: 0 12px 40px var(--red-soft);
}
.composer-generate .live-dot { background: #0a0406; box-shadow: none; }
.composer-result {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.composer-result video {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: 100%;
  object-fit: cover;
  display: block;
}
.composer-result-hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
  background: linear-gradient(180deg, rgba(3,3,5,.4), transparent 32%, transparent 58%, rgba(3,3,5,.8));
}
.composer-result-tag {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line-strong);
  background: rgba(3,3,5,.55);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.composer-result-stage {
  display: inline-block;
  height: 1.2em;
  line-height: 1.2em;
  overflow: hidden;
  vertical-align: -3px;
}
.composer-result-stage i {
  display: block;
  animation: composer-stage 14s infinite;
}
.composer-result-stage b {
  display: block;
  height: 1.2em;
  line-height: 1.2em;
  color: var(--gold);
  font-weight: 700;
}
@keyframes composer-stage {
  0%, 10%      { transform: translateY(0); }
  14.28%, 24.28% { transform: translateY(-14.2857%); }
  28.57%, 38.57% { transform: translateY(-28.5714%); }
  42.85%, 52.85% { transform: translateY(-42.8571%); }
  57.14%, 67.14% { transform: translateY(-57.1428%); }
  71.42%, 81.42% { transform: translateY(-71.4285%); }
  85.71%, 100%   { transform: translateY(-85.7142%); }
}
.composer-result-foot {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.composer-result-bar {
  height: 4px;
  border-radius: var(--radius-full);
  background: var(--surface-3);
  overflow: hidden;
}
.composer-result-bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--red), var(--gold));
  animation: composer-fill 14s linear infinite;
}
@keyframes composer-fill {
  0% { width: 4%; }
  92% { width: 100%; }
  100% { width: 100%; }
}
.composer-result-cap {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
}
.composer-caps {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.composer-caps span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border-radius: var(--radius-full);
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.composer-caps span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green-soft);
}
@media (max-width: 860px) {
  .composer-showcase { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .composer-controls { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .composer-prompt .type-caret { animation: none; }
  .composer-result-stage i { animation: none; transform: translateY(0); }
  .composer-result-bar i { animation: none; width: 100%; }
}

/* ==========================================================================
   GLOBAL MOBILE RESPONSIVENESS & TOUCH OPTIMIZATION (PUBLIC PAGES)
   ========================================================================== */
html, body {
  overflow-x: hidden;
  max-width: 100vw;
}

@media (max-width: 768px) {
  .shell {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .page-hero {
    padding-top: 100px !important;
    padding-bottom: 40px !important;
    text-align: left;
  }

  .page-hero h1 {
    font-size: 32px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.02em !important;
  }

  .page-lead {
    font-size: 16px !important;
    line-height: 1.5 !important;
  }

  .page-tabs {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px !important;
    margin-top: 24px !important;
    gap: 8px !important;
  }

  .page-tabs a {
    padding: 8px 16px !important;
    font-size: 13px !important;
    flex-shrink: 0;
  }

  .section-split {
    grid-template-columns: 1fr !important;
    gap: 36px !important;
  }

  .feature-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .timeline {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
  }

  .timeline-step {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 16px !important;
    gap: 12px !important;
  }

  .cta-band {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 28px 20px !important;
    gap: 20px !important;
  }

  .cta-band .btn {
    width: 100% !important;
    justify-content: center !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    gap: 12px !important;
    text-align: center;
  }

  .platform-form input,
  .platform-form select,
  .platform-form textarea {
    font-size: 16px !important; /* Prevents iOS auto-zoom on focus */
    min-height: 48px;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 12px 16px !important;
  }

  .brand span small {
    display: none;
  }

  .page-hero h1 {
    font-size: 27px !important;
  }

  .card {
    padding: 20px !important;
  }
}

