:root {
  --bg: #f6f1e9;
  --card: #fffdf9;
  --text: #2b2420;
  --muted: #6b605a;
  --accent: #9e1b32;
  --accent-hover: #7f1428;
  --border: #ddd2c4;
  --error-bg: #fbe9ea;
  --error-text: #7f1428;
  --focus: #1f5f45;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17130f;
    --card: #221c17;
    --text: #efe7dc;
    --muted: #b3a79b;
    --accent: #d9485f;
    --accent-hover: #e8687c;
    --border: #3d342c;
    --error-bg: #3a1a1f;
    --error-text: #f3b3bd;
    --focus: #6fc39b;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 1rem 2rem;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.card {
  width: 100%;
  max-width: 34rem;
  padding: 2rem 2rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 6px solid var(--accent);
  border-radius: 10px;
}

.eyebrow {
  margin: 0 0 1.25rem;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }

h1 {
  margin: 0 0 0.75rem;
  font-size: 1.625rem;
  line-height: 1.25;
  text-wrap: balance;
}

p { margin: 0 0 1rem; }
.lead { font-size: 1.0625rem; }
.small, .hint { font-size: 0.875rem; color: var(--muted); }
.hint { margin: 0.375rem 0 0; }

a { color: var(--accent); }
a:hover { color: var(--accent-hover); }

form { margin: 1.5rem 0; }
.field { margin-bottom: 1.25rem; }

label {
  display: block;
  margin-bottom: 0.375rem;
  font-weight: 600;
}

input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}
input.number {
  max-width: 8rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.1em;
}

button {
  padding: 0.6875rem 1.25rem;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}
button:hover { background: var(--accent-hover); }
@media (prefers-color-scheme: dark) {
  button { color: #1a0a0d; }
}

input:focus-visible, button:focus-visible, a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.error {
  padding: 0.75rem 1rem;
  background: var(--error-bg);
  color: var(--error-text);
  border-radius: 6px;
}

/* Honeypot field for bots, hidden from people. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.back { margin-top: 1.5rem; font-size: 0.9375rem; }

footer {
  max-width: 34rem;
  margin-top: 1.5rem;
  padding: 0 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  text-align: center;
}
