:root {
  color-scheme: light;
  --bg: #f3f5f6;
  --surface: #ffffff;
  --text: #15232b;
  --muted: #5a6b74;
  --line: #d5dde1;
  --accent: #0f5e6e;
  --late: #8f1d1d;
  --dev-bg: #e4eef0;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #101618;
    --surface: #182125;
    --text: #e7eef1;
    --muted: #9aabb3;
    --line: #2c3a40;
    --accent: #6cb8c6;
    --late: #f0a0a0;
    --dev-bg: #1a3036;
  }
}

* { box-sizing: border-box; }

html { font-size: 112.5%; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  line-height: 1.5;
}

main {
  width: min(100%, 28rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem 1.25rem 1.35rem;
}

p.kicker {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

h1 {
  margin: 0.2rem 0 0.6rem;
  font-family: Newsreader, "Times New Roman", serif;
  font-size: 2.4rem;
  font-weight: 600;
  line-height: 1.1;
}

.help { margin: 0 0 1.1rem; color: var(--muted); }

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

input {
  width: 100%;
  margin: 0.35rem 0 0.9rem;
  padding: 0.7rem 0.75rem;
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

input.code {
  font-family: ui-monospace, monospace;
  font-size: 1.6rem;
  letter-spacing: 0.28em;
  text-align: center;
}

button {
  width: 100%;
  min-height: 3rem;
  border: 0;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

button:disabled { opacity: 0.7; cursor: wait; }

button.ghost {
  width: auto;
  min-height: 0;
  margin: -0.35rem 0 0.9rem;
  padding: 0;
  background: transparent;
  color: var(--accent);
}

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

[hidden] { display: none !important; }

.message { min-height: 1.4rem; margin: 0.85rem 0 0; }

.message.error { color: var(--late); }

.dev {
  margin: 0.8rem 0 0;
  padding: 0.75rem 0.8rem;
  border-left: 6px solid var(--accent);
  background: var(--dev-bg);
  border-radius: 8px;
}

.dev strong {
  font-family: ui-monospace, monospace;
  font-size: 1.4rem;
  letter-spacing: 0.18em;
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; }
}
