:root {
  --bg: #f3f0e8;
  --surface: #e8e3d8;
  --text: #1c211c;
  --muted: #5c655c;
  --line: #cbc5b8;
  --accent: #b43f1f;
  --code: #20251f;
  --code-text: #e8eadf;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #181b18;
    --surface: #232823;
    --text: #edf0e8;
    --muted: #aab2a7;
    --line: #3c443c;
    --accent: #ff7651;
    --code: #0f120f;
    --code-text: #e8eadf;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a { color: var(--accent); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 0.14em; }

.site-header {
  width: min(100% - 2rem, 74rem);
  margin: 0 auto;
  padding: 1.25rem 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.site-name {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.site-header nav { display: flex; flex-wrap: wrap; gap: 0.45rem 1.1rem; }
.site-header nav a { color: var(--muted); font-size: 0.88rem; text-decoration: none; }
.site-header nav a[aria-current="page"], .site-header nav a:hover { color: var(--accent); }

main {
  width: min(100% - 2rem, 52rem);
  margin: 0 auto;
  padding: 5rem 0 8rem;
}

.hero { padding: 1.5rem 0 6rem; }
.hero h1, .page-header h1 {
  max-width: 15ch;
  margin: 0.15em 0 0.35em;
  font-size: clamp(2.7rem, 8vw, 5.8rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero > p:last-child, .standfirst, .intro {
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.18rem;
}

.eyebrow, .meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0.095em;
  text-transform: uppercase;
}

.eyebrow a { text-decoration: none; }
.page-header { margin-bottom: 3.5rem; }
.page-header h1 { font-size: clamp(2.5rem, 7vw, 4.8rem); }

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.section-heading h2 { margin: 0; }

.post-list article {
  padding: 1.65rem 0;
  border-bottom: 1px solid var(--line);
}

.post-list h2 { margin: 0.1rem 0 0.25rem; font-size: 1.55rem; line-height: 1.25; }
.post-list h2 a { color: var(--text); text-decoration: none; }
.post-list h2 a:hover { color: var(--accent); }
.post-list article > p:last-child { margin-bottom: 0; color: var(--muted); }

.prose { max-width: 46rem; }
.prose h2 { margin-top: 2.5em; line-height: 1.2; }
.prose img { max-width: 100%; height: auto; border-radius: 0.25rem; }
.prose pre {
  overflow-x: auto;
  padding: 1rem 1.2rem;
  border-radius: 0.3rem;
  background: var(--code);
  color: var(--code-text);
  font-size: 0.82rem;
  line-height: 1.5;
}
.prose :not(pre) > code { padding: 0.1em 0.3em; background: var(--surface); border-radius: 0.2rem; }

.audio-card {
  margin: 2rem 0;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.35rem;
  background: var(--surface);
}
.audio-card figcaption { margin-bottom: 0.7rem; font-weight: 750; }
.audio-card audio { display: block; width: 100%; }
.audio-card audio[hidden] { display: none; }
.audio-card .audio-load {
  padding: 0.55rem 0.85rem;
  border: 1px solid var(--accent);
  border-radius: 0.25rem;
  background: var(--accent);
  color: var(--bg);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}
.audio-card .download { display: inline-block; margin-top: 0.6rem; font-size: 0.85rem; }

.tags { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 3rem; }
.tags a { font-size: 0.82rem; text-decoration: none; }

@media (max-width: 36rem) {
  html { font-size: 16px; }
  .site-header { align-items: flex-start; flex-direction: column; }
  main { padding-top: 3rem; }
  .hero { padding-bottom: 4rem; }
}
