/* public/styles.css — cosmic palette, editorial restraint.
   Gold is an accent, never a fill: it carries the three primary elements
   (the active progress step, the number itself, the primary button) plus
   thin accents on small type and states elsewhere. It never fills a large
   area, never appears as a gradient in text, and never glows. */

:root {
  --ink: #EFECFA;
  --ink-soft: rgba(239, 236, 250, 0.58);
  --ink-faint: rgba(239, 236, 250, 0.34);
  --gold: #D8B978;
  --night: #14122F;
  --rule: rgba(239, 236, 250, 0.12);
  --serif: Georgia, 'Times New Roman', serif;
  --sans: ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1px 1px at 22% 12%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 74% 8%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 46% 22%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 14% 38%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(ellipse 120% 70% at 50% -8%, #241A52 0%, #14122F 55%, #0B0A1C 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}

.wrap { max-width: 460px; margin: 0 auto; padding: 28px 22px 48px; }

.progress { display: flex; gap: 6px; margin-bottom: 34px; }
.progress i { height: 2px; flex: 1; border-radius: 2px; background: var(--rule); }
.progress i.on { background: var(--gold); }

.kicker {
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 14px;
}

.display {
  font-family: var(--serif); font-weight: 400; font-size: 30px;
  line-height: 1.24; letter-spacing: -0.015em; margin: 0 0 12px;
}
.display em { font-style: italic; color: var(--gold); }

.lede { color: var(--ink-soft); font-size: 15px; margin: 0 0 28px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13px; color: var(--ink-soft); margin-bottom: 7px; }
.field input {
  width: 100%; padding: 14px; font-size: 16px; /* 16px prevents iOS zoom on focus */
  font-family: var(--sans); color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--rule); border-radius: 9px;
}
.field input:focus { outline: none; border-color: var(--gold); }

.consent { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 22px; }
.consent input { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; accent-color: var(--gold); }
.consent label { font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }

.btn {
  display: block; width: 100%; padding: 15px; border: 0; border-radius: 9px;
  background: var(--gold); color: var(--night);
  font-family: var(--sans); font-size: 15px; font-weight: 650; cursor: pointer;
}
.btn:disabled { opacity: 0.5; cursor: default; }

.trust { font-size: 11px; color: var(--ink-faint); text-align: center; margin-top: 16px; }

.error { color: #F5A3A3; font-size: 13.5px; margin: 10px 0 0; min-height: 20px; }

.screen { display: none; }
.screen.active { display: block; }

.spinner {
  width: 42px; height: 42px; margin: 40px auto; border-radius: 50%;
  border: 2px solid var(--rule); border-top-color: var(--gold);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.numring {
  width: 92px; height: 92px; margin: 0 auto 12px; border-radius: 50%;
  border: 1px solid rgba(216, 185, 120, 0.45);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: 42px; color: var(--gold);
  background: radial-gradient(circle, rgba(216, 185, 120, 0.1), transparent 70%);
}

.teaser-visible { font-size: 15px; line-height: 1.7; margin-bottom: 6px; }
.teaser-blurred {
  font-size: 15px; line-height: 1.7; color: var(--ink-soft);
  filter: blur(4px); user-select: none; pointer-events: none;
  margin-bottom: 22px;
}

.lockrow {
  display: flex; justify-content: space-between; font-size: 13.5px;
  color: var(--ink-soft); padding: 11px 0; border-bottom: 1px solid var(--rule);
}
.lockrow span:last-child { color: rgba(216, 185, 120, 0.75); font-size: 12px; }

.legal { color: var(--ink-soft); font-size: 14.5px; }
.legal h1 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: 27px; }
.legal h2 { font-family: var(--serif); font-weight: 400; color: var(--ink); font-size: 19px; margin-top: 30px; }
.legal a, footer a { color: var(--gold); }
footer { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--rule);
  font-size: 12px; color: var(--ink-faint); text-align: center; }

/* Utility classes: replace inline style="" attributes, which the app's strict
   CSP (styleSrc: ['self'], no 'unsafe-inline') would otherwise silently drop. */
.center { text-align: center; }
.mb-lg { margin-bottom: 24px; }
.mt-lg { margin-top: 24px; }

/* Back and inline-correction controls. Deliberately quiet: grey rather than
   gold, small, and never sharing weight with the primary button — recovering
   from a typo should be findable, not competitive with moving forward. */
.back {
  background: none;
  border: 0;
  padding: 0 0 18px;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-faint);
  cursor: pointer;
}
.back:hover { color: var(--ink-soft); }

.linkish {
  background: none;
  border: 0;
  padding: 0;
  font-family: var(--sans);
  font-size: inherit;
  color: var(--gold);
  text-decoration: underline;
  cursor: pointer;
}

/* Cookie consent banner. Both buttons share one style deliberately: under the
   GDPR, declining must be no harder than accepting, so neither gets the gold
   treatment that would make it read as the intended choice. */
.cookie-banner {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 50;
  max-width: 620px;
  margin: 0 auto;
  padding: 16px 18px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: #171433;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cookie-banner-text {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.cookie-banner-text a { color: var(--gold); }
.cookie-banner-actions { display: flex; gap: 10px; }
.cookie-banner-btn {
  flex: 1;
  padding: 11px 16px;
  border: 1px solid rgba(239, 236, 250, 0.25);
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.cookie-banner-btn:hover { border-color: var(--gold); }
.cookie-banner-btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (min-width: 560px) {
  .consent { flex-direction: row; align-items: center; }
  .cookie-banner-actions { flex-shrink: 0; }
  .cookie-banner-btn { flex: 0 0 auto; }
}
