/* ---------------------------------------------------------------------------
   Reports — editorial design system
   Typography-first, narrow column body, full-width breakouts for tables/figures.
   --------------------------------------------------------------------------- */

:root {
  /* Type scale — based on a 1.25 minor-third ratio, anchored at 17px body */
  --font-serif: "Source Serif 4", "Iowan Old Style", "Apple Garamond", "Baskerville", "Times New Roman", "Droid Serif", Times, "Source Serif Pro", serif;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --fs-xs: 0.8125rem;   /* 13px */
  --fs-sm: 0.9375rem;   /* 15px */
  --fs-base: 1.0625rem; /* 17px */
  --fs-md: 1.1875rem;   /* 19px */
  --fs-lg: 1.4375rem;   /* 23px */
  --fs-xl: 1.875rem;    /* 30px */
  --fs-2xl: 2.5rem;     /* 40px */
  --fs-3xl: 3.25rem;    /* 52px */

  /* Spacing scale */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* Layout */
  --col-prose: 38rem;     /* readable measure ~70 chars at 17px */
  --col-wide: 52rem;      /* breakout column for tables, figures */
  --col-page: 72rem;      /* page max width */
  --sidebar-width: 14rem;
  --header-height: 3.75rem;
  --radius: 4px;

  /* Light palette — paper, ink, and a single accent */
  --c-bg: #fbfaf7;
  --c-surface: #ffffff;
  --c-surface-alt: #f4f1ea;
  --c-ink: #1a1614;
  --c-ink-soft: #4a4640;
  --c-ink-muted: #76716a;
  --c-rule: #e3ddd2;
  --c-rule-strong: #cfc7b8;
  --c-accent: #8a3324;       /* burnt sienna */
  --c-accent-soft: #c66a52;
  --c-link: var(--c-accent);
  --c-link-hover: #5e2218;
  --c-code-bg: #f4f1ea;
  --c-code-ink: #1a1614;
  --c-quote-rule: var(--c-accent);
}

[data-theme="dark"] {
  --c-bg: #15130f;
  --c-surface: #1c1a16;
  --c-surface-alt: #25221d;
  --c-ink: #ece7dc;
  --c-ink-soft: #c4bfb3;
  --c-ink-muted: #8b8678;
  --c-rule: #2e2a23;
  --c-rule-strong: #443f36;
  --c-accent: #e89077;
  --c-accent-soft: #f0b29f;
  --c-link: var(--c-accent);
  --c-link-hover: #f4c1ad;
  --c-code-bg: #1f1d18;
  --c-code-ink: #ece7dc;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --c-bg: #15130f;
    --c-surface: #1c1a16;
    --c-surface-alt: #25221d;
    --c-ink: #ece7dc;
    --c-ink-soft: #c4bfb3;
    --c-ink-muted: #8b8678;
    --c-rule: #2e2a23;
    --c-rule-strong: #443f36;
    --c-accent: #e89077;
    --c-accent-soft: #f0b29f;
    --c-link: var(--c-accent);
    --c-link-hover: #f4c1ad;
    --c-code-bg: #1f1d18;
    --c-code-ink: #ece7dc;
  }
}

/* Reset --------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, figure, hr, pre, table { margin: 0; padding: 0; }
img, picture, svg, video { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; padding: 0; }
hr { border: 0; border-top: 1px solid var(--c-rule); margin: var(--sp-7) 0; }

/* Base type ----------------------------------------------------------------- */

body {
  font-family: var(--font-serif);
  font-size: var(--fs-base);
  line-height: 1.65;
  color: var(--c-ink);
  background: var(--c-bg);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "kern", "liga", "onum", "calt";
}

a {
  color: var(--c-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  text-decoration-color: color-mix(in srgb, var(--c-link) 35%, transparent);
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}
a:hover { color: var(--c-link-hover); text-decoration-color: var(--c-link-hover); }

::selection { background: color-mix(in srgb, var(--c-accent) 25%, transparent); color: var(--c-ink); }

/* Header -------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--c-bg) 92%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--c-rule);
}
.site-header__inner {
  max-width: var(--col-page);
  margin: 0 auto;
  padding: 0 var(--sp-5);
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}
.site-header__brand {
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: var(--fs-sm);
  letter-spacing: -0.01em;
  color: var(--c-ink);
  text-decoration: none;
}
.site-header__mark {
  color: var(--c-accent);
  font-size: 1.1em;
  line-height: 1;
}
.site-header__nav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
}
.site-header__nav a {
  color: var(--c-ink-soft);
  text-decoration: none;
}
.site-header__nav a:hover { color: var(--c-ink); }
.site-header__github {
  color: var(--c-ink-muted) !important;
}
.site-header__theme {
  width: 1.875rem;
  height: 1.875rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  color: var(--c-ink-muted);
}
.site-header__theme:hover { background: var(--c-surface-alt); color: var(--c-ink); }
.site-header__theme-icon::before {
  content: "◐";
  font-size: 1.05rem;
}

/* Main ---------------------------------------------------------------------- */

.site-main {
  min-height: calc(100vh - var(--header-height) - 8rem);
  padding: var(--sp-7) var(--sp-5) var(--sp-9);
}

/* Home ---------------------------------------------------------------------- */

.home {
  max-width: var(--col-page);
  margin: 0 auto;
}
.home__hero {
  padding: var(--sp-7) 0 var(--sp-8);
  border-bottom: 1px solid var(--c-rule);
  margin-bottom: var(--sp-8);
}
.home__eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
  margin-bottom: var(--sp-3);
}
.home__title {
  font-family: var(--font-serif);
  font-size: var(--fs-3xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--c-ink);
  max-width: 22ch;
  margin-bottom: var(--sp-4);
  font-feature-settings: "kern", "liga", "onum";
}
.home__subtitle {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-style: italic;
  color: var(--c-ink-soft);
  max-width: 38ch;
  line-height: 1.4;
}
.home__section-title {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
  margin-bottom: var(--sp-5);
}
.home__topics, .home__about {
  margin-bottom: var(--sp-8);
}
/* Featured card on home -------------------------------------------------- */

.home__featured {
  margin-bottom: var(--sp-8);
}
.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--sp-7);
  align-items: start;
  padding: var(--sp-6) 0;
  border-top: 1px solid var(--c-rule);
  border-bottom: 1px solid var(--c-rule);
}
@media (max-width: 60rem) {
  .featured-card {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-5);
  }
}
.featured-card__image-link {
  display: block;
  border: 1px solid var(--c-rule);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--c-surface);
  text-decoration: none;
  /* On very wide screens, don't let the image grow beyond a comfortable
     reading proportion — caps the card image while the body keeps its
     normal column. */
  max-width: 28rem;
  margin-left: auto;
  margin-right: auto;
}
.featured-card__image {
  width: 100%;
  height: auto;
  display: block;
  margin: 0;
  border: 0;
  transition: transform 0.3s ease;
  /* Render the upscaled PDF render with bilinear smoothing instead of
     pixelated nearest-neighbor on high-DPI displays. */
  image-rendering: auto;
}
.featured-card__image-link:hover .featured-card__image {
  transform: scale(1.02);
}
.featured-card__body {
  min-width: 0;
}
.featured-card__eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
  margin-bottom: var(--sp-3);
}
.featured-card__title {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--sp-3);
}
.featured-card__title a {
  color: var(--c-ink);
  text-decoration: none;
}
.featured-card__title a:hover {
  color: var(--c-link);
}
.featured-card__dek {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--c-ink-soft);
  margin-bottom: var(--sp-4);
}
.featured-card__findings {
  list-style: none;
  padding-left: 0;
  margin: var(--sp-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.featured-card__findings li {
  font-family: var(--font-serif);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--c-ink);
  padding-left: var(--sp-4);
  position: relative;
}
.featured-card__findings li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--c-accent);
  font-size: 0.85em;
  line-height: 1.7;
}
.featured-card__findings strong {
  font-weight: 600;
  color: var(--c-ink);
}
.featured-card__cta {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--c-link);
  text-decoration: none;
  display: inline-block;
  margin-top: var(--sp-3);
}
.featured-card__cta:hover {
  color: var(--c-link-hover);
}

.topic-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
  gap: var(--sp-5);
}
.topic-card {
  border: 1px solid var(--c-rule);
  border-radius: var(--radius);
  background: var(--c-surface);
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.topic-card:hover { border-color: var(--c-rule-strong); }
.topic-card__link {
  display: block;
  padding: var(--sp-5);
  color: var(--c-ink);
  text-decoration: none;
}
.topic-card__title {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin-bottom: var(--sp-3);
}
.topic-card__subtitle {
  color: var(--c-ink-soft);
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin-bottom: var(--sp-4);
}
.topic-card__meta {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  color: var(--c-ink-muted);
  letter-spacing: 0.02em;
}
.topic-card__sep { margin: 0 var(--sp-2); }

/* Page layout (with optional sidebar) -------------------------------------- */

.page {
  max-width: var(--col-page);
  margin: 0 auto;
}
.page--with-sidebar {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: start;
}

@media (max-width: 60rem) {
  .page--with-sidebar {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--sp-5);
  }
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--sp-5));
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  border-right: 1px solid var(--c-rule);
  padding-right: var(--sp-5);
  max-height: calc(100vh - var(--header-height) - var(--sp-5));
  overflow-y: auto;
}
@media (max-width: 60rem) {
  .sidebar {
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--c-rule);
    padding-right: 0;
    padding-bottom: var(--sp-5);
    max-height: none;
  }
}
.sidebar__topic { margin-bottom: var(--sp-5); }
.sidebar__eyebrow {
  display: block;
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
  margin-bottom: var(--sp-2);
}
.sidebar__title {
  font-family: var(--font-serif);
  font-weight: 600;
  font-size: var(--fs-md);
  color: var(--c-ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.sidebar__group-label {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
  margin: var(--sp-4) 0 var(--sp-2);
}
.sidebar__nav > .sidebar__group-label:first-child {
  margin-top: 0;
}
.sidebar__nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-bottom: var(--sp-3);
}
.sidebar__nav a {
  display: block;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius);
  color: var(--c-ink-soft);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
}
.sidebar__nav a:hover { color: var(--c-ink); background: var(--c-surface-alt); }
.sidebar__nav .is-active a {
  color: var(--c-ink);
  border-left-color: var(--c-accent);
  font-weight: 500;
  background: var(--c-surface-alt);
}

/* Page header -------------------------------------------------------------- */

.page__body { min-width: 0; }
.page__header {
  margin-bottom: var(--sp-7);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--c-rule);
}
.page__eyebrow {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
  margin-bottom: var(--sp-3);
}
.page__title {
  font-family: var(--font-serif);
  font-size: var(--fs-2xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--sp-3);
  font-feature-settings: "kern", "liga", "onum";
}
.page__subtitle {
  font-family: var(--font-serif);
  font-size: var(--fs-md);
  font-style: italic;
  color: var(--c-ink-soft);
  margin-bottom: var(--sp-3);
  line-height: 1.4;
}
.page__meta {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--c-ink-muted);
}

/* Prose --------------------------------------------------------------------- */

.prose {
  max-width: var(--col-prose);
  font-feature-settings: "kern", "liga", "onum", "calt";
}

/* Wider breakouts for tables / figures / pre / blockquote */
.prose > table,
.prose > figure,
.prose > pre,
.prose > .table-wrap,
.prose > details {
  max-width: var(--col-wide);
}

.prose > * + * { margin-top: var(--sp-4); }
.prose > h2 + *,
.prose > h3 + *,
.prose > h4 + * { margin-top: var(--sp-3); }

.prose h2 {
  font-family: var(--font-serif);
  font-size: var(--fs-xl);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-top: var(--sp-7);
  padding-top: var(--sp-2);
  scroll-margin-top: calc(var(--header-height) + var(--sp-3));
}
.prose h3 {
  font-family: var(--font-serif);
  font-size: var(--fs-lg);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin-top: var(--sp-6);
  scroll-margin-top: calc(var(--header-height) + var(--sp-3));
}
.prose h4 {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--c-ink-soft);
  margin-top: var(--sp-5);
}
.prose h5, .prose h6 {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 600;
}

.prose p { line-height: 1.65; }
.prose strong { font-weight: 600; color: var(--c-ink); }
.prose em { font-style: italic; }

.prose ul, .prose ol {
  padding-left: var(--sp-5);
}
.prose li { margin-top: var(--sp-2); line-height: 1.55; }
.prose li::marker { color: var(--c-ink-muted); }

/* Tables */
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  line-height: 1.5;
  margin: var(--sp-6) 0;
}
.prose th {
  text-align: left;
  font-weight: 600;
  color: var(--c-ink);
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 2px solid var(--c-rule-strong);
  background: var(--c-surface-alt);
  font-size: var(--fs-xs);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.prose td {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--c-rule);
  vertical-align: top;
}
.prose tr:hover td { background: color-mix(in srgb, var(--c-surface-alt) 50%, transparent); }
.prose td code, .prose th code { font-size: 0.92em; }

/* Code */
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--c-code-bg);
  color: var(--c-code-ink);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-feature-settings: "calt" 0;
  word-wrap: break-word;
}
.prose pre {
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  line-height: 1.55;
  background: var(--c-code-bg);
  border: 1px solid var(--c-rule);
  border-radius: var(--radius);
  padding: var(--sp-4) var(--sp-5);
  overflow-x: auto;
  margin: var(--sp-5) 0;
}
.prose pre code {
  background: transparent;
  padding: 0;
  border-radius: 0;
  font-size: 1em;
  color: var(--c-code-ink);
}

/* Blockquote — proper pull quote */
.prose blockquote {
  border-left: 3px solid var(--c-quote-rule);
  padding: var(--sp-2) var(--sp-5);
  margin: var(--sp-5) 0;
  color: var(--c-ink-soft);
  font-style: italic;
  font-size: var(--fs-md);
  line-height: 1.5;
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: var(--sp-3); }

/* Images / figures */
.prose img {
  max-width: 100%;
  border-radius: var(--radius);
  border: 1px solid var(--c-rule);
  margin: var(--sp-5) 0;
  background: var(--c-surface);
}
.prose figure { margin: var(--sp-6) 0; }
.prose figcaption,
.prose img + em {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  color: var(--c-ink-muted);
  text-align: center;
  margin-top: var(--sp-2);
  font-style: normal;
}
.prose img + em { margin-top: calc(var(--sp-5) * -1 + var(--sp-2)); }

/* Details / disclosure */
.prose details {
  border: 1px solid var(--c-rule);
  border-radius: var(--radius);
  padding: var(--sp-3) var(--sp-4);
  background: var(--c-surface);
  margin: var(--sp-5) 0;
}
.prose details > summary {
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  cursor: pointer;
  color: var(--c-ink-soft);
}
.prose details[open] > summary { color: var(--c-ink); margin-bottom: var(--sp-3); }

/* Page-top "In one paragraph" callout --------------------------------------- */

.page-tldr {
  margin: 0 0 var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  background: var(--c-surface);
  border-left: 3px solid var(--c-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  max-width: var(--col-wide);
}
.page-tldr__label {
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-accent);
  margin-bottom: var(--sp-2);
  display: block;
}
.page-tldr p {
  margin: 0;
  font-family: var(--font-serif);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--c-ink);
}
.page-tldr p + p { margin-top: var(--sp-3); }
.page-tldr strong { color: var(--c-ink); font-weight: 600; }

/* On-this-page TOC ---------------------------------------------------------- */

.page-toc {
  margin: var(--sp-5) 0 var(--sp-7);
  padding: var(--sp-3) var(--sp-5);
  border: 1px solid var(--c-rule);
  border-radius: var(--radius);
  background: var(--c-surface);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  max-width: var(--col-wide);
}
.page-toc > summary {
  cursor: pointer;
  font-weight: 500;
  font-size: var(--fs-xs);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--c-ink-muted);
  padding: var(--sp-1) 0;
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.page-toc > summary::-webkit-details-marker { display: none; }
.page-toc > summary::before {
  content: "▸";
  display: inline-block;
  transition: transform 0.15s;
  color: var(--c-ink-muted);
}
.page-toc[open] > summary::before { transform: rotate(90deg); }
.page-toc[open] > summary {
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid var(--c-rule);
}
.page-toc ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}
.page-toc ul ul {
  padding-left: var(--sp-4);
  margin-top: var(--sp-2);
}
.page-toc li {
  margin: var(--sp-1) 0;
  line-height: 1.4;
}
.page-toc a {
  color: var(--c-ink-soft);
  text-decoration: none;
  border-radius: 3px;
  padding: 2px 4px;
  margin: 0 -4px;
  display: inline-block;
}
.page-toc a:hover {
  color: var(--c-ink);
  background: var(--c-surface-alt);
}

/* Heading anchors (auto-rendered by kramdown if enabled) */
.prose h2 a.anchor,
.prose h3 a.anchor {
  color: var(--c-ink-muted);
  text-decoration: none;
  margin-left: var(--sp-2);
  opacity: 0;
  transition: opacity 0.15s;
}
.prose h2:hover a.anchor,
.prose h3:hover a.anchor { opacity: 1; }

/* Footer -------------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--c-rule);
  padding: var(--sp-6) var(--sp-5);
  margin-top: var(--sp-8);
  font-family: var(--font-sans);
  font-size: var(--fs-xs);
  color: var(--c-ink-muted);
}
.site-footer__inner {
  max-width: var(--col-page);
  margin: 0 auto;
}
.site-footer__line { margin-bottom: var(--sp-2); }
.site-footer__sep { margin: 0 var(--sp-2); color: var(--c-rule-strong); }
.site-footer__brand { color: var(--c-ink-soft); font-weight: 500; }
.site-footer a {
  color: var(--c-ink-muted);
  text-decoration: underline;
  text-decoration-color: var(--c-rule-strong);
}
.site-footer a:hover { color: var(--c-ink); }

/* Mobile fine-tuning -------------------------------------------------------- */

@media (max-width: 40rem) {
  :root { --fs-base: 1rem; --fs-2xl: 2rem; --fs-3xl: 2.5rem; }
  .site-header__nav { gap: var(--sp-3); }
  .site-header__nav a:nth-of-type(n+2):not(:last-of-type) { display: none; }
  .site-main { padding: var(--sp-5) var(--sp-4) var(--sp-7); }
  .home__hero { padding: var(--sp-5) 0 var(--sp-6); margin-bottom: var(--sp-6); }
  .page__header { margin-bottom: var(--sp-5); }
}
