/* Topo Guide colours from src/constants/theme.ts, light and dark. */
:root {
  --text: #1e2a22;
  --text-secondary: #58625a;
  --background: #f1ede2;
  --surface: #fbf9f3;
  --border: #d6cdb8;
  --tint: #2f5d4a;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #ece8da;
    --text-secondary: #a3aa9c;
    --background: #141813;
    --surface: #1d231c;
    --border: #303a2e;
    --tint: #9ccbae;
  }
}

* {
  box-sizing: border-box;
}

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

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

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 20px;
}

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

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.switch {
  font-size: 15px;
}

h1 {
  font-size: 32px;
  line-height: 1.2;
  margin: 16px 0 24px;
}

h2 {
  font-size: 21px;
  line-height: 1.3;
  margin: 32px 0 8px;
}

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

li {
  margin: 6px 0;
}

/* Wide tables scroll inside their own box instead of the whole page. */
table {
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 16px 0;
  font-size: 15px;
}

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

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

footer {
  margin-top: 48px;
  padding-top: 20px;
  padding-bottom: 32px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 15px;
}

footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
