:root {
  --ink: #f8faff;
  --body: rgba(248, 250, 255, 0.86);
  --muted: rgba(248, 250, 255, 0.66);
  --faint: rgba(248, 250, 255, 0.46);
  --line: rgba(255, 255, 255, 0.1);
  --bg: #070919;
  --measure: 750px;
  --blue: #b9d6ff;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background:
    radial-gradient(ellipse 70% 32% at 50% -8%, rgba(86, 167, 255, 0.09), transparent 58%),
    var(--bg);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: rgba(86, 167, 255, 0.32); }

a { color: inherit; }

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 20;
  padding: 8px 12px;
  border-radius: 8px;
  background: #fff;
  color: #070919;
  font-size: 14px;
  font-weight: 650;
  text-decoration: none;
}

.skip:focus { top: 12px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 9, 25, 0.86);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.topbar-inner,
.legal-wrap {
  width: min(var(--measure), calc(100% - 40px - env(safe-area-inset-left) - env(safe-area-inset-right)));
  margin-inline: auto;
}

.topbar-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: max(8px, env(safe-area-inset-top));
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 680;
  letter-spacing: -0.03em;
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.doc-nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px 16px;
}

.doc-nav a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 560;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.doc-nav a[aria-current="page"] { color: #fff; }

.doc-nav a:hover,
.brand:hover { color: #fff; }

main:focus { outline: none; }

.legal-wrap { padding: 48px 0 28px; }

.doc-intro {
  padding-bottom: 28px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}

h1 {
  margin: 0;
  max-width: 18em;
  font-size: clamp(32px, 4.4vw, 42px);
  font-weight: 640;
  letter-spacing: -0.038em;
  line-height: 1.12;
  text-wrap: balance;
}

.doc-sub {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.45;
}

.doc-meta {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.legal-body { padding-top: 8px; }

.legal-body h2,
.legal-body h3 {
  color: #fff;
  letter-spacing: -0.028em;
  line-height: 1.28;
  text-wrap: balance;
  scroll-margin-top: 84px;
}

.legal-body h2 {
  margin: 2.5em 0 0.6em;
  font-size: 22px;
  font-weight: 640;
}

.legal-body h3 {
  margin: 1.7em 0 0.45em;
  font-size: 17px;
  font-weight: 620;
}

.num {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  font-weight: 560;
  margin-right: 0.15em;
}

.legal-body p {
  margin: 0 0 0.78em;
  color: var(--body);
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.legal-body p.tight { margin-bottom: 0.22em; }

.legal-body ul {
  list-style: none;
  margin: 0.15em 0 1em;
  padding: 0;
}

.legal-body li {
  position: relative;
  margin: 0.34em 0;
  padding-left: 1.15em;
  color: var(--body);
  overflow-wrap: anywhere;
}

.legal-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(248, 250, 255, 0.42);
}

.legal-body a {
  color: var(--blue);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.legal-body a:hover { color: #fff; }

.legal-notice {
  margin: 1.15em 0 1.3em;
  padding: 14px 16px 6px;
  border-left: 2px solid rgba(248, 250, 255, 0.28);
  background: rgba(255, 255, 255, 0.03);
}

.legal-notice p,
.legal-notice li {
  font-size: 0.94em;
  line-height: 1.65;
}

.legal-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.4em 0;
}

.legal-footer {
  padding: 8px 0 calc(36px + env(safe-area-inset-bottom));
  color: rgba(248, 250, 255, 0.46);
  text-align: center;
  font-size: 13px;
}

.legal-footer .legal-wrap { padding-top: 0; }

.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 10px;
}

.footer-nav a {
  color: rgba(248, 250, 255, 0.66);
  font-size: 13px;
  font-weight: 560;
  text-decoration: none;
}

.footer-nav a[aria-current="page"],
.footer-nav a:hover { color: #fff; }

.legal-footer p { margin: 0; }

:focus-visible {
  outline: 2px solid #8ebeff;
  outline-offset: 3px;
  border-radius: 4px;
}

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .topbar-inner { min-height: 58px; gap: 12px; }
  .doc-nav { gap: 4px 12px; }
  .doc-nav a { font-size: 12.5px; }
  .legal-wrap { padding-top: 36px; }
  .legal-body h2 { font-size: 20px; }
  .legal-notice { padding: 12px 12px 4px; }
}

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

@media print {
  body { background: #fff; color: #161616; font-size: 12pt; }
  .skip, .topbar, .legal-footer { display: none; }
  .legal-wrap { width: auto; padding: 0; }
  h1, .legal-body h2, .legal-body h3, .legal-body p, .legal-body li { color: #161616; }
  .num, .doc-sub, .doc-meta { color: #444; }
  .legal-body a { color: #161616; }
  .legal-notice { background: transparent; border-left-color: #161616; }
}
