:root {
  --ink: #24323a;
  --muted: #6b7a83;
  --faint: #eef2f3;
  --surface: #ffffff;
  --page: #f7faf9;
  --line: #dbe5e7;
  --analyst: #8b5ca8;
  --diplomat: #33a474;
  --sentinel: #2d9bb2;
  --explorer: #e6a93d;
  --coral: #e97863;
  --shadow: 0 18px 42px rgba(36, 50, 58, .1);
  --soft-shadow: 0 10px 26px rgba(36, 50, 58, .07);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Inter", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
}

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

button {
  border: 0;
  font: inherit;
  cursor: pointer;
}

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

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

.page-shell {
  min-height: 100vh;
  background:
    linear-gradient(90deg, rgba(139, 92, 168, .08) 0 25%, rgba(51, 164, 116, .08) 25% 50%, rgba(45, 155, 178, .08) 50% 75%, rgba(230, 169, 61, .1) 75% 100%) 0 0 / 100% 7px no-repeat,
    linear-gradient(180deg, #fff 0, #fff 620px, var(--page) 620px);
}

.hero {
  min-height: 96vh;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .92)),
    repeating-linear-gradient(90deg, rgba(36, 50, 58, .035) 0 1px, transparent 1px 112px);
}

.topbar {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

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

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--analyst);
  font-size: 22px;
  font-weight: 900;
  box-shadow:
    16px 0 0 var(--diplomat),
    32px 0 0 var(--sentinel),
    48px 0 0 var(--explorer);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  margin-left: 48px;
  font-size: 20px;
  letter-spacing: 0;
}

.brand small {
  margin: 2px 0 0 48px;
  color: var(--muted);
  font-size: 12px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.text-link {
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
}

.text-link:hover {
  color: var(--ink);
  background: #f0f4f5;
}

.hero-grid {
  width: min(1120px, calc(100% - 32px));
  min-height: calc(96vh - 86px);
  margin: 0 auto;
  padding: 54px 0 74px;
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(420px, 1.1fr);
  gap: 54px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--sentinel);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(52px, 7vw, 92px);
  line-height: 1.02;
  font-weight: 900;
}

.lead {
  max-width: 600px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.85;
}

.hero-actions,
.result-actions,
.question-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.hero-actions {
  margin-top: 34px;
}

.primary-button,
.ghost-button,
.secondary-button {
  min-height: 48px;
  border-radius: 4px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 900;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}

.primary-button {
  color: #fff;
  background: var(--sentinel);
  box-shadow: 0 12px 24px rgba(45, 155, 178, .22);
}

.ghost-button {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.secondary-button {
  width: 100%;
  color: #fff;
  background: var(--analyst);
}

.primary-button:hover,
.ghost-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--soft-shadow);
}

.hero-board {
  min-height: 560px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(150px, auto);
  gap: 16px;
  align-content: center;
}

.hero-board::before {
  content: "ZBTI";
  position: absolute;
  inset: 50% auto auto 50%;
  width: 178px;
  height: 178px;
  display: grid;
  place-items: center;
  color: rgba(36, 50, 58, .18);
  border: 2px solid rgba(36, 50, 58, .08);
  border-radius: 50%;
  font-size: 32px;
  font-weight: 900;
  transform: translate(-50%, -50%);
}

.ticket-card {
  position: relative;
  z-index: 1;
  min-height: 178px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.ticket-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--sentinel);
}

.ticket-card span,
.ticket-card small {
  color: var(--muted);
}

.ticket-card strong {
  display: block;
  margin: 12px 0 10px;
  font-size: 24px;
  line-height: 1.2;
}

.ticket-card small {
  line-height: 1.7;
}

.tilt-left,
.tilt-right,
.main-card {
  position: relative;
  inset: auto;
  width: auto;
  transform: none;
}

.tilt-left::before {
  background: var(--analyst);
}

.tilt-right::before {
  background: var(--diplomat);
}

.main-card {
  grid-row: span 2;
  min-height: 380px;
  padding: 30px;
  isolation: isolate;
}

.main-card > :not(.hero-persona) {
  position: relative;
  z-index: 2;
}

.main-card::before {
  background: linear-gradient(90deg, var(--analyst), var(--diplomat), var(--sentinel), var(--explorer));
}

.card-chip {
  display: inline-flex;
  margin-bottom: 26px;
  padding: 7px 10px;
  border-radius: 4px;
  color: #fff;
  background: var(--sentinel);
  font-size: 12px;
  font-weight: 900;
}

.main-card h2 {
  margin: 0;
  font-size: 42px;
  line-height: 1.08;
}

.main-card p {
  margin: 18px 0 30px;
  color: var(--muted);
  line-height: 1.8;
}

.mini-bars {
  display: grid;
  gap: 10px;
}

.mini-bars span {
  position: relative;
  min-height: 34px;
  padding-left: 14px;
  display: flex;
  align-items: center;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  overflow: hidden;
  border-radius: 4px;
  background: #edf3f4;
  isolation: isolate;
}

.mini-bars span::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--w);
  background: rgba(45, 155, 178, .26);
  z-index: -1;
}

.hero-persona {
  position: absolute;
  right: 6px;
  bottom: -14px;
  z-index: 1;
  width: min(58%, 260px);
  max-height: 300px;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(0 18px 18px rgba(36, 50, 58, .16));
  opacity: .96;
}

.section,
.quiz-section,
.result-section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: 86px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, .85fr) minmax(0, 1.15fr);
  gap: 36px;
  align-items: end;
  margin-bottom: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 50px);
  line-height: 1.16;
}

.section-heading.compact {
  display: block;
  margin-bottom: 22px;
}

.section-heading.compact h2 {
  font-size: clamp(28px, 3vw, 40px);
}

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

.axis-card,
.type-card,
.report-block,
.report-grid article {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--soft-shadow);
}

.axis-card {
  min-height: 220px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}

.axis-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--analyst);
}

.axis-card:nth-child(2)::before {
  background: var(--diplomat);
}

.axis-card:nth-child(3)::before {
  background: var(--sentinel);
}

.axis-card:nth-child(4)::before {
  background: var(--explorer);
}

.axis-card span {
  color: var(--muted);
  font-weight: 900;
}

.axis-card h3,
.type-card h3,
.report-block h3,
.report-grid h3 {
  margin: 18px 0 10px;
}

.axis-card p,
.type-card p,
.report-block p,
.report-grid li,
.disclaimer {
  color: var(--muted);
  line-height: 1.75;
}

.quiz-section {
  padding: 18px 0 96px;
}

.quiz-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.quiz-panel,
.question-card {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quiz-panel {
  padding: 28px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 8px solid var(--sentinel);
}

.quiz-panel h2 {
  margin: 0 0 16px;
  font-size: 30px;
  line-height: 1.18;
}

.quiz-panel p {
  color: var(--muted);
  line-height: 1.75;
}

.quiz-panel .eyebrow {
  color: var(--sentinel);
}

.progress-card {
  margin: 28px 0 18px;
  padding: 16px;
  border-radius: var(--radius);
  background: #f5f8f8;
  border: 1px solid var(--line);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 12px;
}

.progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2ebed;
}

.progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--sentinel);
  transition: width .24s ease;
}

.question-card {
  min-height: 520px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 8px solid var(--sentinel);
}

.question-card.question-enter {
  animation: questionIn .24s ease both;
}

@keyframes questionIn {
  from {
    opacity: .68;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.question-topline {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--muted);
  font-weight: 900;
}

.question-topline span {
  padding: 8px 12px;
  border-radius: 4px;
  background: #f3f7f7;
}

.question-card h3 {
  margin: 0 0 26px;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.18;
}

.choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: auto;
}

.choice-card {
  min-height: 190px;
  padding: 24px;
  text-align: left;
  color: var(--ink);
  border-radius: var(--radius);
  border: 2px solid var(--line);
  background: #fff;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.choice-card:hover,
.choice-card.active {
  transform: translateY(-2px);
  border-color: var(--sentinel);
  background: #f6fbfb;
  box-shadow: var(--soft-shadow);
}

.choice-card span {
  display: inline-flex;
  margin-bottom: 18px;
  padding: 7px 10px;
  border-radius: 4px;
  color: #fff;
  background: var(--analyst);
  font-size: 13px;
  font-weight: 900;
}

.choice-card:nth-child(2) span {
  background: var(--diplomat);
}

.choice-card strong {
  display: block;
  font-size: clamp(19px, 2.1vw, 26px);
  line-height: 1.38;
}

.question-actions {
  justify-content: flex-end;
  margin-top: 28px;
}

.question-card .ghost-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.result-section {
  padding: 0 0 100px;
  scroll-margin-top: 28px;
}

.result-layout {
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.result-card {
  position: sticky;
  top: 18px;
  min-height: 600px;
  padding: 30px 30px 250px;
  overflow: hidden;
  color: #fff;
  border-radius: var(--radius);
  background: var(--sentinel);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.result-card[data-family="GF"],
.result-card[data-family="MF"] {
  background: var(--diplomat);
}

.result-card[data-family="GR"] {
  background: var(--analyst);
}

.result-card[data-family="MR"] {
  background: var(--sentinel);
}

.result-card::before {
  content: none;
}

.result-card::after {
  content: "";
  position: absolute;
  inset: auto -50px -64px auto;
  z-index: 0;
  width: 210px;
  height: 210px;
  border: 28px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
}

.result-persona {
  position: absolute;
  right: -30px;
  bottom: 4px;
  z-index: 1;
  width: min(68%, 310px);
  max-height: 360px;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(0 22px 20px rgba(0, 0, 0, .16));
  opacity: .96;
  pointer-events: none;
}

.result-stamp {
  position: relative;
  z-index: 2;
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 4px;
  color: var(--ink);
  background: #fff;
  font-weight: 900;
  font-size: 12px;
}

.result-code {
  position: relative;
  z-index: 2;
  margin-top: 48px;
  color: rgba(255, 255, 255, .38);
  font-size: 76px;
  line-height: 1;
  font-weight: 900;
}

.result-card h2 {
  position: relative;
  z-index: 2;
  max-width: 300px;
  margin: 8px 0 12px;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
}

.result-card p {
  position: relative;
  z-index: 2;
  color: rgba(255, 255, 255, .86);
  line-height: 1.75;
}

.result-tags {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0;
}

.result-tags span {
  padding: 8px 12px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .22);
}

.radar-panel {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.axis-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) 52px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}

.axis-row div:first-child {
  display: flex;
  justify-content: space-between;
  gap: 4px;
}

.axis-row span {
  color: rgba(255, 255, 255, .62);
}

.axis-row em {
  color: #fff;
  font-style: normal;
  font-weight: 900;
}

.split-bar {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .22);
}

.split-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #fff;
}

.result-detail {
  display: grid;
  gap: 14px;
}

.report-block,
.report-grid article {
  padding: 24px;
}

.report-block h3,
.report-grid h3 {
  margin-top: 0;
}

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

.report-grid ul {
  margin: 0;
  padding-left: 20px;
}

.result-actions {
  margin-top: 6px;
}

.result-actions .ghost-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.disclaimer {
  margin: 0;
  font-size: 13px;
}

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

.type-card {
  min-height: 250px;
  padding: 20px;
  position: relative;
  overflow: hidden;
  border-top: 8px solid var(--sentinel);
  isolation: isolate;
}

.type-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -36px;
  z-index: 0;
  width: 116px;
  height: 116px;
  border-radius: 50%;
  background: rgba(45, 155, 178, .12);
}

.type-content {
  position: relative;
  z-index: 2;
  max-width: 78%;
}

.type-persona {
  position: absolute;
  right: -18px;
  bottom: -8px;
  z-index: 1;
  width: min(56%, 170px);
  max-height: 190px;
  object-fit: contain;
  object-position: right bottom;
  filter: drop-shadow(0 12px 12px rgba(36, 50, 58, .13));
  pointer-events: none;
}

.type-card[data-family="GF"],
.type-card[data-family="MF"] {
  border-top-color: var(--diplomat);
}

.type-card[data-family="GF"]::after,
.type-card[data-family="MF"]::after {
  background: rgba(51, 164, 116, .12);
}

.type-card[data-family="MR"] {
  border-top-color: var(--sentinel);
}

.type-card[data-family="MR"]::after {
  background: rgba(45, 155, 178, .12);
}

.type-card[data-family="GR"] {
  border-top-color: var(--analyst);
}

.type-card[data-family="GR"]::after {
  background: rgba(139, 92, 168, .12);
}

.type-card span {
  display: inline-flex;
  margin-right: 8px;
  padding: 7px 10px;
  border-radius: 4px;
  color: #fff;
  background: var(--sentinel);
  font-size: 12px;
  font-weight: 900;
}

.type-card[data-family="GF"] span,
.type-card[data-family="MF"] span {
  background: var(--diplomat);
}

.type-card[data-family="MR"] span {
  background: var(--sentinel);
}

.type-card[data-family="GR"] span {
  background: var(--analyst);
}

.type-card small {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.type-card h3 {
  max-width: 12em;
}

.type-card p {
  max-width: 13em;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 20;
  max-width: min(92vw, 520px);
  padding: 12px 16px;
  color: #fff;
  background: rgba(36, 50, 58, .94);
  border-radius: 999px;
  box-shadow: var(--shadow);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  transform: translate(-50%, 0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .quiz-shell,
  .result-layout,
  .section-heading {
    grid-template-columns: 1fr;
  }

  .hero-grid {
    padding-top: 34px;
  }

  .hero-board {
    min-height: auto;
  }

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

  .result-card {
    position: relative;
    top: auto;
  }
}

@media (max-width: 680px) {
  .page-shell {
    background:
      linear-gradient(90deg, rgba(139, 92, 168, .12) 0 25%, rgba(51, 164, 116, .12) 25% 50%, rgba(45, 155, 178, .12) 50% 75%, rgba(230, 169, 61, .14) 75% 100%) 0 0 / 100% 7px no-repeat,
      var(--page);
  }

  .topbar {
    align-items: center;
  }

  .top-actions {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 19px;
    box-shadow:
      12px 0 0 var(--diplomat),
      24px 0 0 var(--sentinel),
      36px 0 0 var(--explorer);
  }

  .brand strong,
  .brand small {
    margin-left: 36px;
  }

  .hero {
    min-height: auto;
  }

  .hero h1 {
    font-size: clamp(44px, 15vw, 62px);
    line-height: 1.04;
  }

  .lead {
    font-size: 16px;
  }

  .hero-board {
    grid-template-columns: 1fr;
  }

  .hero-board::before {
    display: none;
  }

  .main-card {
    min-height: auto;
    padding: 26px;
  }

  .hero-persona {
    width: 190px;
    opacity: .28;
  }

  .axis-grid,
  .choice-list,
  .report-grid,
  .type-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 70px 0;
  }

  .quiz-section,
  .result-section {
    padding-bottom: 70px;
  }

  .question-card {
    min-height: auto;
    padding: 22px;
  }

  .choice-card {
    min-height: 150px;
  }

  .result-code {
    font-size: 56px;
  }

  .result-card {
    min-height: 640px;
    padding-bottom: 230px;
  }

  .result-persona {
    right: -12px;
    width: min(72%, 250px);
    max-height: 270px;
  }

  .type-content {
    max-width: 68%;
  }

  .type-persona {
    width: min(52%, 150px);
    max-height: 170px;
  }

  .axis-row {
    grid-template-columns: 74px minmax(0, 1fr) 48px;
  }
}
