:root {
  color-scheme: dark;
  --bg: #0d1413;
  --panel: #141d1c;
  --text: #eaf4f2;
  --muted: #a7bdb8;
  --accent: #23c4b0;
  --accent-ink: #03211d;
  --border: #2f4a45;
  --error: #ff9b9b;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --bg: #f5faf8;
    --panel: #ffffff;
    --text: #0e1f1c;
    --muted: #48625c;
    --accent: #0b7a6f;
    --accent-ink: #ffffff;
    --border: #bad1cc;
    --error: #a41d1d;
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

main {
  max-width: 30rem;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

h1 {
  font-size: 1.75rem;
  line-height: 1.2;
  margin: 0 0 12px;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin: 0 0 8px;
}

p {
  margin: 0 0 16px;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

form {
  margin-top: 24px;
}

.field {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

input[type="email"],
input[type="text"] {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
}

input[type="email"]:hover,
input[type="text"]:hover {
  border-color: var(--muted);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 4px 0 20px;
  padding: 8px 0;
}

.consent input[type="checkbox"] {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.consent label {
  display: inline;
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}

.consent-text {
  flex: 1 1 auto;
}

.consent-text a {
  line-height: 1.5;
}

button[type="submit"] {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 16px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

button[type="submit"]:hover:not(:disabled) {
  filter: brightness(1.06);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: progress;
}

.status {
  min-height: 1.6em;
  margin: 12px 0 0;
  font-size: 0.95rem;
}

.status[data-state="error"] {
  color: var(--error);
}

.status[data-state="ok"] {
  color: var(--accent);
}

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

#privacy {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

#privacy p {
  color: var(--muted);
}

footer {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

footer p {
  margin: 0 0 8px;
}

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

[hidden] {
  display: none !important;
}

@media (prefers-reduced-motion: no-preference) {
  button[type="submit"] {
    transition: filter 120ms ease, opacity 120ms ease;
  }
}
