/* ============================================================
   fieldnotes — editorial stylesheet
   Light first, dark under [data-theme="dark"].
   ============================================================ */

:root {
  --bg: #f5f2ea;
  --surface: #fffdf7;
  --ink: #14181a;
  --ink-soft: #3d4648;
  --muted: #717b78;
  --line: #ddd6c7;
  --line-strong: #c8c0ae;
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.10);
  --code-bg: #101817;
  --code-ink: #e8f0ec;
  --media-bg: #f7f5ef;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;

  --wrap: 1120px;
  --prose: 700px;
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

[data-theme="dark"] {
  --bg: #0c110f;
  --surface: #131a18;
  --ink: #f0ede4;
  --ink-soft: #c2cbc6;
  --muted: #8b9793;
  --line: #26312d;
  --line-strong: #35423d;
  --accent: #5eead4;
  --accent-soft: rgba(94, 234, 212, 0.10);
  --code-bg: #080d0c;
  --code-ink: #e6efe9;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

img { max-width: 100%; display: block; }

a { color: inherit; }

button { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 14px;
  transition: top 0.2s var(--ease);
}
.skip:focus { top: 12px; }

.wrap {
  width: min(100% - 48px, var(--wrap));
  margin-inline: auto;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 0;
}

.wordmark {
  font-family: var(--serif);
  font-size: 23px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
  line-height: 1;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-link {
  font-size: 13.5px;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--muted);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.nav-link:hover { color: var(--ink); border-bottom-color: var(--accent); }

.theme-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
  color: var(--ink-soft);
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), transform 0.2s var(--ease);
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--ink); transform: rotate(-12deg); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

/* ---------- hero ---------- */

.hero {
  padding: 72px 0 56px;
  margin-inline: auto;
  width: min(100% - 48px, 900px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 26px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}

.hero h1 {
  margin: 0 0 22px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(38px, 6.4vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-sub {
  margin: 0 0 26px;
  max-width: 620px;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--ink-soft);
}

.hero-meta {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.01em;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 14px; height: 14px; opacity: 0.8; }

/* ---------- section heads ---------- */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
}
.section-head h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.section-head .count {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* ---------- featured ---------- */

.featured {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 56px;
  align-items: center;
  padding: 40px 0 72px;
}

.featured-copy { min-width: 0; }

.featured-label {
  margin: 0 0 18px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.featured h2 {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.featured h2 a { text-decoration: none; }
.featured h2 a:hover { color: var(--accent); }

.featured p {
  margin: 0 0 24px;
  font-size: 16.5px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 46ch;
}

.featured-media {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--media-bg);
  aspect-ratio: 16 / 10;
}
.featured-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.6s var(--ease);
}
.featured-media:hover img { transform: scale(1.03); }

/* ---------- meta line ---------- */

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  font-size: 13px;
  color: var(--muted);
}
.meta span { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.meta svg { width: 14px; height: 14px; flex: none; opacity: 0.85; }
.meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }

/* ---------- archive list ---------- */

.archive { padding-bottom: 40px; }

.post-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 168px;
  gap: 28px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  position: relative;
}

.post-row .row-date {
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
}
.post-row .row-date strong {
  display: block;
  font-size: 19px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0;
  margin-bottom: 2px;
}

.post-row h3 {
  margin: 0 0 6px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 25px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.post-row:hover h3 { color: var(--accent); }

.post-row p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 62ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-row .row-min {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-transform: none;
}
.post-row .row-min svg { width: 12px; height: 12px; opacity: 0.8; }

.post-row .row-thumb {
  width: 168px;
  aspect-ratio: 16 / 11;
  border-radius: 9px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--media-bg);
}
.post-row .row-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.post-row:hover .row-thumb img { transform: scale(1.05); }

.post-row .row-arrow {
  position: absolute;
  right: -26px;
  top: 50%;
  transform: translate(-6px, -50%);
  opacity: 0;
  color: var(--accent);
  transition: opacity 0.2s var(--ease), transform 0.25s var(--ease);
}
.post-row:hover .row-arrow { opacity: 1; transform: translate(0, -50%); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 60px;
  padding: 40px 0 56px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
}
.footer-inner strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 18px;
  color: var(--ink);
}
.footer-inner a { color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.footer-inner a:hover { color: var(--ink); border-bottom-color: var(--accent); }

/* ---------- post page ---------- */

.progress {
  position: fixed;
  inset: 0 auto auto 0;
  height: 2px;
  width: 100%;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  z-index: 60;
  pointer-events: none;
}

.post-main { padding-bottom: 20px; }

.post-top {
  padding: 34px 0 0;
  max-width: 780px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s var(--ease), gap 0.2s var(--ease);
}
.back-link:hover { color: var(--ink); gap: 12px; }
.back-link svg { width: 15px; height: 15px; }

.post-header {
  max-width: 780px;
  margin-inline: auto;
  width: min(100% - 48px, 780px);
  padding: 42px 0 34px;
}

.post-kicker {
  margin: 0 0 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

.post-header h1 {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 5.2vw, 54px);
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.post-summary {
  margin: 0 0 28px;
  font-size: 18.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}

.post-header .meta {
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.post-cover {
  margin: 0 auto 8px;
  width: min(100% - 48px, var(--prose));
}
.cover-open { display: block; cursor: zoom-in; }
.post-cover img {
  width: auto;
  max-width: 100%;
  max-height: 540px;
  margin-inline: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--media-bg);
}
.cover-credit {
  margin: 9px 2px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.cover-credit a { color: inherit; text-decoration-color: var(--line-strong); text-underline-offset: 2px; }
.cover-credit a:hover { color: var(--ink); }
.cover-credit .credit-zoom { margin-left: 6px; color: var(--muted); }
.cover-credit .credit-zoom::before { content: "·"; margin-right: 6px; }

/* ---------- prose ---------- */

.prose {
  max-width: var(--prose);
  margin: 0 auto;
  padding: 44px 0 8px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.78;
  color: var(--ink-soft);
  overflow-wrap: break-word;
}

.prose > *:first-child { margin-top: 0; }

.prose p { margin: 0 0 1.35em; }

.prose h2 {
  margin: 2.1em 0 0.55em;
  font-family: var(--serif);
  font-size: clamp(25px, 3vw, 31px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--ink);
  scroll-margin-top: 90px;
}

.prose h3 {
  margin: 1.9em 0 0.4em;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.prose strong { color: var(--ink); font-weight: 600; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.prose a:hover { color: var(--accent); }

.prose ul,
.prose ol {
  margin: 0 0 1.35em;
  padding-left: 1.3em;
}
.prose li { margin: 0.35em 0; padding-left: 0.2em; }
.prose li::marker { color: var(--accent); }

/* sources block at the end of a post */
.prose .refs-heading {
  margin: 2.6em 0 0.9em;
  padding-top: 1.15em;
  border-top: 1px solid var(--line);
  font-family: var(--sans);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose .refs-heading + ol {
  margin: 0;
  padding-left: 1.5em;
  font-size: 0.92em;
  line-height: 1.5;
}
.prose .refs-heading + ol li {
  margin: 0.22em 0;
  padding-left: 0.15em;
}
.prose .refs-heading + ol li::marker {
  font-family: var(--sans);
  font-size: 0.8em;
  color: var(--muted);
}

.prose blockquote {
  margin: 1.8em 0;
  padding: 4px 0 4px 22px;
  border-left: 2px solid var(--accent);
  font-style: italic;
  color: var(--ink);
}
.prose blockquote p:last-child { margin-bottom: 0; }

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.6em 0;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.82em;
  background: var(--accent-soft);
  color: var(--ink);
  padding: 0.14em 0.38em;
  border-radius: 4px;
}

.prose pre {
  margin: 1.6em 0;
  padding: 20px 22px;
  background: var(--code-bg);
  color: var(--code-ink);
  border-radius: 12px;
  overflow-x: auto;
  font-size: 13.5px;
  line-height: 1.65;
  border: 1px solid var(--line);
}
.prose pre code {
  background: none;
  padding: 0;
  font-size: inherit;
  color: inherit;
  border-radius: 0;
  white-space: pre;
}

.prose table {
  width: 100%;
  margin: 1.8em 0;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 14.5px;
  line-height: 1.5;
}
.prose th {
  text-align: left;
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--line-strong);
  font-size: 11.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.prose td {
  padding: 11px 14px 11px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.prose tr:last-child td { border-bottom: 0; }

.prose figure { margin: 2em 0; }
.prose figure img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--media-bg);
}
.prose figcaption {
  margin-top: 9px;
  font-family: var(--sans);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- post footer / nav ---------- */

.post-end {
  max-width: var(--prose);
  margin: 0 auto;
  padding: 36px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.post-nav {
  max-width: var(--prose);
  margin: 44px auto 0;
  width: min(100% - 48px, var(--prose));
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.post-nav a {
  padding: 22px 0 24px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: color 0.15s var(--ease);
}
.post-nav a.nav-prev { grid-column: 1; padding-right: 28px; }
.post-nav a.nav-next { grid-column: 2; text-align: right; align-items: flex-end; padding-left: 28px; }
.post-nav a.nav-prev + a.nav-next { border-left: 1px solid var(--line); }
.post-nav a.solo { grid-column: 1 / -1; }
.post-nav .nav-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.post-nav .nav-title {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.3;
  max-width: 34ch;
}
.post-nav a:hover { color: var(--accent); }
.post-nav svg { width: 14px; height: 14px; }

/* ---------- states ---------- */

.loading,
.error-box {
  max-width: var(--prose);
  margin: 40px auto;
  font-size: 15px;
  color: var(--muted);
}
.error-box {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--surface);
}
.error-box h2 {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  color: var(--ink);
}
.error-box a { color: var(--accent); }

/* ---------- entry animation ---------- */

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
.hero > *,
.featured,
.section-head,
.post-row {
  animation: rise 0.55s var(--ease) both;
}
.hero h1 { animation-delay: 0.04s; }
.hero-sub { animation-delay: 0.09s; }
.hero-meta { animation-delay: 0.13s; }
.featured { animation-delay: 0.08s; }
.post-row:nth-of-type(1) { animation-delay: 0.02s; }
.post-row:nth-of-type(2) { animation-delay: 0.05s; }
.post-row:nth-of-type(3) { animation-delay: 0.08s; }
.post-row:nth-of-type(4) { animation-delay: 0.11s; }
.post-row:nth-of-type(n + 5) { animation-delay: 0.13s; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .featured {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 52px;
  }
  .featured-media { order: -1; aspect-ratio: 16 / 9; }
  .featured p { max-width: none; }
  .post-row { grid-template-columns: 64px minmax(0, 1fr) 128px; gap: 18px; }
  .post-row .row-thumb { width: 128px; }
  .post-row .row-arrow { display: none; }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 32px, var(--wrap)); }
  .header-inner { padding: 12px 0; }
  .wordmark { font-size: 20px; }
  .site-nav { gap: 12px; }
  .nav-link { font-size: 13px; }
  .theme-toggle { width: 34px; height: 34px; }

  .hero {
    width: min(100% - 32px, 900px);
    padding: 36px 0 30px;
  }
  .eyebrow { margin-bottom: 18px; }
  .hero h1 { font-size: clamp(31px, 9.6vw, 42px); line-height: 1.07; }
  .hero-sub { font-size: 15.5px; margin-bottom: 20px; }
  .hero-meta { font-size: 12.5px; gap: 6px 14px; }

  .featured { gap: 22px; padding: 26px 0 42px; }
  .featured-media { aspect-ratio: 16 / 10; }
  .featured-label { margin-bottom: 12px; }
  .featured h2 { font-size: clamp(26px, 7.6vw, 32px); margin-bottom: 14px; }
  .featured p { font-size: 15.5px; margin-bottom: 18px; }

  .post-row {
    grid-template-columns: minmax(0, 1fr) 84px;
    grid-template-areas:
      "date date"
      "text thumb";
    gap: 5px 14px;
    padding: 18px 0;
    align-items: start;
  }
  .post-row .row-date {
    grid-area: date;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    line-height: 1;
    letter-spacing: 0.08em;
  }
  .post-row .row-date strong {
    display: inline;
    font-size: 10.5px;
    font-weight: 500;
    color: var(--muted);
    margin: 0;
  }
  .post-row .row-body { grid-area: text; }
  .post-row .row-thumb { grid-area: thumb; width: 84px; aspect-ratio: 1 / 1; border-radius: 8px; }
  .post-row h3 { font-size: 18.5px; margin-bottom: 5px; }
  .post-row p { font-size: 13.5px; line-height: 1.5; }
  .post-row .row-min { display: inline-flex; margin: 0; line-height: 1; }

  .post-top { padding-top: 22px; }
  .post-header { width: min(100% - 32px, 780px); padding: 26px 0 24px; }
  .post-header h1 { font-size: clamp(29px, 8.4vw, 38px); }
  .post-summary { font-size: 16px; margin-bottom: 22px; }
  .post-header .meta { padding-top: 16px; font-size: 12.5px; gap: 5px 12px; }

  .post-cover { width: min(100% - 32px, var(--prose)); }
  .post-cover img { max-height: 460px; border-radius: 10px; }
  .cover-credit { font-size: 11.5px; margin-top: 8px; }

  .prose {
    width: min(100% - 32px, var(--prose));
    padding: 28px 0 6px;
    font-size: 17.5px;
    line-height: 1.72;
  }
  .prose h2 { font-size: 25px; margin-top: 1.7em; }
  .prose h3 { font-size: 16.5px; }
  .prose pre { padding: 16px; border-radius: 10px; font-size: 12.5px; }
  .prose table { font-size: 13.5px; }

  .post-end {
    width: min(100% - 32px, var(--prose));
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding-top: 30px;
  }

  .post-nav {
    width: min(100% - 32px, var(--prose));
    grid-template-columns: 1fr;
    margin-top: 34px;
  }
  .post-nav a.nav-prev,
  .post-nav a.nav-next,
  .post-nav a.solo {
    grid-column: 1;
    text-align: left;
    align-items: flex-start;
    padding: 18px 0;
  }
  .post-nav a.nav-prev + a.nav-next {
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .post-nav .nav-title { font-size: 17px; max-width: none; }

  .site-footer { margin-top: 42px; padding: 28px 0 40px; }
  .footer-inner { font-size: 12.5px; gap: 10px; }
}

@media (max-width: 420px) {
  .wordmark { font-size: 18px; }
  .site-nav { gap: 9px; }
  .hero h1 { font-size: 30px; }
  .post-row { grid-template-columns: minmax(0, 1fr) 72px; }
  .post-row .row-thumb { width: 72px; }
  .post-row h3 { font-size: 17.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- highlight.js tokens ---------- */

.hljs-comment,
.hljs-quote { color: #7f918b; font-style: italic; }
.hljs-keyword,
.hljs-selector-tag,
.hljs-literal,
.hljs-type { color: #7dd3fc; }
.hljs-string,
.hljs-regexp,
.hljs-addition { color: #a7e8bd; }
.hljs-number,
.hljs-symbol,
.hljs-bullet { color: #f5c88a; }
.hljs-title,
.hljs-section,
.hljs-name,
.hljs-function .hljs-title { color: #5eead4; }
.hljs-built_in,
.hljs-class .hljs-title { color: #c4b5fd; }
.hljs-attr,
.hljs-attribute,
.hljs-variable,
.hljs-template-variable { color: #f0b7c8; }
.hljs-meta { color: #94a3b8; }
.hljs-emphasis { font-style: italic; }
.hljs-strong { font-weight: 700; }
