:root {
  --paper: #f3efe6;
  --paper-2: #fffdf8;
  --ink: #1c1915;
  --muted: #4a433c;
  --line: #ddd2c2;
  --burgundy: #6f1d2c;
  --burgundy-ink: #4c1019;
  --gold: #8d6a2f;
  --good: #1d5c3d;
  --bad: #8d1d2c;
  --focus: #0b4f9c;
  --shadow: 0 1px 0 rgba(28, 25, 21, 0.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { scroll-behavior: auto; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Liberation Sans", "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
}
h1, h2, h3, .wordmark strong {
  font-family: "Liberation Serif", Palatino, "Palatino Linotype", Georgia, "Songti SC", serif;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
a { color: var(--burgundy-ink); }
a:hover { color: var(--burgundy); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.skip {
  position: absolute; left: 0.5rem; top: -4rem; background: var(--ink); color: white; padding: 0.5rem 0.8rem; z-index: 5;
}
.skip:focus { top: 0.5rem; }
.site-header { background: var(--burgundy); color: #f7f1e8; }
.site-header a { color: #f7f1e8; text-decoration: none; }
.topbar, .nav-row, .footer-inner, .wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding: 0.85rem 0; }
.brand { display: flex; gap: 0.75rem; align-items: center; text-decoration: none; }
.mark { width: 42px; height: 42px; flex: none; }
.mark rect { fill: #f4efe6; }
.mark text { fill: var(--burgundy); font-family: Georgia, "Liberation Serif", serif; font-size: 15px; }
.wordmark { display: flex; flex-direction: column; }
.wordmark span { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; }
.wordmark strong { font-size: 1.15rem; color: #f7f1e8; }
.who { font-size: 0.92rem; }
.goldrule { height: 4px; background: linear-gradient(90deg, var(--gold), #e6d3a1 40%, var(--gold)); }
.nav-row { display: flex; justify-content: space-between; gap: 1rem; align-items: center; padding-bottom: 0.4rem; }
.nav-toggle { position: absolute; left: -999px; }
.nav-button { display: none; border: 1px solid #f4efe6; padding: 0.4rem 0.7rem; }
.nav-list, .tools { display: flex; flex-wrap: wrap; gap: 0.35rem 0.9rem; list-style: none; padding: 0; margin: 0; align-items: center; }
.nav-list a, .tools a, .tools button { color: #f7f1e8; background: none; border: 0; font: inherit; text-decoration: underline; text-underline-offset: 0.18em; padding: 0.35rem 0; }
.demo-banner { background: #f3e2b0; color: #3d2d08; margin: 0; padding: 0.55rem 1rem; text-align: center; }
main { padding: 1.5rem 0 3rem; }
.hero { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 1.5rem; align-items: start; }
.hero h1 { font-size: clamp(2rem, 4vw, 3.3rem); margin: 0 0 0.6rem; }
.lede { font-size: 1.15rem; max-width: 42rem; }
.panel, .card, .question, .form, table, .notice, .error-summary {
  background: var(--paper-2); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.panel, .card, .question, .form { padding: 1rem 1.1rem; }
.facts { width: 100%; border-collapse: collapse; }
.facts th, .facts td, table th, table td { text-align: left; padding: 0.45rem 0.55rem; vertical-align: top; border-bottom: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--paper-2); }
caption { text-align: left; font-weight: 700; padding: 0.6rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.prose { max-width: 46rem; }
.prose h1 { font-size: 2rem; }
.button, button, input, select, textarea { font: inherit; }
.button, button.primary, button {
  background: var(--burgundy); color: #fffdf8; border: 1px solid var(--burgundy-ink);
  min-height: 44px; padding: 0.45rem 0.9rem; text-decoration: none; display: inline-block; cursor: pointer;
}
.button.secondary, button.secondary { background: transparent; color: var(--burgundy-ink); }
button.linkish { background: none; color: #f7f1e8; border: 0; min-height: auto; padding: 0.35rem 0; text-decoration: underline; }
input, select, textarea { width: 100%; max-width: 40rem; background: white; color: var(--ink); border: 1px solid #8d8376; padding: 0.45rem 0.55rem; }
textarea { min-height: 8rem; }
.form-row { margin: 0 0 0.9rem; }
form.stack-form label,
.stack-form label {
  display: block;
  margin: 0.75rem 0 0.25rem;
  font-weight: 650;
}
form.stack-form input[type="checkbox"],
.stack-form input[type="checkbox"],
form.stack-form input[type="radio"] {
  width: auto;
  margin-right: 0.4rem;
  vertical-align: middle;
}
form.stack-form button,
.stack-form button { margin-top: 0.6rem; }
.help, .muted { color: var(--muted); }
.field-error, .error-summary { color: var(--bad); }
.error-summary { padding: 0.8rem 1rem; margin-bottom: 1rem; }
.notice { padding: 0.8rem 1rem; border-left: 4px solid var(--gold); }
.tag { display: inline-block; border: 1px solid var(--line); padding: 0.05rem 0.4rem; font-size: 0.85rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.site-footer { border-top: 1px solid var(--line); padding: 1.5rem 0 2rem; color: var(--muted); }
.footer-inner { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.exam-bar {
  position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 1rem; align-items: center;
  background: var(--ink); color: #f7f1e8; padding: 0.7rem 1rem;
}
.exam-bar strong { font-variant-numeric: tabular-nums; font-size: 1.4rem; }
.q-nav { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.8rem 0; }
.q-nav a { min-width: 2.2rem; text-align: center; border: 1px solid var(--line); background: white; text-decoration: none; padding: 0.2rem; }
.question { margin: 0 0 1rem; }
.choice { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.35rem 0; }
.choice input { width: auto; margin-top: 0.35rem; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.stat { font-size: 1.6rem; margin: 0; font-variant-numeric: tabular-nums; }
progress { width: min(100%, 28rem); height: 1rem; }
.messages { list-style: none; padding: 0; }
.messages li { background: #e7f2ea; border: 1px solid #b7d7c4; padding: 0.6rem 0.8rem; margin: 0 0 0.5rem; }
.messages .error { background: #f8e6e8; border-color: #e2b4ba; }
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .nav-button { display: inline-block; }
  .nav-list { display: none; flex-direction: column; align-items: flex-start; padding: 0.4rem 0 0.8rem; }
  .nav-toggle:checked + .nav-button + .nav-list, .nav-toggle:focus + .nav-button + .nav-list { display: flex; }
}
@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none; }
}
@media print {
  .site-header, .site-footer, .nav-row, .exam-bar, .no-print { display: none; }
  body { background: white; }
}
