:root {
  --blue-950: #0a1f44;
  --blue-800: #153e75;
  --blue-600: #2563eb;
  --blue-100: #dbeafe;
  --blue-50: #eff6ff;
  --ink: #172033;
  --muted: #64748b;
  --line: #e2e8f0;
  --surface: #ffffff;
  --canvas: #f6f8fc;
  --shadow: 0 20px 55px rgba(15, 23, 42, 0.09);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue-600);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  padding: 10px 14px;
  color: white;
  background: var(--blue-950);
  border-radius: 8px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 232, 240, 0.88);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px);
}

.nav-shell,
.content-shell,
.hero-shell,
.footer-shell {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.nav-shell {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--blue-950);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  margin-right: 9px;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, var(--blue-950), var(--blue-600));
  border-radius: 10px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 5px;
}

.site-nav a {
  padding: 8px 12px;
  color: #475569;
  text-decoration: none;
  border-radius: 10px;
  font-size: 0.92rem;
  font-weight: 650;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--blue-800);
  background: var(--blue-50);
}

.hero {
  padding: 88px 0 70px;
  overflow: hidden;
  color: white;
  background:
    radial-gradient(circle at 80% 5%, rgba(96, 165, 250, 0.35), transparent 32%),
    linear-gradient(135deg, #071a3c 0%, #123b78 58%, #2563eb 130%);
}

.eyebrow {
  margin: 0 0 14px;
  color: #bfdbfe;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(2.35rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.055em;
}

.hero .subtitle {
  margin: 20px 0 0;
  color: #dbeafe;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
}

.hero .description {
  max-width: 690px;
  margin: 16px 0 0;
  color: #bfdbfe;
}

.document-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: -34px auto 80px;
  position: relative;
}

.legal-note {
  margin-bottom: 4rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid #bfdbfe;
  border-radius: 1rem;
  color: #1e3a5f;
  background: #eff6ff;
}

.document-card {
  display: block;
  padding: 30px;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.document-card:hover {
  transform: translateY(-4px);
  border-color: #93c5fd;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.13);
}

.card-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  color: var(--blue-600);
  background: var(--blue-50);
  border-radius: 14px;
  font-size: 1.4rem;
  font-weight: 800;
}

.document-card h2 {
  margin: 18px 0 6px;
  color: var(--blue-950);
  font-size: 1.4rem;
}

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

.card-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--blue-600);
  font-weight: 750;
}

.page-intro {
  padding: 56px 0 34px;
  color: white;
  background: linear-gradient(135deg, var(--blue-950), var(--blue-800));
}

.page-intro h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.page-intro p {
  max-width: 100%;
  margin: 12px 0 0;
  color: #bfdbfe;
  overflow-wrap: anywhere;
}

.legal-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 30px;
  align-items: start;
  padding: 42px 0 72px;
}

.toc {
  position: sticky;
  top: 98px;
  max-height: calc(100vh - 120px);
  overflow: auto;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.toc-title {
  margin: 0 0 10px;
  color: var(--blue-950);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toc a {
  display: block;
  padding: 6px 0;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.84rem;
  line-height: 1.35;
}

.toc a:hover {
  color: var(--blue-600);
}

.legal-document {
  min-width: 0;
  padding: clamp(24px, 5vw, 58px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.legal-document > h1:first-child {
  display: none;
}

.legal-document h1,
.legal-document h2 {
  scroll-margin-top: 98px;
  color: var(--blue-950);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.legal-document h1 {
  margin: 48px 0 14px;
  padding-top: 12px;
  font-size: clamp(1.45rem, 3vw, 1.85rem);
  border-top: 1px solid var(--line);
}

.legal-document h2 {
  margin: 32px 0 10px;
  font-size: 1.2rem;
}

.legal-document p {
  margin: 0 0 18px;
  overflow-wrap: anywhere;
}

.legal-document ul {
  margin: 0 0 22px;
  padding-left: 24px;
}

.legal-document li {
  margin: 6px 0;
  padding-left: 5px;
}

.legal-document hr {
  margin: 30px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.site-footer {
  padding: 34px 0;
  color: #cbd5e1;
  background: #07152f;
}

.footer-shell {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-shell p {
  margin: 0;
}

.footer-tagline {
  color: #94a3b8;
  text-align: right;
}

.back-to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  border: 0;
  color: white;
  background: var(--blue-600);
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.32);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.error-page {
  min-height: calc(100vh - 178px);
  display: grid;
  place-items: center;
  padding: 60px 20px;
  text-align: center;
}

.error-page h1 {
  margin: 0;
  color: var(--blue-950);
  font-size: clamp(4rem, 15vw, 8rem);
  line-height: 1;
}

.button {
  display: inline-block;
  margin-top: 18px;
  padding: 12px 18px;
  color: white;
  background: var(--blue-600);
  border-radius: 12px;
  text-decoration: none;
  font-weight: 750;
}

@media (max-width: 820px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }

  .toc {
    position: static;
    max-height: none;
  }
}

@media (max-width: 680px) {
  .nav-shell {
    min-height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .site-nav a {
    white-space: nowrap;
  }

  .hero {
    padding: 64px 0 60px;
  }

  .document-grid {
    grid-template-columns: 1fr;
    margin-top: -28px;
  }

  .legal-document {
    padding: 24px 20px;
  }

  .footer-shell {
    flex-direction: column;
  }

  .footer-tagline {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}
