/*
 * The Readiness Check: an evening palette. Deep ink background, champagne
 * text, light "paper" cards for the content that matters. Shows how a quiz
 * can look completely different while the shared header/footer adapt.
 */
:root {
  color-scheme: dark;
  --bg: #1e1b2e;
  --surface: #2a2640;
  --surface-2: #343049;
  --text: #f3eee4;
  --muted: #cdc8da;
  --soft: #f7b6bf; /* highlight on dark (8:1 on --bg) */
  --accent: var(--ea-crimson);
  --accent-strong: var(--ea-crimson-strong);
  --line: rgb(255 255 255 / 0.14);
  --paper: #fbf6ee;
  --paper-ink: #1e1b2e;
  --paper-muted: #55536b;
  --sage: var(--ea-sage);
  --sage-ink: var(--ea-sage-ink);
  --danger: #ffb4ab;
  --ease: var(--ea-ease);
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ea-font-sans);
}

:focus-visible {
  outline: 3px solid var(--soft);
  outline-offset: 3px;
}

[tabindex='-1']:focus {
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ready {
  max-width: 1040px;
  margin: 0 auto;
  padding: 8px 22px 0;
}

.screen {
  animation: rise 0.22s var(--ease);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.eyebrow--accent {
  color: var(--soft);
}

.display {
  color: #fff;
  font-size: clamp(40px, 8vw, 60px);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.04;
}

.display em,
.step__title em,
.section-title em,
.trial__title em {
  color: var(--soft);
  font-style: italic;
}

.lead {
  color: var(--muted);
  font-size: 17px;
  max-width: 460px;
}

.meta {
  color: var(--muted);
  font-size: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  justify-self: start;
  min-height: 48px;
  padding: 0 26px;
  border: 0;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--accent-strong);
}

.btn:disabled {
  background: var(--surface-2);
  color: var(--muted);
}

.btn--lg {
  min-height: 54px;
  font-size: 17px;
}

.link-btn {
  justify-self: start;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: none;
  color: var(--text);
  font-weight: 500;
}

.text-link {
  color: var(--text);
  font-weight: 500;
  text-underline-offset: 4px;
}

/* ── Intro ──────────────────────────────────────────────────────────────── */
.intro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px 56px;
  padding: 16px 0 24px;
}

.intro__copy {
  flex: 1 1 340px;
  display: grid;
  gap: 18px;
  justify-items: start;
}

.look {
  flex: 1 1 320px;
  position: relative;
  display: grid;
  gap: 16px;
  padding: 28px;
  border-radius: 26px;
  background: var(--ea-gradient-romance);
  color: var(--paper-ink);
}

.look::before {
  content: '';
  position: absolute;
  inset: -24px;
  z-index: -1;
  background: oklch(0.6 0.08 150);
  filter: blur(70px);
  opacity: 0.35;
}

.look__title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.look__list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.look__list li {
  padding: 8px 14px;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.8);
  font-size: 14px;
  font-weight: 500;
}

.look__list .is-date {
  background: var(--paper-ink);
  color: var(--paper);
}

/* ── Steps ──────────────────────────────────────────────────────────────── */
.step {
  display: grid;
  gap: 22px;
  max-width: 620px;
  margin: 0 auto;
  padding-top: 12px;
}

.step__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress {
  height: 6px;
  border-radius: 9999px;
  background: var(--surface-2);
  overflow: hidden;
}

.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--soft);
  transition: width 0.8s var(--ease);
}

.step__title {
  color: #fff;
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

.step__desc {
  color: var(--muted);
  font-size: 16px;
}

.panel {
  display: grid;
  gap: 18px;
  padding: 24px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.field-label {
  font-weight: 600;
}

.date {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  padding: 0 18px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  background: var(--bg);
  font-size: 18px;
}

.date:focus-visible {
  outline-offset: 0;
  border-color: var(--soft);
}

.date[aria-invalid='true'] {
  border-color: var(--danger);
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 42px;
  padding: 0 16px;
  border: 1.5px solid var(--line);
  border-radius: 9999px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}

.chip[aria-pressed='true'] {
  border-color: var(--soft);
  background: var(--soft);
  color: var(--paper-ink);
}

.hint {
  padding: 12px 16px;
  border-radius: 16px;
  background: var(--sage);
  color: var(--sage-ink);
  font-size: 14px;
}

.hint--warn {
  background: #4a2530;
  color: var(--danger);
}

.scale {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.scale__btn {
  flex: 1;
  max-width: 64px;
  aspect-ratio: 1;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--bg);
  font-size: 22px;
  font-weight: 600;
  transition:
    transform 0.2s var(--ease),
    background 0.2s;
}

.scale__btn:hover {
  transform: translateY(-2px);
  border-color: var(--soft);
}

.scale__btn[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 12px 30px -10px rgb(192 34 58 / 0.6);
}

.scale__labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

/* ── Result + gate ──────────────────────────────────────────────────────── */
.result {
  display: grid;
  gap: 28px;
  padding-top: 12px;
}

.result__top {
  display: flex;
  flex-wrap: wrap;
  gap: 36px;
  align-items: flex-start;
}

.result__text {
  flex: 1 1 360px;
  min-width: 0;
  display: grid;
  gap: 16px;
}

.result__eyebrows {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
}

.sent {
  padding: 5px 12px;
  border-radius: 9999px;
  background: var(--sage);
  color: var(--sage-ink);
  font-size: 13px;
  font-weight: 600;
}

.gate-card {
  padding: 22px;
  border-radius: 26px;
  background: var(--paper);
  color: var(--paper-ink);
}

.ready-card {
  flex: 1 1 360px;
  min-width: 0;
  display: grid;
  gap: 10px;
  padding: 28px;
  border-radius: 26px;
  background: var(--ea-gradient-romance);
  color: var(--paper-ink);
}

.ready-card .eyebrow {
  color: var(--paper-muted);
}

.ready-card.locked {
  filter: blur(9px);
  user-select: none;
  pointer-events: none;
}

.ready-card__band {
  font-size: 44px;
  font-style: italic;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--accent);
}

.ready-card__score {
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.meter {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.meter span {
  height: 10px;
  border-radius: 9999px;
  background: rgb(255 255 255 / 0.7);
}

.meter span.on {
  background: var(--accent);
}

.meter__labels {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  color: var(--paper-muted);
  font-size: 12px;
}

.meter__labels span:nth-child(2) {
  text-align: center;
}

.meter__labels span:last-child {
  text-align: right;
}

.runway {
  padding: 12px 14px;
  border-radius: 16px;
  background: rgb(255 255 255 / 0.6);
  font-size: 14px;
}

.items {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 18px;
  background: rgb(255 255 255 / 0.75);
  list-style: none;
}

.items__row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}

.items__row.is-dayof .items__label {
  font-weight: 600;
}

.items__bar {
  height: 7px;
  border-radius: 9999px;
  background: var(--ea-champagne);
  overflow: hidden;
}

.items__bar span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}

.items__score {
  font-variant-numeric: tabular-nums;
  color: var(--paper-muted);
}

/* Email capture (markup from /shared/email-capture.js), on a paper card */
.ea-capture {
  display: grid;
  gap: 10px;
}

.ea-capture__label {
  font-weight: 600;
}

.ea-capture__row {
  display: grid;
  gap: 10px;
}

.ea-capture__input {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 0 18px;
  border: 1.5px solid var(--ea-border);
  border-radius: 16px;
  background: #fff;
  color: var(--paper-ink);
  color-scheme: light;
}

.ea-capture__input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 0;
  border-color: var(--accent);
}

.ea-capture__submit {
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: 9999px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}

.ea-capture__submit:focus-visible,
.ea-capture__retry:focus-visible,
.ea-capture__consent a:focus-visible {
  outline-color: var(--accent);
}

.ea-capture__retry {
  justify-self: start;
  min-height: 44px;
  padding: 0 20px;
  border: 1.5px solid var(--accent);
  border-radius: 9999px;
  background: none;
  color: var(--accent);
  font-weight: 600;
}

.ea-capture[data-state='loading'] .ea-capture__submit {
  opacity: 0.75;
}

.ea-capture__message:empty {
  display: none;
}

.ea-capture__message {
  color: oklch(0.5 0.22 27);
  font-size: 14px;
}

.ea-capture__consent {
  color: var(--paper-muted);
  font-size: 13px;
}

.ea-capture__consent a {
  color: inherit;
}

@media (min-width: 560px) {
  .ea-capture__row {
    grid-template-columns: 1fr auto;
  }
}

.section-title {
  color: #fff;
  font-size: clamp(30px, 6vw, 38px);
  font-weight: 600;
  letter-spacing: -0.03em;
}

.moves {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 0;
  list-style: none;
  counter-reset: m;
}

.move {
  counter-increment: m;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 22px;
  border-radius: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.move::before {
  content: counter(m);
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 6px;
  border-radius: 50%;
  background: var(--soft);
  color: var(--paper-ink);
  font-weight: 700;
}

.move__title {
  color: #fff;
  font-size: 19px;
  font-weight: 600;
}

.move__body {
  color: var(--muted);
  font-size: 14px;
}

.trial {
  display: grid;
  gap: 12px;
  padding: 24px;
  border-radius: 26px;
  background: var(--ea-gradient-romance);
  color: var(--paper-ink);
}

.trial__title {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.trial__title em {
  color: var(--accent);
}

.trial .text-link {
  color: var(--paper-ink);
}

.trial :focus-visible {
  outline-color: var(--accent);
}

.trial__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 22px;
  margin-top: 6px;
}

.more {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--muted);
}

@media (min-width: 720px) {
  .ready {
    padding: 16px 56px 0;
  }
  .panel {
    padding: 28px;
  }
  .scale__btn {
    max-width: 84px;
  }
  .trial {
    padding: 36px;
  }
}
