:root {
  --bg-0: #07070b;
  --bg-1: #0c0c12;
  --bg-2: #14141d;
  --bg-3: #1c1c28;
  --line: #24243280;
  --line-strong: #2e2e40;
  --text: #e9e9f1;
  --text-dim: #a4a4b8;
  --text-faint: #6c6c80;
  --accent: #8b5cf6;
  --accent-2: #06b6d4;
  --accent-3: #f472b6;
  --accent-glow: 0 0 28px -4px rgba(139, 92, 246, 0.55);
  --danger: #ef4444;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-1: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 60px -20px rgba(0, 0, 0, 0.8);
  --mono: ui-monospace, "JetBrains Mono", "Fira Code", "SF Mono", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(139, 92, 246, 0.08), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(6, 182, 212, 0.06), transparent 60%),
    var(--bg-0);
}

/* ─── Aurora ───────────────────────────────────────────── */
.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  filter: blur(80px) saturate(140%);
  opacity: 0.55;
}
.aurora span {
  position: absolute;
  display: block;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  mix-blend-mode: screen;
  animation: drift 24s ease-in-out infinite;
}
.aurora span:nth-child(1) {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.55), transparent 60%);
  top: -15%;
  left: 60%;
}
.aurora span:nth-child(2) {
  background: radial-gradient(circle, rgba(6, 182, 212, 0.45), transparent 60%);
  bottom: -10%;
  left: -10%;
  animation-delay: -8s;
  animation-duration: 32s;
}
.aurora span:nth-child(3) {
  background: radial-gradient(circle, rgba(244, 114, 182, 0.35), transparent 60%);
  top: 35%;
  left: 35%;
  animation-delay: -16s;
  animation-duration: 40s;
}
@keyframes drift {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(60px, -40px) scale(1.15); }
}

/* ─── Topbar ───────────────────────────────────────────── */
.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px) saturate(150%);
  background: linear-gradient(180deg, rgba(7, 7, 11, 0.7), rgba(7, 7, 11, 0.35));
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.logo {
  font-size: 20px;
  filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.6));
}
.brand-name {
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 17px;
  background: linear-gradient(135deg, #fff, #c4b5fd 60%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.brand-tag {
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.02em;
}
.ghost-btn {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--line-strong);
  padding: 7px 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.ghost-btn:hover {
  color: var(--text);
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.08);
}

/* ─── Chat ─────────────────────────────────────────────── */
.chat {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 200px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ─── Hero ─────────────────────────────────────────────── */
.hero {
  text-align: center;
  padding: 60px 0 20px;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.hero h1 {
  font-size: clamp(28px, 4.5vw, 44px);
  margin: 0 0 18px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
}
.grad {
  background: linear-gradient(120deg, #c4b5fd 0%, #67e8f9 50%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% auto;
  animation: shimmer 8s linear infinite;
}
@keyframes shimmer {
  to { background-position: 200% center; }
}
.hero .sub {
  color: var(--text-dim);
  max-width: 560px;
  margin: 0 auto 32px;
  font-size: 15.5px;
}
.examples {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 640px;
  margin: 0 auto;
}
.chip {
  background: rgba(28, 28, 40, 0.7);
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.18s ease;
  backdrop-filter: blur(10px);
}
.chip:hover {
  color: var(--text);
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-1px);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Messages ─────────────────────────────────────────── */
.msg {
  animation: rise 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.msg.user {
  align-self: flex-end;
  max-width: 80%;
}
.msg.user .bubble {
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.18), rgba(6, 182, 212, 0.12));
  border: 1px solid rgba(139, 92, 246, 0.35);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 18px 18px 6px 18px;
  white-space: pre-wrap;
  word-wrap: break-word;
  box-shadow: var(--shadow-1);
}

.msg.assistant {
  align-self: stretch;
  max-width: 100%;
}
.msg.assistant .meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-faint);
  font-size: 12px;
  margin-bottom: 4px;
}
.msg.assistant .meta .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse 1.2s ease-in-out infinite;
}
.msg.assistant.done .meta .dot {
  background: #22c55e;
  box-shadow: 0 0 8px #22c55e;
  animation: none;
}
.msg.assistant.error .meta .dot {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
  animation: none;
}
.msg.assistant.stopped .meta .dot {
  background: #f59e0b;
  box-shadow: 0 0 8px #f59e0b;
  animation: none;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.prompt-card {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(20, 20, 29, 0.9), rgba(12, 12, 18, 0.95));
  box-shadow: var(--shadow-1), var(--accent-glow);
  overflow: hidden;
}
.prompt-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.4), rgba(6, 182, 212, 0.25), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.prompt-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.prompt-card-head .label {
  font-size: 12px;
  color: var(--text-faint);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
}
.prompt-card-head .actions {
  display: flex;
  gap: 6px;
}
.icon-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-dim);
  padding: 6px 10px;
  border-radius: 8px;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}
.icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
}
.icon-btn.copied {
  color: #22c55e;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.3);
}
.icon-btn svg {
  width: 14px;
  height: 14px;
}

.icon-btn.stop-btn {
  color: #fca5a5;
  border-color: rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
}
.icon-btn.stop-btn:hover {
  color: #fee2e2;
  border-color: rgba(239, 68, 68, 0.55);
  background: rgba(239, 68, 68, 0.18);
}
.icon-btn.stop-btn svg rect {
  fill: currentColor;
  stroke: none;
}

/* Show stop only while streaming, hide copy/.md while streaming */
.msg.assistant:not(.streaming) .stop-btn { display: none; }
.msg.assistant.streaming .copy-btn,
.msg.assistant.streaming .dl-btn { display: none; }

.prompt-body {
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.65;
  padding: 18px 20px;
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 70vh;
  overflow: auto;
  color: #d8d8e8;
}
.prompt-body::-webkit-scrollbar { width: 10px; }
.prompt-body::-webkit-scrollbar-track { background: transparent; }
.prompt-body::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border-radius: 999px;
  border: 2px solid var(--bg-1);
}
.prompt-body .caret {
  display: inline-block;
  width: 8px;
  height: 1.05em;
  background: var(--accent);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 1s steps(2) infinite;
  border-radius: 1px;
}
@keyframes blink { 50% { opacity: 0; } }

.thinking {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-faint);
  font-size: 13px;
  padding: 14px 20px;
}
.thinking .dots {
  display: inline-flex;
  gap: 4px;
}
.thinking .dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 1.2s infinite ease-in-out;
}
.thinking .dots span:nth-child(2) { animation-delay: 0.15s; }
.thinking .dots span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.prompt-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.015);
  color: var(--text-faint);
  font-size: 11.5px;
  font-family: var(--mono);
}

.error-card {
  border: 1px solid rgba(239, 68, 68, 0.35);
  background: rgba(239, 68, 68, 0.08);
  color: #fecaca;
  padding: 14px 18px;
  border-radius: var(--radius);
  font-size: 14px;
}

/* ─── Composer ─────────────────────────────────────────── */
.composer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding: 18px 20px 22px;
  background:
    linear-gradient(180deg, transparent, rgba(7, 7, 11, 0.85) 35%, var(--bg-0));
  backdrop-filter: blur(8px);
}
.composer-inner {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  max-width: 880px;
  margin: 0 auto;
  background: rgba(20, 20, 29, 0.85);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 10px 10px 10px 18px;
  box-shadow: var(--shadow-1);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  backdrop-filter: blur(14px);
}
.composer-inner:focus-within {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: var(--shadow-1), 0 0 0 4px rgba(139, 92, 246, 0.12);
}
#ideaInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  line-height: 1.55;
  padding: 8px 0;
  max-height: 240px;
  min-height: 24px;
}
#ideaInput::placeholder {
  color: var(--text-faint);
}
.send-btn {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0b14;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 8px 22px -10px rgba(139, 92, 246, 0.7);
  flex-shrink: 0;
}
.send-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px -10px rgba(139, 92, 246, 0.85);
}
.send-btn:active:not(:disabled) {
  transform: translateY(0);
}
.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--bg-3);
  color: var(--text-faint);
  box-shadow: none;
}
.send-btn.loading svg { display: none; }
.send-btn.loading::after {
  content: "";
  width: 14px;
  height: 14px;
  border: 2px solid rgba(11, 11, 20, 0.3);
  border-top-color: #0b0b14;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.composer-foot {
  max-width: 880px;
  margin: 8px auto 0;
  display: flex;
  justify-content: space-between;
  color: var(--text-faint);
  font-size: 11.5px;
}
.hint kbd {
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  border-bottom-width: 2px;
  padding: 1px 6px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-dim);
}
.model-pill {
  font-family: var(--mono);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  padding: 3px 10px;
  border-radius: 999px;
  color: var(--text-dim);
}

/* ─── Build-type picker ───────────────────────────────── */
.composer-foot {
  position: relative; /* anchor for the menu */
}
.foot-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11.5px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  padding: 3px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.pill-btn:hover,
.pill-btn[aria-expanded="true"] {
  color: var(--text);
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.1);
}
.pill-btn svg {
  opacity: 0.7;
  transition: transform 0.18s ease;
}
.pill-btn[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.pill-menu {
  position: absolute;
  right: 4px;
  bottom: calc(100% + 8px);
  min-width: 220px;
  background: rgba(20, 20, 29, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 18px 50px -16px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px) saturate(150%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  animation: rise 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pill-menu[hidden] {
  display: none;
}
.pill-menu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font: inherit;
  font-size: 13px;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-dim);
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.pill-menu-item:hover,
.pill-menu-item:focus-visible {
  outline: none;
  background: rgba(139, 92, 246, 0.12);
  color: var(--text);
}
.pill-menu-item small {
  color: var(--text-faint);
  font-size: 11px;
}
.pill-menu-item.is-selected::after {
  content: "✓";
  color: var(--accent);
  font-size: 13px;
}
.pill-menu-sep {
  height: 1px;
  background: var(--line);
  margin: 4px 2px;
}

@media (max-width: 600px) {
  .pill-menu {
    right: 50%;
    transform: translateX(50%);
    min-width: 200px;
  }
}

/* ─── Mobile ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .topbar { padding: 14px 16px; }
  .brand-tag { display: none; }
  .chat { padding: 20px 16px 220px; }
  .hero { padding: 30px 0 10px; }
  .composer { padding: 12px 14px 18px; }
  .msg.user { max-width: 92%; }
  .composer-foot { padding: 0 4px; }
  .hint { display: none; }
}

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

/* ════════════════════════════════════════════════════════
   SaaS chrome — buttons, topbar, account, usage
   ════════════════════════════════════════════════════════ */
a { color: inherit; }
.brand { text-decoration: none; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Shared button system (extends the existing ghost-btn) */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(28, 28, 40, 0.7);
  color: var(--text);
  transition: all 0.18s ease;
}
.cta-btn:hover {
  border-color: rgba(139, 92, 246, 0.6);
  background: rgba(139, 92, 246, 0.12);
  transform: translateY(-1px);
}
.cta-btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #0b0b14;
  border: none;
  box-shadow: 0 10px 26px -12px rgba(139, 92, 246, 0.8);
}
.cta-btn.primary:hover {
  filter: brightness(1.07);
  box-shadow: 0 14px 32px -12px rgba(139, 92, 246, 0.95);
}
.cta-btn.big { padding: 13px 26px; font-size: 15px; border-radius: 14px; }
.cta-btn.block { width: 100%; }
.cta-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.cta-btn.loading { opacity: 0.7; pointer-events: none; }
.ghost-btn.big { padding: 12px 24px; font-size: 15px; }
.ghost-btn { text-decoration: none; display: inline-flex; align-items: center; }

.nav-link {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  padding: 7px 10px;
  border-radius: 8px;
  transition: color 0.15s ease;
}
.nav-link:hover { color: var(--text); }

/* Usage pill */
.usage-pill {
  font-family: var(--mono);
  font-size: 11.5px;
  text-decoration: none;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 999px;
  transition: all 0.18s ease;
  white-space: nowrap;
}
.usage-pill:hover { color: var(--text); border-color: rgba(139, 92, 246, 0.5); }
.usage-pill.low { color: #fbbf24; border-color: rgba(245, 158, 11, 0.45); }
.usage-pill.out { color: #fca5a5; border-color: rgba(239, 68, 68, 0.5); background: rgba(239,68,68,0.08); }
.usage-pill.pro {
  color: #c4b5fd;
  border-color: rgba(139, 92, 246, 0.5);
  background: rgba(139, 92, 246, 0.1);
}

/* Account menu */
.account { position: relative; }
.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  padding: 4px 8px 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.18s ease;
}
.account-btn:hover { border-color: rgba(139, 92, 246, 0.55); color: var(--text); }
.avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #0b0b14;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}
.account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: rgba(20, 20, 29, 0.97);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 18px 50px -16px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(14px) saturate(150%);
  z-index: 6;
  display: flex;
  flex-direction: column;
  animation: rise 0.18s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.account-menu[hidden] { display: none; }
.account-email {
  font-size: 12px;
  color: var(--text-faint);
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
  word-break: break-all;
}
.account-item {
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-dim);
  font: inherit;
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
.account-item:hover { background: rgba(139, 92, 246, 0.12); color: var(--text); }

.upgrade-inline { margin-top: 12px; }

/* ════════════════════════════════════════════════════════
   Marketing landing
   ════════════════════════════════════════════════════════ */
.marketing { display: block; }
.cta-btn[hidden], [data-auth][hidden] { display: none !important; }

.landing {
  position: relative;
  z-index: 1;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 80px;
}
.lhero {
  text-align: center;
  padding: 70px 0 40px;
  animation: rise 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(139, 92, 246, 0.1);
  border: 1px solid rgba(139, 92, 246, 0.3);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 22px;
}
.lhero h1 {
  font-size: clamp(34px, 6vw, 60px);
  margin: 0 0 20px;
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.05;
}
.lhero .sub {
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 17px;
  line-height: 1.6;
}
.lhero .sub em { color: var(--text); font-style: italic; }
.lhero-cta {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.micro { color: var(--text-faint); font-size: 12.5px; margin-top: 14px; }

.demo-card {
  max-width: 720px;
  margin: 48px auto 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(20, 20, 29, 0.9), rgba(12, 12, 18, 0.96));
  box-shadow: var(--shadow-1), var(--accent-glow);
  overflow: hidden;
  text-align: left;
}
.demo-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.demo-head .dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.demo-head .dot.r { background: #ff5f57; }
.demo-head .dot.y { background: #febc2e; }
.demo-head .dot.g { background: #28c840; }
.demo-title {
  margin-left: 8px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.demo-body {
  margin: 0;
  padding: 20px 22px;
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.7;
  color: #d8d8e8;
  white-space: pre-wrap;
  word-break: break-word;
}
.demo-body .c-com { color: #7dd3fc; }
.demo-body .c-key { color: #f0abfc; }

.how { text-align: center; padding: 50px 0; }
.how h2, .pricing h2 {
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 38px;
}
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.step {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  background: rgba(20, 20, 29, 0.5);
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
.step:hover { border-color: rgba(139, 92, 246, 0.35); transform: translateY(-2px); }
.step-n {
  width: 34px; height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #0b0b14;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  margin-bottom: 14px;
}
.step h3 { margin: 0 0 8px; font-size: 18px; }
.step p { margin: 0; color: var(--text-dim); font-size: 14.5px; }
.step code { font-family: var(--mono); font-size: 12.5px; color: #c4b5fd; }

.pricing { text-align: center; padding: 40px 0; }
.pricing-sub { color: var(--text-dim); margin: -24px 0 38px; }
.plans {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 360px));
  gap: 20px;
  justify-content: center;
  align-items: stretch;
}
.plan {
  position: relative;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: 30px 28px;
  background: linear-gradient(180deg, rgba(20, 20, 29, 0.8), rgba(12, 12, 18, 0.92));
  text-align: left;
  display: flex;
  flex-direction: column;
}
.plan.featured {
  border-color: rgba(139, 92, 246, 0.55);
  box-shadow: var(--accent-glow);
}
.plan-badge {
  position: absolute;
  top: -12px;
  right: 24px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #0b0b14;
  background: linear-gradient(135deg, var(--accent), var(--accent-3));
  padding: 4px 12px;
  border-radius: 999px;
}
.plan-name { font-size: 15px; font-weight: 700; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }
.plan-price { margin: 10px 0 18px; }
.plan-price .amt { font-size: 40px; font-weight: 800; letter-spacing: -0.03em; }
.plan-price .per { color: var(--text-faint); font-size: 14px; margin-left: 4px; }
.plan-feats { list-style: none; padding: 0; margin: 0 0 24px; flex: 1; }
.plan-feats li {
  padding: 8px 0 8px 26px;
  position: relative;
  color: var(--text-dim);
  font-size: 14.5px;
  border-bottom: 1px solid var(--line);
}
.plan-feats li:last-child { border-bottom: none; }
.plan-feats li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent-2);
  font-weight: 700;
}
.plan-feats strong { color: var(--text); }

.lfooter {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding-top: 28px;
  color: var(--text-faint);
  font-size: 13px;
}

/* ════════════════════════════════════════════════════════
   Auth pages
   ════════════════════════════════════════════════════════ */
.auth-page, .account-page { display: block; }
.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 22px;
}
.auth-brand { gap: 8px; text-decoration: none; }
.auth-card {
  width: 100%;
  max-width: 400px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(20, 20, 29, 0.92), rgba(12, 12, 18, 0.96));
  box-shadow: var(--shadow-1), var(--accent-glow);
  padding: 32px 30px;
}
.auth-card h1 { font-size: 24px; margin: 0 0 6px; letter-spacing: -0.02em; }
.auth-sub { color: var(--text-dim); margin: 0 0 24px; font-size: 14px; }
.field { display: block; margin-bottom: 16px; }
.field > span {
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  background: var(--bg-1);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  padding: 11px 13px;
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.field input:focus {
  border-color: rgba(139, 92, 246, 0.6);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.field-hint { color: var(--text-faint); font-size: 11.5px; margin-top: 5px; display: block; }
.form-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
  font-size: 13px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 14px;
}
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 12px;
  margin: 20px 0 16px;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.oauth-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font: inherit;
  font-size: 14px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  padding: 11px;
  border-radius: 10px;
  cursor: not-allowed;
  opacity: 0.7;
}
.oauth-btn .soon {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  padding: 2px 6px;
  border-radius: 999px;
}
/* Enabled (anchor) variant — clickable, full opacity, hover affordance. */
a.oauth-btn.ready {
  cursor: pointer;
  opacity: 1;
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
a.oauth-btn.ready:hover {
  border-color: rgba(139, 92, 246, 0.55);
  background: rgba(139, 92, 246, 0.08);
}
.oauth-btn[hidden] { display: none; }
.auth-switch { text-align: center; color: var(--text-dim); font-size: 13.5px; margin: 20px 0 0; }
.auth-switch a { color: var(--accent); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ════════════════════════════════════════════════════════
   Account page
   ════════════════════════════════════════════════════════ */
.account-wrap {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.account-wrap h1 { font-size: 30px; letter-spacing: -0.02em; margin: 0 0 24px; }
.acct-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(20, 20, 29, 0.85), rgba(12, 12, 18, 0.93));
  box-shadow: var(--shadow-1);
  padding: 24px 26px;
  margin-bottom: 20px;
}
.acct-card h2 { font-size: 18px; margin: 0 0 6px; }
.acct-blurb { color: var(--text-dim); font-size: 14px; margin: 0 0 18px; }
.acct-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.acct-row:last-of-type { border-bottom: none; }
.acct-label { color: var(--text-dim); font-size: 14px; }
.acct-value { font-size: 14.5px; }
.plan-tag {
  font-family: var(--mono);
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--bg-3);
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
}
.plan-tag.pro {
  background: rgba(139, 92, 246, 0.12);
  border-color: rgba(139, 92, 246, 0.5);
  color: #c4b5fd;
}
.usage-bar {
  height: 8px;
  background: var(--bg-3);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 14px;
}
.usage-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
  transition: width 0.4s ease;
}
.usage-bar span.full { background: linear-gradient(90deg, #f59e0b, var(--danger)); }
.acct-card .cta-btn { margin-top: 4px; margin-right: 8px; }
.banner {
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 14px;
  margin-bottom: 16px;
}
.banner.success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}
.banner.muted {
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  color: var(--text-dim);
  margin-top: 14px;
  margin-bottom: 0;
}

/* ─── Email verify nudge + small links ───────────────────── */
.verify-nudge {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 9px 16px;
  font-size: 13px;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border-bottom: 1px solid rgba(245, 158, 11, 0.3);
}
.verify-nudge.ok {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.12);
  border-bottom-color: rgba(34, 197, 94, 0.35);
}
.verify-nudge button {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  font: inherit;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.verify-nudge button:hover { background: rgba(255, 255, 255, 0.08); }
.verify-nudge button:disabled { opacity: 0.5; cursor: default; }

.field-row { display: flex; justify-content: flex-end; margin: -6px 0 14px; }
.text-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 12.5px;
}
.text-link:hover { text-decoration: underline; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; }
  .plans { grid-template-columns: minmax(0, 420px); }
}
@media (max-width: 600px) {
  .brand-tag { display: none; }
  .topbar-right .nav-link[href="#pricing"] { display: none; }
  .lhero { padding: 40px 0 20px; }
}
