.topic-page {
  max-width: var(--max-width-content);
  margin: 0 auto;
  padding: var(--space-10) var(--container-pad) var(--space-16);
}

.topic-page__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  color: var(--color-primary);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-3);
}

.topic-page__description {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  line-height: var(--line-height-loose);
  max-width: 52ch;
  margin-bottom: var(--space-10);
}

.topic-page__subtopics-heading {
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-subtle);
  margin-bottom: var(--space-4);
}

/* ── Level group ─────────────────────────────────────────── */
.level-group {
  margin-bottom: var(--space-8);
}

.level-group__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.level-group__header::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--color-border-light);
}

/* ── Level badge (shared across pages) ───────────────────── */
.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-bold);
  letter-spacing: 0.06em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-full);
  line-height: 1.4;
  flex-shrink: 0;
}

.level-badge--A1 { background: #E8F5E9; color: #2E7D32; }
.level-badge--A2 { background: #E3F2FD; color: #1565C0; }
.level-badge--B1 { background: #FFF8E1; color: #F57F17; }
.level-badge--B2 { background: #FFF3E0; color: #E65100; }
.level-badge--C1 { background: #FCE4EC; color: #AD1457; }
.level-badge--C2 { background: #F3E5F5; color: #6A1B9A; }

/* ── Subtopic list ───────────────────────────────────────── */
.subtopic-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.subtopic-card__link {
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--duration-base) var(--ease-out);
  box-shadow: var(--shadow-sm);
}

.subtopic-card__link:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateX(5px);
}

.subtopic-card__title {
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
  margin-bottom: var(--space-1);
  transition: color var(--duration-fast) var(--ease-out);
}

.subtopic-card__link:hover .subtopic-card__title {
  color: var(--color-primary);
}

.subtopic-card__description {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  line-height: var(--line-height-base);
}
