/* =============== Tracify – Legal Pages Theme (SCOPED) =============== */
:root{
  --leg-bg1:#0b1220;       /* dark slate */
  --leg-bg2:#0f172a;
  --leg-accent:#086ad8;    /* brand blue */
  --leg-accent-2:#22d3ee;  /* cyan for gradients */
  --leg-text:#e5e7eb;
  --leg-muted:#94a3b8;
  --leg-ink:#1f2937;       /* body text on light cards */
}

/* ---------- HERO ---------- */
.legal-hero{
  position:relative; z-index:0; /* keep header above */
  color:var(--leg-text);
  background:
    radial-gradient(900px 600px at 10% -10%, rgba(34,211,238,.12), transparent 60%),
    radial-gradient(700px 500px at 90% 0%, rgba(8,106,216,.10), transparent 60%),
    linear-gradient(180deg, var(--leg-bg1), var(--leg-bg2));
  padding:64px 0;
  overflow:hidden;
}
.legal-hero .eyebrow{
  letter-spacing:.08em;text-transform:uppercase;color:var(--leg-muted);font-size:12px
}
.legal-hero h1{font-weight:800;margin:.25rem 0 .5rem}
.legal-hero .lead{opacity:.9;max-width:760px}
.legal-hero .badges{display:flex;gap:10px;flex-wrap:wrap;margin-top:14px}
.legal-hero .badge{
  display:inline-flex;align-items:center;gap:8px;font-size:12px;
  background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.12);
  border-radius:999px;padding:6px 10px
}
/* subtle grid overlay */
.legal-hero::before{
  content:"";position:absolute;inset:0;pointer-events:none;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size:48px 48px,48px 48px;
  mask-image:linear-gradient(to bottom, rgba(0,0,0,.6), rgba(0,0,0,0));
}

/* ---------- LAYOUT ---------- */
.legal-wrap{ padding:40px 0 80px }
.legal-toc{
  position:sticky; top:96px; /* adjust if your header is taller/shorter */
  background:#ffffff; border:1px solid #e5e7eb; border-radius:12px; padding:16px;
}
.legal-toc h6{font-weight:700;margin:0 0 8px;color:#111827}
.legal-toc ul{list-style:none;margin:0;padding:0}
.legal-toc li{margin:6px 0}
.legal-toc a{
  display:block;padding:6px 8px;border-radius:8px;color:#334155;text-decoration:none
}
.legal-toc a:hover{background:#f3f4f6}
.legal-toc a.active{
  background:linear-gradient(90deg,#eef6ff,#ffffff);
  border-left:3px solid var(--leg-accent);padding-left:5px;color:#0b3a76
}

/* mobile TOC toggle (nav-safe: uses .toc-is-open, not .open) */
.toc-toggle{display:none}
@media (max-width: 991.98px){
  .legal-toc{display:none}
  .toc-toggle{
    display:flex;justify-content:space-between;align-items:center;
    border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;margin-bottom:14px;background:#fff
  }
  .toc-toggle.toc-is-open + .legal-toc{display:block;margin-top:-8px}
}

/* ---------- CONTENT ---------- */
.legal-card{
  background:#fff;border:1px solid #e5e7eb;border-radius:14px;
  padding:20px;margin-bottom:14px;box-shadow:0 10px 24px rgba(2,8,23,.04)
}
.legal-card h3{font-size:20px;font-weight:800;margin-bottom:6px}
.legal-card p,.legal-card li{color:var(--leg-ink);line-height:1.7}
.legal-muted{color:#6b7280;font-size:14px}
.legal-list{padding-left:18px}
.callout{background:#f3f4f6;border-left:4px solid var(--leg-accent);padding:12px 14px;border-radius:6px}

/* anchor offset (sticky header safe) — SCOPE TO LEGAL ONLY */
.legal-section{scroll-margin-top:100px}
.legal-section:target::before{content:"";display:block;height:90px;margin-top:-90px}

/* buttons (legal pages only) */
.legal-btn{border-radius:999px;padding:10px 16px;font-weight:600;border:1px solid transparent}
.legal-btn--primary{background-image:linear-gradient(90deg,var(--leg-accent),var(--leg-accent-2));color:#04121c}
.legal-btn--ghost{background:#fff;border-color:#e5e7eb}

/* cookie toggles */
.pref-card{border:1px solid #e5e7eb;border-radius:12px;padding:18px;background:#fff}
.switch{position:relative;display:inline-block;width:42px;height:24px;vertical-align:middle}
.switch input{display:none}
.slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#d1d5db;transition:.2s;border-radius:999px}
.slider:before{position:absolute;content:"";height:18px;width:18px;left:3px;bottom:3px;background:white;transition:.2s;border-radius:50%}
input:checked + .slider{background:var(--leg-accent)}
input:checked + .slider:before{transform:translateX(18px)}

.cookie-table{width:100%;border-collapse:collapse}
.cookie-table th,.cookie-table td{border-bottom:1px solid #e5e7eb;padding:8px 6px;vertical-align:top}
.cookie-table th{white-space:nowrap}
