/* Fiver — страницы документов (/terms, /privacy). Палитра приложения: графит, бирюзовый акцент.
   Страница длинного текста: без анимаций и скриптов, читается на телефоне и печатается. */

/* Шрифты сайта — те же файлы, что у лендинга (static/landing/fonts, лицензия OFL рядом с ними). */
@font-face { font-family: "Sofia Sans Extra Condensed"; font-style: normal; font-weight: 1 1000; font-display: swap; src: url("../landing/fonts/sofia-sans-extra-condensed-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia Sans Extra Condensed"; font-style: normal; font-weight: 1 1000; font-display: swap; src: url("../landing/fonts/sofia-sans-extra-condensed-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sofia Sans Extra Condensed"; font-style: normal; font-weight: 1 1000; font-display: swap; src: url("../landing/fonts/sofia-sans-extra-condensed-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 1 1000; font-display: swap; src: url("../landing/fonts/sofia-sans-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 1 1000; font-display: swap; src: url("../landing/fonts/sofia-sans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Sofia Sans"; font-style: normal; font-weight: 1 1000; font-display: swap; src: url("../landing/fonts/sofia-sans-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap; src: url("../landing/fonts/martian-mono-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Martian Mono"; font-style: normal; font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap; src: url("../landing/fonts/martian-mono-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* Шрифты — только здесь: заголовок документа, текст, моноширинный для кода. */
  --f-head: "Sofia Sans Extra Condensed", "Sofia Sans", "Arial Narrow", "Segoe UI", sans-serif;
  --f-text: "Sofia Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --f-mono: "Martian Mono", "Cascadia Mono", Consolas, monospace;

  --bg: #0B0C0F; --s1: #111317; --s2: #15181D;
  --line: #1F2228; --line2: #2A2E36;
  --text: #E8E6E1; --text2: #C9CCD1; --muted: #9AA0A8; --dim: #7D838C;
  --acc: #3DD6B5; --acc-hi: #7BF0D6; --acc-soft: #9FE7D6; --acc-ink: #06231D; --acc-bg: #0F1F1C;
  --gx: clamp(1rem, 4vw, 3.5rem);
  --num: 3.3rem;                      /* поле под номер пункта */
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }
body { margin: 0; background: var(--bg); color: var(--text2); font: 1.06rem/1.6 var(--f-text); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, p, ul, ol, dl, dd { margin: 0; }
a { color: var(--acc-soft); text-decoration-color: rgba(159, 231, 214, .4); text-underline-offset: .2em; }
a:hover { color: var(--acc-hi); text-decoration-color: currentColor; }
b { color: var(--text); font-weight: 600; }
code { font: .92em var(--f-mono); color: var(--text); background: var(--s2); border: 1px solid var(--line); border-radius: .35rem; padding: .08em .35em; overflow-wrap: anywhere; }
:focus-visible { outline: 2px solid var(--acc-hi); outline-offset: 3px; border-radius: .3rem; }
::selection { background: rgba(61, 214, 181, .3); }

.skip { position: absolute; left: 1rem; top: -4rem; z-index: 10; padding: .6rem 1rem; border-radius: .6rem; background: var(--acc); color: var(--acc-ink); font-weight: 600; text-decoration: none; }
.skip:focus { top: 1rem; }
.dot { display: inline-block; flex: none; width: .5em; height: .5em; border-radius: 50%; background: var(--acc); }

/* ───────── Шапка ───────── */
.logo { display: inline-flex; align-items: center; gap: .55rem; font: 700 1.2rem var(--f-text); color: var(--text); text-decoration: none; }
.logo svg { width: 1.6rem; height: 1.6rem; flex: none; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding: 1rem var(--gx); border-bottom: 1px solid var(--line); }
.top-nav { display: flex; flex-wrap: wrap; gap: .3rem 1.6rem; font-size: .92rem; }
.top-nav a { padding: .25rem 0; color: var(--muted); text-decoration: none; border-bottom: 1px solid transparent; }
.top-nav a:hover { color: var(--text); }
.top-nav a[aria-current] { color: var(--text); border-bottom-color: var(--acc); }
.top-nav .home { color: var(--acc-soft); }

/* ───────── Заголовок документа ───────── */
.page { max-width: 76rem; margin: 0 auto; padding: 0 var(--gx) 5rem; }
.head { padding: clamp(2.2rem, 6vw, 4.5rem) 0 clamp(1.8rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.eyebrow { display: flex; align-items: center; gap: .6em; font: 600 .95rem var(--f-text); color: var(--acc-soft); }
h1 { margin-top: .8rem; font: 800 clamp(2.6rem, 7vw, 5rem)/.98 var(--f-head); letter-spacing: 0; color: var(--text); text-wrap: balance; }
.meta { margin-top: 1.1rem; font-size: .95rem; color: var(--muted); }

/* ───────── Сетка: оглавление и текст ───────── */
.layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.8rem; padding-top: 1.8rem; }
.toc { border: 1px solid var(--line); border-radius: .9rem; background: var(--s1); font-size: .92rem; }
.toc summary { padding: .85rem 1.1rem; font: 700 1rem var(--f-text); color: var(--text); cursor: pointer; }
.toc ol { list-style: none; padding: 0 1.1rem 1rem; display: grid; gap: .1rem; }
.toc a { display: flex; gap: .7em; padding: .28rem 0; color: var(--text2); text-decoration: none; line-height: 1.35; }
.toc a:hover { color: var(--acc-hi); }
.toc .n { flex: none; min-width: 1.5em; color: var(--dim); font-variant-numeric: tabular-nums; }

@media (min-width: 1000px) {
  .layout { grid-template-columns: 17rem minmax(0, 46rem); gap: 4rem; justify-content: space-between; padding-top: 3rem; }
  .toc { position: sticky; top: 1.5rem; align-self: start; max-height: calc(100vh - 3rem); overflow-y: auto; border: 0; border-radius: 0; background: none; }
  .toc summary { padding: 0 0 .8rem; pointer-events: none; list-style: none; }
  .toc summary::-webkit-details-marker { display: none; }
  .toc ol { padding: 0 0 0 1rem; border-left: 1px solid var(--line); }
}

/* ───────── Текст документа ───────── */
.doc { min-width: 0; }
.lead { color: var(--text); font-size: 1.06rem; line-height: 1.6; }

.brief { margin-top: 1.8rem; padding: 1.2rem 1.3rem; border: 1px solid #1D3A34; border-radius: .9rem; background: var(--acc-bg); }
.brief-title { font: 700 1rem var(--f-text); color: var(--acc-soft); }
.brief ul { list-style: none; padding: 0; margin-top: .8rem; display: grid; gap: .55rem; color: var(--text); }
.brief li { position: relative; padding-left: 1.3rem; line-height: 1.5; }
.brief li::before { content: ""; position: absolute; left: .1rem; top: .62em; width: .42rem; height: .42rem; border-radius: 50%; background: var(--acc); }
.brief-note { margin-top: .9rem; font-size: .85rem; color: var(--muted); }

.doc section { margin-top: 2.8rem; padding-top: 2.2rem; border-top: 1px solid var(--line); }
h2 { font: 700 clamp(1.3rem, 2.6vw, 1.6rem)/1.25 var(--f-text); letter-spacing: 0; color: var(--text); text-wrap: balance; }
h2 .n { margin-right: .45em; color: var(--acc); font-variant-numeric: tabular-nums; }

.c { position: relative; margin-top: 1rem; padding-left: var(--num); }
.c .n { position: absolute; left: 0; top: 0; color: var(--dim); font-variant-numeric: tabular-nums; }
.l { list-style: none; margin-top: .55rem; padding-left: var(--num); display: grid; gap: .4rem; }
.l li { position: relative; padding-left: 1.2rem; }
.l li::before { content: ""; position: absolute; left: 0; top: .78em; width: .55rem; height: 1px; background: var(--dim); }

@media (max-width: 599px) {
  html { font-size: 16px; }
  .c { padding-left: 0; }
  .c .n { position: static; margin-right: .3em; color: var(--muted); }
  .l { padding-left: .2rem; }
}

/* ───────── Таблица тарифов ───────── */
.tbl { margin-top: 1rem; border: 1px solid var(--line2); border-radius: .8rem; overflow-x: auto; background: var(--s1); }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { padding: .7rem 1rem; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
thead th { border-top: 0; font: 600 .9rem var(--f-text); color: var(--muted); background: var(--s2); }
tbody th { font-weight: 600; color: var(--text); }
.price { text-align: right; white-space: nowrap; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
thead th:last-child { text-align: right; }
@media (max-width: 599px) { th, td { padding: .6rem .7rem; } }

/* ───────── Контакты ───────── */
.contacts { margin-top: 1.2rem; padding: 1.1rem 1.3rem; border: 1px solid var(--line2); border-radius: .9rem; background: var(--s1); }
.contacts dl { display: grid; gap: .7rem; }
.contacts dl > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .2rem 1rem; }
.contacts dt { color: var(--muted); }
.contacts dd { color: var(--text); overflow-wrap: anywhere; }
.contacts p { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); font-size: .92rem; color: var(--muted); }
@media (max-width: 599px) { .contacts dl > div { grid-template-columns: minmax(0, 1fr); } }

/* ───────── Конец документа и подвал ───────── */
.doc-end { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 3rem; padding-top: 1.8rem; border-top: 1px solid var(--line); }
.next { display: grid; gap: .15rem; padding: .9rem 1.2rem; border: 1px solid var(--line2); border-radius: .8rem; background: var(--s1); text-decoration: none; }
.next:hover { border-color: var(--acc); }
.next small { font-size: .88rem; color: var(--muted); }
.next b { color: var(--acc-soft); }
.up { font-size: .9rem; color: var(--muted); }

.foot { display: grid; gap: 1rem; padding: 2rem var(--gx) 2.5rem; border-top: 1px solid var(--line); }
.foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; font-size: .9rem; }
.foot-links a { color: var(--muted); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot-legal { font-size: .82rem; color: var(--dim); }

/* ───────── Печать ───────── */
@media print {
  @page { margin: 18mm 16mm; }
  :root { --bg: #fff; --s1: #fff; --s2: #f3f3f3; --line: #cfcfcf; --line2: #bdbdbd; --text: #000; --text2: #111; --muted: #444; --dim: #555; --acc: #000; --acc-soft: #000; --acc-hi: #000; --acc-bg: #fff; --num: 12mm; }
  html { font-size: 10.5pt; }
  body { background: #fff; }
  .skip, .top-nav, .foot-links, .doc-end, .dot { display: none; }
  .top { padding: 0 0 4mm; }
  .page { max-width: none; padding: 0; }
  .head { padding: 6mm 0 5mm; }
  .layout { display: block; padding-top: 5mm; }
  .toc { position: static; max-height: none; margin-bottom: 6mm; border: 1px solid var(--line); border-radius: 0; break-inside: avoid; }
  .toc summary { padding: 3mm 4mm 1mm; list-style: none; }
  .toc ol { padding: 0 4mm 3mm; border: 0; }
  .brief { border-color: var(--line2); break-inside: avoid; }
  .doc section { margin-top: 6mm; padding-top: 5mm; }
  h2 { break-after: avoid; }
  .c { orphans: 3; widows: 3; }
  .l li, .tbl, .contacts { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
  .doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .9em; overflow-wrap: anywhere; }
  .doc a[href^="http"][href$="/terms"]::after, .doc a[href^="http"][href$="/privacy"]::after, .contacts dd a[href^="http"]:not([rel])::after { content: none; }
  .foot { padding: 6mm 0 0; }
}
