@import url('./tokens.css');

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  font-optical-sizing: auto;
  line-height: 1.55;
  min-height: 100dvh;
  padding-bottom: calc(72px + env(safe-area-inset-bottom, 0px));
}
body.focus-mode {
  padding-bottom: max(16px, env(safe-area-inset-bottom, 0px));
}
body.focus-mode .tabbar { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
[hidden] { display: none !important; }

/* ——— App shell ——— */
.app-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.glass-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.glass-nav.scrolled {
  border-bottom-color: var(--hairline);
  box-shadow: 0 1px 12px rgba(0,0,0,0.04);
}
.nav-inner {
  max-width: var(--max-grid);
  margin: 0 auto;
  padding: 0 max(16px, var(--pad-x));
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  min-height: 44px;
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: transparent;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
}
.brand-mark img {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: cover;
  border-radius: 10px;
}
.brand-name {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}

/* Bottom tab bar — mobile primary nav */
.tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: rgba(245,245,247,0.86);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--hairline);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
}
.tabbar a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  border-radius: 12px;
  color: var(--text-3);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color .15s, background .15s;
}
.tabbar a svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tabbar a.active { color: var(--accent); }
.tabbar a:active { background: rgba(0,0,0,0.04); }

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .nav-desktop { display: flex !important; }
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 6px;
}
.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: var(--r-pill);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 550;
}
.nav-link:hover { background: rgba(0,0,0,0.05); color: var(--text); }
.nav-cta { background: rgba(0,0,0,0.05); color: var(--text); }

/* ——— Layout ——— */
.page {
  width: min(100%, var(--max-read));
  margin: 0 auto;
  padding: 20px max(16px, var(--pad-x)) 28px;
}
.page-wide {
  width: min(100%, var(--max-grid));
  margin: 0 auto;
  padding: 20px max(16px, var(--pad-x)) 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.live-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--live);
  animation: pulse-dot 2.2s infinite;
}

.hero-title {
  margin-top: 12px;
  font-size: clamp(34px, 9vw, 52px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.02;
}
.hero-sub {
  margin-top: 12px;
  font-size: clamp(15px, 3.8vw, 18px);
  color: var(--text-2);
  line-height: 1.5;
  max-width: 34ch;
}

.cta-row {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
@media (min-width: 520px) {
  .cta-row { flex-direction: row; flex-wrap: wrap; align-items: center; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  border: none;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform .15s var(--ease-out-quart), filter .15s, background .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--sh-cta);
}
.btn-secondary { background: rgba(0,0,0,0.06); color: var(--text); }
.btn-block { width: 100%; }
.btn-ghost {
  background: transparent;
  color: var(--accent);
  min-height: 44px;
}

.section-label {
  margin-top: 28px;
  font-size: clamp(20px, 4.5vw, 24px);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.section-lede {
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-2);
}

.panel {
  margin-top: 14px;
  background: var(--surface);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  overflow: hidden;
}
.row {
  display: block;
  padding: 16px 18px;
  color: var(--text);
}
.row + .row { border-top: 1px solid var(--hairline); }
.row:active, a.row:hover { background: var(--hover); }
.row h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.35;
}
.row p {
  margin-top: 3px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.45;
}

.cta-band {
  position: relative;
  overflow: hidden;
  margin-top: 28px;
  border-radius: var(--r-hero);
  background: var(--grad-cta);
  color: #fff;
  padding: 24px 20px;
  box-shadow: var(--sh-cta);
}
.cta-band::before {
  content: '';
  position: absolute;
  width: 160px; height: 160px;
  border-radius: 50%;
  filter: blur(46px);
  background: rgba(255,255,255,0.35);
  top: -50px; right: -30px;
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 {
  font-size: clamp(22px, 5vw, 28px);
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.cta-band p { margin-top: 8px; opacity: 0.92; font-size: 14px; }
.cta-band .btn {
  margin-top: 16px;
  background: #fff;
  color: var(--accent);
  width: 100%;
}
@media (min-width: 520px) {
  .cta-band .btn { width: auto; }
}

.footer-note {
  margin-top: 28px;
  padding-bottom: 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}

/* ——— Test UI ——— */
.progress-track {
  height: 5px;
  background: var(--track);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width .35s var(--ease-out-quart);
}
.meta-bar {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.question-card {
  margin-top: 18px;
  background: var(--surface);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  padding: 20px 18px 18px;
}
.question-card .cat {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.question-card h1 {
  margin-top: 10px;
  font-size: clamp(20px, 5.2vw, 26px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}
.choices {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}
.choice {
  text-align: left;
  min-height: 52px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--hairline);
  background: var(--surface);
  font-size: 16px;
  color: var(--text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.choice:active { background: var(--hover); }
.choice.selected {
  border-color: var(--accent);
  background: rgba(0,113,227,0.07);
}
.test-actions {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 10px;
}

/* ——— Unlock ——— */
.unlock-center { text-align: center; }
.blur-score {
  margin: 22px auto 0;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--sh-panel);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}
.blur-score .ghost {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.04em;
  filter: blur(9px);
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.blur-score .lock {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(245,245,247,0.35);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.price-panel { margin-top: 22px; text-align: left; }
.price-row { padding: 16px 18px; }
.price-row + .price-row { border-top: 1px solid var(--hairline); }
.price-row .top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}
.price-row h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.price-row .amount {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.price-row p { margin-top: 4px; font-size: 13px; color: var(--text-2); }
.price-row .btn { margin-top: 12px; }
.badge {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 8px;
  border-radius: var(--r-pill);
  background: var(--heat-bg);
  color: var(--heat);
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}

/* ——— Results / unlocked profile (Apple) ——— */
.result-hero {
  text-align: center;
  padding: 12px 0 8px;
  animation: result-in .55s var(--ease-spring) both;
}
.result-hero .eyebrow {
  justify-content: center;
  width: 100%;
}
.result-age {
  margin-top: 10px;
  font-size: clamp(64px, 18vw, 88px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.result-age-unit {
  display: block;
  margin-top: 6px;
  font-size: 13px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.result-verdict {
  margin: 14px auto 0;
  max-width: 28ch;
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}
.result-sub {
  margin: 10px auto 0;
  max-width: 36ch;
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.5;
}
.result-compare {
  margin: 22px auto 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  max-width: 320px;
  background: var(--surface);
  border-radius: var(--r-card);
  box-shadow: var(--sh-card);
  padding: 14px 16px;
}
.result-compare .col { text-align: center; }
.result-compare .k {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.result-compare .v {
  margin-top: 4px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.result-compare .delta {
  min-width: 52px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: rgba(0,113,227,0.1);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
}
.result-compare .delta.is-older {
  background: rgba(0,0,0,0.05);
  color: var(--text-2);
}

/* Legacy score-ring kept for any residual use */
.score-ring {
  width: 148px;
  height: 148px;
  margin: 16px auto 0;
  border-radius: 50%;
  background: conic-gradient(var(--accent) var(--pct, 50%), var(--track) 0);
  display: grid;
  place-items: center;
}
.score-ring-inner {
  width: 122px;
  height: 122px;
  border-radius: 50%;
  background: var(--surface);
  display: grid;
  place-content: center;
  box-shadow: var(--sh-card);
}
.score-ring-inner .num {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.score-ring-inner .label {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-meters .meter {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 12px;
  padding: 14px 18px;
  align-items: center;
}
.profile-meters .meter + .meter { border-top: 1px solid var(--hairline); }
.meter-label { font-size: 14px; font-weight: 550; }
.meter-val {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.meter-bar {
  grid-column: 1 / -1;
  height: 6px;
  background: var(--track);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.meter-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
  transition: width .6s var(--ease-out-quart);
}

.ai-block { padding: 0; }
.ai-block .ai-section {
  padding: 16px 18px;
}
.ai-block .ai-section + .ai-section {
  border-top: 1px solid var(--hairline);
}
.ai-block .ai-kicker {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ai-block h3 {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.ai-block p, .ai-block li {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.7;
}
.ai-block ul {
  margin-top: 8px;
  padding-left: 0;
  list-style: none;
}
.ai-block li {
  position: relative;
  padding-left: 14px;
}
.ai-block li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--faint);
}
.result-section {
  animation: result-in .55s var(--ease-spring) both;
}
.result-section:nth-of-type(1) { animation-delay: .05s; }
.result-section:nth-of-type(2) { animation-delay: .12s; }
.result-section:nth-of-type(3) { animation-delay: .18s; }
@keyframes result-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .result-hero, .result-section { animation: none; }
  .meter-bar > span { transition: none; }
}

/* Landing sample unlocked response — conversion preview */
.sample-result {
  overflow: hidden;
}
.sample-result .sample-hero {
  text-align: center;
  padding: 22px 18px 4px;
}
.sample-result .sample-pill {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: rgba(0,0,0,0.05);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sample-result .sample-num {
  margin-top: 14px;
  font-size: clamp(64px, 18vw, 80px);
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 0.95;
  font-variant-numeric: tabular-nums;
}
.sample-result .sample-unit {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.sample-result .sample-verdict {
  margin: 12px auto 0;
  max-width: 22ch;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.sample-result .sample-compare {
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  max-width: 280px;
  padding: 12px 14px;
  border-radius: var(--r-card);
  background: var(--hover);
}
.sample-result .sample-compare .col { text-align: center; }
.sample-result .sample-compare .k {
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.sample-result .sample-compare .v {
  margin-top: 3px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.sample-result .sample-compare .delta {
  min-width: 48px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: rgba(0,113,227,0.1);
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
}
.sample-result .sample-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-2);
}

.sample-spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--hairline);
}
.sample-spotlight .spot {
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 10px;
  align-items: baseline;
}
.sample-spotlight .spot + .spot {
  border-left: 1px solid var(--hairline);
}
.sample-spotlight .spot-k {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.sample-spotlight .spot-v {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.sample-spotlight .spot-n {
  font-size: 17px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text-2);
}
.sample-spotlight .spot-train .spot-v {
  color: var(--accent);
}

.sample-meters .meter-bar > span {
  width: 0;
}
.sample-meters.is-inview .meter-bar > span {
  width: var(--w, 0%);
}

.sample-result .sample-ai {
  padding: 18px;
  border-top: 1px solid var(--hairline);
}
.sample-result .sample-ai .ai-kicker {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.sample-result .sample-ai h3 {
  margin-top: 6px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.3;
}
.sample-result .sample-ai > p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.65;
}
.sample-steps {
  margin-top: 12px;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0;
}
.sample-steps li {
  padding: 11px 0;
  font-size: 14px;
  color: var(--text);
  border-top: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sample-steps li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.sample-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-top: 1px solid var(--hairline);
  background: var(--hover);
}
.sample-cta-title {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.sample-cta-sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-2);
}
.sample-cta .btn {
  flex: none;
  min-width: 132px;
  height: 40px;
  padding: 0 16px;
}
@media (max-width: 420px) {
  .sample-cta {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
  .sample-cta .btn { width: 100%; }
}

/* Brain age games */
.game-stage {
  margin-top: 16px;
  min-height: 260px;
  background: var(--surface);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-panel);
  display: grid;
  place-items: center;
  padding: 24px 16px;
  text-align: center;
}
/* Reaction target — HumanBenchmark-style (visible wait → green go) */
.reaction-stage {
  width: 100%;
  min-height: 280px;
  border-radius: var(--r-panel);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 28px 18px;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  transition: background .12s ease, box-shadow .12s ease;
}
.reaction-stage.is-waiting {
  background: #ff3b30;
  box-shadow: 0 16px 40px rgba(255,59,48,0.28);
  color: #fff;
}
.reaction-stage.is-ready {
  background: #30d158;
  box-shadow: 0 16px 40px rgba(48,209,88,0.35);
  color: #fff;
}
.reaction-stage.is-early {
  background: var(--track);
  color: var(--text);
}
.reaction-stage .rt-msg {
  font-size: clamp(20px, 5vw, 26px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}
.reaction-stage .rt-hint {
  margin-top: 8px;
  font-size: 14px;
  opacity: 0.85;
}

.tap-target {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: var(--track);
  border: none;
  cursor: pointer;
  transition: background .12s, transform .12s, opacity .12s, box-shadow .12s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.tap-target.is-waiting {
  background: #ff3b30;
  opacity: 1;
}
.tap-target.is-ready {
  opacity: 1;
  background: #30d158;
  box-shadow: 0 16px 40px rgba(48,209,88,0.35);
}
.tap-target:active { transform: scale(0.94); }

/* Exit confirm sheet — visible whenever not [hidden] */
.sheet-scrim[hidden] {
  display: none !important;
}
.sheet-scrim {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.32);
  z-index: 80;
  display: grid;
  place-items: end center;
  padding: 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  opacity: 1;
  pointer-events: auto;
}
.sheet-scrim.is-open {
  opacity: 1;
  pointer-events: auto;
}
.sheet {
  width: min(100%, 420px);
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-radius: var(--r-hero);
  box-shadow: var(--sh-overlay);
  padding: 22px 18px 16px;
  transform: translateY(0) scale(1);
  opacity: 1;
  animation: sheet-in .4s var(--ease-spring);
}
@keyframes sheet-in {
  from { transform: translateY(18px) scale(0.98); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet { animation: none; }
}
.sheet h3 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.sheet p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.5;
}
.sheet-actions {
  margin-top: 18px;
  display: grid;
  gap: 8px;
}

.nav-exit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: var(--r-pill);
  background: rgba(0,0,0,0.05);
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 14px;
}

.q-image {
  margin-top: 14px;
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  border-radius: 14px;
  background: var(--hover);
}

/* Landing CTA pulse */
.cta-pulse {
  animation: cta-pulse 2.4s var(--ease-out-quart) infinite;
}
@keyframes cta-pulse {
  0%, 100% { transform: translateY(0); box-shadow: var(--sh-cta); }
  50% { transform: translateY(-2px); box-shadow: 0 24px 60px rgba(0,113,227,0.32); }
}
@media (prefers-reduced-motion: reduce) {
  .cta-pulse { animation: none; }
}

.brand-mark img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: block;
  object-fit: cover;
}
.memory-digits {
  font-size: clamp(32px, 10vw, 48px);
  font-weight: 700;
  letter-spacing: 0.14em;
  font-variant-numeric: tabular-nums;
}
.stroop-word {
  font-size: clamp(36px, 11vw, 56px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.color-choices {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.color-btn {
  min-width: 84px;
  min-height: 48px;
  border: none;
  border-radius: var(--r-pill);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.field {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}
.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
}
.field input {
  height: 48px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hairline);
  padding: 0 16px;
  background: var(--surface);
  font-size: 16px; /* prevents iOS zoom */
  width: 100%;
  max-width: 200px;
}

/* Admin */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}
@media (min-width: 720px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}
.stat-grid .cell { padding: 14px 12px; text-align: center; }
.stat-grid .cell + .cell { border-left: 1px solid var(--hairline); }
.stat-grid .val {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-grid .lbl { margin-top: 2px; font-size: 11px; color: var(--text-3); }

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