:root {
  color-scheme: light;
  --background: #f5f6f4;
  --surface: #ffffff;
  --surface-muted: #eef1ed;
  --text: #202522;
  --muted: #5d675f;
  --border: #cbd2cc;
  --strong-border: #929d95;
  --accent: #176b4d;
  --accent-soft: #dceee5;
  --attention: #8a5a00;
  --attention-soft: #fff0c9;
  --code: #1d2521;
  --code-text: #f0f5f1;
  --content-width: 78rem;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--text);
}

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

a:hover {
  text-decoration-thickness: 0.14em;
}

a:focus-visible,
summary:focus-visible {
  outline: 3px solid var(--attention);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 1rem;
  top: -4rem;
  z-index: 10;
  padding: 0.55rem 0.8rem;
  background: var(--code);
  color: var(--code-text);
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 3rem 2rem 2.25rem;
  border-bottom: 1px solid var(--strong-border);
}

.site-kicker,
.topic-index__summary {
  margin: 0 0 0.4rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0.55rem;
  font-size: 2.3rem;
  line-height: 1.15;
}

h2 {
  margin-bottom: 0.45rem;
  font-size: 1.55rem;
  line-height: 1.25;
}

h3 {
  margin-bottom: 0.65rem;
  font-size: 1.05rem;
  line-height: 1.35;
}

h4 {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.site-description,
.topic__header p {
  max-width: 48rem;
  margin-bottom: 0;
  color: var(--muted);
}

.related-pages {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.related-pages a,
.question-links a {
  display: inline-block;
  border-bottom: 2px solid var(--accent);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.related-pages a,
.site-footer a,
.site-footer [aria-current="page"] {
  white-space: nowrap;
}

/* Shared site footer (cross-page navigation) */
.site-footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem;
  border-top: 1px solid var(--strong-border);
  color: var(--muted);
}

.site-footer__label {
  margin: 0 0 0.5rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 750;
  text-transform: uppercase;
}

.site-footer ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-footer a {
  font-weight: 700;
}

.site-footer [aria-current="page"] {
  font-weight: 700;
  color: var(--text);
}
