.legal-site {
  background:
    radial-gradient(circle at 76% 7%, rgba(215, 154, 59, 0.1), transparent 30rem),
    radial-gradient(circle at 18% 38%, rgba(45, 83, 70, 0.13), transparent 38rem),
    var(--ink);
}

.legal-main {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.legal-intro {
  position: relative;
  display: flex;
  min-height: min(760px, 82svh);
  align-items: flex-end;
  padding: clamp(10rem, 18vh, 13rem) 0 clamp(4rem, 7vw, 6.5rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(7, 10, 10, 0.08), rgba(7, 10, 10, 0.78)),
    radial-gradient(circle at 78% 25%, rgba(215, 154, 59, 0.08), transparent 31rem);
}

.legal-intro::before {
  content: "";
  position: absolute;
  top: 20%;
  right: clamp(-12rem, -7vw, -5rem);
  width: clamp(24rem, 42vw, 48rem);
  aspect-ratio: 1;
  border: 1px solid rgba(231, 207, 170, 0.13);
  border-radius: 50%;
  box-shadow:
    0 0 0 4.8rem rgba(215, 154, 59, 0.017),
    0 0 0 9.6rem rgba(215, 154, 59, 0.012);
  pointer-events: none;
  animation: legal-orbit 22s ease-in-out infinite alternate;
}

.legal-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  color: var(--gold-pale);
  font-size: 0.68rem;
  font-weight: 580;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.legal-eyebrow span + span {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--muted);
}

.legal-eyebrow span + span::before {
  content: "";
  width: 2.5rem;
  height: 1px;
  background: rgba(215, 154, 59, 0.55);
}

.legal-intro h1 {
  position: relative;
  max-width: 10ch;
  font-family: var(--font-display);
  font-size: clamp(4.4rem, 9.2vw, 8.7rem);
  font-weight: 420;
  letter-spacing: -0.066em;
  line-height: 0.83;
}

.legal-intro h1 em {
  color: var(--gold-pale);
  font-style: normal;
  font-weight: 280;
}

.legal-lede {
  max-width: 45rem;
  margin-top: clamp(2rem, 4vw, 3.4rem);
  color: var(--ivory-soft);
  font-size: clamp(1rem, 1.45vw, 1.22rem);
  line-height: 1.72;
}

.legal-switcher {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 68rem;
  margin-top: clamp(3.5rem, 7vw, 6rem);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.legal-switcher a {
  position: relative;
  display: flex;
  min-height: 5.6rem;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem clamp(1rem, 2.2vw, 2rem);
  border-right: 1px solid var(--line);
  color: var(--ivory-soft);
  font-family: var(--font-display);
  font-size: clamp(0.88rem, 1.1vw, 1rem);
  letter-spacing: -0.01em;
  transition: color 220ms ease, background-color 220ms ease;
}

.legal-switcher a:last-child {
  border-right: 0;
}

.legal-switcher a span {
  color: var(--gold);
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-weight: 620;
  letter-spacing: 0.12em;
}

.legal-switcher a::after {
  content: "";
  position: absolute;
  right: 1.4rem;
  bottom: 0;
  left: 1.4rem;
  height: 1px;
  transform: scaleX(0);
  transform-origin: right;
  background: var(--gold);
  transition: transform 260ms ease;
}

.legal-switcher a:hover,
.legal-switcher a:focus-visible {
  color: var(--ivory);
  background: rgba(243, 237, 223, 0.025);
}

.legal-switcher a:hover::after,
.legal-switcher a:focus-visible::after,
.legal-switcher a[aria-current="page"]::after {
  transform: scaleX(1);
  transform-origin: left;
}

.legal-switcher a[aria-current="page"] {
  background: linear-gradient(120deg, rgba(215, 154, 59, 0.14), rgba(215, 154, 59, 0.025));
  color: var(--gold-pale);
}

.legal-document {
  position: relative;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(7, 10, 10, 0.79);
}

.legal-document__inner {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: clamp(3rem, 7vw, 7.5rem);
  align-items: start;
  padding-top: clamp(5rem, 9vw, 8rem);
  padding-bottom: clamp(7rem, 12vw, 11rem);
}

.legal-document__meta {
  position: sticky;
  top: 7.5rem;
  display: grid;
  gap: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(215, 154, 59, 0.48);
}

.legal-document__meta dl,
.legal-document__meta dd {
  margin: 0;
}

.legal-document__meta dl {
  display: grid;
  gap: 1.4rem;
}

.legal-document__meta dl div {
  display: grid;
  gap: 0.36rem;
}

.legal-document__meta dt,
.legal-toc__label {
  color: var(--muted-dark);
  font-size: 0.59rem;
  font-weight: 620;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.legal-document__meta dd {
  color: var(--ivory-soft);
  font-size: 0.76rem;
  line-height: 1.55;
}

.legal-document__contact {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 0.55rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid rgba(215, 154, 59, 0.45);
  color: var(--gold-pale);
  font-size: 0.7rem;
  font-weight: 550;
  letter-spacing: 0.025em;
}

.legal-document__contact span {
  transition: transform 180ms ease;
}

.legal-document__contact:hover span,
.legal-document__contact:focus-visible span {
  transform: translate(2px, -2px);
}

.legal-toc:empty {
  display: none;
}

.legal-toc {
  display: grid;
  gap: 0.8rem;
  padding-top: 1.7rem;
  border-top: 1px solid var(--line-soft);
}

.legal-toc ol {
  max-height: min(45vh, 25rem);
  margin: 0;
  padding: 0 0.25rem 0 0;
  overflow-y: auto;
  list-style: none;
  scrollbar-color: rgba(215, 154, 59, 0.36) transparent;
  scrollbar-width: thin;
}

.legal-toc li + li {
  margin-top: 0.55rem;
}

.legal-toc a {
  display: block;
  padding: 0.18rem 0;
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.5;
  transition: color 180ms ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--gold-pale);
}

.legal-copy {
  width: min(100%, 58rem);
}

.legal-section {
  padding: clamp(2.4rem, 5vw, 4rem) 0;
  border-top: 1px solid var(--line-soft);
}

.legal-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.legal-section h2 {
  max-width: 29ch;
  margin-bottom: 1.6rem;
  color: var(--ivory);
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.95rem);
  font-weight: 430;
  letter-spacing: -0.035em;
  line-height: 1.18;
  text-wrap: balance;
}

.legal-section p,
.legal-section li {
  max-width: 74ch;
  color: var(--muted);
  font-size: clamp(0.89rem, 1.04vw, 0.98rem);
  line-height: 1.82;
}

.legal-section p + p,
.legal-section p + ul,
.legal-section ul + p {
  margin-top: 1.25rem;
}

.legal-section ul {
  display: grid;
  gap: 0.72rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}

.legal-section li {
  position: relative;
  padding-left: 1.25rem;
}

.legal-section li::before {
  content: "";
  position: absolute;
  top: 0.77rem;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(215, 154, 59, 0.55);
}

.legal-section strong {
  color: var(--ivory-soft);
  font-weight: 570;
}

.legal-section a {
  color: var(--gold-pale);
  text-decoration: underline;
  text-decoration-color: rgba(215, 154, 59, 0.5);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  overflow-wrap: anywhere;
  transition: color 180ms ease, text-decoration-color 180ms ease;
}

.legal-section a:hover,
.legal-section a:focus-visible {
  color: var(--gold-bright);
  text-decoration-color: currentColor;
}

.legal-section code {
  padding: 0.16em 0.42em;
  border: 1px solid var(--line);
  background: rgba(243, 237, 223, 0.035);
  color: var(--ivory-soft);
  font-size: 0.82em;
  overflow-wrap: anywhere;
}

.legal-site .site-footer__inner {
  color: var(--muted);
}

.legal-site .site-footer__links a[aria-current="page"] {
  color: var(--gold-pale);
}

.cookie-banner {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  left: max(1rem, env(safe-area-inset-left));
  z-index: 500;
  width: min(calc(100% - 2rem), 46rem);
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1rem 1rem 1.25rem;
  border: 1px solid rgba(215, 154, 59, 0.28);
  background: rgba(12, 17, 16, 0.94);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.46);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
  backdrop-filter: blur(18px) saturate(120%);
}

.cookie-banner p {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.65;
}

.cookie-banner a {
  color: var(--gold-pale);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.cookie-banner button {
  flex: 0 0 auto;
  min-height: 2.65rem;
  padding: 0 1.15rem;
  border: 1px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.cookie-banner button:hover,
.cookie-banner button:focus-visible {
  border-color: var(--gold-bright);
  background: var(--gold-bright);
}

@keyframes legal-orbit {
  from { transform: translate3d(0, -1.5rem, 0) scale(0.96); opacity: 0.55; }
  to { transform: translate3d(-3rem, 2rem, 0) scale(1.04); opacity: 0.9; }
}

@media (max-width: 900px) {
  .legal-document__inner {
    grid-template-columns: 1fr;
    gap: 4rem;
  }

  .legal-document__meta {
    position: static;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .legal-document__meta dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-toc {
    display: none;
  }
}

@media (max-width: 680px) {
  .legal-intro {
    min-height: auto;
    align-items: stretch;
    padding-top: 9.5rem;
    padding-bottom: 4rem;
  }

  .legal-intro::before {
    top: 15%;
    right: -16rem;
    width: 30rem;
  }

  .legal-intro h1 {
    font-size: clamp(3.65rem, 18vw, 5.8rem);
  }

  .legal-lede {
    max-width: 31rem;
    font-size: 0.95rem;
  }

  .legal-switcher {
    grid-template-columns: 1fr;
    margin-top: 3.5rem;
  }

  .legal-switcher a {
    min-height: 4.6rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .legal-switcher a:last-child {
    border-bottom: 0;
  }

  .legal-document__inner {
    gap: 3rem;
    padding-top: 4rem;
    padding-bottom: 6rem;
  }

  .legal-document__meta {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .legal-section {
    padding: 2.6rem 0;
  }

  .legal-section p,
  .legal-section li {
    font-size: 0.9rem;
    line-height: 1.78;
  }

  .cookie-banner {
    width: auto;
    align-items: stretch;
    flex-direction: column;
    gap: 0.8rem;
  }

  .cookie-banner button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-intro::before {
    animation: none;
  }
}
