:root {
  --bg: #f6f1e8;
  --bg-soft: #fbf8f2;
  --card: rgba(255, 252, 247, 0.88);
  --ink: #1f1d1a;
  --muted: #6b665c;
  --line: rgba(49, 44, 36, 0.12);
  --accent: #d46c33;
  --accent-deep: #a74e20;
  --accent-soft: rgba(212, 108, 51, 0.14);
  --olive: #51613c;
  --blue: #355d73;
  --shadow: 0 24px 80px rgba(50, 39, 25, 0.12);
  --radius-xl: 34px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  line-height: 1.68;
  background:
    radial-gradient(circle at top left, rgba(212, 108, 51, 0.16), transparent 28%),
    radial-gradient(circle at 100% 20%, rgba(81, 97, 60, 0.14), transparent 22%),
    linear-gradient(180deg, #f5eee4 0%, #f8f4ee 45%, #f3ecdf 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.26;
  background-image:
    linear-gradient(rgba(31, 29, 26, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 29, 26, 0.025) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.95), transparent 94%);
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea,
select {
  font: inherit;
}

.shell {
  width: calc(100% - 32px);
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 18px;
  z-index: 30;
  padding-top: 18px;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(251, 248, 242, 0.84);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(44, 36, 28, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent), #f3bc60);
  color: white;
  display: grid;
  place-items: center;
  font-family: Georgia, serif;
  font-size: 1.15rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.nav-links,
.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.nav-links {
  color: var(--muted);
  font-size: 0.96rem;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  background: rgba(81, 97, 60, 0.08);
  border-radius: 999px;
  padding: 4px;
  border: 1px solid rgba(81, 97, 60, 0.12);
}

.lang-toggle .lang-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 700;
}

.lang-toggle .lang-link.active {
  background: white;
  color: var(--ink);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.button,
.button-secondary,
.button-ghost,
.option-button,
.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button,
.button-secondary,
.button-ghost {
  padding: 14px 22px;
}

.small-button {
  padding: 11px 16px;
  background: rgba(255, 255, 255, 0.74);
  border-color: var(--line);
}

.button {
  background: var(--ink);
  color: white;
  box-shadow: 0 14px 28px rgba(31, 29, 26, 0.18);
}

.button-secondary {
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 28px rgba(167, 78, 32, 0.18);
}

.button-ghost {
  background: rgba(255, 255, 255, 0.74);
  border-color: var(--line);
}

.button:hover,
.button-secondary:hover,
.button-ghost:hover,
.option-button:hover,
.small-button:hover {
  transform: translateY(-2px);
}

main {
  padding-bottom: 90px;
}

section {
  padding: 28px 0;
}

.hero {
  padding-top: 44px;
}

.hero-grid,
.tool-grid,
.feature-grid,
.models-grid,
.faq-grid,
.result-grid,
.match-grid,
.footer-grid {
  display: grid;
  gap: 20px;
}

#tool .tool-grid {
  grid-template-columns: 1fr;
}

.hero-grid,
.tool-grid,
.result-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(320px, 0.96fr);
}

.hero-copy,
.hero-panel,
.panel,
.feature-card,
.model-card,
.faq-item,
.match-card,
.result-card,
.cta-card {
  border: 1px solid var(--line);
  background: var(--card);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-panel,
.panel,
.cta-card {
  border-radius: var(--radius-xl);
  padding: 30px;
}

.hero-copy {
  position: relative;
  overflow: hidden;
}

.hero-copy::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -90px;
  bottom: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 108, 51, 0.2), transparent 70%);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-size: 0.92rem;
  font-weight: 700;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  letter-spacing: -0.03em;
  font-family: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  line-height: 1.08;
}

h1 {
  margin-top: 18px;
  font-size: clamp(2.8rem, 5vw, 4.9rem);
  max-width: 12ch;
}

.hero-copy .lead,
.section-head p,
.panel p,
.feature-card p,
.model-card p,
.faq-answer p,
.match-card p,
.result-meta,
.result-card p,
.cta-card p,
.footer-grid p,
li {
  color: var(--muted);
}

.hero-copy .lead {
  margin: 20px 0 0;
  max-width: 64ch;
  font-size: 1.06rem;
}

.hero-actions,
.hero-badges,
.panel-actions,
.quiz-actions,
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions,
.result-actions {
  margin-top: 26px;
}

.hero-badges {
  margin-top: 24px;
}

.hero-badges span,
.inline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.94rem;
}

.panel-kicker {
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive);
}

.score-grid,
.feature-grid,
.models-grid,
.faq-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.match-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  align-items: start;
}

.score-grid {
  margin: 18px 0;
}

.score,
.feature-card,
.model-card,
.match-card,
.result-card,
.faq-item {
  border-radius: var(--radius-lg);
  padding: 22px;
}

.score {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.score strong {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 20px;
}

.section-head h2 {
  font-size: clamp(1.9rem, 4vw, 3rem);
}

.tool-section {
  scroll-margin-top: 120px;
}

.sticky-panel {
  position: sticky;
  top: 108px;
  align-self: start;
}

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

.mini-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mini-list li {
  position: relative;
  padding-left: 18px;
  margin-top: 10px;
}

.mini-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.quiz-stage.hidden,
.hidden {
  display: none;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.progress-label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 700;
}

.progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(49, 44, 36, 0.08);
  overflow: hidden;
}

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

.question-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(53, 93, 115, 0.08);
  color: var(--blue);
  font-weight: 700;
  font-size: 0.92rem;
}

.question-text {
  margin-top: 16px;
  font-size: clamp(1.65rem, 3vw, 2.4rem);
}

.question-hint {
  margin-top: 12px;
  color: var(--muted);
}

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

.question-list {
  display: grid;
  gap: 16px;
  margin-top: 18px;
}

.question-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.66);
  padding: 16px;
}

.question-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.question-no {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(81, 97, 60, 0.12);
  color: var(--olive);
  font-size: 0.86rem;
  font-weight: 700;
}

.question-dim {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.question-title {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.45;
}

.question-options {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.option-row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.option-row input[type="radio"] {
  accent-color: var(--accent);
  width: 18px;
  height: 18px;
}

.option-letter {
  font-weight: 800;
  color: var(--olive);
}

.quiz-submit {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.option-button {
  width: 100%;
  justify-content: space-between;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.72);
  border-color: var(--line);
  color: var(--ink);
  text-align: left;
}

.option-button.selected {
  background: var(--accent);
  color: white;
  border-color: transparent;
  box-shadow: 0 14px 24px rgba(167, 78, 32, 0.18);
}

.option-meta {
  font-size: 0.92rem;
  opacity: 0.82;
}

.quiz-actions {
  margin-top: 24px;
  justify-content: space-between;
}

.quiz-actions .right-actions {
  display: flex;
  gap: 12px;
}

.helper-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: rgba(81, 97, 60, 0.08);
  color: var(--olive);
  font-size: 0.94rem;
}

.result-top {
  display: grid;
  gap: 18px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
}

.result-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}

.result-title .type-code {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 6px 10px;
  border-radius: 999px;
}

.result-title h2 {
  font-size: clamp(2.2rem, 4vw, 3.6rem);
}

.result-copy {
  display: grid;
  gap: 12px;
}

.result-grid {
  margin-top: 24px;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  align-items: start;
}

.bar-group {
  display: grid;
  gap: 16px;
}

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

.bar-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.94rem;
}

.bar-track {
  height: 12px;
  border-radius: 999px;
  background: rgba(49, 44, 36, 0.08);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #f3bc60);
}

.match-card h4,
.feature-card h3,
.model-card h3,
.result-card h3,
.faq-item h3 {
  font-size: 1.28rem;
  margin-bottom: 12px;
}

.match-card {
  min-width: 0;
  overflow-wrap: anywhere;
}

.match-score {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(53, 93, 115, 0.08);
  color: var(--blue);
  font-size: 0.86rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.share-box {
  width: 100%;
  min-height: 116px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
  padding: 16px;
  color: var(--ink);
  resize: vertical;
}

.faq-question {
  width: 100%;
  border: 0;
  text-align: left;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 800;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.faq-question span:last-child {
  color: var(--accent-deep);
}

.faq-answer {
  display: none;
  margin-top: 14px;
}

.faq-item.open .faq-answer {
  display: block;
}

.cta-card {
  text-align: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(245, 230, 211, 0.92));
}

.cta-card p {
  max-width: 66ch;
  margin: 14px auto 0;
}

.footer-grid {
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  color: var(--muted);
}

@media (max-width: 1040px) {
  .hero-grid,
  .tool-grid,
  .result-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .sticky-panel {
    position: static;
  }

  .feature-grid,
  .models-grid,
  .faq-grid,
  .score-grid {
    grid-template-columns: 1fr 1fr;
  }

  .match-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .topbar {
    position: static;
  }

  .nav {
    border-radius: 28px;
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
  }

  .nav-links,
  .nav-actions {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .hero-copy,
  .hero-panel,
  .panel,
  .cta-card {
    padding: 24px;
  }

  h1 {
    font-size: 2.7rem;
  }

  .feature-grid,
  .models-grid,
  .faq-grid,
  .match-grid,
  .score-grid {
    grid-template-columns: 1fr;
  }

  .quiz-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .quiz-actions .right-actions {
    justify-content: space-between;
  }

  .result-title {
    flex-direction: column;
    align-items: flex-start;
  }
}
