:root {
  color-scheme: light;
  --bg: #f6f1e9;
  --paper: #fffdf8;
  --ink: #1b1b1b;
  --muted: #5b554f;
  --accent: #8a1f1f;
  --rule: #e2d7c9;
  --max: 72ch;
  --radius: 12px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: "Alegreya", "Palatino Linotype", "Book Antiqua", serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, #ffffff 0%, transparent 60%),
    linear-gradient(180deg, #f6f1e9 0%, #ffffff 42%, #faf7f2 100%);
  color: var(--ink);
  line-height: 1.7;
}
a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.2em;
}
a:hover {
  color: #6f1414;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto;
  height: auto;
  margin: 1rem;
  padding: 0.5rem 0.75rem;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 999px;
}
.wrapper {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem;
}
.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.site-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-title {
  margin: 0.3rem 0 0.5rem;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}
.site-meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.top-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  margin-top: 1rem;
  font-size: 0.95rem;
}
.top-nav a[aria-current="page"] {
  color: var(--ink);
  font-weight: 600;
}
.page {
  background: var(--paper);
  border-radius: var(--radius);
  border: 1px solid var(--rule);
  margin: 1.5rem auto 2.5rem;
  animation: fade-up 0.4s ease-out;
}
.page h1 {
  margin-top: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}
.page h2 {
  font-size: 1.1rem;
  color: var(--muted);
}
.breadcrumbs {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.section-title {
  margin-top: 2rem;
  font-size: 1.1rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.toc-list li {
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}
.article-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.article-list .snippet {
  display: block;
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 0.2rem;
}
.article-text ol {
  padding-left: 1.25rem;
}
.article-text p {
  margin: 0 0 1rem;
}
.article-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--rule);
  margin-top: 2rem;
  padding-top: 1rem;
  font-size: 0.95rem;
}
.chapter-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.5rem;
}
.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--paper);
  color: var(--muted);
  font-size: 0.9rem;
}
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (min-width: 900px) {
  .toc-list {
    columns: 2;
    column-gap: 2rem;
  }
}
@media (max-width: 640px) {
  .page {
    margin: 1rem 0 2rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
  .article-nav {
    flex-direction: column;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .page {
    animation: none;
  }
}
@media print {
  body {
    background: #fff;
  }
  .site-header,
  .site-footer,
  .top-nav,
  .article-nav,
  .chapter-nav {
    display: none !important;
  }
  .page {
    border: none;
    margin: 0;
  }
}
