:root {
  --paper: #f3ecdf;
  --paper-light: #fbf7ef;
  --ink: #332f29;
  --taupe: #786e62;
  --line: #cfc3b2;
  --olive: #536047;
  --olive-deep: #394332;
  --terracotta: #b86646;
  --ochre: #c29058;
  --serif: "Songti SC", "STSong", "SimSun", serif;
  --latin: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 82% 8%, rgba(184, 102, 70, .08), transparent 29rem),
    linear-gradient(90deg, rgba(83, 96, 71, .025) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 9rem 100%, auto;
  font-family: var(--serif);
}

button { font: inherit; }
button:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 4px; }

.paper-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .18;
  z-index: 20;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.site-header {
  height: 92px;
  padding: 0 clamp(22px, 6vw, 96px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 5;
}

.identity {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.identity-seal {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--terracotta);
  color: var(--terracotta);
  font-size: 19px;
  transform: rotate(-3deg);
}

.identity strong,
.identity small { display: block; }
.identity strong { font: 600 13px var(--latin); letter-spacing: .25em; }
.identity small { margin-top: 4px; color: var(--taupe); font-size: 12px; letter-spacing: .12em; }

.issue,
.kicker,
.eyebrow,
.latin,
.section-tag,
.folio {
  font-family: var(--latin);
  letter-spacing: .22em;
  text-transform: uppercase;
}

.issue { margin: 0; color: var(--taupe); font-size: 11px; }
.issue i { display: inline-block; width: 28px; height: 1px; margin: 0 10px 3px; background: var(--terracotta); }

.shell { width: min(1180px, calc(100% - 44px)); margin-inline: auto; }

.landing {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  gap: clamp(48px, 9vw, 130px);
  align-items: center;
  padding-block: clamp(70px, 10vw, 140px) 80px;
}

.landing-copy { max-width: 720px; }
.kicker, .eyebrow { margin: 0; color: var(--terracotta); font-size: 12px; }
.kicker span { margin-right: 20px; color: var(--ochre); }

.landing h1,
.result-hero h1 {
  margin: 24px 0 32px;
  color: var(--olive-deep);
  font-weight: 400;
  font-size: clamp(58px, 8.5vw, 112px);
  line-height: .98;
  letter-spacing: .06em;
}

.landing h1 em,
.result-hero h1 em { color: var(--terracotta); font-style: normal; }

.intro,
.result-deck,
.analysis-copy,
.section-intro {
  color: var(--taupe);
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 2;
}

.intro { max-width: 620px; margin: 0 0 38px; }

.button {
  min-height: 50px;
  padding: 13px 23px;
  border: 1px solid var(--olive);
  cursor: pointer;
  letter-spacing: .12em;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.button:hover { transform: translateY(-2px); }
.button-primary { color: var(--paper-light); background: var(--olive); }
.button-primary:hover { background: var(--olive-deep); }
.button-secondary { color: var(--olive); background: transparent; }
.button-quiet { min-height: auto; padding: 10px 3px; border: 0; border-bottom: 1px solid var(--line); color: var(--taupe); background: transparent; }
.button span { margin-left: 34px; color: #e1c49c; }

.facts {
  display: flex;
  gap: 32px;
  padding: 0;
  margin: 58px 0 0;
  list-style: none;
  color: var(--taupe);
  font-size: 12px;
}
.facts li + li::before { content: "·"; margin-right: 32px; color: var(--terracotta); }

.landing-card {
  min-height: 470px;
  padding: 32px;
  border: 1px solid var(--terracotta);
  background: rgba(251, 247, 239, .33);
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.landing-card::before { content: ""; position: absolute; inset: 12px; border: 1px solid rgba(184, 102, 70, .25); pointer-events: none; }
.folio { color: var(--terracotta); font-size: 10px; }
.landing-card blockquote { margin: 80px 8px 0; color: var(--olive-deep); font-size: 24px; line-height: 1.8; }
.landing-card > p { margin: 0; color: var(--taupe); font-size: 13px; line-height: 1.8; text-align: right; }
.card-orbit { width: 112px; height: 112px; margin: 12px auto; border: 1px solid var(--ochre); border-radius: 50%; display: grid; place-items: center; position: relative; }
.card-orbit::before, .card-orbit::after { content: ""; position: absolute; background: var(--ochre); }
.card-orbit::before { width: 146px; height: 1px; }
.card-orbit::after { width: 1px; height: 146px; }
.card-orbit b { z-index: 1; padding: 7px; background: var(--paper); color: var(--olive); font: 18px var(--latin); }

.manifesto { grid-column: 1 / -1; display: grid; grid-template-columns: 180px 1fr; gap: 32px; align-items: start; border-top: 1px solid var(--line); padding-top: 28px; }
.manifesto span { color: var(--terracotta); font: 10px var(--latin); letter-spacing: .2em; }
.manifesto p { max-width: 650px; margin: 0; color: var(--taupe); line-height: 1.9; }

.test-page { min-height: calc(100vh - 92px); padding-block: 54px 90px; }
.test-meta { display: flex; justify-content: space-between; color: var(--taupe); font: 11px var(--latin); letter-spacing: .18em; }
.progress { height: 2px; margin: 16px 0 clamp(62px, 10vw, 110px); background: var(--line); }
.progress span { display: block; height: 100%; background: var(--terracotta); transition: width .35s ease; }
.question-wrap { max-width: 880px; margin-inline: auto; }
.question-wrap h1 { max-width: 820px; margin: 16px 0 46px; color: var(--olive-deep); font-weight: 400; font-size: clamp(30px, 4.3vw, 52px); line-height: 1.45; }
.answer-list { display: grid; gap: 12px; }
.answer {
  width: 100%;
  display: grid;
  grid-template-columns: 42px 1fr 24px;
  gap: 15px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: rgba(251, 247, 239, .32);
  text-align: left;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, transform .2s ease;
}
.answer:hover { border-color: var(--terracotta); background: rgba(184, 102, 70, .07); transform: translateX(5px); }
.answer b { color: var(--terracotta); font: 20px var(--latin); }
.answer i { color: var(--ochre); font-style: normal; }
.test-nav { max-width: 880px; margin: 36px auto 0; display: flex; justify-content: space-between; align-items: center; color: var(--taupe); font-size: 12px; }

.result-page { padding-block: 75px 120px; }
.result-hero { padding-bottom: 55px; border-bottom: 1px solid var(--line); }
.result-hero h1 { max-width: 940px; font-size: clamp(39px, 6.3vw, 77px); }
.result-deck { max-width: 680px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 30px; }

.primary-match {
  margin: 56px 0 110px;
  padding: clamp(30px, 5vw, 58px);
  border: 1px solid var(--terracotta);
  background: linear-gradient(120deg, rgba(184,102,70,.12), rgba(251,247,239,.2));
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 50px;
}
.primary-match-copy { max-width: 900px; }
.literary-index { max-width: 720px; margin: 0 auto 40px; text-align: center; }
.literary-index-title { margin: 0 0 24px; color: var(--taupe); font-size: clamp(15px, 2.1vw, 22px); letter-spacing: .48em; text-indent: .48em; }
.literary-index-meta { display: flex; justify-content: center; gap: clamp(28px, 7vw, 86px); color: var(--ink); font: 10px var(--latin); letter-spacing: .2em; }
.literary-index-meta b { color: var(--terracotta); font-style: italic; }
.literary-index-subtitle { margin: 10px 0 0; color: var(--taupe); font-size: 8px; letter-spacing: .65em; text-indent: .65em; }
.primary-match h2 { margin: 20px 0 3px; color: var(--olive-deep); font-size: clamp(33px, 4.5vw, 51px); font-weight: 400; }
.latin { margin: 0; color: var(--terracotta); font-size: 9px; }
.score { display: block; margin: 26px 0 10px; color: var(--terracotta); font: 39px var(--latin); }
.archetype { color: var(--taupe); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.chips span { padding: 5px 0; border-bottom: 1px solid var(--ochre); color: var(--taupe); font-size: 9px; }
.writer-quote { max-width: 780px; margin: 58px auto 0; padding: 34px 24px 0; border-top: 1px solid rgba(207,195,178,.8); text-align: center; }
.writer-quote-prose { display: grid; gap: 5px; }
.writer-quote-prose p { margin: 0; color: var(--olive-deep); font-family: var(--serif); font-size: clamp(13px, 2vw, 20px); line-height: 1.8; }
.writer-quote-excerpt { max-width: 680px; margin: 38px auto 0; padding: 30px 20px 0; border-top: 1px solid rgba(207,195,178,.65); }
.writer-quote-excerpt p { margin: 0; color: var(--ink); font-family: var(--serif); font-size: clamp(13px, 2vw, 20px); line-height: 1.85; }
.writer-quote cite { display: block; margin-top: 17px; color: var(--terracotta); font: 9px var(--latin); font-style: normal; letter-spacing: .08em; }

.result-section { margin-bottom: 105px; }
.section-head { display: grid; grid-template-columns: 54px 1fr auto; gap: 18px; align-items: end; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.section-head > span { color: var(--ochre); font: 9px var(--latin); letter-spacing: .15em; }
.section-head h2 { margin: 0; color: var(--olive-deep); font-size: clamp(26px, 4vw, 40px); font-weight: 400; }
.section-tag { color: var(--terracotta); font-size: 6px; }
.analysis-copy { max-width: 780px; margin: 30px 0 36px; }
.trait-list { max-width: 760px; display: grid; gap: 17px; }
.trait { display: grid; grid-template-columns: 100px 1fr 42px; gap: 16px; align-items: center; color: var(--taupe); font-size: 10px; }
.trait-track { height: 5px; background: var(--line); }
.trait-track i { display: block; height: 100%; background: var(--olive); }
.trait em { color: var(--terracotta); font: 10px var(--latin); font-style: normal; }
.radar-wrap { display: grid; grid-template-columns: minmax(280px, 420px) 1fr; gap: clamp(28px, 7vw, 86px); align-items: center; margin-top: 30px; }
.radar-chart { width: min(100%, 420px); margin: 0 auto; }
.radar-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.radar-grid polygon { fill: none; stroke: rgba(120,110,98,.27); stroke-width: 1; }
.radar-axis line { stroke: rgba(120,110,98,.22); stroke-width: 1; }
.radar-area { fill: rgba(184,102,70,.17); stroke: var(--olive-deep); stroke-width: 2.2; stroke-linejoin: round; }
.radar-chart circle { fill: var(--olive-deep); stroke: var(--paper-light); stroke-width: 2; }
.radar-labels text { fill: var(--taupe); font: 11px var(--serif); }
.radar-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.radar-metric { padding: 18px 0 16px; border-top: 1px solid var(--line); }
.radar-metric:nth-child(5) { grid-column: 1 / -1; max-width: calc(50% - 12px); }
.radar-metric div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.radar-metric strong { color: var(--olive-deep); font-size: 14px; font-weight: 400; }
.radar-metric b { color: var(--terracotta); font: 17px var(--latin); font-weight: 400; }
.radar-metric p { margin: 8px 0 0; color: var(--taupe); font-size: 10px; line-height: 1.7; }

.section-intro { max-width: 820px; margin: 24px 0 0; }
.book-grid, .writer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 30px; }
.book-card, .writer-card { min-height: 230px; padding: 26px; border: 1px solid var(--line); background: rgba(251,247,239,.26); position: relative; }
.book-card:nth-child(2), .writer-card:nth-child(2) { transform: translateY(16px); border-top-color: var(--terracotta); }
.book-card:nth-child(3), .writer-card:nth-child(3) { border-top-color: var(--olive); }
.book-no { color: var(--ochre); font: 8px var(--latin); letter-spacing: .18em; }
.book-card h3, .writer-card h3 { margin: 28px 0 6px; color: var(--olive-deep); font-size: 21px; font-weight: 400; }
.book-author { margin: 0; color: var(--terracotta) !important; }
.book-card p, .writer-card p { color: var(--taupe); font-size: 10px; line-height: 1.8; }
.writer-card .score { font-size: 35px; margin: 23px 0 8px; }
.writer-card:first-child { border-color: var(--terracotta); background: rgba(184,102,70,.07); }

.site-footer { padding: 28px clamp(22px, 6vw, 96px); display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); color: var(--taupe); font-size: 11px; }
.fatal { margin: 20px; padding: 20px; border: 1px solid var(--terracotta); color: var(--terracotta); background: var(--paper-light); }
.error-panel { max-width: 720px; margin: 90px auto; padding: 32px; border: 1px solid var(--terracotta); background: var(--paper-light); }
.error-panel h1 { color: var(--olive); font-weight: 400; }

.reveal { animation: rise .65s both cubic-bezier(.22,.7,.2,1); }
.delay-1 { animation-delay: .12s; }
.delay-2 { animation-delay: .24s; }
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

@media (max-width: 760px) {
  .site-header { height: 76px; }
  .issue { display: none; }
  .landing { min-height: auto; grid-template-columns: 1fr; padding-top: 70px; }
  .landing h1 { font-size: clamp(46px, 15vw, 62px); }
  .intro, .result-deck, .analysis-copy, .section-intro { font-size: 14px; line-height: 1.85; }
  .kicker, .eyebrow { font-size: 10px; }
  .identity strong { font-size: 11px; }
  .identity small { font-size: 10px; }
  .landing-card blockquote { margin-top: 54px; font-size: 19px; line-height: 1.65; }
  .landing-card > p, .manifesto p { font-size: 12px; }
  .button { min-height: 46px; padding: 11px 17px; font-size: 13px; }
  .landing-card { min-height: 390px; }
  .manifesto { grid-template-columns: 1fr; gap: 13px; }
  .facts { gap: 12px; }
  .facts li + li::before { margin-right: 12px; }
  .question-wrap h1 { margin-bottom: 30px; font-size: 25px; line-height: 1.55; }
  .answer { font-size: 14px; line-height: 1.65; }
  .test-nav { font-size: 11px; }
  .answer { padding: 17px 15px; grid-template-columns: 34px 1fr 16px; }
  .primary-match { grid-template-columns: 1fr; }
  .result-page { padding-block: 48px 76px; }
  .result-hero h1 { font-size: clamp(27px, 9vw, 43px); }
  .result-hero h1 { margin: 17px 0 23px; }
  .primary-match h2 { font-size: 27px; }
  .literary-index { margin-bottom: 32px; }
  .literary-index-title { margin-bottom: 16px; font-size: 13px; letter-spacing: .3em; text-indent: .3em; }
  .literary-index-meta { gap: 18px; font-size: 7px; letter-spacing: .12em; }
  .literary-index-subtitle { font-size: 6px; letter-spacing: .4em; text-indent: .4em; }
  .archetype { font-size: 10px; line-height: 1.75; }
  .score { margin-top: 22px; font-size: 31px; }
  .chips { gap: 8px; margin-top: 14px; }
  .chips span { font-size: 8px; }
  .section-head { grid-template-columns: 38px 1fr; }
  .section-head h2 { font-size: 22px; }
  .section-head > span { font-size: 7px; }
  .result-section { margin-bottom: 70px; }
  .writer-quote { margin-top: 42px; padding: 26px 8px 0; }
  .writer-quote-prose p, .writer-quote-excerpt p { font-size: 12px; line-height: 1.85; }
  .writer-quote-excerpt { margin-top: 24px; padding: 21px 8px 0; }
  .radar-wrap { grid-template-columns: 1fr; gap: 26px; }
  .radar-chart { width: min(100%, 340px); }
  .radar-labels text { font-size: 10px; }
  .radar-metrics { gap: 0 14px; }
  .radar-metric strong { font-size: 12px; }
  .radar-metric b { font-size: 14px; }
  .radar-metric p { font-size: 9px; }
  .radar-metric:nth-child(5) { max-width: none; }
  .trait { grid-template-columns: 70px 1fr 30px; gap: 8px; font-size: 12px; }
  .book-card h3, .writer-card h3 { font-size: 17px; }
  .book-card p, .writer-card p { font-size: 9px; }
  .section-tag { display: none; }
  .book-grid, .writer-grid { grid-template-columns: 1fr; }
  .book-card:nth-child(2), .writer-card:nth-child(2) { transform: none; }
  .trait { grid-template-columns: 80px 1fr 34px; gap: 10px; }
  .result-actions { display: grid; }
  .site-footer { flex-direction: column; }
}
