:root {
  --bg: #f6f4ef;
  --bg-accent: #ebe6dc;
  --ink: #1a1a18;
  --muted: #5c5a54;
  --line: #d4cfc3;
  --surface: #fffcf7;
  --link: #1a5f4a;
  --link-hover: #0f3d30;
  --callout-bg: #f0ebe1;
  --callout-border: #c4b89a;
  --nav-bg: rgba(246, 244, 239, 0.92);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121311;
    --bg-accent: #1c1d1a;
    --ink: #eceae4;
    --muted: #a09c92;
    --line: #2e302b;
    --surface: #191a17;
    --link: #7dbaa3;
    --link-hover: #a8d4c2;
    --callout-bg: #22241f;
    --callout-border: #3d4038;
    --nav-bg: rgba(18, 19, 17, 0.92);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, var(--bg-accent), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, var(--bg-accent), transparent 45%),
    var(--bg);
  font-family: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-size: 1.05rem;
  line-height: 1.65;
}

a {
  color: var(--link);
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--link-hover);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
  backdrop-filter: blur(12px);
}

.topbar-brand {
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
}

.topbar-brand:hover {
  color: var(--ink);
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--surface);
  color: var(--ink);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.btn:hover {
  border-color: var(--muted);
  color: var(--ink);
  background: var(--bg-accent);
}

.btn[aria-current="page"] {
  border-color: var(--ink);
  pointer-events: none;
}

main {
  width: min(46rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2.5rem 0 4rem;
}

.meta {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  line-height: 1.5;
}

.meta p {
  margin: 0.2rem 0;
}

h1 {
  margin: 0 0 0.75rem;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h2 {
  margin: 2.5rem 0 0.85rem;
  padding-top: 0.5rem;
  border-top: 1px solid var(--line);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

h3 {
  margin: 1.5rem 0 0.6rem;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 1.05rem;
  font-weight: 650;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin: 0.35rem 0;
}

li::marker {
  color: var(--muted);
}

.callout {
  margin: 1.25rem 0 1.75rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--callout-border);
  border-left-width: 3px;
  border-radius: 0.35rem;
  background: var(--callout-bg);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 0.92rem;
  line-height: 1.55;
}

.callout p {
  margin: 0;
}

.callout p + p {
  margin-top: 0.6rem;
}

.table-wrap {
  width: 100%;
  margin: 0 0 1.25rem;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 0.4rem;
  background: var(--surface);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 0.9rem;
  line-height: 1.45;
}

th,
td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: var(--bg-accent);
  font-weight: 600;
  white-space: nowrap;
}

tr:last-child th,
tr:last-child td {
  border-bottom: none;
}

.placeholder {
  font-weight: 700;
  background: color-mix(in srgb, var(--callout-border) 35%, transparent);
  padding: 0.05em 0.2em;
  border-radius: 0.2rem;
}

.landing {
  padding-top: 3rem;
}

.landing .eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-family: "DM Sans", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.landing .lede {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 1.2rem;
  line-height: 1.45;
}

.landing .feature-list {
  margin: 0 0 2rem;
  padding-left: 1.25rem;
}

.landing .feature-list li {
  margin: 0.55rem 0;
}

.muted {
  color: var(--muted);
}

.muted a {
  color: var(--muted);
}

.muted a:hover {
  color: var(--link-hover);
}

@media (max-width: 560px) {
  body {
    font-size: 1rem;
  }

  main {
    padding-top: 1.75rem;
  }

  .landing {
    padding-top: 2rem;
  }

  th,
  td {
    padding: 0.55rem 0.65rem;
  }
}
