:root {
  --bg: #f7f1e7;
  --bg-soft: #fcf7ef;
  --surface: rgba(255,255,255,.82);
  --surface-strong: rgba(255,255,255,.94);
  --text: #2f2418;
  --muted: #7f6b58;
  --line: rgba(66, 45, 24, .10);
  --brand: #d9912f;
  --brand-2: #c67812;
  --brand-3: #f0c074;
  --deep: #432d18;
  --success: #54784b;
  --warn: #c97a15;
  --danger: #8e3831;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow-1: 0 10px 30px rgba(67,45,24,.10);
  --shadow-2: 0 20px 60px rgba(67,45,24,.14);
  --max: 1120px;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(240,192,116,.22), transparent 35%),
    radial-gradient(circle at right 10% top 10%, rgba(217,145,47,.12), transparent 30%),
    linear-gradient(180deg, #f6efe4 0%, #fbf6ee 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
}

a {
  color: inherit;
}

.screen {
  display: none;
  min-height: 100vh;
}

.screen.active {
  display: block;
  animation: fadeUp .45s ease;
}

.container {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.site-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,.45);
  border: 1px solid rgba(67,45,24,.08);
  box-shadow: 0 8px 24px rgba(67,45,24,.06);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(67,45,24,.7);
  backdrop-filter: blur(8px);
}

.site-pill::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 5px rgba(217,145,47,.12);
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  border: none;
  cursor: pointer;
  transition: .25s ease;
}

.btn-primary {
  min-height: 56px;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--deep), #2e1f12);
  color: #fff6ea;
  font-weight: 800;
  letter-spacing: .01em;
  box-shadow: 0 16px 36px rgba(67,45,24,.22);
}

.btn-primary:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 22px 46px rgba(67,45,24,.28);
}

.btn-secondary {
  min-height: 52px;
  padding: 12px 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fffaf2;
  font-weight: 800;
  box-shadow: 0 14px 32px rgba(201,122,21,.25);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(201,122,21,.33);
}

.btn-ghost {
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  color: var(--deep);
  border: 1px solid rgba(67,45,24,.10);
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.btn-ghost:hover {
  background: rgba(255,255,255,.8);
  transform: translateY(-1px);
}

/* INTRO */
#screen-intro {
  display: none;
  position: relative;
  overflow: hidden;
  padding: 30px 0 44px;
}

#screen-intro.active {
  display: block;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 26px;
  align-items: stretch;
  min-height: calc(100vh - 74px);
}

.hero-copy,
.hero-card {
  border-radius: 34px;
  box-shadow: var(--shadow-2);
  position: relative;
  overflow: hidden;
}

.hero-copy {
  background:
    radial-gradient(circle at 0% 0%, rgba(255,255,255,.35), transparent 35%),
    linear-gradient(145deg, #ebb15b 0%, #d98e27 45%, #bd6d10 100%);
  padding: clamp(28px, 4vw, 54px);
  color: #2e1f12;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-copy::after {
  content: '';
  position: absolute;
  right: -90px;
  bottom: -90px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%);
  pointer-events: none;
}

.hero-card {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.76));
  border: 1px solid rgba(67,45,24,.08);
  backdrop-filter: blur(14px);
  padding: clamp(22px, 3.5vw, 34px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(47,36,24,.58);
  margin-bottom: 16px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 6vw, 70px);
  line-height: .96;
  margin: 0 0 18px;
  letter-spacing: -.02em;
  max-width: 11ch;
}

.hero-title span {
  display: block;
  color: rgba(46,31,18,.78);
  font-size: .54em;
  margin-top: 10px;
}

.hero-sub {
  max-width: 58ch;
  margin: 0 0 24px;
  font-size: 17px;
  line-height: 1.75;
  color: rgba(46,31,18,.82);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-meta-item {
  min-width: 124px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.26);
  backdrop-filter: blur(8px);
}

.hero-meta-label {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(46,31,18,.55);
  margin-bottom: 8px;
}

.hero-meta-value {
  font-size: 15px;
  font-weight: 700;
  color: #2f2418;
  line-height: 1.45;
}

.lama-stage {
  display: grid;
  place-items: center;
  min-height: 250px;
  padding-bottom: 6px;
}

.lama-stage img {
  width: min(100%, 310px);
  object-fit: contain;
  filter: drop-shadow(0 24px 36px rgba(67,45,24,.16));
  animation: floaty 4.5s ease-in-out infinite;
}

.mini-score-card {
  background: var(--surface-strong);
  border-radius: 24px;
  border: 1px solid rgba(67,45,24,.08);
  padding: 18px;
  box-shadow: 0 12px 26px rgba(67,45,24,.08);
}

.mini-score-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.mini-score-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--deep);
}

.mini-score-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
}

.mini-bars {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.mini-bar-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: center;
  gap: 10px;
}

.mini-bar-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--deep);
}

.mini-bar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(67,45,24,.08);
  overflow: hidden;
}

.mini-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
}

.intro-note {
  font-size: 12px;
  line-height: 1.7;
  color: rgba(47,36,24,.54);
}

/* QUIZ */
#screen-quiz {
  padding: 26px 0 64px;
}

.quiz-shell {
  max-width: 860px;
  margin: 0 auto;
}

.quiz-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.quiz-progress-card,
.question-card,
.quiz-side-note {
  background: linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,255,255,.74));
  border: 1px solid rgba(67,45,24,.08);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(16px);
}

.quiz-progress-card {
  border-radius: 22px;
  padding: 18px;
  margin-bottom: 18px;
}

.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.progress-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--deep);
}

.progress-step {
  font-size: 13px;
  font-weight: 800;
  color: rgba(67,45,24,.56);
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: rgba(67,45,24,.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--deep), var(--brand), var(--brand-2));
  transition: width .35s ease;
}

.question-layout {
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 18px;
  align-items: start;
}

.question-card {
  border-radius: 28px;
  padding: clamp(22px, 4vw, 34px);
}

.question-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(217,145,47,.10);
  color: var(--brand-2);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.question-text {
  font-family: var(--font-display);
  font-size: clamp(28px, 4.2vw, 42px);
  line-height: 1.12;
  letter-spacing: -.02em;
  margin: 0 0 10px;
  color: var(--deep);
}

.question-sub {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 52ch;
}

.options {
  display: grid;
  gap: 12px;
}

.opt-btn {
  width: 100%;
  text-align: left;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(67,45,24,.10);
  background: rgba(255,255,255,.74);
  color: var(--deep);
  font-weight: 700;
  line-height: 1.5;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  box-shadow: 0 10px 18px rgba(67,45,24,.04);
}

.opt-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(67,45,24,.18);
  background: rgba(255,255,255,.95);
}

.opt-btn.selected {
  background: linear-gradient(135deg, var(--deep), #5c3e23);
  color: #fffaf2;
  border-color: transparent;
  box-shadow: 0 16px 28px rgba(67,45,24,.22);
}

.opt-label {
  font-size: 15px;
}

.opt-points {
  min-width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(67,45,24,.06);
  color: rgba(67,45,24,.58);
  font-size: 12px;
  font-weight: 800;
}

.opt-btn.selected .opt-points {
  background: rgba(255,255,255,.14);
  color: rgba(255,255,255,.8);
}

.quiz-side-note {
  border-radius: 24px;
  padding: 18px;
  position: sticky;
  top: 18px;
}

.side-note-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--deep);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.side-note-text {
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
}

.quiz-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
}

.quiz-nav-left {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* RESULT */
#screen-result {
  padding-bottom: 70px;
}

.result-hero {
  padding: 28px 0 18px;
}

.result-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 22px;
}

.result-main,
.result-side,
.result-card,
.articles-card,
.product-card,
.final-note-card {
  border: 1px solid rgba(67,45,24,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,255,255,.76));
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-1);
}

.result-main,
.result-side {
  border-radius: 30px;
  overflow: hidden;
}

.result-main-head {
  padding: clamp(24px, 4vw, 38px);
  color: #fffaf2;
  position: relative;
}

.result-main-head.happy {
  background: linear-gradient(145deg, #5e8b52, #3e6a38 70%, #33572f 100%);
}

.result-main-head.neutral {
  background: linear-gradient(145deg, #d2892f, #b66a12 70%, #91520b 100%);
}

.result-main-head.worried {
  background: linear-gradient(145deg, #97473f, #7c3029 70%, #65231d 100%);
}

.result-main-head::after {
  content: '';
  position: absolute;
  right: -40px;
  top: -30px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%);
  pointer-events: none;
}

.result-head-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 20px;
}

.result-copy-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 4.5vw, 48px);
  line-height: 1.02;
  margin: 0 0 12px;
  letter-spacing: -.02em;
}

.result-copy-sub {
  margin: 0;
  color: rgba(255,250,242,.82);
  max-width: 52ch;
  line-height: 1.75;
  font-size: 15px;
}

.result-score-wrap {
  min-width: 160px;
  display: grid;
  place-items: center;
}

.result-lama-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
}

#result-lama {
  width: min(100%, 220px);
  max-height: 180px;
  object-fit: contain;
  filter: drop-shadow(0 18px 30px rgba(0,0,0,.14));
}

.result-main-body {
  padding: 22px;
  display: grid;
  gap: 16px;
}

.insight-box {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(67,45,24,.08);
}

.insight-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(67,45,24,.5);
  margin-bottom: 10px;
}

.insight-text {
  font-size: 15px;
  line-height: 1.75;
  color: var(--deep);
  margin: 0;
}

.result-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.result-side {
  padding: 22px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.result-card,
.product-card {
  border-radius: 24px;
  padding: 20px;
}

.card-title {
  margin: 0 0 16px;
  font-size: 18px;
  color: var(--deep);
  font-weight: 800;
}

.bars {
  display: grid;
  gap: 14px;
}

.bar-row {
  display: grid;
  gap: 8px;
}

.bar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.bar-label {
  font-size: 14px;
  font-weight: 700;
  color: var(--deep);
}

.bar-value {
  font-size: 13px;
  font-weight: 800;
}

.bar-track {
  height: 12px;
  background: rgba(67,45,24,.08);
  border-radius: 999px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  transition: width .8s cubic-bezier(.2,.8,.2,1);
}

.weak-list {
  display: grid;
  gap: 12px;
}

.weak-item {
  border-radius: 18px;
  background: rgba(217,145,47,.08);
  border: 1px solid rgba(217,145,47,.14);
  padding: 14px;
}

.weak-item strong {
  display: block;
  margin-bottom: 4px;
  font-size: 14px;
  color: var(--deep);
}

.weak-item span {
  display: block;
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
}

.product-wrap,
.articles-wrap,
.final-note-wrap {
  width: min(var(--max), calc(100% - 32px));
  margin: 22px auto 0;
}

.product-card {
  display: none;
}

.product-card.visible {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 20px;
  align-items: center;
}

.product-image {
  width: 160px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 12px 24px rgba(67,45,24,.12);
}

.product-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(217,145,47,.12);
  color: var(--brand-2);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 10px;
}

.product-name {
  margin: 0 0 8px;
  font-size: 24px;
  font-family: var(--font-display);
  color: var(--deep);
}

.product-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 60ch;
}

.articles-card {
  border-radius: 30px;
  padding: clamp(22px, 4vw, 34px);
}

.articles-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.articles-eyebrow {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: rgba(67,45,24,.5);
  margin-bottom: 10px;
}

.articles-title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--deep);
}

.articles-sub {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
  font-size: 15px;
  max-width: 58ch;
}

.article-debug {
  font-size: 13px;
  color: var(--muted);
  background: rgba(67,45,24,.04);
  border: 1px dashed rgba(67,45,24,.10);
  border-radius: 16px;
  padding: 10px 12px;
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 18px;
}

.article-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(67,45,24,.08);
  box-shadow: 0 16px 28px rgba(67,45,24,.06);
  transition: .28s ease;
}

.article-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 42px rgba(67,45,24,.12);
}

.article-image {
  aspect-ratio: 16/10;
  background: linear-gradient(135deg, rgba(217,145,47,.84), rgba(198,120,18,.95));
  position: relative;
  overflow: hidden;
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}

.article-card:hover .article-image img {
  transform: scale(1.04);
}

.article-badge {
  position: absolute;
  left: 14px;
  top: 14px;
  z-index: 2;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(47,36,24,.82);
  color: #fff7eb;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  max-width: calc(100% - 28px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.article-body {
  padding: 18px;
  display: grid;
  gap: 10px;
  flex: 1;
}

.article-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: rgba(67,45,24,.55);
  font-weight: 700;
}

.article-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.4;
  color: var(--deep);
  font-weight: 800;
}

.article-excerpt {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
  flex: 1;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
  color: var(--brand-2);
  font-size: 13px;
  font-weight: 800;
}

.article-score {
  color: rgba(67,45,24,.48);
  font-weight: 700;
  font-size: 12px;
}

.loading-box,
.empty-box {
  border-radius: 24px;
  background: rgba(67,45,24,.04);
  border: 1px dashed rgba(67,45,24,.12);
  padding: 22px;
  color: var(--muted);
  line-height: 1.75;
  grid-column: 1 / -1;
}

.final-note-card {
  border-radius: 24px;
  padding: 18px 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.75;
}

.muted-link {
  color: var(--brand-2);
  font-weight: 700;
  text-decoration: none;
}

#score-ring {
  display: block;
}

.hidden {
  display: none !important;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floaty {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .result-shell,
  .question-layout,
  .articles-grid,
  .product-card.visible {
    grid-template-columns: 1fr;
  }

  .quiz-side-note {
    position: static;
  }

  .result-score-wrap {
    min-width: auto;
  }

  .result-head-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .product-image {
    width: 100%;
    max-width: 200px;
  }
}

@media (max-width: 720px) {
  #screen-intro,
  #screen-quiz,
  #screen-result {
    padding-top: 12px;
  }

  .container,
  .result-shell,
  .product-wrap,
  .articles-wrap,
  .final-note-wrap {
    width: min(var(--max), calc(100% - 20px));
  }

  .hero-title {
    max-width: 12ch;
  }

  .hero-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .result-actions,
  .quiz-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .btn-primary,
  .btn-secondary,
  .btn-ghost {
    width: 100%;
  }

  .mini-bar-row {
    grid-template-columns: 78px 1fr;
  }

  .question-text {
    font-size: 30px;
  }

  .opt-btn {
    grid-template-columns: 1fr;
  }

  .result-copy-title {
    font-size: 34px;
  }

  .result-copy-sub,
  .insight-text,
  .product-text,
  .article-excerpt {
    font-size: 14px;
  }

  .article-title {
    font-size: 17px;
  }

  .product-name {
    font-size: 22px;
  }

  #result-lama {
    width: min(100%, 180px);
    max-height: 150px;
  }
}