/* Type-led and plain on purpose: hairlines and spacing carry the structure. The accent comes
   from the brand preset at runtime (--accent / --on-accent) and is only used as a fill. */

:root {
  --bg: #ffffff;
  --ink: #141414;
  --muted: #5c5c5c;
  --line: #d9d9d9;
  --line-strong: #8a8a8a;
  --field: #ffffff;
  --error: #b3261e;
  --accent: #00e2c7;
  --on-accent: #0b1f1c;
  --focus: #1a5fd0;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111111;
    --ink: #f2f2f2;
    --muted: #a8a8a8;
    --line: #333333;
    --line-strong: #6e6e6e;
    --field: #1a1a1a;
    --error: #ff8a80;
    --focus: #8ab4ff;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.55 var(--font);
}

.wrap { width: 100%; max-width: 680px; margin: 0 auto; padding: 0 16px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; padding: 8px 12px; background: var(--bg); color: var(--ink); z-index: 10; }

.top { border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.brand { font-weight: 600; letter-spacing: -0.01em; }

.lang {
  min-height: 44px; padding: 0 4px;
  background: none; border: 0; color: var(--ink);
  font: inherit; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

h1 { font-size: clamp(32px, 6vw, 44px); line-height: 1.1; letter-spacing: -0.02em; margin: 56px 0 12px; }
.intro { color: var(--muted); margin: 0 0 40px; max-width: 54ch; }

.field, fieldset.field { border: 0; border-top: 1px solid var(--line); margin: 0; padding: 24px 0; min-width: 0; }
.field[hidden] { display: none; }

.label, legend.label { display: block; font-weight: 600; margin-bottom: 4px; padding: 0; }
/* A floated legend leaves the fieldset border and flows like the other labels. */
legend.label { float: left; width: 100%; }
fieldset.field > .hint, fieldset.field > .options { clear: both; }
.optional { font-weight: 400; color: var(--muted); }
.hint { display: block; color: var(--muted); font-size: 15px; margin-bottom: 8px; }

input[type="text"], input[type="email"], input[type="url"], textarea, select {
  width: 100%; min-height: 48px; margin-top: 8px; padding: 10px 12px;
  background: var(--field); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 4px;
  font: inherit;
}
textarea { min-height: 132px; resize: vertical; }

.options { display: grid; gap: 8px; margin-top: 10px; }
.option {
  display: flex; align-items: center; gap: 12px;
  min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--line-strong); border-radius: 4px; cursor: pointer;
}
.option input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); flex: none; }
.option:has(input:checked) { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.option:has(input:checked) input { accent-color: var(--on-accent); }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.option input:focus-visible { outline: none; }

.field-error { display: block; color: var(--error); font-size: 15px; margin-top: 8px; }
.invalid input, .invalid textarea, .invalid select, .invalid .option { border-color: var(--error); }

.error-summary { border-left: 4px solid var(--error); padding: 12px 16px; margin-bottom: 24px; }
.error-summary ul { margin: 8px 0 0; padding-left: 20px; }
.error-summary a { color: var(--ink); }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.turnstile { border-top: 1px solid var(--line); padding-top: 24px; min-height: 65px; }

.submit {
  margin: 24px 0 8px; min-height: 52px; padding: 0 28px;
  background: var(--accent); color: var(--on-accent);
  border: 0; border-radius: 4px; font: inherit; font-weight: 600; cursor: pointer;
}
.submit[disabled] { opacity: 0.6; cursor: progress; }

.status { color: var(--muted); min-height: 1.5em; margin: 0 0 80px; }

.done { padding: 8px 0 80px; }
.done h2 { font-size: 28px; letter-spacing: -0.01em; margin: 0 0 8px; }

@media (prefers-reduced-motion: no-preference) {
  .option { transition: background-color 120ms ease, color 120ms ease; }
}
