:root {
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #1c1e21;
  --muted: #5b6370;
  --border: #e3e6ea;
  --accent: #c13584;
  --todo-bg: #fff3c4;
  --todo-text: #6b4e00;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121316;
    --surface: #1c1e22;
    --text: #e8eaed;
    --muted: #9aa0a8;
    --border: #2d3036;
    --accent: #f06bb5;
    --todo-bg: #4a3b00;
    --todo-text: #ffe28a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", sans-serif;
}

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

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

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

.brand span { color: var(--accent); }

nav a {
  color: var(--muted);
  text-decoration: none;
  margin-right: 16px;
  font-size: 0.95rem;
}

nav a:last-child { margin-right: 0; }
nav a[aria-current="page"] { color: var(--accent); font-weight: 600; }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px;
}

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

h1 { font-size: 2rem; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 1.3rem; margin: 40px 0 12px; padding-top: 8px; border-top: 1px solid var(--border); }
h3 { font-size: 1.05rem; margin: 24px 0 8px; }

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

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

ul, ol { padding-left: 1.4em; }
li { margin: 4px 0; }

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 20px;
}

.toc ol { margin: 8px 0 0; }

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

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

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

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

.callout {
  background: var(--surface);
  border-left: 4px solid var(--accent);
  border-radius: 4px;
  padding: 12px 16px;
  margin: 16px 0;
}

/* Placeholder that must be filled in before the page goes live */
.todo {
  background: var(--todo-bg);
  color: var(--todo-text);
  border-radius: 3px;
  padding: 0 4px;
  font-weight: 600;
}

footer.site {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 20px 0 32px;
}

footer.site a { color: var(--muted); }
