/*
  AV LÜ™ legal routes treatment v1.0.0
  Route-only visual layer. Legal copy and behavior remain untouched.
*/

html[data-theme="dark"] body.route-privacy,
html[data-theme="dark"] body.route-terms {
  --legal-bg: #050b16;
  --legal-bg-deep: #020711;
  --legal-surface: rgba(10, 23, 41, .9);
  --legal-surface-soft: rgba(15, 31, 54, .78);
  --legal-line: rgba(116, 160, 224, .26);
  --legal-line-strong: rgba(116, 166, 255, .52);
  --legal-ink: #f3f7ff;
  --legal-copy: #b9c9df;
  --legal-muted: #8193af;
  --legal-blue: #4d8fff;
  --legal-blue-bright: #84b6ff;
  position: relative;
  isolation: isolate;
  color: var(--legal-ink);
  background:
    radial-gradient(circle at 12% 2%, rgba(38, 93, 181, .18), transparent 28rem),
    radial-gradient(circle at 92% 22%, rgba(26, 69, 142, .14), transparent 30rem),
    linear-gradient(180deg, #071223 0%, var(--legal-bg) 46%, var(--legal-bg-deep) 100%) !important;
  color-scheme: dark;
}

html[data-theme="dark"] body.route-privacy::before,
html[data-theme="dark"] body.route-terms::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .27;
  background-image:
    radial-gradient(circle at 13% 19%, rgba(163, 204, 255, .72) 0 1px, transparent 1.5px),
    radial-gradient(circle at 77% 12%, rgba(95, 156, 255, .52) 0 1px, transparent 1.5px),
    radial-gradient(circle at 88% 67%, rgba(156, 198, 255, .4) 0 1px, transparent 1.5px),
    radial-gradient(circle at 36% 82%, rgba(95, 156, 255, .38) 0 1px, transparent 1.5px);
  background-size: 240px 220px, 310px 280px, 190px 240px, 270px 260px;
  mix-blend-mode: screen;
}

html[data-theme="dark"] body.route-privacy .v13-header,
html[data-theme="dark"] body.route-terms .v13-header {
  position: sticky;
  top: 0;
  z-index: 10;
  overflow: hidden;
  border-bottom: 1px solid rgba(121, 164, 228, .24) !important;
  background:
    linear-gradient(90deg, rgba(3, 9, 19, .98), rgba(6, 18, 36, .94) 62%, rgba(3, 9, 19, .98)) !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, .3);
  backdrop-filter: blur(18px);
}

html[data-theme="dark"] body.route-privacy .v13-header::after,
html[data-theme="dark"] body.route-terms .v13-header::after {
  position: absolute;
  right: 5%;
  bottom: 0;
  left: 5%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(89, 153, 255, .5), transparent);
  box-shadow: 0 0 18px rgba(53, 126, 255, .28);
  pointer-events: none;
}

html[data-theme="dark"] body.route-privacy .v13-header__inner,
html[data-theme="dark"] body.route-terms .v13-header__inner {
  position: relative;
  z-index: 1;
}

html[data-theme="dark"] body.route-privacy .v13-brand,
html[data-theme="dark"] body.route-privacy .v13-nav a,
html[data-theme="dark"] body.route-privacy .v13-login,
html[data-theme="dark"] body.route-terms .v13-brand,
html[data-theme="dark"] body.route-terms .v13-nav a,
html[data-theme="dark"] body.route-terms .v13-login {
  color: var(--legal-ink) !important;
}

html[data-theme="dark"] body.route-privacy .v13-brand,
html[data-theme="dark"] body.route-terms .v13-brand {
  letter-spacing: .18em;
  text-shadow: 0 0 18px rgba(114, 169, 255, .22);
}

html[data-theme="dark"] body.route-privacy .v13-nav a,
html[data-theme="dark"] body.route-terms .v13-nav a {
  opacity: .78;
}

html[data-theme="dark"] body.route-privacy .v13-nav a[aria-current="page"],
html[data-theme="dark"] body.route-terms .v13-nav a[aria-current="page"] {
  color: #fff !important;
  background: rgba(54, 112, 207, .2) !important;
  box-shadow: inset 0 -2px 0 var(--legal-blue-bright);
  opacity: 1;
}

html[data-theme="dark"] body.route-privacy .v13-nav a:hover,
html[data-theme="dark"] body.route-privacy .v13-nav a:focus-visible,
html[data-theme="dark"] body.route-terms .v13-nav a:hover,
html[data-theme="dark"] body.route-terms .v13-nav a:focus-visible {
  color: #fff !important;
  background: rgba(65, 127, 226, .18) !important;
  opacity: 1;
}

html[data-theme="dark"] body.route-privacy .v13-login:hover,
html[data-theme="dark"] body.route-privacy .v13-login:focus-visible,
html[data-theme="dark"] body.route-terms .v13-login:hover,
html[data-theme="dark"] body.route-terms .v13-login:focus-visible {
  color: var(--legal-blue-bright) !important;
}

html[data-theme="dark"] body.route-privacy .v13-header .v13-btn--primary,
html[data-theme="dark"] body.route-terms .v13-header .v13-btn--primary {
  color: #f8fbff !important;
  border-color: #5f9dff !important;
  background: linear-gradient(135deg, #2669da, #3d8bff) !important;
  box-shadow: 0 9px 25px rgba(29, 102, 224, .28);
}

html[data-theme="dark"] body.route-privacy .v13-header .v13-btn--primary:hover,
html[data-theme="dark"] body.route-privacy .v13-header .v13-btn--primary:focus-visible,
html[data-theme="dark"] body.route-terms .v13-header .v13-btn--primary:hover,
html[data-theme="dark"] body.route-terms .v13-header .v13-btn--primary:focus-visible {
  border-color: #a1c9ff !important;
  background: linear-gradient(135deg, #367bee, #65a7ff) !important;
  box-shadow: 0 12px 29px rgba(46, 128, 255, .38);
}

html[data-theme="dark"] body.route-privacy .v13-menu,
html[data-theme="dark"] body.route-terms .v13-menu {
  color: var(--legal-ink) !important;
  border-color: var(--legal-line-strong) !important;
  background: rgba(12, 29, 52, .92) !important;
}

html[data-theme="dark"] body.route-privacy .v13-menu:hover,
html[data-theme="dark"] body.route-privacy .v13-menu:focus-visible,
html[data-theme="dark"] body.route-terms .v13-menu:hover,
html[data-theme="dark"] body.route-terms .v13-menu:focus-visible {
  color: #fff !important;
  border-color: var(--legal-blue-bright) !important;
  background: rgba(38, 80, 143, .72) !important;
}

html[data-theme="dark"] body.route-privacy .v13-legal-shell,
html[data-theme="dark"] body.route-terms .v13-legal-shell {
  position: relative;
  background:
    linear-gradient(180deg, rgba(5, 13, 26, .52), rgba(2, 7, 17, .86)) !important;
}

html[data-theme="dark"] body.route-privacy .v13-legal-shell::after,
html[data-theme="dark"] body.route-terms .v13-legal-shell::after {
  position: absolute;
  top: 5rem;
  right: 6vw;
  width: min(32vw, 420px);
  height: min(32vw, 420px);
  border: 1px solid rgba(77, 140, 255, .1);
  border-radius: 50%;
  content: "";
  pointer-events: none;
  box-shadow: 0 0 0 32px rgba(77, 140, 255, .025), 0 0 0 64px rgba(77, 140, 255, .018);
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel,
html[data-theme="dark"] body.route-terms .v13-legal-panel {
  position: relative;
  z-index: 1;
  max-width: 900px;
  border: 1px solid var(--legal-line) !important;
  border-radius: 22px;
  color: var(--legal-copy) !important;
  background:
    linear-gradient(145deg, rgba(14, 31, 55, .94), rgba(6, 16, 31, .94)) !important;
  box-shadow: 0 24px 68px rgba(0, 0, 0, .32);
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel .v13-eyebrow,
html[data-theme="dark"] body.route-terms .v13-legal-panel .v13-eyebrow {
  color: var(--legal-blue-bright) !important;
  letter-spacing: .2em;
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel .v13-eyebrow::before,
html[data-theme="dark"] body.route-terms .v13-legal-panel .v13-eyebrow::before {
  background: var(--legal-blue) !important;
  box-shadow: 0 0 12px rgba(76, 141, 255, .6);
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel h1,
html[data-theme="dark"] body.route-privacy .v13-legal-panel h2,
html[data-theme="dark"] body.route-terms .v13-legal-panel h1,
html[data-theme="dark"] body.route-terms .v13-legal-panel h2 {
  color: var(--legal-ink) !important;
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel h1,
html[data-theme="dark"] body.route-terms .v13-legal-panel h1 {
  max-width: 14ch;
  text-shadow: 0 8px 28px rgba(0, 0, 0, .34);
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel h2,
html[data-theme="dark"] body.route-terms .v13-legal-panel h2 {
  margin-top: 38px;
  padding-top: 5px;
  border-top: 1px solid rgba(116, 160, 224, .18);
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel p,
html[data-theme="dark"] body.route-privacy .v13-legal-panel li,
html[data-theme="dark"] body.route-terms .v13-legal-panel p,
html[data-theme="dark"] body.route-terms .v13-legal-panel li {
  max-width: 70ch;
  color: var(--legal-copy) !important;
  line-height: 1.8;
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel .v13-legal-updated,
html[data-theme="dark"] body.route-terms .v13-legal-panel .v13-legal-updated {
  color: var(--legal-muted) !important;
  letter-spacing: .04em;
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel a,
html[data-theme="dark"] body.route-terms .v13-legal-panel a {
  color: var(--legal-blue-bright) !important;
  text-underline-offset: 3px;
}

html[data-theme="dark"] body.route-privacy .v13-legal-panel a:hover,
html[data-theme="dark"] body.route-privacy .v13-legal-panel a:focus-visible,
html[data-theme="dark"] body.route-terms .v13-legal-panel a:hover,
html[data-theme="dark"] body.route-terms .v13-legal-panel a:focus-visible {
  color: #fff !important;
}

html[data-theme="dark"] body.route-privacy .v13-legal-note,
html[data-theme="dark"] body.route-terms .v13-legal-note {
  border-color: rgba(89, 153, 255, .38) !important;
  background:
    linear-gradient(135deg, rgba(22, 61, 117, .66), rgba(8, 26, 54, .78)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

html[data-theme="dark"] body.route-privacy .v13-legal-note strong,
html[data-theme="dark"] body.route-terms .v13-legal-note strong {
  color: #dceaff !important;
}

html[data-theme="dark"] body.route-privacy .v13-legal-note span,
html[data-theme="dark"] body.route-terms .v13-legal-note span {
  color: var(--legal-copy) !important;
  line-height: 1.65;
}

html[data-theme="dark"] body.route-privacy .v13-footer,
html[data-theme="dark"] body.route-terms .v13-footer {
  border-top: 1px solid rgba(104, 159, 237, .24) !important;
  color: var(--legal-copy) !important;
  background:
    linear-gradient(155deg, #020711 0%, #06162b 62%, #0a2850 100%) !important;
  box-shadow: 0 -24px 60px rgba(0, 0, 0, .28);
}

html[data-theme="dark"] body.route-privacy .v13-footer :is(.v13-brand, h3, p, a, span),
html[data-theme="dark"] body.route-terms .v13-footer :is(.v13-brand, h3, p, a, span) {
  color: #dbe8fb !important;
}

html[data-theme="dark"] body.route-privacy .v13-footer a:hover,
html[data-theme="dark"] body.route-privacy .v13-footer a:focus-visible,
html[data-theme="dark"] body.route-terms .v13-footer a:hover,
html[data-theme="dark"] body.route-terms .v13-footer a:focus-visible {
  color: var(--legal-blue-bright) !important;
}

html[data-theme="dark"] body.route-privacy :is(a, button):focus-visible,
html[data-theme="dark"] body.route-terms :is(a, button):focus-visible {
  outline: 2px solid var(--legal-blue-bright);
  outline-offset: 3px;
}

@media (max-width: 980px) {
  html[data-theme="dark"] body.route-privacy .v13-nav,
  html[data-theme="dark"] body.route-terms .v13-nav {
    border-color: var(--legal-line) !important;
    background: #071426 !important;
    box-shadow: 0 18px 34px rgba(0, 0, 0, .32);
  }

  html[data-theme="dark"] body.route-privacy .v13-nav a[aria-current="page"],
  html[data-theme="dark"] body.route-terms .v13-nav a[aria-current="page"] {
    box-shadow: inset 3px 0 0 var(--legal-blue-bright);
  }
}

@media (max-width: 720px) {
  html[data-theme="dark"] body.route-privacy .v13-legal-panel,
  html[data-theme="dark"] body.route-terms .v13-legal-panel {
    border-radius: 16px;
  }

  html[data-theme="dark"] body.route-privacy .v13-legal-panel h2,
  html[data-theme="dark"] body.route-terms .v13-legal-panel h2 {
    margin-top: 30px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-theme="dark"] body.route-privacy::before,
  html[data-theme="dark"] body.route-terms::before {
    display: none;
  }
}