.page-stack {
  background: #fbf8f2;
  color: #202522;
}

.page-stack h1,
.page-stack h2,
.page-stack h3,
.page-stack h4 {
  font-family: var(--font-serif);
}

.page-stack p,
.page-stack input,
.page-stack button,
.page-stack select,
.page-stack textarea,
.page-stack a,
.page-stack span {
  font-family: var(--font-sans);
}

body[data-page="articles"] {
  background: #fbf8f2;
}

body[data-page="articles"]::before {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(251, 248, 242, 0.18));
}

body[data-page="articles"] #site-shell,
body[data-page="articles"] .site-main {
  background: #fbf8f2;
}

.page-stack {
  font-family: var(--font-sans);
  gap: 2.5rem;
}

.articles-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(16rem, 0.75fr);
  gap: 1.25rem;
  align-items: stretch;
  padding: 1.15rem 0 0.35rem;
}

.articles-hero-copy,
.articles-hero-meta {
  border: 1px solid #d9d5cc;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 248, 242, 0.92));
}

.articles-hero-copy {
  display: grid;
  gap: 0.7rem;
  padding: clamp(1.35rem, 3vw, 2.3rem);
}

.articles-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  color: #cb6548;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.articles-hero-kicker::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: #95b75e;
}

.articles-hero-copy h1 {
  margin: 0;
  color: #1d221f;
  font-size: clamp(2.25rem, 4.8vw, 4rem);
  line-height: 0.98;
}

.articles-hero-copy p {
  max-width: 40rem;
  margin: 0;
  color: #646861;
  font-family: var(--font-body);
  font-size: 0.92rem;
  line-height: 1.7;
}

.articles-hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
}

.articles-hero-stat {
  display: grid;
  place-content: center;
  gap: 0.35rem;
  min-height: 100%;
  padding: 1.3rem;
  text-align: center;
}

.articles-hero-stat + .articles-hero-stat {
  border-left: 1px solid #d9d5cc;
}

.articles-hero-stat strong {
  color: #1a2f23;
  font-family: var(--font-serif);
  font-size: clamp(1.9rem, 3vw, 2.6rem);
  font-weight: 600;
  line-height: 1;
}

.articles-hero-stat span {
  color: #7b7b75;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-header h1 {
  color: #1d221f;
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.08;
}

.section-header p,
.stories-toolbar,
.filter-row,
.toolbar-actions,
#stories-status,
#stories-results,
.stories-load-more {
  font-family: var(--font-body);
}

.section-header {
  padding-bottom: 1.15rem;
  gap: 0.6rem;
}

.section-header span {
  width: fit-content;
}

.stories-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.9rem;
  border: 1px solid #d9d5cc;
  border-radius: 0;
  background: #fbf8f2;
  padding: 1rem 1.1rem;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-width: 0;
  width: 100%;
}

.filter-row button,
.filter-row a,
.view-toggle button,
.view-toggle a {
  border: 1px solid #d9d5cc;
  border-radius: 0;
  background: #fff;
  color: #7b7b75;
  cursor: pointer;
  padding: 0.5rem 0.8rem;
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 220ms ease, border-color 220ms ease, background 220ms ease, transform 220ms ease;
}

.filter-row button.active,
.filter-row a.active,
.filter-row button:hover,
.filter-row a:hover,
.view-toggle button.active,
.view-toggle a.active {
  border-color: #131f1c;
  background: #131f1c;
  color: #f8f5ef;
  transform: translateY(-1px);
}

.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  width: 100%;
  justify-content: space-between;
}

.toolbar-actions-bottom {
  border-top: 1px solid #d9d5cc;
  padding-top: 0.9rem;
}

.search-field {
  position: relative;
  min-width: min(22rem, 100%);
}

.search-field span {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  color: var(--sage);
  font-size: 0;
  transform: translateY(-50%);
}

.search-field span::before {
  content: "Search";
  font-size: 0.7rem;
}

.search-field input {
  width: 100%;
  border: 1px solid #d9d5cc;
  border-radius: 0;
  background: #fff;
  color: #202522;
  padding: 0.8rem 0.9rem 0.8rem 3.1rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
}

.view-toggle {
  display: flex;
  border: 1px solid #d9d5cc;
  border-radius: 0;
  background: #fbf8f2;
  padding: 0.15rem;
  overflow: hidden;
}

#stories-status {
  color: #7b7b75;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#stories-results.list-mode {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

#stories-results {
  gap: 1.25rem;
}

.stories-load-more-wrap {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.stories-load-more {
  min-width: 16rem;
  border: 1px solid #d9d5cc;
  border-radius: 0;
  background: #131f1c;
  color: #f8f5ef;
  cursor: pointer;
  padding: 0.9rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stories-load-more[hidden] {
  display: none;
}

@media (max-width: 900px) {
  .articles-hero {
    grid-template-columns: 1fr;
  }

  .stories-toolbar,
  .toolbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-row,
  .view-toggle {
    width: 100%;
  }

  .search-field {
    min-width: 0;
    width: 100%;
  }

  .search-field input {
    width: 100%;
  }

  .stories-load-more {
    width: 100%;
    min-width: 0;
  }

  .toolbar-actions-bottom {
    padding-top: 0.8rem;
  }
}

@media (max-width: 640px) {
  .articles-hero {
    gap: 0.9rem;
    padding-top: 0.55rem;
  }

  .articles-hero-meta {
    grid-template-columns: 1fr 1fr;
  }

  .section-header {
    padding-bottom: 1rem;
  }

  .section-header h1 {
    font-size: clamp(2rem, 11vw, 2.65rem);
  }

  .filter-row button,
  .filter-row a,
  .view-toggle button,
  .view-toggle a {
    padding: 0.58rem 0.85rem;
    font-size: 0.6rem;
  }

  .toolbar-actions-bottom {
    gap: 0.65rem;
  }

  .view-toggle {
    width: 100%;
  }

  .view-toggle a,
  .view-toggle button {
    flex: 1 1 0;
    justify-content: center;
  }
}

@media (max-width: 460px) {
  .articles-hero-copy,
  .articles-hero-stat {
    padding: 1rem;
  }

  .articles-hero-copy h1 {
    font-size: clamp(1.95rem, 12vw, 2.6rem);
  }

  .stories-toolbar {
    padding: 0.85rem;
  }

  .filter-row {
    gap: 0.4rem;
  }
}
