/* ═══════════════════════════════════════════════════════
   FITPASSIO LEGAL — shared stylesheet for privacy / terms / delete pages.
   privacy.html and terms.html had identical style blocks; delete.html
   shares ~80% with terms but adds option-cards, not-retained-list, etc.
   The .hero::after icon differs per page: use .hero-shield (privacy/terms)
   or .hero-trash (delete) as a modifier class on .hero in the HTML.
   ═══════════════════════════════════════════════════════ */
:root {
  --primary:        #C62828;
  --primary-start:  #E53935;
  --primary-end:    #C62828;
  --bg:             #0A0A0A;
  --surface:        #121212;
  --surface-2:      #1E1E1E;
  --surface-3:      #2A2A2A;
  --text:           #FFFFFF;
  --text-muted:     rgba(255,255,255,0.65);
  --text-dim:       rgba(255,255,255,0.35);
  --border:         rgba(198,40,40,0.25);
  --border-subtle:  rgba(255,255,255,0.07);
  --border-input:   rgba(255,255,255,0.12);
  --glow:           rgba(229,57,53,0.45);
  --glow-soft:      rgba(229,57,53,0.18);
  --font:           'Noto Sans', system-ui, sans-serif;
  --grad:           linear-gradient(135deg, var(--primary-start), var(--primary-end));
  --radius-sm:      8px;
  --radius-md:      12px;
  --radius-lg:      18px;
  --radius-xl:      26px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: -2;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
}
body::after {
  content: ''; position: fixed; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 80% 50% at 75% 15%, rgba(229,57,53,0.08) 0%, transparent 60%),
              radial-gradient(ellipse 55% 55% at 15% 85%, rgba(198,40,40,0.05) 0%, transparent 55%);
  pointer-events: none;
}

.layout { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.page { flex: 1; padding: 96px 32px 72px; display: flex; justify-content: center; }
.inner { max-width: 1200px; width: 100%; display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }

/* sidebar TOC */
.toc {
  position: sticky; top: 88px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 22px;
  backdrop-filter: blur(4px);
}
.toc-title {
  font-size: 11px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--primary-start);
  margin-bottom: 20px;
}
.toc ul { list-style: none; }
.toc li { margin-bottom: 4px; }
.toc a {
  display: block; padding: 5px 10px; border-radius: var(--radius-sm);
  font-size: 13px; color: var(--text-muted); text-decoration: none;
  transition: all 0.2s; font-weight: 500;
}
.toc a:hover { background: rgba(229,57,53,0.08); color: var(--primary-start); }
.toc-divider { border: none; border-top: 1px solid var(--border-subtle); margin: 16px 0; }
.toc-terms-link,
.toc-link {
  display: block; margin-top: 20px; padding: 8px 12px;
  background: rgba(229,57,53,0.08); border: 1px solid var(--border);
  border-radius: var(--radius-md); text-align: center;
  font-size: 12px; font-weight: 700; color: var(--primary-start);
  text-decoration: none; transition: background 0.2s;
}
.toc-link { margin-top: 12px; }
.toc-terms-link:hover,
.toc-link:hover { background: rgba(229,57,53,0.2); }

/* main content */
.content { min-width: 0; }
.hero {
  /* Defensive overrides — common.css's legacy `.hero { display:flex; justify-content:space-between; background:var(--primary-gradient); color:#fff; gap:12px; flex-wrap:wrap }` leaks in otherwise. */
  display: block;
  justify-content: initial;
  align-items: initial;
  flex-wrap: initial;
  gap: 0;
  color: var(--text);
  background: linear-gradient(145deg, rgba(30,10,10,0.92), rgba(18,12,12,0.88));
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
}
.hero-shield::after,
.hero-trash::after {
  position: absolute; bottom: -20px; right: -20px;
  font-size: 140px; opacity: 0.04; pointer-events: none;
}
.hero-shield::after { content: '🛡'; }
.hero-trash::after  { content: '🗑'; }
.hero-label {
  display: inline-block; background: rgba(229,57,53,0.12);
  border: 1px solid var(--border); color: var(--primary-start);
  font-size: 11px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; padding: 5px 14px; border-radius: 100px;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  font-weight: 800; letter-spacing: -1px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent; margin-bottom: 12px;
}
.hero-meta {
  display: flex; gap: 24px; flex-wrap: wrap;
  font-size: 13px; color: var(--text-dim); margin-top: 8px;
}

.intro-box {
  background: rgba(229,57,53,0.05); border-left: 4px solid var(--primary-start);
  border-radius: 0 var(--radius-md) var(--radius-md) 0; padding: 22px 28px;
  margin-bottom: 48px; font-size: 14px; color: var(--text-muted);
}

.section { margin-bottom: 48px; scroll-margin-top: 100px; }
.section-header { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-num {
  width: 34px; height: 34px; background: var(--grad);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: white; flex-shrink: 0;
}
.section h2 {
  font-size: 26px; font-weight: 700; letter-spacing: -0.5px;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.section h3 {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin: 24px 0 12px; padding-left: 12px;
  border-left: 3px solid var(--primary-start);
}
.section p, .section li { font-size: 14px; color: var(--text-muted); margin-bottom: 12px; }
.section ul, .section ol { padding-left: 24px; margin-bottom: 16px; }
.section li::marker { color: var(--primary-start); font-weight: bold; }
.section ol li { list-style: decimal; }
.section a { color: var(--primary-start); }

/* data grid cards (terms / privacy) */
.data-grid, .rights-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0;
}
.data-card, .right-item {
  background: var(--surface-2); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md); padding: 18px; transition: all 0.2s;
}
.data-card:hover, .right-item:hover { border-color: var(--border); background: var(--surface-3); }
.data-card h5, .right-item h5 {
  font-size: 14px; font-weight: 700; color: var(--primary-start); margin-bottom: 6px;
}
.data-card p, .right-item p { font-size: 12.5px; color: var(--text-dim); margin: 0; }

/* styled tables */
.styled-table {
  width: 100%; border-collapse: collapse; margin: 20px 0;
  font-size: 13px; background: var(--surface-2); border-radius: var(--radius-md);
  overflow: hidden;
}
.styled-table th {
  background: rgba(229,57,53,0.1); text-align: left; padding: 12px 16px;
  font-weight: 700; color: var(--primary-start);
}
.styled-table td {
  padding: 11px 16px; border-bottom: 1px solid var(--border-subtle);
  color: var(--text-muted); vertical-align: top;
}
.styled-table tr:last-child td { border-bottom: none; }
.badge-required {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 100px; background: rgba(229,57,53,0.15); color: var(--primary-start);
}
.badge-optional {
  display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px;
  border-radius: 100px; background: rgba(255,255,255,0.06); color: var(--text-dim);
}

/* generic cards */
.highlight-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 20px 24px; margin: 20px 0;
}
.highlight-card h4 { color: var(--primary-start); font-size: 14px; margin-bottom: 8px; font-weight: 700; }
.warn-card {
  background: rgba(229,57,53,0.06); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 16px 20px; display: flex; gap: 12px;
  margin: 20px 0; align-items: flex-start;
}
.warn-card p { margin: 0; font-size: 13.5px; color: var(--text-muted); }
.warn-icon { font-size: 18px; flex-shrink: 0; margin-top: 2px; }

/* deletion / numbered steps */
.steps-list { list-style: none; padding: 0; margin: 16px 0; counter-reset: step; }
.steps-list li {
  counter-increment: step;
  display: flex; gap: 14px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid var(--border-subtle);
  font-size: 14px; color: var(--text-muted); margin: 0;
}
.steps-list li:last-child { border-bottom: none; }
.steps-list li::before {
  content: counter(step);
  min-width: 26px; height: 26px; background: var(--grad);
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: white; flex-shrink: 0;
}
.steps-list li .sub-note {
  margin-top: 8px; padding: 10px 14px;
  background: var(--surface-2); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); font-size: 13px;
}
.steps-list li .sub-note strong { color: var(--text); }

/* what-gets-deleted grid (terms / delete) */
.delete-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0;
}
.delete-item {
  background: var(--surface-2); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm); padding: 10px 14px;
  font-size: 13px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
}
.delete-item::before { content: '✕'; color: var(--primary-start); font-weight: 800; font-size: 12px; flex-shrink: 0; }

/* option split cards (delete only) */
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 24px 0; }
.option-card {
  background: var(--surface-2); border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg); padding: 22px; transition: all 0.2s;
}
.option-card:hover { border-color: var(--border); background: var(--surface-3); }
.option-card .option-badge {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 1px;
  text-transform: uppercase; padding: 3px 10px; border-radius: 100px;
  background: rgba(229,57,53,0.12); border: 1px solid var(--border);
  color: var(--primary-start); margin-bottom: 14px;
}
.option-card h4 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.option-card p { font-size: 13px; color: var(--text-muted); margin: 0; }

/* "what stays / not retained" list (delete only) */
.not-retained-list { list-style: none; padding: 0; margin: 16px 0; }
.not-retained-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--border-subtle);
  font-size: 14px; color: var(--text-muted); margin: 0;
}
.not-retained-list li:last-child { border-bottom: none; }
.not-retained-list li::before { content: '✓'; color: #4CAF50; font-weight: 800; font-size: 14px; flex-shrink: 0; }

/* important notes (delete only) */
.notes-list { list-style: none; padding: 0; margin: 0; }
.notes-list li {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--border-subtle);
  font-size: 14px; color: var(--text-muted); margin: 0;
}
.notes-list li:last-child { border-bottom: none; }
.notes-list .note-icon { font-size: 16px; flex-shrink: 0; margin-top: 2px; }

/* acceptance / CTA block */
.acceptance {
  background: var(--surface); border: 1px solid var(--border);
  border-top: 3px solid var(--primary-start);
  border-radius: var(--radius-xl); padding: 40px 32px; text-align: center;
  margin-top: 56px;
}
.acceptance h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.acceptance p { font-size: 14px; color: var(--text-muted); }
.btn-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.btn-primary {
  background: var(--grad); color: white; border: none;
  padding: 12px 28px; border-radius: var(--radius-md);
  font-weight: 700; font-size: 14px; cursor: pointer; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s; display: inline-block;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px var(--glow); }
.btn-secondary {
  background: var(--surface-2); border: 1px solid var(--border);
  color: var(--text-muted); padding: 12px 28px; text-decoration: none;
  border-radius: var(--radius-md); font-weight: 600; display: inline-block;
  transition: background 0.2s;
}
.btn-secondary:hover { background: var(--surface-3); color: white; }

footer {
  border-top: 1px solid var(--border-subtle);
  padding: 32px 24px; text-align: center;
  font-size: 12px; color: var(--text-dim);
}
footer a { color: var(--primary-start); text-decoration: none; }
footer a:hover { text-decoration: underline; }

@media (max-width: 840px) {
  .inner { grid-template-columns: 1fr; }
  .toc { position: static; margin-bottom: 24px; }
  .page { padding: 80px 20px 48px; }
  .data-grid, .rights-grid, .delete-grid, .option-grid { grid-template-columns: 1fr; }
}

/* ── Inline-style replacements (Phase B sweep) ───────────────── */
/* Used on <strong> tags within legal copy to bring text to full white. */
.text-bright          { color: var(--text); }
/* Used on emphasised intro lines in red. */
.text-accent          { color: var(--primary-start); }
/* Used inside h1 to keep the second word pure white instead of the gradient. */
.text-white-literal   { color: #fff; }
/* Spacing helpers used inside warn-card and step sub-notes. */
.mt-8  { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
