/* header */
.site-header { position: relative; border-bottom: 1px solid var(--border); background: var(--bg); }
.site-header .container { display: flex; align-items: center; gap: var(--space-6); min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; font: 700 var(--fs-xl)/1 var(--font-display); letter-spacing: -0.01em; text-decoration: none; }
.nav { display: flex; align-items: center; gap: var(--space-2); }
.nav-list { display: flex; align-items: center; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.nav a:not(.btn) { min-height: 44px; display: inline-flex; align-items: center; padding: 0 var(--space-3); border-radius: var(--radius-pill); font-weight: 700; text-decoration: none; }
.nav a:not(.btn):hover { background: var(--surface-sunken); }
.nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.menu-btn { display: none; width: var(--tap); height: var(--tap); padding: 0; border: 1.5px solid var(--border-strong); border-radius: var(--radius-pill); background: var(--surface); color: var(--fg); place-items: center; cursor: pointer; }
.menu-btn:hover { background: var(--surface-sunken); }
.menu-btn .icon-close, .menu-btn[aria-expanded="true"] .icon-open { display: none; }
.menu-btn[aria-expanded="true"] .icon-close { display: block; }
@media (max-width: 760px) {
  .menu-btn { display: inline-grid; }
  .site-header .container { gap: var(--space-2); min-height: 68px; }
  .brand { font-size: var(--fs-lg); }
  .nav { display: none; position: absolute; z-index: 10; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; padding: var(--space-3) var(--gutter) var(--space-5); background: var(--bg); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-dropdown); }
  .nav.is-open { display: flex; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav a:not(.btn) { min-height: 52px; font-size: var(--fs-lg); }
  .nav .btn { margin-top: var(--space-2); }
}

/* footer */
.site-footer { margin-top: auto; background: var(--surface-sunken); border-top: 1px solid var(--border); padding-block: var(--space-12) var(--space-8); }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-6); align-items: flex-start; }
.foot-theme { margin-left: auto; align-self: flex-end; }
.foot-grid p { margin: var(--space-2) 0 0; color: var(--fg-2); max-width: 36ch; }
.foot-links { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); list-style: none; margin: 0; padding: 0; align-items: center; }
.foot-links li { color: var(--fg-2); }
.foot-links a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 700; text-underline-offset: 4px; }

/* sections shared by the homepage and the article lists */
.section-head { max-width: 640px; margin-bottom: clamp(32px, 4vw, 56px); }
.section-head p:not(.eyebrow) { margin: var(--space-3) 0 0; font-size: var(--fs-lg); color: var(--fg-2); }
.section-head--flush { margin: 0; }
.section--tight { padding-top: 0; }
.benefits + .section--tight { padding-top: var(--section-y); }
.section-foot { margin-top: var(--space-8); }

/* pages and articles */
.page-article { padding-block: clamp(32px, 5vw, 64px) var(--section-y); }
.read { max-width: var(--measure); margin-inline: auto; }
.page-title { margin: 0 0 var(--space-6); font: 700 var(--fs-article-h1)/1.08 var(--font-display); letter-spacing: -0.025em; }
.prose { font-size: var(--fs-lg); line-height: var(--lh-read); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: var(--space-12) 0 var(--space-3); font: 700 var(--fs-xl)/1.2 var(--font-display); letter-spacing: -0.01em; }
.prose h3 { margin: var(--space-8) 0 var(--space-2); font: 700 var(--fs-lg)/1.25 var(--font-display); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: var(--space-1); }
.prose img { border-radius: var(--radius-md); }
.crumbs ol { list-style: none; margin: 0 0 var(--space-6); padding: 0; display: flex; flex-wrap: wrap; gap: 0 var(--space-2); font-size: var(--fs-sm); color: var(--fg-2); }
.crumbs li { display: inline-flex; align-items: center; gap: var(--space-2); }
.crumbs li + li::before { content: "›"; color: var(--muted); }
.crumbs a { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; text-underline-offset: 3px; }
.byline { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-5); margin: calc(-1 * var(--space-3)) 0 var(--space-6); padding: 0 0 var(--space-6); list-style: none; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); color: var(--muted); font-weight: 600; }
.cover { margin: 0 0 var(--space-8); }
.cover img { border-radius: var(--radius-lg); display: block; }

/* lists of articles */
.list-title { margin-bottom: clamp(32px, 4vw, 56px); }
.post-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.post-card { display: flex; flex-direction: column; height: 100%; text-decoration: none; }
.post-card .frame { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); display: grid; place-items: center; overflow: hidden; position: relative; }
.post-card .frame .icon { width: 56px; height: 56px; stroke-width: 1.4; }
.post-card .frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post-card .eyebrow { margin: var(--space-4) 0 var(--space-2); }
.post-card :is(h2, h3) { margin: 0; font: 700 var(--fs-xl)/1.22 var(--font-display); letter-spacing: -0.01em; }
.post-card:hover :is(h2, h3) { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.post-card .small { margin: var(--space-2) 0 0; }
.navigation.pagination { margin-top: var(--space-8); }
.navigation.pagination .nav-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.navigation.pagination .page-numbers { min-height: 44px; min-width: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 var(--space-3); border-radius: var(--radius-pill); font-weight: 700; text-decoration: none; }
.navigation.pagination .page-numbers.current { background: var(--surface-sunken); border: 1px solid var(--border-strong); }
.empty-state { max-width: 44ch; }
.empty-state p { margin: 0 0 var(--space-5); font-size: var(--fs-lg); color: var(--fg-2); }
@media (max-width: 860px) {
  .post-grid { grid-template-columns: 1fr; gap: var(--space-5); }
  .post-card { flex-direction: row; gap: var(--space-4); align-items: center; }
  .post-card .frame { width: 112px; flex: none; aspect-ratio: 1; border-radius: var(--radius-md); }
  .post-card .frame .icon { width: 36px; height: 36px; }
  .post-card .eyebrow { margin-top: 0; }
  .post-card :is(h2, h3) { font-size: var(--fs-lg); }
  .post-card-text { min-width: 0; }
}
/* Zoom 200 %: a 112px thumbnail next to the text leaves no room for the text. */
@media (max-width: 340px) {
  .post-card { flex-direction: column; align-items: stretch; }
  .post-card .frame { width: auto; aspect-ratio: 4 / 3; }
  .post-card .eyebrow { margin-top: var(--space-3); }
}

/* 404 */
.not-found { padding-block: clamp(48px, 8vw, 120px); }
.not-found .lead { margin: 0 0 var(--space-8); max-width: 44ch; font-size: var(--fs-lg); color: var(--fg-2); }
.not-found-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-5); margin: 0; }
