/* ============ Geosha — документы (условия, политика, тарифы, возврат, о сервисе) ============ */

html, body.lg-body { height: auto; }
body.lg-body { overflow-x: hidden; overflow-y: auto; min-height: 100dvh; }

.lg-top, .lg-tabs, .lg-wrap, .lg-foot { position: relative; z-index: 1; }

/* шапка */
.lg-top {
  position: sticky; top: 12px; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: min(1120px, calc(100% - 32px)); margin: 12px auto 0; padding: 10px 10px 10px 18px;
  border-radius: 20px;
}
.lg-cta {
  display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px;
  border-radius: 13px; text-decoration: none; font-weight: 600; font-size: 14.5px;
  color: var(--on-brand); background: var(--brand); box-shadow: 0 8px 20px -10px var(--glow);
}
.lg-cta svg { width: 18px; height: 18px; }
.lg-cta:hover { filter: brightness(1.06); }

/* вкладки документов */
.lg-tabs {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  width: min(1120px, calc(100% - 32px)); margin: 18px auto 0; padding: 2px;
}
.lg-tabs::-webkit-scrollbar { display: none; }
.lg-tabs a {
  flex: none; padding: 8px 15px; border-radius: 999px; text-decoration: none;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  background: var(--inset-fill); border: 1px solid var(--glass-edge);
}
.lg-tabs a:hover { background: var(--hover); color: var(--ink); }
.lg-tabs a[aria-current="page"] { color: var(--on-brand); background: var(--brand); border-color: transparent; }

/* сетка: оглавление + документ */
.lg-wrap {
  display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 22px; align-items: start;
  width: min(1120px, calc(100% - 32px)); margin: 18px auto 0;
}
.lg-toc { position: sticky; top: 92px; }
.lg-toc[hidden] { display: none; }
.lg-wrap:has(.lg-toc[hidden]) { grid-template-columns: minmax(0, 1fr); max-width: 860px; }
.lg-toc summary {
  list-style: none; cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--ink-faint); padding: 6px 12px;
}
.lg-toc summary::-webkit-details-marker { display: none; }
.lg-toc ol { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lg-toc a {
  display: block; padding: 7px 12px; border-radius: 11px; text-decoration: none;
  font-size: 14px; line-height: 1.35; color: var(--ink-soft);
}
.lg-toc a:hover { background: var(--hover); color: var(--ink); }
.lg-toc a.on { background: var(--active); color: var(--ink); font-weight: 600; }

/* документ */
.lg-doc { border-radius: var(--r-panel); padding: 34px 40px 40px; }
.lg-head { margin-bottom: 26px; }
.lg-meta { margin: 0 0 8px; font-size: 13px; color: var(--ink-faint); }
.lg-head h1 { margin: 0; font: 700 clamp(22px, 5.6vw, 36px)/1.18 var(--font-display); letter-spacing: -.02em; hyphens: auto; overflow-wrap: break-word; }
.lg-lead { margin: 12px 0 0; font-size: 17px; color: var(--ink-soft); max-width: 62ch; }

.lg-body-text { font-size: 15.5px; line-height: 1.65; }
.lg-body-text h2 {
  display: flex; align-items: center; gap: 12px; scroll-margin-top: 96px;
  margin: 34px 0 10px; font: 700 19px/1.3 var(--font-display); letter-spacing: -.01em;
  counter-increment: lg;
}
.lg-body-text { counter-reset: lg; }
.lg-body-text h2::before {
  content: counter(lg); flex: none; display: grid; place-items: center;
  width: 30px; height: 30px; border-radius: 10px; font: 700 13px/1 var(--font-body);
  color: var(--on-brand); background: var(--brand);
}
.lg-body-text.no-num h2::before, .lg-body-text h2.plain::before { display: none; }
.lg-body-text h3 { margin: 20px 0 6px; font-size: 16px; font-weight: 700; }
.lg-body-text p { margin: 8px 0; }
.lg-body-text ul, .lg-body-text ol { margin: 8px 0; padding-left: 22px; }
.lg-body-text li { margin: 4px 0; }
.lg-body-text li::marker { color: var(--violet); }
.lg-body-text a { color: var(--blue); text-underline-offset: 3px; }
:root[data-theme="dark"] .lg-body-text a, :root[data-theme="custom"] .lg-body-text a { color: #9DB0FF; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .lg-body-text a { color: #9DB0FF; } }
.lg-body-text b, .lg-body-text strong { font-weight: 650; }
.lg-body-text .muted { color: var(--ink-soft); font-size: 14px; }

/* «Коротко» — главное в начале */
.lg-tldr {
  margin: 0 0 8px; padding: 18px 20px; border-radius: 20px;
  background: var(--inset-fill); border: 1px solid var(--glass-edge);
}
.lg-tldr > b { display: block; margin-bottom: 8px; font: 700 14px/1 var(--font-display); letter-spacing: .02em; }
.lg-tldr ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.lg-tldr li { position: relative; padding-left: 26px; margin: 0; }
.lg-tldr li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 16px; height: 16px; border-radius: 50%;
  background: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='8'/%3E%3C/svg%3E");
}
.lg-tldr li::after {
  content: ""; position: absolute; left: 5px; top: calc(.32em + 4px); width: 6px; height: 3.5px;
  border: solid #fff; border-width: 0 0 2px 2px; transform: rotate(-45deg);
}

/* заметка */
.lg-note {
  display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; padding: 14px 16px;
  border-radius: 16px; background: var(--tint); border: 1px solid var(--glass-edge); font-size: 14.5px;
}
.lg-note svg { width: 20px; height: 20px; color: var(--violet); margin-top: 2px; }
.lg-note p { margin: 0; }

/* таблицы */
.lg-table { overflow-x: auto; margin: 12px 0; border-radius: 16px; border: 1px solid var(--glass-edge); background: var(--inset-fill); }
.lg-table table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 480px; }
.lg-table th, .lg-table td { padding: 11px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--glass-edge); }
.lg-table tr:last-child td { border-bottom: 0; }
.lg-table th { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-faint); }
.lg-table td:first-child { font-weight: 600; }
.lg-table .yes { color: var(--mint); font-weight: 700; }
.lg-table .no { color: var(--ink-faint); }

/* карточки тарифов и возможностей */
.lg-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin: 14px 0; }
.lg-card {
  position: relative; padding: 20px; border-radius: 20px;
  background: var(--inset-fill); border: 1px solid var(--glass-edge);
}
.lg-card h3 { margin: 0 0 4px; font: 700 17px/1.3 var(--font-display); }
.lg-card .price { margin: 6px 0 10px; font: 700 26px/1.1 var(--font-display); letter-spacing: -.02em; }
.lg-card .price small { font: 500 14px var(--font-body); color: var(--ink-soft); }
.lg-card ul { padding-left: 18px; margin: 6px 0 0; }
.lg-card p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.lg-card.featured { border-color: transparent; box-shadow: 0 0 0 1.5px var(--violet), 0 18px 40px -22px var(--glow); }
.lg-card .badge {
  position: absolute; top: 14px; right: 14px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; color: var(--on-brand); background: var(--brand);
}
.lg-card .ico {
  display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 12px;
  border-radius: 13px; color: var(--on-brand); background: var(--brand);
}
.lg-card .ico svg { width: 21px; height: 21px; }

/* шаги */
.lg-steps { list-style: none; counter-reset: st; padding: 0 !important; display: grid; gap: 10px; }
.lg-steps li { counter-increment: st; position: relative; padding: 12px 14px 12px 50px; margin: 0; border-radius: 16px; background: var(--inset-fill); border: 1px solid var(--glass-edge); }
.lg-steps li::before {
  content: counter(st); position: absolute; left: 12px; top: 11px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--violet);
  background: var(--active);
}

/* подвал */
.lg-foot {
  width: min(1120px, calc(100% - 32px)); margin: 26px auto 0; padding: 0 4px 34px;
  text-align: center; font-size: 13px; color: var(--ink-faint);
}
.lg-foot p { margin: 4px 0; }
.lg-foot a { color: inherit; }
.lg-others { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; margin-bottom: 12px; font-size: 14px; }
.lg-others a { color: var(--ink-soft); text-decoration: none; }
.lg-others a:hover { color: var(--ink); text-decoration: underline; }

/* телефон */
@media (max-width: 900px) {
  .lg-wrap { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .lg-toc { position: static; }
  .lg-toc details { border-radius: 18px; background: var(--inset-fill); border: 1px solid var(--glass-edge); padding: 6px; }
  .lg-toc summary { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; }
  .lg-toc summary::after { content: ""; width: 8px; height: 8px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg); margin-top: -4px; transition: transform .2s; }
  .lg-toc details[open] summary::after { transform: rotate(-135deg); margin-top: 3px; }
}
@media (max-width: 600px) {
  .lg-top, .lg-tabs, .lg-wrap, .lg-foot { width: calc(100% - 24px); }
  .lg-top { top: 8px; margin-top: 8px; padding: 8px 8px 8px 14px; border-radius: 18px; }
  .lg-cta { height: 38px; padding: 0 13px; }
  .lg-doc { padding: 24px 18px 26px; border-radius: 24px; }
  .lg-lead { font-size: 15.5px; }
  .lg-body-text { font-size: 15px; }
  .lg-body-text h2 { font-size: 17px; margin-top: 28px; }
  .lg-tldr { padding: 16px; }
  .lg-table table { min-width: 0; font-size: 13.5px; }
  .lg-table th, .lg-table td { padding: 9px 10px; }
  .lg-table th { font-size: 11px; letter-spacing: .04em; }
  .lg-tabs { padding: 2px 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html { scroll-behavior: smooth; }
[data-doc="about"] .lg-body-text h2::before { display: none; }
