:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--wd-text-primary);
  background: var(--wd-bg-base);
  font-family: var(--wd-font-sans);
  font-size: 15px;
  line-height: 1.72;
  letter-spacing: 0;
}

a {
  color: var(--wd-accent-dark);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--wd-accent);
}

.legal-skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 20;
  padding: 9px 12px;
  color: #fff;
  background: var(--wd-accent);
  border-radius: 6px;
  transform: translateY(-160%);
}

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

.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--wd-border-soft);
  background: color-mix(in srgb, var(--wd-bg-surface) 94%, transparent);
  backdrop-filter: blur(12px);
}

.legal-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), 1120px);
  min-height: 64px;
  margin: 0 auto;
  gap: 24px;
}

.legal-primary-nav {
  margin-left: auto;
}

.legal-header__actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
}

.legal-language {
  position: relative;
}

.legal-icon-button {
  display: inline-grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--wd-border-strong);
  border-radius: 8px;
  color: var(--wd-text-secondary);
  background: var(--wd-bg-surface);
  cursor: pointer;
}

.legal-icon-button:hover,
.legal-icon-button[aria-expanded="true"] {
  border-color: var(--wd-accent);
  color: var(--wd-accent-dark);
  background: var(--wd-accent-soft);
}

.legal-icon-button:focus-visible,
.legal-language-menu button:focus-visible {
  outline: 0;
  box-shadow: var(--wd-shadow-focus);
}

.legal-icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.legal-language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  display: grid;
  min-width: 196px;
  padding: 6px;
  border: 1px solid var(--wd-border-strong);
  border-radius: 8px;
  background: var(--wd-bg-surface);
  box-shadow: 0 14px 36px color-mix(in srgb, var(--wd-text-primary) 14%, transparent);
}

.legal-language-menu[hidden] {
  display: none;
}

.legal-language-menu button {
  display: flex;
  min-height: 36px;
  padding: 8px 10px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  border-radius: 6px;
  color: var(--wd-text-secondary);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  text-align: left;
}

.legal-language-menu button:hover,
.legal-language-menu button[aria-checked="true"] {
  color: var(--wd-text-primary);
  background: var(--wd-accent-soft);
}

.legal-language-check {
  width: 16px;
  color: var(--wd-accent-dark);
  font-weight: 800;
  text-align: center;
}

.legal-theme-toggle {
  font-size: 18px;
  line-height: 1;
}

.legal-theme-icon--sun,
:root[data-theme="dark"] .legal-theme-icon--moon {
  display: none;
}

:root[data-theme="dark"] .legal-theme-icon--sun {
  display: inline;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--wd-text-primary);
  font-size: 18px;
  font-weight: 800;
  text-decoration: none;
}

.legal-brand img {
  width: 30px;
  height: 30px;
}

.legal-header nav,
.legal-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 20px;
}

.legal-header nav a,
.legal-footer nav a {
  color: var(--wd-text-secondary);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.legal-shell {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  width: min(calc(100% - 40px), 1120px);
  margin: 0 auto;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 96px;
  padding: 52px 28px 52px 0;
}

.legal-sidebar__label,
.legal-eyebrow {
  margin: 0 0 12px;
  color: var(--wd-text-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0;
}

.legal-sidebar nav {
  display: grid;
  gap: 3px;
}

.legal-sidebar nav a {
  display: block;
  padding: 8px 10px;
  border-left: 2px solid transparent;
  color: var(--wd-text-secondary);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  text-decoration: none;
}

.legal-sidebar nav a:hover,
.legal-sidebar nav a[aria-current="page"] {
  border-left-color: var(--wd-accent);
  color: var(--wd-text-primary);
  background: var(--wd-accent-soft);
}

.legal-sidebar__help {
  margin: 28px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--wd-border-soft);
  color: var(--wd-text-muted);
  font-size: 12px;
}

.legal-sidebar__help a {
  display: inline-block;
  margin-top: 4px;
  overflow-wrap: anywhere;
}

.legal-document {
  min-width: 0;
  padding: 52px 0 80px 54px;
  border-left: 1px solid var(--wd-border-soft);
}

.legal-title {
  padding-bottom: 34px;
  border-bottom: 1px solid var(--wd-border-strong);
}

.legal-title h1 {
  max-width: 780px;
  margin: 0;
  color: var(--wd-text-primary);
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: 0;
}

.legal-lede {
  max-width: 760px;
  margin: 18px 0 0;
  color: var(--wd-text-secondary);
  font-size: 17px;
  line-height: 1.7;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 24px 0 0;
}

.legal-meta div {
  display: grid;
  gap: 1px;
}

.legal-meta dt {
  color: var(--wd-text-muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

.legal-meta dd {
  margin: 0;
  color: var(--wd-text-primary);
  font-size: 13px;
  font-weight: 650;
}

.legal-document section {
  max-width: 800px;
  padding: 32px 0;
  border-bottom: 1px solid var(--wd-border-soft);
  scroll-margin-top: 92px;
}

.legal-document section:last-of-type {
  border-bottom: 0;
}

.legal-document h2 {
  margin: 0 0 12px;
  color: var(--wd-text-primary);
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: 0;
}

.legal-document h3 {
  margin: 24px 0 8px;
  color: var(--wd-text-primary);
  font-size: 16px;
  line-height: 1.4;
  letter-spacing: 0;
}

.legal-document p,
.legal-document ul,
.legal-document ol,
.legal-document dl {
  margin-top: 0;
  margin-bottom: 14px;
}

.legal-document ul,
.legal-document ol {
  padding-left: 22px;
}

.legal-document li + li {
  margin-top: 8px;
}

.legal-callout {
  margin: 22px 0;
  padding: 16px 18px;
  border-left: 3px solid var(--wd-accent);
  color: var(--wd-text-secondary);
  background: var(--wd-accent-soft);
}

.legal-callout strong {
  color: var(--wd-text-primary);
}

.legal-details {
  display: grid;
  grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
  margin: 20px 0;
  border-top: 1px solid var(--wd-border-strong);
}

.legal-details div {
  display: contents;
}

.legal-details dt,
.legal-details dd {
  margin: 0;
  padding: 13px 0;
  border-bottom: 1px solid var(--wd-border-soft);
}

.legal-details dt {
  padding-right: 18px;
  color: var(--wd-text-muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0;
}

.legal-details dd {
  color: var(--wd-text-primary);
  overflow-wrap: anywhere;
}

.legal-details address {
  font-style: normal;
}

.legal-footer {
  border-top: 1px solid var(--wd-border-soft);
  background: var(--wd-bg-surface);
}

.legal-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(calc(100% - 40px), 1120px);
  min-height: 82px;
  margin: 0 auto;
  gap: 18px 30px;
}

.legal-footer p {
  margin: 0;
  color: var(--wd-text-muted);
  font-size: 12px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --wd-bg-base: #09090b;
    --wd-bg-surface: #0f0f12;
    --wd-bg-elevated: #161619;
    --wd-border-soft: #1f1f23;
    --wd-border-strong: #2a2a30;
    --wd-text-primary: #fafafa;
    --wd-text-secondary: #a1a1aa;
    --wd-text-muted: #71717a;
    --wd-accent: #3b82f6;
    --wd-accent-dark: #93c5fd;
    --wd-accent-soft: #18233f;
  }
}

@media (max-width: 760px) {
  .legal-header__inner,
  .legal-shell,
  .legal-footer__inner {
    width: min(calc(100% - 28px), 1120px);
  }

  .legal-header__inner {
    min-height: 58px;
  }

  .legal-primary-nav a:not(:last-child) {
    display: none;
  }

  .legal-header__inner {
    gap: 12px;
  }

  .legal-primary-nav {
    margin-left: auto;
  }

  .legal-shell {
    display: block;
  }

  .legal-sidebar {
    position: static;
    padding: 24px 0 8px;
  }

  .legal-sidebar nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .legal-sidebar nav a {
    border: 1px solid var(--wd-border-soft);
    border-left-width: 1px;
    border-radius: 6px;
  }

  .legal-sidebar nav a:hover,
  .legal-sidebar nav a[aria-current="page"] {
    border-color: var(--wd-accent);
  }

  .legal-sidebar__help {
    display: none;
  }

  .legal-document {
    padding: 28px 0 58px;
    border-left: 0;
  }

  .legal-title h1 {
    font-size: 32px;
  }

  .legal-lede {
    font-size: 15px;
  }

  .legal-details {
    grid-template-columns: 1fr;
  }

  .legal-details div {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid var(--wd-border-soft);
  }

  .legal-details dt,
  .legal-details dd {
    padding: 0;
    border: 0;
  }

  .legal-details dd {
    margin-top: 3px;
  }

  .legal-footer__inner {
    align-items: flex-start;
    flex-direction: column;
    padding: 22px 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

:root:has(body.legal-policy) { color-scheme: dark; }

.legal-policy {
  --wd-bg-base: #06172e;
  --wd-bg-surface: #0c2342;
  --wd-bg-elevated: #103252;
  --wd-border-soft: #244568;
  --wd-border-strong: #315a82;
  --wd-text-primary: #fff;
  --wd-text-secondary: #c4d7e8;
  --wd-text-muted: #98b4cf;
  --wd-accent: #39aaff;
  --wd-accent-dark: #62c8ff;
  --wd-accent-soft: #103b6d;
  --wd-shadow-focus: 0 0 0 3px rgba(57, 170, 255, .4);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
}

.legal-policy .legal-header {
  position: relative;
  height: 102px;
  border-color: #18304c;
  background: #071a33;
  backdrop-filter: none;
}

.legal-policy .legal-header__inner {
  width: min(calc(100% - 64px), 1312px);
  height: 100%;
  min-height: 0;
}

.legal-policy .legal-brand { gap: 13px; color: #fff; font-size: 29px; font-weight: 850; }
.legal-policy .legal-brand img { width: 52px; height: 52px; object-fit: contain; }
.legal-policy .legal-primary-nav { gap: 8px; }
.legal-policy .legal-header nav a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  padding: 0 17px;
  border-radius: 8px;
  color: #fff;
  font-size: 16px;
  white-space: nowrap;
}
.legal-policy .legal-header nav a:hover,
.legal-policy .legal-header nav a:focus-visible,
.legal-policy .legal-header nav a[aria-current="page"] { background: #103b6d; color: #62c8ff; outline: none; }
.legal-policy .legal-header nav a.legal-nav-download { margin-left: 12px; padding: 0 25px; background: #1688ff; color: #fff; font-weight: 800; }
.legal-policy .legal-header nav a.legal-nav-download:hover,
.legal-policy .legal-header nav a.legal-nav-download:focus-visible { background: #20aaf2; }
.legal-policy .legal-icon-button { width: 74px; height: 44px; border-color: #285077; border-radius: 7px; background: #0b294e; color: #eaf6ff; }
.legal-policy .legal-icon-button:hover,
.legal-policy .legal-icon-button[aria-expanded="true"] { border-color: #45bfff; background: #103b6d; color: #62c8ff; }
.legal-policy .legal-icon-button svg { width: 19px; height: 19px; }
.legal-policy .legal-nav-toggle { display: none; width: 44px; }
.legal-policy .legal-language-menu { border-color: #285077; background: #071d39; }
.legal-policy .legal-shell { width: min(calc(100% - 64px), 1320px); grid-template-columns: 240px minmax(0, 1fr); }
.legal-policy .legal-sidebar { top: 24px; }
.legal-policy .legal-eyebrow { color: #62c8ff; }
.legal-policy .legal-document { overflow-wrap: anywhere; }
.legal-policy .legal-title h1 { text-wrap: balance; }
.legal-policy .legal-footer { border-color: #244568; background: #151a20; }
.legal-policy .legal-footer__inner { width: min(calc(100% - 64px), 1360px); min-height: 88px; }
.legal-policy .legal-footer nav a { color: #b5c3d2; font-size: 12px; font-weight: 400; }
.legal-policy .legal-footer nav a:hover,
.legal-policy .legal-footer nav a:focus-visible { color: #35b7ff; }

@media (max-width: 1360px) {
  .legal-policy .legal-header { height: 88px; }
  .legal-policy .legal-header__inner { width: calc(100% - 32px); }
  .legal-policy .legal-brand { font-size: 24px; }
  .legal-policy .legal-brand img { width: 44px; height: 44px; }
  .legal-policy .legal-header__actions { margin-left: auto; }
  .legal-policy .legal-nav-toggle { display: inline-grid; }
  .legal-policy .legal-primary-nav {
    position: absolute;
    top: 88px;
    left: 0;
    display: none;
    width: 100%;
    max-height: calc(100dvh - 88px);
    padding: 16px;
    overflow-y: auto;
    border-top: 1px solid #183958;
    background: #071a33;
  }
  .legal-policy .legal-primary-nav.is-open { display: grid; }
  .legal-policy .legal-primary-nav a:not(:last-child) { display: flex; }
  .legal-policy .legal-header nav a { justify-content: flex-start; }
  .legal-policy .legal-header nav a.legal-nav-download { margin-left: 0; }
}

@media (max-width: 760px) {
  .legal-policy .legal-shell,
  .legal-policy .legal-footer__inner { width: calc(100% - 28px); }
  .legal-policy .legal-footer__inner { flex-direction: column; padding: 25px 0; }
}

@media (max-width: 560px) {
  .legal-policy .legal-header { height: 82px; }
  .legal-policy .legal-header__inner { gap: 10px; }
  .legal-policy .legal-brand { gap: 9px; font-size: 22px; }
  .legal-policy .legal-brand img { width: 40px; height: 40px; }
  .legal-policy .legal-primary-nav { top: 82px; max-height: calc(100dvh - 82px); }
  .legal-policy .legal-header__actions { gap: 7px; }
  .legal-policy .legal-nav-toggle { width: 42px; height: 42px; }
  .legal-policy .legal-language > .legal-icon-button { width: 48px; }
}
