/* Shared styles for the legal pages: privacy-policy.html, terms.html, data-deletion.html.
   Extracted from privacy-policy.html so three documents cannot drift apart visually. */

/* ── Design Tokens (shared with landing) ── */
:root {
  --bg-primary:    #050a15;
  --bg-secondary:  #0a1225;
  --bg-card:       rgba(14, 22, 45, 0.7);

  --accent-blue:   #3b82f6;
  --accent-blue-2: #60a5fa;
  --accent-purple: #8b5cf6;
  --accent-green:  #10b981;
  --accent-amber:  #f59e0b;

  --text-primary:   #f0f4ff;
  --text-secondary: #8899bb;
  --text-muted:     #4a5880;

  --border:      rgba(59, 130, 246, 0.15);
  --border-soft: rgba(59, 130, 246, 0.08);

  --gradient-hero: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  --font-primary: 'Inter', system-ui, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--accent-blue-2); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--text-primary); text-decoration: underline; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: rgba(59,130,246,0.3); border-radius: 99px; }

/* ── Layout ── */
.container { max-width: 820px; margin: 0 auto; padding: 0 24px; }

/* ── Background ── */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 70% 50% at 80% 10%, rgba(59,130,246,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 50% 60% at 0% 90%, rgba(139,92,246,0.08) 0%, transparent 60%),
    var(--bg-primary);
}
.page-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(59,130,246,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}

/* ── Header ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(5, 10, 21, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }
.logo-icon {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.logo-accent { color: var(--accent-blue); }
.nav-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  transition: var(--transition);
  text-decoration: none;
}
.nav-back:hover {
  color: var(--text-primary);
  border-color: rgba(59,130,246,0.35);
  background: rgba(59,130,246,0.06);
  text-decoration: none;
}

/* ── Hero Banner ── */
.doc-hero {
  padding: 72px 0 56px;
  text-align: center;
}
.doc-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-blue);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.2);
  padding: 5px 14px;
  border-radius: 99px;
  margin-bottom: 20px;
}
.doc-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.gradient-text {
  background: var(--gradient-hero);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.doc-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.doc-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.doc-meta-item svg { color: var(--accent-blue); flex-shrink: 0; }

/* ── TOC ── */
.toc-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  margin-bottom: 48px;
  position: relative;
  overflow: hidden;
}
.toc-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-blue), var(--accent-purple));
}
.toc-title {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.toc-list {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 24px;
}
.toc-list li a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 5px 0;
  text-decoration: none;
  transition: var(--transition);
}
.toc-list li a:hover { color: var(--accent-blue-2); text-decoration: none; }
.toc-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  background: rgba(59,130,246,0.1);
  border-radius: 5px;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent-blue);
  flex-shrink: 0;
}

/* ── Content ── */
.doc-content { padding-bottom: 100px; }

.doc-section {
  margin-bottom: 40px;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.doc-section.visible { opacity: 1; transform: translateY(0); }

.section-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
}
.section-card:hover {
  border-color: var(--border);
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-soft);
}
.section-icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  font-size: 1.2rem;
}
.section-heading h2 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  scroll-margin-top: 90px;
}

.section-card p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}
.section-card p:last-child { margin-bottom: 0; }
.section-card strong { color: var(--text-primary); font-weight: 600; }

/* ── Lists ── */
.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0;
}
.info-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9375rem;
  color: var(--text-secondary);
  padding: 8px 12px;
  background: rgba(255,255,255,0.025);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}
.info-list li::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent-blue);
  border-radius: 50%;
  margin-top: 8px;
  flex-shrink: 0;
}
.info-list li a { font-size: inherit; }

/* ── SDK Tags ── */
.sdk-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0;
}
.sdk-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--accent-blue-2);
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.18);
  padding: 5px 12px;
  border-radius: 99px;
  text-decoration: none;
  transition: var(--transition);
}
.sdk-tag:hover {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.35);
  color: var(--text-primary);
  text-decoration: none;
}
.sdk-tag svg { flex-shrink: 0; }

/* ── Highlight Box ── */
.highlight-box {
  display: flex;
  gap: 14px;
  background: rgba(16,185,129,0.06);
  border: 1px solid rgba(16,185,129,0.2);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin: 18px 0;
}
.highlight-box.amber {
  background: rgba(245,158,11,0.06);
  border-color: rgba(245,158,11,0.2);
}
.highlight-box.blue {
  background: rgba(59,130,246,0.06);
  border-color: rgba(59,130,246,0.18);
}
.highlight-icon { font-size: 1.2rem; flex-shrink: 0; margin-top: 2px; }
.highlight-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}
.highlight-text strong { color: var(--text-primary); }

/* ── Contact Card ── */
.contact-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(59,130,246,0.08), rgba(139,92,246,0.06));
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-top: 16px;
}
.contact-avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.contact-details { flex: 1; }
.contact-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--accent-blue-2);
}

/* ── Consent Banner ── */
.consent-banner {
  background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.08));
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  text-align: center;
  margin-top: 48px;
}
.consent-banner p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}
.consent-banner strong { color: var(--text-primary); }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  background: rgba(5,10,21,0.8);
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.footer-copy { font-size: 0.875rem; color: var(--text-muted); }
.footer-link {
  font-size: 0.875rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.footer-link:hover { color: var(--accent-blue); text-decoration: none; }

/* ── Responsive ── */
@media (max-width: 640px) {
  .toc-list { grid-template-columns: 1fr; }
  .section-card { padding: 22px 18px; }
  .toc-card { padding: 20px; }
  .contact-card { flex-direction: column; text-align: center; }
  .footer-inner { flex-direction: column; text-align: center; }
  .doc-hero { padding: 48px 0 36px; }
}

/* ── Additions for terms.html and data-deletion.html ── */

.highlight-box.rose {
  background: rgba(244,63,94,0.06);
  border-color: rgba(244,63,94,0.22);
}

/* A table is the only honest way to show "what we store / why / how long" —
   prose hides the retention column, which is the one people look for. */
.data-table-wrap { overflow-x: auto; margin: 18px 0; }
.data-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.data-table th {
  text-align: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table td strong { color: var(--text-primary); font-weight: 600; }

/* Numbered clauses. Terms need referenceable paragraphs — "clause 6.2" has to
   mean something when a takedown notice cites it. */
.clause-list { list-style: none; counter-reset: clause; margin: 12px 0; }
.clause-list > li {
  counter-increment: clause;
  position: relative;
  padding-left: 34px;
  margin-bottom: 12px;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}
.clause-list > li::before {
  content: counter(clause);
  position: absolute;
  left: 0; top: 1px;
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(59,130,246,0.12);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-blue-2);
}
.clause-list > li strong { color: var(--text-primary); }

@media (max-width: 640px) {
  .data-table { min-width: 460px; }
}

/* Sub-headings inside a section card. The original policy had none — the new
   documents do, because a 19-section policy that cannot be skimmed is a
   document nobody reads. */
.section-card h3 {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 22px 0 10px;
  letter-spacing: -0.01em;
}
.section-card h3:first-of-type { margin-top: 0; }

/* Long unbreakable tokens — email addresses and URLs — inside body text.
   The original policy only ever showed an email inside .contact-card, which is
   wide enough for it; the new documents put help.catalog.cars@gmail.com into
   list items and clauses, where at 375px it pushed the whole page 50px wider
   than the viewport. Wrapping is the fix; a horizontal scrollbar on a legal
   document is not. */
.section-card p,
.clause-list > li,
.toc-list a {
  overflow-wrap: break-word;
}

/* `anywhere`, not `break-word`, and the difference matters here. Both break a
   long word to avoid overflow, but only `anywhere` reduces the element's
   min-content width. `.info-list li`, `.highlight-box` and `.contact-details`
   are flex containers, and a flex item will not shrink below min-content — so
   with `break-word` the email stayed one rigid 100px token and pushed the page
   wider instead of wrapping. */
.info-list li,
.highlight-text,
.contact-email,
.contact-details {
  overflow-wrap: anywhere;
}
.contact-details { min-width: 0; }
