.topic-index {
  padding-top: 0.8rem;
  padding-bottom: 1.1rem;
}

.topic-index__hero {
  background: linear-gradient(90deg, rgba(233, 242, 252, 0.98) 0%, rgba(233, 242, 252, 0.92) 42%, rgba(233, 242, 252, 0.2) 68%, rgba(233, 242, 252, 0.06) 100%);
  border-radius: 0.95rem;
  display: grid;
  overflow: hidden;
}

.topic-index__hero-copy {
  padding: 1.25rem 1rem 1.15rem;
}

.topic-index__kicker {
  color: #123d78;
  font-family: "Roboto", sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
}

.topic-index__hero h1 {
  color: #12315d;
  font-family: "Roboto", sans-serif;
  font-size: 2.2rem;
  line-height: 1.08;
  margin: 0 0 0.8rem;
  max-width: 11ch;
}

.topic-index__hero-summary {
  color: #213b60;
  font-size: 1rem;
  line-height: 1.45;
  margin: 0;
  max-width: 31rem;
}

.topic-index__hero-media img {
  display: block;
  width: 100%;
  min-height: 15rem;
  object-fit: cover;
}

.topic-index__intro {
  margin-top: 1.3rem;
}

.topic-index__intro h2 {
  color: #12315d;
  font-family: "Roboto", sans-serif;
  font-size: 1.7rem;
  margin-bottom: 0.45rem;
}

.topic-index__intro p {
  color: #314e74;
  font-size: 0.98rem;
  line-height: 1.55;
  margin: 0;
  max-width: 60rem;
}

.topic-index__section {
  margin-top: 1.6rem;
}

.topic-index__section-heading {
  align-items: center;
  display: flex;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.topic-index__section-heading h2 {
  color: #12315d;
  font-family: "Roboto", sans-serif;
  font-size: 1.8rem;
  margin: 0;
  white-space: nowrap;
}

.topic-index__section-heading span {
  background: #d9a54e;
  display: block;
  flex: 1 1 auto;
  height: 1px;
}

.topic-index__section-heading--split {
  justify-content: space-between;
  gap: 1rem;
}

.topic-index__section-heading--split span {
  display: none;
}

.topic-index__section-heading--split a {
  color: #15457a;
  font-weight: 700;
  text-decoration: none;
}

.topic-index__grid {
  display: grid;
  gap: 1rem;
}

.topic-card {
  background: #ffffff;
  border: 1px solid #dae2ed;
  border-radius: 0.9rem;
  box-shadow: 0 10px 24px rgba(18, 49, 93, 0.06);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: 1rem;
}

.topic-card--teal {
  --topic-accent: #0f7881;
  --topic-soft: #e7f5f3;
  --topic-border: #b8e0dc;
}

.topic-card--purple {
  --topic-accent: #6c2f9a;
  --topic-soft: #f2eafb;
  --topic-border: #d9c4ed;
}

.topic-card--blue {
  --topic-accent: #2164d0;
  --topic-soft: #e9f1ff;
  --topic-border: #bfd4f8;
}

.topic-card--green {
  --topic-accent: #4e7b35;
  --topic-soft: #edf4e7;
  --topic-border: #c1d8b0;
}

.topic-card--orange {
  --topic-accent: #d96d14;
  --topic-soft: #feefe2;
  --topic-border: #f3cba9;
}

.topic-card--cyan {
  --topic-accent: #0d7287;
  --topic-soft: #e6f7fb;
  --topic-border: #b9e3ed;
}

.topic-card--slate {
  --topic-accent: #5d5042;
  --topic-soft: #f0ece8;
  --topic-border: #d8cfc7;
}

.topic-card--red {
  --topic-accent: #b54747;
  --topic-soft: #fdf0f0;
  --topic-border: #efc7c7;
}

.topic-card--gold {
  --topic-accent: #9a6a00;
  --topic-soft: #fbf4df;
  --topic-border: #ead5a0;
}

.topic-card__header {
  align-items: center;
  display: flex;
  gap: 0.85rem;
  margin-bottom: 0.8rem;
}

.topic-card__icon {
  align-items: center;
  background: var(--topic-soft);
  border: 1px solid var(--topic-border);
  border-radius: 999px;
  color: var(--topic-accent);
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.35rem;
  height: 3.25rem;
  justify-content: center;
  width: 3.25rem;
}

.topic-card__header h3 {
  color: var(--topic-accent);
  font-family: "Roboto", sans-serif;
  font-size: 1.5rem;
  line-height: 1.08;
  margin: 0;
}

.topic-card__summary {
  color: #233d62;
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 0.8rem;
}

.topic-card__list {
  margin: 0 0 0.8rem;
  padding-left: 1.05rem;
}

.topic-card__list li {
  color: #274164;
  font-size: 0.93rem;
  line-height: 1.45;
  margin-bottom: 0.45rem;
}

.topic-card__resources {
  color: #355173;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.7rem;
  padding-top: 0.25rem;
}

.topic-card__resources span {
  font-size: 0.84rem;
  font-weight: 600;
}

.topic-card__footer {
  margin-top: auto;
  padding-top: 1rem;
}

.topic-card__button {
  align-items: center;
  border: 1px solid var(--topic-border);
  border-radius: 0.55rem;
  color: var(--topic-accent);
  display: flex;
  font-weight: 700;
  gap: 0.65rem;
  justify-content: center;
  min-height: 3rem;
  padding: 0.9rem 1rem;
  text-align: center;
  text-decoration: none;
}

.topic-card__button:hover {
  color: var(--topic-accent);
}

.topic-card__button--disabled {
  background: #fafbfd;
  border-color: #d7e0ec;
  color: #647b99;
  cursor: default;
  flex-direction: column;
}

.topic-card__status {
  color: #7e90a9;
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
}

.topic-featured-grid {
  display: grid;
  gap: 1rem;
}

.topic-featured-card {
  background: #ffffff;
  border: 1px solid #dae2ed;
  border-radius: 0.85rem;
  box-shadow: 0 10px 24px rgba(18, 49, 93, 0.06);
  overflow: hidden;
}

.topic-featured-card__image img {
  aspect-ratio: 16 / 9;
  display: block;
  object-fit: cover;
  width: 100%;
}

.topic-featured-card__body {
  padding: 0.8rem 0.85rem 0.9rem;
}

.topic-featured-card__body h3 {
  color: #12315d;
  font-family: "Roboto", sans-serif;
  font-size: 1.12rem;
  line-height: 1.12;
  margin: 0 0 0.4rem;
}

.topic-featured-card__body p {
  color: #314e74;
  font-size: 0.9rem;
  line-height: 1.45;
  margin: 0 0 0.75rem;
}

.topic-featured-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.topic-featured-card__tags span {
  background: #f3f7fb;
  border: 1px solid #d7e0ec;
  border-radius: 999px;
  color: #506883;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.35rem 0.5rem;
}

.topic-featured-card__link {
  color: #15457a;
  font-weight: 700;
  text-decoration: none;
}

.topic-featured-card__link--disabled {
  color: #7e90a9;
}

.topic-index__bottom {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.topic-bottom-panel {
  background: linear-gradient(180deg, #fffdfa, #fffaf4);
  border: 1px solid #ecd9bd;
  border-radius: 0.9rem;
  padding: 1rem;
}

.topic-bottom-panel__header {
  display: flex;
  gap: 0.85rem;
}

.topic-bottom-panel__icon {
  align-items: center;
  background: #fbf0de;
  border: 1px solid #efd3a9;
  border-radius: 999px;
  color: #b67312;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.25rem;
  height: 3rem;
  justify-content: center;
  width: 3rem;
}

.topic-bottom-panel__header h2 {
  color: #12315d;
  font-family: "Roboto", sans-serif;
  font-size: 1.6rem;
  margin: 0 0 0.4rem;
}

.topic-bottom-panel__header p {
  color: #324c72;
  font-size: 0.96rem;
  line-height: 1.5;
  margin: 0;
}

.topic-bottom-panel__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.1rem;
  margin: 1rem 0 0;
}

.topic-bottom-panel__links a,
.topic-bottom-panel__links span {
  color: #153d76;
  font-weight: 700;
  text-decoration: none;
}

.topic-bottom-panel__button {
  align-items: center;
  border: 1px solid #efc894;
  border-radius: 0.55rem;
  color: #ba6f08;
  display: inline-flex;
  gap: 0.65rem;
  justify-content: center;
  margin-top: 1rem;
  min-height: 3rem;
  padding: 0.8rem 1.1rem;
  text-decoration: none;
}

.topic-bottom-panel__button:hover {
  color: #ba6f08;
}

@media (min-width: 700px) {
  .topic-index {
    padding-top: 1rem;
    padding-bottom: 1.2rem;
  }

  .topic-index__hero-copy {
    padding: 1.5rem 1.25rem;
  }

  .topic-index__grid,
  .topic-featured-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .topic-index__hero {
    grid-template-columns: minmax(0, 0.92fr) minmax(22rem, 1.08fr);
    align-items: stretch;
  }

  .topic-index__hero-copy {
    padding: 1.9rem 1.5rem 1.5rem;
  }

  .topic-index__hero h1 {
    font-size: 3.3rem;
  }

  .topic-index__hero-media img {
    min-height: 21rem;
  }

  .topic-index__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .topic-card:nth-child(-n+4) {
    grid-column: span 1;
  }

  .topic-card:nth-child(n+5) {
    grid-column: span 1;
  }

  .topic-index__bottom {
    grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.9fr);
  }
}

@media (min-width: 1200px) {
  .topic-index__hero h1 {
    font-size: 3.8rem;
  }

  .topic-featured-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}
