:root {
  color-scheme: light;
  --bg: #f8f7f2;
  --surface: #fff;
  --ink: #17251f;
  --muted: #516159;
  --accent: #205641;
  --tint: #e4eee7;
  --line: #dce2dc;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); }
body[data-palette="ocean"] { --ink: #162b3b; --muted: #4e6271; --accent: #1a526f; --tint: #e2edf3; --line: #d5e1e9; }
body[data-palette="plum"] { --ink: #30223a; --muted: #65566e; --accent: #653f7a; --tint: #eee5f3; --line: #e2d9e8; }
body[data-font="serif"] { font-family: Georgia, "Times New Roman", serif; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { text-decoration-thickness: .15em; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.15; letter-spacing: -.035em; }
h1 { font-size: clamp(2.75rem, 7vw, 5.5rem); margin: .35em 0; max-width: 16ch; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.65rem; margin: .3em 0 .65em; }
.shell { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding-block: 1.75rem; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: .65rem; color: var(--ink); text-decoration: none; font-weight: 750; font-size: 1.25rem; }
.brand-mark { display: grid; place-items: center; background: var(--accent); color: white; border-radius: .65rem; width: 2.3rem; height: 2.3rem; font-family: system-ui, sans-serif; }
nav { display: flex; gap: 1.5rem; }
nav a { text-decoration: none; font-weight: 600; }
.hero { padding-block: clamp(3rem, 8vw, 6rem); }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .12em; font-size: .75rem; font-weight: 750; }
.lede { font-size: 1.25rem; max-width: 55ch; color: var(--muted); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.section-heading span, .meta { color: var(--muted); font-size: .85rem; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; padding-block: 1rem 4rem; }
.post-card { background: var(--surface); border: 1px solid var(--line); border-radius: 1rem; overflow: hidden; }
.post-card > img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card-content { padding: 2rem; }
.card-content h3 a { color: var(--ink); text-decoration: none; }
.card-content h3 a:hover { text-decoration: underline; }
.card-content > p:not(.eyebrow):not(.meta) { color: var(--muted); }
.meta span { padding-inline: .4rem; }
.empty-state { grid-column: 1 / -1; background: var(--tint); border-radius: 1rem; padding: 3rem; }
.empty-state p { color: var(--muted); margin-bottom: 0; }
.site-footer { border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 1rem; padding-block: 2rem; font-size: .85rem; color: var(--muted); }
.post { max-width: 780px; margin: 3rem auto 5rem; }
.back-link { font-size: .9rem; }
.post-header { margin-block: 2.5rem; }
.post-header h1 { font-size: clamp(2.5rem, 6vw, 4rem); }
.cover { width: 100%; border-radius: 1rem; margin-top: 2rem; }
.prose { font-size: 1.1rem; overflow-wrap: anywhere; }
.prose h2, .prose h3 { margin-top: 2em; }
.prose blockquote { border-left: 3px solid var(--accent); margin-inline: 0; padding-left: 1.5rem; color: var(--muted); }
.prose pre { overflow-x: auto; background: var(--tint); padding: 1rem; border-radius: .5rem; }
.prose code { font-size: .9em; }
.prose table { border-collapse: collapse; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: .5rem .75rem; }
.skip-link { position: absolute; top: -5rem; left: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 2; }
.skip-link:focus { top: 1rem; }
body[data-density="compact"] .card-content { padding: 1.25rem; }
body[data-density="compact"] .hero { padding-block: 3rem; }
@media (max-width: 640px) {
  .shell { width: calc(100% - 2rem); }
  .site-header { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .post-grid { grid-template-columns: 1fr; }
  .card-content, .empty-state { padding: 1.5rem; }
  .site-footer { flex-direction: column; }
}
