/* Юридические документы и страница «Документы» (19.10.2026): /privacy/, /consent/, /cookies/,
   /legal/request/ и /legal/. Собираются tools/build-legal.mjs из content/legal/.
   Подключается после /shop/base.css, /support-kit/support.css и /support-kit/article.css —
   токены, шрифты, .btn и .ar-back оттуда. */

.lg .lg-head { display: grid; justify-items: start; gap: 24px; }
.sp.lg h1 { max-width: 20em; font-size: clamp(26px, 6.6vw, 56px); line-height: 1.08; }
.lg-meta { max-width: 60ch; font-size: 18px; line-height: 1.5; color: var(--muted); }
.lg-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* вторая кнопка: контур вместо заливки, та же высота и форма, что у .btn */
.lg-btn { display: inline-flex; align-items: center; justify-content: center; height: 56px; padding: 0 32px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; white-space: nowrap; cursor: pointer; transition: background 150ms var(--ease), color 150ms var(--ease); }
.lg-btn:hover { background: var(--ink); color: var(--bg); }

/* документ: содержание слева, текст справа */
.lg-grid { display: grid; gap: 32px; padding-top: 64px; align-items: start; }
.lg-toc summary { display: flex; align-items: center; justify-content: space-between; height: 48px; padding: 0 20px; border-radius: 999px; background: var(--surface); font-size: 16px; font-weight: 600; list-style: none; cursor: pointer; }
.lg-toc summary::-webkit-details-marker { display: none; }
.lg-toc summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform 200ms var(--ease); }
.lg-toc details[open] summary::after { transform: rotate(-135deg); }
.lg-toc ol { display: grid; gap: 4px; margin: 16px 0 0; padding: 0; list-style: none; counter-reset: s; }
.lg-toc li { counter-increment: s; }
.lg-toc a { display: grid; grid-template-columns: 28px 1fr; align-items: baseline; min-height: 44px; padding: 8px 12px 8px 0; font-size: 16px; line-height: 1.35; color: var(--muted); transition: color 150ms var(--ease); }
.lg-toc a::before { content: counter(s) "."; font-variant-numeric: tabular-nums; }
.lg-toc a:hover, .lg-toc a.is-on { color: var(--ink); }
.lg-toc a.is-on::before { color: var(--red); }
@media (min-width: 1000px) {
  .lg-grid { grid-template-columns: 240px minmax(0, 880px); gap: 64px; }
  .lg-toc { position: sticky; top: 112px; }
  .lg-toc summary { height: auto; padding: 0; border-radius: 0; background: none; font-size: 14px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); pointer-events: none; }
  .lg-toc summary::after { display: none; }
}

.lg-body { font-size: 18px; line-height: 1.65; }
.lg-body > * + * { margin-top: 16px; }
.lg-body h2 { margin-top: 64px; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-size: clamp(22px, 2.6vw, 32px); line-height: 1.15; scroll-margin-top: 112px; }
.lg-body > h2:first-child { margin-top: 0; }
.lg-body h2 + * { margin-top: 24px; }
.lg-body .cl { display: grid; grid-template-columns: 56px minmax(0, 1fr); }
.lg-body .cl-n { font-weight: 400; color: var(--muted); font-variant-numeric: tabular-nums; }
.lg-body ul { display: grid; gap: 8px; margin-left: 56px; padding-left: 20px; list-style: none; }
.lg-body ul > li { position: relative; }
.lg-body ul > li::before { content: ""; position: absolute; left: -20px; top: .7em; width: 8px; height: 2px; background: var(--red); }
.lg-body a { box-shadow: inset 0 -1px currentColor; transition: color 150ms var(--ease); }
.lg-body a:hover { color: var(--red); }
.lg-body strong { font-weight: 600; }
@media (max-width: 599px) {
  .lg-body { font-size: 17px; line-height: 1.6; }
  .lg-body .cl { grid-template-columns: 1fr; gap: 2px; }
  .lg-body ul { margin-left: 0; }
}

/* таблицы: на телефоне каждая строка — отдельный блок с подписями столбцов */
.lg-tbl { margin-left: 56px; margin-top: 24px; overflow-x: auto; }
.lg-tbl table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.45; }
.lg-tbl th, .lg-tbl td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.lg-tbl th { font-size: 13px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); border-bottom-color: var(--ink); }
.lg-tbl td:first-child { font-weight: 500; }
@media (max-width: 899px) {
  .lg-tbl { margin-left: 0; }
  .lg-tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .lg-tbl tr { display: block; padding: 16px 0; border-bottom: 1px solid var(--line); }
  .lg-tbl td { display: block; padding: 4px 0; border: 0; }
  .lg-tbl td::before { content: attr(data-l); display: block; font-size: 12px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
}

/* страница «Документы» */
.lg-hub .lg-head { gap: 16px; }
.lg-rows { margin: 64px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--ink); }
.lg-row { display: grid; grid-template-columns: 1fr; gap: 24px; padding: 32px 0; border-bottom: 1px solid var(--line); }
.lg-no { display: none; font-family: var(--font-display); font-weight: var(--display-weight); font-stretch: var(--display-stretch); font-size: 20px; line-height: 1.3; color: var(--red); font-variant-numeric: tabular-nums; }
.lg-row-t h2 { font-size: clamp(22px, 2.6vw, 32px); line-height: 1.15; }
.lg-row-t h2 a:hover { color: var(--red); }
.lg-row-t p { margin-top: 12px; max-width: 56ch; font-size: 18px; line-height: 1.5; color: var(--muted); }
.lg-row-t .lg-row-m { margin-top: 8px; font-size: 14px; }
.lg-row-a { display: flex; flex-wrap: wrap; gap: 12px; align-content: start; }
@media (min-width: 900px) {
  .lg-row { grid-template-columns: 64px minmax(0, 1fr) auto; gap: 32px; align-items: start; }
  .lg-no { display: block; padding-top: 6px; }
}
.lg-side { display: grid; gap: 24px; margin-top: 64px; }
@media (min-width: 900px) { .lg-side { grid-template-columns: 1fr 1fr; } }
.lg-card { display: grid; align-content: start; justify-items: start; gap: 16px; padding: 32px; border-radius: 16px; background: var(--surface); }
.lg-card h2 { font-size: 24px; line-height: 1.2; }
.lg-card p { font-size: 16px; line-height: 1.6; color: var(--muted); }
.lg-card a { box-shadow: inset 0 -1px currentColor; }

@media print {
  .site-header, .ft, .toast, .lg-actions, .lg-toc, .ar-back, .ck, .ck-dlg { display: none !important; }
  .sp { padding: 0; }
  .lg-grid { display: block; padding-top: 24px; }
}

/* Автоподстановка браузера не меняет вид полей: фон и цвет остаются своими (без синей заливки) */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active,
textarea:-webkit-autofill, textarea:-webkit-autofill:hover, textarea:-webkit-autofill:focus,
select:-webkit-autofill, select:-webkit-autofill:hover, select:-webkit-autofill:focus {
  transition: background-color 600000s 0s, color 600000s 0s;
}
