/* ============================================================
   Экран «Как работают огоньки» — ТЗ 19 (Репутация «Огоньки»).
   Страница-объяснение: механика, лестница из 6 статусов,
   привилегии, поднятие тем, анти-накрутка.
   Только токены из tokens.css, без хардкод-цветов.
   ============================================================ */

/* ── Каркас (полноширинный экран, по центру) ─────────────── */
.layout-wide { justify-content: center; }

.fires-page { flex: 1; min-width: 0; width: 100%; }
.fires-wrap {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 30px;
}

/* ── Шапка ────────────────────────────────────────────────── */
.fires-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 14px;
  padding: 12px 16px 4px;
}
.fires-hero .strip { margin-bottom: 2px; }
.fires-flame {
  width: 74px;
  height: 74px;
  border-radius: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--amber-soft);
  color: var(--amber);
}
.fires-flame .ico {
  width: 36px;
  height: 36px;
  stroke-width: 1.5;
  animation: mh-fires-ignite 0.75s var(--ease-out) both;
}
.fires-title { font-size: 30px; line-height: 1.15; }
.fires-lead {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-2);
  max-width: 640px;
}
.fires-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}
.fires-quick .chip { cursor: default; }

@keyframes mh-fires-ignite {
  0% { opacity: 0; transform: scale(0.6) translateY(6px); }
  60% { opacity: 1; transform: scale(1.12) translateY(-2px); }
  100% { transform: scale(1) translateY(0); }
}

/* ── Секция ───────────────────────────────────────────────── */
.fires-sec {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.fires-h2 { font-size: 20px; line-height: 1.2; }
.fires-sub {
  font-size: 13.5px;
  line-height: 1.55;
  max-width: 660px;
  margin-top: -4px;
}

/* ── 19.1 Механика: карточки ─────────────────────────────── */
.mech-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.mech-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.mech-ico {
  width: 38px;
  height: 38px;
  border-radius: var(--r);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--s3);
  color: var(--text-2);
}
.mech-card.c-amber .mech-ico { background: var(--amber-soft); color: var(--amber); }
.mech-card.c-blue .mech-ico { background: var(--blue-soft); color: var(--blue); }
.mech-card.c-green .mech-ico { background: var(--green-soft); color: var(--ok-text); }
.mech-card.c-violet .mech-ico { background: var(--violet-soft); color: var(--violet); }
.mech-title { font-size: 14px; font-weight: 600; }
.mech-text { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }

/* живой пример кнопки */
.mech-demo { display: flex; flex-direction: column; gap: 12px; }
.mech-demo-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.mech-demo-tag { margin-left: auto; font-weight: 400; }
.mech-post { background: var(--s1); }

/* ── 19.2 Лестница статусов: вертикальные карточки ───────── */
.ladder-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rung {
  position: relative;
  background: var(--s2);
  border: 1px solid var(--border);
  border-radius: var(--r-card);
  padding: 16px 18px 16px 24px;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), transform var(--dur) var(--ease);
}
.rung:hover { border-color: var(--border-2); transform: translateY(-1px); }
.rung::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 5px;
  background: var(--border-2);
}
.rung.s-grey::before   { background: var(--border-2); }
.rung.s-green::before  { background: var(--green); }
.rung.s-blue::before   { background: var(--blue); }
.rung.s-violet::before { background: var(--violet); }
.rung.s-amber::before  { background: var(--amber); }
.rung.s-pink::before   { background: var(--pink); }
.rung.s-grad::before   { background: linear-gradient(180deg, var(--pink), var(--violet), var(--green), var(--amber)); }

.rung-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.rung-badge {
  font-size: 12px;
  padding: 4px 11px;
  border-radius: var(--r);
}
.rung-badge .ico { width: 12px; height: 12px; }

.b-grey   { background: var(--s3); color: var(--text-3); border: 1px solid var(--border-2); }
.b-green  { background: var(--green-soft); color: var(--ok-text); }
.b-blue   { background: var(--blue-soft); color: var(--blue); }
.b-violet { background: var(--violet-soft); color: var(--violet); }
.b-amber  { background: var(--amber-soft); color: var(--warn-text); }
.b-grad {
  background: linear-gradient(90deg, var(--pink-soft), var(--violet-soft), var(--green-soft), var(--amber-soft));
  border: 1px solid var(--border-2);
}
.b-grad .ico { color: var(--pink); }
.b-grad .rung-badge-name {
  background: linear-gradient(90deg, var(--pink), var(--violet), var(--green), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
}

.rung-th { font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.rung-th b {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text);
  font-size: 15px;
}

.rung-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.rung-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 11px 13px;
  background: var(--s1);
  border: 1px solid var(--border);
  border-radius: var(--r);
  min-width: 0;
}
.rung-stat-n {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  line-height: 1.1;
  color: var(--text);
}
.rung-stat-l { font-size: 11px; color: var(--text-3); line-height: 1.35; }

.rung-note {
  margin-top: 13px;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}
.rung-perks {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}
.perk {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-2);
  background: var(--s1);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: var(--r-chip);
}
.perk .ico { width: 13px; height: 13px; color: var(--text-3); }
.perk-emo { font-size: 12px; line-height: 1; }

/* принцип */
.principle {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-top: 2px;
}
.principle-ico {
  width: 38px;
  height: 38px;
  border-radius: var(--r);
  background: var(--pink-soft);
  color: var(--pink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.principle-txt { min-width: 0; }
.principle-title { font-size: 13.5px; font-weight: 600; margin-bottom: 4px; }
.principle-text { font-size: 12.5px; line-height: 1.55; }

/* ── 19.4 Поднятие тем ────────────────────────────────────── */
.boost-card { display: flex; flex-direction: column; gap: 16px; }
.boost-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.boost-li {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}
.boost-li .ico { color: var(--amber); margin-top: 3px; flex-shrink: 0; }
.boost-li b { color: var(--text); font-weight: 600; }

.boost-demo {
  border-top: 1px solid var(--border);
  padding-top: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.boost-demo-label { font-size: 11.5px; }
.boost-menu-wrap { position: relative; }
.boost-more {
  background: transparent;
  border: 1px solid var(--border-2);
  color: var(--text);
  border-radius: var(--r);
  font-size: 12.5px;
  padding: 8px 14px;
  cursor: pointer;
}
.boost-more:hover { background: var(--s2); }
.boost-menu { left: 0; top: calc(100% + 6px); }
.boost-quota {
  margin-left: auto;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--amber);
  background: var(--amber-soft);
  padding: 1px 8px;
  border-radius: var(--r);
}

/* ── 19.5 Анти-накрутка ───────────────────────────────────── */
.guard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
.guard-card {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.guard-ico {
  width: 38px;
  height: 38px;
  border-radius: var(--r);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--s3);
  color: var(--text-2);
}
.guard-ico.g-blue   { background: var(--blue-soft); color: var(--blue); }
.guard-ico.g-amber  { background: var(--amber-soft); color: var(--amber); }
.guard-ico.g-violet { background: var(--violet-soft); color: var(--violet); }
.guard-ico.g-green  { background: var(--green-soft); color: var(--ok-text); }
.guard-title { font-size: 14px; font-weight: 600; }
.guard-text { font-size: 12.5px; line-height: 1.55; color: var(--text-2); }

/* ── Заключение ───────────────────────────────────────────── */
.fires-outro {
  text-align: center;
  padding: 4px 16px 8px;
}
.fires-outro-text {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-3);
  max-width: 560px;
  margin: 0 auto;
}

/* ── Адаптив ──────────────────────────────────────────────── */
@media (max-width: 760px) {
  .fires-wrap { gap: 26px; }
  .fires-title { font-size: 24px; }
  .fires-lead { font-size: 14px; }
  .fires-h2 { font-size: 18px; }

  .mech-grid { grid-template-columns: 1fr; }
  .guard-grid { grid-template-columns: 1fr; }

  /* Статус остаётся карточкой; метрики складываются в строки */
  .rung-stats { grid-template-columns: 1fr; gap: 8px; }
  .rung-stat {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 12px;
  }
  .rung-stat-l { text-align: right; }

  .boost-more { min-height: 44px; }
}

@media (max-width: 400px) {
  .rung { padding: 14px 14px 14px 20px; }
  .rung-th b { font-size: 14px; }
}
