: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: #cf5549;
  --blue: #435bb8;
  --green: #2f8f6f;
  --gold: #b47a18;
  --violet: #7656a7;
  --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(67, 91, 184, 0.055) 1px, transparent 1px),
    linear-gradient(rgba(47, 143, 111, 0.055) 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 {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: #2f3b4d;
  font-size: 14px;
  text-decoration: none;
}

.topnav a: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.08fr) minmax(320px, 0.92fr);
  gap: 34px;
  align-items: center;
  min-height: calc(100vh - 112px);
  padding: 48px 0 38px;
}

.compact-hero {
  grid-template-columns: 1fr;
  min-height: auto;
  padding: 48px 0 8px;
}

.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: 780px;
  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(67, 91, 184, 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,
.disclaimer {
  color: var(--muted);
  line-height: 1.55;
}

.mode-card.is-featured {
  border-color: rgba(207, 85, 73, 0.38);
  background:
    linear-gradient(135deg, rgba(207, 85, 73, 0.09), rgba(67, 91, 184, 0.08)),
    #fff;
}

.disclaimer {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: 14px;
}

.hero-board {
  position: relative;
  display: grid;
  min-height: 430px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(207, 85, 73, 0.12), rgba(67, 91, 184, 0.1)),
    #fff;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.hero-board::before,
.hero-board::after {
  position: absolute;
  content: "";
  inset: 30px;
  border: 1px solid rgba(23, 32, 42, 0.12);
}

.hero-board::after {
  inset: 70px;
  border-color: rgba(67, 91, 184, 0.24);
  transform: rotate(7deg);
}

.board-grid {
  position: absolute;
  inset: 42px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 9px;
}

.board-grid span {
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.hero-board b {
  position: relative;
  z-index: 2;
  color: var(--ink);
  font-size: 58px;
  line-height: 0.95;
  text-align: center;
}

.panel,
.method-section,
.sources-section {
  margin: 26px 0;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 16px 44px rgba(17, 24, 39, 0.08);
}

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

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

.ghost-button:hover {
  border-color: var(--line-strong);
  background: #f7f9fc;
}

.primary-button {
  min-height: 42px;
  padding: 10px 16px;
  border: 1px solid rgba(67, 91, 184, 0.45);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--blue), #2f8f6f);
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.panel-copy {
  max-width: 860px;
  color: #425066;
  line-height: 1.7;
}

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

.weight-row {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.weight-row label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #253143;
  font-weight: 900;
}

.weight-row small {
  color: var(--muted);
  line-height: 1.45;
}

.weight-row input[type="range"] {
  width: 100%;
  accent-color: var(--axis-color, var(--blue));
}

.panel-head,
.result-hero,
.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

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

.progress-shell {
  height: 9px;
  margin: 22px 0;
  border-radius: 999px;
  background: #e7ecef;
  overflow: hidden;
}

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

.question-card,
.result-card,
.method-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.question-card {
  padding: 22px;
}

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

.axis-pill {
  margin: 0;
  padding: 7px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--axis-color, var(--green)) 13%, #fff);
  color: var(--axis-color, var(--green));
  font-size: 12px;
  font-weight: 900;
}

#issueLabel {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.question-card h3 {
  margin-bottom: 24px;
  font-size: 25px;
  line-height: 1.45;
}

.scale-helper {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

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

.scale-button {
  display: grid;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f9fbfc;
  color: #2f3b4d;
  cursor: pointer;
}

.scale-button:hover,
.scale-button.is-active {
  border-color: rgba(47, 143, 111, 0.6);
  background: #eef9f3;
  color: var(--green);
  font-weight: 900;
}

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

.quiz-actions span,
.confidence-text {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.result-hero {
  align-items: center;
  margin-bottom: 22px;
}

.result-summary {
  max-width: 760px;
  margin: 12px 0 0;
  color: #344154;
  font-size: 17px;
  line-height: 1.75;
}

.result-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.region-strip {
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(67, 91, 184, 0.06), rgba(47, 143, 111, 0.06)), #fff;
}

.region-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.region-note {
  margin: 10px 0 0;
  color: #425066;
  font-size: 13px;
  line-height: 1.6;
}

.result-layout {
  display: grid;
  grid-template-columns: 0.82fr 1.05fr 1.2fr;
  gap: 14px;
}

.result-card {
  min-width: 0;
  padding: 18px;
}

.result-card h3 {
  margin-bottom: 14px;
  font-size: 18px;
}

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

.tag-list li {
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7fbf8;
  color: #243142;
  font-weight: 800;
  line-height: 1.45;
}

.chart-card canvas {
  display: block;
  width: 100%;
  height: auto;
  max-height: 430px;
}

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

.tab-button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: #2f3b4d;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.tab-button.is-active {
  border-color: rgba(67, 91, 184, 0.65);
  background: #eef2ff;
  color: var(--blue);
}

.coordinate-map {
  position: relative;
  min-height: 320px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(207, 85, 73, 0.09), transparent 48%, rgba(67, 91, 184, 0.12)),
    linear-gradient(0deg, rgba(47, 143, 111, 0.1), transparent 48%, rgba(180, 122, 24, 0.12)),
    #fff;
  overflow: hidden;
}

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

.coordinate-map .x-line {
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
}

.coordinate-map .y-line {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
}

.map-dot {
  position: absolute;
  z-index: 2;
  display: grid;
  min-width: 26px;
  min-height: 22px;
  padding: 3px 5px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--dot-color, var(--blue));
  color: #fff;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(17, 24, 39, 0.18);
  transform: translate(-50%, 50%);
}

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

.map-labels {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.map-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: #344154;
  font-size: 12px;
  line-height: 1.3;
}

.legend-item i {
  display: grid;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  place-items: center;
  border-radius: 999px;
  background: var(--dot-color);
  color: #fff;
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
}

.legend-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-section {
  margin-top: 28px;
}

.section-heading.compact {
  margin-bottom: 14px;
}

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

.interpretation-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.interpretation-card h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.interpretation-card p {
  margin: 0;
  color: #425066;
  line-height: 1.7;
}

.dimension-list {
  display: grid;
  gap: 11px;
}

.dimension-row {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 62px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.dimension-row strong {
  color: #253143;
  font-size: 14px;
}

.dimension-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.score-track {
  height: 12px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(207, 85, 73, 0.12), rgba(67, 91, 184, 0.08), rgba(47, 143, 111, 0.13)),
    #e7ecef;
  overflow: hidden;
}

.score-fill {
  width: var(--score);
  height: 100%;
  border-radius: inherit;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--axis-color) 72%, #fff), var(--axis-color));
}

.score-value {
  color: #243142;
  font-size: 16px;
  font-weight: 900;
  text-align: right;
}

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

.match-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.match-card h3 {
  margin-bottom: 5px;
  font-size: 17px;
}

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

.match-meta {
  margin-top: 8px;
  color: #425066;
  font-size: 12px;
  line-height: 1.55;
}

.match-bar {
  grid-column: 1 / -1;
  display: block;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue) var(--match), #e8edf5 var(--match));
}

.similarity {
  align-self: start;
  padding: 9px 10px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(67, 91, 184, 0.1), rgba(47, 143, 111, 0.12));
  color: var(--blue);
  font-size: 20px;
  font-weight: 900;
  text-align: center;
}

.similarity span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(10, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.table-card,
.export-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.table-wrap {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 880px;
}

.data-table th,
.data-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.data-table th {
  color: #253143;
  font-size: 12px;
  text-transform: uppercase;
}

.data-table td small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.pill-list {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-list span,
.status-pill {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.export-actions {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.code-box {
  max-height: 340px;
  margin: 12px 0 0;
  padding: 12px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f8fafc;
  color: #243142;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.heat-column {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.heat-column strong {
  min-height: 32px;
  color: #344154;
  font-size: 11px;
  line-height: 1.25;
}

.heat-cell {
  min-height: 14px;
  border-radius: 3px;
  background: var(--heat-color, #e5e7eb);
}

.heat-cell.skipped {
  background: repeating-linear-gradient(
    45deg,
    #edf1f4,
    #edf1f4 4px,
    #dfe5ea 4px,
    #dfe5ea 8px
  );
}

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

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

.method-grid article {
  min-height: 210px;
  padding: 18px;
}

.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;
}

@supports not (color: color-mix(in srgb, white, black)) {
  .axis-pill {
    background: #f0f4ff;
  }

  .score-fill {
    background: var(--axis-color, var(--blue));
  }
}

@media (max-width: 980px) {
  .hero,
  .result-layout,
  .interpretation-grid,
  .method-grid,
  .weight-list {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-board {
    min-height: 320px;
  }
}

@media (max-width: 720px) {
  .topbar,
  .panel-head,
  .result-hero,
  .footer {
    align-items: stretch;
    flex-direction: column;
  }

  .topnav,
  .result-actions {
    justify-content: flex-start;
  }

  h1 {
    font-size: 38px;
  }

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

  .mode-actions,
  .scale-row,
  .map-legend {
    grid-template-columns: 1fr;
  }

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

  .dimension-row,
  .match-card {
    grid-template-columns: 1fr;
  }

  .score-value,
  .similarity {
    text-align: left;
  }

  .heatmap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

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

  .panel,
  .method-section,
  .sources-section {
    padding: 18px;
  }

  .question-card h3 {
    font-size: 21px;
  }

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

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