/* Ringside Media — site styles (v2, dark).
 * Mobile-first, no framework. Dark-only theme, one accent hue (emerald, the buyer corner of the mark).
 * Every text and UI pairing below was checked for WCAG AA on the surfaces it sits on (see README). */

:root {
  color-scheme: dark;

  --bg: #0C0E18;            /* hsl(230 35% 7%)  page */
  --bg-deep: #080A11;       /* footer */
  --card: #121421;          /* hsl(230 30% 10%) cards, alt bands */
  --card-2: #181B2A;        /* cards sitting on an alt band */
  --input: #151828;         /* form controls */
  --line: #222639;          /* hsl(230 25% 18%) decorative borders */
  --line-2: #2E3450;        /* slightly stronger decorative borders */
  --control: #66728E;       /* control borders, >= 3:1 on --input and --card */

  --text: #F8FAFC;          /* hsl(210 40% 98%) */
  --muted: #94A3B8;         /* hsl(215 20% 65%), 6.6:1+ on every surface */

  --accent: #34D399;        /* emerald: 8.9:1+ as text on every surface */
  --accent-hover: #6EE7B7;
  --accent-ink: #0C0E18;    /* text on accent fills (10:1) */
  --accent-tint: rgba(52, 211, 153, .12);
  --accent-line: rgba(52, 211, 153, .45);

  --error: #F87171;         /* 6.4:1+ on every surface */
  --error-tint: rgba(248, 113, 113, .12);
  --draft-bg: #33270A;
  --draft-text: #FCD34D;    /* 10:1 on --draft-bg */

  --radius: 8px;
  --radius-pill: 999px;
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 12px 32px rgba(0, 0, 0, .35);

  --font-head: "Space Grotesk", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --wrap: 1160px;
  --gutter: 16px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; background: var(--bg); }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-body);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 .5em;
  font-weight: 600;
  color: var(--text);
}
h1 { font-size: clamp(2.2rem, 5.4vw + .5rem, 4rem); font-weight: 700; }
h2 { font-size: clamp(1.65rem, 2.6vw + .8rem, 2.6rem); font-weight: 700; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li + li { margin-top: .35em; }
strong { font-weight: 600; color: var(--text); }

a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.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;
}

.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 14px; border-radius: var(--radius); font-weight: 600;
}
.skip:focus { top: 8px; color: var(--accent-ink); }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(12, 14, 24, .94);
  border-bottom: 1px solid var(--line);
}
@supports (backdrop-filter: blur(8px)) {
  .site-header { background: rgba(12, 14, 24, .8); backdrop-filter: blur(12px); }
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; padding: 6px 0; }
.brand:hover { color: var(--text); }
.brand-mark { width: 28px; height: 28px; flex: none; }
.brand-mark path { fill: none; stroke: currentColor; stroke-width: 4; stroke-linecap: square; }
.brand-mark .mark-accent { stroke: var(--accent); }
.brand-word { font-family: var(--font-head); font-weight: 700; font-size: 1.08rem; letter-spacing: .08em; text-transform: uppercase; line-height: 1; }
.brand-word span { font-weight: 500; color: var(--muted); margin-left: .35em; }

.nav-toggle {
  display: none;
  font: 500 .9rem/1 var(--font-mono);
  letter-spacing: .06em; text-transform: uppercase;
  color: var(--text); background: var(--card);
  border: 1px solid var(--control); border-radius: var(--radius);
  padding: 10px 14px; min-height: 44px; cursor: pointer;
}

.site-nav ul { display: flex; flex-wrap: wrap; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav li + li { margin-top: 0; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px;
  border-radius: var(--radius); color: var(--muted); text-decoration: none; font-weight: 500; font-size: .96rem;
}
.site-nav a:hover { color: var(--text); background: var(--card); }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-tint); }

@media (max-width: 859px) {
  .js .nav-toggle { display: inline-flex; align-items: center; }
  .js .site-nav { display: none; width: 100%; padding: 4px 0 14px; }
  .js .site-nav.is-open { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 2px; }
  .js .site-nav a { width: 100%; font-size: 1.05rem; color: var(--text); }
  .js .site-nav a[aria-current="page"] { color: var(--accent); }
}
@media (min-width: 860px) { .header-inner { flex-wrap: nowrap; min-height: 72px; } }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 12px 22px;
  border-radius: var(--radius); border: 1.5px solid transparent;
  font: 600 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn--ghost { background: transparent; color: var(--text); border-color: var(--muted); }
.btn--ghost:hover { background: var(--card-2); color: var(--text); border-color: var(--text); }
.btn-arrow::after { content: "\2192"; font-weight: 500; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

/* ---------- Type helpers ---------- */

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 .78rem/1.3 var(--font-mono);
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 16px;
}
.eyebrow::before {
  content: ""; width: 11px; height: 11px; flex: none;
  border-top: 2.5px solid currentColor; border-left: 2.5px solid currentColor;
}

.lead { font-size: clamp(1.06rem, .5vw + .95rem, 1.25rem); color: var(--muted); max-width: 44rem; }

.tag {
  display: inline-block;
  font: 500 .72rem/1.2 var(--font-mono);
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-line);
  background: var(--accent-tint);
  border-radius: 4px; padding: 4px 8px; margin: 0 0 12px;
}
.tag--plain { color: var(--muted); border-color: var(--line-2); background: transparent; }

/* ---------- Bands ---------- */

.on-dark { color: var(--text); }

.hero, .page-hero {
  position: relative; overflow: hidden;
  background-color: var(--bg);
  background-image:
    radial-gradient(60rem 30rem at 85% -10%, rgba(52, 211, 153, .10), transparent 60%),
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: auto, 56px 56px, 56px 56px;
  background-position: 0 0, -1px -1px, -1px -1px;
  border-bottom: 1px solid var(--line);
}
.hero::before, .page-hero::before {
  /* fade the grid out toward the bottom so text stays calm */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12, 14, 24, .55) 0%, var(--bg) 92%);
  pointer-events: none;
}
.hero > .wrap, .page-hero > .wrap { position: relative; z-index: 1; }

.hero { padding: 56px 0 56px; }
.hero h1 { max-width: 15ch; }
.hero .lead { max-width: 38rem; }
@media (min-width: 960px) { .hero { padding: 104px 0 96px; } }

.page-hero { padding: 48px 0 52px; }
.page-hero h1 { font-size: clamp(2rem, 4.2vw + .6rem, 3.3rem); max-width: 20ch; }
@media (min-width: 960px) { .page-hero { padding: 80px 0 80px; } }

.pills { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills li { margin: 0; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px;
  padding: 8px 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--line-2); background: #121421;
  color: var(--text); text-decoration: none;
  font: 500 .86rem/1.2 var(--font-mono); letter-spacing: .02em;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.pill:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.pills-label { font: 500 .74rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 28px 0 0; }
.pills-label + .pills { margin-top: 10px; }

.section { padding: 64px 0; }
.section--surface { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 48rem; margin-bottom: 32px; }
.section-head p { color: var(--muted); font-size: 1.06rem; }
.section-head p:last-child { margin-bottom: 0; }
@media (min-width: 960px) { .section { padding: 96px 0; } .section-head { margin-bottom: 44px; } }

.grid { display: grid; gap: 16px; }
@media (min-width: 680px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1000px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.grid--gap-lg { gap: 20px; }

/* ---------- Cards ---------- */

.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 20px;
  box-shadow: var(--shadow);
}
.card::before {
  /* corner bracket motif */
  content: ""; position: absolute; top: -1px; left: -1px;
  width: 22px; height: 22px;
  border-top: 2px solid var(--accent); border-left: 2px solid var(--accent);
  border-top-left-radius: var(--radius); pointer-events: none;
}
.card h3, .card h4 { margin-bottom: .45em; }
.card p:last-child, .card ul:last-child, .card ol:last-child { margin-bottom: 0; }
.section--surface .card { background: var(--card-2); }
.card-kicker { font: 500 .74rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.card-cta { margin: 16px 0 0; font-weight: 600; }
.card-cta a { text-decoration: none; }
.card-cta a::after { content: " \2192"; }
.card-cta a:hover { text-decoration: underline; }
.card--flex { display: flex; flex-direction: column; }
.card--flex .card-cta { margin-top: auto; padding-top: 16px; }

.side-panel { padding: 26px 22px; }
.side-panel h3 { font-size: 1.35rem; }
.side-panel .more { margin-top: 18px; font-weight: 600; }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; }
.checklist li { position: relative; padding-left: 28px; color: var(--muted); }
.checklist li strong { color: var(--text); }
.checklist li + li { margin-top: .6em; }
.checklist li::before {
  content: ""; position: absolute; left: 3px; top: .5em;
  width: 12px; height: 7px;
  border-left: 2.5px solid var(--accent); border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg);
}
.checklist--bright li { color: var(--text); }

/* Steps */
.steps-wrap { display: grid; gap: 28px; }
@media (min-width: 900px) { .steps-wrap { grid-template-columns: 1fr 1fr; gap: 32px; } }
.steps-col h3 { font-size: 1.3rem; margin-bottom: 16px; }
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 12px; }
.steps > li {
  margin: 0; counter-increment: step; position: relative;
  padding: 18px 18px 18px 70px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.section--surface .steps > li { background: var(--card-2); }
.steps > li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 18px; top: 18px;
  font: 600 1.15rem/1 var(--font-mono); color: var(--accent);
}
.steps h3, .steps h4 { font-size: 1.05rem; margin: 0 0 .3em; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; }
.steps p { margin: 0; color: var(--muted); }
@media (min-width: 860px) { .steps--row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Chips (non-link labels) */
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { margin: 0; padding: 8px 14px; border-radius: var(--radius-pill); background: var(--card-2); border: 1px solid var(--line-2); font: 500 .88rem/1.2 var(--font-mono); }

/* Notices */
.notice {
  border: 1px solid var(--accent-line); border-left: 4px solid var(--accent);
  background: #142A2C; color: var(--text);
  border-radius: var(--radius); padding: 14px 16px; margin: 0 0 1.2em;
}
.notice p { margin: 0; }
.notice p + p { margin-top: .5em; }
.notice strong { color: var(--accent); }
.notice--plain { background: var(--card-2); border-color: var(--line-2); border-left-color: var(--control); }
.notice--plain strong { color: var(--text); }
.notice--spaced { margin-top: 22px; }

/* Split two-column text blocks */
.split { display: grid; gap: 28px; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }
.split .muted { font-size: 1.06rem; }
.req-group h3 { font-size: 1.1rem; }

/* ---------- Home: live routing sample ---------- */

.punch { display: grid; gap: 36px; align-items: center; }
@media (min-width: 960px) { .punch { grid-template-columns: 1fr 1fr; gap: 64px; } }
.punch h2 { max-width: 16ch; }

.live-card {
  margin: 0;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(52, 211, 153, .08);
  overflow: hidden;
}
.live-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font: 500 .76rem/1.2 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .55); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.live-badge {
  margin-left: auto; color: var(--draft-text); background: var(--draft-bg);
  border: 1px solid #5C4710; border-radius: 4px; padding: 3px 7px; letter-spacing: .1em;
}
.live-call { display: flex; align-items: center; gap: 14px; padding: 18px 16px; border-bottom: 1px solid var(--line); }
.live-icon {
  width: 44px; height: 44px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: #142A2C; border: 1px solid var(--accent-line); color: var(--accent);
}
.live-icon svg { width: 20px; height: 20px; }
.live-meta { flex: 1; min-width: 0; }
.live-kicker { margin: 0; font: 500 .74rem/1.3 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.live-title { margin: 2px 0 0; font: 600 1.2rem/1.25 var(--font-head); color: var(--text); }
.live-timer { margin: 0; font: 600 1.25rem/1 var(--font-mono); color: var(--accent); }
.live-steps { list-style: none; margin: 0; padding: 14px 16px; display: grid; gap: 10px; }
.live-steps li { margin: 0; display: flex; gap: 10px; align-items: baseline; font-size: .95rem; color: var(--text); }
.live-steps li::before {
  content: ""; flex: none; width: 10px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg) translateY(-2px);
}
.live-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px;
  padding: 14px 16px; border-top: 1px solid var(--line); background: var(--card-2);
}
.live-status {
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 .86rem/1.2 var(--font-mono); letter-spacing: .04em;
  color: var(--accent-ink); background: var(--accent); border-radius: 4px; padding: 7px 10px; margin: 0;
}
.live-route { font: 500 .86rem/1.3 var(--font-mono); color: var(--text); margin: 0; }
.live-card figcaption { padding: 0 16px 14px; font-size: .84rem; color: var(--muted); background: var(--card-2); }

/* ---------- Home: grouped card rows ---------- */

.group-label { font: 500 .78rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 14px; }
.grid + .group-label { margin-top: 40px; }
.punch .steps { margin: 22px 0 0; }

/* ---------- Why / standards ---------- */

.why .card { padding: 24px 22px; }
.why h3 { font-size: 1.25rem; }
.why-num { font: 600 .8rem/1 var(--font-mono); color: var(--muted); letter-spacing: .1em; margin: 0 0 14px; display: block; }

.std-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
@media (min-width: 680px) { .std-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .std-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.std-list li { margin: 0; background: var(--card); padding: 20px 20px 22px; }
.section--surface .std-list li { background: var(--card-2); }
.std-list h3 { font-size: 1.08rem; margin-bottom: .35em; }
.std-list p { margin: 0; color: var(--muted); font-size: .96rem; }

/* ---------- CTA band ---------- */

.cta-band {
  padding: 64px 0;
  background-color: var(--card);
  background-image: radial-gradient(50rem 20rem at 50% 120%, rgba(52, 211, 153, .12), transparent 70%);
  border-top: 1px solid var(--line);
}
.cta-band .wrap { text-align: center; }
.cta-band h2 { margin-left: auto; margin-right: auto; max-width: 20ch; }
.cta-band p { color: var(--muted); max-width: 40rem; margin: 0 auto; font-size: 1.08rem; }
.cta-band .actions { justify-content: center; }
@media (min-width: 960px) { .cta-band { padding: 88px 0; } }

/* ---------- Prose / legal ---------- */

.prose { max-width: 46rem; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose h3 { font-size: 1.12rem; margin-top: 1.4em; }
.prose p, .prose li { color: #CBD5E1; }
.prose li + li { margin-top: .4em; }
.prose .meta { color: var(--muted); font-size: .95rem; }

.draft-banner {
  background: var(--draft-bg); color: var(--draft-text);
  border-bottom: 1px solid #5C4710;
  font: 600 1rem/1.4 var(--font-body);
  text-align: center; padding: 12px var(--gutter); letter-spacing: .02em;
}
.draft-banner span { display: block; font-weight: 500; font-size: .92rem; margin-top: 2px; }

.placeholder { background: var(--draft-bg); color: var(--draft-text); padding: 0 .3em; border-radius: 4px; font-weight: 600; }

/* ---------- Forms ---------- */

.form-shell { display: grid; gap: 28px; }
@media (min-width: 1000px) {
  .form-shell { grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 40px; }
  .form-aside { position: sticky; top: 96px; }
}
.form-aside .card + .card { margin-top: 16px; }
.form-aside ol { color: var(--muted); }

.rs-form {
  background: var(--card); border: 1px solid var(--line-2); border-radius: var(--radius);
  padding: 20px 16px; box-shadow: var(--shadow);
}
.section--surface .rs-form { background: var(--bg); }
@media (min-width: 600px) { .rs-form { padding: 32px 28px; } }

.hp { display: none !important; }
.form-intro { color: var(--muted); margin-bottom: 18px; }
.h-form { font-size: 1.4rem; }
.req-mark { color: var(--error); font-weight: 700; }

.form-section { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-section + .form-section { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.form-section > legend {
  font: 600 1.18rem/1.25 var(--font-head); color: var(--text);
  padding: 0; margin-bottom: 16px; float: left; width: 100%;
}
.form-section > legend + * { clear: both; }

.field { margin: 0 0 18px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field-row { display: grid; gap: 0 18px; }
@media (min-width: 720px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field-row--3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .field-row--3 { grid-template-columns: 1fr 1fr 1fr; } }
.field-row > .field:last-child, .field-row > .group:last-child { margin-bottom: 18px; }
.form-section > .field-row:last-child > .field:last-child { margin-bottom: 0; }

.field > label, .group > legend, .field-label {
  display: block; font-weight: 600; font-size: .97rem; color: var(--text);
  margin-bottom: 6px; padding: 0;
}
.hint { display: block; color: var(--muted); font-size: .9rem; margin: -2px 0 8px; font-weight: 400; }
.optional { color: var(--muted); font-weight: 400; font-size: .88rem; }

input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], select, textarea {
  width: 100%; min-height: 48px; padding: 11px 13px;
  font: 400 1rem/1.4 var(--font-body);   /* 16px avoids iOS zoom */
  color: var(--text); background: var(--input);
  border: 1.5px solid var(--control); border-radius: var(--radius);
  appearance: none; -webkit-appearance: none;
}
textarea { min-height: 112px; resize: vertical; }
select {
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text) 50%), linear-gradient(135deg, var(--text) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px; background-repeat: no-repeat;
}
select option { background: var(--input); color: var(--text); }
input:hover, select:hover, textarea:hover { border-color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(52, 211, 153, .35); }
::placeholder { color: #8391A7; opacity: 1; }

.group { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.group > legend { margin-bottom: 8px; }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 9px 14px;
  border: 1.5px solid var(--line-2); border-radius: var(--radius);
  background: var(--input); color: var(--text);
  cursor: pointer; font-size: .97rem; line-height: 1.3;
}
.choices--stack { flex-direction: column; align-items: stretch; }
.choices--stack .choice { align-items: flex-start; }
.choices--stack .choice input { margin-top: 2px; }
.choice input { width: 18px; height: 18px; margin: 0; flex: none; accent-color: var(--accent); }
.choice:hover { border-color: var(--control); }
.choice:has(input:checked) { border-color: var(--accent); background: #142A2C; }
.choice:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 2px; }

.state-tools { display: none; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.js .state-tools { display: flex; }
.link-btn {
  font: 500 .86rem/1 var(--font-mono); letter-spacing: .04em;
  color: var(--accent); background: #142A2C;
  border: 1px solid var(--accent-line); border-radius: var(--radius);
  padding: 10px 14px; min-height: 40px; cursor: pointer;
}
.link-btn:hover { border-color: var(--accent); }

.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; }
.state {
  display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 6px 8px;
  border: 1.5px solid var(--line-2); border-radius: 6px; background: var(--input); color: var(--text);
  cursor: pointer; font: 500 .88rem/1 var(--font-mono);
}
.state input { width: 16px; height: 16px; margin: 0; flex: none; accent-color: var(--accent); }
.state:hover { border-color: var(--control); }
.state:has(input:checked) { border-color: var(--accent); background: #142A2C; color: var(--text); }
.state:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 1px; }
.state-count { font-size: .9rem; color: var(--muted); margin: 8px 0 0; }

.check-line {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px;
  border: 1.5px solid var(--line-2); border-radius: var(--radius);
  background: var(--input); cursor: pointer;
}
.field > label.check-line { display: flex; padding: 14px; margin-bottom: 0; font-weight: 500; }
.check-line input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.check-line span { font-size: .97rem; }

.form-note { font-size: .92rem; color: var(--muted); margin: 14px 0 0; }
.form-submit { margin-top: 26px; display: grid; gap: 12px; }
@media (min-width: 600px) { .form-submit { display: flex; align-items: center; gap: 18px; } }
.form-submit .form-note { margin: 0; }

/* Errors: red text + red border + tinted fill, so they read on the dark surface */
.field-error { display: none; color: var(--error); font-size: .9rem; font-weight: 600; margin: 6px 0 0; }
.field-error::before { content: "! "; font-family: var(--font-mono); }
.is-invalid > .field-error, .field-error.is-shown { display: block; }
[aria-invalid="true"] { border-color: var(--error) !important; background-color: #1D1724 !important; }
.group.is-invalid .choice, .group.is-invalid .state, .group.is-invalid .check-line,
.field.is-invalid .check-line { border-color: var(--error); }

.form-summary {
  display: none; border: 1.5px solid var(--error); background: #2B1A24; color: var(--error);
  border-radius: var(--radius); padding: 12px 14px; font-weight: 600; margin-top: 18px;
}
.form-summary.is-shown { display: block; }
.reveal[hidden] { display: none; }

/* ---------- Footer ---------- */

.site-footer { padding: 56px 0 32px; font-size: .95rem; background: var(--bg-deep); border-top: 1px solid var(--line); }
.footer-grid { display: grid; gap: 28px 20px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 1.6fr repeat(3, 1fr); }
  .footer-brand { grid-column: auto; }
}
.site-footer .brand { color: var(--text); }
.footer-tagline { color: var(--text); font: 600 1.1rem/1.35 var(--font-head); margin: 16px 0 6px; max-width: 22rem; }
.footer-blurb { color: var(--muted); margin: 0; max-width: 24rem; }
.footer-nav h2 { font: 500 .74rem/1.3 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 6px 0 10px; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; }
.footer-nav li + li { margin-top: 2px; }
.footer-nav a { display: inline-flex; min-height: 40px; align-items: center; color: var(--text); text-decoration: none; }
.footer-nav a:hover { color: var(--accent); text-decoration: underline; }
.footer-legal { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: .88rem; }
.footer-legal p { max-width: 62rem; }
.footer-legal p:last-child { margin-bottom: 0; }

/* ---------- Thanks / 404 ---------- */

.center-card { max-width: 40rem; margin: 0 auto; }
.center-card h1 { font-size: clamp(1.8rem, 3vw + .8rem, 2.6rem); }
.preview-flag {
  display: inline-block; background: var(--draft-bg); color: var(--draft-text);
  font: 500 .86rem/1.4 var(--font-mono); border-radius: 4px; padding: 6px 10px; margin-bottom: 14px;
  border: 1px solid #5C4710;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .site-header, .site-footer, .nav-toggle, .actions, .pills { display: none !important; }
  body, .hero, .page-hero, .section, .card { background: #fff !important; color: #000 !important; }
}

/* ---------- v2 additions ---------- */
h5 { font: 600 1.08rem/1.25 var(--font-head); letter-spacing: -0.01em; margin: 0 0 .45em; color: var(--text); }
.steps h5 { font-family: var(--font-body); font-size: 1.05rem; letter-spacing: 0; margin: 0 0 .3em; }
/* Selectable pills and consent boxes use the 3:1 control border so the whole target reads as a control. */
.choice, .state, .check-line { border-color: var(--control); }
.choice:hover, .state:hover { border-color: var(--muted); }
/* Eyebrows keep their mono/accent style inside blocks that restyle every <p>. */
.section-head .eyebrow, .prose .eyebrow, .cta-band .eyebrow, .center-card .eyebrow, .split .eyebrow {
  color: var(--accent); font: 500 .78rem/1.3 var(--font-mono); letter-spacing: .14em; margin: 0 0 16px; max-width: none;
}
.nowrap { white-space: nowrap; }

/* ---------- Legal page contents list (round 4) ---------- */
.toc { margin: 1.6em 0 0; padding: 18px 22px; background: var(--card); border: 1px solid var(--line-2); border-radius: 12px; }
.toc-title { font: 600 .78rem/1.3 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6em; }
.toc ol { margin: 0; padding-left: 1.3em; }
.toc li + li { margin-top: .3em; }
.prose h2[id], .prose h3[id] { scroll-margin-top: 88px; }
.placeholder-block { display: block; margin: 1em 0 1.4em; padding: 14px 18px; border: 1px dashed #8A6D1E; border-radius: 10px; font-weight: 500; }
.prose .placeholder-block p, .prose .placeholder-block li { color: var(--draft-text); }
.placeholder-block p { margin: 0 0 .5em; }
.placeholder-block ul { margin: 0; padding-left: 1.2em; }
