:root {
  color-scheme: dark;
  --bg: #070a12;
  --surface: #101523;
  --surface-strong: #151c2d;
  --line: rgba(255, 255, 255, 0.11);
  --text: #f5f7fb;
  --muted: #a8b0c2;
  --accent: #8b5cf6;
  --accent-strong: #7544ed;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --mint: #73e2ba;
  --danger: #ff8f9d;
  --success: #75e0ae;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.34);
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(139, 92, 246, 0.16), transparent 29rem),
    radial-gradient(circle at 92% 88%, rgba(115, 226, 186, 0.08), transparent 30rem),
    var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

button, input, select { font: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.quiz-shell { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 24px 0 56px; }
.topbar, .admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 58px;
}
.identity { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 750; }
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(139,92,246,.35), rgba(115,226,186,.08));
  font-size: 14px;
  letter-spacing: -.04em;
}
.topbar-note { color: var(--muted); font-size: .88rem; }

.quiz-layout { display: grid; grid-template-columns: minmax(0, .88fr) minmax(480px, 1fr); gap: clamp(36px, 7vw, 96px); align-items: center; min-height: calc(100vh - 138px); padding: 42px 0; }
.quiz-intro h1, .dashboard-title-row h1, .admin-card h1 {
  margin: 10px 0 20px;
  font-size: clamp(2.55rem, 5vw, 5rem);
  line-height: .98;
  letter-spacing: -.055em;
}
.quiz-intro h1 { max-width: 700px; }
.eyebrow, .screen-kicker { margin: 0; color: var(--mint); font-size: .78rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.lead { max-width: 600px; margin: 0; color: var(--muted); font-size: clamp(1.05rem, 1.5vw, 1.25rem); }
.event-note { display: flex; align-items: center; gap: 16px; margin-top: 34px; color: var(--muted); font-size: .92rem; }
.event-note strong { color: var(--text); }
.event-date { display: grid; place-items: center; min-width: 64px; height: 64px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255,255,255,.035); color: var(--text); font-size: .79rem; font-weight: 850; letter-spacing: .08em; }

.quiz-card, .admin-card, .leads-panel, .stat-card {
  border: 1px solid var(--line);
  background: rgba(16, 21, 35, .92);
  box-shadow: var(--shadow);
}
.quiz-card { min-height: 590px; border-radius: var(--radius); padding: clamp(26px, 4vw, 48px); display: flex; flex-direction: column; justify-content: center; backdrop-filter: blur(16px); }
.screen { display: none; }
.screen.is-active { display: block; animation: enter .32s ease-out; }
@keyframes enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.screen h2 { margin: 12px 0 16px; font-size: clamp(1.75rem, 3vw, 2.6rem); line-height: 1.07; letter-spacing: -.035em; }
.screen > p:not(.screen-kicker):not(.privacy-note) { color: var(--muted); }

.progress-wrap { margin-bottom: 36px; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 10px; color: var(--muted); font-size: .8rem; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.progress-track span { display: block; width: 20%; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--mint)); transition: width .3s ease; }

.answers { display: grid; gap: 12px; margin: 26px 0; }
.answer-option { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 68px; padding: 13px 16px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.025); color: var(--text); text-align: left; cursor: pointer; transition: border-color .18s, background .18s, transform .18s; }
.answer-option:hover { transform: translateY(-1px); border-color: rgba(139,92,246,.6); background: var(--accent-soft); }
.answer-option:focus-visible, .button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid rgba(115,226,186,.35); outline-offset: 2px; }
.answer-option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.answer-letter { display: grid; place-items: center; flex: 0 0 auto; width: 32px; height: 32px; border-radius: 10px; background: rgba(255,255,255,.08); color: var(--muted); font-size: .78rem; font-weight: 800; }
.answer-option.is-selected .answer-letter { background: var(--accent); color: white; }
.question-actions { display: flex; justify-content: space-between; gap: 12px; }

.button { display: inline-flex; justify-content: center; align-items: center; min-height: 50px; padding: 0 22px; border: 1px solid transparent; border-radius: 13px; color: white; text-decoration: none; font-weight: 750; cursor: pointer; transition: transform .18s, background .18s, opacity .18s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.button-primary { background: var(--accent); box-shadow: 0 14px 32px rgba(117,68,237,.25); }
.button-primary:hover { background: var(--accent-strong); }
.button-ghost { border-color: var(--line); background: rgba(255,255,255,.035); }
.button-full { width: 100%; }
#start-button { margin-top: 26px; }
.privacy-note { margin: 14px 0 0; color: #81899a; text-align: center; font-size: .78rem; }

.lead-form, .admin-form { display: grid; gap: 15px; margin-top: 24px; }
.lead-form label:not(.consent-row), .admin-form label, .filters label { display: grid; gap: 7px; color: #d7dbea; font-size: .88rem; font-weight: 650; }
input, select { width: 100%; min-height: 49px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.035); color: var(--text); padding: 0 14px; }
input::placeholder { color: #70788a; }
.consent-row { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: .78rem; line-height: 1.4; cursor: pointer; }
.consent-row input { width: 18px; min-height: 18px; margin-top: 2px; accent-color: var(--accent); }
.consent-row a { color: var(--text); }
.honeypot { position: absolute !important; left: -99999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.alert { padding: 12px 14px; border-radius: 11px; font-size: .88rem; }
.alert-error { border: 1px solid rgba(255,143,157,.3); background: rgba(255,143,157,.1); color: #ffc1c9; }
.alert-success { border: 1px solid rgba(117,224,174,.3); background: rgba(117,224,174,.1); color: #baf4d6; }

.score-pill { display: inline-flex; margin-top: 18px; padding: 7px 11px; border-radius: 99px; background: var(--accent-soft); color: #cbb9ff; font-size: .82rem; font-weight: 750; }
.result-summary { font-size: 1.04rem; }
.diagnosis-breakdown { margin: 26px 0; }
.diagnosis-breakdown h3 { margin: 0 0 14px; font-size: .82rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
#result-breakdown { display: grid; gap: 13px; }
.dimension-result { padding: 14px 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255,255,255,.025); }
.dimension-heading { display: flex; justify-content: space-between; gap: 16px; font-size: .86rem; }
.dimension-heading span { color: var(--muted); font-weight: 750; }
.dimension-track { height: 5px; margin: 9px 0; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.dimension-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--mint)); }
.dimension-result p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.insight-box { margin: 26px 0; padding: 20px; border-left: 3px solid var(--mint); border-radius: 0 14px 14px 0; background: rgba(115,226,186,.07); }
.insight-box span { color: var(--mint); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.insight-box strong { display: block; margin-top: 8px; color: var(--text); font-size: 1rem; }
.insight-box p { margin: 8px 0 0; color: #e5eaf3; }
.result-lesson { color: var(--text) !important; font-weight: 650; }
.result-actions { display: grid; gap: 10px; margin-top: 26px; }

.admin-body, .admin-dashboard-body { background: #090d17; }
.login-shell, .setup-shell, .legal-shell { display: grid; place-items: center; min-height: 100vh; padding: 28px 20px; }
.admin-card { width: min(100%, 520px); padding: clamp(28px, 5vw, 48px); border-radius: var(--radius); }
.setup-card { width: min(100%, 620px); }
.admin-card h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
.muted { color: var(--muted); }
.form-section-label { margin-top: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--mint); font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.optional { color: var(--muted); font-weight: 400; }
.legal-card p { color: #c3c9d7; }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--muted); text-decoration: none; }

.admin-header { width: min(1400px, calc(100% - 48px)); margin: 0 auto; padding: 18px 0; border-bottom: 1px solid var(--line); }
.admin-header nav { display: flex; gap: 20px; }
.admin-header nav a { color: var(--muted); text-decoration: none; font-size: .88rem; }
.dashboard-shell { width: min(1400px, calc(100% - 48px)); margin: 0 auto; padding: 52px 0 72px; }
.dashboard-title-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; }
.dashboard-title-row h1 { margin-bottom: 0; font-size: clamp(2.4rem, 5vw, 4.5rem); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 34px 0 22px; }
.stat-card { display: grid; gap: 8px; min-height: 128px; padding: 22px; border-radius: 17px; box-shadow: none; }
.stat-card span { color: var(--muted); font-size: .84rem; }
.stat-card strong { align-self: end; font-size: 2.35rem; line-height: 1; }
.stat-total { background: var(--accent); }
.stat-total span { color: rgba(255,255,255,.72); }
.leads-panel { border-radius: 18px; overflow: hidden; box-shadow: none; }
.filters { display: grid; grid-template-columns: 2fr 1fr auto; align-items: end; gap: 12px; padding: 20px; border-bottom: 1px solid var(--line); }
.filters label span { color: var(--muted); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { padding: 17px 20px; border-bottom: 1px solid rgba(255,255,255,.07); text-align: left; vertical-align: middle; }
th { color: #81899b; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
td { color: #d9deea; font-size: .88rem; }
td strong, td a { display: block; }
td a { margin-top: 3px; color: var(--muted); text-decoration: none; }
td a:hover { color: var(--text); }
td small { display: block; margin-top: 6px; color: var(--muted); }
.result-tag { display: inline-flex; padding: 5px 9px; border-radius: 99px; background: rgba(255,255,255,.06); font-size: .75rem; }
.result-unpackaged_experience { color: #c5b3ff; background: rgba(139,92,246,.12); }
.result-offer_clarity { color: #a7e9d2; background: rgba(115,226,186,.1); }
.result-sales_system { color: #ffd2a8; background: rgba(255,166,84,.1); }
.empty-state { display: grid; justify-items: center; gap: 5px; padding: 80px 20px; color: var(--muted); }
.empty-state strong { color: var(--text); }

@media (max-width: 900px) {
  .quiz-layout { grid-template-columns: 1fr; min-height: auto; padding-top: 34px; }
  .quiz-intro h1 { font-size: clamp(2.5rem, 11vw, 4.5rem); }
  .quiz-card { min-height: 560px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  .quiz-shell { width: min(100% - 28px, 1180px); padding-top: 12px; }
  .topbar-note { display: none; }
  .quiz-layout { gap: 30px; padding: 28px 0; }
  .quiz-intro h1 { margin-top: 9px; font-size: 2.65rem; }
  .event-note { margin-top: 26px; }
  .quiz-card { min-height: 0; padding: 25px 20px; border-radius: 18px; }
  .screen h2 { font-size: 1.85rem; }
  .answer-option { min-height: 72px; padding: 13px; }
  .question-actions .button { flex: 1; }
  .admin-header, .dashboard-shell { width: min(100% - 28px, 1400px); }
  .admin-header nav a:first-child { display: none; }
  .dashboard-shell { padding-top: 34px; }
  .dashboard-title-row { align-items: stretch; flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 110px; padding: 17px; }
  .stat-card strong { font-size: 2rem; }
  .filters { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
