.category-page {
  background:
    radial-gradient(circle at 12% 12%, rgba(247, 201, 72, .18), transparent 26rem),
    linear-gradient(180deg, #f7fbfc 0%, #fff 36%, #f8fbfc 100%);
}

.category-masthead {
  position: relative;
  overflow: hidden;
  padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(1.55rem, 4vw, 2.65rem);
  border-bottom: 1px solid rgba(7, 59, 76, .08);
  background:
    radial-gradient(circle at 82% 22%, rgba(123, 44, 191, .11), transparent 18rem),
    radial-gradient(circle at 28% 12%, rgba(247, 201, 72, .18), transparent 20rem),
    linear-gradient(135deg, #fff 0%, #eef8fa 100%);
}

.category-masthead::after {
  content: "";
  position: absolute;
  right: -5rem;
  bottom: -6rem;
  width: 18rem;
  height: 18rem;
  border: 1px solid rgba(11, 79, 108, .11);
  border-radius: 999px;
}

.category-masthead-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(230px, .35fr);
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: end;
}

.category-masthead-copy {
  max-width: 820px;
  text-align: left;
}

.category-masthead h1 {
  max-width: 820px;
  margin: .22rem 0 .55rem;
  text-align: left;
  color: var(--navy);
  font-size: clamp(2.35rem, 7vw, 5.1rem);
  line-height: .96;
  letter-spacing: -.075em;
}

.category-masthead #category-description {
  max-width: 720px;
  margin: 0;
  text-align: left;
  color: #4f6872;
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.62;
}

.category-masthead .eyebrow {
  text-align: left;
}

.category-masthead-stats {
  display: grid;
  gap: .65rem;
  padding: .95rem;
  border: 1px solid rgba(220, 232, 236, .92);
  border-radius: 22px;
  background: rgba(255, 255, 255, .74);
  box-shadow: 0 18px 44px rgba(7, 59, 76, .08);
  backdrop-filter: blur(10px);
}

.category-masthead-stats span {
  display: grid;
  gap: .18rem;
  color: #6b8088;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .07em;
}

.category-masthead-stats strong {
  color: var(--navy);
  font-size: clamp(1.05rem, 2vw, 1.45rem);
  line-height: 1.05;
  text-transform: none;
  letter-spacing: -.035em;
}

.category-nav {
  display: flex;
  gap: .55rem;
  margin: 0 0 clamp(1.05rem, 2.5vw, 1.65rem);
  padding: .52rem;
  overflow-x: auto;
  border: 1px solid rgba(220, 232, 236, .95);
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 12px 34px rgba(7, 59, 76, .06);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.category-nav[hidden] {
  display: none;
}

.category-nav a {
  flex: 0 0 auto;
  padding: .55rem .9rem;
  color: var(--navy);
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.category-nav a:hover,
.category-nav a.active {
  color: #fff;
  background: var(--blue);
}

.category-feed {
  display: grid;
  gap: clamp(1rem, 2.5vw, 1.45rem);
}

.category-featured-card {
  display: grid;
  grid-template-columns: minmax(320px, .58fr) minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(220, 232, 236, .95);
  border-radius: 30px;
  background: rgba(255, 255, 255, .86);
  box-shadow: 0 20px 50px rgba(7, 59, 76, .1);
}

.category-featured-media,
.category-card-media {
  display: block;
  overflow: hidden;
  background: linear-gradient(135deg, #eaf4f6, #fff7d8);
  text-decoration: none;
}

.category-featured-media {
  min-height: 365px;
}

.category-card-media {
  width: 168px;
  min-height: 118px;
  border-radius: 18px;
  aspect-ratio: 4 / 3;
}

.category-featured-media img,
.category-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .25s ease;
}

.category-featured-card:hover img,
.category-card:hover img {
  transform: scale(1.035);
}

.category-card-placeholder {
  display: grid;
  place-items: center;
  min-height: 118px;
  padding: 1rem;
  color: var(--blue);
  font-weight: 950;
  text-align: center;
}

.category-featured-media.category-card-placeholder {
  min-height: 365px;
}

.category-featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.15rem, 3.5vw, 2.45rem);
}

.category-card-meta {
  display: flex;
  align-items: center;
  gap: .38rem;
  margin: 0 0 .58rem;
  overflow: hidden;
  color: #6b8088;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}

.category-card-meta span {
  color: var(--blue);
  font-weight: 950;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.category-card-meta time {
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-featured-copy h2 {
  max-width: 780px;
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.75rem, 4vw, 3.35rem);
  line-height: 1.02;
  letter-spacing: -.065em;
}

.category-featured-copy h2 a,
.category-card h3 a {
  color: inherit;
  text-decoration: none;
}

.category-featured-copy h2 a:hover,
.category-card h3 a:hover {
  color: var(--blue);
}

.category-featured-copy > p:not(.category-card-meta) {
  display: -webkit-box;
  max-width: 680px;
  overflow: hidden;
  margin: .85rem 0 1.1rem;
  color: #4f6872;
  font-size: 1rem;
  line-height: 1.62;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.category-read-link,
.category-back-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  color: var(--blue);
  font-size: .86rem;
  font-weight: 900;
  text-decoration: none;
}

.category-read-link:hover,
.category-back-link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.category-section-bar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  padding-top: .25rem;
}

.category-section-bar h2 {
  margin: .15rem 0 .25rem;
  color: var(--navy);
  font-size: clamp(1.6rem, 3.4vw, 2.45rem);
  line-height: 1.05;
  letter-spacing: -.055em;
}

.category-section-bar .news-feed-description {
  margin: 0;
  color: #6b8088;
  font-size: .92rem;
}

.category-search-row {
  max-width: 760px;
}

.category-search-row .news-search-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .6rem;
}

.category-search-row .news-search-control {
  background: #fff;
  box-shadow: 0 10px 26px rgba(7, 59, 76, .06);
}

.category-search-row button {
  border: 0;
  border-radius: 999px;
  padding: 0 1.15rem;
}

#category-status {
  margin: 0;
  color: #647780;
}

#category-status[hidden] {
  display: none;
}

.category-news-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
}

.category-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: .95rem;
  min-width: 0;
  padding: .72rem;
  border: 1px solid rgba(220, 232, 236, .9);
  border-radius: 24px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 12px 34px rgba(7, 59, 76, .055);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.category-card:hover {
  transform: translateY(-2px);
  border-color: rgba(11, 79, 108, .16);
  box-shadow: 0 18px 42px rgba(7, 59, 76, .1);
}

.category-card-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: .12rem .2rem .12rem 0;
}

.category-card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--navy);
  font-size: clamp(1rem, 1.7vw, 1.22rem);
  line-height: 1.18;
  letter-spacing: -.025em;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.category-card-body > p:not(.category-card-meta) {
  display: -webkit-box;
  overflow: hidden;
  margin: .45rem 0 0;
  color: #536b75;
  font-size: .88rem;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.news-category-link {
  color: inherit;
  text-decoration: none;
}

.news-category-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-breadcrumb a:not(:first-child),
.article-header .eyebrow a {
  color: inherit;
  text-decoration: none;
}

.article-breadcrumb a:not(:first-child):hover,
.article-header .eyebrow a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 980px) {
  .category-masthead-layout,
  .category-featured-card {
    grid-template-columns: 1fr;
  }

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

  .category-featured-media,
  .category-featured-media.category-card-placeholder {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .category-news-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .category-masthead {
    padding: 1.55rem 0 1.3rem;
  }

  .category-masthead h1 {
    font-size: clamp(2rem, 12vw, 3rem);
  }

  .category-masthead #category-description {
    font-size: .96rem;
    line-height: 1.55;
  }

  .category-masthead-stats {
    gap: .55rem;
    padding: .78rem;
    border-radius: 18px;
  }

  .category-masthead-stats strong {
    font-size: 1rem;
  }

  .category-nav {
    margin-inline: -1rem;
    padding: .5rem 1rem;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .category-nav a {
    padding: .48rem .76rem;
    font-size: .76rem;
  }

  .category-feed {
    gap: .95rem;
  }

  .category-featured-card {
    border-radius: 22px;
    box-shadow: 0 14px 34px rgba(7, 59, 76, .08);
  }

  .category-featured-copy {
    padding: 1rem;
  }

  .category-featured-copy h2 {
    font-size: clamp(1.45rem, 8vw, 2rem);
    line-height: 1.07;
  }

  .category-featured-copy > p:not(.category-card-meta) {
    margin: .65rem 0 .85rem;
    font-size: .92rem;
    -webkit-line-clamp: 2;
  }

  .category-section-bar {
    display: grid;
    gap: .55rem;
  }

  .category-section-bar h2 {
    font-size: 1.62rem;
  }

  .category-search-row {
    max-width: none;
  }

  .category-search-row .news-search-form {
    grid-template-columns: 1fr auto;
    gap: .45rem;
  }

  .category-search-row .news-search-control {
    min-height: 46px;
  }

  .category-search-row button {
    min-height: 46px;
    padding-inline: .78rem;
  }

  .category-card {
    grid-template-columns: 104px minmax(0, 1fr);
    gap: .75rem;
    padding: .58rem;
    border-radius: 19px;
  }

  .category-card-media {
    width: 104px;
    min-height: 96px;
    border-radius: 15px;
    aspect-ratio: 1 / 1;
  }

  .category-card-placeholder {
    min-height: 96px;
    font-size: .78rem;
  }

  .category-card-meta {
    gap: .3rem;
    margin-bottom: .38rem;
    font-size: .66rem;
  }

  .category-card h3 {
    font-size: .98rem;
    line-height: 1.2;
  }

  .category-card-body > p:not(.category-card-meta) {
    margin-top: .35rem;
    font-size: .8rem;
    line-height: 1.35;
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 380px) {
  .category-card {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .category-card-media {
    width: 88px;
  }

  .category-card-meta {
    white-space: normal;
  }
}
