:root {
  --bg: #fbfaf8;
  --surface: #ffffff;
  --text: #1d1b18;
  --text-2: #4f4b45;
  --text-3: #6b665e;
  --border: #d5d0c7;
  --accent: #2c6a53;
  --on-accent: #ffffff;
  --ink: #1d1b18;
  --on-ink: #ffffff;
  --danger: #b42318;
  --danger-soft: #fdecea;
  --shadow: 0 1px 2px rgb(29 27 24 / 0.04), 0 16px 48px -20px rgb(29 27 24 / 0.22);
  color-scheme: light dark;
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI Variable Text", "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1a18;
    --surface: #242320;
    --text: #eeece8;
    --text-2: #cdc8c0;
    --text-3: #a39d94;
    --border: #47443e;
    --accent: #84c9ad;
    --on-accent: #10221b;
    --ink: #eeece8;
    --on-ink: #1b1a18;
    --danger: #f2a197;
    --danger-soft: #3a2421;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 16px 48px -20px rgb(0 0 0 / 0.7);
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  padding: calc(48px + env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px))
    calc(24px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px));
}

/* Phone: no card chrome, just the form. */
.card {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 24px;
  border-radius: 13px;
  background: var(--accent);
  color: var(--on-accent);
}

h1 {
  margin: 0;
  font-family: ui-serif, "New York", "Iowan Old Style", "Apple Garamond", Georgia, Cambria, serif;
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.lead {
  margin: 8px 0 28px;
  color: var(--text-2);
  font-size: 1.0625rem;
}

form {
  display: grid;
  gap: 8px;
}

label {
  font-size: 0.9375rem;
  font-weight: 500;
}

label:not(:first-of-type) {
  margin-top: 10px;
}

input {
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

button {
  min-height: 50px;
  margin-top: 20px;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: var(--on-ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
  transition: opacity 0.15s, transform 0.15s;
}

button:hover {
  opacity: 0.9;
}

button:active {
  transform: scale(0.985);
}

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

.error {
  margin: 0 0 20px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.9375rem;
}

.error[hidden] {
  display: none;
}

@media (min-width: 640px) {
  body {
    display: grid;
    place-items: center;
    padding-top: 24px;
  }

  .card {
    padding: 40px;
    border: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
    border-radius: 24px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
}
