:root {
  --legal-bg: #07171e;
  --legal-bg-deep: #07171e;
  --legal-panel: #e4e7eb;
  --legal-paper: #fbfbfc;
  --legal-ink: #17212d;
  --legal-muted: #536173;
  --legal-line: #247cfd;
  --legal-soft-line: #c8d3df;
  --legal-cyan: #08a9b8;
  --legal-width: 1040px;
}

* { box-sizing: border-box; }

html { background: var(--legal-bg-deep); color-scheme: light; }

html:not([data-theme="light"]) body.legal-body {
  margin: 0;
  background-color: var(--legal-bg) !important;
  background-image:
    linear-gradient(rgba(34, 211, 238, 0.043) 1px, transparent 1px),
    linear-gradient(90deg, rgba(34, 211, 238, 0.043) 1px, transparent 1px) !important;
  background-position: top center !important;
  background-size: 64px 64px !important;
  color: var(--legal-ink);
  font-family: var(--font-sans, "Trebuchet MS", "Segoe UI", Arial, sans-serif);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: #075fcc; }
a:hover { color: #003e91; }

.legal-site-header {
  background: #fff;
  border-bottom: 1px solid #d5dae0;
  min-height: 62px;
}

.legal-site-header-inner {
  align-items: center;
  display: grid;
  gap: 26px;
  grid-template-columns: 1fr auto 1fr;
  margin: 0 auto;
  max-width: 1500px;
  min-height: 62px;
  padding: 8px 24px;
}

.legal-logo img { display: block; height: 46px; width: auto; }

.legal-nav {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  grid-column: 2;
  justify-content: center;
}

.legal-nav a {
  color: #1c2430;
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.legal-nav a[aria-current="page"] { color: #007985; text-decoration: underline; text-underline-offset: 5px; }

.legal-page {
  align-items: start;
  display: grid;
  gap: 24px;
  grid-template-columns: minmax(210px, 260px) minmax(0, var(--legal-width)) minmax(210px, 260px);
  justify-content: center;
  margin: 0 auto;
  max-width: 1640px;
  padding: 58px 24px 72px;
}

.legal-development-notice {
  background: #102225;
  border: 1px solid rgba(8, 169, 184, 0.65);
  border-radius: 8px;
  color: #d6e2e4;
  padding: 18px;
  position: sticky;
  top: 24px;
}

.legal-development-notice h2 {
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.25;
  margin: 0 0 8px;
}

.legal-development-notice p {
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
}

.legal-page-balance { min-height: 1px; }

.legal-document {
  background: var(--legal-panel);
  border: 1px solid var(--legal-line);
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.legal-document-head {
  background: var(--legal-paper);
  border-bottom: 1px solid var(--legal-line);
  padding: 28px 34px 24px;
}

.legal-kicker {
  color: #0867e8;
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 3px;
  text-transform: uppercase;
}

.legal-document h1,
.legal-document h2,
.legal-document h3 { line-height: 1.2; margin-top: 0; }

.legal-document h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 8px; }
.legal-document h2 { font-size: 1.3rem; margin-bottom: 8px; }
.legal-document h3 { font-size: 1rem; margin-bottom: 5px; }

.legal-meta {
  color: var(--legal-muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.86rem;
  gap: 4px 18px;
}

.legal-intro { color: #354357; margin: 14px 0 0; max-width: 820px; }

.legal-document-body { padding: 8px 34px 34px; }

.legal-notice {
  background: #f7fbff;
  border: 1px solid var(--legal-line);
  border-radius: 6px;
  margin: 24px 0 8px;
  padding: 16px 18px;
}

.legal-notice strong { display: block; margin-bottom: 3px; }
.legal-notice p { margin: 0; }
.legal-notice.warning { background: #fff8e8; border-color: #b87700; }

.legal-section {
  border-top: 1px solid var(--legal-soft-line);
  padding: 24px 0 4px;
}

.legal-section:first-of-type { border-top: 0; }
.legal-section p { margin: 8px 0 12px; }
.legal-section ul { margin: 8px 0 14px; padding-left: 22px; }
.legal-section li { margin: 5px 0; }

.legal-contact {
  background: var(--legal-paper);
  border: 1px solid var(--legal-line);
  border-radius: 6px;
  margin-top: 22px;
  padding: 18px;
}

.legal-contact p { margin: 4px 0; }

.legal-site-footer {
  border-top: 1px solid rgba(120, 171, 177, 0.4);
  color: #d6e2e4;
  padding: 26px 24px 34px;
}

.legal-site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  margin: 0 auto;
  max-width: var(--legal-width);
}

.legal-site-footer a { color: #d6e2e4; }
.legal-footer-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }

@media (max-width: 760px) {
  .legal-site-header-inner { align-items: flex-start; display: flex; flex-direction: column; gap: 8px; padding: 9px 16px 13px; }
  .legal-logo img { height: 40px; }
  .legal-nav { justify-content: flex-start; }
  .legal-page { gap: 16px; padding: 28px 12px 48px; }
  .legal-document-head, .legal-document-body { padding-left: 18px; padding-right: 18px; }
  .legal-document-head { padding-top: 22px; }
}

@media (max-width: 1499px) {
  .legal-page {
    grid-template-columns: minmax(0, var(--legal-width));
  }

  .legal-development-notice {
    position: static;
  }

  .legal-page-balance { display: none; }
}
