/* Shared floor. Each design sets --bg, --ink, --soft, --accent, --accent-ink, --line, --field, --focus. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-size: 18px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
iconify-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -.125em; }
.w { display: inline-block; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 12px; top: -80px; z-index: 300; background: var(--ink); color: var(--bg); padding: 12px 18px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--focus, var(--accent)); outline-offset: 3px; }
html.motion [data-intro] { opacity: 0; }

/* Forms */
.f { display: grid; gap: 8px; margin: 0 0 18px; min-width: 0; border: 0; padding: 0; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.f label, .f legend { font-weight: 700; font-size: 15px; }
.f .opt { font-weight: 400; color: var(--soft); }
.f input, .f textarea, .f select {
  width: 100%; min-height: 50px; padding: 12px 14px; font: 500 17px/1.4 inherit; font-family: inherit; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--line); border-radius: var(--radius, 10px);
  transition: border-color .15s, box-shadow .15s;
}
.f textarea { min-height: 96px; resize: vertical; }
.f input:hover, .f textarea:hover { border-color: var(--soft); }
.f input:focus-visible, .f textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--focus, var(--accent)); }
.f .is-invalid { border-color: var(--bad, #B3261E); }
.f-err { color: var(--bad, #B3261E); font-size: 15px; font-weight: 600; }
.f-err:empty, .f-msg:empty { display: none; }
.f-msg { font-size: 15px; font-weight: 600; }
.f-msg.is-ok { color: var(--ok, #2F6B3A); }
.f-msg.is-busy, .f-msg.is-bad { color: var(--bad, #B3261E); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--line); border-radius: 999px; font-weight: 600; font-size: 15px; background: var(--field); transition: background-color .15s, color .15s, border-color .15s; }
.chip input:checked + span { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 3px solid var(--focus, var(--accent)); outline-offset: 2px; }
.done { position: absolute; inset: 0; z-index: 3; display: grid; align-content: center; gap: 12px; padding: clamp(24px, 4vw, 48px); background: var(--done-bg, var(--field)); border-radius: inherit; }
.done[hidden] { display: none; }
.linkbtn { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; font-weight: 700; }

@media (max-width: 640px) { .f-row { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
