:root {
  color-scheme: light;
  --ink: #132033;
  --ink-strong: #071226;
  --muted: #66758c;
  --line: #dfe7f2;
  --navy: #081225;
  --blue: #0e8ea8;
  --cyan: #11c5dd;
  --violet: #7668e8;
  --safe-top: 0px;
  --safe-right: 0px;
  --safe-bottom: 0px;
  --safe-left: 0px;
}

@supports (padding: env(safe-area-inset-top)) {
  :root {
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-right: env(safe-area-inset-right, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --safe-left: env(safe-area-inset-left, 0px);
  }
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-width: 320px;
  margin: 0;
  background: linear-gradient(180deg, #f8fbff 0%, #eef3f9 100%);
  color: var(--ink);
  font-family:
    Inter,
    "SF Pro Display",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    "Noto Sans SC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  line-height: 1.7;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.legal-shell {
  width: min(1120px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(22px + var(--safe-top)) 0 calc(56px + var(--safe-bottom));
}

.legal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 0 32px;
}

.brand {
  display: inline-flex;
  min-width: 0;
  gap: 12px;
  align-items: center;
  color: var(--ink-strong);
  text-decoration: none;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 12px 24px rgba(14, 142, 168, 0.16);
}

.brand span {
  display: grid;
  line-height: 1.18;
}

.brand strong {
  font-size: 14px;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.legal-actions a,
.language-toggle,
.contact-row a {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(14, 142, 168, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: #24405a;
  font-size: 12px;
  font-weight: 720;
  text-decoration: none;
  transition:
    border-color 0.18s ease,
    color 0.18s ease,
    background 0.18s ease,
    transform 0.18s ease;
}

.language-toggle {
  cursor: pointer;
  font: inherit;
}

.legal-actions a:hover,
.language-toggle:hover,
.contact-row a:hover {
  border-color: rgba(14, 142, 168, 0.42);
  background: #ffffff;
  color: var(--blue);
  transform: translateY(-1px);
}

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(34px, 6vw, 64px);
  border: 1px solid rgba(14, 142, 168, 0.14);
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(8, 18, 37, 0.96), rgba(12, 34, 58, 0.95)),
    #081225;
  color: #ffffff;
  box-shadow: 0 24px 70px rgba(30, 55, 91, 0.16);
}

.legal-hero > * {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(143, 231, 244, 0.8);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
}

.legal-hero h1 {
  max-width: 780px;
  margin: 0;
  color: #ffffff;
  font-size: 42px;
  line-height: 1.12;
}

.legal-hero p {
  max-width: 720px;
  margin: 18px 0 0;
  color: rgba(235, 246, 251, 0.78);
  font-size: 17px;
}

.updated {
  display: inline-flex;
  margin-top: 24px;
  padding: 7px 11px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 700;
}

.legal-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid rgba(14, 142, 168, 0.14);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 14px 38px rgba(31, 56, 88, 0.06);
}

.legal-index a {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  border: 1px solid #dce8f3;
  border-radius: 999px;
  background: #ffffff;
  color: #344a62;
  font-size: 12px;
  font-weight: 730;
  text-decoration: none;
}

.legal-index a:hover {
  border-color: rgba(14, 142, 168, 0.42);
  color: var(--blue);
}

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

.legal-card {
  padding: clamp(22px, 3vw, 30px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 50px rgba(31, 56, 88, 0.08);
}

.legal-card.wide {
  grid-column: 1 / -1;
}

.legal-card.accent {
  border-color: rgba(14, 142, 168, 0.3);
  background: linear-gradient(180deg, #ffffff, #eef8fb);
}

.legal-card > span {
  display: inline-flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #e8f7fa;
  color: var(--blue);
  font-size: 11px;
  font-weight: 850;
}

.legal-card h2 {
  margin: 18px 0 10px;
  color: var(--ink-strong);
  font-size: 24px;
  line-height: 1.16;
}

.legal-card p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.legal-page-footer {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 18px;
  padding: 18px 2px 0;
  border-top: 1px solid rgba(14, 142, 168, 0.16);
  color: var(--muted);
  font-size: 12px;
}

.legal-page-footer a {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.legal-page-footer a:hover,
.legal-page-footer a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .legal-shell {
    width: min(100% - 28px, 1120px);
    padding-top: calc(12px + var(--safe-top));
  }

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

  .legal-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .legal-index {
    padding: 12px;
  }

  .legal-actions a,
  .language-toggle,
  .legal-index a {
    flex: 1 1 auto;
  }

  .legal-hero {
    border-radius: 18px;
    padding: 28px 22px;
  }

  .legal-hero h1 {
    font-size: 30px;
  }

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

@media (max-width: 430px) {
  .legal-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .language-toggle {
    grid-column: 1 / -1;
  }

  .contact-row a {
    width: 100%;
  }
}

.footer-filings {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 11px;
  line-height: 1.6;
}

.footer-filings a {
  color: inherit;
  font-size: inherit;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
}

.police-filing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.police-filing img {
  flex: 0 0 14px;
  width: 14px;
  height: 16px;
  object-fit: contain;
}
