:root {
  color-scheme: dark;
  font-family: Inter, "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #080a0e;
  color: #f5f7fa;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 50% -20%, rgba(38, 112, 255, 0.18), transparent 36rem),
    #080a0e;
}

a { color: inherit; }

.legal-document { overflow-wrap: anywhere; hyphens: auto; }

.legal-shell {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.legal-header {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  background: rgba(18, 21, 28, 0.84);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 650;
}

.legal-brand img { width: 28px; height: 28px; }

.legal-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }

.legal-nav a {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  font-size: 13px;
  transition: background 160ms ease, color 160ms ease, transform 100ms ease;
}

.legal-nav a:hover,
.legal-nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, 0.09); }
.legal-nav a:active { transform: scale(0.97); }

.legal-document {
  margin-top: 22px;
  padding: clamp(24px, 5vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 28px;
  background: rgba(17, 20, 27, 0.92);
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.24);
}

.legal-eyebrow { margin: 0 0 10px; color: #63a8f7; font-size: 13px; font-weight: 650; }
h1 { max-width: 720px; margin: 0; font-size: clamp(30px, 5vw, 48px); line-height: 1.04; letter-spacing: -0.035em; }
.legal-lead { max-width: 720px; margin: 18px 0 0; color: rgba(255, 255, 255, 0.63); font-size: 17px; line-height: 1.55; }
.legal-updated { margin: 12px 0 0; color: rgba(255, 255, 255, 0.42); font-size: 13px; }

.legal-content { margin-top: 40px; }
.legal-content section + section { margin-top: 34px; }
.legal-content h2 { margin: 0 0 12px; font-size: 21px; letter-spacing: -0.015em; }
.legal-content h3 { margin: 20px 0 8px; font-size: 16px; }
.legal-content p,
.legal-content li { color: rgba(255, 255, 255, 0.72); font-size: 15px; line-height: 1.62; }
.legal-content p { margin: 10px 0; }
.legal-content ul { margin: 10px 0; padding-left: 22px; }
.legal-content li + li { margin-top: 7px; }
.legal-content strong { color: #fff; font-weight: 620; }
.legal-content a { color: #76b5ff; text-underline-offset: 3px; }

.legal-callout,
.price-card,
.support-card {
  padding: 20px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.price-card { display: grid; gap: 14px; }
.legal-content .price-value { margin: 0; font-size: clamp(26px, 6vw, 36px); line-height: 1.2; letter-spacing: -0.03em; }
.price-badge { width: max-content; padding: 5px 9px; border-radius: 999px; background: rgba(53, 190, 114, 0.14); color: #69d99b; font-size: 12px; font-weight: 650; }
.support-link { display: inline-flex; min-height: 44px; align-items: center; margin-top: 8px; padding: 0 15px; border-radius: 12px; background: #1677ff; color: #fff !important; font-weight: 650; text-decoration: none; }
.approval-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 0.04em; }

.legal-footer { padding: 24px 4px 0; color: rgba(255, 255, 255, 0.38); font-size: 12px; text-align: center; }

@media (max-width: 720px) {
  .legal-shell { width: min(100% - 20px, 920px); padding-top: 10px; }
  .legal-header { position: static; align-items: flex-start; flex-direction: column; }
  .legal-nav { justify-content: flex-start; width: 100%; flex-wrap: wrap; padding-bottom: 2px; }
  .legal-nav a { min-height: 44px; }
  .legal-nav a { flex: 0 0 auto; }
  .legal-document { border-radius: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (prefers-reduced-transparency: reduce) {
  .legal-header, .legal-document { backdrop-filter: none; background: #12151c; }
}
