@import url("/static/altcha.css");

:root {
  color-scheme: light dark;
  --bg: #fdfdfc;
  --fg: #1d1d1b;
  --muted: #5c5c57;
  --border: #8a8a84;
  --accent: #1f5fae;
  --error: #b3261e;
  --error-bg: #fcebea;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161615;
    --fg: #ecebe6;
    --muted: #b0afa8;
    --border: #77766f;
    --accent: #8ab4f8;
    --error: #f2b8b5;
    --error-bg: #3b1d1b;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1rem/1.5 system-ui, -apple-system, "Segoe UI", sans-serif;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

h1 { font-size: 1.6rem; line-height: 1.25; }

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

.field { margin: 1.25rem 0; }

label { display: block; font-weight: 600; }

.hint { margin: 0.15rem 0 0.35rem; color: var(--muted); font-size: 0.9rem; }

input[type="text"], input[type="email"], textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
}

textarea { resize: vertical; }

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

.has-error input, .has-error textarea { border: 2px solid var(--error); }

.error { margin: 0.25rem 0; color: var(--error); font-weight: 600; }

.error-summary {
  border: 2px solid var(--error);
  background: var(--error-bg);
  border-radius: 4px;
  padding: 0.5rem 1rem;
}

.error-summary h2 { font-size: 1.1rem; margin: 0.5rem 0; }

button {
  padding: 0.6rem 1.4rem;
  border: 0;
  border-radius: 4px;
  background: var(--accent);
  color: var(--bg);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.reference { font-family: ui-monospace, monospace; font-size: 1.2rem; letter-spacing: 0.05em; }

.visually-hidden, .hp {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.hp { left: -10000px; }
