:root {
  --bg: #f6f4ef; --surface: #ffffff; --text: #1f2421; --muted: #66706a;
  --accent: #2f7d5b; --accent-text: #ffffff; --danger: #b3261e; --border: #dcd8cf;
  --notice: #e3f1e9; --alert: #fbe4e2;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141816; --surface: #1d2320; --text: #e6ebe8; --muted: #9aa59f;
    --accent: #5cc08f; --accent-text: #0d1a13; --danger: #f2b8b5; --border: #303833;
    --notice: #1f3a2c; --alert: #4a2321;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, sans-serif; background: var(--bg); color: var(--text); }
.topbar { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between;
  padding: .75rem 1rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar nav { display: flex; gap: 1rem; align-items: center; }
.topbar nav form { margin: 0; }
.brand { font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--accent); }
a { color: var(--accent); }
main { max-width: 52rem; margin: 1.5rem auto; padding: 0 1rem; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem 1.5rem; }
.narrow { max-width: 26rem; margin: 0 auto; }
.stack { display: flex; flex-direction: column; gap: .5rem; }
input[type=text], input[type=email], input[type=password] { font: inherit; padding: .65rem .75rem;
  border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); width: 100%; }
.button { font: inherit; border: 0; border-radius: 8px; padding: .65rem 1rem; background: var(--accent);
  color: var(--accent-text); cursor: pointer; min-height: 44px; }
.button.danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.link { font: inherit; background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; text-decoration: underline; }
.muted { color: var(--muted); }
.flash { padding: .75rem 1rem; border-radius: 8px; }
.flash-notice { background: var(--notice); }
.flash-alert { background: var(--alert); }
.rows { list-style: none; padding: 0; margin: 1rem 0 0; }
.rows li { display: flex; gap: 1rem; justify-content: space-between; align-items: center;
  padding: .75rem 0; border-top: 1px solid var(--border); }
.rows form { margin: 0; }
.copy { margin-top: .5rem; }
