:root {
  --bg: #d9dbde;
  --surface: #eceef1;
  --surface-soft: #f4f5f7;
  --ink: #2e333a;
  --muted: #5e6670;
  --line: #b6bcc4;
  --line-strong: #8c939d;
  --accent: #6f7884;
  --accent-soft: #838c98;
  --shadow: 0 12px 30px rgb(25 29 36 / 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family:
    "Manrope",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: linear-gradient(165deg, #cfd2d7 0%, #dbdde0 40%, #d2d5da 100%);
  line-height: 1.55;
}

.background {
  position: fixed;
  inset: 0;
  background: radial-gradient(
      circle at 16% 12%,
      rgb(255 255 255 / 0.2),
      transparent 35%
    ),
    radial-gradient(circle at 84% 14%, rgb(255 255 255 / 0.16), transparent 38%);
  pointer-events: none;
  z-index: -1;
}

.site-header,
main,
.site-footer {
  width: min(1040px, 92vw);
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: #fff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Outfit", "Manrope", sans-serif;
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo {
  width: 2rem;
  height: 2rem;
  object-fit: contain;
}

.site-nav {
  display: flex;
  gap: 0.95rem;
}

.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  opacity: 0.9;
}

.site-nav a:hover {
  opacity: 1;
}

main {
  padding: 3.6rem 0 2rem;
}

.hero {
  max-width: 780px;
}

.eyebrow {
  display: inline-block;
  margin: 0;
  font-size: 0.74rem;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2 {
  font-family: "Outfit", "Manrope", sans-serif;
  line-height: 1.08;
  margin: 0;
}

h1 {
  margin-top: 0.7rem;
  font-size: clamp(2.15rem, 5.2vw, 4.4rem);
  text-wrap: balance;
}

.lead {
  margin-top: 0.95rem;
  max-width: 64ch;
  color: var(--muted);
  font-size: clamp(1rem, 2.1vw, 1.18rem);
}

.grid-section {
  margin-top: 2.4rem;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.9rem;
}

.card {
  grid-column: span 4;
  background: rgb(243 245 247 / 0.74);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.card h2 {
  font-size: 1.2rem;
  margin-bottom: 0.38rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.site-footer {
  margin: 2.2rem auto 2.6rem;
  padding-top: 0.95rem;
  border-top: 1px solid rgb(124 132 143 / 0.4);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
}

.footer-legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.footer-legal-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-legal-link:hover {
  color: var(--ink);
}

.site-copyright {
  position: fixed;
  left: max(0.85rem, env(safe-area-inset-left));
  bottom: max(0.85rem, env(safe-area-inset-bottom));
  margin: 0;
  padding: 0.12rem 0;
  color: var(--muted);
  font-family: "Manrope", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  z-index: 20;
  user-select: none;
}

.is-legal-page .site-copyright {
  position: static;
  display: block;
  width: min(1040px, 92vw);
  margin: 1rem auto 1.6rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 860px) {
  .card {
    grid-column: span 6;
  }
}

@media (max-width: 680px) {
  .card {
    grid-column: span 12;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-end;
  }

  .site-copyright {
    font-size: 0.72rem;
    left: max(0.65rem, env(safe-area-inset-left));
    bottom: max(0.65rem, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0ms !important;
    transition-duration: 0ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

.legal-view-main {
  padding-top: 2.4rem;
}

.doc-shell {
  width: min(960px, 100%);
  margin-inline: auto;
  background: rgb(243 245 247 / 0.82);
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  padding: 1.15rem;
  box-shadow: var(--shadow);
}

.doc-meta {
  margin: 0.45rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.doc-switch {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.doc-switch a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.93rem;
  border-bottom: 1px solid transparent;
}

.doc-switch a:hover,
.doc-switch a.is-active {
  color: var(--ink);
  border-bottom-color: var(--line-strong);
}

.doc-content {
  margin-top: 1.1rem;
  max-width: 78ch;
}

.doc-content h1,
.doc-content h2,
.doc-content h3 {
  margin: 1rem 0 0.55rem;
  font-size: 1.15rem;
}

.doc-content p,
.doc-content li {
  margin: 0 0 0.7rem;
  color: var(--muted);
  line-height: 1.6;
}

.doc-content ul {
  margin: 0.4rem 0 0.9rem;
  padding-left: 1.15rem;
}

.doc-content a {
  color: var(--accent);
}

.doc-error {
  margin-top: 1rem;
  color: #a44;
}
