/* =====================================================
   MTB · Страница кластера (Cluster)
   Эталон: cluster-A.html (Кластер А «Самообраз»)

   Hero — паттерн .listing-hero из ДС (assets/listing.css).
   Карточки мишеней — .target-tile, карточки басен — .ftile.
   Здесь — только уникальные для страницы кластера паттерны:
   .cluster-section, .thematic-group, .cluster-nav.
   ===================================================== */

/* ---------- Sections ---------- */
.cluster-section {
  padding: 72px 0;
  background: var(--bg-cream);
}
.cluster-section--warm { background: var(--bg-warm); }
.cluster-section__body {
  max-width: 820px;
  margin: 56px auto 0 auto;
}
.cluster-section__lead {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.55;
  color: var(--accent);
  margin: 0 0 24px 0;
  text-wrap: pretty;
}
.cluster-section__body-text {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-dark);
  margin: 0 0 20px 0;
  text-wrap: pretty;
}
.cluster-section__body-text:last-of-type { margin-bottom: 0; }

/* «Общий механизм» / «Карты финалов» — охряные карточки-врезки, а не сплошной текст */
.cluster-mechanism {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md, 6px) var(--radius-md, 6px) 0;
  padding: 20px 24px;
}
.cluster-mechanism .label {
  display: block;
  font-family: var(--font-body);
  font-size: 11px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent-dark);
  margin-bottom: 9px;
}
.cluster-mechanism p {
  margin: 0;
  font-size: 16px; line-height: 1.62; color: var(--text-dark);
  text-wrap: pretty;
}

/* Disabled state для .target-tile и .ftile в контексте страницы кластера.
   На corpus.html / targets.html эти карточки всегда активны;
   на cluster-A до шаблонизации многие ссылки ведут в "#". */
.cluster-section .tcard[href="#"],
.cluster-section .ftile[href="#"] {
  opacity: 0.55;
  cursor: not-allowed;
}
.cluster-section .tcard[href="#"]:hover,
.cluster-section .ftile[href="#"]:hover {
  border-color: var(--border);
  transform: none;
  box-shadow: none;
}

/* ---------- Раздел 03 — Тематические связки ---------- */
.thematic-groups {
  display: grid;
  gap: 32px;
  max-width: 820px;
  margin: 56px auto 0 auto;
}
.thematic-group {
  padding: 24px 32px;
  background: var(--surface);
  border-radius: 12px;
  border-left: 3px solid var(--accent);
}
.thematic-group__title {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--text-dark);
  margin: 0 0 8px 0;
}
.thematic-group__desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0 0 16px 0;
}
.thematic-group__fables {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.thematic-fable {
  padding: 14px 18px;
  background: var(--bg-cream);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 6px);
  text-decoration: none;
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: border-color 0.2s, transform 0.2s ease-out;
}
.thematic-fable:hover { border-color: var(--accent); transform: translateY(-2px); }
.thematic-fable__head {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.thematic-fable__num {
  font-family: var(--font-number);
  font-weight: 700;
  color: var(--accent);
  font-size: 14px;
}
.thematic-fable__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 14px;
  color: var(--text-dark);
}
.thematic-fable__angle {
  font-size: 15px;
  color: var(--text-dark);
  line-height: 1.55;
  letter-spacing: 0.2px;
  margin-top: 2px;
}
.thematic-group__note {
  font-size: 13px;
  font-style: italic;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  text-wrap: pretty;
}

/* ---------- Раздел 05 — Навигация по кластерам ---------- */
.cluster-nav {
  padding: 48px 0;
  background: var(--bg-cream);
  border-top: 1px solid var(--border);
}
/* Внутренняя раскладка nav (.cluster-nav__inner / __item / __all и т.д.)
   живёт в cluster-detail.css — он грузится последним и является
   единственным авторитетным источником. Здесь — только секция. */

/* ---------- Адаптив ---------- */

@media (max-width: 640px) {
  .cluster-section { padding: 64px 0; }
  .thematic-group__fables { grid-template-columns: 1fr; }
  .thematic-fable { min-width: 0; }
}

/* Mobile overflow fix — grid-3 в 1 колонку на узком (12.2.C) */
@media (max-width: 480px) {
  .grid-3 { grid-template-columns: 1fr; }
}
