/* 420 Plugins — Legal pages (full-width, centered panels) */

/* =========================
   Design Tokens
========================= */
:root {
  --ra-bg: #0b0b12;
  --ra-panel: #0f0f18;
  --ra-border: rgba(255,255,255,0.12);
  --ra-text: #e9ebff;
  --ra-text-dim: #c5c9ea;
  --ra-link: #b8c2ff;
  --ra-link-hover: #e4e8ff;

  --ra-grad: linear-gradient(90deg,#6f61ff 0%,#8a5cff 28%,#31d0ff 72%,#6f61ff 100%);
  --ra-card-shadow: 0 14px 38px rgba(0,0,0,.40);
  --ra-radius: 14px;
}

/* =========================
   Page Container
========================= */
body { background: var(--ra-bg); }

.legal {
  display: block;
  margin: 32px 0 88px;
}

.legal .legal-hero,
.legal .legal-section {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* =========================
   Hero (T&C card)
========================= */
.legal .legal-hero {
  position: relative;
  background: linear-gradient(180deg, #101020 0%, #0f0f18 60%);
  border: 1px solid var(--ra-border);
  border-radius: var(--ra-radius);
  padding: 26px 26px 22px;
  box-shadow: var(--ra-card-shadow);
  isolation: isolate;
  overflow: hidden; /* ensure colored bar respects rounded corners */
}

/* Thin colored top bar (same rule as sections) */
.legal .legal-hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--ra-grad);
  pointer-events: none;
}

.legal .legal-hero h1 {
  margin: 0 0 6px 0;
  font-size: 30px;
  line-height: 1.2;
  color: #fff;
  letter-spacing: .15px;
  text-align: center;
}

.legal .legal-updated {
  margin: 0 0 12px 0;
  font: 600 12px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  letter-spacing: .04em;
  color: #a9aed6;
  text-transform: uppercase;
  text-align: center;
}

.legal .legal-summary {
  margin: 12px 0 16px 0;
  color: var(--ra-text);
  text-align: center;
}

.legal .legal-address {
  margin: 10px 0 0 0;
  font-style: normal;
  color: var(--ra-text-dim);
  text-align: center;
}

/* Keep vertical space where the divider used to be */
.legal .legal-hero + .legal-section {
  margin-top: 56px;
}

/* =========================
   Cards (sections)
========================= */
.legal .legal-section {
  position: relative;
  background: var(--ra-panel);
  border: 1px solid var(--ra-border);
  border-radius: var(--ra-radius);
  padding: 20px 22px;
  margin: 0 0 16px 0;
  box-shadow: var(--ra-card-shadow);
  scroll-margin-top: 110px;
  overflow: hidden; /* ensures the accent bar respects rounded corners */
}

/* Top accent bar inside the rounded corners */
.legal .legal-section::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--ra-grad);
  pointer-events: none;
}

/* Headings */
.legal .legal-section h2 {
  margin: 8px 0 12px 0;
  font-size: 21px;
  line-height: 1.25;
  color: #ffffff;
  display: grid;
  grid-auto-flow: column;
  justify-content: start;
  align-items: center;
  column-gap: 10px;
}

/* Small branded dot before headings for rhythm */
.legal .legal-section h2::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #31d0ff, #6f61ff);
  box-shadow: 0 0 0 3px rgba(111,97,255,.18);
  display: inline-block;
}

.legal .legal-section p {
  color: var(--ra-text);
  margin: 0 0 10px 0;
}

/* Lists */
.legal .legal-section ul {
  margin: 8px 0 0 20px;
  padding: 0;
  color: var(--ra-text);
}

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

/* Changelog */
.legal .legal-changelog {
  margin: 6px 0 0 20px;
  color: var(--ra-text-dim);
}

/* =========================
   Links
========================= */
.legal a {
  color: var(--ra-link);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal a:hover { color: var(--ra-link-hover); }

/* =========================
   Readability Tweaks
========================= */
.legal .legal-section strong { color: #fff; }
.legal .legal-section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .925em;
  background: rgba(255,255,255,.04);
  padding: .08em .35em;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.06);
}

/* Roomier last card from the footer */
.legal .legal-section:last-of-type { margin-bottom: 24px; }

/* =========================
   Responsive
========================= */
@media (max-width: 860px) {
  /* spacing already fluid; nothing extra needed */
}

/* =========================
   Print
========================= */
@media print {
  :root { --ra-border: #ddd; }
  body { background: #fff; color: #000; }
  .legal .legal-hero,
  .legal .legal-section {
    background: #fff !important;
    border: 1px solid #ddd !important;
    box-shadow: none !important;
    width: 100%;
    margin: 0 0 16px 0;
  }
  .legal .legal-hero::before,
  .legal .legal-section::after { display: none !important; }
  a { color: #000 !important; text-decoration: underline; }
}

/* --- Privacy: simple key-value grid for processors --- */
.legal .kv {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 8px 14px;
  margin-top: 10px;
}
.legal .kv > div {
  padding: 6px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.12);
}
.legal .kv > div:nth-last-child(-n+2) {
  border-bottom: 0; /* remove bottom rule on last row */
}

/* --- Small pill badge for lawful bases --- */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font: 600 12px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color: #091029;
  background: #b8c2ff;
  vertical-align: baseline;
}
