/* The legal pages (/oferta, /terms-of-service, /privacy-policy), rendered by
   src/legal/legal-page.ts over the public site's own /assets/product-page.css
   and /assets/site-header.css, so they wear the site's header, type and
   footer. The page is served with a CSP that allows no inline style, so
   everything else it needs lives here. */

:root {
  --legal-note-bg: #fbf3df;
  --legal-note-line: #e4cf98;
  --legal-note-text: #5b4410;
}

/* The title band is the site's own `.legal-hero` (product-page.css). */
.legal-edition {
  white-space: nowrap;
}

/* The three documents and RU | UZ, on the dark band. The current one is
   marked by fill and weight, and by aria-current for a screen reader — never
   by colour alone. */
.legal-bar {
  justify-content: space-between;
  gap: 14px;
}

.legal-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.legal-hero__meta .legal-tabs a[aria-current="page"] {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.legal-lang {
  display: inline-flex;
  flex: none;
  padding: 3px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.legal-hero__meta .legal-lang a {
  min-width: 44px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: #9ed4be;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-align: center;
}

.legal-hero__meta .legal-lang a:hover {
  color: #fff;
}

.legal-hero__meta .legal-lang a[aria-current="true"] {
  background: #fff;
  color: var(--ink);
}

.legal-hero a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.prose a:focus-visible {
  outline: 2px solid var(--brand-bright);
  outline-offset: 3px;
}

.legal-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  max-width: 760px;
  margin: 18px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--legal-note-line);
  border-radius: 8px;
  background: var(--legal-note-bg);
  color: var(--legal-note-text);
  font-size: 15px;
  line-height: 1.5;
}

.legal-note svg {
  flex: none;
  margin-top: 1px;
}

/* The stored body: one section per chapter, the chapter's name on the left
   and its text on the right. */
.legal-body .section {
  padding: 56px 0;
  border-bottom: 1px solid var(--line);
}

.legal-body .section--soft {
  background: var(--panel-2);
}

.legal-body .content {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 56px;
  align-items: start;
}

.legal-body .kicker {
  margin: 0 0 14px;
}

.legal-body h2 {
  font-size: clamp(24px, 2.4vw, 32px);
}

.prose {
  font-size: 16px;
  line-height: 1.65;
}

.prose p,
.prose li {
  color: var(--ink-soft);
}

.prose p {
  margin: 16px 0 0;
}

.prose p:first-child {
  margin-top: 0;
}

.prose ul,
.prose ol {
  margin: 18px 0 0;
  padding-left: 22px;
}

.prose ul {
  list-style: disc;
}

.prose ol {
  list-style: decimal;
}

.prose li + li {
  margin-top: 10px;
}

.prose a {
  color: var(--brand-bright);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Numbered clauses: «1.1.» hangs in its own gutter so the text lines up. */
.prose ol.clauses {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.prose ol.clauses > li {
  margin: 0 0 0.85em;
  padding-left: 3.4em;
  position: relative;
}

.prose ol.clauses > li > b.n {
  position: absolute;
  left: 0;
  top: 0;
  font-weight: 600;
  color: var(--muted);
}

.prose ol.clauses ul {
  margin: 0.4em 0 0;
  padding-left: 1.2em;
}

.prose ol.clauses ul li {
  margin: 0.25em 0;
}

.prose .req {
  line-height: 1.7;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
}

.prose th,
.prose td {
  padding: 8px 10px;
  border: 1px solid var(--line-2);
  text-align: left;
  vertical-align: top;
}

/* The closing «Редакция от …» under the last section. */
.legal-closing {
  padding-top: 26px;
  padding-bottom: 48px;
  color: var(--muted);
  font-size: 15px;
}

.legal-closing p {
  margin: 0;
}

@media (max-width: 860px) {
  .legal-body .content {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .legal-body .section {
    padding: 40px 0;
  }
}

@media (max-width: 620px) {
  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  .prose ol.clauses > li {
    padding-left: 2.9em;
  }
}
