:root {
  color-scheme: light;
  --page: #f0f6fd;
  --paper: #fff;
  --ink: #19324c;
  --muted: #4b6179;
  --accent: #255f9a;
  --accent-dark: #194878;
  --accent-soft: #e5f0fd;
  --line: #d2e1f1;
  --error: #a2322b;
  font-family: "Inter", "Microsoft YaHei UI", "PingFang SC", system-ui, sans-serif;
  line-height: 1.65;
  color: var(--ink);
  background: var(--page);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
body { margin: 0; }
button, input, textarea { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #387ec2; outline-offset: 3px; }
h1, h2, p, dl, dd, ol { margin: 0; }

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner, .layout { width: min(1160px, calc(100% - 64px)); margin-inline: auto; }
.header-inner {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 11px; font-size: 14px; font-weight: 700; }
.brand-divider { margin-inline: 4px; color: var(--muted); font-weight: 400; }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: var(--accent-dark);
}
.brand-mark i { width: 2px; height: 7px; border-radius: 2px; background: var(--accent-soft); }
.brand-mark i:nth-child(2), .brand-mark i:nth-child(4) { height: 12px; }
.brand-mark i:nth-child(3) { height: 19px; }
.layout {
  display: grid;
  grid-template-columns: minmax(270px, 0.85fr) minmax(0, 1.35fr);
  gap: clamp(32px, 6vw, 92px);
  align-items: start;
  padding-block: 50px 36px;
}
.study { padding-top: 4px; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 750; letter-spacing: 0.11em; }
h1 {
  margin-block: 11px 17px;
  font-size: clamp(27px, 3.08vw, 43px);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.25;
}
h1 span { color: var(--accent); white-space: nowrap; }
.study-intro { font-size: 15px; color: var(--muted); line-height: 1.8; }
.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-block: 24px 18px;
  padding: 13px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--accent-soft);
}
.facts div { padding-inline: 10px; }
.facts div + div { border-left: 1px solid #c2d8f0; }
.facts dt { color: var(--muted); font-size: 12px; }
.facts dd { margin-top: 2px; font-size: clamp(12px, 1.05vw, 15px); font-weight: 700; }
.study-details section { padding: 12px 0; border-bottom: 1px solid var(--line); }
.study-details h2 { font-size: 14px; margin-bottom: 4px; }
.study-details p { color: var(--muted); font-size: 14px; }
.study-details strong { color: var(--ink); }
.progress ol {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  list-style: none;
  padding: 0;
  margin-bottom: 18px;
}
.progress li {
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 3px solid var(--line);
  padding: 9px 0 0;
  font-size: 13px;
  color: var(--muted);
}
.progress li[aria-current], .progress li[data-done] { border-color: var(--accent); }
.progress li[aria-current] { font-weight: 750; color: var(--accent-dark); }
.step-number { font-size: 12px; font-variant-numeric: tabular-nums; }
.card {
  min-width: 0;
  padding: clamp(20px, 3.15vw, 38px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 19px;
  box-shadow: 0 4px 16px #19324c0b;
}
.section-heading { margin-bottom: 24px; }
.section-heading h2, .outcome h2 { font-size: clamp(22px, 2.35vw, 30px); line-height: 1.3; }
.section-heading p { color: var(--muted); font-size: 14px; margin-top: 7px; }
.info {
  background: #f1f7ff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 15px;
  color: var(--ink);
  font-size: 13px;
}
.info p + p { margin-top: 6px; }
.info, .study-details, .outcome { overflow-wrap: anywhere; }
.info + .question { margin-top: 23px; }
.question {
  min-inline-size: 0;
  border: 0;
  padding: 0;
  margin: 0;
  scroll-margin-top: 16px;
}
.question + .question { margin-top: 25px; }
.question legend { padding: 0; font-size: 15px; font-weight: 710; }
.required { color: var(--accent); padding-left: 4px; }
.optional { color: var(--muted); font-size: 12px; font-weight: 450; white-space: nowrap; }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.choices { display: grid; gap: 8px; margin-top: 10px; }
.choices.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 14px;
  cursor: pointer;
}
.choice:hover { border-color: #82a9d1; background: #f4f9ff; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark); }
.choice input { margin: 4px 0 0; width: 16px; height: 16px; flex: 0 0 16px; accent-color: var(--accent); }
.text-entry { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.text-entry input, textarea {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 46px;
  border: 1px solid #afc6df;
  border-radius: 9px;
  padding: 9px 12px;
  color: var(--ink);
  background: var(--paper);
}
#Q02 input { max-width: 120px; }
textarea { min-height: 112px; resize: vertical; }
.error { margin-top: 7px; font-size: 13px; color: var(--error); }
.question:has(.error:not([hidden])) .choice, [aria-invalid="true"] { border-color: var(--error); }

.submit-error { margin-top: 20px; }
.form-actions, .step-actions, .outcome-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
}
.form-actions, .outcome-actions {
  margin-top: 27px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.form-actions { justify-content: space-between; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
}
.primary { color: #fff; background: var(--accent); }
.primary:hover { background: var(--accent-dark); }
.secondary { color: var(--accent-dark); background: var(--paper); border-color: var(--line); }
.secondary:hover { background: var(--accent-soft); }
.quiet { padding-inline: 0; color: var(--muted); background: transparent; }
.quiet:hover { color: var(--accent-dark); text-decoration: underline; }
.button:disabled { cursor: wait; opacity: 0.62; }
.outcome > p { margin-top: 13px; color: var(--muted); }
#receipt-id { color: var(--ink); font-family: ui-monospace, monospace; }

@media (max-width: 760px) {
  .header-inner, .layout { width: min(100% - 32px, 620px); }
  .header-inner { min-height: 60px; }
  .layout { display: block; padding-block: 25px; }
  .study { padding: 0; margin-bottom: 26px; }
  .study-intro { max-width: 54ch; }
  .facts { margin-block: 18px 8px; }
  body:not([data-screen="0"]) .study { display: none; }
  .card { border-radius: 14px; }
  .progress ol { gap: 6px; margin-bottom: 12px; }
  .progress li { gap: 4px; font-size: 12px; }
  .step-number { font-size: 11px; }
}

@media (max-width: 370px) {
  .step-number { display: none; }
  .facts div { padding-inline: 6px; }
  .choices.compact { grid-template-columns: 1fr; }
}
