:root {
  --ink: #1f2d3d;
  --muted: #64748b;
  --line: #e6ecf5;
  --bg: #f6f8fc;
  --card: #ffffff;
  --accent: #88619a;
  --accent-dark: #755087;
  --blue-light: #ecf4f7;
  --analyst: #5b6abf;
  --diplomat: #2f9e7e;
  --sentinel: #3e7cb1;
  --explorer: #e2952f;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
}

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

.hidden {
  display: none !important;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
  color: #475569;
  font-size: 15px;
  font-weight: 600;
}

.nav a:hover {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-weight: 700;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(136, 97, 154, 0.28);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-secondary {
  background: #eef2f8;
  color: var(--ink);
}

.btn-secondary:hover {
  background: #e2e8f1;
}

.btn-lg {
  min-height: 54px;
  padding: 0 34px;
  font-size: 17px;
}

.btn-small {
  min-height: 38px;
  padding: 0 18px;
  font-size: 14px;
}

.landing {
  padding: 150px 28px 70px;
  background: linear-gradient(180deg, var(--blue-light) 0%, #ffffff 100%);
}

.hero-wave {
  display: block;
  width: 100%;
  height: 8px;
}

@media (min-width: 720px) {
  .hero-wave {
    height: 40px;
  }
}

.hero {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: 52px;
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--accent);
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 6vw, 68px);
  font-weight: 800;
}

h2 {
  margin: 0;
  font-size: clamp(26px, 3.6vw, 38px);
  font-weight: 800;
}

h3 {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
}

.lead {
  margin: 0 0 28px;
  max-width: 500px;
  font-size: 18px;
  color: var(--muted);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 24px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hero-meta span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-visual img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: 0 30px 80px rgba(31, 45, 61, 0.12);
}

.types-band,
.about-band {
  padding: 84px 28px;
}

.types-band {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.types-inner,
.about-inner {
  max-width: 1180px;
  margin: 0 auto;
}

.section-head {
  margin-bottom: 36px;
  max-width: 680px;
}

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

.type-card {
  position: relative;
  padding: 20px 18px 18px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--type-color, var(--analyst));
  border-radius: 10px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.type-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(31, 45, 61, 0.10);
}

.type-card code {
  display: block;
  margin-bottom: 4px;
  font-size: 22px;
  font-weight: 800;
  color: var(--type-color, var(--analyst));
}

.type-card strong {
  display: block;
  font-size: 16px;
}

.type-card span {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

.quiz {
  max-width: 920px;
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 130px 28px 70px;
}

.quiz-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 64px;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 8px;
  background: #eef2f8;
  color: var(--ink);
  font-weight: 700;
  font-size: 14px;
}

.back-btn:hover {
  background: #e2e8f1;
}

.progress-wrap {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
}

.section-label {
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.progress {
  height: 10px;
  border-radius: 5px;
  background: #e6ecf5;
  overflow: hidden;
}

.progress div {
  height: 100%;
  width: 0;
  border-radius: 5px;
  background: var(--accent);
  transition: width 0.3s ease;
}

#qCount {
  min-width: 62px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.quiz-body {
  text-align: center;
}

.page-break {
  max-width: 620px;
  margin: 0 auto 48px;
}

.page-break h2 {
  color: var(--accent);
}

.page-break p {
  color: var(--muted);
  font-size: 16px;
  margin: 0 0 28px;
}

.dim-label {
  display: inline-block;
  margin: 0 0 14px;
  padding: 5px 12px;
  border-radius: 20px;
  background: #eef2f8;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 2px;
}

.quiz-body h2 {
  margin: 0 auto 42px;
  max-width: 760px;
  font-size: clamp(22px, 3.4vw, 34px);
}

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

.scale button {
  min-height: 64px;
  padding: 12px 6px;
  border: 1px solid #d6dfec;
  border-radius: 999px;
  background: #fff;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.scale button:hover {
  border-color: var(--accent);
  background: #fff8f0;
  transform: translateY(-2px);
}

.scale button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(136, 97, 154, 0.28);
}

.scale-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.result {
  max-width: 1000px;
  margin: 0 auto;
  padding: 130px 28px 80px;
}

.result-card {
  --type-color: var(--analyst);
  overflow: hidden;
  border: 1px solid var(--line);
  border-top: 8px solid var(--type-color);
  border-radius: 14px;
  background: var(--card);
  box-shadow: 0 24px 70px rgba(31, 45, 61, 0.10);
}

.result-top {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 34px;
  align-items: start;
  padding: 42px 42px 28px;
}

.result-avatar {
  width: 120px;
  height: 120px;
  border-radius: 20px;
}

.result-type {
  text-align: center;
}

.type-code {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 130px;
  min-height: 86px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--type-color, var(--analyst));
  color: #fff;
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 4px;
}

.type-code.small {
  min-width: 92px;
  min-height: 58px;
  font-size: 25px;
  letter-spacing: 2px;
}

.type-role {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--type-color, var(--analyst));
  font-size: 13px;
  font-weight: 800;
}

.result-title .eyebrow {
  color: var(--type-color, var(--analyst));
}

.result-title p:last-child {
  margin: 14px 0 0;
  max-width: 620px;
  color: var(--muted);
  font-size: 16px;
}

.scores {
  display: grid;
  gap: 16px;
  padding: 18px 42px 34px;
}

.score-row {
  display: grid;
  grid-template-columns: 92px 1fr 92px;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  font-weight: 700;
}

.score-row .left {
  text-align: left;
}

.score-row .right {
  text-align: right;
}

.score-row .muted {
  color: var(--muted);
}

.score-track {
  position: relative;
  height: 10px;
  border-radius: 5px;
  background: #e6ecf5;
  overflow: hidden;
}

.score-track::after {
  content: "";
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: rgba(31, 45, 61, 0.22);
}

.score-track div {
  height: 100%;
  border-radius: 5px;
  background: var(--type-color, var(--analyst));
  transition: width 0.4s ease;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 0 42px;
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.tab {
  flex: 0 0 auto;
  padding: 14px 16px;
  background: transparent;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  border-bottom: 3px solid transparent;
}

.tab.active {
  color: var(--ink);
  border-bottom-color: var(--type-color, var(--analyst));
}

.tab-content {
  padding: 28px 42px 8px;
  color: #334155;
  font-size: 15px;
}

.tab-content h3 {
  margin-top: 8px;
  color: var(--ink);
}

.tab-content ul {
  margin: 10px 0 20px;
  padding-left: 20px;
}

.tab-content li {
  margin: 6px 0;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 22px 42px 38px;
}

.result-actions .btn {
  min-height: 44px;
  padding: 0 22px;
  font-size: 14px;
}

.share-msg {
  margin: -18px 42px 0;
  color: var(--diplomat);
  font-size: 14px;
  font-weight: 700;
}

.about-band {
  background: var(--ink);
  color: #fff;
}

.about-band .eyebrow {
  color: #7dd3b5;
}

.about-band h2 {
  color: #fff;
}

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

.about-item {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.about-letter {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.14);
  color: #7dd3b5;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 1px;
}

.about-item p {
  margin: 0;
  color: #c9d4e4;
  font-size: 14px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.55);
}

.modal-card {
  position: relative;
  width: min(620px, 100%);
  max-height: 86vh;
  overflow: auto;
  padding: 34px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(15, 23, 42, 0.30);
}

.site-footer {
  padding: 42px 28px;
  background: var(--ink);
  color: #94a3b8;
  font-size: 14px;
}

.footer-inner {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col h4 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.footer-col a {
  color: #94a3b8;
  font-size: 13px;
}

.footer-col a:hover {
  color: #fff;
}

.explore-heading {
  margin: 0 0 18px;
  color: var(--type-color, var(--accent));
  font-size: 20px;
  font-weight: 800;
}

.footer-links {
  display: flex;
  gap: 22px;
}

.footer-links a:hover {
  color: #fff;
}

@media (max-width: 620px) {
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #eef2f8;
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.modal-head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 16px;
}

.modal-head .eyebrow {
  margin-bottom: 4px;
}

.modal-head h2 {
  font-size: 26px;
}

.modal-card > p {
  margin: 0 0 20px;
  color: var(--muted);
}

.modal-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}

.modal-lists h3 {
  font-size: 15px;
}

.modal-lists ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #475569;
  font-size: 14px;
}

.modal-card .btn {
  width: 100%;
  min-height: 46px;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .hero-visual img {
    max-width: 640px;
    margin: 0 auto;
  }

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

  .result-top {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .result-type {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .result-title p:last-child {
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 720px) {
  .header-inner {
    padding: 0 16px;
    height: 60px;
  }

  .nav {
    display: none;
  }

  .landing,
  .types-band,
  .about-band {
    padding-left: 16px;
    padding-right: 16px;
  }

  .landing {
    padding-top: 118px;
  }

  h1 {
    font-size: clamp(36px, 11vw, 52px);
  }

  .lead {
    font-size: 16px;
  }

  .quiz {
    padding: 112px 16px 40px;
  }

  .quiz-top {
    gap: 10px;
    margin-bottom: 42px;
  }

  .progress-wrap {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  #qCount {
    text-align: left;
  }

  .scale {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .scale button {
    min-height: 48px;
    padding: 10px 14px;
    text-align: left;
  }

  .scale-ends {
    display: none;
  }

  .result {
    padding: 112px 12px 48px;
  }

  .result-top,
  .scores,
  .tabs,
  .tab-content,
  .result-actions {
    padding-left: 20px;
    padding-right: 20px;
  }

  .score-row {
    grid-template-columns: 72px 1fr 72px;
    gap: 8px;
    font-size: 12px;
  }

  .modal-lists {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 440px) {
  .type-grid,
  .about-grid {
    grid-template-columns: 1fr;
  }

  .score-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .score-row .right {
    text-align: left;
  }

  .btn-lg {
    width: 100%;
  }
}
