:root {
  color-scheme: light dark;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c1f24;
  --muted: #5b6370;
  --border: #d9dde3;
  --input-border: #7d8592;
  --accent: #1d4ed8;
  --accent-hover: #1e40af;
  --accent-text: #ffffff;
  --info: #1e3a8a;
  --info-bg: #e8eefc;
  --ok: #166534;
  --ok-bg: #e9f6ee;
  --warn: #7a4a00;
  --warn-bg: #fdf3e1;
  --err: #b42318;
  --err-bg: #fdecea;
  --err-text: #ffffff;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111316;
    --surface: #1a1d21;
    --text: #e8eaed;
    --muted: #a3aab5;
    --border: #30353c;
    --input-border: #6b7380;
    --accent: #8ab4ff;
    --accent-hover: #a8c7ff;
    --accent-text: #0b1220;
    --info: #c7d7fe;
    --info-bg: #1b2747;
    --ok: #a7e3bd;
    --ok-bg: #15301f;
    --warn: #f5d08a;
    --warn-bg: #3a2c10;
    --err: #ffb4a8;
    --err-bg: #3d1b17;
    --err-text: #3d1b17;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
.wrap { width: 100%; max-width: 42rem; margin: 0 auto; padding: 0 1rem; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--surface); padding: .5rem .75rem; border-radius: 6px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; min-height: 3.5rem; }
.brand { font-weight: 700; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); text-decoration: underline; }
main { flex: 1; padding: 2rem 0 3rem; }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: .875rem; padding: 1.25rem 0 2rem; }
.site-footer p { margin: 0 0 .375rem; }
.site-footer a { color: var(--muted); }
h1 { font-size: 1.625rem; line-height: 1.25; margin: 0 0 1rem; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 2rem 0 .75rem; }
h3 { font-size: 1.0625rem; margin: 1.5rem 0 .5rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin: 0 0 1rem; }
.card > :last-child { margin-bottom: 0; }
.notice { border-radius: var(--radius); padding: .875rem 1rem; margin: 0 0 1.25rem; border: 1px solid transparent; }
.notice > :last-child { margin-bottom: 0; }
.notice-info { background: var(--info-bg); color: var(--info); }
.notice-success { background: var(--ok-bg); color: var(--ok); }
.notice-warning { background: var(--warn-bg); color: var(--warn); }
.notice-error { background: var(--err-bg); color: var(--err); }
.notice a { color: inherit; font-weight: 600; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  width: 100%; min-height: 2.75rem; padding: .625rem 1.125rem;
  border: 1px solid transparent; border-radius: 8px;
  font: inherit; font-weight: 600; line-height: 1.2; text-align: center; text-decoration: none; cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-text); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--muted); color: var(--text); }
.btn-danger { background: var(--err); color: var(--err-text); }
.btn-link { width: auto; min-height: 0; padding: 0; border: 0; background: none; color: var(--accent); font-weight: 500; text-decoration: underline; }
.actions { display: flex; flex-direction: column; gap: .75rem; margin: 1.25rem 0; }
.actions form { margin: 0; }
@media (min-width: 30rem) {
  .btn { width: auto; }
  .actions { flex-direction: row; flex-wrap: wrap; align-items: center; }
}
form.inline { display: inline; margin: 0; }
.field { margin: 0 0 1.125rem; }
label { display: block; font-weight: 600; margin: 0 0 .375rem; }
input[type="text"], input[type="email"], input[type="date"], input[type="number"], input[type="tel"], textarea, select {
  display: block; width: 100%; min-height: 2.75rem; padding: .625rem .75rem;
  font: inherit; color: var(--text); background: var(--surface);
  border: 1px solid var(--input-border); border-radius: 8px;
}
textarea { min-height: 6rem; resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--accent); }
input[aria-invalid="true"], textarea[aria-invalid="true"], select[aria-invalid="true"] { border-color: var(--err); }
.hint { color: var(--muted); font-size: .875rem; margin: .375rem 0 0; }
.field-error { color: var(--err); font-size: .875rem; font-weight: 600; margin: .375rem 0 0; }
.code-input { font-size: 1.5rem; letter-spacing: .3em; text-align: center; max-width: 12rem; }
.error-summary { border: 2px solid var(--err); }
.error-summary ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.table-wrap { overflow-x: auto; margin: 0 0 1rem; }
table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
th, td { text-align: left; vertical-align: top; padding: .625rem .5rem; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: .8125rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .375rem 1rem; margin: 0 0 1rem; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }
.badge { display: inline-block; padding: .125rem .5rem; border-radius: 999px; font-size: .8125rem; font-weight: 600; background: var(--info-bg); color: var(--info); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-err { background: var(--err-bg); color: var(--err); }
.page-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.25rem; margin: 0 0 1.5rem; padding: 0 0 .75rem; border-bottom: 1px solid var(--border); }
.page-nav a, .page-nav .btn-link { font-weight: 600; text-decoration: none; }
.page-nav a:hover, .page-nav .btn-link:hover { text-decoration: underline; }
.page-nav a[aria-current] { color: var(--text); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.page-nav form { margin-left: auto; }
fieldset.question { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.question legend { padding: 0; margin: 0 0 .25rem; font-weight: 600; }
.choice { display: flex; align-items: flex-start; gap: .625rem; min-height: 2.75rem; margin: .5rem 0 0; padding: .625rem .75rem; border: 1px solid var(--input-border); border-radius: 8px; font-weight: 400; cursor: pointer; }
.choice:hover { border-color: var(--accent); }
.choice-radio { flex: none; width: 1.125rem; height: 1.125rem; margin: .1875rem 0 0; accent-color: var(--accent); }
.question-title { font-size: 1.0625rem; margin: 0 0 .75rem; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1.5rem 0; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
