.legal-root,
body[data-legal-page] {
  color-scheme: dark;
}

body[data-legal-page] {
  position: relative;
}

body[data-legal-page]::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.012;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

body[data-legal-page] .site-footer,
body[data-legal-page] main {
  position: relative;
  z-index: 1;
}

body[data-legal-page] .site-header {
  position: sticky;
  z-index: 140;
}

body[data-legal-page] .header-panel {
  z-index: 141;
}

body[data-legal-page] .bg-orb {
  opacity: 0.12;
  filter: blur(72px);
}

.legal-header-inner {
  min-height: 74px;
  height: auto;
  padding: 18px 0;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
}

.legal-header-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px 18px;
}

.legal-page-nav {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
}

.legal-page-nav a[aria-current="page"] {
  color: var(--text);
}

.legal-page-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.legal-language-group {
  position: relative;
  min-width: min(220px, 100%);
}

.legal-language-group > summary {
  list-style: none;
}

.legal-language-group > summary::-webkit-details-marker {
  display: none;
}

.legal-language-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
  min-width: 220px;
  padding: 9px 14px 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--surface-card-border);
  background: rgba(28, 28, 30, 0.82);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.legal-language-trigger:hover {
  border-color: var(--surface-card-hover-border);
  background: rgba(36, 36, 38, 0.92);
}

.legal-language-trigger:focus-visible {
  outline: 2px solid rgba(0, 113, 227, 0.28);
  outline-offset: 3px;
  border-color: rgba(0, 113, 227, 0.14);
}

.legal-language-trigger-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.legal-language-trigger-eyebrow {
  color: var(--text-soft);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.legal-language-trigger-value {
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.legal-language-trigger-chevron {
  flex: 0 0 auto;
  width: 11px;
  height: 11px;
  margin-right: 2px;
  border-right: 1.6px solid rgba(245, 245, 247, 0.58);
  border-bottom: 1.6px solid rgba(245, 245, 247, 0.58);
  transform: rotate(45deg);
  transition: transform 180ms ease, border-color 180ms ease;
}

.legal-language-group[open] .legal-language-trigger {
  border-color: var(--surface-card-hover-border);
  background: rgba(36, 36, 38, 0.96);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.28);
}

.legal-language-group[open] .legal-language-trigger-chevron {
  transform: rotate(-135deg);
  border-color: var(--accent);
}

.legal-language-panel {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 30;
  width: min(300px, calc(100vw - 32px));
  padding: 10px 0 6px;
  border: 1px solid var(--surface-card-border);
  border-radius: 24px;
  background: rgba(18, 18, 20, 0.96);
  backdrop-filter: blur(20px);
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.34);
  overflow: hidden;
}

.legal-language-panel-eyebrow {
  margin: 0;
  padding: 0 22px;
  color: var(--text-soft);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-language-panel-title {
  margin: 6px 0 14px;
  padding: 0 22px;
  color: var(--text);
  font-size: 0.98rem;
  font-weight: 620;
  letter-spacing: -0.02em;
}

.legal-language-list {
  display: grid;
  gap: 0;
}

.legal-language-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  text-decoration: none;
  transition: background-color 180ms ease;
}

.legal-language-option + .legal-language-option {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.legal-language-option:hover {
  background: rgba(255, 255, 255, 0.04);
}

.legal-language-option:focus-visible {
  outline: 2px solid rgba(0, 113, 227, 0.35);
  outline-offset: 3px;
}

.legal-language-option.is-current {
  background: rgba(41, 151, 255, 0.12);
}

.legal-language-option-copy {
  min-width: 0;
}

.legal-language-option-title {
  display: block;
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.legal-language-option-check {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 180ms ease, transform 180ms ease;
}

.legal-language-option-check::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 10px;
  border-right: 1.8px solid var(--accent);
  border-bottom: 1.8px solid var(--accent);
  transform: rotate(45deg);
}

.legal-language-option.is-current .legal-language-option-check {
  opacity: 1;
  transform: scale(1);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.legal-hero {
  padding-top: 54px;
}

.legal-hero-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--surface-card-border);
  border-radius: 32px;
  padding: clamp(28px, 4vw, 48px);
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(41, 151, 255, 0.1), rgba(41, 151, 255, 0) 52%),
    linear-gradient(180deg, rgba(28, 28, 30, 0.94), rgba(10, 10, 12, 0.92));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.legal-hero-shell::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  top: -72px;
  right: -52px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(41, 151, 255, 0.16), rgba(41, 151, 255, 0));
}

.legal-eyebrow {
  position: relative;
  z-index: 1;
  margin-bottom: 14px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.legal-title {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-bottom: 18px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.legal-lead {
  position: relative;
  z-index: 1;
  max-width: 680px;
  color: var(--text-soft);
  font-size: 1.04rem;
  line-height: 1.78;
}

.legal-meta {
  position: relative;
  z-index: 1;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.legal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--surface-card-border);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(245, 245, 247, 0.78);
  font-size: 0.84rem;
  font-weight: 600;
}

.legal-main {
  padding-top: 14px;
  padding-bottom: 80px;
}

.legal-layout {
  display: grid;
  gap: 14px;
  max-width: 980px;
  margin: 0 auto;
}

.legal-card {
  border: 1px solid var(--surface-card-border);
  border-radius: 28px;
  padding: clamp(22px, 2.8vw, 34px);
  background: linear-gradient(180deg, rgba(32, 32, 34, 0.84), rgba(14, 14, 16, 0.82));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.legal-card h2,
.legal-card h3 {
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-size: clamp(1.28rem, 2vw, 1.58rem);
  letter-spacing: -0.02em;
  color: var(--text);
}

.legal-card p,
.legal-card li {
  color: var(--text-soft);
  line-height: 1.78;
}

.legal-rich > * + * {
  margin-top: 14px;
}

.legal-rich {
  max-width: 72ch;
}

.legal-rich strong {
  color: var(--text);
}

.legal-rich .legal-list {
  margin-top: 14px;
}

.legal-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.legal-list li {
  position: relative;
  padding-left: 18px;
}

.legal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.84em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--accent);
  transform: translateY(-50%);
}

.legal-note {
  border-radius: 20px;
  padding: 16px 18px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(41, 151, 255, 0.12), rgba(41, 151, 255, 0) 52%),
    rgba(18, 30, 44, 0.62);
  border: 1px solid rgba(41, 151, 255, 0.18);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.legal-note p,
.legal-note li,
.legal-note strong {
  color: var(--text);
}

.legal-inline-link {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 0.18em;
}

.legal-inline-link:hover {
  text-decoration: underline;
}

.legal-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.site-footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 20px;
}

.site-footer-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

.site-footer-links a:hover {
  color: var(--text);
}

@media (max-width: 960px) {
  .legal-header-inner {
    justify-content: center;
  }

  .legal-header-actions {
    margin-left: 0;
    width: 100%;
    justify-content: center;
  }

  .legal-page-nav {
    justify-content: center;
  }
}

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

@media (max-width: 720px) {
  .legal-hero {
    padding-top: 30px;
  }

  .legal-title {
    letter-spacing: -0.03em;
  }

  .legal-meta {
    width: 100%;
  }

  .legal-chip {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .legal-header-actions {
    gap: 10px 14px;
  }

  .legal-page-nav {
    gap: 12px;
  }

  .legal-page-nav a {
    font-size: 0.86rem;
  }

  .legal-language-group {
    width: 100%;
    max-width: 100%;
  }

  .legal-language-trigger {
    width: 100%;
    min-width: 0;
  }

  .legal-language-panel {
    left: 0;
    right: 0;
    width: auto;
  }

  .legal-language-panel-title {
    font-size: 1rem;
  }
}

/* Apple-grade legal readability system */

body[data-legal-page] {
  background-image:
    radial-gradient(720px 420px at 100% 0%, rgba(41, 151, 255, 0.08), rgba(41, 151, 255, 0) 58%),
    linear-gradient(180deg, #050608 0%, #091019 42%, #050608 100%);
}

body[data-legal-page]::before,
body[data-legal-page] .bg-orb {
  display: none;
}

body[data-legal-page] .site-header {
  background: rgba(7, 10, 14, 0.88);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

body[data-legal-page] .legal-hero .container,
body[data-legal-page] .legal-main .container,
body[data-legal-page] .site-footer .container {
  width: min(920px, calc(100vw - 48px));
}

.legal-hero {
  padding-top: 36px;
}

.legal-hero-shell {
  border-radius: 32px;
  background:
    radial-gradient(120% 120% at 100% 0%, rgba(41, 151, 255, 0.1), rgba(41, 151, 255, 0) 52%),
    linear-gradient(180deg, rgba(13, 18, 26, 0.98), rgba(8, 11, 16, 0.98));
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.legal-hero-shell::after {
  opacity: 0.65;
}

.legal-title {
  max-width: 11ch;
  letter-spacing: -0.05em;
}

.legal-lead {
  max-width: 58ch;
  color: rgba(245, 245, 247, 0.8);
  font-size: 1.02rem;
  line-height: 1.72;
}

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

.legal-chip {
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(245, 245, 247, 0.76);
}

.legal-layout {
  gap: 18px;
}

.legal-card {
  border-radius: 28px;
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(10, 14, 20, 0.98), rgba(7, 10, 15, 0.98));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.legal-card h2 {
  color: var(--text);
  font-size: clamp(1.18rem, 1.5vw, 1.38rem);
  line-height: 1.24;
  letter-spacing: -0.025em;
}

.legal-rich,
.legal-rich p,
.legal-rich li {
  color: rgba(245, 245, 247, 0.84);
  font-size: 1rem;
  line-height: 1.78;
}

.legal-rich p + p,
.legal-rich ul,
.legal-rich ol {
  margin-top: 14px;
}

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

.legal-inline-link {
  color: #5ab0ff;
}

.legal-note {
  background: linear-gradient(180deg, rgba(10, 33, 55, 0.96), rgba(7, 18, 31, 0.96));
}

@media (min-width: 768px) and (max-width: 1199px) {
  body[data-legal-page] .legal-hero .container,
  body[data-legal-page] .legal-main .container,
  body[data-legal-page] .site-footer .container {
    width: min(820px, calc(100vw - 40px));
  }

  .legal-hero-shell,
  .legal-card {
    border-radius: 28px;
  }

  .legal-title,
  .legal-lead {
    max-width: none;
  }
}

@media (max-width: 767px) {
  body[data-legal-page] .legal-hero .container,
  body[data-legal-page] .legal-main .container,
  body[data-legal-page] .site-footer .container {
    width: min(560px, calc(100vw - 24px));
  }

  .legal-hero {
    padding-top: 24px;
  }

  .legal-hero-shell,
  .legal-card {
    border-radius: 24px;
  }

  .legal-hero-shell {
    padding: 24px 20px;
  }

  .legal-title {
    max-width: none;
    font-size: clamp(2.2rem, 10vw, 3rem);
  }

  .legal-lead,
  .legal-rich,
  .legal-rich p,
  .legal-rich li {
    font-size: 0.96rem;
    line-height: 1.74;
  }

  .legal-chip {
    width: 100%;
    justify-content: center;
  }
}
