:root {
  --navy: #071b3d;
  --blue: #2438b7;
  --sky: #67c9f9;
  --sky-soft: #eaf7ff;
  --orange: #f26a3d;
  --peach: #fff0e9;
  --paper: #fbfaf6;
  --white: #ffffff;
  --ink: #172033;
  --muted: #5f6878;
  --line: #dfe3ea;
  --shadow: 0 24px 70px rgba(7, 27, 61, .10);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, rgba(103, 201, 249, .20), transparent 28rem),
    radial-gradient(circle at 92% 86%, rgba(242, 106, 61, .13), transparent 28rem),
    var(--paper);
}

button, input { font: inherit; }
button { cursor: pointer; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 20;
  padding: .75rem 1rem;
  border-radius: .5rem;
  color: var(--white);
  background: var(--navy);
}
.skip-link:focus { top: 1rem; }

.app-shell {
  width: min(1180px, calc(100% - 32px));
  min-height: calc(100vh - 92px);
  margin: 24px auto 0;
  overflow: hidden;
  border: 1px solid rgba(7, 27, 61, .08);
  border-radius: 28px;
  background: rgba(255, 255, 255, .92);
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 24px 34px;
  color: var(--navy);
  letter-spacing: -.02em;
}

.brand-logo {
  width: 52px;
  height: auto;
  flex: 0 0 auto;
  filter: drop-shadow(0 5px 8px rgba(7, 27, 61, .14));
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: .98rem;
  font-weight: 850;
}

.brand-copy small {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.screen { display: none; }
.screen.active { display: block; animation: reveal .42s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } }

.intro-screen.active {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: center;
  gap: 48px;
  min-height: 650px;
  padding: 54px 72px 84px;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: .76rem;
  font-weight: 850;
  letter-spacing: .15em;
}

h1, h2, h3 { margin-top: 0; color: var(--navy); letter-spacing: -.04em; }
h1 { max-width: 720px; margin-bottom: 22px; font-size: clamp(2.55rem, 5.4vw, 5rem); line-height: .98; }
h2 { margin-bottom: 12px; font-size: clamp(2rem, 3.4vw, 3.5rem); line-height: 1.02; }
h3 { font-size: 1.55rem; }

.lead {
  max-width: 640px;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.13rem;
  line-height: 1.65;
}

.privacy-note {
  display: flex;
  gap: 12px;
  max-width: 620px;
  margin-bottom: 28px;
  padding: 16px 18px;
  border: 1px solid #cfe8f4;
  border-radius: 14px;
  color: #24455c;
  background: var(--sky-soft);
}
.privacy-note span { color: var(--blue); }
.privacy-note p { margin: 0; font-size: .93rem; line-height: 1.48; }

.primary-btn, .secondary-btn {
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.primary-btn { border: 0; color: var(--white); background: var(--navy); box-shadow: 0 10px 24px rgba(7, 27, 61, .18); }
.secondary-btn { border: 1px solid var(--line); color: var(--navy); background: var(--white); }
.primary-btn:hover, .secondary-btn:hover { transform: translateY(-2px); }
.primary-btn:focus-visible, .secondary-btn:focus-visible, .score-option:focus-within { outline: 3px solid rgba(103, 201, 249, .72); outline-offset: 3px; }

.duration { margin: 14px 0 0; color: var(--muted); font-size: .82rem; }

.intro-visual {
  position: relative;
  width: min(440px, 100%);
  aspect-ratio: 1;
  justify-self: center;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0 14%, rgba(103, 201, 249, .16) 15% 42%, rgba(242, 106, 61, .10) 43% 64%, transparent 65%);
}
.orbit { position: absolute; inset: 12%; border: 1px solid rgba(36, 56, 183, .22); border-radius: 45% 55% 47% 53%; transform: rotate(24deg); }
.orbit-two { inset: 23%; border-color: rgba(242, 106, 61, .35); transform: rotate(-32deg); }
.sun-core { position: absolute; inset: 38%; display: grid; place-items: center; border-radius: 50%; color: var(--white); background: var(--navy); font-size: 3.2rem; font-weight: 850; box-shadow: 0 18px 50px rgba(7, 27, 61, .25); }
.visual-label { position: absolute; padding: 8px 12px; border-radius: 999px; font-size: .7rem; font-weight: 900; letter-spacing: .14em; }
.label-mind { top: 12%; right: 8%; color: var(--blue); background: var(--sky-soft); }
.label-heart { bottom: 14%; left: 4%; color: #a93b20; background: var(--peach); }

.assessment-screen, .results-screen { padding: 22px 72px 70px; }
.progress-wrap { margin-bottom: 48px; }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 9px; color: var(--muted); font-size: .72rem; font-weight: 800; letter-spacing: .08em; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: #ebedf1; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--sky), var(--orange)); transition: width .35s ease; }

.section-heading { display: flex; gap: 18px; max-width: 820px; margin-bottom: 36px; }
.section-heading p:last-child, .results-heading > p:last-child { margin: 0; color: var(--muted); line-height: 1.55; }
.section-icon { display: grid; flex: 0 0 54px; width: 54px; height: 54px; place-items: center; border-radius: 16px; color: var(--blue); background: var(--sky-soft); font-size: 1.8rem; }
.assessment-screen.heart-mode .section-icon { color: var(--orange); background: var(--peach); }
.assessment-screen.heart-mode .eyebrow { color: var(--orange); }

.questions { display: grid; gap: 18px; }
.question-card { padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); }
.question-top { display: grid; grid-template-columns: minmax(170px, .72fr) 1.28fr; gap: 30px; align-items: start; }
.pillar-name { display: flex; gap: 12px; align-items: center; margin: 0 0 8px; color: var(--navy); font-size: 1.2rem; font-weight: 850; }
.pillar-number { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 50%; color: var(--blue); background: var(--sky-soft); font-size: .78rem; }
.heart-mode .pillar-number { color: var(--orange); background: var(--peach); }
.pillar-description, .guiding-question { margin: 0; color: var(--muted); line-height: 1.48; }
.guiding-question { color: var(--ink); font-weight: 700; }

.scale-labels { display: flex; justify-content: space-between; margin: 18px 0 8px; color: var(--muted); font-size: .7rem; }
.score-options { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px; border: 0; padding: 0; margin: 0; }
.score-option { position: relative; }
.score-option input { position: absolute; opacity: 0; pointer-events: none; }
.score-option label { display: grid; min-height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); background: #fafbfc; font-size: .86rem; font-weight: 800; transition: .15s ease; }
.score-option label:hover { border-color: var(--sky); color: var(--blue); }
.score-option input:checked + label { border-color: var(--blue); color: var(--white); background: var(--blue); box-shadow: 0 7px 14px rgba(36, 56, 183, .18); }
.heart-mode .score-option label:hover { border-color: var(--orange); color: var(--orange); }
.heart-mode .score-option input:checked + label { border-color: var(--orange); background: var(--orange); box-shadow: 0 7px 14px rgba(242, 106, 61, .18); }
.question-card.invalid { border-color: #c13c35; box-shadow: 0 0 0 2px rgba(193, 60, 53, .08); }

.form-error { margin: 18px 0 0; color: #a32e29; font-weight: 700; }
.form-actions, .result-actions { display: flex; justify-content: space-between; gap: 14px; margin-top: 30px; }

.results-heading { max-width: 760px; margin-bottom: 34px; }
.results-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr); gap: 22px; }
.chart-card, .reflection-card { border: 1px solid var(--line); border-radius: 22px; background: var(--white); }
.chart-card { padding: 18px; }
#radar-chart { display: block; width: 100%; height: auto; }
.legend { display: flex; justify-content: center; gap: 24px; color: var(--muted); font-size: .78rem; font-weight: 800; }
.legend span { display: flex; align-items: center; gap: 7px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; }
.mind-dot { background: var(--blue); }
.heart-dot { background: var(--orange); }
.reflection-card { padding: 30px; background: linear-gradient(160deg, var(--navy), #102d60); color: #eaf0fb; }
.reflection-card .eyebrow { color: var(--sky); }
.reflection-card h3 { color: var(--white); }
.reflection-card p { line-height: 1.6; }
.reflection-card strong { color: var(--white); }
.reflection-prompt { margin-top: 28px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.16); font-style: italic; }

.score-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }
.score-chip { display: flex; justify-content: space-between; gap: 8px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); font-size: .82rem; font-weight: 750; }
.score-chip strong { color: var(--blue); }
.score-chip.heart strong { color: var(--orange); }
.privacy-footer { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: .78rem; }

.page-footer { padding: 22px 20px 34px; text-align: center; color: var(--muted); font-size: .76rem; }

@media (max-width: 820px) {
  .app-shell { width: min(100% - 20px, 680px); margin-top: 10px; border-radius: 20px; }
  .brand { padding: 20px 22px; }
  .brand-logo { width: 46px; }
  .intro-screen.active { grid-template-columns: 1fr; min-height: auto; padding: 36px 26px 56px; }
  .intro-visual { width: min(330px, 88vw); grid-row: 1; }
  .assessment-screen, .results-screen { padding: 12px 24px 50px; }
  .progress-wrap { margin-bottom: 36px; }
  .question-top { grid-template-columns: 1fr; gap: 14px; }
  .results-grid { grid-template-columns: 1fr; }
  .score-list { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 520px) {
  h1 { font-size: 2.55rem; }
  .intro-visual { width: 270px; }
  .assessment-screen, .results-screen { padding-inline: 16px; }
  .section-heading { gap: 12px; }
  .section-icon { flex-basis: 44px; width: 44px; height: 44px; }
  .question-card { padding: 18px 14px; }
  .score-options { gap: 4px; }
  .score-option label { min-height: 36px; border-radius: 7px; font-size: .76rem; }
  .form-actions, .result-actions { flex-direction: column-reverse; }
  .form-actions button, .result-actions button { width: 100%; }
  .score-list { grid-template-columns: 1fr; }
}

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