/* ============================================================
   Vehodo — Legal & account pages (privacy, terms, delete-account)
   Loaded as an external stylesheet so it passes the site CSP
   (inline <style> is blocked by style-src). Depends on the CSS
   variables defined in style.css (:root).
   ============================================================ */

html { scroll-behavior: smooth; }

/* ── Topbar ─────────────────────────────────────────────── */
.legal-topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between;
                padding: 14px 24px; background: rgba(14,14,18,0.82); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.legal-topbar .nav__logo { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--white); }
.legal-topbar .logo-svg { height: 26px; width: auto; color: var(--white); }
.legal-topbar .nav__brand { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; letter-spacing: -0.02em; color: var(--white); }
.legal-topbar .lang-toggle { color: var(--muted2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 15px; font-size: .8rem; text-decoration: none; transition: all var(--transition); }
.legal-topbar .lang-toggle:hover { color: var(--orange); border-color: var(--orange); }

/* ── Hero (privacy / terms) ─────────────────────────────── */
.legal-hero { max-width: 1080px; margin: 0 auto; padding: 116px 24px 0; }
.legal-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted2); font-size: .88rem; text-decoration: none; margin-bottom: 26px; transition: color var(--transition); }
.legal-back:hover { color: var(--orange); }
.legal-eyebrow { display: inline-block; font-family: var(--font-head); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
                 color: var(--orange); background: var(--orange-dim); border: 1px solid rgba(255,107,26,0.25); padding: 5px 13px; border-radius: 999px; margin-bottom: 20px; }
.legal-hero h1 { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1.03; letter-spacing: -0.025em; margin: 0 0 12px; color: var(--white); }
.legal-updated { color: var(--muted); font-size: .85rem; margin: 0; }
.legal-intro { color: var(--muted2); font-size: 1.08rem; line-height: 1.75; max-width: 720px; margin: 22px 0 0; }
.legal-hr { max-width: 1080px; margin: 40px auto 0; padding: 0 24px; }
.legal-hr hr { border: none; border-top: 1px solid var(--border); margin: 0; }

/* ── Body: sticky TOC + content ─────────────────────────── */
.legal-body { max-width: 1080px; margin: 0 auto; padding: 40px 24px 96px; display: grid; grid-template-columns: 230px 1fr; gap: 56px; align-items: start; }
.legal-toc { position: sticky; top: 92px; }
.legal-toc h2 { font-family: var(--font-head); font-size: .72rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin: 0 0 14px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.legal-toc a { display: block; padding: 7px 0 7px 14px; border-left: 2px solid var(--border); color: var(--muted2); text-decoration: none; font-size: .9rem; line-height: 1.4; transition: all var(--transition); }
.legal-toc a:hover { color: var(--text); border-left-color: var(--orange); }

.legal-content { min-width: 0; }
.legal-section { scroll-margin-top: 88px; padding: 30px 0; border-top: 1px solid var(--border); }
.legal-section:first-child { border-top: none; padding-top: 4px; }
.legal-section h2 { display: flex; align-items: center; gap: 14px; font-family: var(--font-head); font-size: 1.4rem; letter-spacing: -0.01em; color: var(--white); margin: 0 0 16px; }
.legal-num { flex: 0 0 auto; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
             background: var(--orange-dim); color: var(--orange); font-size: .9rem; font-weight: 700; }
.legal-section p { color: var(--muted2); line-height: 1.8; margin: 0 0 14px; }
.legal-section ul { color: var(--muted2); line-height: 1.8; padding-left: 20px; margin: 0 0 14px; }
.legal-section li { margin: 9px 0; }
.legal-section li::marker { color: var(--orange); }
.legal-section strong { color: var(--text); font-weight: 600; }

.legal-contact { margin-top: 28px; padding: 26px 28px; background: var(--orange-dim); border: 1px solid rgba(255,107,26,0.25); border-radius: var(--radius-lg); }
.legal-contact h2 { font-family: var(--font-head); font-size: 1.15rem; color: var(--white); margin: 0 0 8px; }
.legal-contact p { color: var(--muted2); line-height: 1.7; margin: 0; }
.legal-contact a { color: var(--orange); text-decoration: none; }
.legal-contact a:hover { text-decoration: underline; }

/* ── Footer (shared) ────────────────────────────────────── */
.legal-footer { border-top: 1px solid var(--border); background: var(--surface); }
.legal-footer .inner { max-width: 1080px; margin: 0 auto; padding: 30px 24px; display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.legal-footer .brand { display: flex; align-items: center; gap: 9px; color: var(--white); text-decoration: none; }
.legal-footer .logo-svg { height: 22px; width: auto; color: var(--white); }
.legal-footer .brandname { font-family: var(--font-head); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.02em; }
.legal-footer nav { display: flex; gap: 22px; }
.legal-footer nav a { color: var(--muted2); text-decoration: none; font-size: .9rem; transition: color var(--transition); }
.legal-footer nav a:hover { color: var(--orange); }
.legal-footer .copy { color: var(--muted); font-size: .82rem; width: 100%; margin-top: 6px; }

/* ── Delete-account page ────────────────────────────────── */
.del-wrap { max-width: 760px; margin: 0 auto; padding: 116px 24px 40px; }
.del-back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted2); font-size: .88rem; text-decoration: none; margin-bottom: 26px; transition: color var(--transition); }
.del-back:hover { color: var(--orange); }
.del-eyebrow { display: inline-block; font-family: var(--font-head); font-size: .68rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
               color: var(--orange); background: var(--orange-dim); border: 1px solid rgba(255,107,26,0.25); padding: 5px 13px; border-radius: 999px; margin-bottom: 20px; }
.del-wrap h1 { font-family: var(--font-head); font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.03; letter-spacing: -0.025em; margin: 0 0 12px; color: var(--white); }
.del-updated { color: var(--muted); font-size: .85rem; margin: 0 0 22px; }
.del-intro { color: var(--muted2); font-size: 1.08rem; line-height: 1.75; margin: 0; }
.del-wrap h2 { position: relative; font-family: var(--font-head); font-size: 1.35rem; letter-spacing: -0.01em; color: var(--white); margin: 48px 0 20px; padding-left: 16px; }
.del-wrap h2::before { content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 2px; background: var(--orange); }

.del-steps { display: grid; gap: 14px; }
.del-step { display: flex; gap: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.del-step .n { flex: 0 0 auto; width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%;
               background: var(--orange-dim); color: var(--orange); font-family: var(--font-head); font-weight: 700; font-size: .9rem; }
.del-step h3 { font-family: var(--font-head); font-size: 1rem; color: var(--white); margin: 3px 0 5px; }
.del-step p { color: var(--muted2); line-height: 1.65; margin: 0; font-size: .95rem; }
.del-step strong { color: var(--text); font-weight: 600; }

.del-cta-wrap { margin-top: 26px; }
.del-cta { display: inline-flex; align-items: center; gap: 10px; background: var(--orange); color: #fff; font-family: var(--font-head); font-weight: 700;
           font-size: 1rem; text-decoration: none; padding: 14px 26px; border-radius: var(--radius); transition: all var(--transition); }
.del-cta:hover { background: #ff7d33; transform: translateY(-1px); box-shadow: var(--shadow); }
.del-cta-note { color: var(--muted); font-size: .82rem; margin: 10px 0 0; }

.del-lead { color: var(--muted2); line-height: 1.75; margin: 0 0 24px; }
.del-lead strong { color: var(--text); font-weight: 600; }
.del-timeline { position: relative; }
.del-phase { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 20px; padding-bottom: 28px; }
.del-phase:last-child { padding-bottom: 0; }
.del-phase::before { content: ""; position: absolute; left: 8px; top: 22px; bottom: -6px; width: 2px; background: var(--border); }
.del-phase:last-child::before { display: none; }
.del-phase__node { width: 18px; height: 18px; border-radius: 50%; margin-top: 3px; background: currentColor; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px currentColor; }
.del-phase--ok { color: var(--orange); }
.del-phase--danger { color: var(--red); }
.del-phase__badge { display: inline-block; font-family: var(--font-head); font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
                    color: currentColor; padding: 4px 11px; border-radius: 999px; }
.del-phase--ok .del-phase__badge { background: var(--orange-dim); border: 1px solid rgba(255,107,26,0.25); }
.del-phase--danger .del-phase__badge { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.28); }
.del-phase h3 { font-family: var(--font-head); font-size: 1.08rem; color: var(--white); margin: 10px 0 6px; }
.del-phase p { color: var(--muted2); line-height: 1.7; margin: 0; }
.del-phase strong { color: var(--text); font-weight: 600; }

.del-list { list-style: none; margin: 0; padding: 0; }
.del-list li { position: relative; padding-left: 26px; color: var(--muted2); line-height: 1.75; margin: 10px 0; }
.del-list li::before { content: "✓"; position: absolute; left: 2px; top: 0; color: var(--orange); font-weight: 700; }
.del-note { color: var(--muted); font-size: .88rem; line-height: 1.6; margin: 16px 0 0; }

.del-contact { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--border); }
.del-contact h2 { font-size: 1.1rem; margin: 0 0 8px; padding-left: 0; }
.del-contact h2::before { display: none; }
.del-contact p { color: var(--muted2); line-height: 1.7; margin: 0; }
.del-contact a { color: var(--orange); text-decoration: none; }
.del-contact a:hover { text-decoration: underline; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .legal-body { grid-template-columns: 1fr; gap: 0; padding-top: 28px; }
  .legal-toc { position: static; margin-bottom: 28px; padding: 20px 22px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
  .legal-toc a { border-left: none; padding: 6px 0; }
  .legal-toc ol { columns: 2; column-gap: 24px; }
}
@media (max-width: 520px) {
  .legal-hero { padding-top: 100px; }
  .legal-toc ol { columns: 1; }
  .legal-footer .inner { flex-direction: column; align-items: flex-start; }
  .del-wrap { padding-top: 100px; }
  .del-cta { width: 100%; justify-content: center; }
}
