/* ─────────────────────────────────────────────────────────────
   Uniqly AI — стили правовых и статических страниц
   (/oferta/, /terms/, /privacy/, /consent/, /contacts/ и будущие).
   Палитра и шрифты — как на главной (src/AppV2.jsx):
   фон #0E0E10, текст #F2EDE3, приглушённый #9A968E, золото #C9A86A / #E4D2A8,
   заголовки Bona Nova, текст Manrope, бренд Sora.
   ───────────────────────────────────────────────────────────── */

:root {
  --ink: #0E0E10;
  --ink-2: #211E24;
  --cream: #F2EDE3;
  --cream-soft: rgba(242, 237, 227, 0.84);
  --mist: #9A968E;
  --mist-dim: rgba(154, 150, 142, 0.55);
  --gold: #C9A86A;
  --gold-soft: #E4D2A8;
  --gold-line: rgba(201, 168, 106, 0.22);
  --gold-faint: rgba(201, 168, 106, 0.07);
  --rule: rgba(242, 237, 227, 0.08);
  --font-display: 'Bona Nova', 'Times New Roman', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-brand: 'Sora', 'Manrope', -apple-system, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  background-color: var(--ink);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--cream);
  background-color: var(--ink);
  background-image: radial-gradient(130% 90% at 50% -15%, #211E24 0%, #0E0E10 58%);
  background-repeat: no-repeat;
  background-size: 100% 1400px;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-inline: max(20px, env(safe-area-inset-left)) max(20px, env(safe-area-inset-right));
}

::selection { background: rgba(201, 168, 106, 0.32); color: var(--cream); }

/* iOS/Safari: не превращать ИНН/ОГРНИП/счета в телефонные ссылки */
a[x-apple-data-detectors],
.u-num a, .l-num a {
  color: inherit !important;
  text-decoration: none !important;
  font: inherit !important;
  pointer-events: none;
}

.nw { white-space: nowrap; }
.u-num, .l-num { font-variant-numeric: tabular-nums; white-space: nowrap; }

.l-skip {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--gold);
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
}
.l-skip:focus { left: 16px; }

/* ── Шапка ───────────────────────────────────────────────── */
.l-head {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding-block: 28px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.l-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-soft);
  text-decoration: none;
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: 1.25px;
}
.l-brand img {
  width: 30px;
  height: 32px;
  filter: drop-shadow(0 0 12px rgba(201, 168, 106, 0.35));
}
.l-brand:hover { color: #F3E6C6; }
.l-home {
  font-size: 13px;
  color: var(--mist);
  text-decoration: none;
  letter-spacing: .3px;
}
.l-home:hover { color: var(--gold-soft); }

/* ── Документ ────────────────────────────────────────────── */
.l-page {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding-block: 28px 56px;
  flex: 1 0 auto;
}

.l-kicker {
  margin: 0 0 10px;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold);
}

.l-doc h1 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.14;
  letter-spacing: -0.4px;
  color: var(--cream);
  text-wrap: balance;
}

.l-meta {
  margin: 0 0 28px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--mist);
}

.l-lead {
  font-size: 17px;
  color: var(--cream);
}

.l-doc h2 {
  margin: 48px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(23px, 4.2vw, 28px);
  line-height: 1.25;
  color: var(--gold-soft);
  scroll-margin-top: 20px;
  text-wrap: balance;
}
.l-doc h3 {
  margin: 28px 0 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16.5px;
  line-height: 1.45;
  color: var(--cream);
  scroll-margin-top: 20px;
}

.l-doc p { margin: 0 0 14px; color: var(--cream-soft); }
.l-doc strong, .l-doc b { font-weight: 600; color: var(--cream); }
.l-doc em { font-style: italic; }

/* Нумерованный пункт с висячим номером: <p class="cl"><span class="num">1.1.</span> …</p> */
.l-doc .cl {
  position: relative;
  padding-left: 3.1em;
}
.l-doc .cl > .num {
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  font-weight: 500;
}

.l-doc ul, .l-doc ol {
  margin: 0 0 16px;
  padding-left: 3.1em;
  color: var(--cream-soft);
}
.l-doc .cl + ul, .l-doc .cl + ol { margin-top: -6px; }
.l-doc li { margin: 0 0 7px; padding-left: 4px; }
.l-doc ul > li::marker { color: var(--gold); }
.l-doc ol > li::marker { color: var(--gold); font-variant-numeric: tabular-nums; }

.l-doc a {
  color: var(--gold-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--gold-line);
  transition: color .2s, border-color .2s;
  overflow-wrap: anywhere;
}
.l-doc a:hover { color: #F3E6C6; border-bottom-color: var(--gold); }

a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Оглавление ──────────────────────────────────────────── */
.l-toc {
  margin: 0 0 12px;
  padding: 18px 22px 14px;
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  background: var(--gold-faint);
}
.l-toc-t {
  margin: 0 0 8px !important;
  font-size: 12px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--gold) !important;
}
.l-doc .l-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  columns: 2 280px;
  column-gap: 28px;
}
.l-toc li {
  margin: 0;
  padding: 3px 0;
  break-inside: avoid;
  font-size: 14.5px;
  line-height: 1.45;
}
.l-toc a {
  color: var(--cream-soft);
  border-bottom: none;
}
.l-toc a:hover { color: var(--gold-soft); }

/* ── Выноски и карточки ──────────────────────────────────── */
.l-note {
  margin: 18px 0 20px;
  padding: 16px 20px;
  border-left: 2px solid var(--gold);
  border-radius: 0 12px 12px 0;
  background: rgba(255, 255, 255, 0.03);
}
.l-note p:last-child, .l-note ul:last-child { margin-bottom: 0; }

.l-box {
  margin: 20px 0 24px;
  padding: 20px 22px 8px;
  border: 1px solid var(--gold-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}
.l-box > h3:first-child { margin-top: 0; }

.l-req {
  margin: 16px 0 24px;
  padding: 18px 22px;
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}
.l-req dl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 13em) minmax(0, 1fr);
  gap: 8px 18px;
}
.l-req dt { color: var(--mist); font-size: 14.5px; }
.l-req dd { margin: 0; color: var(--cream); overflow-wrap: anywhere; }

/* ── Таблицы ─────────────────────────────────────────────── */
.l-tbl {
  margin: 16px 0 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--rule);
  border-radius: 14px;
}
.l-tbl table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.55;
}
.l-tbl.wide table { min-width: 1180px; table-layout: fixed; }
.l-tbl.wide th:nth-child(1) { width: 15%; }
.l-tbl.wide th:nth-child(2) { width: 11%; }
.l-tbl.wide th:nth-child(3) { width: 25%; }
.l-tbl.wide th:nth-child(4) { width: 13%; }
.l-tbl.wide th:nth-child(5) { width: 14%; }
.l-tbl.wide th:nth-child(6) { width: 12%; }
.l-tbl.wide th:nth-child(7) { width: 10%; }
.l-tbl th, .l-tbl td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule);
  color: var(--cream-soft);
}
.l-tbl th {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--gold);
  background: rgba(201, 168, 106, 0.06);
}
.l-tbl tbody tr:last-child td { border-bottom: none; }
.l-tbl td:first-child { color: var(--cream); font-weight: 500; }
.l-tbl ul { margin: 0; padding-left: 1.1em; }
.l-tbl li { margin: 0 0 4px; padding-left: 0; }
.l-tbl-hint {
  display: none;
  margin: 0 0 16px !important;
  font-size: 12.5px;
  color: var(--mist) !important;
}

.l-top {
  display: inline-block;
  margin-top: 30px;
  font-size: 13px;
  color: var(--mist) !important;
  border-bottom: none !important;
}
.l-top:hover { color: var(--gold-soft) !important; }

/* ── Единый мини-футер (.u-legal) + платёжные значки ─────── */
/* Футер шире колонки текста, чтобы строка .u-legal помещалась в одну строку
   на десктопе; разделительная линия — по ширине документа (720px). */
.u-foot {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-block: 0 34px;
  text-align: center;
}
.u-foot::before {
  content: "";
  display: block;
  max-width: 720px;
  margin: 0 auto 26px;
  border-top: 1px solid var(--rule);
}
/* Способы оплаты — нейтральные текстовые плашки (не логотипы: знаки платёжных
   систем без брендбука не перерисовываем). */
.u-pay {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  color: rgba(154, 150, 142, 0.72);
}
.u-pay li {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  min-width: 50px;
  padding: 0 10px;
  border: 1px solid rgba(154, 150, 142, 0.22);
  border-radius: 7px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  white-space: nowrap;
}

.u-legal {
  margin: 0;
  font-family: var(--font-body);
  font-size: 11.5px;
  line-height: 1.9;
  letter-spacing: .2px;
  color: rgba(154, 150, 142, 0.72);
  text-align: center;
  text-wrap: balance;
}
.u-legal .u-item { white-space: nowrap; }
.u-legal .u-sep { margin: 0 2px; color: rgba(154, 150, 142, 0.35); }
.u-legal a {
  color: rgba(201, 168, 106, 0.78);
  text-decoration: none;
  border-bottom: none;
  white-space: nowrap;
  transition: color .2s;
}
.u-legal a:hover { color: var(--gold-soft); }
.u-legal a[aria-current="page"] { color: var(--gold-soft); }

/* ── Мобильная версия ────────────────────────────────────── */
@media (max-width: 600px) {
  body {
    font-size: 15.5px;
    padding-inline: max(16px, env(safe-area-inset-left)) max(16px, env(safe-area-inset-right));
  }
  .l-head { padding-block: 20px 4px; }
  .l-page { padding-block: 18px 40px; }
  .l-doc h2 { margin-top: 38px; padding-top: 18px; }
  .l-doc .cl { padding-left: 2.8em; }
  .l-doc ul, .l-doc ol { padding-left: 2.6em; }
  .l-doc .l-toc ol { padding-left: 0; }
  .l-toc { padding: 16px 16px 12px; border-radius: 14px; }
  .l-box, .l-req { padding-left: 16px; padding-right: 16px; }
  .l-req dl { grid-template-columns: 1fr; gap: 0; }
  .l-req dt { margin-top: 10px; font-size: 13px; }
  .l-req dt:first-child { margin-top: 0; }
  .l-tbl-hint { display: block; }
  .u-legal { font-size: 11px; }
  .u-legal .u-sep { margin: 0 1px; }
}

/* ── Печать ──────────────────────────────────────────────── */
@media print {
  html, body { background: #fff !important; color: #000 !important; }
  body { padding: 0; font-size: 11pt; }
  .l-head .l-home, .l-skip, .l-toc, .l-top, .u-pay { display: none !important; }
  .u-foot::before { border-top-color: #ccc; }
  .l-doc h1, .l-doc h2, .l-doc h3, .l-doc p, .l-doc li, .l-doc strong,
  .l-tbl td, .l-tbl th, .l-req dt, .l-req dd, .u-legal, .l-brand, .l-kicker, .l-meta { color: #000 !important; }
  .l-doc a, .u-legal a { color: #000 !important; border-bottom: none; }
  .l-tbl { overflow: visible; border-color: #999; }
  .l-tbl table { min-width: 0 !important; font-size: 9pt; }
  .l-tbl th, .l-tbl td { border-color: #bbb; background: none; }
  .l-note, .l-box, .l-req { background: none; border-color: #999; }
  .l-doc h2 { break-after: avoid; border-top-color: #ccc; }
}
