/* Paleta */
:root {
  --ink: #406772;
  --accent: #a384a6;
  --warm: #643722;
  --bg: #f5f0eb;
  --paper: #fffdf8;
  --card-inner: #ffffff;
  --frame: #356058;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
  --radius: 22px;
  --radius-soft: 16px;
  --tap: min(48px, 12vw);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--frame);
  line-height: 1.55;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.wrap {
  width: min(100% - 2rem, 620px);
  margin-inline: auto;
}

.shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding-block: clamp(1.25rem, 5vw, 2.5rem);
  padding-bottom: calc(4.75rem + env(safe-area-inset-bottom));
}

@media (min-width: 721px) {
  .shell {
    padding-bottom: clamp(2rem, 6vw, 3rem);
  }
}

header.brand {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.brand-copy {
  flex: 1;
  min-width: 0;
}

header.brand .logo-slot {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 18px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

header.brand .logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

header.brand h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 560;
  font-size: clamp(1.35rem, 4.8vw, 1.82rem);
  line-height: 1.25;
  margin: 0;
  color: var(--paper);
}

.brand-subtitle {
  margin: 0.55rem 0 0;
  font-size: clamp(0.93rem, 3.35vw, 1.06rem);
  line-height: 1.47;
  font-weight: 500;
  color: rgba(255, 250, 245, 0.9);
}

section.block {
  background: var(--bg);
  border-radius: var(--radius);
  padding: clamp(1.35rem, 5vw, 2rem);
  box-shadow: var(--shadow);
  margin-bottom: clamp(1.25rem, 4vw, 2rem);
  color: var(--ink);
}

section.block.intro {
  background: var(--paper);
}

section.block.intro .para {
  color: var(--ink);
}

section.block.intro h1 {
  color: var(--ink);
}

.intro-box-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.22rem, 4.35vw, 1.52rem);
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 0 0 1.15rem;
  padding-bottom: 0.95rem;
  border-bottom: 2px solid rgba(163, 132, 166, 0.35);
  color: var(--warm);
}

section.block.intro h2.intro-box-title {
  color: var(--warm);
}

.lead-quote {
  font-size: clamp(1.05rem, 3.8vw, 1.2rem);
  color: var(--warm);
  font-weight: 600;
  margin-bottom: 1rem;
}

.para {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 3.6vw, 1.065rem);
}

.para:last-child {
  margin-bottom: 0;
}

.quote-list {
  margin: 0.5rem 0 1rem;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
}

.quote-list li {
  margin-bottom: 0.45rem;
  font-style: italic;
  color: var(--ink);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.65rem 1.35rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.02em;
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 28px rgba(163, 132, 166, 0.35);
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn-primary:active {
  transform: scale(0.98);
}

.intro .btn-primary {
  width: 100%;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: var(--tap);
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  width: 100%;
  text-decoration: none;
  box-sizing: border-box;
}

.btn-continue-quiz {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  padding: 0.72rem 1.65rem;
  border-radius: 14px;
  border: none;
  cursor: pointer;
  font-weight: 650;
  font-size: 0.98rem;
  background: var(--accent);
  color: #fff;
  letter-spacing: 0.03em;
  margin-left: auto;
  transition: transform 0.12s ease, filter 0.12s ease;
}

.btn-continue-quiz:active {
  transform: scale(0.98);
}

.cta-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.75rem 1rem calc(0.85rem + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, transparent, rgba(53, 96, 88, 0.92) 35%);
  display: none;
}

@media (max-width: 720px) {
  .cta-strip {
    display: block;
  }

  .cta-strip .btn-primary {
    width: 100%;
  }
}

.cta-strip.dismissed {
  display: none !important;
}

/* --- Quiz --- */
.kicker-label {
  text-align: center;
  margin: 0 0 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--warm);
}

.quiz-main-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: clamp(1.42rem, 4.8vw, 1.78rem);
  line-height: 1.28;
  text-align: center;
  margin: 0 auto 1rem;
  max-width: 26ch;
  color: var(--ink);
}

.quiz-sub {
  text-align: center;
  margin: 0 auto 1.35rem;
  font-size: 0.98rem;
  line-height: 1.52;
  color: rgba(64, 103, 114, 0.92);
  max-width: 36ch;
}

.progress-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
}

.progress-row-top span:last-child {
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.rule-line {
  height: 1px;
  background: rgba(100, 55, 34, 0.18);
  margin-bottom: 1.35rem;
}

.progress-track-inline {
  height: 8px;
  flex: 1;
  margin-left: 0.85rem;
  background: rgba(64, 103, 114, 0.12);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--ink), var(--accent));
  border-radius: 999px;
  transition: width 0.22s ease;
}

.question-card {
  background: var(--card-inner);
  border-radius: var(--radius-soft);
  padding: clamp(1.05rem, 4vw, 1.35rem);
  box-shadow: 0 10px 32px rgba(64, 103, 114, 0.08);
  border: 1px solid rgba(64, 103, 114, 0.08);
}

.question-kicker {
  margin: 0 0 0.85rem;
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--warm);
}

.question-text {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 550;
  font-size: clamp(1.06rem, 3.9vw, 1.26rem);
  line-height: 1.42;
  margin: 0 0 1.15rem;
  color: var(--ink);
}

.choices {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.choice {
  display: flex;
  align-items: flex-start;
  gap: 0.78rem;
  text-align: left;
  padding: 0.88rem 0.92rem;
  border-radius: 14px;
  border: 2px solid rgba(64, 103, 114, 0.14);
  background: rgba(245, 240, 235, 0.55);
  color: inherit;
  font: inherit;
  cursor: pointer;
  line-height: 1.45;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.choice .mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
  border: 2px solid rgba(64, 103, 114, 0.35);
  background: var(--card-inner);
}

.choice.selected {
  border-color: var(--ink);
  background: #eef6f8;
}

.choice.selected .mark {
  border-color: var(--ink);
  box-shadow: inset 0 0 0 4px var(--accent);
}

.choice:hover:not(.selected),
.choice:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(163, 132, 166, 0.22);
}

.quiz-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

.quiz-actions .ghost-back {
  min-height: var(--tap);
  padding: 0.5rem 0.85rem;
  border: none;
  background: none;
  color: rgba(64, 103, 114, 0.75);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.result-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 3.2vw, 1.4rem);
  margin-top: 1.5rem;
}

.result-panel {
  background: var(--card-inner);
  border-radius: var(--radius-soft);
  padding: clamp(1.05rem, 4vw, 1.35rem);
  box-shadow: 0 10px 32px rgba(64, 103, 114, 0.08);
  border: 1px solid rgba(64, 103, 114, 0.08);
}

.result-panel--cta {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.result-body .section-title,
.result-panel--cta .section-title {
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(1.38rem, 4.2vw, 1.65rem);
  margin: 1.25rem 0 0.75rem;
  color: var(--ink);
}

.result-panel--cta .section-title {
  margin-top: 0;
  margin-bottom: 0;
  font-size: clamp(1.0764rem, 3.276vw, 1.287rem);
}

.result-badge {
  display: inline-block;
  padding: 0.42rem 0.92rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(163, 132, 166, 0.28);
  color: var(--warm);
  margin-bottom: 0.95rem;
}

.result-body .section-title:first-child {
  margin-top: 0;
}

.result-body .sub-head {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 1.35rem 0 0.5rem;
  color: var(--warm);
}

.result-body ul {
  margin: 0.35rem 0 1rem;
  padding-left: 1.2rem;
}

.result-body ul li {
  margin-bottom: 0.42rem;
}

.result-body blockquote.quote-em {
  margin: 0.85rem 0 1rem;
  padding-left: 0.95rem;
  border-left: 3px solid var(--accent);
  font-style: italic;
  font-size: 0.96rem;
  color: var(--warm);
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
