/* ===== NAV (solid — always visible on legal pages) ===== */
nav {
  background: rgba(247, 245, 255, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

/* ===== PAGE HERO ===== */
.legal-hero {
  padding: 9rem 6% 3rem;
  position: relative;
  overflow: hidden;
}

.legal-hero .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: 0;
  pointer-events: none;
}
.legal-hero .blob-1 {
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(79,142,247,0.24), transparent);
  top: -110px; left: -120px;
}
.legal-hero .blob-2 {
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(192,132,252,0.20), transparent);
  top: -40px; right: -90px;
}

.legal-hero-content {
  position: relative;
  z-index: 1;
  max-width: 780px;
  margin: 0 auto;
}

.legal-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1.12;
  margin-bottom: 1rem;
}

.legal-hero .gradient-text {
  background: linear-gradient(135deg, var(--blue), var(--violet), var(--pink));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.legal-hero p {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.7;
  max-width: 620px;
}

.legal-updated {
  display: inline-block;
  margin-top: 1.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 50px;
  background: white;
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
}

/* ===== LAYOUT ===== */
.legal-body {
  padding: 1rem 6% 5rem;
}

.legal-inner {
  max-width: 780px;
  margin: 0 auto;
}

/* ===== TABLE OF CONTENTS ===== */
/* phenomenal_base.css styles the bare `nav` selector as the fixed top bar, so an
   in-page <nav> has to opt out of every property that rule sets. */
.legal-toc {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  z-index: auto;
  display: block;
  background: white;
  backdrop-filter: none;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.6rem 1.8rem;
  margin-bottom: 3rem;
}

.legal-toc h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  font-weight: 700;
  color: var(--violet);
  margin-bottom: 1rem;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1.6rem;
}

.legal-toc li {
  counter-increment: toc;
  font-size: 0.92rem;
  line-height: 1.45;
}

.legal-toc li::before {
  content: counter(toc) ".";
  color: var(--violet);
  font-weight: 700;
  margin-right: 0.45rem;
}

.legal-toc a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.legal-toc a:hover { opacity: 1; text-decoration: underline; }

/* ===== SECTIONS ===== */
.legal-section {
  margin-bottom: 3rem;
  scroll-margin-top: 110px;
}

.legal-section > h2 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.25;
  margin-bottom: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--border);
}

.legal-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.8rem 0 0.6rem;
}

.legal-section p {
  color: #3F3B6B;
  font-size: 0.98rem;
  line-height: 1.75;
  margin-bottom: 1rem;
}

.legal-section ul,
.legal-section ol.legal-list {
  margin: 0 0 1.2rem 0;
  padding-left: 1.3rem;
}

.legal-section li {
  color: #3F3B6B;
  font-size: 0.98rem;
  line-height: 1.7;
  margin-bottom: 0.45rem;
}

.legal-section a {
  color: var(--violet);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal-section a:hover { color: var(--blue); }

.legal-section strong { color: var(--text); }

/* ===== DATA CARD (definition-style blocks) ===== */
.legal-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.5rem 1.7rem;
  margin-bottom: 1.4rem;
}

.legal-card h3 {
  margin-top: 0;
}

.legal-card dl {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 0.6rem 1.4rem;
}

.legal-card dt {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--violet);
  padding-top: 0.15rem;
}

.legal-card dd {
  font-size: 0.95rem;
  line-height: 1.65;
  color: #3F3B6B;
}

.legal-card dd ul {
  margin: 0.3rem 0 0;
  padding-left: 1.1rem;
}
.legal-card dd li { font-size: 0.95rem; margin-bottom: 0.25rem; }

/* ===== TABLES ===== */
.legal-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: white;
  margin-bottom: 1.6rem;
  -webkit-overflow-scrolling: touch;
}

.legal-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal-table caption {
  caption-side: top;
  text-align: left;
  padding: 1.1rem 1.3rem 0;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--violet);
}

.legal-table th,
.legal-table td {
  text-align: left;
  padding: 0.85rem 1.3rem;
  vertical-align: top;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}

.legal-table thead th {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
}

.legal-table tbody th {
  font-weight: 700;
  color: var(--text);
  width: 1%;
  white-space: nowrap;
}

.legal-table tbody td { color: #3F3B6B; }

.legal-table tbody tr:last-child th,
.legal-table tbody tr:last-child td { border-bottom: none; }

/* ===== COOKIE CATEGORY BADGES ===== */
.cookie-cat {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
.cookie-cat-necessary  { background: rgba(79,142,247,0.12);  color: #2C5FBF; }
.cookie-cat-analytics  { background: rgba(155,110,243,0.14); color: #6B3FC9; }
.cookie-cat-marketing  { background: rgba(192,132,252,0.16); color: #8B3FBF; }
.cookie-cat-functional { background: rgba(107,114,128,0.14); color: #4B5563; }

/* ===== CONSENT ACTION BLOCK ===== */
.legal-actions {
  background: linear-gradient(135deg, rgba(79,142,247,0.08), rgba(192,132,252,0.10));
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.8rem;
  margin-bottom: 3rem;
  text-align: center;
}

.legal-actions p {
  margin-bottom: 1.2rem;
  color: #3F3B6B;
}

.legal-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--blue), var(--violet));
  color: white;
  border: none;
  padding: 0.75rem 1.6rem;
  border-radius: 50px;
  font-size: 0.92rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}
.legal-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(155,110,243,0.28);
}

/* ===== CONTACT CARD ===== */
.legal-contact {
  background: var(--text);
  color: rgba(255,255,255,0.75);
  border-radius: 24px;
  padding: 2.2rem 2rem;
  text-align: center;
}

.legal-contact h2 {
  color: white;
  font-size: 1.35rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
  border: none;
  padding: 0;
}

.legal-contact p {
  color: rgba(255,255,255,0.7);
  max-width: 480px;
  margin: 0 auto 1.3rem;
}

.legal-contact a { color: #A5C8FF; }

/* ===== RESPONSIVE ===== */
@media (max-width: 720px) {
  .legal-hero { padding: 7.5rem 6% 2rem; }
  .legal-toc ol { grid-template-columns: 1fr; }
  .legal-card dl { grid-template-columns: 1fr; gap: 0.2rem; }
  .legal-card dt { margin-top: 0.8rem; }
  .legal-card dl > dt:first-child { margin-top: 0; }
}
