.td-category-taxonomy {
  margin-bottom: clamp(24px, 3.5vw, 40px);
  padding: clamp(24px, 3.6vw, 42px);
  border: 1px solid rgb(10 26 60 / 0.13);
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 18px 55px rgb(10 26 60 / 0.07);
}

.td-category-taxonomy__header {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  align-items: end;
  gap: clamp(20px, 4vw, 48px);
  margin-bottom: clamp(22px, 3vw, 32px);
}

.td-category-taxonomy__eyebrow {
  margin: 0 0 8px;
  color: #3f6f99;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.td-category-taxonomy__header h2 {
  margin: 0;
  font-size: clamp(1.65rem, 2.8vw, 2.65rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.td-category-taxonomy__header > p {
  max-width: 460px;
  margin: 0;
  color: var(--td-archive-muted);
  line-height: 1.6;
}

.td-category-taxonomy__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.td-category-taxonomy-card {
  display: flex;
  min-width: 0;
  min-height: 300px;
  flex-direction: column;
  padding: clamp(20px, 2.5vw, 28px);
  border: 1px solid rgb(10 26 60 / 0.11);
  border-radius: 18px;
  background: linear-gradient(160deg, #fff 0%, #f7fafc 100%);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.td-category-taxonomy-card:hover,
.td-category-taxonomy-card:focus-within {
  transform: translateY(-3px);
  border-color: rgb(10 26 60 / 0.26);
  box-shadow: 0 18px 42px rgb(10 26 60 / 0.09);
}

.td-category-taxonomy-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 26px;
  color: var(--td-archive-muted);
  font-size: 0.8rem;
}

.td-category-taxonomy-card__index {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: #e8f1f7;
  color: #173c62;
  font-size: 0.76rem;
  font-weight: 850;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.td-category-taxonomy-card h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.2vw, 1.9rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
}

.td-category-taxonomy-card h3 a {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  color: var(--td-archive-text);
  text-decoration: none;
}

.td-category-taxonomy-card h3 a span:last-child {
  color: var(--td-archive-muted);
  font-size: 0.82em;
  transition: transform 180ms ease, color 180ms ease;
}

.td-category-taxonomy-card h3 a:hover span:last-child,
.td-category-taxonomy-card h3 a:focus-visible span:last-child {
  transform: translate(2px, -2px);
  color: var(--td-archive-accent);
}

.td-category-taxonomy-card__summary {
  margin-top: 14px;
  color: var(--td-archive-muted);
  line-height: 1.58;
}

.td-category-taxonomy-card__summary > :first-child {
  margin-top: 0;
}

.td-category-taxonomy-card__summary > :last-child {
  margin-bottom: 0;
}

.td-category-taxonomy-card__latest {
  display: grid;
  gap: 5px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid rgb(10 26 60 / 0.1);
}

.td-category-taxonomy-card__latest > span {
  color: var(--td-archive-muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.td-category-taxonomy-card__latest a {
  color: var(--td-archive-text);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.td-category-taxonomy-card__latest a:hover,
.td-category-taxonomy-card__latest a:focus-visible {
  color: var(--td-archive-accent);
  text-decoration: underline;
}

.td-category-taxonomy__more {
  margin-top: 18px;
  border-top: 1px solid rgb(10 26 60 / 0.1);
  padding-top: 18px;
}

.td-category-taxonomy__more > summary {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid rgb(10 26 60 / 0.15);
  border-radius: 999px;
  color: var(--td-archive-accent);
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.td-category-taxonomy__more > summary::-webkit-details-marker {
  display: none;
}

.td-category-taxonomy__more > summary:hover,
.td-category-taxonomy__more > summary:focus-visible {
  border-color: rgb(10 26 60 / 0.3);
  background: #f5f9fc;
}

.td-category-taxonomy__more > summary span:last-child {
  transition: transform 180ms ease;
}

.td-category-taxonomy__more[open] > summary span:last-child {
  transform: rotate(180deg);
}

.td-category-taxonomy__grid--overflow {
  margin-top: 18px;
}

@media (max-width: 900px) {
  .td-category-taxonomy__header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

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

@media (max-width: 620px) {
  .td-category-taxonomy {
    padding: 18px;
    border-radius: 20px;
  }

  .td-category-taxonomy__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .td-category-taxonomy-card {
    min-height: 0;
  }

  .td-category-taxonomy__more > summary {
    width: 100%;
    justify-content: space-between;
    border-radius: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .td-category-taxonomy-card,
  .td-category-taxonomy-card h3 a span:last-child,
  .td-category-taxonomy__more > summary span:last-child {
    transition: none;
  }
}
