:root {
  color-scheme: light;
  --ink: #0f172a;
  --muted: #52627a;
  --line: #dbe4ef;
  --soft: #f4f7fb;
  --accent: #0369a1;
  --accent-dark: #075985;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--accent);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-dark);
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  min-height: 72px;
  padding: 12px max(20px, calc((100vw - 1160px) / 2));
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

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

.legal-header nav,
.legal-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
}

.legal-header nav a,
.legal-footer a {
  font-weight: 700;
  text-decoration: none;
}

.legal-shell {
  width: min(1160px, calc(100% - 40px));
  margin: 0 auto;
  padding: 68px 0 80px;
}

.legal-hero {
  max-width: 820px;
  margin-bottom: 38px;
}

.legal-kicker {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.legal-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 6vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
}

.legal-hero > p:not(.legal-kicker) {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 18px;
}

.legal-updated {
  font-size: 14px !important;
  font-weight: 700;
}

.legal-index {
  position: sticky;
  top: 98px;
  float: left;
  display: grid;
  width: 245px;
  gap: 8px;
  padding: 18px;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legal-index strong {
  margin-bottom: 4px;
}

.legal-index a {
  font-size: 14px;
  text-decoration: none;
}

.legal-content {
  margin-left: 285px;
  max-width: 820px;
}

.legal-content-single {
  margin-left: 0;
}

.legal-content section {
  scroll-margin-top: 100px;
  padding: 0 0 34px;
  margin: 0 0 34px;
  border-bottom: 1px solid var(--line);
}

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

.legal-content h2 {
  margin: 0 0 14px;
  font-size: 26px;
  line-height: 1.25;
}

.legal-content h3 {
  margin: 24px 0 8px;
  font-size: 18px;
}

.legal-content p,
.legal-content ul {
  margin: 0 0 14px;
  color: #334155;
}

.legal-content ul {
  padding-left: 22px;
}

.legal-content li + li {
  margin-top: 8px;
}

.legal-table-wrap {
  margin: 18px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.legal-table-wrap table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  background: #fff;
}

.legal-table-wrap th,
.legal-table-wrap td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal-table-wrap th {
  color: #334155;
  background: var(--soft);
  font-size: 13px;
  text-transform: uppercase;
}

.legal-table-wrap tr:last-child td {
  border-bottom: 0;
}

code {
  padding: 2px 6px;
  background: #eaf0f7;
  border-radius: 4px;
  font-size: 13px;
  white-space: nowrap;
}

.legal-footer {
  justify-content: center;
  padding: 28px 20px;
  color: var(--muted);
  background: var(--soft);
  border-top: 1px solid var(--line);
  font-size: 14px;
}

@media (max-width: 820px) {
  .legal-header {
    min-height: 64px;
  }

  .legal-header nav a:first-child {
    display: none;
  }

  .legal-shell {
    width: min(100% - 32px, 720px);
    padding-top: 46px;
  }

  .legal-index {
    position: static;
    float: none;
    width: auto;
    margin-bottom: 34px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-index strong {
    grid-column: 1 / -1;
  }

  .legal-content {
    margin-left: 0;
  }

  .legal-content h2 {
    font-size: 23px;
  }
}

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