/* Общий стиль страниц-документов сайта (/rules, /terms). После правки поднимите ?v= в их <link>: /assets/ кэшируется на неделю. */
:root {
  --bg: #0b0b0d; --surface: #141417; --surface-2: #1b1b1f; --line: #2a2a30;
  --text: #ece8e1; --body: #cfc9bf; --muted: #a19c93; --red: #d8262d; --gold: #c9a66b;
  --serif: Georgia, "Times New Roman", "PT Serif", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font: 17px/1.65 var(--sans); }
a { color: var(--text); text-decoration-color: rgba(201, 166, 107, .6); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--gold); }
b, strong { color: var(--text); }
.wrap { width: min(820px, 100% - 32px); margin-inline: auto; }

.top {
  position: sticky; top: 0; z-index: 10; background: rgba(11, 11, 13, .85);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; width: min(1160px, 100% - 32px); }
.brand { font: 700 19px/1 var(--serif); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--text); }
.brand span { color: var(--red); }
.back { color: var(--muted); font-size: 15px; text-decoration: none; }
.back:hover { color: var(--text); }

header.intro { padding: 64px 0 28px; }
.eyebrow { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
h1 { margin: 0 0 16px; font: 700 clamp(32px, 5vw, 50px)/1.1 var(--serif); color: var(--text); }
.meta { color: var(--muted); font-size: 15px; margin: 0; }

.summary {
  margin: 28px 0 0; padding: 22px 24px; border-radius: 14px; background: var(--surface-2);
  border-left: 3px solid var(--red);
}
.summary p { margin: 0; }
.summary p + p { margin-top: 10px; }

.toc { margin: 32px 0 8px; padding: 20px 24px; border: 1px solid var(--line); border-radius: 14px; }
.toc b { display: block; margin-bottom: 8px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.toc ol { margin: 0; padding-left: 22px; columns: 2; column-gap: 32px; }
.toc li { break-inside: avoid; }
.toc a { text-decoration: none; color: var(--body); }
.toc a:hover { color: var(--text); }

h2 {
  margin: 56px 0 6px; padding-top: 8px; font: 700 clamp(26px, 3.4vw, 34px)/1.2 var(--serif); color: var(--text);
  scroll-margin-top: 76px;
}
.part { margin: 72px 0 0; padding-top: 28px; border-top: 1px solid var(--line); }
.part-label { font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--red); }
h3 { margin: 32px 0 10px; font: 700 19px/1.35 var(--sans); color: var(--text); scroll-margin-top: 76px; }
p { margin: 0 0 14px; }

ol.clauses { margin: 0; padding: 0; list-style: none; counter-reset: c; }
ol.clauses > li { position: relative; padding-left: 52px; margin-bottom: 14px; counter-increment: c; }
ol.clauses > li::before {
  content: attr(data-n); position: absolute; left: 0; top: 1px; width: 40px;
  font: 600 14px/1.6 var(--sans); color: var(--gold); font-variant-numeric: tabular-nums;
}
.penalty { display: block; margin-top: 4px; font-size: 14.5px; color: var(--muted); }
.penalty::before { content: "⚖ "; }

table { width: 100%; border-collapse: collapse; margin: 6px 0 18px; font-size: 15.5px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--text); font-weight: 600; background: var(--surface-2); }
td:first-child { white-space: nowrap; color: var(--text); }

.note { padding: 16px 20px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-size: 15.5px; }

footer.foot { margin-top: 80px; padding: 30px 0 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
footer.foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
footer.foot a { color: var(--muted); }

@media (max-width: 640px) {
  header.intro { padding-top: 40px; }
  .toc ol { columns: 1; }
  ol.clauses > li { padding-left: 44px; }
  td:first-child { white-space: normal; }
}

th.num, td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.wrap-first td:first-child { white-space: normal; width: 45%; }
