/* ============================================================
   Zenith-AI Design System — zenith.css
   Claude-inspired dark UI, zero Bootstrap dependencies
   ============================================================ */

/* --- Custom Properties (Design Tokens) -------------------- */
:root {
  --bg-base:        #1a1a1a;
  --bg-surface:     #212121;
  --bg-elevated:    #2a2a2a;
  --bg-active:      #333333;
  --bg-hover:       #2e2e2e;
  --border:         #3a3a3a;
  --border-subtle:  #2c2c2c;
  --text-primary:   #ececec;
  --text-secondary: #9b9b9b;
  --text-muted:     #636363;
  --accent:         #d97706;
  --accent-hover:   #b45309;
  --accent-light:   rgba(217,119,6,0.15);
  --user-bubble:    #1d3a5f;
  --user-bubble-border: #2d5a8f;
  --ai-bubble:      #212121;
  --code-bg:        #161616;
  --error:          #dc2626;
  --error-bg:       rgba(220,38,38,0.1);
  --success:        #16a34a;
  --success-bg:     rgba(22,163,74,0.1);
  --font-body:      'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:      'JetBrains Mono','Fira Code','Cascadia Code',monospace;
  --sidebar-width:  260px;
  --header-height:  60px;
  --radius-sm:      6px;
  --radius-md:      10px;
  --radius-lg:      14px;
  --radius-xl:      20px;
  --radius-full:    9999px;
  --shadow-sm:      0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:      0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:      0 8px 32px rgba(0,0,0,0.6);
  --transition:     0.2s ease;
}

/* --- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
ul { list-style: none; }
h1,h2,h3,h4,h5,h6 { font-weight: 600; line-height: 1.3; color: var(--text-primary); }

/* --- Scrollbar -------------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: var(--bg-active); }

/* --- Selection -------------------------------------------- */
::selection { background: var(--accent-light); color: var(--text-primary); }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.z-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.z-container-sm { width: 100%; max-width: 860px; margin: 0 auto; padding: 0 24px; }
.z-flex { display: flex; }
.z-flex-col { display: flex; flex-direction: column; }
.z-items-center { align-items: center; }
.z-justify-between { justify-content: space-between; }
.z-justify-center { justify-content: center; }
.z-gap-2 { gap: 8px; }
.z-gap-3 { gap: 12px; }
.z-gap-4 { gap: 16px; }
.z-gap-6 { gap: 24px; }
.z-text-center { text-align: center; }
.z-text-muted { color: var(--text-secondary); }
.z-mt-2 { margin-top: 8px; }
.z-mt-4 { margin-top: 16px; }
.z-mt-6 { margin-top: 24px; }
.z-mb-4 { margin-bottom: 16px; }
.z-mb-6 { margin-bottom: 24px; }
.z-hidden { display: none !important; }
.z-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ============================================================
   COMPONENTS — BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
  line-height: 1;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #fff;
}
.btn-ghost {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--bg-active);
}
.btn-surface {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}
.btn-surface:hover:not(:disabled) {
  background: var(--bg-active);
  color: var(--text-primary);
}
.btn-danger {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
}
.btn-sm { padding: 6px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: var(--radius-lg); }
.btn-icon {
  padding: 8px;
  border-radius: var(--radius-md);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon:hover { background: var(--bg-elevated); color: var(--text-primary); }
.btn-block { width: 100%; }

/* ============================================================
   COMPONENTS — INPUTS
   ============================================================ */
.z-input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}
.z-input::placeholder { color: var(--text-muted); }
.z-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.z-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  outline: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='%239b9b9b'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}
.z-select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.z-select option { background: var(--bg-elevated); color: var(--text-primary); }
.z-textarea {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  resize: vertical;
  min-height: 80px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  line-height: 1.5;
}
.z-textarea::placeholder { color: var(--text-muted); }
.z-textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-light); }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.form-group { margin-bottom: 16px; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ============================================================
   COMPONENTS — CARDS
   ============================================================ */
.z-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.z-card-sm { padding: 16px; }
.z-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.z-card-title i { color: var(--accent); font-size: 16px; }

/* ============================================================
   COMPONENTS — BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-accent { background: var(--accent-light); color: var(--accent); border: 1px solid rgba(217,119,6,0.3); }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-error { background: var(--error-bg); color: var(--error); }
.badge-muted { background: var(--bg-active); color: var(--text-secondary); }
.badge-pill { border-radius: var(--radius-full); padding: 2px 8px; font-size: 10px; }

/* ============================================================
   COMPONENTS — ALERTS
   ============================================================ */
.z-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}
.z-alert-error { background: var(--error-bg); border: 1px solid rgba(220,38,38,0.3); color: #f87171; }
.z-alert-success { background: var(--success-bg); border: 1px solid rgba(22,163,74,0.3); color: #4ade80; }
.z-alert-warning { background: var(--warning-bg, rgba(202,138,4,0.1)); border: 1px solid rgba(202,138,4,0.3); color: #fbbf24; }
.z-alert-info { background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.3); color: #60a5fa; }
/* Legacy Bootstrap alert compat */
.alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: 13px; margin-bottom: 16px; }
.alert-danger { background: var(--error-bg); border: 1px solid rgba(220,38,38,0.3); color: #f87171; }
.alert-success { background: var(--success-bg); border: 1px solid rgba(22,163,74,0.3); color: #4ade80; }

/* ============================================================
   COMPONENTS — MODAL / OVERLAY
   ============================================================ */
.z-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(4px);
  z-index: 900;
  align-items: center;
  justify-content: center;
}
.z-overlay.active { display: flex; }
.z-modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 90%;
  max-width: 420px;
  box-shadow: var(--shadow-xl);
  position: relative;
}
.z-modal-title { font-size: 17px; font-weight: 600; margin-bottom: 20px; }
.z-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.z-modal-close:hover { background: var(--bg-elevated); color: var(--text-primary); }

/* ============================================================
   COMPONENTS — TABS
   ============================================================ */
.z-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.z-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.z-tab:hover { color: var(--text-primary); background: var(--bg-elevated); }
.z-tab.active { color: var(--accent); border-bottom-color: var(--accent); background: transparent; }
.z-tab-content { display: none; }
.z-tab-content.active { display: block; }

/* ============================================================
   COMPONENTS — PRELOADER
   ============================================================ */
#preloader {
  position: fixed;
  inset: 0;
  background: var(--bg-base);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}
#preloader.fade-out { opacity: 0; pointer-events: none; }
#preloader::after {
  content: '';
  width: 36px;
  height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   COMPONENTS — SCROLL TO TOP
   ============================================================ */
#scroll-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 38px;
  height: 38px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 500;
  transition: all var(--transition);
  text-decoration: none;
  font-size: 18px;
}
#scroll-top.active { display: flex; }
#scroll-top:hover { background: var(--bg-active); color: var(--text-primary); border-color: var(--bg-active); }

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.z-header {
  position: sticky;
  top: 0;
  z-index: 800;
  height: var(--header-height);
  background: rgba(26,26,26,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  transition: box-shadow var(--transition);
}
.z-header.scrolled { box-shadow: 0 1px 20px rgba(0,0,0,0.5); }
.z-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.z-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text-primary);
}
.z-logo img { width: 28px; height: 28px; border-radius: var(--radius-sm); }
.z-logo-text { font-size: 16px; font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; }
.z-logo-text span { color: var(--accent); }
.z-nav { display: flex; align-items: center; gap: 4px; }
.z-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
  white-space: nowrap;
}
.z-nav a:hover, .z-nav a.active { color: var(--text-primary); background: var(--bg-elevated); }
.z-nav-actions { display: flex; align-items: center; gap: 8px; }
.z-nav-cta {
  padding: 7px 16px;
  background: var(--accent);
  color: #fff !important;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
}
.z-nav-cta:hover { background: var(--accent-hover) !important; color: #fff !important; }
.z-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}
.z-hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-secondary);
  border-radius: 2px;
  transition: all var(--transition);
}
.z-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.z-hamburger.open span:nth-child(2) { opacity: 0; }
.z-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav drawer */
.z-nav-drawer {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 700;
}
.z-nav-drawer.open { display: block; }
.z-nav-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.6);
}
.z-nav-drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--bg-surface);
  border-left: 1px solid var(--border);
  padding: 80px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.z-nav-drawer-panel a {
  display: block;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
}
.z-nav-drawer-panel a:hover { background: var(--bg-elevated); color: var(--text-primary); }
.z-nav-drawer-panel .btn { margin-top: 12px; }

/* ============================================================
   FOOTER
   ============================================================ */
.z-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
  margin-top: auto;
}
.z-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.z-footer-brand p { font-size: 13px; color: var(--text-secondary); margin: 12px 0; line-height: 1.7; max-width: 260px; }
.z-footer-socials { display: flex; gap: 10px; margin-top: 16px; }
.z-footer-socials a {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 15px;
  transition: all var(--transition);
  text-decoration: none;
}
.z-footer-socials a:hover { background: var(--accent-light); color: var(--accent); border-color: rgba(217,119,6,0.3); }
.z-footer-col h4 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.8px; color: var(--text-muted); margin-bottom: 14px; }
.z-footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color var(--transition);
  text-decoration: none;
}
.z-footer-col a:hover { color: var(--text-primary); }
.z-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-muted);
}
.z-status { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.z-status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px var(--success); animation: pulse-green 2s infinite; }
@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ============================================================
   LANDING PAGE — HERO
   ============================================================ */
.hero-section {
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(217,119,6,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--accent-light);
  border: 1px solid rgba(217,119,6,0.3);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 24px;
  letter-spacing: 0.3px;
}
.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse-green 2s infinite;
}
.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text-primary);
  margin-bottom: 20px;
}
.hero-title em { font-style: normal; color: var(--accent); }
.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.7;
}
.hero-ctas { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.hero-trust-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 5px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
}
.hero-trust-item i { color: var(--accent); font-size: 11px; }
.hero-trust-sep { width: 1px; height: 12px; background: var(--border); }

/* ============================================================
   LANDING PAGE — SECTION BASE
   ============================================================ */
.z-section { padding: 72px 0; }
.z-section-sm { padding: 48px 0; }
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent);
  margin-bottom: 12px;
  display: block;
}
.section-title {
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.section-subtitle { font-size: 15px; color: var(--text-secondary); max-width: 560px; line-height: 1.7; }
.section-header { margin-bottom: 48px; }

/* ============================================================
   LANDING PAGE — FEATURES GRID
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent-light), transparent 60%);
  opacity: 0;
  transition: opacity var(--transition);
}
.feature-card:hover { border-color: rgba(217,119,6,0.3); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-card:hover::after { opacity: 1; }
.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  margin-bottom: 18px;
  position: relative;
  z-index: 1;
}
.icon-teal { background: rgba(20,184,166,0.15); color: #14b8a6; }
.icon-gold { background: rgba(234,179,8,0.15); color: #eab308; }
.icon-cyan { background: rgba(6,182,212,0.15); color: #06b6d4; }
.icon-violet { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.icon-purple { background: rgba(168,85,247,0.15); color: #a855f7; }
.icon-blue { background: rgba(59,130,246,0.15); color: #3b82f6; }
.feature-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; position: relative; z-index: 1; }
.feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; position: relative; z-index: 1; }
.feature-card p a { color: var(--accent); font-weight: 600; }
.feature-card p a:hover { color: var(--accent-hover); }

/* ============================================================
   LANDING PAGE — HOW IT WORKS
   ============================================================ */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 40px;
  left: calc(16.6% + 20px);
  right: calc(16.6% + 20px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border) 20%, var(--border) 80%, transparent);
}
.step-card { text-align: center; padding: 32px 24px; }
.step-number {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  background: var(--accent-light);
  border: 1px solid rgba(217,119,6,0.3);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}
.step-icon {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--accent);
  margin: 0 auto 20px;
}
.step-card h3 { font-size: 15px; font-weight: 600; margin-bottom: 10px; }
.step-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }

/* ============================================================
   LANDING PAGE — API SNIPPET
   ============================================================ */
.api-snippet-section { background: var(--bg-surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.api-snippet-wrapper {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 760px;
  margin: 0 auto;
}
.api-snippet-header {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.api-snippet-dots { display: flex; gap: 6px; }
.api-snippet-dots span { width: 12px; height: 12px; border-radius: 50%; }
.dot-red { background: #ff5f57; }
.dot-yellow { background: #febc2e; }
.dot-green { background: #28c840; }
.api-snippet-title { flex: 1; text-align: center; font-size: 12px; color: var(--text-muted); font-family: var(--font-mono); }
.api-snippet-copy {
  padding: 4px 12px;
  background: var(--bg-active);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition);
}
.api-snippet-copy:hover { background: var(--accent-light); color: var(--accent); }
.api-snippet-code {
  padding: 24px;
  margin: 0;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.8;
  color: #e2e8f0;
}
.tok-kw { color: #c792ea; }
.tok-str { color: #c3e88d; }
.tok-num { color: #f78c6c; }
.tok-cm { color: var(--text-muted); font-style: italic; }
.tok-op { color: #89ddff; }
.tok-fn { color: #82aaff; }
.tok-var { color: #f07178; }

/* ============================================================
   LANDING PAGE — MODELS GRID
   ============================================================ */
.models-filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.mfilter {
  padding: 7px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}
.mfilter:hover { border-color: var(--accent); color: var(--accent); }
.mfilter.active { background: var(--accent-light); border-color: rgba(217,119,6,0.4); color: var(--accent); }
.models-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.model-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.model-card:hover { border-color: rgba(217,119,6,0.3); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.model-card.coming-soon { opacity: 0.5; }
.model-card-top { display: flex; align-items: center; justify-content: space-between; }
.model-card h4 { font-size: 13px; font-weight: 600; line-height: 1.4; }
.model-meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); flex-wrap: wrap; }
.model-meta i { font-size: 11px; }
.model-try-btn {
  margin-top: auto;
  font-size: 12px;
  color: var(--accent);
  font-weight: 600;
  transition: color var(--transition);
}
.model-try-btn:hover { color: var(--accent-hover); }
.model-count-badge {
  display: inline-block;
  padding: 2px 8px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}
.provider-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge-llama { background: rgba(249,115,22,0.15); color: #f97316; }
.badge-qwen { background: rgba(16,185,129,0.15); color: #10b981; }
.badge-mistral { background: rgba(99,102,241,0.15); color: #6366f1; }
.badge-openai { background: rgba(16,163,127,0.15); color: #10a37f; }
.badge-google { background: rgba(66,133,244,0.15); color: #4285f4; }
.size-badge { font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: var(--radius-full); }
.size-tiny { background: rgba(107,114,128,0.2); color: #9ca3af; }
.size-small { background: rgba(59,130,246,0.15); color: #60a5fa; }
.size-medium { background: rgba(234,179,8,0.15); color: #fbbf24; }
.size-large { background: rgba(239,68,68,0.15); color: #f87171; }
.coming-soon-badge { font-size: 10px; color: var(--text-muted); background: var(--bg-active); padding: 2px 8px; border-radius: var(--radius-full); }
.model-card.hidden-filter { display: none; }

/* ============================================================
   LANDING PAGE — PRICING
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--transition);
  position: relative;
}
.pricing-card:hover { border-color: rgba(217,119,6,0.3); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pricing-card.featured {
  border-color: rgba(217,119,6,0.5);
  background: linear-gradient(135deg, var(--bg-surface), rgba(217,119,6,0.04));
  box-shadow: 0 0 0 1px rgba(217,119,6,0.2);
}
.pricing-card.best-value {
  border-color: rgba(99,102,241,0.4);
}
.pricing-label {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 14px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.pricing-label-popular { background: var(--accent); color: #fff; }
.pricing-label-value { background: #6366f1; color: #fff; }
.pricing-card h3 { font-size: 18px; font-weight: 700; }
.pricing-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 8px 0;
}
.pricing-price sup { font-size: 18px; font-weight: 600; color: var(--text-secondary); align-self: flex-start; margin-top: 4px; }
.pricing-price .amount { font-size: 42px; font-weight: 700; line-height: 1; letter-spacing: -1px; }
.pricing-price .period { font-size: 13px; color: var(--text-secondary); }
.pricing-features { list-style: none; margin: 12px 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pricing-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--text-secondary); }
.pricing-features li i { font-size: 14px; flex-shrink: 0; margin-top: 1px; }
.pricing-features li .bi-check-circle-fill { color: var(--success); }
.pricing-features li .bi-x-circle-fill { color: var(--text-muted); }
.pricing-features li .na { color: var(--text-muted); }
.pricing-features li strong { color: var(--text-primary); }
.pricing-cta { margin-top: auto; padding-top: 16px; }
.buy-btn {
  display: block;
  width: 100%;
  padding: 11px 20px;
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
}
.buy-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.featured .buy-btn { background: var(--accent); border-color: var(--accent); color: #fff; }
.featured .buy-btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
/* Razorpay button override */
.razorpay-payment-button { width: 100% !important; margin: 0 !important; }

/* ============================================================
   CHAT PAGE — LAYOUT
   ============================================================ */
.chat-layout {
  display: flex;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* Sidebar */
.chat-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform var(--transition);
}
.chat-sidebar-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.chat-sidebar-body { padding: 12px; flex: 1; overflow-y: auto; }
.chat-sidebar-section { margin-bottom: 20px; }
.chat-sidebar-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  padding: 0 4px;
  margin-bottom: 8px;
}
.chat-setting { margin-bottom: 12px; }
.chat-setting label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.chat-setting-val { font-size: 11px; color: var(--accent); font-weight: 600; }
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: box-shadow var(--transition);
}
input[type="range"]::-webkit-slider-thumb:hover { box-shadow: 0 0 0 4px var(--accent-light); }
.upgrade-notice {
  margin: 8px;
  padding: 12px;
  background: var(--accent-light);
  border: 1px solid rgba(217,119,6,0.25);
  border-radius: var(--radius-md);
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.upgrade-notice a { color: var(--accent); font-weight: 600; }

/* Main chat area */
.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-messages::-webkit-scrollbar { width: 4px; }

/* Message bubbles */
.user-message, .ai-message {
  max-width: 780px;
  width: 100%;
}
.user-message {
  align-self: flex-end;
  background: var(--user-bubble);
  border: 1px solid var(--user-bubble-border);
  border-radius: var(--radius-lg) var(--radius-lg) var(--radius-sm) var(--radius-lg);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.6;
  color: #dbeafe;
}
.ai-message {
  align-self: flex-start;
  background: var(--ai-bubble);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm) var(--radius-lg) var(--radius-lg) var(--radius-lg);
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-primary);
}
.ai-message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.ai-avatar {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  border: 1px solid rgba(217,119,6,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
}
.ai-name { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
/* Markdown content in messages */
.ai-message p { margin-bottom: 12px; }
.ai-message p:last-child { margin-bottom: 0; }
.ai-message ul, .ai-message ol { padding-left: 20px; margin-bottom: 12px; }
.ai-message li { margin-bottom: 4px; }
.ai-message h1, .ai-message h2, .ai-message h3 { margin: 16px 0 8px; }
.ai-message h1 { font-size: 18px; }
.ai-message h2 { font-size: 16px; }
.ai-message h3 { font-size: 14px; }
.ai-message code {
  background: var(--code-bg);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: #c3e88d;
}
.ai-message pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  overflow-x: auto;
  margin: 12px 0;
  position: relative;
}
.ai-message pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.6;
}
.ai-message blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 16px;
  margin: 12px 0;
  color: var(--text-secondary);
  font-style: italic;
}
.ai-message table { border-collapse: collapse; width: 100%; margin: 12px 0; font-size: 13px; }
.ai-message th, .ai-message td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.ai-message th { background: var(--bg-elevated); font-weight: 600; }
.ai-message hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
/* Notice message */
.ai-message.notice {
  background: transparent;
  border: 1px dashed var(--border);
  font-size: 13px;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
  padding: 12px;
}

/* Chat input area */
.chat-input-area {
  border-top: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 16px 24px;
}
.chat-input-wrapper {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
  max-width: 780px;
  margin: 0 auto;
}
.chat-input-wrapper:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}
.chat-system-prompt {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.chat-system-prompt-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}
.chat-system-prompt-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.chat-system-prompt-label i { font-size: 11px; color: var(--accent); }
.chat-system-prompt-arrow { font-size: 11px; color: var(--text-muted); transition: transform var(--transition); }
.chat-system-prompt.expanded .chat-system-prompt-arrow { transform: rotate(180deg); }
.chat-system-prompt-body {
  display: none;
  margin-top: 8px;
}
.chat-system-prompt.expanded .chat-system-prompt-body { display: block; }
.chat-system-prompt-body textarea {
  width: 100%;
  background: none;
  border: none;
  outline: none;
  color: var(--text-secondary);
  font-size: 13px;
  resize: none;
  padding: 0;
  min-height: 60px;
  max-height: 120px;
  line-height: 1.5;
  font-family: var(--font-body);
}
.chat-system-prompt-body textarea::placeholder { color: var(--text-muted); }
.chat-input-row {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 16px;
}
#user-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-size: 14px;
  resize: none;
  max-height: 200px;
  overflow-y: auto;
  line-height: 1.5;
  padding: 0;
  font-family: var(--font-body);
}
#user-input::placeholder { color: var(--text-muted); }
#send-button {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
#send-button:hover:not(:disabled) { background: var(--accent-hover); transform: scale(1.05); }
#send-button:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.chat-input-hint {
  text-align: center;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 8px;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
/* Send button spinner */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ============================================================
   CHAT PAGE — SIDEBAR OVERLAY (mobile)
   ============================================================ */
.chat-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 600;
}

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page-wrap {
  min-height: calc(100vh - var(--header-height));
  display: flex;
  align-items: stretch;
}
.auth-brand {
  width: 380px;
  flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.auth-brand::before {
  content: '';
  position: absolute;
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(217,119,6,0.06), transparent 70%);
  pointer-events: none;
}
.auth-brand-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 36px; }
.auth-brand-logo img { width: 36px; height: 36px; border-radius: var(--radius-sm); }
.auth-brand-logo span { font-size: 18px; font-weight: 700; }
.auth-brand h2 { font-size: 28px; font-weight: 700; line-height: 1.3; letter-spacing: -0.5px; margin-bottom: 14px; }
.auth-brand h2 em { font-style: normal; color: var(--accent); }
.auth-brand p { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 32px; }
.auth-stats { display: flex; flex-direction: column; gap: 12px; }
.auth-stat {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.auth-stat i { color: var(--accent); font-size: 16px; }
.auth-stat span { font-size: 13px; color: var(--text-secondary); }
.auth-form-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 40px;
  background: var(--bg-base);
}
.auth-form-card {
  width: 100%;
  max-width: 400px;
}
.auth-form-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.3px; }
.auth-subtitle { font-size: 14px; color: var(--text-secondary); margin-bottom: 28px; }
.auth-links { font-size: 13px; color: var(--text-secondary); margin-top: 16px; text-align: center; }
.auth-links a { color: var(--accent); font-weight: 600; }
.auth-links a:hover { color: var(--accent-hover); }

/* ============================================================
   PROFILE / DASHBOARD
   ============================================================ */
.profile-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.profile-user { display: flex; align-items: center; gap: 12px; }
.profile-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  border: 1px solid rgba(217,119,6,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  flex-shrink: 0;
}
.profile-name { font-size: 16px; font-weight: 600; }
.profile-email { font-size: 12px; color: var(--text-secondary); }
.profile-content { padding: 32px 24px; max-width: 900px; margin: 0 auto; }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.profile-section { margin-bottom: 20px; }
.api-key-display {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-secondary);
}
.api-key-text { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.api-key-actions { display: flex; gap: 4px; flex-shrink: 0; }
.model-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}
.models-chips { display: flex; flex-wrap: wrap; gap: 8px; }
/* Prism code block in profile */
.code-container { display: none; position: relative; }
.code-container.active { display: block; }
.copy-button {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 5px 12px;
  background: var(--bg-active);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  transition: all var(--transition);
  z-index: 10;
}
.copy-button:hover { background: var(--accent-light); color: var(--accent); }
/* Tab container styles */
.tab-container { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-button {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: -1px;
}
.tab-button:hover { color: var(--text-primary); }
.tab-button.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-button a { color: inherit; text-decoration: none; }

/* ============================================================
   RESPONSIVE — Tablet (≤1024px)
   ============================================================ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .steps-grid::before { display: none; }
  .z-footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .z-footer-brand { grid-column: span 2; }
  .profile-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE — Mobile (≤768px)
   ============================================================ */
@media (max-width: 768px) {
  :root { --header-height: 56px; }
  .z-nav { display: none; }
  .z-nav-actions { display: none; }
  .z-hamburger { display: flex; }
  .z-container, .z-container-sm { padding: 0 16px; }
  .hero-section { padding: 48px 0 40px; }
  .hero-title { letter-spacing: -1px; }
  .hero-ctas { flex-direction: column; align-items: stretch; max-width: 300px; margin-left: auto; margin-right: auto; }
  .hero-trust-sep { display: none; }
  .hero-trust { gap: 6px; }
  .z-section { padding: 48px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 16px; }
  .models-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .z-footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .z-footer-brand { grid-column: auto; }
  .z-footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  /* Auth */
  .auth-brand { display: none; }
  .auth-form-wrap { padding: 32px 20px; align-items: flex-start; padding-top: 48px; }
  .auth-page-wrap { min-height: calc(100vh - var(--header-height)); }
  /* Chat */
  .chat-sidebar {
    position: fixed;
    left: 0;
    top: var(--header-height);
    height: calc(100vh - var(--header-height));
    z-index: 650;
    transform: translateX(-100%);
    width: 280px;
    box-shadow: var(--shadow-lg);
  }
  .chat-sidebar.open { transform: translateX(0); }
  .chat-sidebar-overlay.show { display: block; }
  .chat-messages { padding: 16px; }
  .user-message, .ai-message { max-width: 100%; }
  .chat-input-area { padding: 12px 16px; }
}

/* ============================================================
   RESPONSIVE — Small Mobile (≤480px)
   ============================================================ */
@media (max-width: 480px) {
  .hero-badge { font-size: 11px; }
  .api-snippet-code { font-size: 12px; padding: 16px; }
  .z-modal { padding: 24px 20px; }
  .z-footer { padding: 32px 0 16px; }
}

/* ============================================================
   PAGE-SPECIFIC OVERRIDES
   ============================================================ */
/* Ensure chat page has no scroll on body */
.chat-page { overflow: hidden; height: 100vh; }
.chat-page .z-footer { display: none; }

/* Landing page sections alternate background */
.alt-bg { background: var(--bg-surface); }

/* Policy / contact pages */
.content-page { padding: 60px 0; }
.content-page h1 { font-size: 32px; margin-bottom: 20px; }
.content-page h2 { font-size: 20px; margin: 28px 0 12px; }
.content-page p { color: var(--text-secondary); margin-bottom: 14px; line-height: 1.8; font-size: 14px; }

/* Chat header model selector */
.chat-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.chat-header-model {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.chat-header-model:hover { border-color: var(--accent); color: var(--text-primary); }
.chat-header-spacer { flex: 1; }

/* Loading typing indicator */
.typing-indicator {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 16px;
}
.typing-indicator span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: typing-bounce 1.2s infinite;
}
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Fade-in animation for messages */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.user-message, .ai-message { animation: fadeInUp 0.2s ease; }

/* Number input override for range-style inputs in sidebar */
.sidebar-number-input {
  width: 100%;
  padding: 7px 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition);
}
.sidebar-number-input:focus { border-color: var(--accent); }
