/* Документы (согласие, политика) — в общем стиле приложения (2026-10-14): светлый розовый фон, белые карточки, шапка с
   круглой кнопкой «назад» как в фильтрах и регистрации (.reg-back), логотип «Свободны». */
:root {
  --bg: #ffeef4;
  --surface: #ffffff;
  --surface-2: #fff0f4;
  --line: rgb(60 20 40 / 8%);
  --line-strong: rgb(60 20 40 / 15%);
  --text: #22101c;
  --muted: #6d5a66;
  --accent: #c4123a;
  --coral: #e8173f;
}
* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  font-family: 'Segoe UI', system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.doc-top {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: calc(0.7rem + env(safe-area-inset-top)) 1rem 0.7rem;
  background: rgb(255 246 248 / 82%);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.doc-back {
  flex: none;
  width: 2.6rem;
  height: 2.6rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 4px 12px rgb(120 20 60 / 8%);
  padding: 0;
  text-decoration: none;
}
.doc-back:hover {
  background: var(--surface-2);
}
.doc-back svg {
  width: 1.35rem;
  height: 1.35rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.doc-top img {
  display: block;
  height: 1.7rem;
  width: auto;
}
main {
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1rem 3.5rem;
}
.doc-card {
  background: var(--surface);
  border-radius: 22px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 28px rgb(120 20 60 / 7%);
  padding: 1.2rem 1.15rem 1.4rem;
}
h1 {
  font-size: 1.45rem;
  line-height: 1.22;
  font-weight: 850;
  letter-spacing: -0.01em;
  margin: 0.2rem 0 0.25rem;
  background: linear-gradient(100deg, #ed2088 0%, #8543db 55%, #2467dd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 {
  font-size: 1.06rem;
  font-weight: 750;
  margin: 1.5rem 0 0.4rem;
}
p,
li {
  font-size: 0.97rem;
}
ul {
  padding-left: 1.2rem;
}
li::marker {
  color: var(--coral);
}
.muted {
  color: var(--muted);
}
.draft {
  border: 1px dashed #f4b3bf;
  background: var(--surface-2);
  border-radius: 14px;
  padding: 10px 12px;
  font-size: 0.88rem;
  color: var(--muted);
}
.key {
  border-left: 4px solid var(--coral);
  background: var(--surface-2);
  border-radius: 0 14px 14px 0;
  padding: 10px 14px;
}
a {
  color: var(--accent);
  font-weight: 600;
}
.fill {
  background: #fff3c4;
  border-radius: 4px;
  padding: 0 3px;
}

/* «обо ● LIVE» (логотип с 2026-11-08) — как в шапке приложения (guest.css .gt-brand, .live-badge; 2026-10-15, владелец: «в шапке рядом со
   „Свободны“ — значок Live»). */
.doc-brand {
  display: flex;
  align-items: flex-start;
  gap: 0.1rem;
  padding-top: 0.45rem;
}
.doc-brand img {
  display: block;
}
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.62rem 0.22rem 0.5rem;
  border-radius: 999px;
  background: #e8173f;
  color: #fff;
  font-size: 0.78rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  transform: translateY(-0.45rem);
  box-shadow:
    0 2px 7px rgb(232 23 63 / 24%),
    0 0 9px rgb(232 23 63 / 38%),
    0 0 18px rgb(255 45 85 / 17%);
  animation: svobodny-live-glow 2.4s ease-in-out infinite;
}
.live-badge i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #fff;
  animation: svobodny-live-dot 1.2s ease-in-out infinite;
}
@keyframes svobodny-live-glow {
  0%,
  100% {
    box-shadow:
      0 2px 7px rgb(232 23 63 / 24%),
      0 0 9px rgb(232 23 63 / 38%),
      0 0 18px rgb(255 45 85 / 17%);
  }
  50% {
    box-shadow:
      0 2px 9px rgb(232 23 63 / 28%),
      0 0 13px rgb(232 23 63 / 54%),
      0 0 23px rgb(255 45 85 / 25%);
  }
}
@keyframes svobodny-live-dot {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 3px rgb(255 255 255 / 70%);
  }
  50% {
    opacity: 0.65;
    box-shadow: 0 0 5px rgb(255 255 255 / 90%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .live-badge,
  .live-badge i {
    animation: none;
  }
}

/* Компьютер (2026-10-31, владелец: «политику под десктопные разрешения релевантно шире … не упирайся в 720p»): ширина и
   шрифт растут с экраном плавно (clamp), строка текста не растягивается в простыню; от 1100 px слева —
   оглавление (legal.js), прилипает под шапкой. Телефон не меняется. */
.doc-toc {
  display: none;
}
@media (min-width: 760px) {
  .doc-top {
    padding-left: max(1.5rem, calc((100vw - var(--doc-frame, 760px)) / 2));
    padding-right: max(1.5rem, calc((100vw - var(--doc-frame, 760px)) / 2));
  }
  main {
    max-width: none;
    width: min(100% - 3rem, var(--doc-frame, 760px));
    padding: 1.5rem 0 4rem;
  }
  .doc-card {
    padding: clamp(1.6rem, 3vw, 2.6rem) clamp(1.6rem, 3.4vw, 3.2rem) clamp(1.8rem, 3vw, 2.8rem);
    border-radius: 24px;
  }
  h1 {
    font-size: clamp(1.7rem, 1.1rem + 1.2vw, 2.4rem);
  }
  h2 {
    font-size: clamp(1.12rem, 0.9rem + 0.45vw, 1.35rem);
    margin-top: 2rem;
    scroll-margin-top: 5.5rem;
  }
  p,
  li {
    font-size: clamp(1rem, 0.88rem + 0.25vw, 1.12rem);
  }
}
@media (min-width: 1100px) {
  :root {
    /* Колонка текста при этом ~70–95 знаков в строке на 1100–2560 px. */
    --doc-frame: clamp(1000px, 72vw, 1280px);
  }
  main.has-toc {
    display: grid;
    grid-template-columns: clamp(230px, 20vw, 300px) minmax(0, 1fr);
    gap: clamp(1.5rem, 2.5vw, 2.75rem);
    align-items: start;
  }
  .doc-toc {
    display: block;
    position: sticky;
    top: 5.5rem;
    max-height: calc(100dvh - 7rem);
    overflow-y: auto;
    padding: 1.1rem 0.9rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgb(255 255 255 / 70%);
  }
  .in-app .doc-toc {
    top: 1.5rem;
    max-height: calc(100dvh - 3rem);
  }
  .doc-toc-title {
    margin: 0 0 0.5rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
  }
  .doc-toc ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: toc;
  }
  .doc-toc li {
    counter-increment: toc;
    font-size: 0.93rem;
  }
  .doc-toc a {
    display: flex;
    gap: 0.5rem;
    padding: 0.45rem 0.6rem;
    border-radius: 12px;
    color: var(--muted);
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
  }
  .doc-toc a::before {
    content: counter(toc) '.';
    flex: none;
    min-width: 1.3em;
    color: var(--coral);
    font-weight: 800;
  }
  .doc-toc a:hover {
    background: var(--surface-2);
    color: var(--text);
  }
  .doc-toc a[aria-current] {
    background: #ffe3ec;
    color: var(--accent);
  }
  .in-app h2 {
    scroll-margin-top: 1.5rem;
  }
}
@media (min-width: 760px) and (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

/* Внутри приложения (лист поверх формы, 2026-10-15) — без своей шапки и с отступом сверху поменьше. */
.in-app .doc-top {
  display: none;
}
