@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/InterVariable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #070a0b;
  --surface: #0c1113;
  --surface-soft: #101719;
  --text: #f1f4f3;
  --muted: #9ba7a4;
  --line: rgba(220, 232, 227, 0.12);
  --accent: #83e8bd;
  --shell: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% -4%, rgba(85, 173, 139, 0.12), transparent 27rem),
    var(--bg);
  color: var(--text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.legal-shell {
  width: min(calc(100% - 48px), var(--shell));
  margin-inline: auto;
}

.legal-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 11, 0.84);
  backdrop-filter: blur(18px);
}

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

.legal-brand img {
  display: block;
  width: 122px;
  height: auto;
  filter: invert(1);
}

.legal-back {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 16px;
  color: #d9e0de;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.legal-back:hover,
.legal-back:focus-visible {
  border-color: rgba(131, 232, 189, 0.35);
  background: rgba(131, 232, 189, 0.06);
}

.legal-main {
  padding-block: clamp(64px, 9vw, 112px) 110px;
}

.legal-hero {
  max-width: 850px;
  padding-bottom: 54px;
}

.legal-eyebrow {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 6.2vw, 76px);
  font-weight: 560;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.legal-intro {
  max-width: 720px;
  margin: 26px 0 0;
  color: #b6c0bd;
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.55;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 24px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 13px;
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 255px;
  gap: clamp(44px, 7vw, 92px);
  align-items: start;
}

.legal-content {
  min-width: 0;
}

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

.legal-section:first-child {
  border-top-color: rgba(131, 232, 189, 0.32);
}

.legal-section h2 {
  margin: 0 0 20px;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 570;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.legal-section h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  font-weight: 620;
}

.legal-section p {
  margin: 0;
  color: #bdc6c4;
}

.legal-section p + p,
.legal-section ul + p,
.legal-section ol + p {
  margin-top: 16px;
}

.legal-section ul,
.legal-section ol {
  display: grid;
  gap: 10px;
  margin: 16px 0 0;
  padding-left: 21px;
  color: #bdc6c4;
}

.legal-section li::marker {
  color: var(--accent);
}

.legal-section a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(131, 232, 189, 0.38);
  text-underline-offset: 3px;
}

.legal-note {
  margin-top: 24px;
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 20px;
  color: #d9e0de;
}

.legal-toc {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
  background: rgba(14, 20, 22, 0.76);
}

.legal-toc strong {
  margin-bottom: 7px;
  color: var(--accent);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-toc a {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  transition: color 160ms ease;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--text);
}

.details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  overflow: hidden;
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--line);
}

.details-item {
  min-height: 106px;
  padding: 20px 22px;
  background: var(--surface);
}

.details-item-wide {
  grid-column: 1 / -1;
}

.details-item dt {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.details-item dd {
  margin: 0;
  color: var(--text);
  font-size: 15px;
  font-weight: 560;
  line-height: 1.45;
}

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

.legal-footer-inner {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: var(--muted);
  font-size: 12px;
}

.legal-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
}

.legal-footer a:hover,
.legal-footer a:focus-visible {
  color: var(--text);
}

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

  .legal-toc {
    position: static;
    order: -1;
  }
}

@media (max-width: 560px) {
  .legal-shell {
    width: min(calc(100% - 32px), var(--shell));
  }

  .legal-header-inner {
    min-height: 64px;
  }

  .legal-brand img {
    width: 108px;
  }

  .legal-back {
    width: 40px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  .legal-back span {
    font-size: 18px;
  }

  .legal-main {
    padding-block: 52px 76px;
  }

  .legal-hero {
    padding-bottom: 40px;
  }

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

  .legal-section {
    padding-block: 34px;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .details-item-wide {
    grid-column: auto;
  }

  .legal-footer-inner {
    min-height: 0;
    flex-direction: column;
    align-items: flex-start;
    padding-block: 28px;
  }
}
