.home-shell {
  width: min(100% - 40px, 1120px);
  margin: 0 auto;
  padding: 34px 0 64px;
}

.home-hero {
  padding: 0 0 26px;
  text-align: center;
}

.home-hero h1 {
  margin: 0;
  color: var(--color-heading);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.home-hero p {
  margin: 14px 0 0;
  color: var(--color-muted);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 680;
  letter-spacing: 0.03em;
}

.groups-container {
  display: grid;
  gap: 42px;
}

.topic-group {
  min-width: 0;
}

.topic-group-heading {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 17px;
  padding-bottom: 10px;
  border-bottom: 2px solid color-mix(in srgb, var(--color-primary) 16%, var(--color-border));
}

.topic-group-heading h2,
.topic-group-heading p {
  margin: 0;
}

.topic-group-heading h2 {
  color: var(--color-heading);
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  font-weight: 850;
  line-height: 1.55;
}

.topic-group-heading p {
  color: var(--color-muted);
  font-size: 1rem;
  font-weight: 700;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}

.category-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  background: var(--color-surface);
  text-decoration: none;
  box-shadow: var(--shadow-card);
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 13px 34px rgba(37, 48, 71, 0.13);
}

.category-image-wrap {
  aspect-ratio: 1;
  margin: 10px 10px 0;
  overflow: hidden;
  border-radius: 14px;
  background: #fff6e8;
}

.category-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-copy {
  padding: 13px 14px 16px;
  text-align: center;
}

.category-copy h3 {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--color-heading);
  font-size: clamp(1.06rem, 1.6vw, 1.28rem);
  font-weight: 850;
  line-height: 1.3;
}

.category-copy .category-en {
  min-height: 2.6em;
  margin: 3px 0 0;
  color: var(--color-heading);
  font-size: 0.93rem;
  font-weight: 690;
  line-height: 1.3;
}

.category-copy .category-count {
  margin: 7px 0 0;
  color: var(--color-muted);
  font-size: 0.86rem;
  font-weight: 620;
}

@media (max-width: 900px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .home-shell {
    width: min(100% - 24px, 1120px);
    padding-top: 24px;
  }

  .home-hero {
    padding-bottom: 22px;
  }

  .home-hero h1 {
    font-size: clamp(2.25rem, 12vw, 3.2rem);
  }

  .home-hero p {
    max-width: 18em;
    margin-inline: auto;
    line-height: 1.55;
  }

  .category-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }

  .category-card {
    border-radius: 16px;
  }

  .category-image-wrap {
    margin: 7px 7px 0;
    border-radius: 11px;
  }

  .category-copy {
    padding: 10px 8px 12px;
  }

  .groups-container {
    gap: 32px;
  }

  .topic-group-heading {
    display: block;
    margin-bottom: 13px;
    padding-bottom: 8px;
  }

  .topic-group-heading h2 {
    font-size: 1.35rem;
  }

  .topic-group-heading p {
    margin-top: -3px;
    font-size: 0.82rem;
  }

  .category-copy h3 {
    font-size: 1rem;
  }

  .category-copy .category-en {
    font-size: 0.78rem;
  }

  .category-copy .category-count {
    font-size: 0.76rem;
  }
}
