.category-page {
  --category-accent: var(--mint);
  --category-accent-soft: var(--mint-soft);
}

.category-page--sand {
  --category-accent: var(--sand);
  --category-accent-soft: var(--sand-soft);
}

.category-breadcrumbs {
  border-bottom: 1px solid rgba(16, 40, 36, 0.09);
  background: var(--paper);
}

.category-breadcrumbs .shell {
  display: flex;
  min-height: 48px;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  color: #74817d;
  font-size: 0.74rem;
  white-space: nowrap;
}

.category-breadcrumbs a:hover {
  color: var(--ink);
}

.category-breadcrumbs strong {
  overflow: hidden;
  color: #42524e;
  font-weight: 720;
  text-overflow: ellipsis;
}

.category-hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  background: var(--ink);
}

.category-hero::before,
.category-hero::after {
  position: absolute;
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.category-hero::before {
  top: -240px;
  right: -170px;
  width: 620px;
  height: 620px;
  background: radial-gradient(circle, color-mix(in srgb, var(--category-accent) 27%, transparent), transparent 70%);
}

.category-hero::after {
  bottom: -310px;
  left: -230px;
  width: 680px;
  height: 680px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.07), transparent 68%);
}

.category-hero__grid {
  position: absolute;
  inset: 0;
  opacity: 0.1;
  background-image: linear-gradient(rgba(255,255,255,.16) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.16) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, black, transparent 80%);
}

.category-hero__inner {
  position: relative;
  z-index: 1;
  min-height: 0;
  padding-block: 47px 51px;
}

.category-hero__copy,
.category-overview {
  min-width: 0;
}

.category-hero h1 {
  max-width: 1050px;
  margin: 0;
  font-size: clamp(2.7rem, 4.5vw, 4.65rem);
  font-weight: 850;
  letter-spacing: -0.058em;
  line-height: 1;
  overflow-wrap: anywhere;
}

.category-hero h1 em {
  color: var(--category-accent);
  font-style: normal;
}

.category-hero__lead {
  max-width: 880px;
  margin: 16px 0 0;
  color: #c7d8d3;
  font-size: .98rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}

.category-hero-search {
  display: flex;
  width: min(100%, 720px);
  min-height: 52px;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding: 0 17px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 12px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
}

.category-hero-search:focus-within {
  border-color: var(--category-accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--category-accent) 22%, transparent);
}

.category-hero-search svg {
  width: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--category-accent);
  stroke-linecap: round;
  stroke-width: 1.9;
}

.category-hero-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  font: inherit;
}

.category-hero-search input::placeholder {
  color: #a9bdb7;
}

.category-hero__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
}

.category-hero__nav button,
.category-hero__nav a,
.category-hero__count {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 8px;
  color: #d4e2de;
  background: rgba(255,255,255,.045);
  font-size: .7rem;
  font-weight: 750;
}

.category-hero__nav button {
  cursor: pointer;
}

.category-hero__nav button:hover,
.category-hero__nav a:hover {
  border-color: var(--category-accent);
  color: var(--ink);
  background: var(--category-accent);
}

.category-hero__count {
  border-color: transparent;
  padding-left: 0;
  background: transparent;
}

.category-hero__count strong {
  margin-right: 5px;
  color: var(--category-accent);
  font-size: .88rem;
}

.category-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}

.category-button {
  display: inline-flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 19px;
  border: 1px solid rgba(255,255,255,.19);
  border-radius: 12px;
  font-size: 0.83rem;
  font-weight: 800;
  transition: border-color 180ms ease, background 180ms ease, transform 180ms ease;
}

.category-button:hover {
  transform: translateY(-2px);
}

.category-button--primary {
  border-color: var(--category-accent);
  color: var(--ink);
  background: var(--category-accent);
}

.category-button--ghost:hover {
  border-color: rgba(255,255,255,.5);
  background: rgba(255,255,255,.08);
}

.category-overview {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 24px;
  color: var(--ink);
  background: rgba(255,253,248,.98);
  box-shadow: 0 32px 90px rgba(0,0,0,.25);
  transform: rotate(1deg);
}

.category-overview__top {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.category-overview__icon {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--category-accent-soft);
}

.category-overview__icon svg {
  width: 32px;
  fill: none;
  stroke: #2d6f60;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.category-page--sand .category-overview__icon svg {
  stroke: #886718;
}

.category-overview__top > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.category-overview__top small {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.category-overview__top strong {
  overflow: hidden;
  margin-top: 3px;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.category-overview__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--line);
}

.category-overview__stats div {
  padding: 20px;
}

.category-overview__stats div + div {
  border-left: 1px solid var(--line);
}

.category-overview__stats strong {
  display: block;
  font-size: 2rem;
  letter-spacing: -0.04em;
}

.category-overview__stats span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.category-overview__focus {
  margin: 0;
  padding: 8px 20px;
  list-style: none;
}

.category-overview__focus li {
  display: grid;
  grid-template-columns: 31px 1fr;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #e4e7e1;
  font-size: 0.84rem;
  font-weight: 720;
}

.category-overview__focus span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  color: var(--ink);
  background: var(--category-accent);
  font-size: 0.65rem;
  font-weight: 900;
}

.category-overview__note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 10px;
  padding: 12px;
  border-radius: 11px;
  color: #526560;
  background: #f0f2ed;
  font-size: 0.69rem;
  line-height: 1.45;
}

.category-overview__note span {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #35ae89;
  box-shadow: 0 0 0 4px rgba(53,174,137,.13);
}

.category-stats {
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
}

.category-stats__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.category-stats__grid > div {
  position: relative;
  min-height: 154px;
  padding: 31px 36px 28px 55px;
  border-left: 1px solid var(--line);
}

.category-stats__grid > div:last-child {
  border-right: 1px solid var(--line);
}

.category-stats__grid span {
  position: absolute;
  top: 35px;
  left: 22px;
  color: #87938f;
  font-size: 0.65rem;
  font-weight: 850;
}

.category-stats__grid strong {
  display: block;
  font-size: 2.35rem;
  letter-spacing: -0.05em;
}

.category-stats__grid p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.category-section {
  padding-block: 92px;
}

.category-section--featured {
  padding-block: 72px 82px;
  background: var(--paper);
}

.category-section--topics {
  background: var(--canvas);
}

.category-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 470px);
  align-items: end;
  gap: 55px;
  margin-bottom: 37px;
}

.category-heading h2,
.category-principle h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 3.8rem);
  font-weight: 840;
  letter-spacing: -0.054em;
  line-height: 1.02;
}

.category-heading > p {
  margin: 0 0 3px;
  color: var(--muted);
  line-height: 1.72;
}

.category-featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.category-featured-card {
  display: flex;
  min-height: 245px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--white);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

a.category-featured-card:hover {
  border-color: #7eaa9d;
  box-shadow: 0 18px 45px rgba(16,40,36,.1);
  transform: translateY(-4px);
}

.category-featured-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.category-featured-card__number {
  color: #6a7b76;
  font-size: 0.68rem;
  font-weight: 850;
  letter-spacing: 0.08em;
}

.category-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 999px;
  color: #5e6c68;
  background: #eff1ed;
  font-size: 0.62rem;
  font-weight: 790;
}

.category-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #9aa49f;
  content: "";
}

.category-status--ready {
  color: #246b59;
  background: var(--mint-soft);
}

.category-status--ready::before {
  background: #31a985;
}

.category-featured-card h3 {
  margin: 35px 0 16px;
  font-size: 1.13rem;
  letter-spacing: -0.025em;
  line-height: 1.43;
}

.category-featured-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  color: var(--muted);
  font-size: 0.7rem;
}

.category-featured-card__footer b {
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 450;
}

.category-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
}

.category-search {
  display: flex;
  width: min(100%, 500px);
  min-height: 48px;
  align-items: center;
  gap: 11px;
  padding: 0 15px;
  border: 1px solid #d6dcd7;
  border-radius: 11px;
  background: #fafbf8;
}

.category-search:focus-within {
  border-color: #6eaa99;
  box-shadow: 0 0 0 3px rgba(128,230,205,.2);
}

.category-search svg {
  width: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: #63736f;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.category-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 0.84rem;
}

.category-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.category-filters button {
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid #d7dcd7;
  border-radius: 9px;
  background: var(--white);
  font-size: 0.71rem;
  font-weight: 760;
}

.category-filters button:hover,
.category-filters button.is-active {
  border-color: var(--ink);
  color: var(--white);
  background: var(--ink);
}

.category-results-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 2px 12px;
  color: #556762;
  font-size: 0.76rem;
  font-weight: 740;
}

.category-results-bar small {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #7a8884;
  font-size: 0.66rem;
  font-weight: 650;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.status-dot--ready { background: #31a985; }
.status-dot--planned { margin-left: 6px; background: #a4aca8; }

.category-topic-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.category-topic {
  display: grid;
  min-height: 104px;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 15px;
  padding: 16px;
  border: 1px solid #d8ddd7;
  border-radius: 14px;
  background: var(--white);
}

a.category-topic {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

a.category-topic:hover {
  border-color: #77a698;
  box-shadow: 0 12px 32px rgba(16,40,36,.08);
  transform: translateY(-2px);
}

.category-topic.is-planned {
  color: #53635f;
  background: rgba(255,255,255,.66);
}

.category-topic__number {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 10px;
  color: #286b5b;
  background: var(--category-accent-soft);
  font-size: 0.62rem;
  font-weight: 880;
}

.category-page--sand .category-topic__number {
  color: #806218;
}

.category-topic__copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.category-topic__copy small {
  margin-bottom: 5px;
  color: #72817d;
  font-size: 0.62rem;
  font-weight: 780;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.category-topic__copy strong {
  font-size: 0.83rem;
  line-height: 1.42;
}

.category-topic__state {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #71807b;
  font-size: 0.65rem;
  font-weight: 750;
  white-space: nowrap;
}

a.category-topic .category-topic__state {
  color: #246b59;
}

.category-more-button {
  display: block;
  min-width: 180px;
  min-height: 47px;
  margin: 24px auto 0;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 11px;
  background: transparent;
  font-size: 0.76rem;
  font-weight: 810;
}

.category-more-button:hover {
  color: var(--white);
  background: var(--ink);
}

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

.category-empty {
  padding: 38px;
  border: 1px dashed #b9c4be;
  border-radius: 14px;
  color: var(--muted);
  background: rgba(255,255,255,.55);
  text-align: center;
}

.category-section--principle {
  color: var(--white);
  background: var(--ink);
}

.category-principle {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(360px, 1.08fr);
  align-items: start;
  gap: 95px;
}

.category-principle__copy {
  border-top: 1px solid rgba(255,255,255,.17);
}

.category-principle__copy p {
  margin: 0;
  padding: 21px 0;
  border-bottom: 1px solid rgba(255,255,255,.17);
  color: #bad0ca;
  line-height: 1.75;
}

@media (max-width: 1050px) {
  .category-hero__inner { gap: 48px; }
  .category-featured-grid { grid-template-columns: repeat(2, 1fr); }
  .category-tools { align-items: stretch; flex-direction: column; }
  .category-search { width: 100%; }
  .category-filters { justify-content: flex-start; }
}

@media (max-width: 900px) {
  .category-hero__inner { min-height: auto; padding-block: 45px 50px; }
  .category-overview { width: min(520px, 100%); transform: none; }
  .category-heading { grid-template-columns: 1fr; gap: 20px; }
  .category-topic-list { grid-template-columns: 1fr; }
  .category-principle { grid-template-columns: 1fr; gap: 45px; }
}

@media (max-width: 640px) {
  .category-hero__inner { padding-block: 38px 43px; }
  .category-hero h1 { font-size: clamp(2.25rem, 11vw, 3.25rem); }
  .category-hero__lead { font-size: .96rem; }
  .category-hero-search { min-height: 49px; margin-top: 20px; }
  .category-hero__nav { gap: 6px; }
  .category-hero__count { width: 100%; }
  .category-hero__actions { align-items: stretch; flex-direction: column; }
  .category-button { width: 100%; }
  .category-stats__grid { grid-template-columns: 1fr; }
  .category-stats__grid > div { min-height: 112px; padding-block: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .category-stats__grid > div:last-child { border-bottom: 0; }
  .category-stats__grid span { top: 27px; }
  .category-stats__grid strong { font-size: 2rem; }
  .category-section { padding-block: 68px; }
  .category-heading h2,
  .category-principle h2 { font-size: 2.3rem; }
  .category-featured-grid { grid-template-columns: 1fr; }
  .category-featured-card { min-height: 215px; }
  .category-filters { display: grid; grid-template-columns: 1fr 1fr; }
  .category-results-bar { align-items: flex-start; flex-direction: column; gap: 8px; }
  .category-topic { min-height: 118px; grid-template-columns: 37px minmax(0, 1fr); gap: 12px; }
  .category-topic__number { width: 35px; height: 35px; }
  .category-topic__state { grid-column: 2; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .category-overview { transform: none; }
}
