/* ============================================================
   Beacon · Spotify design language · full port
   Base #121212 · Surface #181818 · Elevated #1f1f1f
   Card #252525 · Green #1ed760 · Heavy shadows
   Inter 700/400 · Pill 9999 · Circle 50%
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Spotify surfaces */
  --bg-base: #121212;
  --bg-surface: #181818;
  --bg-elevated: #1f1f1f;
  --bg-card: #181818;
  --bg-card-hover: #282828;
  --bg-card-alt: #252525;
  --bg-input: #2a2a2a;
  --bg-sidebar: #000000;
  --bg-highlight: #2a2a2a;

  /* Legacy alias for compat (map old xAI names to Spotify) */
  --canvas: var(--bg-base);
  --canvas-soft: #1f1f1f;
  --canvas-card: var(--bg-card);
  --canvas-mid: #252525;
  --hairline: rgba(255,255,255,0.10);
  --hairline-soft: rgba(255,255,255,0.14);

  /* Text */
  --ink: #ffffff;
  --ink-hover: #ffffff;
  --text-base: #ffffff;
  --text-sub: #b3b3b3;
  --text-bright: #fdfdfd;
  --body: #b3b3b3;
  --body-mid: #b3b3b3;
  --mute: #7c7c7c;
  --text-negative: #f3727f;
  --text-warning: #ffa42b;
  --text-announcement: #539df5;

  /* Brand */
  --green: #1ed760;
  --green-hover: #1fdf64;
  --green-pressed: #169c46;
  --green-border: #1db954;
  --accent-sunset: var(--green);
  --accent-sunset-soft: #1fdf64;
  --accent-dusk: var(--text-warning);
  --accent-breeze: var(--text-announcement);
  --accent-twilight: #c4b5fd;
  --accent-midnight: #0d1726;

  /* Borders */
  --border: #4d4d4d;
  --border-light: #7c7c7c;
  --separator: rgba(255,255,255,0.10);

  /* Shadows - heavy on dark */
  --shadow-heavy: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-medium: 0 8px 8px rgba(0,0,0,0.3);
  --shadow-card: 0 8px 24px rgba(0,0,0,0.5);
  --inset-border: rgb(18,18,18) 0px 1px 0px, rgb(124,124,124) 0px 0px 0px 1px inset;

  /* Fonts - SpotifyMixUI fallback to Inter */
  --font-sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Radii - pill/circle system */
  --radius-sm: 8px;
  --radius-md: 8px;
  --radius-card: 8px;
  --radius-pill: 9999px;
  --radius-circle: 50%;
  --radius-input: 500px;

  /* Spacing - 8px base */
  --space-xxs: 2px;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;
  --content-max: 1200px;
  --ease: cubic-bezier(0.3, 0, 0, 1);
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
* { scrollbar-width: thin; scrollbar-color: #535353 transparent; }
html { scroll-behavior: smooth; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-base);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--green); color: #000; }
:focus-visible { outline: 2px solid var(--text-base); outline-offset: 2px; }
a { color: var(--text-base); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 400;
  background: var(--bg-elevated);
  border: 1px solid var(--separator);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-base);
}
img, svg { display: block; max-width: 100%; }
.hidden { display: none !important; }
.muted { color: var(--text-sub); }
.small { font-size: 12px; line-height: 16px; }
hr.soft { border: none; border-top: 1px solid var(--separator); margin: 16px 0; }
.spacer { flex: 1; }

/* ============================================================
   Topbar · Spotify nav - black sidebar feel, 14px 700/400
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  padding: 10px var(--space-xl);
  background: var(--bg-base);
  border-bottom: 1px solid var(--separator);
}
.topbar .brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-base);
  line-height: 1;
}
.topbar .brand a { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.logo-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: none;
  flex: none;
}
.topbar .nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: var(--space-xl);
}
.topbar .nav-links a {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-sub);
  letter-spacing: 0.1px;
  text-decoration: none;
}
.topbar .nav-links a:hover { color: var(--text-base); text-decoration: none; }
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.topbar #nav-auth { display: flex; align-items: center; gap: 8px; }

/* ============================================================
   Buttons · Spotify pill system
   Dark pill #1f1f1f white 700, Primary green, Outlined transparent
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.14px;
  color: var(--text-base);
  background: var(--bg-elevated);
  border: 1px solid transparent;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  text-decoration: none;
  box-shadow: none;
  transition: background 120ms, color 120ms, transform 120ms, border-color 120ms, box-shadow 120ms;
}
.btn:hover {
  background: #2a2a2a;
  transform: scale(1.02);
  text-decoration: none;
}
.btn:active { transform: scale(0.98); opacity: 0.9; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* Primary - Spotify green functional CTA */
.btn-primary {
  background: var(--green);
  color: #000000;
  border-color: var(--green);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 13px;
  padding: 12px 24px;
  box-shadow: none;
}
.btn-primary:hover {
  background: var(--green-hover);
  border-color: var(--green-hover);
  color: #000;
  transform: scale(1.03);
  box-shadow: var(--shadow-medium);
}
.btn-primary:active { background: var(--green-pressed); }

/* Light pill - for marketing contrast */
.btn-light {
  background: #ffffff;
  color: var(--bg-base);
  border-color: #ffffff;
}
.btn-light:hover { background: #f0f0f0; color: #000; }

/* Outline pill - transparent + #7c7c7c */
.btn-outline, .btn:not(.btn-primary):not(.btn-light) {
  /* base btn already dark pill, keep */
}
.btn.btn-outline {
  background: transparent;
  color: var(--text-base);
  border-color: var(--border-light);
}
.btn.btn-outline:hover { border-color: var(--text-base); background: transparent; }

/* Outline variant explicitly */
.btn[data-variant="outline"], .btn.outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-base);
}

/* Small */
.btn-sm {
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  letter-spacing: 0.5px;
}
.btn-block { width: 100%; }
.btn-danger {
  background: transparent;
  color: var(--text-negative);
  border: 1px solid rgba(243,114,127,0.4);
}
.btn-danger:hover { background: rgba(243,114,127,0.1); border-color: var(--text-negative); color: var(--text-negative); transform: none; }
.btn-ok {
  background: var(--green);
  color: #000;
  border-color: var(--green);
}
.btn-ok:hover { background: var(--green-hover); }
.btn-stop { color: var(--text-negative); }

/* Circular play button - Spotify signature */
.btn-circle, .btn-play {
  width: 48px; height: 48px;
  padding: 0;
  border-radius: var(--radius-circle);
  background: var(--green);
  color: #000;
  font-size: 18px;
  box-shadow: var(--shadow-medium);
}
.btn-circle:hover, .btn-play:hover { background: var(--green-hover); transform: scale(1.06); box-shadow: var(--shadow-heavy); }

/* ---------- Chips / badges · Spotify capsules  ---------- */
.badge, .chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: capitalize;
  line-height: 1;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 120ms, color 120ms, border-color 120ms;
}
.badge {
  cursor: default;
  font-size: 10.5px;
  font-weight: 600;
  text-transform: capitalize;
  background: var(--bg-elevated);
  color: var(--text-base);
}
.chip {
  background: var(--bg-elevated);
  color: var(--text-base);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0.2px;
  font-size: 13px;
  padding: 8px 14px;
}
.chip:hover { background: var(--bg-card-hover); color: var(--text-base); }
.chip.active, .chip-static {
  background: var(--text-base);
  color: var(--bg-base);
  font-weight: 700;
}
.badge.active { background: var(--green); color: #000; border-color: var(--green); }
.badge.warn { background: var(--text-warning); color: #000; border-color: var(--text-warning); }
.badge.danger { background: var(--text-negative); color: #fff; border-color: var(--text-negative); }
.badge.accent { background: var(--text-base); color: var(--bg-base); }
#approval-count.badge { padding: 2px 8px; font-size: 10px; font-weight: 700; background: var(--green); color: #000; }
.badge-warn { background: var(--text-warning) !important; color: #000 !important; }

/* status dots - Spotify: green active, grey offline */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  flex: none;
  background: var(--text-sub);
}
.status-dot.ready { background: var(--green); }
.status-dot.executing { background: var(--green); animation: pulse-green 1.4s ease-out infinite; }
.status-dot.training { background: var(--text-announcement); }
.status-dot.alert { background: var(--text-negative); }
.status-dot.offline { background: #535353; }
.status-text { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; }
.status-text.ready { color: var(--green); }
.status-text.offline { color: var(--text-sub); }
.status-text.executing { color: var(--green); }
@keyframes pulse-green {
  0% { box-shadow: 0 0 0 0 rgba(30,215,96,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(30,215,96,0); }
  100% { box-shadow: 0 0 0 0 rgba(30,215,96,0); }
}

/* ============================================================
   Landing · Spotify immersive, dense, card-driven
   ============================================================ */
.landing { background: var(--bg-base); }

/* hero - Spotify: big title 700, green accent functional */
.hero {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px var(--space-xl) 32px;
  text-align: left;
  background: linear-gradient(180deg, rgba(30,215,96,0.08) 0%, transparent 55%), var(--bg-base);
  border-radius: 8px;
}
@media (min-width: 900px) {
  .hero { padding: 64px var(--space-xl) 40px; text-align: center; }
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-sub);
  background: var(--bg-elevated);
  border: 1px solid transparent;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-lg);
}
.hero h1 {
  max-width: 760px;
  margin: 0 0 var(--space-md);
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -1.2px;
  color: var(--text-base);
}
@media (min-width: 900px) { .hero h1 { margin-left: auto; margin-right: auto; } }
.hero h1 .accent { color: var(--green); }
.hero > p {
  max-width: 560px;
  margin: 0 0 var(--space-xl);
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: var(--text-sub);
}
@media (min-width: 900px) { .hero > p { margin-left: auto; margin-right: auto; } }
.hero .cta { display: flex; gap: 12px; flex-wrap: wrap; }
@media (min-width: 900px) { .hero .cta { justify-content: center; } }
.hero .cta .btn-primary {
  font-size: 14px;
  padding: 14px 28px;
  letter-spacing: 1px;
}

/* hero demo - Spotify card preview with shadow */
.hero-demo {
  max-width: 720px;
  margin: 32px 0 0;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  overflow: hidden;
  text-align: left;
  box-shadow: var(--shadow-heavy);
}
@media (min-width: 900px) { .hero-demo { margin-left: auto; margin-right: auto; } }
.demo-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--separator);
}
.demo-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.demo-dot.amber { background: #ff5f56; }
.demo-dot.dim { background: #ffbd2e; }
.demo-dot.cyan { background: #27c93f; }
.demo-url {
  margin-left: 8px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-sub);
  letter-spacing: 0.2px;
}
.demo-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 160px;
  background: var(--bg-elevated);
}
.demo-bubble { max-width: 82%; padding: 12px 16px; border-radius: 8px; }
.demo-bubble.user { align-self: flex-end; background: var(--bg-card); box-shadow: var(--shadow-medium); }
.demo-bubble.agent { align-self: flex-start; background: #2a2a2a; border: 1px solid rgba(255,255,255,0.06); }
.demo-label { font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-sub); display: block; margin-bottom: 4px; }
.demo-bubble p { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-base); font-weight: 400; }
.demo-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-chips span {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-card);
  color: var(--text-base);
  border: 1px solid transparent;
}

/* trust strip - dense Spotify feature row */
.trust-strip {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 16px var(--space-xl);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.trust-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  box-shadow: none;
}
.trust-icon {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-elevated);
  color: var(--text-base);
  border-radius: var(--radius-circle);
  flex: none;
}
.trust-item div { display: flex; flex-direction: column; gap: 2px; }
.trust-item b { font-size: 14px; font-weight: 700; color: var(--text-base); line-height: 1.2; }
.trust-item span:last-child { font-size: 12px; font-weight: 400; line-height: 16px; color: var(--text-sub); }

/* section title - Spotify 24px 700 */
.section-title {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.4px;
  color: var(--text-base);
  margin: 0 0 8px;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  line-height: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-sub);
}
.section-sub {
  color: var(--text-sub);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  margin: 0 0 var(--space-xl);
}

/* marketplace - Spotify grid 24px gap, cards #181818 */
.marketplace {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 32px var(--space-xl);
}
.marketplace-cats, .agent-cats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.marketplace-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.mkt-card, .agent-card {
  background: var(--bg-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-radius: var(--radius-card);
  border: 1px solid transparent;
  box-shadow: none;
  transition: background 150ms, box-shadow 150ms;
}
.mkt-card:hover, .agent-card:hover {
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-medium);
}
.mkt-card h4, .agent-card h4 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 0;
  line-height: 1.2;
  color: var(--text-base);
}
.tagline { color: var(--text-sub); font-size: 13px; font-weight: 400; line-height: 18px; margin: 0; }
.mkt-desc { color: var(--text-sub); font-size: 13px; font-weight: 400; line-height: 20px; margin: 0; flex: 1; }
.mkt-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.mkt-price, .agent-card .price {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-sub);
}
.mkt-price.free { color: var(--green); }

/* pricing - Spotify plan cards */
.pricing {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 32px var(--space-xl);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  align-items: stretch;
}
.pricing .section-title { flex-basis: 100%; text-align: center; }
.pricing .eyebrow { flex-basis: 100%; text-align: center; }
.pricing .plan-card {
  flex: 1 1 320px;
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
  box-shadow: var(--shadow-medium);
}
.plan-card:hover { background: var(--bg-card-hover); }
.plan-card.featured {
  background: var(--bg-card);
  border-color: var(--green);
  box-shadow: var(--shadow-heavy);
  position: relative;
}
.plan-card.featured::before {
  content: "";
  position: absolute;
  top: -1px; left: -1px; right: -1px;
  height: 4px;
  background: var(--green);
  border-radius: var(--radius-card) var(--radius-card) 0 0;
}
.plan-popular {
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: var(--green);
  color: #000;
  padding: 4px 8px;
  border-radius: 4px;
  margin-bottom: 12px;
}
.plan-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-sub);
}
.plan-card h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; margin: 6px 0 0; color: var(--text-base); }
.plan-card .price { font-size: 32px; font-weight: 700; letter-spacing: -0.8px; line-height: 1; margin: 12px 0 16px; color: var(--text-base); }
.plan-card .price span { font-size: 14px; font-weight: 400; letter-spacing: 0; color: var(--text-sub); }
.plan-card ul { list-style: none; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 8px; }
.plan-card li { font-size: 14px; font-weight: 400; line-height: 20px; color: var(--text-base); display: flex; gap: 8px; }
.plan-card li::before { content: "✓"; color: var(--green); font-weight: 700; flex: none; }
.pricing-note {
  flex-basis: 100%;
  text-align: center;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-sub);
  margin: 8px 0 0;
}

/* steps + features + use-cases */
.steps, .features, .use-cases {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 32px var(--space-xl);
}
.steps-grid, .features-grid, .use-cases-grid {
  display: grid;
  gap: 16px;
  background: transparent;
  border: none;
  border-radius: 0;
  overflow: visible;
}
.steps-grid { grid-template-columns: repeat(3, 1fr); }
.features-grid { grid-template-columns: repeat(3, 1fr); }
.use-cases-grid { grid-template-columns: repeat(3, 1fr); }
.step, .feature, .use-card {
  background: var(--bg-card);
  padding: 20px;
  border-radius: var(--radius-card);
  box-shadow: none;
  border: 1px solid transparent;
  transition: background 150ms;
}
.step:hover, .feature:hover, .use-card:hover { background: var(--bg-card-hover); }
.step-icon {
  width: 32px; height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--text-base);
  border-radius: var(--radius-circle);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
  border: none;
}
.step-num {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--text-sub);
  margin-bottom: 8px;
  text-transform: uppercase;
}
.step h4, .feature h4, .use-card h4 { font-size: 16px; font-weight: 700; letter-spacing: -0.2px; margin: 0 0 8px; line-height: 20px; color: var(--text-base); }
.step p, .feature p, .use-card p, .use-card li { font-size: 14px; font-weight: 400; line-height: 20px; color: var(--text-sub); margin: 0; }
.use-card ul { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 6px; }
.use-card li { display: flex; gap: 8px; }
.use-card li::before { content: "•"; color: var(--text-sub); flex: none; }

/* faq - Spotify list */
.faq {
  max-width: 760px;
  margin: 0 auto;
  padding: 32px var(--space-xl);
}
.faq .section-title { margin-bottom: 24px; text-align: center; }
.faq .eyebrow { text-align: center; display: block; margin-bottom: 8px; }
.faq-item {
  border-top: 1px solid var(--separator);
  padding: 0;
}
.faq-item:last-child { border-bottom: 1px solid var(--separator); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-base);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--text-base);
  border-radius: var(--radius-circle);
  font-size: 16px;
  font-weight: 700;
  flex: none;
  transition: transform 180ms, background 120ms;
}
.faq-item[open] summary::after { content: "−"; background: var(--text-base); color: var(--bg-base); }
.faq-item p { margin: 0 0 16px; color: var(--text-sub); font-size: 14px; font-weight: 400; line-height: 20px; max-width: 62ch; }

/* cta band - Spotify green accent */
.cta-band {
  max-width: var(--content-max);
  margin: 32px auto;
  padding: 48px var(--space-xl);
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-base) 100%);
  border-radius: var(--radius-card);
  text-align: center;
  border: 1px solid var(--separator);
}
.cta-band .eyebrow { justify-content: center; display: flex; margin-bottom: 8px; }
.cta-band h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.6px;
  line-height: 1.1;
  margin: 0 0 8px;
  color: var(--text-base);
}
.cta-band p { color: var(--text-sub); font-size: 14px; font-weight: 400; margin: 0 0 24px; }

/* footer - Spotify dense */
.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 24px var(--space-xl) 32px;
  border-top: 1px solid var(--separator);
  color: var(--text-sub);
}
.footer-brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text-base); font-size: 14px; font-weight: 700; }
.footer-nav { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-nav a { font-size: 14px; font-weight: 400; color: var(--text-sub); text-decoration: none; }
.footer-nav a:hover { color: var(--text-base); text-decoration: underline; }
.footer-copy { font-size: 11px; font-weight: 400; color: var(--text-sub); }

/* reveal - keep lift but green-era subtle */
.reveal { opacity: 1; transform: translateY(8px); transition: transform 340ms var(--ease); }
.reveal.in { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .reveal { transform: none; } }

/* ============================================================
   Auth pages - Spotify card #181818, input #2a2a2a inset
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-base);
}
.auth-page-main {
  flex: 1;
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  padding: 48px var(--space-xl) 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-heading { text-align: center; margin-bottom: 24px; }
.auth-heading h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.6px; line-height: 1; margin: 0 0 8px; color: var(--text-base); }
.auth-heading p { margin: 0; font-size: 14px; font-weight: 400; color: var(--text-sub); }
.auth-box {
  background: var(--bg-card);
  border: 1px solid transparent;
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--shadow-heavy);
}
.auth-card h3 { font-size: 16px; font-weight: 700; margin: 0 0 16px; color: var(--text-base); }
.auth-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-base);
  letter-spacing: 0;
  text-transform: none;
}
.auth-card input, .auth-card textarea {
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 400;
  color: var(--text-base);
  background: var(--bg-input);
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 12px 14px;
  outline: none;
  width: 100%;
  transition: border-color 150ms, box-shadow 150ms;
  box-shadow: var(--inset-border);
}
.auth-card input:focus, .auth-card textarea:focus {
  background: #333333;
  border-color: var(--text-base);
  box-shadow: 0 0 0 1px var(--text-base);
}
.auth-card input::placeholder { color: var(--text-sub); }
.auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.auth-link { font-size: 14px; font-weight: 400; color: var(--text-base); text-decoration: underline; }
.auth-link:hover { color: var(--green); }
.auth-switch { text-align: center; margin: 24px 0 0; font-size: 14px; font-weight: 400; color: var(--text-sub); }
.auth-switch a { color: var(--text-base); font-weight: 700; text-decoration: underline; }
.auth-switch a:hover { color: var(--green); }
.form-error { color: var(--text-negative); font-size: 12px; font-weight: 700; min-height: 16px; margin-bottom: 8px; }
.form-ok {
  color: var(--text-base);
  font-size: 12px; font-weight: 400;
  border: 1px solid var(--green);
  background: rgba(30,215,96,0.1);
  padding: 12px;
  border-radius: 4px;
}
.legal { max-width: 720px; }
.legal h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.6px; margin: 0 0 8px; color: var(--text-base); }
.legal h2 { font-size: 16px; font-weight: 700; margin: 24px 0 8px; color: var(--text-base); }
.legal p { color: var(--text-sub); font-size: 14px; font-weight: 400; line-height: 22px; margin: 0 0 12px; }

/* ============================================================
   Dashboard · Spotify app shell - sidebar #000, main #121212
   ============================================================ */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr 360px;
  height: calc(100vh - 56px);
  background: var(--bg-base);
  gap: 8px;
  padding: 8px;
}
@media (max-width: 1100px) { .layout { grid-template-columns: 260px 1fr 320px; } }
body:has(.layout) { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: #000; }
body:has(.layout) .topbar { background: #000; border-bottom: none; }
body:has(.layout) .layout { flex: 1; min-height: 0; height: auto; background: #000; }
.layout.rail-hidden { grid-template-columns: 280px 1fr 0; }
.layout.rail-hidden .rail { display: none; }

/* sidebar - Spotify #121212 rounded */
.sidebar {
  background: var(--bg-base);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px;
  overflow: hidden;
}
.chat-search, #agent-search {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  background: var(--bg-input);
  border: 1px solid transparent;
  color: var(--text-base);
  padding: 10px 14px;
  border-radius: var(--radius-input);
  outline: none;
  box-shadow: var(--inset-border);
}
.chat-search::placeholder { color: var(--text-sub); }
.chat-search:focus { background: #333; border-color: var(--text-base); }
.setup-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid transparent;
}
.setup-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-sub);
  margin-bottom: 4px;
}
.setup-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-base);
  font-size: 13px;
  font-weight: 400;
  padding: 8px 10px;
  border-radius: 4px;
  cursor: pointer;
}
.setup-item:hover { background: var(--bg-elevated); }
.setup-item.done { color: var(--text-sub); }
.setup-check {
  width: 20px; height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--text-sub);
  border-radius: var(--radius-circle);
  font-size: 10px;
  font-weight: 700;
  flex: none;
}
.setup-item.done .setup-check { background: var(--green); color: #000; }
.chat-list { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; flex: 1; min-height: 60px; padding-right: 2px; }
.chat-group {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-sub);
  padding: 12px 8px 4px;
}
.chat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  background: transparent;
  border-radius: 4px;
  color: var(--text-sub);
  text-align: left;
  padding: 8px 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  border: 1px solid transparent;
}
.chat-item:hover { background: var(--bg-elevated); color: var(--text-base); }
.chat-item.active { background: var(--bg-highlight); color: var(--text-base); }
.chat-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-act {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  color: var(--text-sub);
  border-radius: var(--radius-circle);
  cursor: pointer;
  font-size: 12px;
  flex: none;
  opacity: 0;
}
.chat-item:hover .chat-act, .chat-item:focus-within .chat-act { opacity: 1; }
.chat-act:hover { background: var(--bg-input); color: var(--text-base); }
.chat-act.danger:hover { color: var(--text-negative); }
.chat-rename-input, .chat-title-input {
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg-input);
  border: 1px solid var(--text-base);
  color: var(--text-base);
  padding: 6px 10px;
  border-radius: 4px;
  outline: none;
  flex: 1;
}
.chat-empty {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-sub);
  padding: 16px;
  text-align: center;
  background: var(--bg-card);
  border-radius: var(--radius-card);
}
.chat-load-more, .load-earlier {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-base);
  background: var(--bg-elevated);
  border: 1px solid transparent;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  align-self: center;
  margin-top: 8px;
}
.chat-load-more:hover, .load-earlier:hover { background: #2a2a2a; transform: scale(1.02); }

/* quota - Spotify progress */
.quota-card {
  margin-top: auto;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: var(--text-sub);
  text-transform: uppercase;
}
.quota-bar { height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.quota-fill { height: 100%; background: var(--text-base); width: 0%; transition: width 300ms; border-radius: 2px; }
.quota-fill.warn { background: var(--green); }

/* chat main - Spotify main panel #121212 rounded */
.chat-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 16px;
  gap: 0;
  overflow: hidden;
  background: var(--bg-base);
  border-radius: var(--radius-card);
  background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, var(--bg-base) 30%), var(--bg-base);
}
.chat-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--separator);
  margin-bottom: 16px;
}
.chat-title { font-size: 16px; font-weight: 700; color: var(--text-base); letter-spacing: -0.2px; }
.thread {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 4px 4px 4px 0;
}
.thread::-webkit-scrollbar { width: 8px; }
.thread::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }
.welcome { margin: auto; text-align: center; max-width: 480px; padding: 24px 0; }
.welcome-icon {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green);
  color: #000;
  border-radius: var(--radius-circle);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  box-shadow: var(--shadow-medium);
}
.welcome-title { font-size: 20px; font-weight: 700; letter-spacing: -0.4px; margin-bottom: 8px; color: var(--text-base); }
.welcome-sub { color: var(--text-sub); font-size: 14px; font-weight: 400; line-height: 20px; margin-bottom: 20px; }
.welcome-hints { display: flex; flex-direction: column; gap: 8px; }
.welcome-hints button {
  text-align: left;
  background: var(--bg-card);
  border: 1px solid transparent;
  color: var(--text-base);
  padding: 12px 16px;
  border-radius: var(--radius-card);
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  box-shadow: none;
  transition: background 120ms;
}
.welcome-hints button:hover { background: var(--bg-card-hover); }

/* bubbles - Spotify message */
.bubble {
  max-width: 78%;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: none;
}
.bubble.user { align-self: flex-end; background: var(--bg-card); border: 1px solid rgba(255,255,255,0.06); }
.bubble.assistant { align-self: flex-start; background: transparent; border: none; max-width: 86%; }
.bubble-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px 6px;
}
.bubble-avatar {
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-circle);
  font-size: 10px;
  font-weight: 700;
  background: var(--bg-elevated);
  color: var(--text-sub);
  flex: none;
}
.bubble.user .bubble-avatar { background: var(--green); color: #000; }
.bubble-label { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-sub); }
.bubble-time { font-size: 11px; font-weight: 400; color: var(--text-sub); margin-left: auto; }
.bubble-body {
  padding: 0 12px 12px;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: var(--text-base);
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble.assistant .bubble-body { color: var(--text-base); }
.bubble-body p { margin: 0 0 10px; }
.bubble-body p:last-child { margin-bottom: 0; }
.bubble-body h3, .bubble-body h4 { font-size: 16px; font-weight: 700; margin: 16px 0 8px; color: var(--text-base); }
.bubble-body ul, .bubble-body ol { margin: 8px 0; padding-left: 20px; }
.bubble-body li { margin: 4px 0; color: var(--text-base); }
.bubble-body a { color: var(--text-base); text-decoration: underline; font-weight: 700; }
.bubble-body a:hover { color: var(--green); }
.bubble-body code { font-size: 12px; background: var(--bg-elevated); }
.codeblock { position: relative; margin: 12px 0; background: var(--bg-card); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow-medium); }
.codeblock pre { margin: 0; padding: 16px; overflow-x: auto; }
.codeblock code { background: transparent; border: none; padding: 0; }
.copy-btn { position: absolute; top: 8px; right: 8px; }
.bubble-meta { display: flex; gap: 8px; padding: 0 12px 12px; flex-wrap: wrap; }
.msg-editor {
  width: 100%;
  min-height: 80px;
  font-family: var(--font-sans);
  font-size: 14px;
  background: var(--bg-input);
  border: 1px solid var(--text-base);
  color: var(--text-base);
  padding: 12px;
  border-radius: 4px;
  outline: none;
  resize: vertical;
}
.status { align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--green); padding: 8px 0; }
.status.typing::after { content: "▍"; margin-left: 4px; animation: blink 1s step-end infinite; color: var(--green); }
@keyframes blink { 50% { opacity: 0; } }

/* clarify card - Spotify */
.clarify-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
  box-shadow: var(--shadow-medium);
  border: 1px solid var(--separator);
}
.clarify-title { font-size: 16px; font-weight: 700; color: var(--text-base); }
.clarify-sub { color: var(--text-sub); font-size: 12px; font-weight: 400; line-height: 16px; }
.clarify-form { display: flex; flex-direction: column; gap: 12px; }
.clarify-q { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 400; color: var(--text-base); }
.clarify-q-text { font-size: 14px; font-weight: 700; color: var(--text-base); }
.clarify-select, .clarify-input {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  background: var(--bg-input);
  border: 1px solid transparent;
  color: var(--text-base);
  padding: 12px;
  border-radius: 4px;
  outline: none;
  width: 100%;
  box-shadow: var(--inset-border);
}
.clarify-select:focus, .clarify-input:focus { border-color: var(--text-base); background: #333; }
.clarify-opts { display: flex; flex-direction: column; gap: 8px; }
.clarify-opt { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 400; color: var(--text-base); cursor: pointer; }
.clarify-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 12px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-sub);
  border: 1px solid var(--separator);
}
.approval-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
  box-shadow: var(--shadow-medium);
  border-left: 3px solid var(--text-warning);
}
.approval-title { font-size: 14px; font-weight: 700; color: var(--text-base); }
.approval-detail { color: var(--text-sub); font-size: 12px; font-weight: 400; line-height: 16px; }
.approval-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* composer - Spotify pill input + green send */
.composer {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--separator);
  margin-top: 16px;
}
.agent-pick {
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-elevated);
  border: 1px solid transparent;
  color: var(--text-base);
  padding: 10px 12px;
  border-radius: var(--radius-pill);
  outline: none;
  max-width: 140px;
}
.composer input {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 400;
  background: var(--bg-input);
  border: 1px solid transparent;
  color: var(--text-base);
  padding: 12px 16px;
  border-radius: var(--radius-input);
  outline: none;
  box-shadow: var(--inset-border);
}
.composer input:focus { background: #333; border-color: var(--text-base); }
.composer input::placeholder { color: var(--text-sub); }
.composer input:disabled { opacity: 0.5; }
.composer .btn-primary {
  background: var(--green);
  color: #000;
  border-radius: var(--radius-circle);
  width: 40px; height: 40px;
  padding: 0;
  font-size: 14px;
}
.composer .btn-primary:disabled { background: #535353; color: var(--text-sub); border-color: #535353; }

/* rail - Spotify right panel */
.rail {
  background: var(--bg-base);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tabs {
  display: flex;
  background: var(--bg-base);
  border-bottom: 1px solid var(--separator);
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 4px;
  gap: 4px;
}
.tab {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-sub);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
}
.tab:hover { color: var(--text-base); }
.tab.active { background: var(--text-base); color: var(--bg-base); }
.tab-panel { padding: 12px; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; }
.group-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-sub);
  margin: 8px 0 4px;
}
.agent-card .row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.agent-card .row .price { flex: 1; font-weight: 700; }
.agent-status { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 11px; font-weight: 700; }
.agent-detail .row { justify-content: space-between; font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--separator); }
.agent-detail .row:last-child { border-bottom: none; }
.agent-detail .row span:first-child { color: var(--text-sub); font-size: 12px; font-weight: 700; }

/* billing - Spotify */
.billing-card {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-medium);
}
.billing-card h4 { font-size: 16px; font-weight: 700; margin: 0 0 4px; color: var(--text-base); }
.billing-card .price { font-size: 28px; font-weight: 700; letter-spacing: -0.6px; line-height: 1; margin: 8px 0; color: var(--text-base); }
.billing-card .row { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; color: var(--text-sub); padding: 8px 0; border-bottom: 1px solid var(--separator); }
.billing-card .row:last-of-type { border-bottom: none; }
.billing-card .actions { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.addons { margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--separator); display: flex; flex-direction: column; gap: 6px; }
.addons-title { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-sub); }
.usage-box { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--separator); display: flex; flex-direction: column; gap: 10px; }
.usage-row { display: flex; flex-direction: column; gap: 6px; }
.usage-head { display: flex; justify-content: space-between; font-size: 11px; font-weight: 700; color: var(--text-sub); }
.sparkline { display: block; width: 100%; }
.sparkline rect { fill: var(--green); opacity: 0.8; }
.sparkline-wrap { background: var(--bg-base); border-radius: var(--radius-card); padding: 8px; }
.usage-by-agent { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 400; padding: 10px 0; border-bottom: 1px solid var(--separator); }
.usage-by-agent:last-child { border-bottom: none; }
.agent-name { color: var(--text-base); font-weight: 700; }
.payments { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--separator); }
.payment-row { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; font-size: 12px; padding: 10px 0; border-bottom: 1px solid var(--separator); }
.payment-row:last-child { border-bottom: none; }
.approval-group, .approval-history { display: flex; flex-direction: column; gap: 12px; }
.approval-row { display: flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 400; padding: 10px 0; border-bottom: 1px solid var(--separator); }
.approval-status { font-size: 11px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; }
.approval-status.approved { color: var(--green); }
.approval-status.rejected { color: var(--text-negative); }
.approval-row-title { flex: 1; color: var(--text-base); }

/* banner - Spotify */
.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-card);
  font-size: 13px;
  font-weight: 400;
  line-height: 18px;
  background: var(--bg-card);
  border: 1px solid var(--separator);
  margin-bottom: 16px;
}
.banner.amber { border-color: rgba(255,164,43,0.5); background: rgba(255,164,43,0.12); }
.banner.danger { border-color: rgba(243,114,127,0.5); background: rgba(243,114,127,0.12); }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--text-warning); }
.banner.danger .banner-dot { background: var(--text-negative); }

/* avatar - circular */
.avatar {
  width: 28px; height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-circle);
  background: #535353;
  color: var(--text-base);
  font-size: 11px;
  font-weight: 700;
}
.chip-email { font-size: 13px; font-weight: 400; color: var(--text-base); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#user-chip { display: inline-flex; align-items: center; gap: 8px; }

/* plan picker modal */
.plan-picker { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.plan-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--separator);
  border-radius: var(--radius-card);
  background: var(--bg-elevated);
  cursor: pointer;
  font-size: 14px;
  font-weight: 400;
}
.plan-option.current { border-color: var(--green); background: rgba(30,215,96,0.08); }
.plan-option input { accent-color: var(--green); }

/* admin - Spotify table */
.admin { max-width: 1100px; margin: 0 auto; padding: 24px var(--space-xl) 48px; }
.admin h2 {
  margin: 32px 0 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
  color: var(--text-base);
  display: flex;
  align-items: center;
  gap: 10px;
}
.admin h2::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; }
.stat-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.stat { background: var(--bg-card); padding: 16px; border-radius: var(--radius-card); box-shadow: var(--shadow-medium); }
.stat .num { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; line-height: 1; color: var(--text-base); }
.stat .lbl { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-sub); margin-top: 6px; }
.table-wrap { overflow-x: auto; background: var(--bg-card); border-radius: var(--radius-card); box-shadow: var(--shadow-medium); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--separator); white-space: nowrap; }
th { font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-sub); background: transparent; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg-card-hover); }
#audit-table { font-size: 12px; }
.row-form { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.row-form input {
  font-size: 14px;
  font-weight: 400;
  background: var(--bg-input);
  border: 1px solid transparent;
  color: var(--text-base);
  padding: 10px 14px;
  border-radius: 4px;
  outline: none;
  box-shadow: var(--inset-border);
}
.row-form input:focus { border-color: var(--text-base); background: #333; }

/* modal - Spotify heavy shadow */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.modal {
  background: var(--bg-card);
  border-radius: var(--radius-card);
  padding: 24px;
  max-width: 460px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-heavy);
  border: 1px solid var(--separator);
}
.modal h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; margin: 0 0 8px; color: var(--text-base); }
.modal p { color: var(--text-sub); font-size: 14px; font-weight: 400; line-height: 20px; margin: 0 0 16px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.modal-form { display: flex; flex-direction: column; gap: 12px; margin: 16px 0; }
.modal-form label { font-size: 14px; font-weight: 700; color: var(--text-base); display: flex; flex-direction: column; gap: 6px; }
.modal-form input, .modal-form textarea, .modal-form select {
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  background: var(--bg-input);
  border: 1px solid transparent;
  color: var(--text-base);
  padding: 12px;
  border-radius: 4px;
  outline: none;
  width: 100%;
  box-shadow: var(--inset-border);
}
.modal-form input:focus, .modal-form textarea:focus { border-color: var(--text-base); background: #333; }
.check-row { flex-direction: row !important; align-items: center; gap: 8px !important; font-size: 14px !important; font-weight: 400 !important; color: var(--text-base) !important; }
.check-row input { width: auto; accent-color: var(--green); }
.onboard-list { margin: 12px 0 0 20px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; font-weight: 400; line-height: 20px; color: var(--text-sub); }
.onboard-list b { color: var(--text-base); font-weight: 700; }

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--separator);
  color: var(--text-base);
  padding: 12px 20px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 700;
  z-index: 400;
  max-width: 92vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: var(--shadow-heavy);
}
.toast.danger { border-color: var(--text-negative); color: var(--text-negative); }

/* rail mobile */
.rail-fab, .rail-backdrop { display: none; }
.rail-toggle { font-size: 14px; font-weight: 700; }
.skeleton { opacity: 0.6; }

/* ============================================================
   Responsive - Spotify breakpoints
   ============================================================ */
@media (max-width: 1100px) {
  .trust-strip { grid-template-columns: repeat(2, 1fr); }
  .marketplace-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .steps-grid, .features-grid, .use-cases-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .topbar .nav-links { display: none; }
  .layout { grid-template-columns: 1fr; height: auto; gap: 0; padding: 0; }
  body:has(.layout) { overflow: auto; height: auto; background: var(--bg-base); }
  body:has(.layout) .topbar { background: var(--bg-base); border-bottom: 1px solid var(--separator); }
  .sidebar { border-radius: 0; border-bottom: 1px solid var(--separator); max-height: 40vh; background: var(--bg-base); }
  .chat-main { min-height: 58vh; border-radius: 0; }
  .rail { position: fixed; top: 56px; right: 0; bottom: 0; width: min(360px, 92vw); transform: translateX(100%); transition: transform 220ms var(--ease); z-index: 35; border-radius: 0; background: var(--bg-base); }
  body.rail-open .rail { transform: translateX(0); box-shadow: var(--shadow-heavy); }
  .rail-backdrop { display: block; position: fixed; inset: 56px 0 0 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 34; }
  .rail-backdrop.hidden { display: none; }
  .rail-fab { display: inline-flex; position: fixed; right: 16px; bottom: 16px; z-index: 33; width: 48px; height: 48px; align-items: center; justify-content: center; border-radius: var(--radius-circle); background: var(--green); color: #000; border: none; cursor: pointer; box-shadow: var(--shadow-heavy); font-weight: 700; }
  body.rail-open .rail-fab { display: none; }
}
@media (max-width: 640px) {
  .topbar { padding: 10px 16px; }
  #plan-badge { display: none !important; }
  .hero { padding: 32px 16px 24px; border-radius: 0; }
  .hero h1 { font-size: 32px; letter-spacing: -0.8px; }
  .trust-strip { grid-template-columns: 1fr; padding: 0 16px; }
  .marketplace, .pricing, .steps, .features, .use-cases, .faq, .cta-band { padding: 24px 16px; }
  .marketplace-grid, .steps-grid, .features-grid, .use-cases-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing .plan-card { max-width: none; }
  .composer { flex-wrap: wrap; }
  .agent-pick { max-width: none; flex: 1 1 100%; }
  .bubble { max-width: 92%; }
  .admin { padding: 16px; }
}
