:root {
  color-scheme: light;
  --legal-ink: #101114;
  --legal-muted: #62656c;
  --legal-line: #dedfe2;
  --legal-soft: #f4f5f6;
  --legal-paper: #ffffff;
  --legal-accent: #111111;
  --legal-focus: #1769e0;
  --legal-max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #eceeef;
}

body {
  min-width: 0;
  margin: 0;
  color: var(--legal-ink);
  background: #eceeef;
  font-family: "Helvetica Neue", "Segoe UI Variable", "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: inherit;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 3px solid var(--legal-focus);
  outline-offset: 4px;
  border-radius: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: #000;
  transform: translateY(-180%);
}

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

.legal-topbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  color: #fff;
  background: #090909;
}

.legal-topbar__inner {
  width: min(calc(100% - 48px), var(--legal-max));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.legal-brand,
.legal-back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}

.legal-brand {
  gap: 12px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-brand img {
  width: 28px;
  height: 28px;
  filter: invert(1);
}

.legal-back {
  gap: 8px;
  color: #d8d8da;
  font-size: 14px;
}

.legal-back::before {
  content: "←";
  font-size: 18px;
}

.legal-layout {
  width: min(calc(100% - 48px), var(--legal-max));
  margin: 38px auto 64px;
  display: grid;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.legal-sidebar {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 18px;
}

.legal-card,
.legal-document {
  border: 1px solid var(--legal-line);
  border-radius: 18px;
  background: var(--legal-paper);
  box-shadow: 0 10px 30px rgba(15, 16, 20, 0.05);
}

.legal-card {
  padding: 22px;
}

.legal-card__label,
.legal-eyebrow {
  margin: 0 0 8px;
  color: var(--legal-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.legal-card strong {
  display: block;
  line-height: 1.35;
}

.legal-card p {
  margin: 8px 0 0;
  color: var(--legal-muted);
  font-size: 14px;
  line-height: 1.5;
}

.legal-toc h2 {
  margin: 0 0 12px;
  font-size: 15px;
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  list-style: none;
  counter-reset: legal-toc;
}

.legal-toc li {
  counter-increment: legal-toc;
}

.legal-toc a {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px;
  padding: 7px 0;
  color: #34363b;
  font-size: 14px;
  line-height: 1.35;
  text-decoration: none;
}

.legal-toc a::before {
  content: counter(legal-toc, decimal-leading-zero);
  color: #92949a;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}

.legal-toc a:hover {
  color: #000;
}

.legal-document {
  min-width: 0;
  overflow: hidden;
}

.legal-hero {
  padding: clamp(32px, 5vw, 64px) clamp(24px, 6vw, 72px) 36px;
  border-bottom: 1px solid var(--legal-line);
}

.legal-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(34px, 5vw, 66px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.98;
  overflow-wrap: anywhere;
}

.legal-lead {
  max-width: 760px;
  margin: 24px 0 0;
  color: #45484f;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.55;
}

.legal-meta {
  margin: 28px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  color: var(--legal-muted);
  font-size: 13px;
  list-style: none;
}

.legal-meta strong {
  color: var(--legal-ink);
  font-weight: 600;
}

.legal-content {
  padding: 8px clamp(24px, 6vw, 72px) clamp(40px, 7vw, 80px);
}

.legal-section {
  padding: 40px 0 8px;
  scroll-margin-top: 24px;
}

.legal-section + .legal-section {
  border-top: 1px solid var(--legal-line);
}

.legal-section h2 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.legal-section h3 {
  margin: 28px 0 10px;
  font-size: 19px;
  line-height: 1.3;
}

.legal-section p,
.legal-section ul,
.legal-section ol,
.legal-section dl,
.legal-note {
  max-width: 780px;
}

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

.legal-section ul,
.legal-section ol {
  margin: 14px 0 20px;
  padding-left: 1.35em;
}

.legal-section li {
  margin: 8px 0;
  padding-left: 0.25em;
}

.legal-note {
  margin: 24px 0;
  padding: 18px 20px;
  border-left: 3px solid var(--legal-accent);
  border-radius: 0 10px 10px 0;
  background: var(--legal-soft);
}

.legal-note strong {
  display: block;
  margin-bottom: 4px;
}

.legal-definition-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1.5fr);
  border-top: 1px solid var(--legal-line);
}

.legal-definition-list dt,
.legal-definition-list dd {
  margin: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--legal-line);
}

.legal-definition-list dt {
  padding-right: 24px;
  color: var(--legal-muted);
  font-size: 14px;
}

.legal-definition-list dd {
  font-weight: 500;
  overflow-wrap: anywhere;
}

.legal-contact-list {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
}

.legal-contact-list li {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--legal-line);
  border-radius: 12px;
  background: var(--legal-soft);
}

.legal-contact-list span {
  display: block;
  margin-bottom: 4px;
  color: var(--legal-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.legal-contact-list a,
.legal-contact-list strong {
  font-weight: 600;
  overflow-wrap: anywhere;
}

.legal-page-footer {
  color: #fff;
  background: #090909;
}

.legal-page-footer__inner {
  width: min(calc(100% - 48px), var(--legal-max));
  margin: 0 auto;
  padding: 42px 0;
  display: grid;
  grid-template-columns: minmax(230px, 1.1fr) minmax(280px, 1fr);
  gap: 48px;
}

.legal-page-footer p {
  max-width: 580px;
  margin: 0;
  color: #bdbec2;
  font-size: 14px;
}

.legal-page-footer strong {
  display: block;
  margin-bottom: 8px;
  color: #fff;
}

.legal-links {
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
  list-style: none;
}

.legal-links li {
  margin: 0;
}

.legal-links a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  color: #e8e8ea;
  font-size: 14px;
}

.legal-print-hint {
  margin-top: 16px;
  color: var(--legal-muted);
  font-size: 13px;
}

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

  .legal-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-toc {
    grid-column: 1 / -1;
  }

  .legal-toc ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 20px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 16px;
  }

  .legal-topbar__inner,
  .legal-layout,
  .legal-page-footer__inner {
    width: min(calc(100% - 28px), var(--legal-max));
  }

  .legal-topbar__inner {
    min-height: 64px;
  }

  .legal-brand span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .legal-sidebar {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    grid-column: auto;
  }

  .legal-toc ol,
  .legal-contact-list,
  .legal-page-footer__inner,
  .legal-links {
    grid-template-columns: 1fr;
  }

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

  .legal-document {
    border-radius: 14px;
  }

  .legal-hero {
    padding: 30px 20px 26px;
  }

  .legal-hero h1 {
    font-size: clamp(28px, 9vw, 42px);
  }

  .legal-content {
    padding: 4px 20px 48px;
  }

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

  .legal-definition-list {
    grid-template-columns: 1fr;
  }

  .legal-definition-list dt {
    padding: 14px 0 4px;
    border-bottom: 0;
  }

  .legal-definition-list dd {
    padding: 0 0 14px;
  }

  .legal-page-footer__inner {
    gap: 28px;
  }
}

@media print {
  @page {
    margin: 18mm 16mm;
  }

  :root {
    --legal-line: #c8c8c8;
  }

  html,
  body {
    color: #000;
    background: #fff;
    font-size: 11pt;
  }

  .skip-link,
  .legal-topbar,
  .legal-sidebar,
  .legal-page-footer,
  .legal-print-hint {
    display: none !important;
  }

  .legal-layout {
    width: 100%;
    margin: 0;
    display: block;
  }

  .legal-document {
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
  }

  .legal-hero,
  .legal-content {
    padding-right: 0;
    padding-left: 0;
  }

  .legal-hero {
    padding-top: 0;
  }

  .legal-hero h1 {
    font-size: 30pt;
  }

  .legal-section {
    break-inside: avoid-page;
  }

  .legal-section a::after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    overflow-wrap: anywhere;
  }

  .legal-section a[href^="#"]::after,
  .legal-section a[href^="mailto:"]::after,
  .legal-section a[href^="tel:"]::after {
    content: "";
  }
}
