/* Osmanth — mobile first. Warm osmanthus gold on cream. No external fonts (strict CSP, no third parties). */
:root {
  --bg: #fbf7ef;
  --surface: #ffffff;
  --ink: #2b2620;
  --muted: #6b6258;
  --line: #e6dccb;
  --accent: #b87410;
  --accent-ink: #ffffff;
  --accent-soft: #f6e7c8;
  --note: #f3efe6;
  --danger: #a3341f;
  --focus: #1f5fbf;
  --radius: 12px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1814; --surface: #24201b; --ink: #efe8dc; --muted: #b3a898; --line: #3a332b;
    --accent: #e0a23c; --accent-ink: #1b1814; --accent-soft: #3d3020; --note: #2b261f; --danger: #e07a62; --focus: #8ab4ff;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.55 var(--sans); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; font-weight: 600; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); margin: 0.4em 0 0.3em; }
h2 { font-size: 1.3rem; margin: 1.6em 0 0.5em; }
h3 { font-size: 1.1rem; margin: 0 0 0.2em; }
main { max-width: 760px; margin: 0 auto; padding: 8px 16px 48px; }
[hidden] { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.preview-banner { background: #7a1f12; color: #fff; text-align: center; font-size: 0.85rem; padding: 6px 16px; }
.site-header { max-width: 760px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.logo { font-family: var(--serif); font-size: 1.35rem; font-weight: 600; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }
.logo-mark { width: 14px; height: 14px; border-radius: 50%; background: var(--accent); box-shadow: 8px 0 0 -3px var(--accent), -8px 0 0 -3px var(--accent), 0 8px 0 -3px var(--accent), 0 -8px 0 -3px var(--accent); margin: 0 8px; }
.site-header nav { display: flex; gap: 16px; font-size: 0.95rem; }
.site-header nav a { color: var(--muted); text-decoration: none; }
.site-header nav a:hover { color: var(--ink); }
.site-footer { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }

.lede { font-size: 1.12rem; color: var(--ink); }
.fine { font-size: 0.85rem; color: var(--muted); }
.hint { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; }
.note { background: var(--note); border-radius: 8px; padding: 10px 14px; font-size: 0.95rem; }
.notice { background: var(--accent-soft); border-radius: 8px; padding: 10px 14px; }
.empty { color: var(--muted); }
.crumbs { font-size: 0.85rem; color: var(--muted); margin-top: 8px; }
.crumbs a { color: var(--muted); }

.hero { padding: 12px 0 8px; }
.hero h1 { font-size: clamp(1.8rem, 6vw, 2.6rem); }
.ask { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 20px 0; }
.ask label { display: block; font-family: var(--serif); font-size: 1.2rem; font-weight: 600; margin-bottom: 8px; }
.ask-row { display: flex; gap: 8px; }
.ask input { flex: 1; min-width: 0; font: inherit; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); }
button, .button { font: inherit; font-weight: 600; border: 0; border-radius: 10px; padding: 12px 18px; background: var(--accent); color: var(--accent-ink); cursor: pointer; text-decoration: none; display: inline-block; min-height: 44px; }
button:hover, .button:hover { filter: brightness(1.05); }
.button.secondary, button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.link-button { background: none; border: 0; padding: 0; min-height: 0; color: var(--accent); font-weight: 400; text-decoration: underline; cursor: pointer; }

.domains { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 560px) { .domains { grid-template-columns: 1fr 1fr; } }
.domains a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); height: 100%; }
.domains a:hover { border-color: var(--accent); }
.domain-name { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.domain-blurb { display: block; color: var(--muted); font-size: 0.92rem; margin-top: 2px; }
.pill-list { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pill-list a { display: inline-block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); background: var(--surface); }

.cards { list-style: none; padding: 0; display: grid; gap: 10px; }
.card a { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; text-decoration: none; color: var(--ink); }
.card a:hover { border-color: var(--accent); }
.card-title { display: block; font-family: var(--serif); font-weight: 600; font-size: 1.1rem; }
.card-meta { display: block; font-size: 0.8rem; color: var(--muted); margin: 2px 0 6px; }
.card-q { display: block; font-size: 0.95rem; }
.subtopic h2 a { color: var(--ink); text-decoration: none; }
.planned { margin-top: 10px; }
.planned h3 { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 4px; }
.planned-list { list-style: none; padding: 0; margin: 0; }
.planned-list li { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; padding: 7px 2px; border-top: 1px dashed var(--line); color: var(--muted); }
.planned-title { font-family: var(--serif); }
.first20 { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: 0 7px; }


.kind { display: inline-block; font-size: 0.82rem; font-weight: 600; border-radius: 999px; padding: 4px 12px; margin: 0 0 8px; }
.kind-a { background: #e3eefc; color: #1d4f91; }
.kind-b { background: var(--accent-soft); color: var(--ink); }
.kind-c { background: #f9e1ec; color: #8a2457; }
@media (prefers-color-scheme: dark) { .kind-a { background: #1f2f45; color: #b9d3f7; } .kind-c { background: #43202f; color: #f3bad3; } }
.facts { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); }
.privacy-note { font-size: 0.9rem; color: var(--muted); }

.take-form { margin-top: 12px; }
.question { border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 16px; margin: 0 0 14px; }
.question.invalid { border-color: var(--danger); }
/* Floating the legend takes it out of the fieldset border (otherwise browsers draw it ON the border line). */
.question legend { padding: 0; float: left; width: 100%; margin-bottom: 10px; }
.question legend + * { clear: both; }
.q-num { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 4px; }
.q-text { font-family: var(--serif); font-size: 1.15rem; font-weight: 600; }
.optional { display: inline-block; margin-left: 8px; font: 600 0.72rem var(--sans); text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 8px; vertical-align: middle; }
.opt { display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin: 6px 0; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; min-height: 44px; }
.opt:hover { border-color: var(--accent); }
.opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.opt input { width: 20px; height: 20px; accent-color: var(--accent); flex: none; margin: 0; }
.opt.skip { color: var(--muted); border-style: dashed; }
.options.images .opt img { width: 72px; height: 72px; object-fit: cover; border-radius: 8px; }
.form-error { background: #fbe4df; color: #7a1f12; border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
@media (prefers-color-scheme: dark) { .form-error { background: #4a1f17; color: #ffd4c9; } }
.submit-row { margin: 18px 0; }
.local-note { margin-top: 8px; }

/* JS stepper (take.js adds .stepper) */
.stepper .question { display: none; }
.stepper .question.current { display: block; }
.stepper .submit-row { display: none; }
.progress { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 12px 0 16px; }
.progress-fill { display: block; height: 100%; background: var(--accent); border-radius: 999px; width: 0; transition: width 0.2s ease; }
.step-nav { display: flex; justify-content: space-between; gap: 10px; margin-top: 4px; }
.step-nav button[disabled] { opacity: 0.4; cursor: default; }
.step-error { color: var(--danger); font-size: 0.9rem; min-height: 1.4em; margin: 6px 0 0; }

.result .headline { padding: 4px 0 8px; }
.band-pill { display: inline-block; background: var(--accent-soft); border-radius: 999px; padding: 3px 12px; font-weight: 600; font-size: 0.9rem; margin: 6px 0; }
.dims { list-style: none; padding: 0; display: grid; gap: 12px; }
.dim { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.bar { display: block; width: 100%; height: 14px; margin: 6px 0 8px; }
.bar-track { fill: var(--line); }
.bar-edge { fill: var(--muted); opacity: 0.5; }
.bar-mark { fill: var(--accent); }
.points { font-size: 1.1rem; }
.method { border-top: 1px solid var(--line); margin-top: 24px; }
.actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 20px; }
.crisis { background: var(--surface); border: 2px solid var(--accent); border-radius: var(--radius); padding: 16px 18px; margin: 16px 0; }
.crisis h2 { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.review-table { border-collapse: collapse; width: 100%; font-size: 0.85rem; margin: 6px 0; display: block; overflow-x: auto; }
.review-table th, .review-table td { border: 1px solid var(--line); padding: 4px 8px; text-align: left; vertical-align: top; }
.review-questions li { margin-bottom: 14px; }
.try { background: var(--accent-soft); border-radius: 8px; padding: 8px 12px; font-size: 0.95rem; }
.rules summary { cursor: pointer; color: var(--muted); font-size: 0.9rem; }
.rules ul { padding-left: 1.2em; }
.opt.exclusive { border-style: dashed; }
.instructions { margin-top: 4px; }
.premium-banner { background: #2f2a24; color: #fff; border-radius: 8px; padding: 8px 12px; font-size: 0.9rem; margin-top: 24px; }
.rsec.premium { border-left: 3px solid var(--accent); padding-left: 12px; }
.opt.na { color: var(--muted); border-style: dashed; }
.block { margin: 8px 0; }
.chart { list-style: none; padding: 0; margin: 8px 0 4px; }
.chart-row { display: grid; grid-template-columns: minmax(0, 11rem) 1fr; gap: 2px 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.chart-row .bar { grid-column: 2; margin: 0; }
.chart-name { grid-row: span 2; font-size: 0.95rem; }
.chart-row.strong .chart-name { font-weight: 700; }
.chart-level { grid-column: 2; font-size: 0.85rem; color: var(--muted); }
