.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.75rem;
  left: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: #ffffff;
  color: #02040a;
  font-weight: 800;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.legal-page {
  position: relative;
  z-index: 2;
  padding-bottom: 5rem;
}

.legal-hero {
  padding: clamp(3rem, 7vw, 6rem) 0 2rem;
}

.legal-hero h1 {
  max-width: 980px;
  margin: 0.8rem 0 1rem;
  font-size: clamp(2.5rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.legal-lead {
  max-width: 780px;
  color: #e4e9f5;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.65;
}

.legal-review-warning {
  max-width: 880px;
  margin-top: 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(255, 207, 92, 0.58);
  border-radius: 0.85rem;
  background: rgba(53, 35, 3, 0.82);
  color: #fff4cf;
  line-height: 1.55;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(220px, 290px) minmax(0, 780px);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.legal-toc {
  position: sticky;
  top: 7rem;
  max-height: calc(100vh - 9rem);
  overflow: auto;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1rem;
  background: rgba(7, 12, 24, 0.82);
  backdrop-filter: blur(14px);
}

.legal-toc h2 {
  margin: 0 0 0.9rem;
  font-size: 1rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.legal-toc li + li {
  margin-top: 0.55rem;
}

.legal-toc a {
  color: #dce4f8;
  font-size: 0.9rem;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-color: rgba(216, 180, 91, 0.42);
  text-underline-offset: 0.2em;
}

.legal-document {
  padding: clamp(1.4rem, 3vw, 2.6rem);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 1.25rem;
  background: rgba(7, 12, 24, 0.86);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.legal-document h2 {
  scroll-margin-top: 8rem;
  margin: 2.8rem 0 0.9rem;
  color: #ffffff;
  font-size: clamp(1.45rem, 3vw, 2rem);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.legal-document h2:first-child {
  margin-top: 0;
}

.legal-document h3 {
  margin: 2rem 0 0.75rem;
  color: #f5f7fb;
  font-size: 1.2rem;
}

.legal-document p,
.legal-document li {
  color: #d7deed;
  font-size: 1rem;
  line-height: 1.78;
}

.legal-document ul,
.legal-document ol {
  padding-left: 1.45rem;
}

.legal-document li + li {
  margin-top: 0.55rem;
}

.legal-document a,
.legal-footer-links a,
.sardev-development-credit a {
  color: #f3cf78;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.legal-document code {
  padding: 0.12em 0.34em;
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.09);
}

.footer-layout {
  display: grid;
  grid-template-columns: minmax(210px, 0.8fr) minmax(280px, 1.2fr);
  align-items: center;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #f5f7fb;
}

.footer-video-logo {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.7rem 1.1rem;
}

.sardev-development-credit {
  width: min(1180px, 92vw);
  margin: 1rem auto 0;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.6;
  opacity: 0.82;
}

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid #ffe09a;
  outline-offset: 4px;
}

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

  .legal-toc {
    position: relative;
    top: 0;
    max-height: none;
  }

  .footer-layout {
    grid-template-columns: 1fr;
  }

  .legal-footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .legal-document {
    padding: 1.1rem;
    border-radius: 1rem;
  }

  .legal-hero {
    padding-top: 2.5rem;
  }

  .footer-brand {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .footer-video-logo,
  .brand-video {
    display: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .legal-toc,
  .bg-video,
  .bg-overlay,
  .legal-review-warning {
    display: none !important;
  }

  body,
  .legal-document {
    background: #ffffff !important;
    color: #111111 !important;
    box-shadow: none !important;
  }

  .legal-layout {
    display: block;
  }

  .legal-document p,
  .legal-document li,
  .legal-document h2,
  .legal-document h3,
  .legal-document a {
    color: #111111 !important;
  }
}
