:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --text: #1a1c20;
  --muted: #555b66;
  --border: #dcdad3;
  --accent: #1f5fbf;
  --accent-text: #ffffff;
  --error: #b3261e;
  --success: #1e6b3a;
  --radius: 10px;
  --wrap: 68rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --surface: #1d2026;
    --text: #eceae4;
    --muted: #a9adb6;
    --border: #33373f;
    --accent: #7fb0ff;
    --accent-text: #0d1320;
    --error: #ff8a80;
    --success: #7ed49b;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -0.02em; max-width: 20ch; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 1rem; }
.narrow { max-width: 40rem; }
.muted { color: var(--muted); font-size: 0.95rem; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--surface); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 0.5rem; }

/* Header */
.site-header { border-bottom: 1px solid var(--border); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.5rem; padding-block: 1rem; }
.brand { color: var(--text); display: inline-flex; }
.wordmark { height: 28px; width: auto; }
.wm-hole { stroke: var(--bg); }
nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; margin: 0; padding: 0; }
nav a { color: var(--text); text-decoration: none; }
nav a:hover { text-decoration: underline; }

/* Sections */
section { padding-block: clamp(3rem, 8vw, 5rem); }
section + section { border-top: 1px solid var(--border); }
.hero { padding-block: clamp(4rem, 12vw, 7rem); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46ch; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: var(--radius);
  padding: 0.75rem 1.25rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { filter: brightness(1.08); }
.button[disabled] { opacity: 0.6; cursor: progress; }

.cards, .steps, .links { list-style: none; margin: 0; padding: 0; }
.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.card { display: flex; flex-direction: column; }
.card p { margin: 0; color: var(--muted); }
.card .more { margin-top: auto; padding-top: 0.9rem; }
.card .more a { font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.button.secondary { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 2px var(--accent); }
.register { margin: 1.5rem 0 0; }
.prose { max-width: 70ch; }
code { font-size: 0.92em; overflow-wrap: anywhere; }

.steps { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); counter-reset: step; }
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: inline-grid; place-items: center;
  width: 2rem; height: 2rem; margin-bottom: 0.75rem;
  border-radius: 50%; border: 2px solid var(--accent); color: var(--accent); font-weight: 700;
}
.steps p { color: var(--muted); margin: 0; }

.links li { margin-bottom: 0.5rem; }
.links a { font-weight: 600; overflow-wrap: anywhere; }

/* Form */
.field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 600; margin-bottom: 0.3rem; }
input, textarea {
  width: 100%;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--muted);
  border-radius: var(--radius);
  padding: 0.65rem 0.75rem;
}
textarea { resize: vertical; }
[aria-invalid="true"] { border-color: var(--error); border-width: 2px; }
.error { color: var(--error); font-size: 0.95rem; margin: 0.3rem 0 0; }
.status { margin-top: 1rem; font-weight: 600; }
.status.ok { color: var(--success); }
.status.fail { color: var(--error); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 2rem; }
.site-footer p { margin: 0 0 0.4rem; }

.hero-media { margin: 1.5rem 0 0.5rem; max-width: 960px; }
.hero-media video { width: 100%; height: auto; border-radius: var(--radius); display: block; background: var(--surface); }
.hero-media figcaption { font-size: 0.9rem; margin-top: 0.4rem; }
.byline { font-size: 0.9rem; color: var(--muted); max-width: 70ch; }
.paper { font-size: 0.85rem; margin: -0.3rem 0 0.6rem; }
.legal h2 { font-size: 1.15rem; margin-top: 1.5rem; }
