:root {
  --bg: #0b0d12;
  --panel: #121620;
  --panel-2: #171c28;
  --text: #f7f8fb;
  --muted: #a9b1c3;
  --line: rgba(255,255,255,.09);
  --accent: #b8ff64;
  --accent-2: #7f5cff;
  --accent-3: #49d7ff;
  --danger: #ff6b91;
  --shadow: 0 24px 70px rgba(0,0,0,.35);
  --radius: 26px;
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(127,92,255,.20), transparent 34rem),
    radial-gradient(circle at 90% 20%, rgba(73,215,255,.10), transparent 26rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

button { -webkit-tap-highlight-color: transparent; }

.app-shell {
  width: 100%;
  min-height: 100vh;
}

.screen {
  display: none;
  min-height: 100vh;
  animation: screenIn .28s ease both;
}

.screen.active { display: block; }

.home-wrap,
.quiz-wrap,
.loading-wrap,
.result-wrap {
  width: min(100% - 32px, 680px);
  margin: 0 auto;
}

.home-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 0 max(34px, env(safe-area-inset-bottom));
  text-align: center;
}

.brand,
.result-brand {
  letter-spacing: .18em;
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.hero-orb {
  width: 116px;
  aspect-ratio: 1;
  margin: 36px auto 24px;
  border-radius: 36px;
  display: grid;
  place-items: center;
  font-size: 57px;
  background:
    linear-gradient(145deg, rgba(184,255,100,.18), rgba(127,92,255,.24));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: inset 0 1px rgba(255,255,255,.12), var(--shadow);
  transform: rotate(-3deg);
}

.hero-orb span { transform: rotate(3deg); }

.eyebrow,
.question-kicker,
.result-label {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
  font-weight: 900;
}

h1 {
  margin: 10px 0 18px;
  font-size: clamp(38px, 10vw, 68px);
  line-height: .99;
  letter-spacing: -.055em;
}

h1 span { color: #c8cddd; }

.hero-copy {
  width: min(100%, 540px);
  margin: 0 auto 28px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.btn {
  border: 0;
  border-radius: 17px;
  min-height: 54px;
  padding: 0 20px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .16s ease, opacity .16s ease, background .16s ease;
}

.btn:active { transform: scale(.985); }

.btn-primary {
  color: #0b0d12;
  background: var(--accent);
  box-shadow: 0 12px 30px rgba(184,255,100,.12);
}

.btn-primary:hover { background: #c6ff81; }

.btn-secondary {
  color: var(--text);
  background: var(--panel-2);
  border: 1px solid var(--line);
}

.btn-ghost {
  width: 100%;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
}

.btn-big {
  width: min(100%, 460px);
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-size: 17px;
}

.trust-line {
  margin: 15px 0 26px;
  color: #7f8798;
  font-size: 12px;
}

.micro-proof {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.micro-proof > div {
  padding: 14px 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,.025);
}

.micro-proof strong {
  display: block;
  font-size: 20px;
}

.micro-proof span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.quiz-wrap {
  padding: max(24px, env(safe-area-inset-top)) 0 40px;
}

.quiz-header {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-bottom: 42px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  background: rgba(255,255,255,.035);
  cursor: pointer;
}

.progress-area { flex: 1; }

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.progress-track {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: rgba(255,255,255,.075);
}

.progress-bar {
  width: 10%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transition: width .3s ease;
}

.question-card { animation: questionIn .3s ease both; }

.question-card h2 {
  margin: 10px 0 28px;
  font-size: clamp(30px, 8vw, 46px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.answers {
  display: grid;
  gap: 12px;
}

.answer-btn {
  position: relative;
  width: 100%;
  min-height: 74px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  text-align: left;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.answer-btn:hover {
  border-color: rgba(184,255,100,.35);
  background: #151b25;
}

.answer-btn:active { transform: scale(.99); }

.answer-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-size: 22px;
  background: rgba(255,255,255,.055);
}

.answer-text {
  font-weight: 720;
  line-height: 1.3;
}

.loading-wrap {
  min-height: 100vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: 30px 0;
}

.brain-loader {
  font-size: 72px;
  animation: pulse 1s ease-in-out infinite alternate;
}

.loading-wrap h2 {
  margin: 24px 0 26px;
  font-size: 28px;
  letter-spacing: -.025em;
}

.analysis-list {
  width: min(100%, 420px);
  display: grid;
  gap: 10px;
}

.analysis-list > div {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  color: var(--muted);
  background: rgba(255,255,255,.025);
}

.analysis-list b { color: var(--accent); }

.result-wrap {
  padding: max(34px, env(safe-area-inset-top)) 0 max(40px, env(safe-area-inset-bottom));
}

.result-wrap > .eyebrow { text-align: center; }

.result-card {
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  padding: 26px 24px 28px;
  text-align: center;
  border-radius: 32px;
  background:
    radial-gradient(circle at 50% 25%, rgba(184,255,100,.18), transparent 35%),
    linear-gradient(145deg, #161b27, #0e1118);
  border: 1px solid rgba(255,255,255,.11);
  box-shadow: var(--shadow);
}

.result-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% 35%;
  height: 280px;
  transform: rotate(-18deg);
  background: radial-gradient(circle, rgba(127,92,255,.30), transparent 65%);
  pointer-events: none;
}

.result-brand { margin-bottom: 30px; }

.result-label { margin-bottom: 2px; }

.result-age {
  margin: 0;
  font-size: clamp(104px, 30vw, 184px);
  line-height: .88;
  font-weight: 950;
  letter-spacing: -.09em;
  color: var(--accent);
  text-shadow: 0 0 50px rgba(184,255,100,.18);
}

.result-card h2 {
  position: relative;
  z-index: 1;
  margin: 12px 0 8px;
  font-size: clamp(25px, 7vw, 38px);
  letter-spacing: -.035em;
}

.result-one-liner {
  position: relative;
  z-index: 1;
  width: min(100%, 470px);
  margin: 0 auto;
  color: #c1c8d7;
  line-height: 1.5;
}

.mini-bars {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 13px;
  margin-top: 28px;
  text-align: left;
}

.mini-bar > div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 800;
  color: #c3cad8;
}

.mini-bar i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.08);
}

.mini-bar em {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3));
  transition: width .8s ease .15s;
}

.insight-card,
.share-card,
.precision-card {
  margin-top: 18px;
  padding: 22px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: rgba(18,22,32,.88);
}

.insight-card h3,
.share-card h3,
.precision-card h3 {
  margin: 0 0 10px;
  font-size: 23px;
  letter-spacing: -.025em;
}

.insight-card p,
.share-card p,
.precision-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.trait-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.trait-chip,
.pill {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(184,255,100,.09);
  border: 1px solid rgba(184,255,100,.18);
  color: #d9ffad;
  font-size: 11px;
  font-weight: 850;
}

.share-card { text-align: center; }

.share-card .eyebrow { margin-top: 0; }

.share-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 20px;
}

.text-btn {
  margin-top: 13px;
  border: 0;
  color: #cbd3e3;
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

.precision-card {
  background:
    linear-gradient(135deg, rgba(127,92,255,.12), rgba(73,215,255,.06)),
    rgba(18,22,32,.88);
}

.precision-card .pill { margin-bottom: 14px; }

.disclaimer {
  margin: 20px 10px 0;
  text-align: center;
  color: #6f7787;
  font-size: 11px;
  line-height: 1.5;
}

@keyframes screenIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes pulse {
  from { transform: scale(.96) rotate(-2deg); }
  to { transform: scale(1.05) rotate(2deg); }
}

@media (max-width: 520px) {
  .home-wrap { justify-content: flex-start; padding-top: 34px; }
  .hero-orb { margin-top: 28px; }
  .micro-proof { margin-top: auto; padding-top: 20px; }
  .share-actions { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* V2 — late-night polish + share-first result */
:root {
  --bg: #090b10;
  --panel: #11151e;
  --panel-2: #161b26;
  --text: #eef1f6;
  --muted: #9da6b8;
}

html { color-scheme: dark; }

body {
  background:
    radial-gradient(circle at 12% 8%, rgba(127,92,255,.16), transparent 30rem),
    radial-gradient(circle at 92% 18%, rgba(73,215,255,.07), transparent 23rem),
    var(--bg);
}

.topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
}

.lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  text-decoration: none;
  color: #cbd1dd;
  background: rgba(255,255,255,.025);
  font-size: 11px;
  font-weight: 850;
}

.hero-orb {
  background: linear-gradient(145deg, rgba(184,255,100,.12), rgba(127,92,255,.17));
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 22px 60px rgba(0,0,0,.32);
}

.result-card {
  background:
    radial-gradient(circle at 50% 23%, rgba(184,255,100,.14), transparent 34%),
    linear-gradient(145deg, #151a25, #0e1118);
}

.insight-card p { line-height: 1.72; }
.insight-card strong { color: var(--text); font-weight: 850; }

.share-priority {
  position: relative;
  z-index: 3;
  margin: 14px 8px 0;
  padding: 15px;
  border-radius: 21px;
  border: 1px solid rgba(184,255,100,.16);
  background: linear-gradient(135deg, rgba(184,255,100,.075), rgba(127,92,255,.075));
}

.share-priority p {
  margin: 0 0 12px;
  text-align: center;
  color: #c7cedb;
  font-size: 13px;
  font-weight: 700;
}

.share-priority .share-actions { margin-top: 0; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 99;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(4,5,8,.82);
  backdrop-filter: blur(14px);
}

.modal.open { display: flex; animation: screenIn .18s ease both; }

.modal-panel {
  width: min(100%, 460px);
  max-height: calc(100vh - 36px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 28px;
  background: #10141d;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 4px 1px;
}

.modal-head strong { font-size: 14px; }

.modal-close {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: rgba(255,255,255,.04);
  cursor: pointer;
}

.share-preview-frame {
  overflow: hidden;
  min-height: 0;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: #090b10;
  border: 1px solid var(--line);
}

.share-preview-frame img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(64vh, 700px);
  aspect-ratio: 9/16;
  object-fit: contain;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  transform: translate(-50%,20px);
  opacity: 0;
  pointer-events: none;
  padding: 11px 15px;
  border-radius: 999px;
  background: #eef1f6;
  color: #0b0d12;
  font-size: 12px;
  font-weight: 900;
  transition: .2s ease;
}

.toast.show { opacity: 1; transform: translate(-50%,0); }

@media (max-width: 520px) {
  .modal-actions { grid-template-columns: 1fr; }
  .share-priority .share-actions { grid-template-columns: 1fr 1fr; }
}


/* Analytics consent — intentionally neutral: accepting and declining
   have equal visual weight. */
.consent-panel {
  position: fixed;
  inset: auto 0 0;
  z-index: 150;
  display: none;
  padding: 14px;
  padding-bottom: max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(5,7,10,.98), rgba(5,7,10,.90), transparent);
}
.consent-panel.open { display: block; }

.consent-card {
  width: min(100%, 720px);
  margin: 0 auto;
  padding: 17px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px;
  background: #121620;
  box-shadow: 0 20px 60px rgba(0,0,0,.50);
}
.consent-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
}
.consent-card p {
  margin: 0;
  color: #a9b1c3;
  font-size: 12px;
  line-height: 1.55;
}
.consent-card a {
  display: inline-block;
  margin-top: 7px;
  color: #cdd4df;
  font-size: 11px;
}
.consent-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 14px;
}
.consent-btn {
  min-height: 46px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  color: #eef1f6;
  background: #1a202c;
  font-weight: 850;
  cursor: pointer;
}
.consent-btn:hover { background: #202735; }

.site-privacy-footer {
  width: min(100% - 32px, 680px);
  margin: -26px auto 0;
  padding: 0 0 max(22px, env(safe-area-inset-bottom));
  display: flex;
  justify-content: center;
  gap: 16px;
  color: #626c7e;
  font-size: 10px;
}
.site-privacy-footer a,
.site-privacy-footer button {
  border: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.privacy-page {
  width: min(100% - 32px, 760px);
  margin: 0 auto;
  padding: 50px 0 80px;
}
.privacy-page h1 {
  font-size: clamp(38px, 8vw, 62px);
  margin-bottom: 24px;
}
.privacy-page h2 {
  margin-top: 32px;
  font-size: 21px;
}
.privacy-page p,
.privacy-page li {
  color: #a9b1c3;
  line-height: 1.7;
}
.privacy-page a { color: #dce3ee; }

@media (max-width: 520px) {
  .consent-actions { grid-template-columns: 1fr 1fr; }
}

/* RunnaTest production brand */
.brand, .result-brand {
  color: #cbd2de;
}
.site-privacy-footer span {
  color: #4f596b;
}
