/* ============ Икра Рыба — страницы документов ============ */
:root {
  --bg: #070707;
  --bg-3: #151311;
  --ink: #f3eee6;
  --ink-2: #c9c2b7;
  --muted: #847d73;
  --line: rgba(243, 238, 230, .1);
  --red: #e0141e;
  --red-2: #ff3b2f;
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.22, 1, .36, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.7 var(--sans); -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(60% 40% at 85% 0%, rgba(224, 20, 30, .12), transparent 70%);
  background-repeat: no-repeat;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--red); color: #fff; }

/* шапка */
.legal-top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 14px var(--gutter);
  background: rgba(7, 7, 7, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.legal-top__logo img { width: clamp(110px, 12vw, 150px); }
.legal-top__back {
  display: inline-flex; align-items: center; gap: .6em; height: 46px; padding: 0 24px; border-radius: 999px;
  border: 1px solid rgba(243, 238, 230, .2); text-decoration: none;
  font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.legal-top__back:hover { background: var(--red); border-color: var(--red); }

/* документ */
.legal { width: 100%; max-width: 1240px; margin: 0 auto; padding: clamp(40px, 6vw, 80px) var(--gutter) clamp(60px, 8vw, 120px); }
.legal__crumbs { display: flex; flex-wrap: wrap; gap: .6em; font-size: 13px; color: var(--muted); margin-bottom: 34px; }
.legal__crumbs a { text-decoration: none; transition: color .3s; }
.legal__crumbs a:hover { color: var(--ink); }
.legal__eyebrow {
  display: inline-flex; align-items: center; gap: .6em; margin: 0 0 18px;
  font: 500 11px/1.2 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--muted);
}
.dot { width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 12px var(--red); }
.legal__grid { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(30px, 5vw, 80px); align-items: start; }

.legal__toc { position: sticky; top: 110px; max-height: calc(100vh - 140px); overflow: auto; padding-right: 6px; }
.legal__toc-title { margin: 0 0 14px; font: 500 11px/1.2 var(--sans); letter-spacing: .28em; text-transform: uppercase; color: var(--muted); }
.legal__toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-left: 1px solid var(--line); }
.legal__toc li { counter-increment: toc; }
.legal__toc a {
  position: relative; display: block; padding: 7px 0 7px 18px; font-size: 13px; line-height: 1.4; color: var(--muted);
  text-decoration: none; transition: color .3s;
}
.legal__toc a::before { content: counter(toc, decimal-leading-zero); display: inline-block; width: 2.2em; color: rgba(243, 238, 230, .25); }
.legal__toc a::after {
  content: ""; position: absolute; left: -4px; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: var(--red); box-shadow: 0 0 10px var(--red); opacity: 0; transform: scale(.4); transition: opacity .3s, transform .4s var(--ease);
}
.legal__toc a:hover, .legal__toc a.is-active { color: var(--ink); }
.legal__toc a.is-active::after { opacity: 1; transform: none; }

.legal__doc {
  background: var(--bg-3); border: 1px solid var(--line); border-radius: 6px;
  padding: clamp(26px, 5vw, 64px);
}
.legal__doc h1 { margin: 0 0 clamp(26px, 4vw, 44px); font: 300 clamp(36px, 5vw, 64px)/1 var(--serif); letter-spacing: -.02em; }
.legal__doc h2 {
  margin: clamp(36px, 5vw, 56px) 0 16px; padding-top: 26px; border-top: 1px solid var(--line);
  font: 400 clamp(24px, 2.6vw, 34px)/1.15 var(--serif); color: var(--ink);
}
.legal__doc h1 + p, .legal__doc h1 + h2 { margin-top: 0; }
.legal__doc h1 + h2 { border-top: 0; padding-top: 0; }
.legal__doc p, .legal__doc li { color: var(--ink-2); }
.legal__doc p { margin: 0 0 14px; }
.legal__doc ul { margin: 0 0 18px; padding: 0; list-style: none; }
.legal__doc li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.legal__doc li::before { content: ""; position: absolute; left: 4px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px rgba(224, 20, 30, .7); }
.legal__doc a { color: var(--red-2); text-decoration: underline; text-decoration-color: rgba(255, 59, 47, .4); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal__doc a:hover { text-decoration-color: currentColor; }
.table-wrap { overflow-x: auto; margin: 8px 0 22px; border: 1px solid var(--line); border-radius: 6px; }
.legal__doc table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14px; }
.legal__doc th, .legal__doc td { padding: 14px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.legal__doc th { font: 500 11px/1.3 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--muted); background: rgba(255, 255, 255, .02); }
.legal__doc td { color: var(--ink-2); }
.legal__doc tr:last-child td { border-bottom: 0; }

/* подвал */
.legal-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 30px;
  padding: 30px var(--gutter); border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.legal-foot a { text-decoration: none; transition: color .3s; }
.legal-foot a:hover, .legal-foot a[aria-current] { color: var(--ink); }
.legal-foot nav { display: flex; flex-wrap: wrap; gap: 10px 26px; }

@media (max-width: 900px) {
  .legal__grid { grid-template-columns: 1fr; }
  .legal__toc { position: static; max-height: none; padding: 20px 22px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-3); }
}
@media (max-width: 560px) {
  .legal-top__back { height: 40px; padding: 0 16px; font-size: 11px; }
  .legal__doc { padding: 24px 18px; border-left: 0; border-right: 0; border-radius: 0; margin: 0 calc(var(--gutter) * -1); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* уведомление о cookie (общее с главной) */
.cookie {
  position: fixed; left: 50%; bottom: 18px; z-index: 95; width: min(640px, calc(100% - 24px));
  display: flex; align-items: center; gap: 18px; padding: 16px 18px 16px 22px;
  background: rgba(21, 19, 17, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 30px 60px -30px #000;
  font: 400 13px/1.5 var(--sans); color: var(--ink-2);
  transform: translate(-50%, 140%); transition: transform .8s var(--ease);
}
.cookie.is-on { transform: translate(-50%, 0); }
.cookie p { margin: 0; }
.cookie a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.cookie button {
  flex: none; height: 42px; padding: 0 22px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--red); color: #fff; font: 500 12px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase;
}
@media (max-width: 560px) { .cookie { flex-direction: column; align-items: stretch; text-align: left; } }
