:root {
  --bg: #050816;
  --bg-soft: #0f172a;
  --card: rgba(15, 23, 42, 0.9);
  --soft: #111c34;
  --text: #eef2ff;
  --muted: #b7c0d8;
  --primary: #56d3ff;
  --primary-text: #06203a;
  --border: rgba(255,255,255,.09);
  --danger: rgba(239, 68, 68, .18);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: radial-gradient(circle at top, #172554 0%, var(--bg) 42%, #020617 100%);
  color: var(--text);
}
a { color: var(--primary); text-decoration: none; }
.wrapper { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 0;
  gap: 12px;
}
.nav-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 800; font-size: 1.2rem; letter-spacing: 0.02em; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 34px 0 12px;
}
.eyebrow {
  margin: 0 0 10px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: .78rem;
  font-weight: 800;
}
h1, h2, h3 { margin-top: 0; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.08; }
.lead { color: var(--muted); line-height: 1.7; font-size: 1.08rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 20px 50px rgba(0,0,0,.22);
  backdrop-filter: blur(10px);
}
.glass-card { min-height: 100%; }
.card-grid {
  display: grid;
  gap: 18px;
}
.three-up { grid-template-columns: repeat(3, 1fr); }
.section-gap { padding: 22px 0 36px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}
.stat-card span {
  display: block;
  font-size: .9rem;
  color: var(--muted);
  margin-bottom: 8px;
}
.stat-card strong { font-size: 1.25rem; }
.pricing-card .price { font-size: 2rem; font-weight: 800; margin-bottom: 12px; }
.pricing-card .price span { font-size: 1rem; color: var(--muted); font-weight: 600; }
.featured { outline: 2px solid rgba(86, 211, 255, 0.35); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 12px 18px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--primary-text); }
.btn-light { background: transparent; color: var(--text); border-color: var(--border); }
.full-btn { width: 100%; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.badge-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.badge {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.04);
  font-size: .88rem;
  color: var(--muted);
}
.feature-list { margin: 0; padding-left: 18px; line-height: 1.8; color: var(--muted); }
.feature-list.compact { line-height: 1.65; }
.center-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth-card { width: min(460px, 100%); }
input, textarea, select {
  width: 100%;
  margin: 8px 0 16px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--soft);
  color: var(--text);
}
label { display: block; font-weight: 600; }
.toggle-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.checkbox-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-weight: 500;
}
.checkbox-row input { width: auto; margin: 0; }
.alert {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--danger);
  border: 1px solid rgba(239,68,68,.32);
  margin-bottom: 16px;
}
.muted { color: var(--muted); }
.small { font-size: .9rem; }
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 20px;
}
.full-width { grid-column: 1 / -1; }
.answer-box {
  white-space: pre-wrap;
  background: rgba(2,6,23,.85);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  min-height: 220px;
  overflow-x: auto;
  line-height: 1.6;
}
.meta-line { min-height: 20px; margin-bottom: 10px; }
.history-list { display: grid; gap: 12px; }
.history-item {
  padding: 14px;
  border-radius: 16px;
  background: rgba(2, 6, 23, .75);
  border: 1px solid var(--border);
}
.history-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.table-wrap { overflow-x: auto; }
.admin-table {
  width: 100%;
  border-collapse: collapse;
}
.admin-table th, .admin-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.footer-links { display: flex; gap: 18px; padding: 20px 0 40px; color: var(--muted); }
.prose-card { max-width: 860px; }
.section-header { margin-bottom: 20px; }
@media (max-width: 980px) {
  .hero-grid, .dashboard-grid, .three-up, .stats-grid { grid-template-columns: 1fr; }
}

.warn-line { color: #fbbf24; min-height: 20px; margin-bottom: 10px; }
.success-box { padding: 12px 14px; border-radius: 14px; background: rgba(34,197,94,.14); border: 1px solid rgba(34,197,94,.28); margin-bottom: 16px; }
.dev-box { padding: 12px 14px; border-radius: 14px; background: rgba(59,130,246,.14); border: 1px solid rgba(59,130,246,.28); margin-bottom: 16px; word-break: break-all; }


.two-up { grid-template-columns: repeat(2, 1fr); }
.brand-stack { display: flex; flex-direction: column; gap: 8px; }
.brand-lockup { display: inline-flex; align-items: center; color: inherit; line-height: 0; }
.brand-plate {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  border-radius: 18px;
  background: rgba(255,255,255,.985);
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 10px 22px rgba(0,0,0,.14);
}
.brand-logo-wordmark {
  display: block;
  height: 60px;
  width: auto;
  max-width: min(100%, 272px);
}
.auth-brand { margin-bottom: 16px; display: flex; justify-content: center; }
.hero-brand-card { display: flex; flex-direction: column; justify-content: center; }
.hero-brand-shell { margin-bottom: 18px; }
.hero-brand-plate { width: 100%; padding: 22px; border-radius: 28px; }
.hero-brand-image { display: block; width: min(100%, 320px); height: auto; margin: 0 auto; }
.hero-brand-kicker {
  margin: 14px 0 0;
  color: var(--muted);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: .82rem;
}
.auth-card h1 { text-align: center; }
.auth-card > p.muted { text-align: center; }
.footer-links { flex-wrap: wrap; }
@media (max-width: 980px) {
  .two-up { grid-template-columns: 1fr; }
  .brand-plate { padding: 4px 6px; }
  .brand-logo-wordmark { height: 52px; max-width: min(100%, 238px); }
}


body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(34,197,94,.12), transparent 24%),
    radial-gradient(circle at 82% 16%, rgba(86,211,255,.12), transparent 22%),
    radial-gradient(circle at 68% 82%, rgba(139,92,246,.10), transparent 26%);
  pointer-events: none;
}
.wrapper, .center-screen { position: relative; z-index: 1; }
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 24px;
  background: rgba(5,8,22,.58);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 14px 36px rgba(0,0,0,.18);
}
.card, .history-item, .answer-box, input, textarea, select, .brand-plate {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}
.card:hover, .history-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 60px rgba(0,0,0,.26);
  border-color: rgba(86,211,255,.18);
}
.btn {
  gap: 8px;
  box-shadow: 0 10px 24px rgba(0,0,0,.16);
}
.btn-primary {
  background: linear-gradient(135deg, #56d3ff 0%, #7c3aed 100%);
  color: white;
}
.btn-light:hover { background: rgba(255,255,255,.06); }
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(86,211,255,.55);
  box-shadow: 0 0 0 4px rgba(86,211,255,.12);
}
.hero-grid { padding-top: 48px; }
.hero-grid > section h1 {
  max-width: 12ch;
  margin-bottom: 14px;
}
.hero-grid > section .lead { max-width: 64ch; }
.hero-brand-card {
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02)),
    radial-gradient(circle at top right, rgba(86,211,255,.18), transparent 34%),
    var(--card);
}
.hero-brand-plate {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94));
}
.hero-brand-image { width: min(100%, 390px); }
.pricing-card {
  position: relative;
  overflow: hidden;
}
.pricing-card::after {
  content: "";
  position: absolute;
  inset: auto -30% -45% auto;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(86,211,255,.18), transparent 65%);
}
.featured {
  outline: 1px solid rgba(86, 211, 255, 0.45);
  box-shadow: 0 24px 65px rgba(86,211,255,.12);
}
.dashboard-grid { align-items: start; }
.stats-grid { grid-template-columns: repeat(4, 1fr); }
.stat-card {
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(255,255,255,.02));
}
.stat-card strong { line-height: 1.4; }
.answer-box {
  background: linear-gradient(180deg, rgba(2,6,23,.92), rgba(4,10,34,.92));
  min-height: 260px;
}
.meta-line, .warn-line { line-height: 1.5; }
.history-item {
  background: linear-gradient(180deg, rgba(2,6,23,.82), rgba(9,16,40,.82));
}
.table-wrap {
  border-radius: 18px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.admin-table thead { background: rgba(255,255,255,.03); }
.footer-links {
  padding-top: 10px;
  padding-bottom: 50px;
}
@media (max-width: 980px) {
  .nav {
    position: static;
    margin-top: 0;
    padding: 14px 0;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
  }
  .stats-grid { grid-template-columns: 1fr; }
}
