/* ============================================================
   SPECTLANCE DIGITAL v3 — Legal Pages Stylesheet
   ============================================================ */

/* ── Hero ──────────────────────────────────────────── */
.legal-hero {
  background: var(--navy);
  padding: 7rem 0 4rem;
  position: relative;
  overflow: hidden;
}
.legal-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 80% 50%, rgba(198,0,36,0.1) 0%, transparent 55%),
    linear-gradient(rgba(255,255,255,0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.014) 1px, transparent 1px);
  background-size: auto, 64px 64px, 64px 64px;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255,255,255,0.45);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.75rem;
  transition: var(--ease);
  position: relative;
  z-index: 1;
}
.legal-back:hover { color: rgba(255,255,255,0.85); }

.legal-hero-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ff6b84;
  background: rgba(198,0,36,0.14);
  border: 1px solid rgba(198,0,36,0.28);
  border-radius: 100px;
  padding: 0.3rem 0.875rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.legal-hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  letter-spacing: -0.03em;
  margin-bottom: 0.875rem;
  position: relative;
  z-index: 1;
}

.legal-hero-meta {
  color: rgba(255,255,255,0.4);
  font-size: 0.875rem;
  position: relative;
  z-index: 1;
}

/* ── Layout ─────────────────────────────────────────── */
.legal-body {
  padding: 4rem 0 5rem;
  background: var(--bg-light);
}

.legal-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 4rem;
  align-items: start;
}

/* ── Sidebar TOC ────────────────────────────────────── */
.legal-toc {
  position: sticky;
  top: 5.5rem;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 1.5rem;
}

.toc-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--gray-light);
  font-weight: 700;
  margin-bottom: 0.875rem;
}

.legal-toc ol {
  list-style: none;
  counter-reset: toc;
}

.legal-toc ol li {
  counter-increment: toc;
  margin-bottom: 0.25rem;
}

.legal-toc ol li a {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--gray);
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  transition: var(--ease);
  line-height: 1.4;
}
.legal-toc ol li a::before {
  content: counter(toc);
  font-size: 0.7rem;
  color: var(--gray-light);
  font-weight: 600;
  flex-shrink: 0;
  width: 14px;
}
.legal-toc ol li a:hover {
  color: var(--red);
  background: rgba(198,0,36,0.05);
}

.toc-related {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.toc-related a {
  font-size: 0.82rem;
  color: var(--red);
  transition: var(--ease);
}
.toc-related a:hover { color: var(--red-dark); text-decoration: underline; }

/* ── Article Content ────────────────────────────────── */
.legal-content {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--r-lg);
  padding: 3rem;
}

.legal-intro {
  font-size: 1.05rem;
  color: var(--slate-mid);
  line-height: 1.8;
  padding-bottom: 2rem;
  margin-bottom: 2.5rem;
  border-bottom: 1.5px solid var(--border);
}

.legal-content section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--bg-light);
}
.legal-content section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.legal-content h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  scroll-margin-top: 6rem;
}

.legal-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate);
  margin: 1.25rem 0 0.625rem;
}

.legal-content p {
  font-size: 0.95rem;
  color: var(--slate-mid);
  line-height: 1.8;
  margin-bottom: 0.875rem;
}
.legal-content p:last-child { margin-bottom: 0; }

.legal-content ul,
.legal-content ol {
  margin: 0.5rem 0 1rem 1.25rem;
}
.legal-content ul { list-style: disc; }
.legal-content ol { list-style: decimal; }
.legal-content li {
  font-size: 0.95rem;
  color: var(--slate-mid);
  line-height: 1.75;
  margin-bottom: 0.375rem;
  padding-left: 0.25rem;
}
.legal-content a {
  color: var(--red);
  font-weight: 500;
  transition: var(--ease);
}
.legal-content a:hover { color: var(--red-dark); text-decoration: underline; }

address {
  font-style: normal;
  background: var(--bg-light);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  color: var(--slate);
  line-height: 1.8;
  margin-top: 0.5rem;
}

/* Tables */
.legal-table-wrap {
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
}
.legal-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}
.legal-table-wrap thead {
  background: var(--bg-light);
}
.legal-table-wrap th {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray);
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1.5px solid var(--border);
}
.legal-table-wrap td {
  font-size: 0.875rem;
  color: var(--slate-mid);
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  line-height: 1.6;
}
.legal-table-wrap tr:last-child td { border-bottom: none; }

/* Cross-page footer links */
.legal-footer-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1.5px solid var(--border);
}
.legal-footer-links a {
  font-size: 0.875rem;
  color: var(--gray);
  font-weight: 500;
  transition: var(--ease);
}
.legal-footer-links a:hover { color: var(--red); }

/* ── Data Deletion-specific ─────────────────────────── */
.legal-highlight-box {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  background: rgba(198,0,36,0.05);
  border: 1px solid rgba(198,0,36,0.18);
  border-radius: var(--r-md);
  padding: 1.375rem 1.5rem;
  margin-bottom: 2.5rem;
  font-size: 0.925rem;
  color: var(--slate);
  line-height: 1.7;
}
.legal-highlight-box i {
  color: var(--red);
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 2px;
}
.legal-highlight-box strong { display: block; margin-bottom: 0.25rem; color: var(--navy); }

/* Timeline */
.timeline-steps { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1rem; }
.timeline-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.timeline-dot {
  width: 36px; height: 36px;
  background: rgba(198,0,36,0.09);
  border: 1.5px solid rgba(198,0,36,0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--red);
  flex-shrink: 0;
}
.timeline-step > div:last-child strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.2rem;
}
.timeline-step p {
  margin-bottom: 0 !important;
  font-size: 0.875rem;
}

/* Deletion form */
.deletion-form-wrap {
  background: var(--bg-light);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 2rem;
  margin-top: 1.25rem;
}
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--red);
  cursor: pointer;
}
.form-check label {
  font-size: 0.875rem;
  color: var(--slate-mid);
  cursor: pointer;
  line-height: 1.6;
}
.form-alt {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--gray);
  text-align: center;
  line-height: 1.7;
}
.form-alt a { color: var(--red); font-weight: 600; }

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .legal-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .legal-toc {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }
  .legal-toc .toc-related { grid-column: span 2; }
}

@media (max-width: 640px) {
  .legal-content { padding: 1.75rem; }
  .legal-toc { grid-template-columns: 1fr; }
  .legal-toc .toc-related { grid-column: 1; }
  .legal-footer-links { flex-direction: column; gap: 0.75rem; }
  .legal-table-wrap td, .legal-table-wrap th { padding: 0.625rem 0.75rem; }
}
