:root {
  color-scheme: light;
  --page: #eef6fc;
  --surface: #fff;
  --light: #f5f9fe;
  --ink: #172a42;
  --muted: #51657e;
  --blue: #1558af;
  --blue-dark: #114586;
  --border: #d7e4f0;
  --line: #e5edf5;
  --red: #982a39;
  --green: #1b674f;
  --ring: #1c75d0;
  font-family: "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}
* { box-sizing: border-box; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  display: flex;
  flex-direction: column;
}
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
:focus-visible { outline: 3px solid var(--ring); outline-offset: 3px; }
p { margin: 0 0 1rem; }
h1, h2, h3 { line-height: 1.3; overflow-wrap: anywhere; margin: 0 0 .85rem; }
h1 { font-size: clamp(1.65rem, 4vw, 2.15rem); font-weight: 720; }
h2 { font-size: clamp(1.12rem, 2.5vw, 1.35rem); font-weight: 680; }
code { overflow-wrap: anywhere; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner {
  max-width: 1120px;
  padding: 0 22px;
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.header-inner nav { font-size: .91rem; flex: 0 0 auto; }
.brand { color: var(--ink); font-weight: 710; text-decoration: none; }
.brand::before {
  content: "";
  display: inline-block;
  width: .62rem;
  height: .62rem;
  border-radius: 3px;
  background: var(--blue);
  margin-right: .5rem;
}
.site-footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .3rem 1.2rem;
  padding: 18px 18px 24px;
  font-size: .82rem;
  color: var(--muted);
}
.wrap { width: min(calc(100% - 40px), 740px); margin: 34px auto; }
.wrap-narrow { max-width: 500px; }
.wrap-admin { max-width: 1070px; }
.card {
  padding: clamp(18px, 4vw, 32px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 15px;
  box-shadow: 0 2px 9px #183c6610;
  overflow-wrap: anywhere;
}
.card + .card { margin-top: 18px; }
.form-actions { display: flex; flex-wrap: wrap; gap: .65rem 1rem; align-items: center; }
.muted, .field small { color: var(--muted); }
.eyebrow { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin: 0 0 .6rem; font-size: .9rem; color: var(--blue); font-weight: 650; }
.eyebrow span { color: var(--muted); font-weight: 500; }
.section-head { margin-bottom: 1.15rem; }
button, .button, input, select { font: inherit; }
button, .button {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
  border-radius: 7px;
  min-height: 43px;
  padding: .47rem .9rem;
  font-weight: 620;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
button:disabled { background: #e5edf7; border-color: var(--border); color: var(--muted); cursor: default; }
.button-secondary { background: #fff; color: var(--blue); border-color: #b9d0e7; }
.button-secondary:hover { background: #eff6ff; color: var(--blue-dark); border-color: #89aed4; }
.link-button {
  background: none;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 3px;
  border: none;
  padding: 0;
}
.link-button:hover { background: none; color: var(--blue-dark); }
.stack { display: grid; gap: 1rem; }
.stack p, .topic-paper p:last-child, .section-line p { margin-bottom: 0; }
.compact { gap: .6rem; }
.field { display: grid; gap: .3rem; min-width: 0; align-content: start; }
.field > span { font-size: .94rem; font-weight: 650; }
.field input, .field select {
  min-height: 43px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: .45rem .62rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #b8cce0;
  border-radius: 7px;
}
.field input[readonly] { background: var(--light); }
.check-row {
  display: flex; align-items: flex-start; gap: .55rem;
  background: var(--light); padding: .65rem .8rem; border-radius: 7px;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--blue); }
.check-row input { margin: .42rem 0 0; flex: 0 0 auto; height: 1rem; width: 1rem; }
.feedback { padding: .66rem .82rem; border-radius: 8px; border: 1px solid; font-size: .96rem; }
.feedback.error { color: var(--red); background: #fff5f6; border-color: #f0cbd2; }
.feedback.positive { color: var(--green); background: #f1fbf6; border-color: #bce2d2; }
.topic-paper {
  padding: .9rem 1.05rem;
  background: var(--light);
  border: 1px solid #cfe1f1;
  border-radius: 9px;
}
.topic-paper p { line-height: 1.78; }
.scenario .comment-description { border-top: 1px solid var(--border); margin-top: .95rem; padding-top: .65rem; }
.scenario h3 { font-size: 1rem; margin: 0 0 .35rem; }
.scenario .comment-description p + p { margin-top: .4rem; }
.viewpoints { display: grid; gap: .4rem; margin: .85rem 0 0; }
.viewpoints div { display: flex; align-items: baseline; gap: .55rem; }
.viewpoints dt { color: var(--blue); font-weight: 750; }
.viewpoints dd { margin: 0; }
.question { padding: 0; margin: 0; border: 0; min-inline-size: 0; }
.question legend { font-weight: 660; margin-bottom: .52rem; padding: 0; }
.long-options { display: grid; gap: .4rem; }
.long-options label {
  display: flex; align-items: flex-start; gap: .6rem;
  border: 1px solid var(--border); border-radius: 7px; padding: .52rem .65rem; cursor: pointer;
}
.long-options label:hover { background: var(--light); }
.long-options label:has(input:checked) { background: #eaf3ff; border-color: #80aee1; }
.long-options input { margin: .38rem 0 0; height: 1rem; width: 1rem; flex: 0 0 auto; }
.profile-grid { display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.measure-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .2rem .8rem; }
.measure-heading h2 { margin-bottom: 0; }
.measure-heading > span { font-size: .9rem; }
.question-row { padding-bottom: .85rem; border-bottom: 1px solid var(--line); }
.scale-key {
  display: flex; flex-wrap: wrap; gap: .18rem .9rem;
  margin: 0; background: var(--light); border-radius: 7px;
  padding: .5rem .65rem; list-style: none; font-size: .89rem; color: var(--muted);
}
.scale-key strong { color: var(--ink); }
.question .scale-key { margin: 0 0 .46rem; }
.scale-options { display: flex; gap: clamp(4px, 1.3vw, 9px); max-width: 460px; }
.scale-option { flex: 1; min-width: 0; cursor: pointer; }
.scale-option > span {
  display: grid; place-items: center; min-height: 44px; border-radius: 7px;
  border: 1px solid #bdcfe0; color: var(--ink); background: var(--surface); font-weight: 630;
}
.scale-option:hover > span { background: var(--light); }
.scale-option > input:focus-visible + span { outline: 3px solid var(--ring); outline-offset: 2px; }
.scale-option > input:checked + span { color: #fff; background: var(--blue); border-color: var(--blue); }
.end-form { margin-top: .65rem; text-align: center; font-size: .88rem; }
.receipt { background: var(--light); padding: .6rem .75rem; border-radius: 7px; }
.tabs { display: flex; flex-wrap: wrap; gap: .5rem; }
.tabs a { display: inline-block; padding: .38rem .75rem; border-radius: 6px; text-decoration: none; }
.tabs a[aria-current] { background: #daeaff; color: var(--blue-dark); font-weight: 700; }
.admin-intro { margin-bottom: 1.1rem; }
.section-line { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: .6rem 1rem; }
.section-line h2 { margin-bottom: .25rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; margin: 1rem 0; }
.metrics div { padding: .7rem .8rem; background: var(--light); border-radius: 8px; }
.metrics dt { font-size: .86rem; color: var(--muted); }
.metrics dd { margin: 0; font-size: 1.55rem; font-weight: 710; font-variant-numeric: tabular-nums; }
.inline-list, .record-list { padding-left: 1.2rem; }
.inline-list { display: flex; flex-wrap: wrap; column-gap: 1.5rem; }
details { margin-top: .7rem; }
summary { cursor: pointer; color: var(--blue); font-weight: 630; }
details[open] > summary { margin-bottom: .55rem; }
.inline-form { display: flex; flex-wrap: wrap; gap: .65rem; align-items: end; margin: .7rem 0; }
.inline-form .field { flex: 1 1 150px; }
.inline-form input[type="number"] { max-width: 180px; }
.table-scroll { max-width: 100%; overflow-x: auto; border: 1px solid var(--border); border-radius: 8px; }
table { border-collapse: collapse; width: 100%; font-size: .89rem; }
th, td { padding: .56rem .7rem; text-align: left; vertical-align: top; min-width: 76px; }
th { background: var(--light); color: var(--muted); font-weight: 650; }
td { border-top: 1px solid var(--line); }
td:first-child { overflow-wrap: normal; }
.review { min-width: 80px; margin: 0; }
.review[open] { min-width: 150px; }
.risk { color: var(--red); }
.pager { display: flex; align-items: center; gap: 1rem; margin-top: .55rem; }
.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; }
.back { display: inline-block; margin-bottom: .6rem; }
.record-summary div { display: flex; flex-wrap: wrap; gap: .25rem .55rem; margin-bottom: .3rem; }
.record-summary dt { font-weight: 650; }
.record-summary dd { margin: 0; }
.skip-link { position: absolute; left: -1000px; top: .2rem; z-index: 1; }
.skip-link:focus { left: .4rem; background: var(--surface); padding: .4rem; }
.visually-hidden {
  clip: rect(0, 0, 0, 0); clip-path: inset(50%);
  width: 1px; height: 1px; overflow: hidden; position: absolute; white-space: nowrap;
}
@media (max-width: 710px) {
  .export-grid { grid-template-columns: 1fr; }
  .header-inner { min-height: 56px; padding: 0 14px; }
  .wrap { width: calc(100% - 24px); margin: 18px auto; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 470px) {
  .profile-grid { grid-template-columns: 1fr; }
  .brand { font-size: .92rem; }
  .header-inner nav { font-size: .84rem; }
}
@media (max-width: 390px) {
  .scale-options:has(.scale-option:nth-child(7)) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
