:root {
  --bg: #050810;
  --bg-2: #0a1120;
  --line: rgba(173, 204, 255, 0.18);
  --line-strong: rgba(99, 176, 255, 0.42);
  --text: #f6f8ff;
  --muted: #aeb8ca;
  --soft: #dce5f7;
  --cyan: #36c7ff;
  --violet: #a95cff;
  --shadow: 0 20px 56px rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(4, 8, 16, 0.96), rgba(6, 11, 20, 0.94)),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

a {
  color: inherit;
}

.page-wrap {
  width: min(980px, calc(100% - 40px));
  margin-inline: auto;
  padding: 28px 0 56px;
}

.legal-topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 18, 32, 0.78);
  box-shadow: var(--shadow);
}

.legal-actions {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
}

.brand strong {
  color: var(--violet);
}

.legal-shortcuts {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.legal-shortcuts a {
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 10, 18, 0.76);
  color: var(--soft);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  font-weight: 700;
  font-size: 0.82rem;
  transition: border-color 0.18s ease, color 0.18s ease, background-color 0.18s ease;
}

.legal-shortcuts a:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: rgba(9, 15, 29, 0.86);
}

.legal-language {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(4, 8, 15, 0.8);
}

.legal-language a {
  min-height: 34px;
  min-width: 40px;
  padding: 0 10px;
  text-decoration: none;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid rgba(173, 204, 255, 0.18);
}

.legal-language a:last-child {
  border-right: 0;
}

.legal-language a:hover {
  color: var(--text);
}

.legal-language a.is-active {
  color: var(--text);
  background: rgba(54, 199, 255, 0.2);
}

.legal-card {
  margin-top: 16px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(13, 20, 35, 0.86), rgba(9, 14, 24, 0.9));
  box-shadow: var(--shadow);
}

h1 {
  margin: 0;
  font-size: 2rem;
}

.meta {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

h2 {
  margin: 22px 0 8px;
  font-size: 1.15rem;
}

p,
li {
  margin: 0;
  color: var(--soft);
  line-height: 1.62;
}

p + p {
  margin-top: 10px;
}

ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

.note {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(54, 199, 255, 0.35);
  border-radius: 8px;
  background: rgba(54, 199, 255, 0.08);
  color: var(--soft);
}

.legal-footer {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 13, 24, 0.78);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.legal-footer-links {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.legal-footer-links a {
  color: var(--soft);
  text-decoration: none;
  font-size: 0.8rem;
  border-bottom: 1px dashed transparent;
}

.legal-footer-links a:hover {
  color: var(--cyan);
  border-color: rgba(54, 199, 255, 0.5);
}

.legal-footer-copy {
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 640px) {
  .page-wrap {
    width: min(100% - 28px, 980px);
    padding: 18px 0 42px;
  }

  .legal-card {
    padding: 18px;
  }

  h1 {
    font-size: 1.62rem;
  }

  .legal-actions {
    margin-left: 0;
    justify-content: flex-start;
  }

  .legal-shortcuts {
    justify-content: flex-start;
  }

  .legal-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}
