/* ============================================================
   Страница правил (rules.html)
   ============================================================ */
.rules-main {
  position: relative;
  z-index: 1;
  padding: 120px 0 80px;
}
.rules-container { max-width: 880px; }
.rules-hero { margin-bottom: 32px; }

.nav__link--active { color: var(--text); background: rgba(74, 38, 12, 0.12); }
.rules-back { flex-shrink: 0; padding: 9px 18px; font-size: 14px; }

/* оглавление */
.rules-toc {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
}
.rules-toc a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(74, 38, 12, 0.12);
  border: 1px solid rgba(74, 38, 12, 0.25);
  color: var(--choco);
  font-weight: 700;
  font-size: 14px;
  padding: 8px 14px;
  border-radius: 10px;
  transition: background .2s, color .2s, transform .2s;
}
.rules-toc a:hover {
  background: var(--choco);
  color: var(--choco-text);
  transform: translateY(-1px);
}
.rules-toc b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: var(--choco);
  color: var(--lime);
  font-size: 12px;
}
.rules-toc a:hover b { background: var(--lime); color: #2b1600; }

/* разделы */
.rules-section {
  background: var(--choco);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 28px 30px;
  margin-bottom: 20px;
  box-shadow: 0 12px 30px rgba(70, 30, 0, 0.3);
  scroll-margin-top: 90px;
}
.rules-section__title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: 'Comfortaa', cursive;
  font-size: 22px;
  font-weight: 700;
  color: var(--choco-text);
  margin-bottom: 18px;
}
.rules-section__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--lime);
  color: #2b1600;
  font-size: 18px;
}

.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rules-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: background .2s;
}
.rules-list li:hover { background: rgba(255, 255, 255, 0.08); }
.rules-list__num {
  flex-shrink: 0;
  min-width: 38px;
  font-weight: 800;
  color: var(--lime);
  font-size: 14px;
  line-height: 1.7;
}
.rules-list p {
  color: #f6e4c8;
  font-size: 15px;
  line-height: 1.7;
}
.rules-list code {
  background: rgba(200, 245, 106, 0.15);
  color: var(--lime);
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 14px;
}

.rules-bottom {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

@media (max-width: 768px) {
  .rules-main { padding-top: 100px; }
  .rules-section { padding: 22px 18px; }
  .rules-section__title { font-size: 19px; }
  .rules-list li { flex-direction: column; gap: 4px; }
}
