:root {
  --ink: #17202a;
  --muted: #627086;
  --paper: #f5f7fb;
  --panel: #ffffff;
  --line: rgba(23, 32, 42, 0.14);
  --line-strong: rgba(23, 32, 42, 0.24);
  --red: #d64f45;
  --blue: #4157b7;
  --green: #2f8f6f;
  --gold: #b87900;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.12);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, "Noto Sans SC", "Microsoft YaHei", "PingFang SC", system-ui,
    sans-serif;
  background:
    linear-gradient(90deg, rgba(65, 87, 183, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(47, 143, 111, 0.06) 1px, transparent 1px),
    var(--paper);
  background-size: 32px 32px;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.site-shell {
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max), calc(100% - 32px));
  margin: 14px auto 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 38px rgba(23, 32, 42, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  color: var(--blue);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
  line-height: 1.15;
}

.brand small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.topnav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.topnav a,
.language-toggle {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #2f3b4d;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
}

.topnav a:hover,
.language-toggle:hover {
  border-color: var(--line);
  background: #f7f9fc;
}

main {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 112px);
  padding: 48px 0 38px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: 48px;
  line-height: 1.04;
}

h1 span {
  display: block;
}

.hero-lead {
  max-width: 760px;
  margin-bottom: 24px;
  color: #344154;
  font-size: 18px;
  line-height: 1.8;
}

.mode-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.mode-card {
  display: grid;
  gap: 7px;
  min-height: 138px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
}

.mode-card:hover,
.mode-card:focus-visible {
  border-color: rgba(65, 87, 183, 0.5);
  transform: translateY(-2px);
}

.mode-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mode-card strong {
  color: var(--blue);
  font-size: 38px;
  line-height: 1;
}

.mode-card small {
  color: #415066;
  font-size: 13px;
  line-height: 1.45;
}

.mode-card.is-featured {
  border-color: rgba(217, 79, 69, 0.55);
  background: linear-gradient(180deg, #fff, #fff7f6);
}

.disclaimer {
  max-width: 760px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.hero-visual {
  min-width: 0;
}

.axis-wheel {
  position: relative;
  min-height: 500px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at center, #fff 0 22%, rgba(65, 87, 183, 0.1) 23% 42%, transparent 43%),
    linear-gradient(90deg, rgba(65, 87, 183, 0.07), rgba(47, 143, 111, 0.08)),
    #fff;
  box-shadow: var(--shadow);
}

.axis-wheel span,
.axis-wheel b {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 74px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.axis-wheel b {
  left: 50%;
  top: 50%;
  min-width: 126px;
  min-height: 78px;
  border: 2px solid #dbe3ef;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  line-height: 1.25;
  transform: translate(-50%, -50%);
}

.axis-wheel span:nth-child(1) { left: 43%; top: 12%; background: #d64f45; }
.axis-wheel span:nth-child(2) { right: 15%; top: 18%; background: #b87900; }
.axis-wheel span:nth-child(3) { right: 8%; top: 43%; background: #1f7a8c; }
.axis-wheel span:nth-child(4) { right: 18%; bottom: 17%; background: #a24da3; }
.axis-wheel span:nth-child(5) { left: 44%; bottom: 9%; background: #2487a6; }
.axis-wheel span:nth-child(6) { left: 16%; bottom: 17%; background: #7a55b8; }
.axis-wheel span:nth-child(7) { left: 7%; top: 43%; background: #4157b7; }
.axis-wheel span:nth-child(8) { left: 16%; top: 18%; background: #5c6f84; }
.axis-wheel span:nth-child(9) { left: 43%; top: 28%; background: #304c89; }
.axis-wheel span:nth-child(10) { left: 43%; bottom: 28%; background: #3f944c; }

.panel,
.method-section,
.sources-section,
.result-section {
  margin: 28px 0;
}

.panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.is-hidden {
  display: none !important;
}

.panel-head,
.quiz-actions,
.result-actions,
.section-heading,
.dimension-title,
.dimension-foot,
.axis-meta,
.match-head,
.map-labels {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2,
.section-heading h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.15;
}

.section-heading {
  margin-bottom: 18px;
}

.ghost-button {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.ghost-button:hover:not(:disabled),
.ghost-button:focus-visible:not(:disabled) {
  border-color: var(--blue);
  background: #f6f8ff;
}

.ghost-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.progress-shell {
  height: 10px;
  margin: 18px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #e7ebf2;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--blue), var(--red));
  transition: width 160ms ease;
}

.question-card {
  min-height: 360px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
}

.question-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.axis-pill {
  --axis-color: var(--blue);
  margin: 0;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--axis-color), transparent 45%);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--axis-color), white 90%);
  color: #1f2b3a;
  font-size: 13px;
  font-weight: 900;
}

#subdomainLabel,
.match-head span,
.tag-list span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

#questionText {
  min-height: 118px;
  margin-bottom: 18px;
  font-size: 27px;
  line-height: 1.45;
}

.scale-helper {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.scale-helper span:nth-child(2) { text-align: center; }
.scale-helper span:nth-child(3) { text-align: right; }

.scale-row {
  display: grid;
  grid-template-columns: repeat(9, minmax(0, 1fr));
  gap: 8px;
}

.scale-button,
.importance-button {
  display: grid;
  min-width: 0;
  min-height: 72px;
  padding: 10px 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  place-items: center;
}

.scale-button span {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #edf1f7;
  font-weight: 900;
}

.scale-button small {
  max-width: 100%;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.scale-button:hover,
.importance-button:hover {
  border-color: var(--blue);
  background: #f6f8ff;
}

.scale-button:hover span {
  background: var(--blue);
  color: #fff;
}

.weight-card p:not(.axis-pill) {
  max-width: 760px;
  color: #415066;
  line-height: 1.75;
}

.importance-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.quiz-actions {
  margin-top: 16px;
}

#answeredCount {
  color: var(--muted);
  font-size: 14px;
}

.result-hero {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.result-hero h2 {
  margin: 0;
  font-size: 40px;
}

.result-summary,
.confidence-text {
  max-width: 900px;
  color: #344154;
  font-size: 16px;
  line-height: 1.75;
}

.result-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-top: 4px;
}

.result-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.05fr 1.2fr;
  gap: 16px;
  align-items: stretch;
}

.result-card {
  min-width: 0;
  min-height: 380px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcff;
}

.tag-list,
.insight-list,
.source-list {
  display: grid;
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.tag-list li,
.insight-list li,
.source-list li {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  line-height: 1.65;
}

.tag-list li {
  display: grid;
  gap: 5px;
  border-left: 4px solid var(--red);
}

.chart-card canvas {
  display: block;
  width: 100%;
  max-width: 460px;
  aspect-ratio: 1;
  margin: 0 auto;
}

.coordinate-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.coordinate-tabs button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
}

.coordinate-tabs button.is-active {
  border-color: var(--blue);
  background: #f0f4ff;
  color: var(--blue);
  font-weight: 900;
}

.coordinate-map {
  position: relative;
  min-height: 300px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(217, 79, 69, 0.08), transparent 48%, rgba(65, 87, 183, 0.11)),
    linear-gradient(0deg, rgba(47, 143, 111, 0.09), transparent 48%, rgba(184, 121, 0, 0.1)),
    #fff;
  overflow: hidden;
}

.x-line,
.y-line {
  position: absolute;
  background: rgba(23, 32, 42, 0.2);
}

.x-line {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.y-line {
  left: 50%;
  top: 0;
  width: 1px;
  height: 100%;
}

.map-dot {
  position: absolute;
  display: grid;
  min-width: 28px;
  min-height: 22px;
  padding: 3px 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #4157b7;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  place-items: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 18px rgba(23, 32, 42, 0.18);
}

.map-dot.ref {
  background: #5c6f84;
  opacity: 0.84;
}

.map-dot.user {
  z-index: 3;
  min-width: 42px;
  min-height: 30px;
  background: var(--red);
  font-size: 12px;
}

.map-labels {
  align-items: flex-start;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.dimension-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dimension-row {
  --axis-color: var(--blue);
  --marker: 50%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.dimension-title strong,
.dimension-title span {
  display: block;
}

.dimension-title span {
  color: var(--axis-color);
  font-size: 12px;
  font-weight: 900;
}

.dimension-title strong {
  margin-top: 2px;
  font-size: 15px;
}

.dimension-title b {
  color: var(--axis-color);
  font-size: 22px;
}

.axis-meta,
.dimension-foot {
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
}

.axis-track {
  position: relative;
  height: 12px;
  margin-top: 8px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--axis-color), white 35%), #eef2f7 50%, color-mix(in srgb, var(--axis-color), white 70%));
}

.axis-track::before {
  position: absolute;
  left: 50%;
  top: -3px;
  width: 2px;
  height: 18px;
  background: rgba(23, 32, 42, 0.35);
  content: "";
}

.axis-track i {
  position: absolute;
  left: var(--marker);
  top: 50%;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--axis-color);
  box-shadow: 0 4px 12px rgba(23, 32, 42, 0.18);
  transform: translate(-50%, -50%);
}

.match-list {
  display: grid;
  gap: 12px;
}

.match-row {
  --match: 0%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.match-head b {
  color: var(--blue);
  font-size: 24px;
}

.match-row p {
  margin: 8px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.match-row > i {
  display: block;
  height: 8px;
  margin-top: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) var(--match), #e8edf5 var(--match));
}

.heat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.heat-grid span {
  min-width: 0;
  padding: 7px 6px;
  border-radius: var(--radius);
  background: color-mix(in srgb, #d64f45 var(--heat), #edf2f7);
  color: #243044;
  font-size: 11px;
  text-align: center;
}

.method-section,
.sources-section {
  padding: 34px 0 12px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.method-grid article {
  min-height: 210px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
}

.method-grid span {
  color: var(--red);
  font-size: 13px;
  font-weight: 900;
}

.method-grid p {
  color: #415066;
  line-height: 1.75;
}

.source-list a {
  color: var(--blue);
  font-weight: 800;
  text-decoration: none;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  width: min(var(--max), calc(100% - 32px));
  margin: 28px auto 0;
  padding: 28px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.footer p {
  margin: 0;
}

.footer a {
  font-weight: 800;
  text-decoration: none;
}

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

  .axis-wheel {
    min-height: 420px;
  }
}

@media (max-width: 780px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topnav {
    justify-content: flex-start;
  }

  h1 {
    font-size: 34px;
  }

  .hero-lead {
    font-size: 16px;
  }

  .mode-actions,
  .dimension-list,
  .method-grid {
    grid-template-columns: 1fr;
  }

  .scale-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .importance-row {
    grid-template-columns: 1fr;
  }

  #questionText {
    min-height: 150px;
    font-size: 22px;
  }

  .question-card {
    min-height: 520px;
    padding: 16px;
  }

  .panel {
    padding: 16px;
  }

  .panel-head,
  .quiz-actions,
  .section-heading,
  .dimension-foot,
  .heat-grid {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .quiz-actions,
  .panel-head,
  .section-heading,
  .dimension-foot {
    flex-direction: column;
  }

  .quiz-actions .ghost-button {
    width: 100%;
  }
}

@media (max-width: 430px) {
  main,
  .topbar,
  .footer {
    width: min(100% - 20px, var(--max));
  }

  .hero {
    gap: 22px;
  }

  h1 {
    font-size: 30px;
  }

  .brand small {
    display: none;
  }

  .topnav a,
  .language-toggle {
    padding: 7px 8px;
    font-size: 13px;
  }

  .axis-wheel {
    min-height: 330px;
  }

  .axis-wheel span {
    min-width: 54px;
    min-height: 30px;
    font-size: 10px;
  }

  .mode-card {
    min-height: 118px;
  }

  .scale-button {
    min-height: 66px;
  }

  .scale-button small {
    font-size: 10px;
  }

  .coordinate-map {
    min-height: 260px;
  }
}
