:root {
  color-scheme: dark;
  --bg: #07030c;
  --panel: rgba(22, 10, 34, 0.88);
  --panel-strong: rgba(31, 12, 47, 0.96);
  --line: rgba(220, 137, 255, 0.2);
  --text: #fbf7ff;
  --muted: #b5a4c1;
  --dim: #897693;
  --violet: #c94cff;
  --pink: #ff4bd8;
  --blue: #7f7bff;
  --cyan: #78eaff;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% -5%, rgba(204, 70, 255, 0.28), transparent 26rem),
    radial-gradient(circle at 93% 12%, rgba(255, 50, 204, 0.2), transparent 30rem),
    radial-gradient(circle at 54% 104%, rgba(87, 79, 255, 0.2), transparent 34rem),
    var(--bg);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

a { color: #e1a4ff; }
a:hover { color: #ffd2f6; }

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

.legal-header {
  position: sticky;
  z-index: 10;
  top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 12px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(11, 5, 18, 0.82);
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.34), inset 0 1px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(18px);
}

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

.legal-brand-mark {
  position: relative;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(242, 185, 255, 0.45);
  border-radius: 13px;
  background: linear-gradient(145deg, #f54bdf, #793aff 64%, #60d9ff);
  box-shadow: 0 0 24px rgba(208, 76, 255, 0.5);
}

.legal-brand-mark::before,
.legal-brand-mark::after {
  position: absolute;
  top: 10px;
  width: 4px;
  border-radius: 999px;
  background: #fff;
  content: "";
}
.legal-brand-mark::before { left: 12px; height: 18px; }
.legal-brand-mark::after { left: 23px; height: 12px; top: 13px; }

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

.legal-header nav a {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}
.legal-header nav a[aria-current="page"],
.legal-header nav a:hover { color: #fff; text-shadow: 0 0 15px rgba(220, 96, 255, 0.72); }

.legal-hero {
  position: relative;
  overflow: hidden;
  margin-top: 22px;
  padding: clamp(34px, 6vw, 72px);
  border: 1px solid rgba(230, 152, 255, 0.22);
  border-radius: 34px;
  background:
    radial-gradient(circle at 84% 14%, rgba(255, 59, 218, 0.4), transparent 19rem),
    radial-gradient(circle at 8% 120%, rgba(112, 65, 255, 0.5), transparent 29rem),
    linear-gradient(135deg, rgba(52, 16, 75, 0.94), rgba(15, 7, 25, 0.98) 58%);
  box-shadow: 0 0 85px rgba(182, 52, 238, 0.22), inset 0 1px rgba(255, 255, 255, 0.08);
}

.legal-kicker {
  display: inline-flex;
  padding: 7px 11px;
  border: 1px solid rgba(238, 173, 255, 0.3);
  border-radius: 999px;
  color: #efb8ff;
  background: rgba(211, 78, 255, 0.1);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.legal-hero h1 {
  max-width: 820px;
  margin: 22px 0 16px;
  font-size: clamp(38px, 7vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.legal-hero p {
  max-width: 760px;
  margin: 0;
  color: #cbbbd5;
  font-size: clamp(15px, 2vw, 19px);
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 26px;
  color: #9e8aaa;
  font-size: 12px;
}

.legal-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 24px;
  margin-top: 24px;
}

.legal-toc {
  position: sticky;
  top: 104px;
  align-self: start;
  display: grid;
  gap: 5px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(16, 7, 25, 0.78);
}

.legal-toc strong {
  margin-bottom: 5px;
  color: #fff;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.legal-toc a {
  padding: 7px 9px;
  border-radius: 9px;
  color: #9c8aa8;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.legal-toc a:hover { color: #fff; background: rgba(206, 77, 255, 0.1); }

.legal-content { display: grid; gap: 16px; }

.legal-card {
  scroll-margin-top: 110px;
  padding: clamp(24px, 4vw, 42px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(28, 12, 42, 0.9), rgba(13, 7, 21, 0.93));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.045);
}

.legal-card h2 {
  margin: 0 0 18px;
  color: #fff;
  font-size: clamp(24px, 3.2vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.legal-card h3 {
  margin: 28px 0 10px;
  color: #efc1ff;
  font-size: 17px;
}

.legal-card p,
.legal-card li { color: #b9a9c3; }
.legal-card p { margin: 0 0 14px; }
.legal-card p:last-child { margin-bottom: 0; }
.legal-card ul,
.legal-card ol { margin: 12px 0 16px; padding-left: 22px; }
.legal-card li + li { margin-top: 7px; }
.legal-card strong { color: #f5eaff; }

.legal-note {
  margin-top: 18px !important;
  padding-left: 15px;
  border-left: 3px solid var(--pink);
  color: #ddc7e8 !important;
}

.legal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.legal-detail {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(220, 137, 255, 0.16);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.025);
}
.legal-detail span { display: block; margin-bottom: 4px; color: var(--dim); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.legal-detail strong { overflow-wrap: anywhere; font-size: 16px; }

.legal-table { width: 100%; border-collapse: collapse; }
.legal-table th,
.legal-table td { padding: 14px 12px; border-bottom: 1px solid rgba(220, 137, 255, 0.14); vertical-align: top; text-align: left; }
.legal-table th { width: 34%; color: #9d88a8; font-size: 12px; }
.legal-table td { color: #eee2f4; }

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 24px;
  padding: 24px 4px 0;
  color: #7e6b88;
  font-size: 11px;
}
.legal-footer a { font-weight: 800; text-decoration: none; }

@media (max-width: 820px) {
  .legal-layout { grid-template-columns: 1fr; }
  .legal-toc { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legal-toc strong { grid-column: 1 / -1; }
}

@media (max-width: 620px) {
  .legal-shell { width: min(100% - 20px, var(--max)); padding-top: 10px; }
  .legal-header { top: 6px; align-items: flex-start; flex-direction: column; gap: 8px; border-radius: 16px; }
  .legal-header nav { justify-content: flex-start; }
  .legal-hero { padding: 34px 22px; border-radius: 24px; }
  .legal-meta { display: grid; }
  .legal-toc { grid-template-columns: 1fr; }
  .legal-grid { grid-template-columns: 1fr; }
  .legal-card { padding: 24px 20px; border-radius: 20px; }
  .legal-table,
  .legal-table tbody,
  .legal-table tr,
  .legal-table th,
  .legal-table td { display: block; width: 100%; }
  .legal-table th { padding-bottom: 2px; border-bottom: 0; }
  .legal-table td { padding-top: 2px; }
  .legal-footer { align-items: flex-start; flex-direction: column; }
}
