:root {
  color-scheme: light;
  --cream: #f5efe3;
  --paper: #fff8ea;
  --ink: #f8efe2;
  --dark: #251f1a;
  --muted: #8c7a68;
  --line: rgba(255, 239, 215, 0.34);
  --line-dark: #dbcbb7;
  --sage: #9fb7a4;
  --sage-dark: #496e5c;
  --copper: #bd6a3b;
  --wine: #6b352d;
  --blue: #587e9e;
  --shadow: 0 26px 70px rgba(30, 18, 10, 0.28);
  --serif: "Songti SC", "Noto Serif SC", "STSong", "SimSun", serif;
  --script: "Snell Roundhand", "Kaiti SC", "STKaiti", "KaiTi", cursive;
  --sans:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-family: var(--sans);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(38, 31, 25, 0.88), rgba(68, 44, 27, 0.94)),
    #3a2b21;
  color: var(--ink);
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

.hero {
  display: grid;
  min-height: 92svh;
  place-items: center;
  padding: 64px 22px;
  background:
    linear-gradient(rgba(20, 24, 20, 0.18), rgba(26, 18, 12, 0.55)),
    url("./assets/warm-backdrop.jpg") center / cover no-repeat;
  text-align: center;
}

.hero-inner {
  width: min(980px, 100%);
}

.hero-kicker,
.kicker,
.panel-eyebrow {
  margin: 0;
  color: rgba(255, 247, 235, 0.9);
  font-family: var(--serif);
  font-size: clamp(17px, 2vw, 27px);
  letter-spacing: 0.04em;
  line-height: 1.5;
}

.hero h1 {
  margin: 26px 0 28px;
  color: white;
  font-family: var(--script);
  font-size: clamp(76px, 15vw, 184px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 0.92;
  text-shadow: 0 14px 48px rgba(0, 0, 0, 0.22);
}

.hero h1 span {
  display: block;
}

.hero h1 span:first-child {
  margin-bottom: -0.08em;
}

.hero-copy {
  width: min(720px, 100%);
  margin: 0 auto;
  color: rgba(255, 247, 235, 0.92);
  font-family: var(--serif);
  font-size: clamp(22px, 2.8vw, 36px);
  line-height: 1.62;
}

.hero-line {
  width: 64px;
  height: 1px;
  margin: 34px auto 22px;
  background: rgba(255, 247, 235, 0.72);
}

.start-link {
  display: inline-grid;
  min-width: 176px;
  min-height: 50px;
  place-items: center;
  border: 1px solid rgba(255, 247, 235, 0.38);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 15px;
  letter-spacing: 0.18em;
  text-decoration: none;
  transition:
    background 180ms ease,
    transform 180ms ease;
}

.start-link:hover,
.start-link:focus-visible {
  background: rgba(255, 255, 255, 0.2);
  outline: none;
  transform: translateY(-1px);
}

.quiz-section {
  min-height: 100svh;
  padding: 78px 22px 92px;
  background:
    linear-gradient(180deg, rgba(60, 43, 31, 0.2), rgba(34, 31, 26, 0.54)),
    radial-gradient(circle at 20% 0, rgba(159, 183, 164, 0.28), transparent 28%),
    #6b432a;
}

.section-heading {
  display: grid;
  width: min(760px, 100%);
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 28px;
  margin: 0 auto 54px;
}

.section-heading span {
  height: 1px;
  background: rgba(255, 239, 215, 0.32);
}

.section-heading p {
  margin: 0;
  color: rgba(255, 247, 235, 0.9);
  font-family: var(--serif);
  font-size: 28px;
  white-space: nowrap;
}

.quiz-layout {
  display: grid;
  width: min(1120px, 100%);
  grid-template-columns: minmax(0, 1fr) 326px;
  gap: 28px;
  margin: 0 auto;
  align-items: start;
}

.quiz-panel,
.status-panel {
  border: 1px solid rgba(255, 239, 215, 0.28);
  border-radius: 4px;
  background: rgba(37, 31, 26, 0.46);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.quiz-panel {
  min-height: 610px;
  padding: clamp(28px, 4vw, 54px);
}

.quiz-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255, 247, 235, 0.72);
  font-size: 14px;
  font-weight: 720;
}

.progress-track {
  height: 3px;
  margin: 18px 0 42px;
  overflow: hidden;
  background: rgba(255, 239, 215, 0.22);
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--sage);
  transition: width 220ms ease;
}

#questionText {
  max-width: 800px;
  min-height: 120px;
  margin: 0 0 32px;
  color: #fff9ed;
  font-family: var(--serif);
  font-size: clamp(31px, 4vw, 48px);
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.32;
}

.option-grid {
  display: grid;
  gap: 12px;
}

.option-card {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  min-height: 62px;
  border: 1px solid rgba(255, 239, 215, 0.24);
  border-radius: 3px;
  padding: 10px 16px 10px 10px;
  background: rgba(255, 248, 234, 0.08);
  color: rgba(255, 247, 235, 0.94);
  text-align: left;
  cursor: pointer;
  transition:
    background 170ms ease,
    border-color 170ms ease,
    transform 170ms ease;
}

.option-card:hover,
.option-card:focus-visible {
  border-color: rgba(255, 239, 215, 0.58);
  background: rgba(255, 248, 234, 0.15);
  outline: none;
  transform: translateY(-1px);
}

.option-card.selected {
  border-color: rgba(159, 183, 164, 0.94);
  background: rgba(159, 183, 164, 0.18);
}

.option-key {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 239, 215, 0.28);
  border-radius: 50%;
  color: rgba(255, 247, 235, 0.9);
  font-size: 13px;
  font-weight: 780;
}

.option-card.selected .option-key {
  border-color: var(--sage);
  background: var(--sage);
  color: #20342b;
}

.option-label {
  min-width: 0;
  font-size: 16px;
  font-weight: 680;
  line-height: 1.38;
}

.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}

.primary-btn,
.ghost-btn,
.text-btn {
  min-height: 46px;
  border-radius: 3px;
  padding: 0 19px;
  cursor: pointer;
  transition:
    background 170ms ease,
    transform 170ms ease,
    border-color 170ms ease;
}

.primary-btn {
  border: 1px solid var(--sage);
  background: var(--sage);
  color: #20342b;
  font-weight: 850;
}

.ghost-btn {
  border: 1px solid rgba(255, 239, 215, 0.28);
  background: rgba(255, 248, 234, 0.08);
  color: rgba(255, 247, 235, 0.95);
  font-weight: 760;
}

.text-btn {
  background: transparent;
  color: rgba(255, 247, 235, 0.7);
  font-weight: 720;
}

.primary-btn:hover,
.ghost-btn:hover,
.text-btn:hover {
  transform: translateY(-1px);
}

.primary-btn:focus-visible,
.ghost-btn:focus-visible,
.text-btn:focus-visible {
  outline: 3px solid rgba(159, 183, 164, 0.28);
  outline-offset: 3px;
}

.ghost-btn:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.status-panel {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 22px;
  padding: 24px;
}

.note-card {
  min-height: 178px;
  border: 1px solid rgba(255, 239, 215, 0.25);
  border-radius: 3px;
  padding: 24px 22px;
  background:
    linear-gradient(150deg, rgba(255, 248, 234, 0.18), rgba(255, 248, 234, 0.04)),
    rgba(255, 248, 234, 0.05);
}

.note-card p {
  margin: 0 0 24px;
  color: rgba(255, 247, 235, 0.7);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.note-card strong {
  display: block;
  color: #fff8ea;
  font-family: var(--script);
  font-size: 36px;
  font-weight: 400;
  line-height: 1.16;
}

.note-card span {
  display: block;
  width: 62px;
  height: 1px;
  margin-top: 24px;
  background: rgba(255, 239, 215, 0.48);
}

.panel-eyebrow {
  margin-bottom: 8px;
  color: rgba(255, 247, 235, 0.66);
  font-size: 14px;
}

.status-panel h2 {
  margin: 0 0 10px;
  color: #fff8ea;
  font-family: var(--serif);
  font-size: 29px;
  font-weight: 400;
  line-height: 1.24;
}

.status-panel p {
  margin-top: 0;
  color: rgba(255, 247, 235, 0.72);
  line-height: 1.78;
}

.bar-stack {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 247, 235, 0.88);
  font-size: 14px;
  font-weight: 720;
}

.bar-track {
  height: 6px;
  overflow: hidden;
  background: rgba(255, 239, 215, 0.2);
}

.bar-fill {
  width: 0;
  height: 100%;
  transition: width 220ms ease;
}

.compact .bar-track {
  height: 5px;
}

.signal-list,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.signal-list span,
.tag-row span {
  border: 1px solid rgba(255, 239, 215, 0.26);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 248, 234, 0.06);
  color: rgba(255, 247, 235, 0.88);
  font-size: 13px;
  font-weight: 720;
}

.hidden {
  display: none;
}

.result-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 128px;
  gap: 26px;
  align-items: center;
}

.result-heading h2 {
  margin: 0;
  color: #fff8ea;
  font-family: var(--serif);
  font-size: clamp(37px, 5vw, 61px);
  font-weight: 400;
  line-height: 1.08;
}

.score-ring {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255, 239, 215, 0.28);
  border-radius: 3px;
  padding: 16px;
  background: rgba(255, 248, 234, 0.08);
}

.score-ring small {
  margin-bottom: 10px;
  color: rgba(255, 247, 235, 0.68);
  font-size: 12px;
  font-weight: 760;
}

.score-ring span {
  color: #fff8ea;
  font-family: var(--serif);
  font-size: 43px;
  font-weight: 700;
  line-height: 1;
}

.result-summary {
  max-width: 780px;
  margin: 28px 0 20px;
  color: rgba(255, 247, 235, 0.82);
  font-size: 18px;
  line-height: 1.86;
}

.result-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(280px, 0.78fr);
  gap: 32px;
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 239, 215, 0.24);
}

.result-grid h3 {
  margin: 0 0 18px;
  color: #fff8ea;
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
}

.action-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 23px;
  color: rgba(255, 247, 235, 0.84);
  line-height: 1.74;
}

.action-list li::marker {
  color: var(--sage);
  font-weight: 900;
}

.copy-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 34px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 239, 215, 0.24);
}

.copy-box p {
  flex: 1 1 100%;
  margin: 0 0 4px;
  color: rgba(255, 247, 235, 0.72);
  line-height: 1.72;
}

@media (max-width: 960px) {
  .quiz-layout,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .status-panel {
    position: static;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 90svh;
    padding: 52px 18px;
  }

  .hero h1 {
    margin: 20px 0 22px;
    font-size: clamp(62px, 22vw, 94px);
  }

  .hero-copy {
    font-size: 21px;
    line-height: 1.68;
  }

  .start-link {
    min-width: 154px;
  }

  .quiz-section {
    padding: 48px 12px 64px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-bottom: 30px;
  }

  .section-heading p {
    text-align: center;
    font-size: 21px;
  }

  .section-heading span {
    width: 86px;
    margin: 0 auto;
  }

  .quiz-panel,
  .status-panel {
    padding: 20px;
  }

  .quiz-panel {
    min-height: 540px;
  }

  #questionText {
    min-height: auto;
    margin-bottom: 24px;
    font-size: 29px;
  }

  .option-card {
    grid-template-columns: 36px minmax(0, 1fr);
    min-height: 58px;
    padding: 8px 11px 8px 8px;
  }

  .option-label {
    font-size: 15px;
  }

  .result-heading {
    grid-template-columns: 1fr;
  }

  .score-ring {
    min-height: 92px;
  }

  .copy-box .primary-btn,
  .copy-box .ghost-btn {
    width: 100%;
  }
}
