/* ============================================
   IZIHOME · LEGAL PAGES (privacy / consent / cookies / terms / contacts)
   ----------------------------------------------
   Текстовые страницы. Главная задача — читаемость длинных юридических
   текстов на тёмном фоне сайта. Никаких декораций, никаких форм-CTA.
   Зависит от CSS-переменных из inline <style> главной (--bg-canvas,
   --bg-block, --mint, --text-*, --border-*, --radius-*).
   ============================================ */

/* ===== Page wrapper ===== */
.legal-page {
  padding: clamp(40px, 6vw, 72px) 0 clamp(56px, 8vw, 96px);
  min-height: 60vh;
}

.legal-page .container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}
@media (max-width: 640px) {
  .legal-page .container { padding: 0 16px; }
}

/* Breadcrumbs → /assets/css/breadcrumbs.css */

/* ===== Title block ===== */
.legal-hero {
  margin-bottom: clamp(32px, 5vw, 56px);
  padding-bottom: clamp(24px, 4vw, 36px);
  border-bottom: 0.5px solid var(--border-subtle);
}

.legal-h1 {
  font-size: clamp(28px, 4.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.022em;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.legal-h1 .accent { color: var(--mint); font-weight: 600; }

.legal-lead {
  font-size: clamp(15px, 1.4vw, 17px);
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 720px;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 20px;
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-tertiary);
}
.legal-meta-item strong {
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===== Table of contents (sticky on desktop) ===== */
.legal-toc {
  background: var(--bg-block);
  border: 0.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: clamp(32px, 5vw, 48px);
}
.legal-toc-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin-bottom: 12px;
}
.legal-toc ol {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px 24px;
  counter-reset: toc;
}
@media (min-width: 720px) {
  .legal-toc ol { grid-template-columns: 1fr 1fr; }
}
.legal-toc li {
  counter-increment: toc;
  font-size: 13px;
  line-height: 1.45;
}
.legal-toc li::before {
  content: counter(toc) ".\00a0";
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}
.legal-toc a {
  color: var(--text-secondary);
  transition: color 180ms ease;
}
.legal-toc a:hover { color: var(--mint); }

/* ===== Content sections ===== */
.legal-section {
  margin-bottom: clamp(28px, 4vw, 40px);
  scroll-margin-top: 88px; /* для якорей из ToC, чтобы не уходило под header */
}

.legal-h2 {
  font-size: clamp(20px, 2.4vw, 24px);
  font-weight: 700;
  letter-spacing: -0.014em;
  line-height: 1.25;
  color: var(--text-primary);
  margin: clamp(32px, 4vw, 40px) 0 14px;
  position: relative;
  padding-left: 14px;
}
.legal-h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.35em;
  bottom: 0.25em;
  width: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--mint) 0%, var(--mint-deep) 100%);
}

.legal-h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.006em;
  line-height: 1.35;
  color: var(--text-primary);
  margin: 22px 0 10px;
}

.legal-section p,
.legal-section ul,
.legal-section ol {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

.legal-section ul,
.legal-section ol {
  padding-left: 22px;
  margin-bottom: 18px;
}
.legal-section ul { list-style: disc; }
.legal-section ol { list-style: decimal; }
.legal-section ul ul,
.legal-section ol ol,
.legal-section ul ol,
.legal-section ol ul {
  margin-top: 6px;
  margin-bottom: 6px;
}
.legal-section li { margin-bottom: 6px; }
.legal-section li::marker { color: var(--text-faint); }

.legal-section a {
  color: var(--mint);
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, color 180ms ease;
}
.legal-section a:hover {
  border-bottom-color: var(--mint-border);
}

.legal-section strong { color: var(--text-primary); font-weight: 600; }
.legal-section em { font-style: normal; color: var(--text-primary); }

.legal-section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  padding: 1px 6px;
  border-radius: 4px;
  background: var(--mint-subtle);
  color: var(--mint);
  border: 0.5px solid var(--mint-border);
}

/* ===== Definition / fact block ===== */
.legal-fact {
  background: var(--bg-block);
  border: 0.5px solid var(--border-subtle);
  border-left: 3px solid var(--mint);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.legal-fact-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 6px;
}

/* ===== Warning / important block ===== */
.legal-warn {
  background: var(--amber-soft);
  border: 0.5px solid var(--amber-border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  margin: 18px 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.legal-warn-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 6px;
}

/* ===== Tables ===== */
.legal-table-wrap {
  overflow-x: auto;
  margin: 18px 0;
  border: 0.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}
.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-block);
}
.legal-table th,
.legal-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 0.5px solid var(--border-subtle);
  vertical-align: top;
  line-height: 1.55;
}
.legal-table th {
  background: var(--bg-canvas);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.legal-table td { color: var(--text-secondary); }
.legal-table tr:last-child td { border-bottom: none; }
.legal-table code {
  background: transparent;
  border: none;
  padding: 0;
  color: var(--mint);
}

/* ===== Operator requisites block ===== */
.legal-requisites {
  background: var(--bg-content);
  border: 0.5px solid var(--mint-border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 24px 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 720px) {
  .legal-requisites { grid-template-columns: 1fr 1fr; }
}
.legal-requisites .legal-req-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 14px;
}
.legal-requisites .legal-req-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.legal-requisites .legal-req-value {
  color: var(--text-primary);
  font-weight: 500;
}
.legal-requisites .legal-req-value.is-pending {
  color: var(--text-tertiary);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.legal-requisites .legal-req-value.is-pending::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}

/* ===== Footer of legal page (footnote) ===== */
.legal-footnote {
  margin-top: clamp(40px, 5vw, 56px);
  padding-top: 24px;
  border-top: 0.5px solid var(--border-subtle);
  font-size: 12px;
  color: var(--text-tertiary);
  line-height: 1.6;
}
.legal-footnote a { color: var(--text-secondary); }
.legal-footnote a:hover { color: var(--mint); }

/* ===== Cross-links (low-key) ===== */
.legal-crosslinks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.legal-crosslinks a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 500;
  border: 0.5px solid var(--border-default);
  border-radius: 999px;
  color: var(--text-secondary);
  transition: border-color 180ms ease, color 180ms ease;
}
.legal-crosslinks a:hover {
  border-color: var(--mint-border);
  color: var(--mint);
}

/* ===== Contacts page specifics ===== */
.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0;
}
@media (min-width: 720px) {
  .contacts-grid { grid-template-columns: 1fr 1fr; }
}
.contacts-card {
  background: var(--bg-block);
  border: 0.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 24px;
}
.contacts-card-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mint);
  margin-bottom: 14px;
}
.contacts-card ul {
  list-style: none !important;
  padding: 0 !important;
  margin: 0 !important;
}
.contacts-card li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 0;
  border-bottom: 0.5px solid var(--border-subtle);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.contacts-card li:last-child { border-bottom: none; padding-bottom: 0; }
.contacts-card li:first-child { padding-top: 0; }
.contacts-card .contact-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-tertiary);
}
.contacts-card .contact-value {
  color: var(--text-primary);
  font-weight: 500;
}
.contacts-card .contact-value a {
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-default);
  transition: border-color 180ms ease, color 180ms ease;
}
.contacts-card .contact-value a:hover {
  color: var(--mint);
  border-bottom-color: var(--mint-border);
}
.contacts-card .contact-value.contact-pending {
  color: var(--text-tertiary);
  font-weight: 400;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.contacts-card .contact-value.contact-pending::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-faint);
  flex-shrink: 0;
}
