* {
  box-sizing: border-box;
}

:root {
  --legal-bg: #05070f;
  --legal-panel: rgba(13, 16, 31, 0.92);
  --legal-panel-soft: rgba(255, 255, 255, 0.055);
  --legal-border: rgba(255, 255, 255, 0.12);
  --legal-text: #f8fafc;
  --legal-muted: rgba(248, 250, 252, 0.68);
  --legal-soft: rgba(248, 250, 252, 0.48);
  --legal-lime: #a8ff00;
  --legal-cyan: #5ad7ff;
  --legal-purple: #7147ff;
}

html {
  min-height: 100%;
  background: var(--legal-bg);
}

body.legal-body {
  margin: 0;
  min-height: 100vh;
  color: var(--legal-text);
  font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(168, 255, 0, 0.16), transparent 24%),
    radial-gradient(circle at 82% 0%, rgba(90, 215, 255, 0.16), transparent 26%),
    radial-gradient(circle at 85% 80%, rgba(113, 71, 255, 0.24), transparent 32%),
    linear-gradient(145deg, #05070f 0%, #090d1f 48%, #05070f 100%);
  background-attachment: fixed;
}

a {
  color: inherit;
}

.legal-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 30px 0 44px;
}

.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 26px;
}

.legal-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}

.legal-brand img {
  width: auto;
  height: 42px;
  display: block;
}

.legal-brand span {
  color: var(--legal-muted);
  font-size: 0.88rem;
  font-weight: 600;
}

.legal-actions,
.legal-footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.legal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--legal-border);
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.legal-btn:hover,
.legal-toc a:hover {
  transform: translateY(-1px);
}

.legal-btn-primary {
  color: #071006;
  background: var(--legal-lime);
  border-color: rgba(168, 255, 0, 0.75);
}

.legal-btn-primary:hover {
  color: #071006;
  background: #c6ff45;
}

.legal-btn-ghost {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.legal-btn-ghost:hover {
  color: #fff;
  border-color: rgba(168, 255, 0, 0.42);
  background: rgba(168, 255, 0, 0.08);
}

.legal-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(26px, 5vw, 52px);
  border: 1px solid var(--legal-border);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.035)),
    rgba(9, 12, 28, 0.82);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34);
}

.legal-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(168, 255, 0, 0.16), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(90, 215, 255, 0.14), transparent 30%);
  pointer-events: none;
}

.legal-hero > * {
  position: relative;
  z-index: 1;
}

.legal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 7px 11px;
  border: 1px solid rgba(168, 255, 0, 0.22);
  border-radius: 999px;
  color: var(--legal-lime);
  background: rgba(168, 255, 0, 0.08);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.legal-title {
  max-width: 820px;
  margin: 0;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.05;
  font-weight: 800;
}

.legal-lead {
  max-width: 860px;
  margin: 18px 0 0;
  color: rgba(248, 250, 252, 0.76);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.72;
}

.legal-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.legal-meta-card {
  min-height: 104px;
  padding: 16px;
  border: 1px solid var(--legal-border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
}

.legal-meta-card small {
  display: block;
  margin-bottom: 8px;
  color: var(--legal-soft);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.legal-meta-card strong,
.legal-meta-card a {
  color: #fff;
  font-size: 0.94rem;
  line-height: 1.45;
  word-break: break-word;
}

.legal-meta-card a {
  color: var(--legal-lime);
  text-decoration: none;
}

.legal-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 22px;
  margin-top: 22px;
  align-items: start;
}

.legal-layout-single {
  grid-template-columns: minmax(0, 820px);
  justify-content: center;
}

.legal-request-steps {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.legal-request-step {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
}

.legal-request-step span {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  color: #071006;
  background: var(--legal-lime);
  font-weight: 800;
}

.legal-request-step strong {
  display: block;
  margin-bottom: 4px;
}

.legal-request-step p {
  margin: 0;
}

.legal-toc {
  position: sticky;
  top: 18px;
  padding: 16px;
  border: 1px solid var(--legal-border);
  border-radius: 8px;
  background: rgba(8, 10, 21, 0.74);
  backdrop-filter: blur(14px);
}

.legal-toc-title {
  margin: 0 0 12px;
  color: #fff;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.legal-toc nav {
  display: grid;
  gap: 6px;
}

.legal-toc a {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--legal-muted);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.legal-toc a:hover {
  color: var(--legal-lime);
  background: rgba(168, 255, 0, 0.08);
}

.legal-document {
  padding: clamp(22px, 4vw, 42px);
  border: 1px solid var(--legal-border);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.072), rgba(255, 255, 255, 0.035)),
    rgba(7, 9, 20, 0.9);
  box-shadow: 0 20px 55px rgba(0, 0, 0, 0.24);
}

.legal-section {
  padding-top: 24px;
  margin-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.legal-section:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: 0;
}

.legal-section h2 {
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(1.15rem, 2vw, 1.5rem);
  line-height: 1.35;
  font-weight: 800;
}

.legal-section p,
.legal-section li {
  color: rgba(248, 250, 252, 0.76);
  font-size: 0.98rem;
  line-height: 1.78;
}

.legal-section p {
  margin: 0 0 14px;
}

.legal-section p:last-child,
.legal-section ul:last-child {
  margin-bottom: 0;
}

.legal-section ul {
  margin: 0 0 14px;
  padding-left: 1.2rem;
}

.legal-section li + li {
  margin-top: 7px;
}

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

.legal-section strong {
  color: #fff;
}

.legal-callout {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(168, 255, 0, 0.18);
  border-radius: 8px;
  color: rgba(248, 250, 252, 0.82);
  background: rgba(168, 255, 0, 0.07);
}

.legal-callout a {
  color: var(--legal-lime);
  font-weight: 800;
  text-decoration: none;
}

.legal-footer-actions {
  justify-content: flex-end;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 980px) {
  .legal-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .legal-layout {
    grid-template-columns: 1fr;
  }

  .legal-toc {
    position: static;
  }

  .legal-toc nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .legal-shell {
    width: min(100% - 20px, 1120px);
    padding: 18px 0 28px;
  }

  .legal-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .legal-actions,
  .legal-footer-actions {
    width: 100%;
  }

  .legal-actions .legal-btn,
  .legal-footer-actions .legal-btn {
    flex: 1 1 auto;
  }

  .legal-brand img {
    height: 36px;
  }

  .legal-hero,
  .legal-document {
    padding: 20px;
  }

  .legal-meta-grid,
  .legal-toc nav {
    grid-template-columns: 1fr;
  }

  .legal-meta-card {
    min-height: auto;
  }
}

@media print {
  body.legal-body {
    color: #111827;
    background: #fff;
  }

  .legal-topbar,
  .legal-toc,
  .legal-footer-actions {
    display: none;
  }

  .legal-shell {
    width: 100%;
    padding: 0;
  }

  .legal-hero,
  .legal-document,
  .legal-meta-card {
    color: #111827;
    border-color: #d1d5db;
    background: #fff;
    box-shadow: none;
  }

  .legal-section p,
  .legal-section li,
  .legal-lead {
    color: #374151;
  }
}
