/* Scientific, calm, accessible. No external fonts, images or scripts. */
:root {
  --bg: #f6f5f1; --surface: #ffffff; --ink: #1b2430; --muted: #566274; --line: #dcd8cf; --line-strong: #c4bfb3;
  --accent: #1f3b63; --accent-ink: #ffffff; --accent-soft: #e9eef6; --gold: #a98a3d;
  --error: #a3262a; --ok: #1d6b45; --warn-bg: #fbf3dc; --warn-ink: #5c4300;
  --dev-bg: #7a1f24; --dev-ink: #ffffff; --pilot-bg: #fbf3dc; --pilot-ink: #5c4300; --focus: #1b5fd1;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 30, 45, .06), 0 6px 18px rgba(20, 30, 45, .05);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161d; --surface: #19202a; --ink: #e8ecf1; --muted: #9ba7b7; --line: #2b3542; --line-strong: #3b4757;
    --accent: #8fb2e6; --accent-ink: #0c1420; --accent-soft: #1d2837; --gold: #d3b66c;
    --error: #ff8f8f; --ok: #7fd49a; --warn-bg: #3a3211; --warn-ink: #f2e2a6;
    --dev-bg: #5c1a1e; --dev-ink: #ffe3e3; --pilot-bg: #3a3211; --pilot-ink: #f2e2a6; --focus: #8ab4f8;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
a { color: var(--accent); }

/* header and footer */
.banner { padding: .45rem 16px; text-align: center; font-weight: 600; font-size: .85rem; letter-spacing: .02em; }
.banner.dev { background: var(--dev-bg); color: var(--dev-ink); }
.banner.pilot { background: var(--pilot-bg); color: var(--pilot-ink); }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: inset 0 -3px 0 var(--gold); }
.site-header .inner { max-width: 52rem; margin: 0 auto; padding: .8rem 16px .9rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.brand { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand .label { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.brand .inst { font-family: var(--serif); font-size: 1rem; color: var(--ink); }
.lang { font-size: .85rem; color: var(--muted); }
.lang label { margin-right: .35rem; }
.lang select { width: auto; min-width: 8rem; padding: .35rem .6rem; font-size: .9rem; }
.site-footer { margin-top: auto; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .8rem; }
.site-footer .inner { max-width: 52rem; margin: 0 auto; padding: 1rem 16px; display: flex; gap: .4rem 1.5rem; flex-wrap: wrap; justify-content: space-between; }

main { width: 100%; max-width: 52rem; margin: 0 auto; padding: 1.6rem 16px 3rem; }
h1 { font-family: var(--serif); font-weight: 600; font-size: 1.85rem; line-height: 1.22; margin: .2rem 0 .9rem; letter-spacing: -.005em; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 1.25rem; line-height: 1.3; margin: 1.6rem 0 .4rem; }
p { margin: .45rem 0 .9rem; }
.lead { font-size: 1.04rem; }
.eyebrow { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); font-weight: 700; margin: 0 0 .2rem; }
.rule { height: 3px; width: 3.2rem; background: var(--gold); border: 0; margin: 0 0 1.1rem; border-radius: 2px; }

/* cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; margin: 0 0 1.1rem; box-shadow: var(--shadow); }
.card h2:first-child { margin-top: .1rem; }
.card section + section { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .2rem; }
.hero { padding: 1.4rem 1.4rem 1.2rem; }
.hero p { max-width: 42rem; }

/* age choice */
.choices { display: grid; gap: .8rem; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: .8rem 0 1.2rem; }
.age-card { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; text-align: left; padding: 1rem 1.1rem; min-height: 5.2rem;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong); border-top: 4px solid var(--accent); border-radius: var(--radius); box-shadow: var(--shadow); cursor: pointer; font: inherit; }
.age-card .age { font-family: var(--serif); font-size: 1.3rem; font-weight: 600; color: var(--accent); }
.age-card .sub { font-size: .85rem; color: var(--muted); }
.age-card:hover { background: var(--accent-soft); border-color: var(--accent); }
.age-card:active { transform: translateY(1px); }
@media (max-width: 640px) { .choices { grid-template-columns: 1fr; } .age-card { min-height: 4.2rem; } h1 { font-size: 1.5rem; } }

/* form items */
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0; margin-bottom: .45rem; }
.item { margin: 0 0 1.7rem; }
.item[hidden], .row[hidden], label[hidden], [hidden] { display: none !important; }
.opt { display: flex; gap: .7rem; align-items: flex-start; padding: .6rem .8rem; margin: .3rem 0; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); cursor: pointer; transition: background .12s, border-color .12s; }
.opt:hover { background: var(--accent-soft); border-color: var(--line-strong); }
.opt:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); }
.opt input { margin-top: .28rem; width: 1.15rem; height: 1.15rem; flex: none; accent-color: var(--accent); }
.row { border-top: 1px solid var(--line); padding: .9rem 0 .5rem; }
.row legend { font-weight: 500; }
.row .opts { display: flex; flex-wrap: wrap; gap: .2rem .5rem; }
.row .opt { padding: .4rem .7rem; margin: .2rem 0; }
.help, .hint { color: var(--muted); font-size: .88rem; margin: 0 0 .5rem; }
.opt-tag { color: var(--muted); font-weight: 400; font-size: .85rem; }
select, input[type="text"], textarea { width: 100%; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 10px; padding: .6rem .75rem; }
textarea { min-height: 7rem; resize: vertical; }
details.def { border: 1px solid var(--line); border-left: 4px solid var(--gold); background: var(--surface); border-radius: 10px; padding: .6rem .9rem; margin: 0 0 .9rem; }
details.def summary { cursor: pointer; font-weight: 600; }
.error { color: var(--error); font-weight: 600; margin: .35rem 0; }
.warn { background: var(--warn-bg); color: var(--warn-ink); padding: .55rem .8rem; border-radius: 10px; margin: .4rem 0; }

/* buttons and progress */
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.5rem; }
button, .btn { font: inherit; font-weight: 600; padding: .72rem 1.35rem; border-radius: 10px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); cursor: pointer; min-height: 46px; }
button:hover { filter: brightness(1.08); }
button.secondary { background: transparent; color: var(--accent); }
button.danger { background: transparent; color: var(--error); border-color: var(--error); }
button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.age-card { font-weight: 400; }
.progress-label { font-size: .82rem; color: var(--muted); margin-bottom: .25rem; letter-spacing: .02em; }
progress { -webkit-appearance: none; appearance: none; width: 100%; height: .5rem; border: 0; border-radius: 999px; background: var(--line); overflow: hidden; display: block; }
progress::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.sr { position: absolute; left: -10000px; }
ol, ul { padding-left: 1.2rem; }
table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td { border: 1px solid var(--line); padding: .35rem .5rem; text-align: left; vertical-align: top; }
@media (max-width: 520px) { html { font-size: 16px; } .row .opts { display: block; } .card { padding: 1rem; } .hero { padding: 1.1rem; } }
@media print { .site-header, .site-footer, .actions, .banner { display: none; } body { background: #fff; } }

.card.parents { border-left: 4px solid var(--gold); }
.card.parents h2 { font-size: 1.05rem; }
.card.parents p { font-size: .92rem; margin-bottom: 0; }

/* answers that are not scale points (not sure / does not apply / prefer not to answer) */
.specials { margin-top: .5rem; padding-top: .45rem; border-top: 1px dashed var(--line-strong); }
.opt.special { border-style: dashed; background: transparent; color: var(--muted); font-size: .92rem; }
.opt.special:hover { background: var(--accent-soft); }
.row .specials { margin-top: .25rem; }

/* header without a separate label: the one-line affiliation statement */
.brand .label:empty { display: none; }
.brand .inst { font-size: .98rem; line-height: 1.3; }
