:root {
  --legal-bg: #f5f8fc;
  --legal-surface: #ffffff;
  --legal-surface-soft: #eef4fb;
  --legal-text: #071b3a;
  --legal-muted: #53657d;
  --legal-border: #d8e3f0;
  --legal-blue: #155eef;
  --legal-blue-dark: #0d47c7;
  --legal-yellow: #f4c430;
  --legal-shadow: 0 18px 45px rgba(21, 53, 96, 0.08);
}

[data-theme="dark"] {
  --legal-bg: #081225;
  --legal-surface: #101c31;
  --legal-surface-soft: #16243c;
  --legal-text: #f3f7ff;
  --legal-muted: #aebbd0;
  --legal-border: #2d4263;
  --legal-blue: #4b91ff;
  --legal-blue-dark: #72a8ff;
  --legal-yellow: #f6cf4a;
  --legal-shadow: 0 18px 45px rgba(0, 0, 0, 0.26);
}

.legal-page-body .app-navbar {
  margin-bottom: 0 !important;
}

.legal-page {
  min-height: 100%;
  color: var(--legal-text);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--legal-blue) 5%, transparent), transparent 16rem),
    var(--legal-bg);
}

.legal-page *,
.legal-page *::before,
.legal-page *::after {
  box-sizing: border-box;
}

.legal-page a {
  color: var(--legal-blue-dark);
}

.legal-page a:focus-visible {
  border-radius: 0.3rem;
  outline: 3px solid color-mix(in srgb, var(--legal-blue) 38%, transparent);
  outline-offset: 3px;
}

.legal-header {
  border-bottom: 1px solid var(--legal-border);
  background: color-mix(in srgb, var(--legal-surface) 88%, transparent);
}

.legal-header-inner,
.legal-content {
  width: min(100% - 2rem, 980px);
  margin-inline: auto;
}

.legal-header-inner {
  padding-block: 3.25rem 2.8rem;
}

.legal-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.7rem;
  color: var(--legal-blue);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.legal-eyebrow::before {
  width: 1.75rem;
  height: 3px;
  border-radius: 999px;
  background: var(--legal-yellow);
  content: "";
}

.legal-header h1 {
  max-width: 18ch;
  margin: 0;
  color: var(--legal-text);
  font-size: clamp(2rem, 4vw, 2.5rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: 0;
}

.legal-effective-date {
  margin: 0.85rem 0 0;
  color: var(--legal-muted);
  font-size: 0.95rem;
  font-weight: 700;
}

.legal-content {
  padding-block: 2.2rem 4rem;
}

.legal-intro {
  margin-bottom: 1.5rem;
  padding: 1.35rem 1.45rem;
  border: 1px solid var(--legal-border);
  border-left: 4px solid var(--legal-blue);
  border-radius: 8px;
  background: var(--legal-surface);
  box-shadow: var(--legal-shadow);
}

.legal-intro p:last-child,
.legal-section p:last-child,
.legal-contact-panel p:last-child {
  margin-bottom: 0;
}

.legal-toc {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  padding: 0.75rem;
  overflow-x: auto;
  border: 1px solid var(--legal-border);
  border-radius: 8px;
  background: var(--legal-surface-soft);
  scrollbar-width: thin;
}

.legal-toc a {
  flex: 0 0 auto;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  border-radius: 6px;
  color: var(--legal-text);
  font-size: 0.88rem;
  font-weight: 750;
  text-decoration: none;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--legal-blue-dark);
  background: var(--legal-surface);
}

.legal-sections {
  display: grid;
  gap: 0.9rem;
}

.legal-section {
  scroll-margin-top: 6rem;
  padding: 1.45rem 1.55rem;
  border: 1px solid var(--legal-border);
  border-radius: 8px;
  background: var(--legal-surface);
}

.legal-section h2,
.legal-contact-panel h2 {
  margin: 0 0 0.8rem;
  color: var(--legal-text);
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 850;
  line-height: 1.25;
  letter-spacing: 0;
}

.legal-section h3 {
  margin: 1.1rem 0 0.45rem;
  color: var(--legal-text);
  font-size: 1.05rem;
  font-weight: 800;
}

.legal-section p,
.legal-section li,
.legal-intro p,
.legal-contact-panel p,
.legal-process-card p {
  color: var(--legal-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.legal-section strong,
.legal-contact-panel strong {
  color: var(--legal-text);
}

.legal-section ul {
  margin: 0.7rem 0 0;
  padding-left: 1.25rem;
}

.legal-section li + li {
  margin-top: 0.3rem;
}

.legal-callout {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--legal-yellow);
  border-radius: 6px;
  background: var(--legal-surface-soft);
}

.legal-contact-panel {
  margin-top: 1.5rem;
  padding: 1.6rem;
  border: 1px solid var(--legal-border);
  border-radius: 8px;
  background: var(--legal-surface);
  box-shadow: var(--legal-shadow);
}

.legal-contact-grid,
.legal-process-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.legal-contact-link,
.legal-process-card {
  min-width: 0;
  border: 1px solid var(--legal-border);
  border-radius: 8px;
  background: var(--legal-surface-soft);
}

.legal-contact-link {
  min-height: 82px;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 1rem;
  color: var(--legal-text) !important;
  text-decoration: none;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.legal-contact-link:hover {
  border-color: color-mix(in srgb, var(--legal-blue) 55%, var(--legal-border));
  background: color-mix(in srgb, var(--legal-surface) 86%, var(--legal-blue) 14%);
  transform: translateY(-2px);
}

.legal-contact-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #ffffff;
  background: var(--legal-blue);
}

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

.legal-contact-copy {
  min-width: 0;
}

.legal-contact-copy strong,
.legal-contact-copy span {
  display: block;
}

.legal-contact-copy strong {
  margin-bottom: 0.15rem;
  font-size: 0.8rem;
  font-weight: 850;
  text-transform: uppercase;
}

.legal-contact-copy span {
  overflow-wrap: anywhere;
  color: var(--legal-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.legal-process-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.legal-process-card {
  padding: 1.2rem;
}

.legal-process-number {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  color: #ffffff;
  background: var(--legal-blue);
  font-size: 0.78rem;
  font-weight: 900;
}

.legal-process-card h3 {
  margin: 0 0 0.4rem;
  color: var(--legal-text);
  font-size: 1.05rem;
  font-weight: 850;
}

.legal-process-card p {
  margin: 0;
  font-size: 0.92rem;
}

.legal-address {
  font-style: normal;
  line-height: 1.65;
}

@media (max-width: 639.98px) {
  .legal-header-inner,
  .legal-content {
    width: min(100% - 1.25rem, 980px);
  }

  .legal-header-inner {
    padding-block: 2.25rem 2rem;
  }

  .legal-content {
    padding-block: 1.25rem 2.75rem;
  }

  .legal-intro,
  .legal-section,
  .legal-contact-panel {
    padding: 1.1rem;
  }

  .legal-toc {
    margin-inline: -0.15rem;
  }

  .legal-contact-grid,
  .legal-process-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-contact-link {
    min-height: 72px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legal-contact-link {
    transition: none;
  }

  .legal-contact-link:hover {
    transform: none;
  }
}
