:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --text: #1d2a1f;
  --muted: #56645a;
  --primary: #2e7d32;
  --border: #dfe5dc;
  --note: #fff8e1;
  --note-border: #f0d68a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121612;
    --surface: #1b211c;
    --text: #e4ebe4;
    --muted: #a3b0a5;
    --primary: #81c784;
    --border: #2f3a31;
    --note: #2b2715;
    --note-border: #5c5124;
  }
}

* {
  box-sizing: border-box;
}

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

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

header .bar,
main,
footer {
  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: 14px;
  padding-bottom: 14px;
}

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

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 15px;
}

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

main {
  padding-top: 28px;
  padding-bottom: 40px;
}

h1 {
  font-size: 30px;
  line-height: 1.25;
  margin: 0 0 6px;
}

h2 {
  font-size: 21px;
  margin: 34px 0 8px;
}

h3 {
  font-size: 18px;
  margin: 22px 0 6px;
}

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

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

ul,
ol {
  padding-left: 22px;
}

li {
  margin: 4px 0;
}

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

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

th {
  background: var(--surface);
}

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

.note {
  background: var(--note);
  border: 1px solid var(--note-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin: 18px 0;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  color: var(--text);
  text-decoration: none;
}

.card strong {
  display: block;
  color: var(--primary);
  font-size: 18px;
  margin-bottom: 4px;
}

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