/* =========================================================================
   Правила сервера — вёрстка документа (/server/rules/)
   Отдельный файл, чтобы не раздувать style.css: страница одна, стили
   подключаются только на ней ({% block extra_head %}).
   ========================================================================= */

/* Надзаголовок над h1: на табло это «Пользовательское соглашение» — то же
   название, что видит человек в форме регистрации. */
.rules-kicker {
    font-size: .78rem; text-transform: uppercase; letter-spacing: .14em;
    color: var(--text-muted); margin: 0 0 6px;
}

.rules-intro { padding: 22px 24px; border-left: 3px solid var(--green); }
.rules-intro p { margin: 0 0 12px; color: #cfcfcf; }
.rules-intro p:last-of-type { margin-bottom: 0; }

.rules-summary-title {
    font-size: .78rem; text-transform: uppercase; letter-spacing: .12em;
    color: var(--text-muted); font-weight: 600; margin: 18px 0 10px;
}
.rules-summary { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.rules-summary li { position: relative; padding-left: 24px; color: #dcdcdc; }
.rules-summary li::before {
    content: "▸"; position: absolute; left: 4px; top: 0;
    color: var(--green-bright); font-weight: 700;
}

/* ---------------------------------------------------------------- содержание */
.rules-toc { margin-top: 18px; padding: 16px 20px; }
.rules-toc-title {
    font-size: .78rem; text-transform: uppercase; letter-spacing: .12em;
    color: var(--text-muted); margin-bottom: 8px;
}
.rules-toc ol {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 24px;
}
.rules-toc a {
    display: flex; gap: 10px; align-items: baseline;
    padding: 5px 6px; border-radius: var(--radius); color: var(--text); font-size: .93rem;
}
.rules-toc a:hover { background: var(--bg-soft); color: var(--green-bright); }
.rules-toc-num {
    flex: 0 0 22px; text-align: center; font-size: .78rem; font-weight: 700;
    color: var(--green-bright); border: 1px solid var(--green-dark);
    border-radius: 999px; line-height: 1.5;
}

/* ---------------------------------------------------------------- разделы */
.rules-section { margin-top: 18px; scroll-margin-top: 84px; }
.rules-section h2 { display: flex; gap: 12px; align-items: baseline; margin-bottom: 6px; }
.rules-num {
    flex: 0 0 34px; height: 34px; display: inline-flex; align-items: center;
    justify-content: center; border-radius: 10px; background: var(--green-dark);
    color: #fff; font-size: 1rem; font-weight: 800; letter-spacing: .02em;
}
.rules-lead { color: #cfcfcf; margin: 0 0 14px; }

.rules-points { list-style: none; padding: 0; margin: 0; }
.rules-points li {
    display: grid; grid-template-columns: 52px 1fr; gap: 12px;
    padding: 8px 0; border-top: 1px solid var(--border-soft);
}
.rules-points li:first-child { border-top: 0; }
.rules-point-num {
    font-size: .82rem; font-weight: 700; color: var(--text-muted);
    font-variant-numeric: tabular-nums; padding-top: 2px;
}
.rules-point-text { color: #cfcfcf; }
.rules-point-text b { color: #fff; }

.rules-note {
    margin: 14px 0 0; padding: 10px 14px; border-radius: var(--radius);
    font-size: .9rem; border-left: 3px solid var(--border);
    background: rgba(255, 255, 255, .03); color: var(--text-muted);
}
.rules-note--info { border-color: #3498db; background: rgba(52, 152, 219, .08); }
.rules-note--warning { border-color: var(--orange); background: rgba(230, 126, 34, .10); color: #f0c9a5; }

/* ---------------------------------------------------------------- наказания */
.rules-table-wrap { overflow-x: auto; }
.rules-penalties td:first-child { width: 45%; color: var(--text); }
.rules-penalties tbody td:first-child {
    border-left: 3px solid var(--border); padding-left: 12px;
}
.rules-row--warn td:first-child { border-left-color: var(--orange); }
.rules-row--ban td:first-child { border-left-color: var(--red); }
.rules-row--ok td:first-child { border-left-color: var(--green); }
.rules-row--warn td:last-child { color: var(--orange); }
.rules-row--ban td:last-child { color: #e8776a; }
.rules-row--ok td:last-child { color: var(--green-bright); }

.rules-notes-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 8px; }
.rules-notes-list li {
    position: relative; padding-left: 20px; font-size: .9rem; color: var(--text-muted);
}
.rules-notes-list li::before { content: "·"; position: absolute; left: 6px; color: var(--green-bright); }

.rules-outro { margin-top: 18px; border-left: 3px solid var(--green-bright); font-weight: 500; }
.rules-outro p { margin: 0; color: #fff; }

@media (max-width: 760px) {
    .rules-toc ol { grid-template-columns: 1fr; }
    .rules-points li { grid-template-columns: 42px 1fr; gap: 8px; }
    .rules-penalties td:first-child { width: auto; }
}

/* Табло перед регистрацией (/account/rules/): разделы свёрнуты в <details>,
   чтобы страница оставалась обозримой. Работает без JS — это важно для
   шага, который нельзя пропустить. */
.rules-section > summary {
    display: flex;
    align-items: baseline;
    gap: 12px;
    font-size: 1.15rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    list-style: none;
}
.rules-section > summary::-webkit-details-marker { display: none; }
.rules-section > summary::marker { content: ""; }
.rules-section > summary::after {
    content: "развернуть";
    margin-left: auto;
    font-size: .75rem;
    font-weight: 500;
    color: #9a9a9a;
    white-space: nowrap;
}
.rules-section[open] > summary::after { content: "свернуть"; }
.rules-section > summary:hover,
.rules-section > summary:hover::after { color: var(--green-bright); }
.rules-section[open] > summary { margin-bottom: 8px; }

/* Форма согласия — та же карточка, что регистрация (.auth-card в style.css),
   но со своей привязкой к якорю: после клика по «Принимаю» страница не должна
   прокручиваться так, чтобы карточка уезжала под шапку. */
.rules-consent { margin-top: 18px; scroll-margin-top: 84px; }

