body.legal-page {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #030714 0%, #050c1d 38%, #060e20 68%, #020611 100%);
  color: rgba(255, 255, 255, 0.96);
}

.legal-site-shell {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: clip;
}

.legal-site-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(62, 110, 210, 0.16) 0%, rgba(62, 110, 210, 0) 30%),
    radial-gradient(circle at 82% 22%, rgba(15, 24, 61, 0.22) 0%, rgba(15, 24, 61, 0) 24%),
    radial-gradient(circle at 50% 82%, rgba(10, 19, 46, 0.24) 0%, rgba(10, 19, 46, 0) 28%);
  pointer-events: none;
}

body.legal-page .site-theme-slot--fallback {
  --site-theme-toggle-fallback-top: calc(var(--site-header-offset, 0px) + 74px);
  --site-theme-toggle-fallback-right: 18px;
}

.legal-main {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  padding: clamp(30px, 4vw, 56px) 0 clamp(80px, 10vw, 132px);
}

.bar-badge {
  position: fixed;
  top: var(--site-header-offset);
  right: clamp(38px, calc((100vw - min(var(--header-content-width), calc(100% - 40px))) / 2 + 48px), 184px);
  min-width: 251px;
  min-height: 42px;
  padding: 10px 14px 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.98);
  background: url("assets/bar-number-button.svg") center / 100% 100% no-repeat;
  z-index: 109;
  transition: top 220ms ease;
}

.legal-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.legal-layout {
  display: grid;
  gap: 24px;
}

.legal-hero {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 2.8vw, 34px) 0 8px;
}

.legal-hero-lockup {
  display: grid;
  gap: 12px;
}

.legal-hero-kicker,
.legal-section-kicker,
.legal-related-kicker {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.84rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(159, 186, 255, 0.76);
}

.legal-hero-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.8rem, 6vw, 5.2rem);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.96;
  color: rgba(255, 255, 255, 0.98);
}

.legal-hero-lead {
  margin: 0;
  max-width: 64ch;
  font-size: clamp(1rem, 1.24vw, 1.18rem);
  line-height: 1.74;
  color: rgba(216, 223, 241, 0.8);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.legal-meta-chip {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(239, 243, 252, 0.9);
  font-size: 0.95rem;
  line-height: 1.4;
}

.legal-meta-label {
  color: rgba(170, 192, 246, 0.82);
}

.legal-meta-chip a,
.legal-related-link {
  color: rgba(239, 243, 252, 0.96);
}

.legal-meta-chip a:hover,
.legal-meta-chip a:focus-visible,
.legal-related-link:hover,
.legal-related-link:focus-visible {
  text-decoration: underline;
}

.legal-pill-rail {
  position: sticky;
  top: calc(var(--site-header-offset) + 18px);
  z-index: 5;
}

.legal-pill-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px;
  border-radius: 24px;
  background: rgba(7, 14, 35, 0.76);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(18px);
  box-shadow: 0 20px 36px rgba(2, 6, 18, 0.24);
}

.legal-pill-link {
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.02);
  color: rgba(245, 247, 252, 0.9);
  font-family: var(--serif);
  font-size: 1rem;
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease;
}

.legal-pill-link:hover,
.legal-pill-link:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(164, 189, 255, 0.42);
  background: rgba(77, 129, 230, 0.14);
}

.legal-pill-link.is-active {
  background: linear-gradient(180deg, #5a8cf0 0%, #4576dc 100%);
  border-color: transparent;
  color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 14px 24px rgba(35, 64, 128, 0.24);
}

.legal-divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.2) 0%, rgba(122, 146, 210, 0.18) 100%);
}

.legal-section {
  scroll-margin-top: calc(var(--site-header-offset) + 96px);
}

.legal-section-card,
.legal-contact-card {
  padding: clamp(24px, 3vw, 38px);
  border-radius: 28px;
  display: grid;
  gap: 24px;
  background:
    linear-gradient(180deg, rgba(12, 20, 49, 0.88) 0%, rgba(6, 12, 31, 0.96) 100%);
  box-shadow: 0 24px 48px rgba(2, 7, 19, 0.3);
}

.legal-section-heading {
  display: grid;
  gap: 12px;
}

.legal-section-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2rem, 3vw, 3.2rem);
  font-style: normal;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1;
  color: rgba(255, 255, 255, 0.98);
}

.legal-section-intro {
  margin: 0;
  max-width: 64ch;
  font-size: 1rem;
  line-height: 1.72;
  color: rgba(212, 219, 238, 0.78);
}

.legal-prose {
  display: grid;
  gap: 18px;
}

.legal-prose p,
.legal-contact-copy,
.legal-note {
  margin: 0;
  font-size: clamp(1rem, 1.16vw, 1.1rem);
  line-height: 1.82;
  color: rgba(220, 226, 242, 0.8);
}

.legal-note {
  padding: 22px 24px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(34, 52, 109, 0.38) 0%, rgba(13, 21, 52, 0.72) 100%);
  font-family: var(--serif);
  font-size: clamp(1.04rem, 1.34vw, 1.22rem);
  line-height: 1.64;
  color: rgba(250, 252, 255, 0.96);
}

.legal-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 12px;
  color: rgba(220, 226, 242, 0.8);
}

.legal-list li {
  font-size: clamp(0.98rem, 1.1vw, 1.08rem);
  line-height: 1.76;
}

.legal-callout-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.legal-callout {
  padding: 22px 22px 24px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 10px;
}

.legal-callout-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.14rem, 1.4vw, 1.34rem);
  line-height: 1.18;
  color: rgba(255, 255, 255, 0.98);
}

.legal-callout-copy {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.72;
  color: rgba(217, 224, 241, 0.76);
}

.legal-related-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.legal-related-card {
  padding: 22px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 12px;
}

.legal-related-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.12rem, 1.42vw, 1.32rem);
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.98);
}

.legal-related-copy {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.72;
  color: rgba(217, 224, 241, 0.76);
}

.legal-contact-copy {
  max-width: 62ch;
}

.legal-contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.legal-primary-action,
.legal-secondary-action {
  min-height: 52px;
  padding: 0 20px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: var(--serif);
  font-size: 1rem;
  transition:
    transform 180ms ease,
    opacity 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.legal-primary-action {
  background: linear-gradient(180deg, #5b8ef0 0%, #4676da 100%);
  color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 16px 28px rgba(34, 62, 126, 0.28);
}

.legal-secondary-action {
  border: 1px solid rgba(167, 188, 244, 0.18);
  background: rgba(5, 10, 24, 0.56);
  color: rgba(255, 255, 255, 0.92);
}

.legal-primary-action:hover,
.legal-primary-action:focus-visible,
.legal-secondary-action:hover,
.legal-secondary-action:focus-visible {
  transform: translateY(-2px);
}

.site-footer {
  position: relative;
  z-index: 1;
  padding: 0;
}

.site-footer-shell {
  width: 100%;
  margin: 0;
  padding:
    clamp(26px, 3.5vw, 40px)
    clamp(26px, 3.5vw, 40px)
    clamp(26px, 3.5vw, 40px)
    calc(clamp(26px, 3.5vw, 40px) + 50px);
  border-radius: 0;
  background: linear-gradient(180deg, rgba(17, 24, 58, 0.98) 0%, rgba(9, 15, 37, 0.98) 100%);
  box-shadow:
    0 30px 68px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.site-footer-top {
  display: grid;
  gap: clamp(28px, 3vw, 36px);
}

.site-footer-kicker {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  width: fit-content;
  font-family: var(--serif);
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
}

.site-footer-kicker::after {
  content: none;
}

.site-footer-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 44px);
}

.site-footer-column {
  display: grid;
  align-content: start;
  gap: 30px;
}

.site-footer-group {
  display: grid;
  gap: 12px;
}

.site-footer-heading {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1rem, 1.2vw, 1.18rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(160, 191, 255, 0.94);
}

.site-footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.site-footer-links a {
  font-family: var(--serif);
  font-size: clamp(0.98rem, 1.18vw, 1.16rem);
  line-height: 1.25;
  color: rgba(255, 255, 255, 0.9);
  transition: color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.site-footer-links a:hover,
.site-footer-links a:focus-visible {
  color: rgba(255, 255, 255, 0.98);
  opacity: 0.96;
  transform: translateX(4px);
}

.site-footer-bottom {
  margin-top: clamp(28px, 3.4vw, 38px);
  padding-top: 18px;
  border-top: 1px solid rgba(160, 191, 255, 0.22);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px 28px;
  align-items: center;
}

.site-footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}

.site-footer-meta a,
.site-footer-copy {
  font-family: var(--serif);
  font-size: clamp(0.9rem, 1vw, 1rem);
  line-height: 1.35;
  color: rgba(255, 255, 255, 0.74);
}

.site-footer-meta a {
  transition: color 180ms ease, opacity 180ms ease;
}

.site-footer-meta a:hover,
.site-footer-meta a:focus-visible {
  color: rgba(255, 255, 255, 0.92);
  opacity: 0.96;
}

.site-footer-copy {
  margin: 0;
  text-align: right;
}

html[data-theme="light"] body.legal-page {
  background:
    linear-gradient(180deg, #f8fbff 0%, #edf3fb 50%, #e7eef9 100%);
  color: #1b2d4a;
}

html[data-theme="light"] .legal-site-shell::before {
  background:
    radial-gradient(circle at 18% 14%, rgba(87, 129, 214, 0.16) 0%, rgba(87, 129, 214, 0) 28%),
    radial-gradient(circle at 84% 18%, rgba(188, 205, 241, 0.34) 0%, rgba(188, 205, 241, 0) 24%),
    radial-gradient(circle at 50% 82%, rgba(164, 190, 241, 0.18) 0%, rgba(164, 190, 241, 0) 30%);
}

html[data-theme="light"] .bar-badge {
  color: rgba(24, 38, 69, 0.92);
}

html[data-theme="light"] .legal-hero-kicker,
html[data-theme="light"] .legal-section-kicker,
html[data-theme="light"] .legal-related-kicker,
html[data-theme="light"] .legal-meta-label {
  color: rgba(75, 114, 202, 0.88);
}

html[data-theme="light"] .legal-hero-title,
html[data-theme="light"] .legal-section-title,
html[data-theme="light"] .legal-callout-title,
html[data-theme="light"] .legal-related-title {
  color: rgba(26, 43, 78, 0.98);
}

html[data-theme="light"] .legal-hero-lead,
html[data-theme="light"] .legal-section-intro,
html[data-theme="light"] .legal-prose p,
html[data-theme="light"] .legal-note,
html[data-theme="light"] .legal-callout-copy,
html[data-theme="light"] .legal-related-copy,
html[data-theme="light"] .legal-contact-copy,
html[data-theme="light"] .legal-list li,
html[data-theme="light"] .legal-meta-chip {
  color: rgba(40, 59, 96, 0.8);
}

html[data-theme="light"] .legal-pill-nav {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(131, 155, 213, 0.2);
  box-shadow: 0 20px 36px rgba(57, 86, 156, 0.12);
}

html[data-theme="light"] .legal-pill-link {
  border-color: rgba(111, 145, 219, 0.18);
  background: rgba(227, 236, 251, 0.62);
  color: rgba(28, 46, 83, 0.94);
}

html[data-theme="light"] .legal-pill-link:hover,
html[data-theme="light"] .legal-pill-link:focus-visible {
  background: rgba(214, 227, 251, 0.92);
  border-color: rgba(97, 133, 216, 0.3);
}

html[data-theme="light"] .legal-divider {
  background: linear-gradient(90deg, rgba(116, 143, 204, 0.36) 0%, rgba(116, 143, 204, 0.08) 100%);
}

html[data-theme="light"] .legal-section-card,
html[data-theme="light"] .legal-contact-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94) 0%, rgba(241, 246, 255, 0.96) 100%);
  box-shadow: 0 24px 48px rgba(66, 97, 165, 0.12);
}

html[data-theme="light"] .legal-note {
  background:
    linear-gradient(180deg, rgba(225, 235, 253, 0.96) 0%, rgba(209, 223, 250, 0.92) 100%);
  color: rgba(27, 46, 83, 0.92);
}

html[data-theme="light"] .legal-callout,
html[data-theme="light"] .legal-related-card,
html[data-theme="light"] .legal-meta-chip {
  background: rgba(231, 238, 250, 0.72);
  border-color: rgba(109, 143, 219, 0.14);
}

html[data-theme="light"] .legal-secondary-action {
  border-color: rgba(102, 136, 212, 0.18);
  background: rgba(232, 239, 251, 0.86);
  color: rgba(27, 45, 82, 0.9);
}

html[data-theme="light"] .legal-meta-chip a,
html[data-theme="light"] .legal-related-link {
  color: rgba(27, 45, 82, 0.96);
}

@media (max-width: 1180px) {
  .bar-badge {
    top: calc(var(--site-header-offset) + 2px);
    right: 38px;
  }
}

@media (max-width: 960px) {
  .bar-badge {
    display: none;
  }

  .legal-callout-grid,
  .legal-related-grid {
    grid-template-columns: 1fr;
  }

  .site-footer-shell {
    width: 100%;
    padding: 28px 24px;
    border-radius: 0;
  }

  .site-footer-top,
  .site-footer-column,
  .site-footer-group {
    justify-items: center;
    text-align: center;
  }

  .site-footer-kicker {
    margin-inline: auto;
  }

  .site-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
  }

  .site-footer-bottom {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .site-footer-meta {
    justify-content: center;
  }

  .site-footer-copy {
    text-align: center;
  }
}

@media (max-width: 720px) {
  .legal-shell {
    width: min(100%, calc(100% - 24px));
  }

  .legal-main {
    padding-top: 22px;
  }

  .legal-hero-title {
    font-size: clamp(2.18rem, 12vw, 4rem);
  }

  .legal-pill-rail {
    position: static;
  }

  .legal-pill-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 14px;
    gap: 10px;
    scrollbar-width: thin;
  }

  .legal-pill-link {
    min-height: 44px;
    padding: 0 16px;
    font-size: 0.96rem;
    white-space: nowrap;
  }

  .legal-contact-actions {
    flex-direction: column;
  }

  .legal-primary-action,
  .legal-secondary-action {
    width: 100%;
  }

  .site-footer-shell {
    width: 100%;
    padding: 22px 18px;
    border-radius: 0;
  }

  .site-footer-kicker {
    gap: 12px;
    font-size: 0.72rem;
  }

  .site-footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .site-footer-column {
    gap: 24px;
  }

  .site-footer-heading {
    font-size: 0.92rem;
  }

  .site-footer-links a,
  .site-footer-meta a,
  .site-footer-copy {
    font-size: 0.92rem;
  }

  .site-footer-meta {
    gap: 8px 16px;
  }
}
