:root {
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1b1f27;
  --muted: #5d6675;
  --border: #e2e5ea;
  --accent: #4e2a84;      /* ASEB purple */
  --accent-soft: #efe9f7;
  --ink: #000000;          /* ASEB black */
  --ok: #157a4a;
  --danger: #b42318;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1218; --surface: #171b23; --text: #e8ebf0; --muted: #9aa3b2;
    --border: #2a303b; --accent: #a585d8; --accent-soft: #2a2040; --ink: #ffffff; --ok: #4cc38a; --danger: #ff7b72;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

.top { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--border); }
.top-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; font-weight: 700; color: var(--ink); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.progress-wrap { display: flex; align-items: center; gap: 10px; min-width: 0; }
.progress { width: 160px; height: 6px; background: var(--border); border-radius: 99px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.progress-text { font-size: 13px; color: var(--muted); white-space: nowrap; }

.layout { display: grid; grid-template-columns: 240px 1fr; gap: 32px; padding-top: 28px; padding-bottom: 80px; }
.toc { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: 2px; }
.toc a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); text-decoration: none; font-size: 14px; }
.toc a:hover { background: var(--surface); color: var(--text); }
.toc a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.toc .num { flex: 0 0 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; border: 1px solid var(--border); background: var(--surface); }
.toc a.done .num { background: var(--ok); border-color: var(--ok); color: #fff; }
.toc .count { margin-left: auto; font-size: 12px; }

.content { min-width: 0; }
.hero { margin-bottom: 24px; }
.hero h1 { font-size: 30px; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 10px; }
.hero p { color: var(--muted); margin: 0 0 14px; max-width: 65ch; }
.hero-notes { margin: 0; padding: 14px 18px 14px 34px; background: var(--accent-soft); border-radius: var(--radius); }
.hero-notes li { margin: 4px 0; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; margin-bottom: 20px; }
.card-head { margin-bottom: 8px; }
.step { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--accent); font-weight: 700; }
.card h2 { margin: 4px 0 4px; font-size: 22px; letter-spacing: -.01em; }
.intro { margin: 0; color: var(--muted); }

.q { padding: 18px 0; border-top: 1px solid var(--border); }
.q:first-of-type { border-top: 0; }
.q-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.q-label { font-weight: 600; }
.na { flex: 0 0 auto; font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; cursor: pointer; white-space: nowrap; }
.skip-note { margin: 2px 0 10px; font-size: 13px; color: var(--muted); }
.skip-note .help { color: var(--text); opacity: .8; }
.q.is-na .q-label { color: var(--muted); text-decoration: line-through; }
.q.is-na input:not([type=checkbox]), .q.is-na textarea, .q.is-na select, .q.is-na .choices { opacity: .45; }

input[type=text], input[type=email], input[type=tel], input[type=url], textarea, select {
  width: 100%; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; background: var(--surface); }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 99px; padding: 6px 12px; cursor: pointer; font-size: 14px; background: var(--bg); }
.chip:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.chip input[type=checkbox] { margin: 0; accent-color: var(--accent); }
.chip.other { cursor: default; }
.chip.other input { border: 0; background: transparent; padding: 0; width: 160px; font-size: 14px; }
.chip.other input:focus { outline: none; }

.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.submit-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 24px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.submit-note { margin: 0; color: var(--muted); }
.btn { font: inherit; font-weight: 600; border-radius: 8px; padding: 11px 20px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; display: inline-block; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn:disabled { opacity: .6; cursor: wait; }
.error { flex-basis: 100%; margin: 0; color: var(--danger); }

.thanks { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px 28px; text-align: center; }
.thanks h1 { margin-top: 0; }
.muted { color: var(--muted); }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
  .toc { display: none; }
  .progress { width: 90px; }
  .hero h1 { font-size: 24px; }
  .card { padding: 18px 16px; }
  .q-top { flex-direction: column; gap: 4px; }
}

.brand img { width: 36px; height: 36px; border-radius: 8px; background: #fff; flex: 0 0 auto; }
.brand span { overflow: hidden; text-overflow: ellipsis; }
.top { border-bottom: 3px solid var(--accent); }
.btn.primary:hover { filter: brightness(1.12); }
.hero h1 .accent { color: var(--accent); }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 0 16px 32px; }
@media (max-width: 860px) { .brand .full { display: none; } }
@media (min-width: 861px) { .brand .short { display: none; } }
