/* =====================================================================
   Legal / Privacy Policy — static, readable, themed
   Design language mirrors the countdown landing (.ctk-*)
   Scoped under .pp ; RTL ; dark-mode via html.dark
   ===================================================================== */

/* Smooth in-page anchor jumps (file only loads on legal pages). */
html { scroll-behavior: smooth; }

.pp {
  --pp-ease: cubic-bezier(.22, .61, .36, 1);
  font-family: 'Kalameh', system-ui, sans-serif;
  color: #0f172a;
  overflow-x: clip;
}
.pp *,
.pp *::before,
.pp *::after { box-sizing: border-box; }
html.dark .pp { color: #e5e7eb; }

/* ── Color tokens (per-section accents) ───────────────────────────── */
.pp-c-sky     { --c: #0284c7; --c-bg: rgba(14,165,233,.12); }
.pp-c-emerald { --c: #059669; --c-bg: rgba(16,185,129,.12); }
.pp-c-amber   { --c: #d97706; --c-bg: rgba(245,158,11,.14); }
.pp-c-rose    { --c: #e11d48; --c-bg: rgba(244,63,94,.12); }
.pp-c-violet  { --c: #7c3aed; --c-bg: rgba(139,92,246,.14); }
html.dark .pp-c-sky     { --c: #38bdf8; --c-bg: rgba(56,189,248,.16); }
html.dark .pp-c-emerald { --c: #34d399; --c-bg: rgba(52,211,153,.16); }
html.dark .pp-c-amber   { --c: #fbbf24; --c-bg: rgba(245,158,11,.18); }
html.dark .pp-c-rose    { --c: #fb7185; --c-bg: rgba(244,63,94,.18); }
html.dark .pp-c-violet  { --c: #a78bfa; --c-bg: rgba(139,92,246,.2); }

.pp-container {
  width: 100%;
  max-width: 1100px;
  margin-inline: auto;
  padding-inline: 20px;
  position: relative;
}

/* ── Hero ─────────────────────────────────────────────────────────── */
.pp-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(145deg, #F0F9FF 0%, #E0F2FE 45%, #BAE6FD 100%);
  padding: 122px 0 66px;
  text-align: center;
}
html.dark .pp-hero { background: linear-gradient(145deg, #082235 0%, #0c3552 60%, #082a44 100%); }

.pp-hero__inner { position: relative; z-index: 2; max-width: 740px; margin-inline: auto; }
.pp-hero__icon {
  width: 74px; height: 74px; border-radius: 22px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(2,132,199,.12); color: #0284c7;
  margin-bottom: 20px;
  box-shadow: 0 14px 34px rgba(2,132,199,.2);
}
html.dark .pp-hero__icon { background: rgba(56,189,248,.16); color: #38bdf8; }

.pp-badge {
  display: inline-block; padding: 6px 16px; border-radius: 20px;
  font-size: .8125rem; font-weight: 700; margin-bottom: 14px;
  background: rgba(14,165,233,.14); color: #0369A1;
}
html.dark .pp-badge { background: rgba(56,189,248,.15); color: #7DD3FC; }

.pp-hero__title {
  font-weight: 900; font-size: clamp(1.9rem, 4.6vw, 2.95rem);
  line-height: 1.45; margin: 0 0 16px; color: #0c4a6e;
}
html.dark .pp-hero__title { color: #e0f2fe; }

.pp-hero__sub {
  font-size: 1.02rem; line-height: 1.95; color: #475569;
  margin: 0 auto; max-width: 640px;
}
html.dark .pp-hero__sub { color: #94a3b8; }

.pp-hero__meta {
  margin-top: 22px; display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; color: #0369A1;
  background: rgba(255,255,255,.62); padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(2,132,199,.16);
}
html.dark .pp-hero__meta { color: #7DD3FC; background: rgba(8,34,53,.5); border-color: rgba(56,189,248,.2); }
.pp-hero__meta svg { width: 15px; height: 15px; }

/* Decorations */
.pp-deco { position: absolute; z-index: 1; pointer-events: none; border-radius: 50%; filter: blur(2px); }

/* ── Body layout ──────────────────────────────────────────────────── */
.pp-body { padding: 56px 0 84px; background: #f8fafc; }
html.dark .pp-body { background: #0b1220; }

.pp-grid {
  display: grid;
  grid-template-columns: 264px 1fr;
  gap: 40px;
  align-items: start;
}

/* Table of contents */
.pp-toc {
  position: sticky;
  top: 84px;
  background: #fff;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  padding: 22px 18px;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
}
html.dark .pp-toc { background: #0f1a2b; border-color: rgba(148,163,184,.16); box-shadow: 0 10px 30px rgba(0,0,0,.3); }

.pp-toc__title {
  font-size: .8rem; font-weight: 800; letter-spacing: .01em;
  color: #64748b; margin: 0 0 14px;
  display: flex; align-items: center; gap: 8px;
}
html.dark .pp-toc__title { color: #94a3b8; }
.pp-toc__title svg { width: 16px; height: 16px; color: #0284c7; }
html.dark .pp-toc__title svg { color: #38bdf8; }

.pp-toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.pp-toc__link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 11px;
  font-size: .9rem; font-weight: 600; color: #475569;
  text-decoration: none;
  border-inline-start: 3px solid transparent;
  transition: background .2s var(--pp-ease), color .2s var(--pp-ease), border-color .2s var(--pp-ease);
}
.pp-toc__link:hover { background: rgba(2,132,199,.08); color: #0284c7; border-inline-start-color: #0284c7; }
html.dark .pp-toc__link { color: #94a3b8; }
html.dark .pp-toc__link:hover { background: rgba(56,189,248,.12); color: #38bdf8; border-inline-start-color: #38bdf8; }
.pp-toc__num {
  flex-shrink: 0;
  width: 22px; height: 22px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800;
  background: rgba(148,163,184,.16); color: #64748b;
}
html.dark .pp-toc__num { background: rgba(148,163,184,.18); color: #cbd5e1; }
.pp-toc__link:hover .pp-toc__num { background: rgba(2,132,199,.16); color: #0284c7; }
html.dark .pp-toc__link:hover .pp-toc__num { background: rgba(56,189,248,.2); color: #38bdf8; }

/* Content column */
.pp-content { display: flex; flex-direction: column; gap: 22px; min-width: 0; }

.pp-lead {
  background: linear-gradient(135deg, rgba(14,165,233,.08), rgba(14,165,233,.02));
  border: 1px solid rgba(14,165,233,.2);
  border-radius: 18px;
  padding: 24px 26px;
  font-size: 1rem; line-height: 2.1; color: #334155; margin: 0;
}
html.dark .pp-lead { background: linear-gradient(135deg, rgba(56,189,248,.1), rgba(56,189,248,.02)); border-color: rgba(56,189,248,.22); color: #cbd5e1; }

.pp-card {
  scroll-margin-top: 84px;
  background: #fff;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  padding: 26px 28px;
  box-shadow: 0 10px 30px rgba(15,23,42,.05);
  border-inline-start: 4px solid var(--c);
}
html.dark .pp-card { background: #0f1a2b; border-color: rgba(148,163,184,.16); box-shadow: 0 10px 30px rgba(0,0,0,.28); }

.pp-card__head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.pp-card__icon {
  width: 50px; height: 50px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--c-bg); color: var(--c);
}
.pp-card__icon svg { width: 26px; height: 26px; }
.pp-card__title { font-size: 1.18rem; font-weight: 800; margin: 0; color: #0f172a; }
html.dark .pp-card__title { color: #f1f5f9; }

.pp-card__text { font-size: .98rem; line-height: 2.05; color: #475569; margin: 0; }
html.dark .pp-card__text { color: #cbd5e1; }
.pp-card__text + .pp-card__text { margin-top: 12px; }
.pp-card__text a { color: #0284c7; text-decoration: none; font-weight: 700; }
.pp-card__text a:hover { text-decoration: underline; }
html.dark .pp-card__text a { color: #38bdf8; }

/* ── Support band ─────────────────────────────────────────────────── */
.pp-support {
  scroll-margin-top: 84px;
  margin-top: 8px;
  background: linear-gradient(145deg, #0F172A 0%, #1E293B 50%, #162033 100%);
  border-radius: 22px;
  padding: 36px 34px;
  color: #e2e8f0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
  position: relative; overflow: hidden;
}
html.dark .pp-support { background: linear-gradient(145deg, #060b16 0%, #0e1626 50%, #0a1120 100%); }
.pp-support__deco { position: absolute; border-radius: 50%; pointer-events: none; }

.pp-support__text { position: relative; z-index: 1; }
.pp-support__badge {
  display: inline-block; padding: 5px 14px; border-radius: 20px;
  font-size: .76rem; font-weight: 700; margin-bottom: 12px;
  background: rgba(251,191,36,.2); color: #FCD34D;
}
.pp-support__title { font-size: clamp(1.3rem, 2.6vw, 1.6rem); font-weight: 900; margin: 0 0 8px; color: #f8fafc; }
.pp-support__sub { font-size: .95rem; line-height: 1.9; color: #cbd5e1; margin: 0; max-width: 460px; }

.pp-support__actions { position: relative; z-index: 1; display: flex; gap: 12px; flex-wrap: wrap; }
.pp-contact-btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 13px; font-weight: 700; font-size: .92rem;
  text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--pp-ease), box-shadow .2s var(--pp-ease), background .2s;
}
.pp-contact-btn svg { width: 18px; height: 18px; }
.pp-contact-btn--primary { background: linear-gradient(135deg, #0ea5e9, #0284c7); color: #fff; box-shadow: 0 10px 26px rgba(2,132,199,.4); }
.pp-contact-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(2,132,199,.5); }
.pp-contact-btn--ghost { background: rgba(255,255,255,.08); color: #e2e8f0; border: 1px solid rgba(255,255,255,.2); }
.pp-contact-btn--ghost:hover { transform: translateY(-2px); background: rgba(255,255,255,.14); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 880px) {
  .pp-hero { padding: 98px 0 50px; }
  .pp-body { padding: 34px 0 60px; }

  .pp-grid { grid-template-columns: 1fr; gap: 22px; }

  /* TOC becomes a compact quick-nav at the top */
  .pp-toc { position: static; order: -1; padding: 18px 16px; }
  .pp-toc__list { flex-direction: row; flex-wrap: wrap; gap: 8px; }
  .pp-toc__link {
    border-inline-start: 0;
    background: rgba(2,132,199,.07);
    padding: 7px 12px; font-size: .82rem; border-radius: 999px;
  }
  html.dark .pp-toc__link { background: rgba(56,189,248,.1); }
  .pp-toc__link:hover { border-inline-start: 0; }

  .pp-card { padding: 22px 20px; }
  .pp-support { padding: 26px 22px; }
}

@media (max-width: 520px) {
  .pp-card__head { gap: 12px; }
  .pp-card__icon { width: 44px; height: 44px; border-radius: 12px; }
  .pp-card__icon svg { width: 22px; height: 22px; }
  .pp-card__title { font-size: 1.08rem; }
  .pp-support__actions { width: 100%; }
  .pp-contact-btn { flex: 1 1 auto; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pp-contact-btn,
  .pp-toc__link { transition: none; }
}
