:root {
  --bg: #ffffff;
  --surface: #f5f6f8;
  --text: #1b1d22;
  --muted: #5b616e;
  --border: #e2e5ea;
  --accent: #4f46e5;
  --accent-text: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #1a1d23;
    --text: #e9ebef;
    --muted: #a0a6b2;
    --border: #2b2f37;
    --accent: #8b85ff;
    --accent-text: #111317;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a { color: var(--accent); }

header {
  border-bottom: 1px solid var(--border);
}

header .bar,
main,
footer .bar {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 16px;
}

header .bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  padding-top: 16px;
  padding-bottom: 16px;
}

.brand {
  font-weight: 700;
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  font-size: 15px;
}

nav a { color: var(--muted); text-decoration: none; }
nav a:hover, nav a[aria-current="page"] { color: var(--text); }

main { padding-top: 32px; padding-bottom: 48px; }

h1 { font-size: 32px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 21px; margin: 36px 0 8px; }
h3 { font-size: 17px; margin: 24px 0 4px; }

.meta { color: var(--muted); margin: 0 0 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  margin: 20px 0;
}

.card h2, .card h3 { margin-top: 0; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.grid .card { margin: 0; }

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 15px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.table-wrap { overflow-x: auto; }

footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 14px;
}

footer .bar { padding-top: 20px; padding-bottom: 28px; }
