@font-face { font-family: "Plus Jakarta Sans"; font-weight: 400; font-display: swap; src: url("../fonts/PlusJakartaSans-Regular.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 500; font-display: swap; src: url("../fonts/PlusJakartaSans-Medium.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 600; font-display: swap; src: url("../fonts/PlusJakartaSans-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 700; font-display: swap; src: url("../fonts/PlusJakartaSans-Bold.woff2") format("woff2"); }
@font-face { font-family: "Plus Jakarta Sans"; font-weight: 800; font-display: swap; src: url("../fonts/PlusJakartaSans-ExtraBold.woff2") format("woff2"); }

:root {
  --bg: #f7f7f9; --card: #ffffff; --ink: #1c1c21; --muted: #62626c; --line: #e4e4ea;
  --orange: #e2763a; --orange-ink: #b8541c; --orange-soft: #fdeee4; --green: #1a7f45; --green-soft: #e3f4ea; --red: #b3261e; --red-soft: #fbe9e7;
  --shadow: 0 4px 12px -6px rgba(28, 28, 33, .08); --glow: 0 10px 24px -12px rgba(226, 118, 58, .6);
  --ease: cubic-bezier(.23, 1, .32, 1); --sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 40px); --r: 16px; color-scheme: light;
}
/* Dark applies when chosen (data-theme="dark") or when the device prefers it and nothing was chosen (data-theme absent or "auto"). The two blocks must stay identical. */
:root[data-theme="dark"] { --bg: #131316; --card: #1c1c21; --ink: #f2f2f5; --muted: #a2a2ad; --line: #2e2e36;
  --orange: #f08a4e; --orange-ink: #f59a5b; --orange-soft: #3a2619; --green: #4fc98a; --green-soft: #17301f; --red: #ff8a80; --red-soft: #3a1c1a;
  --shadow: 0 4px 12px -6px rgba(0, 0, 0, .5); color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) { --bg: #131316; --card: #1c1c21; --ink: #f2f2f5; --muted: #a2a2ad; --line: #2e2e36;
    --orange: #f08a4e; --orange-ink: #f59a5b; --orange-soft: #3a2619; --green: #4fc98a; --green-soft: #17301f; --red: #ff8a80; --red-soft: #3a1c1a;
    --shadow: 0 4px 12px -6px rgba(0, 0, 0, .5); color-scheme: dark; }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--sans); }
a { color: var(--orange-ink); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
/* Fields and option cards show focus by border colour only: same width, no ring, no shadow. */
input:focus-visible, textarea:focus-visible { outline: none; box-shadow: none; }
.wrap { max-width: 760px; margin: 0 auto; padding: 0 var(--gutter); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.02em; }
.brand img { width: 32px; height: 32px; }
.langs { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.langs a { min-width: 44px; min-height: 36px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.langs a[aria-current="true"] { background: var(--orange); color: #fff; }
h1 { font-size: clamp(26px, 5vw, 36px); line-height: 1.15; letter-spacing: -.025em; margin: 12px 0 8px; font-weight: 800; }
h2 { font-size: 20px; letter-spacing: -.015em; margin: 32px 0 12px; font-weight: 700; }
h3 { font-size: 16px; margin: 0 0 4px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 24px; max-width: 56ch; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
a.card { display: block; color: inherit; text-decoration: none; transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
a.card:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.meta { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin: 8px 14px 0 0; }
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); flex: none; }
.banner { border-radius: 12px; padding: 12px 16px; margin: 16px 0; font-weight: 500; }
.banner.ok { background: var(--green-soft); color: var(--green); }
.banner.wait { background: var(--orange-soft); color: var(--orange-ink); }
.banner.err { background: var(--red-soft); color: var(--red); }
form .field { margin: 14px 0; }
label.lbl, legend { display: block; font-weight: 600; margin-bottom: 8px; padding: 0; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
fieldset.q { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin: 12px 0; }
.opts { display: grid; gap: 0; }
/* Answer choices are list rows: transparent, a thin divider under each, none under the last (same rule as Bergerio's lists). */
.opt { position: relative; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 12px 2px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; cursor: pointer; background: transparent; }
.opts > .opt:last-child { border-bottom: 0; }
.opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.opt .mark { flex: none; width: 22px; height: 22px; border: 2px solid var(--muted); border-radius: 50%; display: grid; place-items: center; transition: all .15s var(--ease); }
.opt.multi .mark { border-radius: 6px; }
.opt .mark::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .15s var(--ease); }
/* a checkbox shows a tick, not a dot */
.opt.multi .mark::after { width: 6px; height: 11px; border-radius: 0; background: transparent; border: solid #fff; border-width: 0 2.5px 2.5px 0; margin-top: -2px; transform: rotate(45deg) scale(0); }
/* A selected row keeps its normal look: only the checkbox or radio fills. */
.opt:has(input:checked) .mark { background: var(--orange); border-color: var(--orange); }
.opt:has(input:checked) .mark::after { transform: scale(1); }
.opt.multi:has(input:checked) .mark::after { transform: rotate(45deg) scale(1); }
.opt:has(input:focus-visible) .mark { border-color: var(--orange); }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
/* the 1 to 5 scale is a segmented control, not a list: it keeps its boxes */
.scale .opt { justify-content: center; padding: 10px 0; font-weight: 700; border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); min-height: 48px; }
.scale .opt .mark { display: none; }
/* the 1 to 5 buttons have no checkbox, so the chosen number is shown by its border and text colour, not a filled row */
.scale .opt:has(input:checked) { border-color: var(--orange); color: var(--orange-ink); }
.scale-ends { display: flex; justify-content: space-between; color: var(--muted); font-size: 13px; margin-top: 6px; }
textarea, input[type="text"], input[type="password"] { width: 100%; font: inherit; color: inherit; background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; min-height: 48px; }
textarea { min-height: 96px; resize: vertical; }
textarea:focus, input[type="text"]:focus, input[type="password"]:focus { outline: none; box-shadow: none; border-color: var(--orange); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border: 0; border-radius: 12px; background: var(--orange); color: #fff; font: 700 16px var(--sans); cursor: pointer; text-decoration: none; box-shadow: var(--glow); transition: transform .15s var(--ease); }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; }
.btn.danger { background: var(--red); box-shadow: none; }
.btn[disabled] { opacity: .6; cursor: wait; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sig { border: 1.5px dashed var(--muted); border-radius: 12px; background: #fff; touch-action: none; width: 100%; height: 180px; display: block; }
.sigrow { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.sigimg { background: #fff; border: 1px solid var(--line); border-radius: 12px; max-width: 320px; width: 100%; padding: 6px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.sp { margin-top: 24px; }
code.link { display: block; word-break: break-all; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
footer { color: var(--muted); font-size: 14px; padding: 48px 0 28px; text-align: center; }
details summary { cursor: pointer; font-weight: 600; min-height: 32px; }
.qlist { padding-left: 20px; margin: 6px 0 0; }
.qlist li { margin: 6px 0; }
.mod { display: flex; align-items: center; gap: 6px; margin: 18px 0 0; font-size: 13px; font-weight: 600; color: var(--muted); }
.mod::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--orange); flex: none; }
.mod + .qlist { margin-top: 4px; }
.qlist .optlist { color: var(--muted); font-size: 14px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
@media print { header.top, footer, .btn, .langs { display: none; } body { background: #fff; color: #000; } .card, fieldset.q { box-shadow: none; break-inside: avoid; } }
/* A legend sits on the fieldset border by default; float it so the question reads inside the card. */
fieldset.q legend { float: left; width: 100%; margin-bottom: 12px; }
fieldset.q legend + * { clear: both; }
.card > h3.sp:first-child { margin-top: 0; }

.codein { font-size: 22px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; text-align: center; }
code.link.msg { white-space: pre-wrap; font-family: inherit; }
code.link.big { font-size: 28px; font-weight: 800; letter-spacing: .15em; text-align: center; }
details > summary h2 { display: inline; margin: 0; font-size: 18px; }
code.link.msg { word-break: normal; overflow-wrap: anywhere; }
details summary + h3.sp { margin-top: 16px; }

/* theme switch: three round buttons next to the language switch */
.tools { display: flex; align-items: center; gap: 8px; }
.themes { display: flex; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.themes a { width: 36px; min-height: 36px; display: grid; place-items: center; border-radius: 999px; color: var(--muted); }
.themes a[aria-current="true"] { background: var(--orange); color: #fff; }
.themes svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* divided lists: one card, rows separated by a divider, nothing coloured */
.rows > details { padding: 14px 0; border-bottom: 1px solid var(--line); }
.rows > details:first-child { padding-top: 0; }
.rows > details:last-child { border-bottom: 0; padding-bottom: 0; }
.facts > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.facts > div:first-child { padding-top: 0; }
.facts > div:last-child { border-bottom: 0; padding-bottom: 0; }
.facts b { font-variant-numeric: tabular-nums; }

.qa { margin-top: 10px; }
.qa > div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.qa > div:last-child { border-bottom: 0; }
.qa p { margin: 2px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; }

/* a card holding divided link rows (profiles, churches) */
.list { padding: 4px 18px; }
.list > a { display: flex; align-items: center; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.list > a:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; display: grid; gap: 4px; }
.list .sub { color: var(--muted); font-size: 14px; line-height: 1.4; }
.list .count { color: var(--muted); font-size: 14px; white-space: nowrap; }
.list > a::after { content: ""; flex: none; width: 8px; height: 8px; border: solid var(--muted); border-width: 2px 2px 0 0; transform: rotate(45deg); margin-right: 2px; }
.list > a:hover strong { color: var(--orange-ink); }

/* Divider rule for every list: a divider under each row, never above the first, never under the last. */
.stack > div { display: grid; gap: 4px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stack > div:first-child { padding-top: 0; }
.stack > div:last-child { border-bottom: 0; padding-bottom: 0; }
.stack > .split { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.stack > .split > .grow { display: grid; gap: 4px; min-width: 0; flex: 1; }
.stack .tag { margin: 0; }
.stack strong { overflow-wrap: anywhere; }

form > .opt { border-bottom: 0; padding-left: 0; }

/* admin: links and collapsed editors */
code.link { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; word-break: normal; }
.rows > details > summary { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; list-style: none; }
.rows > details > summary > .meta { grid-column: 1; font-weight: 400; }
.rows > details > summary::-webkit-details-marker { display: none; }
.rows > details > summary::after { content: ""; grid-column: 2; grid-row: 1 / span 2; justify-self: end; width: 8px; height: 8px; border: solid var(--muted); border-width: 2px 2px 0 0; transform: rotate(135deg); transition: transform .2s var(--ease); }
.rows > details[open] > summary::after { transform: rotate(-45deg); }
.rows > details > .inner, .rows > details > form.inner { padding-top: 14px; }
.rows > details .row { gap: 12px; }

/* home: steps */
.steps .num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--orange); color: #fff; font-weight: 700; font-size: 14px; }
.steps > .split { gap: 14px; justify-content: flex-start; }

/* questionnaire: sticky send bar with progress (separated by a soft shadow, not a divider) */
.sendbar { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 14px; margin: 24px calc(var(--gutter) * -1) 0; padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom)); background: var(--bg); box-shadow: 0 -10px 18px -14px rgba(0, 0, 0, .35); }
.sendbar .grow { flex: 1; min-width: 0; display: grid; gap: 6px; }
.sendbar .btn { flex: none; }
progress { -webkit-appearance: none; appearance: none; width: 100%; height: 6px; border: 0; border-radius: 99px; overflow: hidden; background: var(--line); }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--orange); border-radius: 99px; transition: width .25s var(--ease); }
progress::-moz-progress-bar { background: var(--orange); border-radius: 99px; }

/* two fields side by side on wide screens, stacked on phones */
.row > .field { flex: 1 1 240px; min-width: 0; }
