.stories-page,
.public-story-page {
  min-height: 70vh;
}

.stories-hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 84px 28px 46px;
}

.stories-hero h1 {
  margin: 10px 0 18px;
  font-size: clamp(3rem, 8vw, 7rem);
  line-height: .9;
  letter-spacing: -.055em;
}

.stories-hero h1 span {
  color: var(--accent, #a97dff);
}

.stories-hero p {
  max-width: 760px;
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  line-height: 1.65;
  color: #b8b5c2;
}

.story-browser {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 28px 26px;
}

.story-search {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.story-search input {
  flex: 1 1 auto;
  min-width: 0;
}

.story-search-field { flex: 1 1 auto; min-width: 0; }
.story-search { align-items: flex-end; }
.story-search-field > span { font-size: .9rem; }
.published-story-card h2, .story-card-excerpt, .public-story-header h1, .public-story-body { overflow-wrap: anywhere; }

.public-category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.public-category-filter a,
.story-card-categories span,
.story-card-categories a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid #3b3743;
  border-radius: 999px;
  padding: 6px 10px;
  color: #d0cbd8;
  text-decoration: none;
  font-size: .75rem;
}

.public-category-filter a.active {
  border-color: #a97dff;
  color: #fff;
  background: rgba(169,125,255,.12);
}

.public-category-filter a span {
  color: #908a99;
}

.published-story-grid {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 28px 70px;
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 16px;
}

.published-story-card {
  border: 1px solid #29262f;
  border-radius: 22px;
  padding: 24px;
  background: #111014;
}

.published-story-card h2 {
  margin: 14px 0 8px;
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  line-height: 1.02;
  letter-spacing: -.035em;
}

.published-story-card h2 a {
  color: inherit;
  text-decoration: none;
}

.published-story-card h2 a:hover {
  color: #c9b0ff;
}

.story-card-byline {
  color: #a7a2ad;
  font-weight: 700;
  margin: 0 0 16px;
}

.story-card-excerpt {
  color: #c6c2cc;
  line-height: 1.65;
  margin: 0;
}

.story-card-footer {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid #29262f;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #8f8995;
  font-size: .84rem;
}

.story-card-footer a {
  color: #c9b0ff;
  text-decoration: none;
  font-weight: 800;
}

.public-empty-state {
  grid-column: 1 / -1;
  border: 1px solid #29262f;
  border-radius: 22px;
  padding: 50px 28px;
  text-align: center;
  background: #111014;
}

.public-empty-state h2 {
  margin: 10px auto;
  max-width: 700px;
  font-size: clamp(1.7rem,4vw,3rem);
}

.public-empty-state p {
  max-width: 650px;
  margin: 0 auto 24px;
  color: #aaa5b0;
  line-height: 1.6;
}

.public-story-note {
  max-width: 900px;
  margin: 0 auto 80px;
  padding: 0 28px;
  color: #8f8995;
  text-align: center;
  line-height: 1.6;
}

.public-story-article {
  max-width: 880px;
  margin: 0 auto;
  padding: 70px 28px 90px;
}

.story-back-link {
  display: inline-block;
  margin-bottom: 34px;
  color: #b9a0f4;
  text-decoration: none;
  font-weight: 800;
}

.public-story-header h1 {
  margin: 16px 0 20px;
  font-size: clamp(2.8rem, 8vw, 6.2rem);
  line-height: .92;
  letter-spacing: -.05em;
}

.public-story-meta {
  display: flex;
  gap: 14px 24px;
  flex-wrap: wrap;
  color: #a49faa;
}

.public-content-note {
  margin: 34px 0;
  border: 1px solid #5d4650;
  border-radius: 14px;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
  background: rgba(104,62,76,.09);
}

.public-content-note strong {
  color: #e0b7c4;
  text-transform: uppercase;
  font-size: .72rem;
  letter-spacing: .07em;
}

.public-content-note span {
  color: #d1c7cb;
}

.public-story-body {
  margin-top: 38px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  line-height: 1.86;
  color: #e8e4eb;
}

.public-story-article-footer {
  margin-top: 50px;
  padding-top: 26px;
  border-top: 1px solid #2b2830;
  color: #99939e;
  line-height: 1.55;
}

.public-story-article-footer > div {
  margin-top: 22px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.story-not-found {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 30px;
}

.story-not-found > div {
  max-width: 700px;
  text-align: center;
}

.story-not-found h1 {
  font-size: clamp(2.3rem,7vw,5rem);
  margin: 10px 0;
}

.story-not-found p {
  color: #aaa5b0;
  margin-bottom: 24px;
}

@media (max-width: 760px) {
  .stories-hero {
    padding: 54px 20px 32px;
  }

  .story-browser,
  .published-story-grid,
  .public-story-note,
  .public-story-article {
    padding-left: 20px;
    padding-right: 20px;
  }

  .published-story-grid {
    grid-template-columns: 1fr;
  }

  .story-search {
    display: grid;
    grid-template-columns: 1fr;
  }

  .story-card-footer {
    display: grid;
  }

  .public-story-article {
    padding-top: 44px;
  }

  .public-story-body {
    font-size: 1.12rem;
    line-height: 1.78;
  }
}
