:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --accent: #2f5d50;
  --accent-text: #ffffff;
  --error: #b3261e;
  --border: #e3e1dc;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161617;
    --surface: #1f1f21;
    --text: #f2f2f2;
    --muted: #a1a1a6;
    --accent: #7fbfa9;
    --accent-text: #0d1f1a;
    --error: #ff8a80;
    --border: #2f2f33;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

main {
  max-width: 28rem;
  margin: 0 auto;
  padding: 3rem 1rem;
}

h1 { font-size: 2rem; margin: 0 0 0.25rem; }
h2 { font-size: 1.1rem; margin: 2rem 0 0.5rem; }
.lead { color: var(--muted); margin-top: 0; }

button {
  font: inherit;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}
button.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); width: 100%; }
button.link { border: 0; background: none; color: var(--accent); min-height: 0; padding: 0.25rem; }
button:disabled { opacity: 0.5; cursor: default; }
button:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

label { display: block; margin: 0.75rem 0; color: var(--muted); font-size: 0.95rem; }
input {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  font: inherit;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

details { margin-top: 2rem; }
summary { cursor: pointer; color: var(--muted); }

/* Reserve the message line so the layout never shifts when text appears. */
.message { min-height: 3em; margin: 0.75rem 0; }
.message.error { color: var(--error); }
.warn { color: var(--muted); }

.list { list-style: none; padding: 0; margin: 0 0 1rem; }
.list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border);
}
.list small { display: block; color: var(--muted); font-size: 0.85rem; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
