:root {
  color-scheme: light dark;
  --accent: #2563eb;
  --bg: #f4f5f7;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --muted: #666;
  --border: #d8dbe0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 1.5rem;
}

.card {
  width: 100%;
  max-width: 480px;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

h1 {
  margin: 0 0 0.25rem;
  font-size: 1.5rem;
}

.subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  display: block;
}

input, textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  background: var(--card-bg);
  color: var(--text);
}

input:focus, textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem;
}

textarea { resize: vertical; }

.terms-link {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.terms-link a {
  color: var(--accent);
}

.terms-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.terms-check input[type="checkbox"] {
  width: auto;
  margin-top: 0.2rem;
}

.terms-check label {
  font-weight: 400;
  font-size: 0.85rem;
  margin-bottom: 0;
}

.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

button {
  margin-top: 0.5rem;
  padding: 0.75rem;
  border: none;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover { opacity: 0.92; }
button:disabled { opacity: 0.6; cursor: not-allowed; }

#form-message {
  min-height: 1.2em;
  font-size: 0.9rem;
  margin: 0.25rem 0 0;
}

#form-message.success { color: #16a34a; }
#form-message.error { color: #dc2626; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14151a;
    --card-bg: #1e1f26;
    --text: #eaeaea;
    --muted: #999;
    --border: #33343d;
  }
}
