.legal-page .page-hero { min-height: min(44vh, 440px); }

.legal-page .page-hero-bg--legal {
  background:
    linear-gradient(90deg, rgba(11, 11, 13, 0.97) 0%, rgba(11, 11, 13, 0.9) 48%, rgba(11, 11, 13, 0.66) 100%),
    linear-gradient(180deg, rgba(11, 11, 13, 0.55) 0%, rgba(11, 11, 13, 0.08) 42%, rgba(11, 11, 13, 0.96) 96%, var(--bg) 100%),
    url("/static/img/biuro-rafmot.jpg") center 38% / cover no-repeat;
}

.legal-page .page-hero h1 { max-width: 20ch; text-wrap: balance; }

.legal-hero-meta {
  margin-top: 1.4rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.32fr) minmax(0, 0.68fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.legal-toc {
  position: sticky;
  top: 7rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

.legal-toc-label {
  display: block;
  margin-bottom: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red-bright);
}

.legal-toc nav { display: grid; gap: 0.1rem; }

.legal-toc a {
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: none;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.legal-toc a:hover { color: #fff; background: rgba(255, 255, 255, 0.04); }

.legal-content { max-width: 760px; }

.legal-intro {
  margin-bottom: 2.4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line);
  color: var(--silver);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}

.legal-section { scroll-margin-top: 6rem; }

.legal-section + .legal-section {
  margin-top: 2.6rem;
  padding-top: 2.6rem;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  display: flex;
  align-items: baseline;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
  font-size: clamp(1.28rem, 2.3vw, 1.65rem);
  text-wrap: balance;
}

.legal-num {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--red-bright);
}

.legal-section p,
.legal-section li { color: var(--muted); line-height: 1.72; }

.legal-section p + p { margin-top: 0.9rem; }

.legal-section h3 {
  margin: 1.6rem 0 0.6rem;
  color: var(--silver);
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 700;
}

.legal-list {
  margin-top: 0.85rem;
  padding-left: 0;
  list-style: none;
  display: grid;
  gap: 0.6rem;
}

.legal-list li { position: relative; padding-left: 1.45rem; }

.legal-list li::before {
  content: "";
  position: absolute;
  left: 0.25rem;
  top: 0.62rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--red-bright);
  box-shadow: 0 0 0 4px rgba(225, 29, 37, 0.1);
}

.legal-section a {
  color: var(--silver);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}

.legal-section a:hover { color: var(--red-bright); }

.legal-todo {
  font-style: italic;
  color: var(--muted);
  border-bottom: 1px dashed rgba(240, 48, 56, 0.55);
}

.legal-callout {
  margin-top: 1.2rem;
  padding: 1.1rem 1.3rem;
  border-left: 2px solid var(--red-bright);
  background: rgba(225, 29, 37, 0.06);
  border-radius: 0 10px 10px 0;
  color: var(--silver);
}

.legal-callout p { color: var(--silver); }

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
}

@media (max-width: 560px) {
  .legal-page .page-hero { min-height: 0; padding-top: 8rem; }
  .legal-section h2 { flex-direction: column; gap: 0.2rem; }
}
