:root {
  --text: #1a1a1a;
  --muted: #666;
  --border: #e5e5e5;
  --link: #0a5cff;
  --bg: #ffffff;
  --max-width: 720px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0 24px;
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 32px 0 96px;
}

header.site {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 0 0;
}

header.site .brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

header.site .brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: block;
}

h1 {
  font-size: 2rem;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}

h2 {
  font-size: 1.4rem;
  letter-spacing: -0.01em;
  margin: 48px 0 12px;
  padding-top: 8px;
}

h3 {
  font-size: 1.1rem;
  margin: 32px 0 8px;
}

h4 {
  font-size: 1rem;
  margin: 24px 0 4px;
}

p {
  margin: 0 0 16px;
}

ul {
  margin: 0 0 16px;
  padding-left: 24px;
}

li {
  margin: 0 0 8px;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* markdown-it-anchor wraps heading text in a link — keep it looking like a heading */
.header-anchor {
  color: inherit;
  text-decoration: none;
}

.header-anchor:hover {
  text-decoration: none;
}

h2:hover .header-anchor::after,
h3:hover .header-anchor::after,
h4:hover .header-anchor::after {
  content: " #";
  color: var(--muted);
  font-weight: 400;
}

.doc-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.back-link {
  font-size: 0.9rem;
  color: var(--muted);
}

.back-link:hover {
  color: var(--text);
  text-decoration: none;
}

.print-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.print-btn:hover {
  border-color: var(--muted);
  color: var(--text);
}

.updated {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 40px;
}

.lead {
  font-size: 1.05rem;
}

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

/* Simple index list */
.doc-list {
  list-style: none;
  padding: 0;
  margin: 32px 0 0;
}

.doc-list li {
  margin: 0;
}

.doc-list a {
  display: block;
  padding: 7px 4px;
  color: var(--text);
  font-weight: 500;
}

.doc-list a:hover {
  color: var(--link);
  text-decoration: none;
}

/* Print / Save as PDF: drop chrome, keep just the document text */
@media print {
  body {
    padding: 0;
  }

  .container {
    max-width: none;
    padding: 0;
  }

  header.site,
  .doc-actions,
  footer.site {
    display: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .header-anchor::after {
    content: "" !important;
  }
}
