@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;0,8..60,700;1,8..60,400&family=DM+Sans:wght@400;500;600&display=swap');

:root {
  --bg: #ffffff;
  --text: #2d2a26;
  --muted: #6b6560;
  --accent: #8b3a3a;
  --accent-light: #a8524f;
  --border: #d9d9d9;
  --card-bg: #ffffff;
  --code-bg: #f2f2f0;
  --serif: 'Source Serif 4', Georgia, serif;
  --sans: 'DM Sans', -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1e1c19;
    --text: #e8e4dd;
    --muted: #9b958d;
    --accent: #c4706c;
    --accent-light: #d4867f;
    --border: #3a3631;
    --card-bg: #28251f;
    --code-bg: #2e2b25;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--serif);
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  max-width: 42rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--sans);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.6rem, 4vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 3rem;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

p { margin-bottom: 0.8rem; }

li { margin-bottom: 0.4rem; }

ul, ol { padding-left: 1.25rem; }

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

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

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0 1.75rem;
  font-family: var(--sans);
  font-size: 0.88rem;
  line-height: 1.5;
}

th {
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 2px solid var(--text);
}

td {
  padding: 0.55rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

tr:last-child td { border-bottom: none; }

code {
  font-family: 'SF Mono', 'Menlo', monospace;
  background: var(--code-bg);
  padding: 0.1rem 0.3rem;
  border-radius: 2px;
  font-size: 0.82em;
}

pre {
  background: var(--code-bg);
  padding: 1rem 1.25rem;
  border-radius: 3px;
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border-left: 3px solid var(--border);
}

pre code {
  background: none;
  padding: 0;
}

strong { font-weight: 600; }

blockquote {
  border-left: 2px solid var(--accent);
  padding-left: 1.25rem;
  font-style: italic;
  color: var(--muted);
  margin: 1.25rem 0;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* Nav */
.nav {
  font-family: var(--sans);
  font-size: 0.85rem;
  margin-bottom: 3rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 1.75rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.nav a:hover { color: var(--text); }

/* Index page */
.subtitle {
  font-family: var(--sans);
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 2.5rem;
}

.doc-link {
  display: block;
  text-decoration: none;
  color: inherit;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.doc-link:first-of-type {
  border-top: 1px solid var(--border);
}

.doc-link:hover .doc-title {
  color: var(--accent);
}

.doc-label {
  font-family: var(--sans);
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 0.15rem;
}

.doc-title {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  transition: color 0.15s;
}

.doc-desc {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.55;
  margin: 0;
}

.footer {
  margin-top: 3rem;
  font-family: var(--sans);
  color: var(--muted);
  font-size: 0.8rem;
}
