/* Read U — warm paper by day, plum night by dark mode. System fonts; one accent. */
:root {
  --bg: #faf7f5; --surface: #ffffff; --ink: #231d2b; --muted: #6b6274; --line: #ebe4e8;
  --accent: #7a4fb5; --accent-ink: #ffffff; --accent-soft: #f1eaf9; --pink: #d9688c;
  --radius: 16px; --radius-sm: 10px; --shadow: 0 1px 2px rgba(35,29,43,.05), 0 6px 24px rgba(35,29,43,.06);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #16131c; --surface: #201b28; --ink: #efeaf4; --muted: #a79eb2; --line: #332c3d;
    --accent: #b796ea; --accent-ink: #16131c; --accent-soft: #2b2338; --pink: #ee8fae; color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5vw, 46px); margin: 0 0 12px; }
h2 { font-size: 24px; margin: 36px 0 10px; }
.wrap { max-width: 880px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: var(--surface); padding: 8px; z-index: 9; }

header.site { border-bottom: 1px solid var(--line); background: var(--surface); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); text-decoration: none; }
.logo { width: 28px; height: 28px; color: var(--accent); }
nav { display: flex; gap: 4px 16px; flex-wrap: wrap; font-size: 15px; }
nav a { color: var(--muted); text-decoration: none; padding: 4px 0; }
nav a:hover, nav a[aria-current] { color: var(--ink); }

main { padding-bottom: 48px; }
.hero { padding: 56px 0 24px; max-width: 680px; }
.eyebrow { color: var(--pink); font-weight: 600; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 8px; }
.lede { font-size: 19px; color: var(--muted); margin: 0; }
.meta { color: var(--muted); font-size: 14px; }
.fine { color: var(--muted); font-size: 13px; }
.center { text-align: center; }
.narrow { max-width: 680px; }
.prose { max-width: 720px; } .prose li { margin: 6px 0; }
.types { padding-left: 20px; }
.plain { list-style: none; padding: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.card:hover { transform: translateY(-2px); border-color: var(--accent); }
.card h2, .card h3 { margin: 0 0 8px; font-size: 20px; } .card p { margin: 0 0 8px; }
.card .go { margin-top: auto; color: var(--accent); font-weight: 600; }
.card.small h3 { font-size: 17px; }

.crumbs { font-size: 14px; color: var(--muted); padding: 16px 0 0; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.quiz-head { padding: 24px 0 8px; max-width: 680px; }

/* Quiz */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin: 16px 0; }
.item { border: 0; margin: 0 0 28px; padding: 0; }
.item legend { font-weight: 600; font-size: 18px; margin-bottom: 12px; padding: 0; }
.num { color: var(--muted); font-weight: 500; }
.scale { display: grid; gap: 8px; }
.scale-7 { grid-template-columns: repeat(7, 1fr); } .scale-5 { grid-template-columns: repeat(5, 1fr); }
.scale label, .choice { position: relative; cursor: pointer; }
.scale input, .choice input { position: absolute; opacity: 0; inset: 0; }
.scale span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 64px; padding: 6px; font-size: 13px; line-height: 1.25; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); transition: background .12s, border-color .12s; }
.choices { display: grid; gap: 10px; }
.choice span { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.scale label:hover span, .choice:hover span { border-color: var(--accent); }
input:checked + span { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) {
  .scale-7, .scale-5 { grid-template-columns: 1fr; }
  .scale span { min-height: 44px; justify-content: flex-start; padding: 8px 14px; font-size: 15px; }
}
.actions { display: flex; justify-content: space-between; gap: 12px; }
button, .button { font: inherit; font-weight: 600; cursor: pointer; border-radius: 999px; padding: 12px 22px; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink); text-decoration: none; display: inline-block; }
button.back, .button.ghost, .share-row button + button { background: transparent; color: var(--accent); }
.submit { margin-left: auto; }

/* One-question-at-a-time mode (public/app.js adds .stepped) */
.stepped .item { display: none; margin: 0; }
.stepped .item.on { display: block; }
.stepped .submit { display: none; } .stepped.done .submit { display: inline-block; }
.progress { margin-bottom: 20px; }
.progress .bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; min-height: 0; display: block; }
.progress .bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--pink)); transition: width .2s; }
.progress .count { margin: 6px 0 0; font-size: 13px; color: var(--muted); }

/* Results */
.result-head { padding: 24px 0 8px; }
.result-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow); max-width: 720px; }
.meter { margin: 12px 0; }
.meter-top { display: flex; justify-content: space-between; font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.track { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.track span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--pink)); border-radius: 999px; }
.callout { background: var(--accent-soft); border-radius: var(--radius); padding: 4px 24px 12px; margin-top: 24px; }
.share { max-width: 720px; margin-top: 32px; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; }

.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; max-width: 720px; }
.faq summary { cursor: pointer; font-weight: 600; }
.others { margin-top: 40px; }

footer.site { border-top: 1px solid var(--line); background: var(--surface); padding: 32px 0 24px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 24px; }
.foot-h { font-weight: 700; margin: 0 0 6px; }
footer ul { list-style: none; padding: 0; margin: 0; } footer li { margin: 4px 0; }
@media (max-width: 640px) { .foot-grid { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }
