.stories-archive,
.story-article {
  width: min(100% - 40px, 1120px);
  margin-inline: auto;
  color: var(--text-main);
}

.stories-archive {
  padding-block: 30px 64px;
}

.stories-archive > h1,
.story-article > h1 {
  max-width: 32ch;
  margin: 0;
  color: #242126;
  font-family: var(--font-body);
  font-size: clamp(32px, 4.2vw, 48px);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-wrap: pretty;
}

.stories-section-heading {
  margin: 24px 0 0;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--brand-primary);
  color: #262228;
  font-family: var(--font-body);
  font-size: 21px;
  font-weight: 700;
  line-height: 1.3;
}

.stories-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin: 18px 0 8px;
}

.stories-filters[hidden],
.stories-empty[hidden],
.stories-card[hidden] {
  display: none !important;
}

.stories-filters input,
.stories-filters select,
.stories-filters__details summary {
  min-height: 40px;
  border: 1px solid #d7d3d8;
  border-radius: 4px;
  background: #fff;
  color: #2d2930;
  font: inherit;
  font-size: 14px;
}

.stories-filters input {
  width: min(100%, 350px);
  padding: 8px 12px;
}

.stories-filters input::placeholder { color: #77727a; }
.stories-filters__details { position: relative; }
.stories-filters__details summary {
  display: flex;
  align-items: center;
  padding: 0 12px;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
}
.stories-filters__details summary::-webkit-details-marker { display: none; }
.stories-filters__details summary::after { margin-left: 10px; content: '+'; color: var(--brand-primary); font-size: 18px; }
.stories-filters__details[open] summary::after { content: '−'; }
.stories-filters__details summary:focus-visible,
.stories-filters input:focus-visible,
.stories-filters select:focus-visible,
.story-share button:focus-visible,
.stories-card a:focus-visible,
.story-breadcrumb a:focus-visible {
  outline: 3px solid var(--brand-accent);
  outline-offset: 2px;
}
.stories-filters__panel {
  position: absolute;
  z-index: 5;
  top: calc(100% + 6px);
  right: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  width: min(290px, calc(100vw - 40px));
  padding: 12px;
  border: 1px solid #ded9df;
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(35, 24, 38, 0.12);
}
.stories-filters__panel label { margin-top: 4px; font-size: 12px; font-weight: 600; }
.stories-filters select { width: 100%; padding: 7px 10px; }
.stories-filters [data-stories-status] { flex-basis: 100%; margin: 0; }

.stories-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin-top: 0;
  border-top: 1px solid #e3e0e4;
}

.stories-card {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  min-width: 0;
  padding: 16px 0;
  border-bottom: 1px solid #e3e0e4;
}

.stories-card__image-link {
  display: block;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 10;
  background: #f1eff2;
}
.stories-card__image-link img { display: block; width: 100%; height: 100%; object-fit: cover; }
.stories-card__body { min-width: 0; }
.stories-card__category {
  margin: 0 0 6px;
  color: var(--brand-primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.045em;
  line-height: 1.35;
  text-transform: uppercase;
}
.stories-card h3 {
  margin: 0;
  color: #242126;
  font-family: var(--font-body);
  font-size: clamp(18px, 2vw, 23px);
  font-weight: 700;
  line-height: 1.28;
  text-wrap: pretty;
}
.stories-card__link { color: inherit; text-decoration: none; }
.stories-card__link:hover { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 3px; }
.stories-card__byline { margin: 8px 0 0; color: #69646c; font-size: 12px; line-height: 1.5; }
.stories-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  margin: 8px 0 0;
  padding: 0;
  color: #68636b;
  font-size: 11px;
  line-height: 1.4;
  list-style: none;
}
.stories-tags li + li::before { margin-right: 10px; color: #aaa4ac; content: '·'; }
.stories-empty {
  margin: 18px 0 0;
  padding: 14px 0;
  border-bottom: 1px solid #e3e0e4;
  color: #514c54;
  font-size: 14px;
}
.stories-empty-state {
  margin-top: 18px;
  padding: 18px 0;
  border-top: 1px solid #e3e0e4;
  color: #514c54;
}
.stories-empty-state h2 { margin: 0 0 5px; color: #242126; font-family: var(--font-body); font-size: 20px; font-weight: 700; }
.stories-empty-state p { margin: 0; font-size: 14px; line-height: 1.6; }

.story-article {
  max-width: 900px;
  padding-block: 22px 60px;
}
.story-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 20px;
  color: #68636b;
  font-size: 12px;
  line-height: 1.5;
}
.story-breadcrumb a { color: var(--brand-primary); text-decoration: none; }
.story-breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }
.story-article > .eyebrow { margin: 0 0 7px; color: var(--brand-primary); font-size: 12px; font-weight: 700; letter-spacing: 0.045em; text-transform: uppercase; }
.story-article > h1 { max-width: 29ch; font-size: clamp(32px, 4vw, 46px); }
.story-article__byline,
.story-article__person { margin: 10px 0 0; color: #68636b; font-size: 13px; line-height: 1.55; }
.story-article__person { color: #3d3540; font-weight: 600; }
.story-article__cover {
  width: min(100%, 760px);
  max-height: 410px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 18px 0 22px;
  background: #f1eff2;
}
.story-article__cover img { display: block; width: 100%; height: 100%; max-height: 410px; object-fit: cover; }
.story-article__body {
  width: min(100%, 760px);
  margin-inline: 0;
  color: #29262b;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.story-article__body > * + * { margin-top: 1.05em; }
.story-article__body p { margin-bottom: 1.05em; }
.story-article__body h2,
.story-article__body h3,
.story-article__body h4 {
  margin: 1.55em 0 0.45em;
  color: #28242a;
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: pretty;
}
.story-article__body h2 { font-size: 24px; }
.story-article__body h3 { font-size: 21px; }
.story-article__body h4 { font-size: 18px; }
.story-article__body ul,
.story-article__body ol { padding-left: 1.35em; }
.story-article__body li + li { margin-top: 0.35em; }
.story-article__body blockquote {
  margin: 1.4em 0;
  padding: 3px 0 3px 16px;
  border-left: 3px solid var(--brand-primary);
  color: #403943;
  font-size: 17px;
  font-weight: 600;
}
.story-article__body a { color: var(--brand-primary); text-decoration: underline; text-underline-offset: 3px; }
.story-article__body img { display: block; width: auto; max-width: 100%; height: auto; margin: 1.4em 0; }
.story-article__body pre { overflow-x: auto; padding: 14px; background: #f5f4f5; font-size: 0.88em; }
.story-article > .stories-tags { width: min(100%, 760px); margin-top: 22px; padding-top: 12px; border-top: 1px solid #e3e0e4; }
.story-share { display: flex; flex-wrap: wrap; gap: 8px; width: min(100%, 760px); margin: 22px 0 0; }
.story-share button {
  min-height: 38px;
  padding: 7px 12px;
  border: 1px solid #cfcad1;
  border-radius: 4px;
  background: #fff;
  color: #363139;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.story-share button:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.story-share [data-share-status] { flex-basis: 100%; margin: 0; color: #68636b; font-size: 12px; }
.related-stories { width: min(100% - 40px, 900px); margin: 0 auto; padding-block: 22px 50px; border-top: 1px solid #e3e0e4; }
.related-stories > h2 { margin: 0 0 10px; color: #262228; font-family: var(--font-body); font-size: 21px; font-weight: 700; }

@media (max-width: 640px) {
  .stories-archive,
  .story-article { width: min(100% - 32px, 560px); }
  .stories-archive { padding-block: 22px 42px; }
  .stories-archive > h1,
  .story-article > h1 { font-size: clamp(30px, 8vw, 38px); }
  .stories-card { grid-template-columns: 112px minmax(0, 1fr); gap: 12px; padding-block: 13px; }
  .stories-card h3 { font-size: 17px; line-height: 1.3; }
  .stories-card__category { font-size: 10px; }
  .stories-card__byline { margin-top: 6px; font-size: 11px; }
  .stories-card .stories-tags { gap: 3px 6px; margin-top: 5px; font-size: 10px; }
  .stories-tags li + li::before { margin-right: 6px; }
  .stories-filters { gap: 7px; margin-top: 14px; }
  .stories-filters input { width: min(100%, 260px); }
  .stories-filters__panel { right: auto; left: 0; }
  .stories-section-heading { margin-top: 18px; font-size: 18px; }
  .story-article { padding-top: 18px; }
  .story-breadcrumb { margin-bottom: 15px; }
  .story-article > .eyebrow { font-size: 11px; }
  .story-article__cover { margin-block: 15px 18px; }
  .story-article__body { font-size: 16px; line-height: 1.72; }
  .story-article__body h2 { font-size: 22px; }
  .related-stories { width: min(100% - 32px, 560px); }
}

@media (prefers-reduced-motion: reduce) {
  .stories-card,
  .story-share button { scroll-behavior: auto; transition: none; }
}
