:root {
  --ink: #252332;
  --muted: #696776;
  --paper: #fcfaf6;
  --accent: #6658b8;
  --accent-soft: #eeeafa;
  --line: #e7e3de;
  --white: #fff;
  --radius: 24px;
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
a {
  color: var(--accent);
  text-underline-offset: 4px;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2 {
  letter-spacing: -0.04em;
}
h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 1.1;
  font-weight: 650;
}
h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.5rem);
  line-height: 1.22;
}
h3 {
  font-size: 1.1rem;
  line-height: 1.5;
}
p {
  line-height: 1.75;
}
svg {
  max-width: 100%;
}
img,
canvas {
  max-width: 100%;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.shell {
  max-width: 1160px;
  margin: auto;
  padding: 0 28px;
}
.topbar {
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
}
.brand {
  font-weight: 750;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: 0.05em;
  font-size: 0.86rem;
}
.brand span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--ink);
  color: white;
  margin-right: 9px;
}
.topbar nav {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}
.nav-link {
  font-size: 0.86rem;
  color: var(--muted);
  text-decoration: none;
}
.language {
  border: 1px solid var(--line);
  border-radius: 50px;
  background: white;
  padding: 9px 14px;
  font-size: 0.85rem;
}
.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 48px;
  padding: 70px 0 55px;
}
.hero h1 {
  margin-bottom: 22px;
}
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  font-weight: 750;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.lead {
  font-size: 1.08rem;
  max-width: 600px;
  color: var(--muted);
}
.hero-art {
  aspect-ratio: 1;
  border-radius: 38px;
  background: var(--accent-soft);
  padding: 28px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.pill,
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 50px;
  background: var(--accent-soft);
  color: var(--accent);
  padding: 7px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  gap: 6px;
}
.pill.white {
  background: white;
}
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.panel {
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  margin-bottom: 24px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.card {
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: white;
  min-width: 0;
}
.card.soft {
  background: var(--accent-soft);
  border-color: transparent;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 12px 22px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: var(--accent);
  color: white;
  text-decoration: none;
  font-weight: 650;
  font-size: 0.93rem;
  transition:
    transform 0.15s,
    background 0.15s;
}
.button:hover {
  transform: translateY(-1px);
  filter: brightness(0.96);
}
.button.secondary,
.secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.button.small {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 0.8rem;
  border-radius: 10px;
}
.button.danger {
  color: #a53a4d;
  background: #fff2f3;
  border-color: #f4d8dd;
}
.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 0.82rem;
}
.notice {
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--accent-soft);
  font-size: 0.87rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.notice.error {
  background: #fff0f1;
  color: #9c3349;
}
.progress {
  height: 7px;
  background: var(--line);
  border-radius: 50px;
  overflow: hidden;
  margin: 16px 0;
}
.progress > span,
.progress > div {
  display: block;
  background: var(--accent);
  height: 100%;
  border-radius: inherit;
  transition: width 0.2s;
}
.score-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) 2fr 40px;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: 0.88rem;
}
.score-row .bar {
  height: 9px;
  background: var(--accent-soft);
  border-radius: 20px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: inherit;
}
.quiz-layout {
  max-width: 820px;
  margin: 25px auto 70px;
}
.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  width: 100%;
  line-height: 1.55;
}
.choice:hover,
.choice.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.choice input {
  accent-color: var(--accent);
  flex-shrink: 0;
  margin-top: 4px;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}
legend {
  font-weight: 650;
  margin-bottom: 15px;
  line-height: 1.6;
}
label {
  line-height: 1.5;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 16px;
}
.field label {
  font-size: 0.85rem;
  color: var(--muted);
}
input:not([type="radio"]):not([type="checkbox"]):not([type="range"]),
select,
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}
input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}
textarea {
  resize: vertical;
}
.kpi {
  padding: 20px;
  background: var(--accent-soft);
  border-radius: 18px;
}
.kpi-value {
  font-size: 2rem;
  font-weight: 650;
  margin-bottom: 3px;
}
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding: 25px 0 35px;
  font-size: 0.79rem;
  color: var(--muted);
}
.footer a {
  color: inherit;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  z-index: 10;
  background: white;
  padding: 12px;
}
.skip-link:focus {
  top: 12px;
}
.result-card {
  background: var(--accent-soft);
  border-radius: 28px;
  padding: 35px;
  overflow-wrap: anywhere;
}
.toast {
  position: fixed;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(90vw, 700px);
  padding: 13px 20px;
  border-radius: 14px;
  background: var(--ink);
  color: white;
  box-shadow: 0 8px 25px #25233225;
  font-size: 0.87rem;
  z-index: 20;
  overflow-wrap: anywhere;
}
.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 40px 0 20px;
}
.section-title h2 {
  margin: 0;
}
details {
  line-height: 1.65;
}
summary {
  cursor: pointer;
  font-weight: 600;
}
details p {
  margin-top: 15px;
}
.file-input {
  max-width: 100%;
  font-size: 0.8rem;
}
@media (max-width: 760px) {
  .shell {
    padding: 0 20px;
  }
  .topbar {
    min-height: 76px;
    gap: 12px;
  }
  .topbar nav {
    gap: 10px;
  }
  .nav-link {
    font-size: 0.75rem;
  }
  .hero {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 42px 0 32px;
  }
  .hero-art {
    max-width: 440px;
    width: 100%;
    margin: auto;
    aspect-ratio: 1.15;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 22px;
    border-radius: 20px;
  }
  .card {
    padding: 20px;
  }
  .score-row {
    grid-template-columns: minmax(75px, 1fr) 1.3fr 34px;
    gap: 8px;
  }
  .result-card {
    padding: 24px;
  }
  .footer {
    gap: 12px;
    align-items: flex-start;
    flex-direction: column;
  }
  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }
  .quiz-layout {
    margin: 20px auto 40px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
@media print {
  .topbar,
  .hero,
  .footer,
  .actions,
  .toast,
  .no-print {
    display: none !important;
  }
  .shell {
    max-width: none;
    padding: 0;
  }
  .panel,
  .card,
  .result-card {
    break-inside: avoid;
    border: 1px solid #ddd;
    background: white !important;
    box-shadow: none !important;
  }
  body {
    background: white;
    color: black;
  }
  .grid {
    grid-template-columns: 1fr 1fr;
  }
}
/* Form control defaults must not widen a visually hidden file input. */
.sr-only {
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}
