:root {
  --bg: #ffffff;
  --paper: #ffffff;
  --ink: #171717;
  --muted: #666666;
  --line: rgba(32, 29, 24, 0.12);
  --accent: #111111;
  --measure: 72ch;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "URW Palladio L", Georgia, serif;
  --body: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --mono: "Iosevka", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  line-height: 1.68;
}

a {
  color: inherit;
  text-decoration-color: rgba(138, 59, 18, 0.45);
  text-underline-offset: 0.14em;
}

main {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 5.5rem 0 4rem;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header-inner {
  width: min(1120px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 0.9rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-header a {
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--ink);
}

.site-title-group {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  min-width: 0;
}

.hero {
  margin-bottom: 2.5rem;
}

.social-links {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid #d5d7db;
  border-radius: 0.6rem;
  background: #f8fafc;
  color: #334155;
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.social-icon {
  width: 0.88rem;
  height: 0.88rem;
  fill: currentColor;
  flex: 0 0 auto;
}

.social-link-discord:hover {
  border-color: #818cf8;
  background: #eef2ff;
  color: #4338ca;
}

.social-link-x:hover {
  border-color: #64748b;
  background: #e2e8f0;
  color: #0f172a;
}

.social-link-github:hover {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}

.front-title {
  margin: 0 0 1.6rem;
  font-family: var(--display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.front-excerpt {
  max-width: var(--measure);
}

.toc-panel {
  margin-top: 2.2rem;
}

.toc-panel h2 {
  margin: 0 0 1rem;
  font-family: var(--display);
  font-size: 1.5rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-item + .toc-item {
  margin-top: 0.45rem;
}

.toc-entry {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.toc-number {
  min-width: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.95rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

p {
  margin: 0 0 1rem;
}


.cquote {
  margin: 0 0 1.8rem 0;
  padding-left: 2.2rem;
  font-style: italic;
}

.cquote .quote-author {
  margin-top: 0.8rem;
  text-align: right;
  font-style: normal;
  color: var(--muted);
}

.cquote br {
  display: none;
}

.cquote p {
  margin: 0;
}

.cquote p + p {
  margin-top: 0.7rem;
}


@media (max-width: 720px) {
  main {
    width: min(1120px, calc(100vw - 1.2rem));
    padding-top: 5rem;
  }

  .site-header-inner {
    width: min(1120px, calc(100vw - 1.2rem));
  }

  .front-title {
    font-size: clamp(2.1rem, 11vw, 3rem);
  }
}
