:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --fg: #1d1d1b;
  --muted: #5f5e5a;
  --border: #e3e0d8;
  --accent: #2f6f4f;
  --accent-fg: #ffffff;
  --danger: #b3261e;
  --notice-bg: #eef5f0;
  --error-bg: #fbeceb;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --surface: #1c1c1a;
    --fg: #ecebe6;
    --muted: #a6a49c;
    --border: #2f2e2a;
    --accent: #7cc49a;
    --accent-fg: #0f1a14;
    --danger: #f2867c;
    --notice-bg: #1b2a21;
    --error-bg: #2e1b19;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0 auto;
  max-width: 44rem;
  min-height: 100vh;
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); }
main { flex: 1; padding: 2rem 0; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 0.75rem; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; }
.lede { font-size: 1.15rem; color: var(--muted); }

.site-header, .site-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}
.site-header { border-bottom: 1px solid var(--border); }
.site-footer { border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.brand { color: var(--fg); font-weight: 700; text-decoration: none; }
#auth-nav { display: flex; gap: 1rem; align-items: center; min-width: 0; }
.who { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.button {
  display: inline-block;
  padding: 0.65rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--accent-fg);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button.secondary { background: transparent; color: var(--accent); }
.button.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.button:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.stack { display: flex; flex-direction: column; gap: 0.75rem; max-width: 22rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 1.5rem 0; }

.notice { padding: 0.75rem 1rem; border-radius: 8px; background: var(--notice-bg); }
.notice.error { background: var(--error-bg); color: var(--danger); }

.facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.25rem; margin: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }

.output {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  overflow-x: auto;
  font-size: 0.875rem;
}
.danger-zone { margin-top: 2.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
.small { font-size: 0.9rem; color: var(--muted); }
