:root {
  --bg: #fbfbfa;
  --surface: #ffffff;
  --text: #1c1f24;
  --muted: #5b6270;
  --border: #e4e6ea;
  --accent: #1f4e8c;
  --accent-soft: #e8eef7;
  --max: 46rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111317;
    --surface: #181b21;
    --text: #e8eaee;
    --muted: #a1a8b5;
    --border: #2a2f38;
    --accent: #8cb4ec;
    --accent-soft: #1d2735;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-underline-offset: 0.15em;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand img {
  width: 28px;
  height: 28px;
}

.site-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.95rem;
}

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

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* Main */
main {
  flex: 1;
  padding: 3rem 0 4rem;
}

h1 {
  font-size: clamp(1.9rem, 5vw, 2.5rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
}

h2 {
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.05rem;
  margin: 1.5rem 0 0.5rem;
}

p,
ul {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.25rem;
}

li + li {
  margin-top: 0.35rem;
}

.lede {
  font-size: 1.2rem;
  color: var(--muted);
  max-width: 36rem;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.card p:last-child {
  margin-bottom: 0;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.grid .card {
  margin: 0;
}

.callout {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
}

dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1.5rem;
  margin: 0;
}

dl.facts dt {
  color: var(--muted);
}

dl.facts dd {
  margin: 0;
}

@media (max-width: 30rem) {
  dl.facts {
    grid-template-columns: 1fr;
    gap: 0;
  }

  dl.facts dd {
    margin-bottom: 0.6rem;
  }
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
  padding: 1.5rem 0 2rem;
}

.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.site-footer p {
  margin: 0;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-footer a {
  color: var(--muted);
}
