/* Forms. .hf holds the field styles both forms share (the volunteer panel and /register);
   .vf is the volunteer dialog itself. Colours come from tokens.css, so forms follow light and dark mode
   like the light sections. */

/* Shared fields */
.hf { color: var(--text); font-size: 1.05rem; line-height: 1.55; }
.hf fieldset { margin: 0 0 1.6rem; padding: 0; border: 0; min-width: 0; }
.hf legend { margin-bottom: 0.8rem; padding: 0; font-weight: var(--weight-strong); font-size: 1.1rem; }
.hf .hf-sublegend { margin-bottom: 0.3rem; font-size: 1rem; font-weight: 600; }
.hf-req { margin: 0 0 1.2rem; color: var(--muted); font-size: 0.95rem; }
.hf-row { display: grid; gap: 0 0.9rem; }
.hf-f { margin-bottom: 1rem; }
.hf label { display: block; margin-bottom: 0.3rem; font-weight: 600; }
.hf-opt { font-weight: 400; color: var(--muted); }
.hf-hint { margin: -0.1rem 0 0.4rem; font-size: 0.92rem; color: var(--muted); }

.hf input[type="text"], .hf input[type="email"], .hf input[type="tel"], .hf select, .hf textarea {
  width: 100%; min-height: 48px; padding: 0.65rem 0.9rem; border: 2px solid var(--line); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; }
.hf textarea { min-height: 6.5rem; resize: vertical; }
.hf input::placeholder { color: var(--muted); opacity: 1; }
.hf input:focus-visible, .hf select:focus-visible, .hf textarea:focus-visible { border-color: var(--accent); }
.hf [aria-invalid="true"] { border-color: var(--error); }
.hf-err { margin: 0.3rem 0 0; color: var(--error); font-size: 0.92rem; font-weight: var(--weight-strong); }

.hf-social-row { display: grid; grid-template-columns: 6.5rem 1fr; gap: 0.6rem; align-items: center; margin-top: 0.6rem; }
.hf-social-row label { margin: 0; font-weight: 400; color: var(--muted); }

/* Radio and checkbox cards: the whole card is the target */
.hf-choices { display: grid; gap: 0.6rem; }
.hf label.hf-choice { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; align-items: start; min-height: 44px; margin: 0; padding: 0.85rem 1rem; border: 2px solid var(--line); border-radius: 14px; background: var(--card); cursor: pointer; font-weight: 400; }
.hf-choice input, .hf-check input { width: 1.25rem; height: 1.25rem; margin-top: 0.2rem; accent-color: var(--forest); }
.hf-choice b { display: block; }
.hf-choice span span { color: var(--muted); font-size: 0.95rem; }
.hf-choice:has(input:checked) { border-color: var(--accent); background: var(--panel); }
.hf-choice:has(input:disabled) { opacity: 0.45; cursor: not-allowed; }
.hf-choices:has([aria-invalid="true"]) .hf-choice { border-color: var(--error); }
.hf label.hf-check { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; align-items: start; min-height: 44px; font-weight: 400; cursor: pointer; }

/* Honeypot: off screen and out of the tab order. People never see it; the server rejects any send that fills it. */
.hf-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.hf-fail { margin: 0 0 1rem; padding: 0.8rem 1rem; border: 2px solid var(--error); border-radius: 12px; color: var(--text); font-weight: 600; }
.hf-fail a, .hf-done a { color: var(--accent); font-weight: var(--weight-strong); }
.hf-submit { width: 100%; min-height: 3.3rem; margin-top: 0.4rem; border: 0; border-radius: 999px; background: var(--glow); color: var(--night-2); font: inherit; font-weight: var(--weight-strong); font-size: 1.1rem; cursor: pointer; }
.hf-submit:hover { background: var(--leaf); }
.hf-submit:disabled { cursor: progress; }

.hf-tick { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--glow); color: var(--night-2); }
.hf-tick svg { width: 30px; height: 30px; stroke-width: 3; }
.hf-done h2, .hf-done h3 { margin: 0.8rem 0; font-weight: var(--weight-display); font-size: 1.8rem; line-height: 1.05; }
.hf-done p { margin: 0 0 0.8rem; }
.hf-done ol { margin: 1rem 0 1.6rem; padding-left: 1.2rem; }
.hf-done li { margin-bottom: 0.5rem; }
.hf-back { min-height: 48px; margin-top: 0.6rem; padding: 0.6rem 1.4rem; border: 2px solid currentColor; border-radius: 999px; background: transparent; color: inherit; font: inherit; font-weight: var(--weight-strong); cursor: pointer; }

/* Volunteer dialog: a side panel on wider screens, full screen under 560 px */
html.hf-open { overflow: hidden; }
.vf { width: min(560px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; padding: 0; border: 0; background: var(--bg); }
.vf::backdrop { background: rgba(6, 20, 10, 0.6); }
.vf[open] { animation: vfIn 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes vfIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
.hf-inner { display: flex; flex-direction: column; height: 100%; }
.hf-top { position: relative; padding: 1.4rem 1.5rem 1.5rem; background: var(--forest); color: var(--cream); }
.hf-top h2 { margin: 0 3.5rem 0.5rem 0; font-weight: var(--weight-display); font-size: 1.7rem; line-height: 1.05; letter-spacing: -0.01em; }
.hf-top p { margin: 0; font-size: 1rem; }
.hf-close { position: absolute; top: 1rem; right: 1rem; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1.5px solid rgba(236, 228, 214, 0.5); background: transparent; color: var(--cream); cursor: pointer; }
.hf-close svg { width: 20px; height: 20px; stroke-width: 2.2; }
.hf-close:hover { background: rgba(236, 228, 214, 0.12); }
.hf-close:focus-visible { outline-color: var(--glow); }
.vf .hf-form, .vf .hf-done { flex: 1; overflow-y: auto; padding: 1.4rem 1.5rem 2rem; }

@media (min-width: 521px) {
  .hf-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .vf { width: 100vw; }
}
@media (prefers-reduced-motion: reduce) {
  .vf[open] { animation: none; }
}

/* The line pointing at the privacy notice, under both forms (DECISIONS.md round 13). */
.hf-privacy { margin: 0.2rem 0 1.2rem; color: var(--muted); font-size: 0.95rem; }
.hf-privacy a { color: var(--accent); }
