:root {
  --paper: #f0f6ff;
  --paper-deep: #e1ebf8;
  --ink: #17253d;
  --muted: #5c6d86;
  --line: #d7e2f1;
  --card: #ffffff;
  --navy: #072554;
  --navy-soft: #e4edfa;
  --clay: #bf7556;
  --clay-soft: #f7ece5;
  --gold: #c69b51;
  --shadow: 0 18px 50px rgba(7, 37, 84, .07);
  --font-title: clamp(34px, 4.8vw, 42px);
  --font-subtitle: 22px;
  --font-body: 16px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(circle at 85% 5%, rgba(198,155,81,.10), transparent 28rem), var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: var(--font-body);
  line-height: 1.75;
}
button, input, select { font: inherit; }
button, select, input { color: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible {
  outline: 3px solid rgba(7,37,84,.35); outline-offset: 3px;
}
.site-shell { min-height: 100vh; display: flex; flex-direction: column; }
.site-header {
  width: min(1120px, calc(100% - 32px));
  height: 116px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand { display: flex; align-items: center; justify-content: center; text-decoration: none; }
.brand-logo { display: block; width: clamp(180px, 18vw, 240px); height: auto; object-fit: contain; object-position: center; }
.main-content { flex: 1; width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 4px 0 54px; }
.site-footer {
  width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 20px 0 28px;
  border-top: 1px solid var(--line); color: var(--muted); font-size: var(--font-body);
  display: flex; justify-content: space-between; gap: 16px; align-items: center;
}
h1 { font-size: var(--font-title); line-height: 1.22; letter-spacing: -.045em; margin: 0 0 16px; font-weight: 800; color: var(--navy); }
h2 { font-size: var(--font-subtitle); line-height: 1.38; letter-spacing: -.025em; margin: 0 0 12px; font-weight: 750; color: var(--navy); }
p { margin: 0 0 14px; }
strong { font-weight: 750; }
.muted { color: var(--muted); }
.hero { text-align: center; padding: 20px 0 24px; }
.hero .hero-subtitle { max-width: 660px; margin: 0 auto 18px; font-size: var(--font-subtitle); line-height: 1.65; color: var(--navy); font-weight: 650; }
.hero .hero-copy { max-width: 700px; margin: 0 auto; color: #43536b; }
.hero-mark { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin: 24px auto 8px; }
.system-chip { border: 1px solid #d3deef; background: rgba(255,255,255,.72); color: var(--navy); padding: 8px 13px; border-radius: 999px; }
.panel { background: var(--card); border: 1px solid rgba(215,226,241,.95); box-shadow: var(--shadow); border-radius: 22px; padding: clamp(22px, 4vw, 36px); margin: 18px 0; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.eyebrow { color: var(--navy); font-weight: 800; letter-spacing: .12em; margin-bottom: 8px; }
.subtle { color: var(--muted); margin: 0; }
.disclaimer { background: #f4f8ff; border-left: 3px solid var(--gold); padding: 15px 17px; border-radius: 0 12px 12px 0; color: #58677c; margin: 18px 0; }
.ack-row { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 20px; }
.ack-row input { margin-top: 7px; accent-color: var(--navy); flex: 0 0 auto; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px; padding: 12px 20px;
  font-size: var(--font-body); font-weight: 750; transition: transform .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { color: white; background: var(--navy); box-shadow: 0 7px 16px rgba(7,37,84,.13); }
.btn-primary:hover { background: #123b73; }
.btn-secondary { background: transparent; border-color: #cbd8ea; color: var(--navy); }
.btn-secondary:hover { border-color: var(--navy); background: #f4f8ff; }
.btn-quiet { background: transparent; color: var(--muted); border-color: transparent; }
.text-button { border: 0; background: transparent; color: var(--muted); padding: 4px 0; text-decoration: underline; text-underline-offset: 3px; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); margin: 8px 0; }
.progress-track { height: 6px; background: #e1e9f5; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--navy); border-radius: inherit; transition: width .2s ease; }
.question-layout { margin-top: 26px; }
.question-number { color: #9aa9bf; font-weight: 750; margin-bottom: 8px; }
.question-title { font-size: var(--font-subtitle); line-height: 1.55; font-weight: 750; color: var(--navy); margin: 0 0 20px; }
.choices { display: grid; gap: 11px; }
.choice {
  display: flex; align-items: flex-start; gap: 13px; width: 100%; text-align: left;
  padding: 15px 16px; border-radius: 14px; border: 1px solid var(--line); background: white;
  transition: border-color .15s ease, background .15s ease;
}
.choice:hover { border-color: #9aafcd; background: #f8fbff; }
.choice.selected { border-color: var(--navy); background: var(--navy-soft); box-shadow: inset 0 0 0 1px var(--navy); }
.choice-letter { display: grid; place-items: center; flex: 0 0 29px; width: 29px; height: 29px; border: 1px solid #c8d4e5; border-radius: 50%; color: var(--navy); font-weight: 750; }
.choice-text { flex: 1; line-height: 1.75; }
.aside-note { margin-top: 24px; padding: 17px 18px; border-radius: 14px; background: #f4f8ff; color: var(--muted); }
.question-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; align-items: center; }
.answer-warning { color: #9d4f3a; margin: 12px 0 0; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 22px 0; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { color: var(--navy); font-weight: 750; }
.field select { width: 100%; border: 1px solid #cbd8ea; border-radius: 12px; padding: 13px 14px; background: #fff; min-height: 52px; }
.help-text { color: var(--muted); margin-top: 6px; }
.result-hero { padding: 8px 0 14px; }
.result-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0 4px; }
.result-tag { border-radius: 999px; background: var(--navy-soft); color: var(--navy); border: 1px solid #d5e1f2; padding: 7px 12px; }
.result-grid { display: grid; grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr); gap: 16px; }
.info-card { border: 1px solid var(--line); border-radius: 16px; padding: 20px; background: #fff; }
.info-card.soft { background: #f8fbff; }
.info-value { color: var(--navy); font-weight: 800; }
.quote-block { margin: 0; padding: 17px 19px; border-left: 3px solid var(--clay); background: #fbf5f0; border-radius: 0 14px 14px 0; }
.book-title { color: var(--navy); font-weight: 800; }
.source-note { color: var(--muted); margin-top: 12px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.result-summary { color: #43536b; }
.result-score-list { display: grid; gap: 10px; margin-top: 18px; }
.score-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 2fr) auto; gap: 12px; align-items: center; }
.score-track { height: 8px; background: #e4ecf8; border-radius: 999px; overflow: hidden; }
.score-fill { height: 100%; background: var(--navy); border-radius: inherit; }
.resume-box { padding: 16px 18px; border-radius: 14px; background: var(--navy-soft); margin: 0 0 18px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.resume-box p { margin: 0; color: var(--navy); }
.loading-card { text-align: center; }
.noscript { margin: 20px auto; max-width: 800px; padding: 20px; }
@media (max-width: 660px) {
  .site-header { height: 108px; }
  .main-content { width: min(100% - 28px, 920px); padding-bottom: 36px; }
  .site-footer { width: calc(100% - 28px); flex-direction: column; align-items: flex-start; }
  .brand-logo { width: 33vw; max-width: 180px; }
  .hero { padding-top: 8px; }
  .hero .hero-subtitle { max-width: 100%; }
  .panel { padding: 22px 18px; border-radius: 18px; }
  .form-grid { grid-template-columns: 1fr; gap: 14px; }
  .result-grid { grid-template-columns: 1fr; }
  .question-actions { margin-top: 18px; }
  .question-actions .btn { flex: 1; }
  .actions .btn { width: 100%; }
  .score-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.5fr) auto; gap: 8px; }
}
@media (max-width: 420px) {
  .brand-logo { width: 33vw; max-width: 180px; }
  h1 { font-size: var(--font-title); }
  .hero-mark { gap: 7px; }
  .system-chip { padding: 7px 10px; }
}
@media print {
  body { background: white; }
  .site-header, .site-footer, .result-actions, .btn, .text-button { display: none !important; }
  .main-content { width: 100%; padding: 0; }
  .panel, .info-card { box-shadow: none; break-inside: avoid; }
}
