/* Документы и настройки используют общие токены существующего сайта. */
.legal-page { min-height: 100svh; }
.legal-main { padding: clamp(40px, 6vw, 88px) 0 80px; }
.legal-heading { max-width: 970px; margin-bottom: 48px; }
.legal-back { display: inline-block; color: var(--accent); margin-bottom: 26px; font-size: 14px; text-underline-offset: 4px; }
.legal-date { color: var(--text-2); font-size: 14px; margin-bottom: 14px; }
.legal-heading h1 { font-size: clamp(32px, 4.2vw, 60px); line-height: 1.08; letter-spacing: -.035em; font-weight: 600; overflow-wrap: anywhere; }
.legal-lead { color: var(--text-2); font-size: 19px; line-height: 1.55; max-width: 56ch; margin-top: 24px; }
.legal-layout { display: grid; grid-template-columns: minmax(180px, 260px) minmax(0, 1fr); align-items: start; gap: clamp(32px, 6vw, 90px); }
.legal-toc { display: grid; gap: 16px; border-top: 1px solid var(--line); padding-top: 22px; position: sticky; top: 108px; }
.legal-toc a { color: var(--text-2); font-size: 14px; line-height: 1.5; text-decoration: none; text-underline-offset: 4px; }
.legal-toc a:hover { color: var(--accent); text-decoration: underline; }
.legal-section { scroll-margin-top: 110px; margin-bottom: 40px; }
.legal-section h2 { font-size: clamp(22px, 2.3vw, 30px); line-height: 1.25; font-weight: 600; letter-spacing: -.02em; margin-bottom: 18px; }
.legal-content { max-width: 800px; min-width: 0; }
.legal-content p { font-size: 16px; line-height: 1.75; margin-bottom: 16px; color: var(--text-2); }
.legal-content strong { color: var(--text); font-weight: 600; }
.legal-content a, .contacts__email a { color: var(--accent); text-underline-offset: 3px; overflow-wrap: anywhere; }
.legal-content code { font: inherit; color: var(--text); overflow-wrap: anywhere; }
.legal-settings { margin-top: 8px; }
.legal-skip { position: fixed; left: 20px; top: 12px; z-index: 150; transform: translateY(-180%); background: var(--bg); border: 2px solid var(--accent); border-radius: var(--r-icon); padding: 12px 18px; }
.legal-skip:focus { transform: none; }
.footer__docs > a { max-width: 36ch; }
.footer__cookie-settings { appearance: none; width: fit-content; min-height: 28px; border: 0; padding: 0; background: none; color: var(--accent); font: inherit; text-align: left; cursor: pointer; text-underline-offset: 3px; }
.footer__cookie-settings:hover { text-decoration: underline; }
.footer__email { overflow-wrap: anywhere; }
.contacts__email { margin-top: 24px; color: var(--text-2); font-size: 16px; line-height: 1.5; }
.privacy-form-note { font-size: 12px; color: var(--text-2); line-height: 1.5; margin-top: 8px; }
.privacy-form-note a, .consent a { text-underline-offset: 3px; color: var(--accent); }
.map-permission { width: 100%; height: 100%; min-height: 300px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; padding: clamp(22px, 3vw, 40px); background: var(--bg-panel); }
.map-permission__title { font-size: 22px; font-weight: 600; line-height: 1.25; }
.map-permission p:not(.map-permission__title) { color: var(--text-2); font-size: 15px; line-height: 1.5; }
.map-permission > a { color: var(--accent); font-size: 13px; line-height: 1.5; text-underline-offset: 3px; }
.contacts__map { height: auto; min-height: 380px; }
.contacts__map iframe { min-height: 380px; }
.cookie-notice { position: fixed; z-index: 80; left: max(20px, var(--gutter)); bottom: 20px; width: min(560px, calc(100% - 40px)); max-height: calc(100svh - 40px); overflow-y: auto; padding: 26px; background: var(--bg); border: 1px solid var(--line-strong); box-shadow: 0 12px 54px rgba(58, 20, 36, .14); border-radius: var(--r-card); }
.cookie-notice h2 { font-size: 21px; line-height: 1.25; font-weight: 600; margin-bottom: 12px; }
.cookie-notice p { color: var(--text-2); font-size: 14px; line-height: 1.55; }
.cookie-notice__policy { display: inline-block; margin-top: 12px; color: var(--accent); font-size: 13px; line-height: 1.5; text-underline-offset: 3px; }
.cookie-notice__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; }
.cookie-notice__actions .btn { width: 100%; min-width: 0; min-height: 52px; padding: 12px; font-size: 14px; justify-content: center; text-align: center; white-space: normal; }
.cookie-notice[hidden], .map-permission[hidden], .contacts__map iframe[hidden] { display: none !important; }
@media (max-width: 767px) {
  .legal-main { padding-block: 38px 50px; }
  .legal-heading { margin-bottom: 30px; }
  .legal-heading h1 { font-size: clamp(30px, 8vw, 40px); }
  .legal-lead { font-size: 17px; margin-top: 20px; }
  .legal-layout { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .legal-toc { position: static; gap: 13px; }
  .legal-content p { font-size: 16px; line-height: 1.65; }
  .legal-settings, .map-permission > .btn { width: 100%; }
  .cookie-notice { left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: calc(100% - 32px); padding: 20px; border-radius: 20px; }
  body:has(.bottom-bar.is-visible) .cookie-notice { bottom: calc(94px + env(safe-area-inset-bottom)); max-height: calc(100svh - 110px - env(safe-area-inset-bottom)); }
  .cookie-notice__actions { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 16px; }
  .cookie-notice h2 { font-size: 19px; }
  .contacts__map, .contacts__map iframe { min-height: 360px; }
}
@media (prefers-reduced-motion: reduce) { .legal-page { scroll-behavior: auto; } }
@media (forced-colors: active) { .cookie-notice, .map-permission { border: 1px solid CanvasText; } }

.cookie-notice__configure { display: block; border: 0; padding: 10px 0 0; background: transparent; color: var(--accent); font: inherit; font-size: 14px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.cookie-notice__settings { min-width: 0; border: 0; padding: 16px 0 0; margin: 0; }
.cookie-notice__settings legend { padding: 0; font-size: 14px; font-weight: 600; }
.cookie-notice__settings label { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; font-size: 14px; line-height: 1.45; cursor: pointer; }
.cookie-notice__settings input { flex: 0 0 18px; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--accent); }
.cookie-notice__settings[hidden], .cookie-notice__configure[hidden] { display: none !important; }
