/* Страница «Правила»: оглавление слева, пункты справа. Строки списка на линиях, пояснения [a] раскрываются под строкой. */
.rl { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; padding-bottom: 3rem; }
.rl-toc { position: sticky; top: 96px; max-height: calc(100vh - 120px); overflow: auto; }
.rl-toc nav { display: flex; flex-direction: column; }
.rl-toc a { display: flex; align-items: baseline; gap: 12px; padding: 8px 0 8px 12px; border-left: 2px solid var(--line); color: var(--text-2); font: 700 .92rem/1.3 var(--f-body); transition: color .15s, border-color .15s; }
.rl-toc a .n { flex: none; width: 1.7rem; color: var(--mute); font: 700 .8rem var(--f-body); font-variant-numeric: tabular-nums; }
.rl-toc a:hover { color: var(--amber-2); }
.rl-toc a.on { color: var(--amber-2); border-color: var(--amber); }
.rl-main { max-width: 920px; min-width: 0; }

.rl-find { position: relative; display: block; max-width: 380px; margin-bottom: 1.6rem; }
.rl-find svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); stroke: var(--mute); fill: none; stroke-width: 1.8; stroke-linecap: round; pointer-events: none; }
.rl-find input { width: 100%; height: 42px; padding: 0 16px 0 44px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel); color: var(--text); font: 600 .92rem var(--f-body); }
.rl-find input:focus { outline: 0; border-color: var(--amber); }

.rl-call { margin: 0 0 1.2rem; padding: 14px 22px; border-left: 3px solid var(--amber); background: rgba(226, 192, 141, .07); color: var(--text); line-height: 1.65; }
.rl-call strong { color: var(--amber-2); }

.rl-sec { padding: 2.4rem 0 .6rem; border-top: 1px solid var(--line-2); scroll-margin-top: 96px; }
.rl-sec > header { display: flex; align-items: baseline; gap: 18px; margin-bottom: .6rem; }
.rl-sec .num { flex: none; font: 800 clamp(2rem, 3.6vw, 3rem)/1 var(--f-head); color: transparent; -webkit-text-stroke: 1px var(--amber); font-variant-numeric: tabular-nums; }
.rl-sec h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.15; }
.rl-p { max-width: 74ch; margin: .8rem 0; color: var(--text-2); }
.rl-sub { margin: 1.4rem 0 .2rem; font: 800 1.05rem var(--f-head); color: var(--amber-2); }
.rl-label { margin: 1.6rem 0 .5rem; font: 800 .78rem var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: var(--mute); }

.rl-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); counter-reset: n; }
.rl-list li { display: grid; grid-template-columns: 1.7rem minmax(0, 1fr); gap: .5rem .8rem; padding: 12px 4px; border-bottom: 1px solid var(--line); line-height: 1.6; }
.rl-list .mk { text-align: center; font-weight: 800; }
.k-no .mk::before { content: "✕"; color: var(--bad); }
.k-yes .mk::before { content: "✓"; color: var(--teal); }
.k-dot .mk::before { content: "▸"; color: var(--amber); }
.k-num .mk::before { counter-increment: n; content: counter(n) "."; color: var(--mute); font-variant-numeric: tabular-nums; font-weight: 700; }
.rl-list .tx { min-width: 0; overflow-wrap: anywhere; }
.rl-list strong { color: var(--text); }

.fn { margin-left: 3px; padding: 2px 6px; border: 0; border-radius: 5px; background: rgba(226, 192, 141, .16); color: var(--amber-2); font: 800 .68rem/1 var(--f-body); vertical-align: super; cursor: pointer; transition: background .15s, color .15s; }
.fn:hover, .fn[aria-expanded="true"] { background: var(--amber); color: #1d1309; }
.rl-note { grid-column: 2; margin-top: 4px; padding: 12px 16px; border-left: 2px solid var(--amber); background: rgba(255, 255, 255, .035); color: var(--text-2); font-size: .94rem; }
.rl-note b { display: inline-block; margin-right: 8px; color: var(--amber-2); font-weight: 800; }
.rl-note p { display: inline; margin: 0; }
.rl-note p + p { display: block; margin-top: .5rem; }
.rl-call .rl-note { grid-column: auto; margin-top: .6rem; }

.rl-notes dl { margin: 0; border-top: 1px solid var(--line); }
.rl-notes dl > div { display: grid; grid-template-columns: 2.4rem minmax(0, 1fr); gap: .8rem; padding: 12px 4px; border-bottom: 1px solid var(--line); scroll-margin-top: 96px; }
.rl-notes dt { color: var(--amber-2); font: 800 .85rem var(--f-body); }
.rl-notes dd { margin: 0; color: var(--text-2); font-size: .94rem; line-height: 1.6; }
.rl-notes dd p { margin: 0 0 .5rem; }
.rl-notes dd p:last-child { margin: 0; }
#rl-none { margin-top: 2rem; }

@media (max-width: 980px) {
    .rl { grid-template-columns: 1fr; }
    .rl-toc { position: static; max-height: none; overflow: visible; margin-bottom: 1rem; }
    .rl-toc nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .rl-toc a { padding: 7px 12px; border: 1px solid var(--line-2); border-radius: 999px; font-size: .84rem; }
    .rl-toc a.on { border-color: var(--amber); }
}

/* Светлая тема */
:root[data-theme="light"] .rl-call { background: rgba(197, 138, 53, .1); }
:root[data-theme="light"] .rl-note { background: rgba(110, 80, 35, .06); }
:root[data-theme="light"] .rl-sec .num { -webkit-text-stroke-color: #b0762a; }
:root[data-theme="light"] .fn { background: rgba(197, 138, 53, .2); }
