:root {
  --bg: #f7f2e8;
  --surface: rgba(255, 252, 246, 0.88);
  --surface-strong: #fffaf1;
  --text: #1e1c18;
  --muted: #5f584c;
  --line: rgba(46, 41, 33, 0.12);
  --accent: #bf4f23;
  --accent-deep: #7d2d17;
  --accent-soft: #f1c9b7;
  --shadow: 0 18px 50px rgba(67, 40, 14, 0.08);
  --radius: 20px;
  --content: 72rem;
  --serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, Georgia, serif;
  --sans: "Avenir Next", "Segoe UI", "Helvetica Neue", Helvetica, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(191, 79, 35, 0.18), transparent 28rem),
    linear-gradient(180deg, #fcf7ef 0%, var(--bg) 100%);
}

a {
  color: inherit;
  text-decoration-color: rgba(191, 79, 35, 0.55);
  text-underline-offset: 0.16em;
}

a:hover {
  text-decoration-color: var(--accent);
}

.site-shell {
  min-height: 100vh;
}

.skip-link {
  position: absolute;
  left: -999px;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  background: var(--surface-strong);
  padding: 0.6rem 0.9rem;
  border-radius: 0.75rem;
}

.promo-bar,
.site-header,
.page-frame,
.site-footer {
  padding-inline: 1.25rem;
}

.promo-bar__inner,
.site-header__inner,
.site-footer__inner,
.hero,
.post-grid,
.pagination,
.archive-header,
.article-shell {
  max-width: var(--content);
  margin-inline: auto;
}

.promo-bar {
  position: sticky;
  top: 0;
  z-index: 50;
  padding-top: 0.75rem;
}

.promo-bar__inner {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  background: rgba(255, 248, 231, 0.96);
  border: 1px solid rgba(191, 79, 35, 0.14);
  border-radius: calc(var(--radius) - 6px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

.promo-bar__label,
.promo-bar__text,
.brand-block__copy,
.article-meta,
.post-card__meta,
.pagination,
.archive-header p,
.site-footer p {
  margin: 0;
}

.promo-bar__label,
.eyebrow {
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.promo-bar__text {
  flex: 1;
  color: #27323e;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.2rem;
  background: var(--accent);
  color: #fffaf6;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(125, 45, 23, 0.24);
}

.button--small {
  padding: 0.75rem 1rem;
}

.site-header {
  padding-top: 1rem;
}

.site-header__inner {
  display: grid;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.brand-block__title {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(2.1rem, 4vw, 3.6rem);
  line-height: 0.95;
  text-decoration: none;
}

.brand-block__copy {
  max-width: 46rem;
  margin-top: 0.75rem;
  color: var(--muted);
  line-height: 1.6;
}

.site-nav {
  display: grid;
  gap: 0.85rem;
}

.nav-group {
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.45);
}

.nav-group summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  list-style: none;
}

.nav-group summary::-webkit-details-marker {
  display: none;
}

.nav-group__items {
  margin: 0;
  padding: 0 1rem 1rem 1rem;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.page-frame {
  padding-top: 1.5rem;
  padding-bottom: 3rem;
}

.hero,
.archive-header,
.article-shell {
  padding: clamp(1.4rem, 3vw, 2.4rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero h1,
.archive-header h1,
.article-header h1 {
  margin: 0.35rem 0 0 0;
  font-family: var(--serif);
  font-size: clamp(1.9rem, 4vw, 3.6rem);
  line-height: 0.95;
}

.hero p:last-child,
.archive-header p:last-child {
  max-width: 48rem;
  margin-top: 1rem;
  color: var(--muted);
  line-height: 1.7;
}

.post-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.post-card {
  padding: 1.35rem;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) - 4px);
}

.post-card h2 {
  margin: 0.4rem 0 0.7rem 0;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.post-card__meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.post-card__link {
  font-weight: 600;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.25rem;
  padding: 0.25rem 0.1rem 0;
  color: var(--muted);
}

.article-header {
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--line);
}

.article-body {
  padding-top: 1.4rem;
}

.prose {
  font-size: 1.08rem;
  line-height: 1.8;
}

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

.prose h2,
.prose h3,
.prose h4 {
  margin-top: 2rem;
  margin-bottom: 0.8rem;
  font-family: var(--serif);
  line-height: 1.1;
}

.prose h2 {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.prose h3 {
  font-size: clamp(1.3rem, 2vw, 1.8rem);
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin-block: 1rem;
}

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

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

.prose .migration-callout {
  margin: 1.5rem 0;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(191, 79, 35, 0.18);
  border-radius: 1rem;
  background: rgba(241, 201, 183, 0.32);
}

.prose .migration-callout p {
  margin: 0;
}

.prose img,
.prose iframe {
  max-width: 100%;
}

.site-footer {
  padding-bottom: 2rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: flex-end;
  padding: 1.25rem 0;
  color: var(--muted);
}

@media (min-width: 900px) {
  .site-header__inner {
    grid-template-columns: minmax(0, 1.55fr) minmax(18rem, 1fr);
    align-items: start;
  }

  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 699px) {
  .promo-bar__inner {
    align-items: start;
    flex-direction: column;
  }

  .pagination {
    flex-direction: column;
    align-items: flex-start;
  }

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