:root {
  color-scheme: light dark;
  --bg: #fbfbf9;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #5b616e;
  --line: #dedfda;
  --accent: #1f4fd1;
  --on-accent: #ffffff;
  --mark: #fff1c2;
  --error: #b3261e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #191c23;
    --text: #e8e9ec;
    --muted: #a2a8b5;
    --line: #2c303a;
    --accent: #8fabff;
    --on-accent: #0d1020;
    --mark: #3d3412;
    --error: #ffb4ab;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
.wrap { max-width: 52rem; margin: 0 auto; padding: 0 1.25rem; }
h1 { font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 1rem; text-wrap: balance; }
h2 { font-size: 1.35rem; margin: 0 0 1rem; }
h3 { font-size: 1rem; margin: 0 0 0.35rem; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.85em; border: 1px solid var(--line); border-radius: 4px; padding: 0 0.3em; }
section { padding: 2.5rem 0; border-top: 1px solid var(--line); }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1.25rem; padding-bottom: 1.25rem; }
.brand { font-weight: 650; }
.badge { font-size: 0.8rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 0.15rem 0.75rem; }

.hero { border-top: 0; padding-top: 2rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 40rem; }
.button {
  display: inline-block;
  background: var(--accent);
  color: var(--on-accent);
  border: 0;
  border-radius: 6px;
  padding: 0.65rem 1.1rem;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; }
.grid article, .event { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.1rem; }
.grid p { margin: 0; color: var(--muted); }
.note { color: var(--muted); font-size: 0.9rem; }

.event-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.75rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; padding: 0.5rem 0.6rem 0.5rem 0; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th span { font-weight: 400; color: var(--muted); }
tbody th { font-weight: 500; }
.changed { background: var(--mark); padding-left: 0.4rem; }
.changed small { display: block; color: var(--muted); }
figure { margin: 1rem 0 0; }
blockquote { margin: 0; border-left: 3px solid var(--accent); padding-left: 0.8rem; }
figcaption { color: var(--muted); font-size: 0.85rem; margin-top: 0.35rem; padding-left: 1rem; }

a { color: var(--accent); }
a.brand { color: inherit; text-decoration: none; }
a.button { color: var(--on-accent); }
.todo { background: var(--mark); padding: 0 0.25rem; }
.honeypot { display: none; }
.status { font-weight: 600; margin: 0.75rem 0 0; }
.status:empty { margin: 0; }
.status.error { color: var(--error); }
.button:disabled { opacity: 0.55; cursor: wait; }
label { display: block; font-weight: 600; margin-bottom: 0.35rem; }
.row { display: flex; flex-wrap: wrap; gap: 0.6rem; }
input {
  flex: 1 1 14rem;
  max-width: 22rem;
  font: inherit;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
}

footer { border-top: 1px solid var(--line); padding-top: 1.25rem; padding-bottom: 2rem; color: var(--muted); font-size: 0.85rem; }
