@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  --brand: #3454d1;
  --brand-dark: #2947ba;
  --ink: #182238;
  --text: #536078;
  --muted: #7c879d;
  --line: #e2e6ef;
  --surface: #ffffff;
  --background: #f6f7fb;
  --accent: #ff6b4a;
  --shadow: 0 24px 70px rgba(24, 34, 56, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--background);
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

a,
button {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

:focus-visible {
  outline: 3px solid rgba(52, 84, 209, 0.28);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 14px;
  font-weight: 700;
  transform: translateY(-150%);
}

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

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(226, 230, 239, 0.92);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(14px);
}

.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  display: block;
  width: auto;
  height: 36px;
}

.header-actions,
.legal-nav {
  display: flex;
  align-items: center;
}

.header-actions {
  gap: 28px;
}

.legal-nav {
  gap: 6px;
}

.legal-nav a {
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] {
  color: var(--brand);
  background: #f0f3ff;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid #d8ddea;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  font-size: 14px;
  font-weight: 700;
}

.back-link:hover {
  border-color: #aeb9d8;
  background: #f8f9fc;
}

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: 76px 0 132px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(52, 84, 209, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(52, 84, 209, 0.045) 1px, transparent 1px),
    linear-gradient(180deg, #f3f5fc 0%, #f8f9fc 100%);
  background-size: 40px 40px, 40px 40px, auto;
}

.legal-hero::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -180px;
  width: 440px;
  height: 440px;
  border: 74px solid rgba(52, 84, 209, 0.05);
  border-radius: 50%;
  pointer-events: none;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  padding: 7px 12px;
  border: 1px solid #dbe1fb;
  border-radius: 999px;
  color: var(--brand);
  background: #f0f3ff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.legal-hero h1 {
  max-width: 760px;
  margin: 0;
  color: var(--ink);
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.legal-hero p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--text);
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.7;
}

.legal-layout {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
  margin-top: -70px;
  padding-bottom: 88px;
}

.toc,
.legal-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.toc {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.toc-title {
  margin: 0 0 14px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toc nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.toc a {
  padding: 9px 11px;
  border-left: 2px solid transparent;
  border-radius: 0 7px 7px 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

.toc a:hover {
  border-left-color: var(--brand);
  color: var(--brand);
  background: #f6f8ff;
}

.legal-card {
  padding: 18px 48px 14px;
}

.legal-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}

.legal-section:last-child {
  border-bottom: 0;
}

.section-number {
  display: block;
  margin-bottom: 8px;
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.legal-section h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 27px);
  line-height: 1.25;
  letter-spacing: -0.025em;
}

.legal-section p {
  max-width: 74ch;
  margin: 15px 0 0;
  color: var(--text);
  font-size: 16px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #fff;
}

.footer-main,
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 28px;
}

.footer-main {
  align-items: flex-start;
  padding: 42px 0 34px;
}

.footer-copy {
  max-width: 470px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  padding-top: 5px;
}

.footer-links a {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.footer-links a:hover {
  color: var(--brand);
}

.footer-bottom {
  align-items: center;
  padding: 22px 0 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .header-actions {
    gap: 10px;
  }

  .legal-nav {
    display: none;
  }

  .legal-hero {
    padding: 60px 0 112px;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    margin-top: -54px;
  }

  .toc {
    position: static;
  }

  .toc nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-card {
    padding: 10px 32px;
  }
}

@media (max-width: 620px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .header-inner {
    min-height: 66px;
  }

  .brand img {
    height: 31px;
  }

  .back-link {
    padding: 8px 11px;
    font-size: 13px;
  }

  .legal-hero {
    padding: 48px 0 92px;
  }

  .legal-hero h1 {
    font-size: 39px;
  }

  .legal-layout {
    gap: 16px;
    margin-top: -42px;
    padding-bottom: 60px;
  }

  .toc {
    padding: 18px;
  }

  .toc nav {
    grid-template-columns: 1fr;
  }

  .legal-card {
    padding: 4px 22px;
  }

  .legal-section {
    padding: 29px 0;
  }

  .footer-main,
  .footer-bottom {
    flex-direction: column;
  }

  .footer-main {
    padding-top: 34px;
  }
}

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

  * {
    transition: none !important;
  }
}
