:root {
  --text: #1a1a1a;
  --bg: #fafaf8;
  --link: #1a5276;
  --red-link: #b03a2e;
  --border: #d5d5d0;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  font-size: 18px;
  line-height: 1.7;
}

body {
  font-family: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
  color: var(--text);
  background: var(--bg);
  max-width: 42rem;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
  text-align: left;
}

nav {
  margin-bottom: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

h1 { font-size: 1.6rem; margin: 0 0 1.5rem; line-height: 1.3; }
h2 { font-size: 1.25rem; margin: 2.5rem 0 1rem; line-height: 1.3; }
h3 { font-size: 1.1rem; margin: 2rem 0 0.75rem; }

p { margin: 0 0 1.2rem; }

a { color: var(--link); text-decoration: underline; text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
a.red-link { color: var(--red-link); text-decoration-style: dashed; }

ul, ol { padding-left: 1.5rem; margin: 0 0 1.2rem; }
li { margin-bottom: 0.4rem; }

strong { font-weight: 600; }

table { border-collapse: collapse; width: 100%; margin: 0 0 1.2rem; }
th, td { padding: 0.4rem 0.8rem; border: 1px solid var(--border); text-align: left; }
th { background: #f0f0ec; font-weight: 600; }

article { word-break: break-word; }

.toc {
  margin: 0 0 2rem;
  padding: 0.9rem 1.2rem 1rem;
  background: #f0f0ec;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.toc .toc-title {
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.8rem;
  color: #555;
  margin-bottom: 0.4rem;
}
.toc ol {
  list-style: decimal;
  padding-left: 1.4rem;
  margin: 0;
}
.toc ol ol {
  list-style: lower-alpha;
  margin: 0.2rem 0 0.4rem;
}
.toc li { margin-bottom: 0.1rem; }
