:root {
  --legal-bg: #fbfcfe;
  --legal-surface: #ffffff;
  --legal-surface-strong: #ffffff;
  --legal-border: rgba(31, 41, 55, 0.1);
  --legal-text: #162033;
  --legal-muted: #67748b;
  --legal-accent: #2448a6;
  --legal-accent-soft: rgba(36, 72, 166, 0.08);
  --legal-shadow: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--legal-text);
  background: var(--legal-bg);
}

a {
  color: var(--legal-accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.legal-container {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.legal-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(22px);
  background: rgba(248, 251, 255, 0.82);
  border-bottom: 1px solid rgba(51, 72, 122, 0.08);
}

.legal-topbar-shell {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  color: var(--legal-text);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.legal-brand:hover {
  text-decoration: none;
}

.legal-brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
}

.legal-topnav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 12px 16px;
}

.legal-topnav a {
  font-size: 0.95rem;
  font-weight: 600;
}

.legal-main {
  padding: 28px 0 72px;
}

.legal-hero {
  padding-top: 10px;
}

.legal-backlink {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 0.95rem;
  font-weight: 600;
}

.legal-doc-shell h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.3rem);
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.legal-summary {
  max-width: 720px;
  margin: 14px 0 0;
  color: var(--legal-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.legal-doc-shell {
  width: min(860px, 100%);
}

.legal-section {
  padding-top: 26px;
}

.legal-article {
  padding: 0;
}

.legal-richtext {
  color: var(--legal-text);
}

.legal-richtext h2,
.legal-richtext h3 {
  margin: 28px 0 12px;
  letter-spacing: -0.04em;
}

.legal-richtext h2 {
  font-size: 1.44rem;
}

.legal-richtext h3 {
  font-size: 1.02rem;
}

.legal-richtext p,
.legal-richtext li {
  color: #2d3c58;
  line-height: 1.86;
  font-size: 1rem;
}

.legal-richtext p {
  margin: 0 0 16px;
}

.legal-richtext ul {
  margin: 0 0 20px;
  padding-left: 22px;
  display: grid;
  gap: 10px;
}

.legal-richtext code {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(36, 72, 166, 0.08);
  color: var(--legal-accent);
  font-size: 0.95em;
}

.legal-related {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--legal-border);
}

.legal-related-label {
  margin: 0 0 10px;
  color: var(--legal-muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.legal-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.legal-related-link {
  font-weight: 700;
}

.legal-document-list {
  display: grid;
  gap: 0;
}

.legal-document-row {
  display: grid;
  gap: 6px;
  padding: 18px 0;
  border-top: 1px solid var(--legal-border);
}

.legal-document-row:last-child {
  border-bottom: 1px solid var(--legal-border);
}

.legal-document-row:hover {
  text-decoration: none;
}

.legal-document-row-title {
  color: var(--legal-text);
  font-size: 1.16rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.legal-document-row-description {
  color: var(--legal-muted);
  line-height: 1.72;
}

.legal-footer {
  padding: 18px 0 40px;
}

.legal-footer-shell {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-top: 22px;
  border-top: 1px solid var(--legal-border);
}

.legal-footer-primary {
  display: grid;
  gap: 8px;
}

.legal-footer-primary p {
  margin: 0;
  color: var(--legal-muted);
  line-height: 1.7;
}

.legal-footer-copy {
  color: var(--legal-text) !important;
  font-weight: 700;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 16px;
}

.legal-footer-links a {
  font-weight: 700;
}

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

  .legal-topbar-shell,
  .legal-footer-shell {
    flex-direction: column;
    align-items: flex-start;
  }

  .legal-topnav,
  .legal-footer-links {
    justify-content: flex-start;
  }

  .legal-main {
    padding-bottom: 56px;
  }

  .legal-doc-shell h1 {
    font-size: clamp(1.9rem, 8vw, 2.6rem);
  }

  .legal-related-links,
  .legal-footer-links {
    gap: 10px 14px;
  }
}
