:root {
  --bg: #f3ecdf;
  --bg-raised: rgba(255, 251, 245, 0.72);
  --ink: #1c1916;
  --muted: #5c554c;
  --line: #e0d5c4;
  --accent: #8d3414;
  --pine: #1d3b33;
  --display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  --text: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "Outfit", "Avenir Next", "Segoe UI", sans-serif;
  --shadow: 0 20px 50px rgba(48, 32, 16, 0.06);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  background-color: var(--bg);
  background-image:
    radial-gradient(1100px 480px at 0% -10%, rgba(141, 52, 20, 0.07), transparent 55%),
    radial-gradient(900px 420px at 100% 0%, rgba(29, 59, 51, 0.07), transparent 50%);
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 50;
  padding: 0.4rem 0.7rem;
  background: var(--ink);
  color: var(--bg);
  text-decoration: none;
}

.skip:focus {
  top: 0.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.mast {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 0.75rem 0;
  background: rgba(243, 236, 223, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.mast-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.15rem;
  width: min(48rem, calc(100% - 2.4rem));
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  font-weight: 560;
  letter-spacing: -0.03em;
  text-decoration: none;
  white-space: nowrap;
}

.monogram {
  display: inline-grid;
  width: 2.15rem;
  height: 2.15rem;
  place-items: center;
  border-radius: 50%;
  background: var(--pine);
  color: #f6f0e6;
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
}

.nav a {
  color: var(--muted);
  font-size: 0.95rem;
  text-decoration: none;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.finder {
  flex: 1 1 11rem;
  margin-left: auto;
}

.finder input {
  width: 100%;
  padding: 0.48rem 0.95rem;
  color: inherit;
  font: inherit;
  background: rgba(255, 251, 245, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
}

.finder input:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: transparent;
}

.wrap {
  width: min(48rem, calc(100% - 2.4rem));
  margin: 0 auto;
  padding-bottom: 4.5rem;
}

.hero {
  padding: 3.2rem 0 1.2rem;
}

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

.hero h1,
.page-title {
  margin: 0.25rem 0 0.8rem;
  font-family: var(--display);
  font-size: clamp(3.4rem, 9vw, 6.5rem);
  font-weight: 560;
  letter-spacing: -0.04em;
  line-height: 0.9;
}

.page-title {
  font-size: clamp(2.8rem, 7vw, 4.6rem);
  padding-top: 2.2rem;
}

.lede {
  max-width: 38rem;
  margin: 0;
  font-family: var(--text);
  font-size: 1.35rem;
  line-height: 1.45;
}

.hero-note {
  max-width: 38rem;
  margin: 0.9rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.years {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  margin: 1.6rem 0 0.4rem;
  padding: 0;
  list-style: none;
}

.years a {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  text-decoration: none;
}

.years a:hover {
  color: var(--accent);
}

.result-count {
  min-height: 1.2rem;
  margin: 0.8rem 0 0;
  color: var(--accent);
  font-size: 0.92rem;
}

.empty {
  margin: 2rem 0;
  font-family: var(--text);
  font-size: 1.2rem;
}

.year {
  margin: 2.6rem 0 0.15rem;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.7rem);
  font-weight: 560;
  letter-spacing: -0.03em;
}

.entry {
  display: grid;
  grid-template-columns: 6.6rem 1fr;
  gap: 0.35rem 1.1rem;
  padding: 1rem 0 1.05rem;
  border-top: 1px solid var(--line);
}

.entry time {
  padding-top: 0.28rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-variant-numeric: tabular-nums;
}

.entry h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.entry h2 a {
  color: inherit;
  text-decoration: none;
}

.entry h2 a:hover {
  color: var(--accent);
}

.excerpt {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-family: var(--text);
  font-size: 1.02rem;
  line-height: 1.45;
}

.cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.7rem;
  margin: 0.45rem 0 0;
}

.cats a,
.cat-link {
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.cats a:hover,
.cat-link:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.topics {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.topics a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.15rem);
  letter-spacing: -0.03em;
  text-decoration: none;
}

.topics a:hover {
  color: var(--accent);
}

.topics .count {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.95rem;
  letter-spacing: 0;
}

.post-head {
  padding-top: 2.4rem;
}

.post-head h1 {
  margin: 0.45rem 0 0.7rem;
  font-family: var(--display);
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.byline {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.tags {
  margin: 0.7rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.prose {
  margin-top: 1.8rem;
  font-family: var(--text);
  font-size: 1.16rem;
  line-height: 1.68;
}

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

.prose p,
.prose ul,
.prose ol,
.prose blockquote,
.prose pre,
.prose table,
.prose figure {
  margin: 1rem 0;
}

.prose h2,
.prose h3,
.prose h4 {
  margin: 2.1rem 0 0.55rem;
  font-family: var(--display);
  font-weight: 560;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.prose h2 { font-size: 1.75rem; }
.prose h3 { font-size: 1.4rem; }
.prose h4 { font-size: 1.2rem; }

.prose a {
  color: var(--pine);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.prose a:hover {
  color: var(--accent);
}

.prose strong,
.prose b {
  font-weight: 600;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
}

.prose li + li {
  margin-top: 0.3rem;
}

.prose li::marker {
  color: var(--accent);
}

.prose blockquote {
  margin-left: 0;
  padding-left: 1rem;
  color: var(--pine);
  border-left: 2px solid var(--accent);
}

.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.35rem auto;
  border-radius: 12px;
}

.prose img.icon {
  display: inline-block;
  margin: 0.15rem 0.4rem 0.15rem 0;
  border-radius: 6px;
  vertical-align: middle;
}

.prose .gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.65rem;
  margin: 1.4rem 0;
}

.prose .gallery a {
  display: block;
}

.prose .gallery img {
  width: 100%;
  max-height: 280px;
  margin: 0;
  object-fit: contain;
  background: #ebe3d4;
  border-radius: 10px;
}

.prose figcaption {
  margin-top: -0.7rem;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.88rem;
  text-align: center;
}

.prose .video {
  position: relative;
  height: 0;
  margin: 1.4rem 0;
  padding-top: 56.25%;
}

.prose .video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

.prose pre {
  padding: 1rem 1.05rem;
  overflow: auto;
  color: #f6f0e6;
  background: #1c1916;
  border-radius: 12px;
}

.prose code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88em;
}

.prose p code,
.prose li code {
  padding: 0.08em 0.3em;
  background: rgba(29, 59, 51, 0.08);
  border-radius: 4px;
}

.table-wrap {
  overflow-x: auto;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--sans);
  font-size: 0.95rem;
}

.prose th,
.prose td {
  padding: 0.45rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

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

.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
  margin-top: 3rem;
}

.post-nav a {
  display: block;
  min-height: 100%;
  padding: 0.95rem 1rem;
  color: inherit;
  text-decoration: none;
  background: var(--bg-raised);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.post-nav a:hover {
  border-color: #c9bba6;
}

.post-nav .label {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.post-nav .next {
  text-align: right;
}

.post-nav strong {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 560;
  letter-spacing: -0.02em;
}

.comments {
  margin-top: 3rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--line);
}

.comments h2 {
  margin: 1rem 0;
  font-family: var(--display);
  font-size: 1.8rem;
  font-weight: 560;
}

.comment {
  padding: 0.85rem 0;
  border-top: 1px solid var(--line);
}

.comment.child {
  margin-left: 1.2rem;
}

.who {
  margin: 0 0 0.3rem;
  color: var(--muted);
  font-size: 0.86rem;
}

.who b {
  color: var(--ink);
  font-weight: 600;
}

.comment p:last-child {
  margin: 0;
  font-family: var(--text);
  font-size: 1.05rem;
}

.footer {
  padding: 1.4rem 1.2rem 2rem;
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
  border-top: 1px solid var(--line);
}

.footer a {
  color: var(--pine);
}

#lightbox {
  max-width: 95vw;
  max-height: 95vh;
  padding: 0;
  background: transparent;
  border: 0;
}

#lightbox::backdrop {
  background: rgba(28, 25, 22, 0.86);
}

#lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 10px;
}

@media (max-width: 720px) {
  .finder {
    flex-basis: 100%;
    margin-left: 0;
  }

  .entry {
    grid-template-columns: 1fr;
    gap: 0.15rem;
  }

  .entry time {
    padding-top: 0;
  }

  .post-nav {
    grid-template-columns: 1fr;
  }

  .post-nav .next {
    text-align: left;
  }

  .hero {
    padding-top: 2.2rem;
  }
}

@media print {
  .mast,
  .finder,
  .footer,
  .post-nav,
  .years,
  #lightbox {
    display: none !important;
  }

  body {
    background: white;
  }

  .prose a {
    text-decoration: none;
  }
}
