/* =====================================================
   Privacy policy page (/privacy)
   Builds on landing-v2/styles.css tokens.
   ===================================================== */

html { scroll-padding-top: 96px; }
.pp-body { background: var(--white); }
/* React mounts the landing <header class="nav"> here; let it stick to the viewport like on the landing */
#nav-root { display: contents; }

/* ---------- Hero strip ---------- */
.pp-hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  background: var(--ink-50);
}
.pp-hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(11,18,32,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11,18,32,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(180deg, black, transparent 90%);
  -webkit-mask-image: linear-gradient(180deg, black, transparent 90%);
}
.pp-hero-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 64px; padding-top: 12px; padding-bottom: 12px;
}
.pp-breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13.5px; color: var(--ink-500); }
.pp-breadcrumbs a { color: var(--ink-600); transition: color .15s; }
.pp-breadcrumbs a:hover { color: var(--blue-500); }
.pp-hero-actions .btn { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Layout ---------- */
.pp-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
  padding-top: 48px;
}
.pp-aside {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 120px);
  display: flex;
}

/* ---------- Table of contents ---------- */
.pp-toc {
  display: flex; flex-direction: column;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.pp-toc-title {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 700; font-size: 13px;
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--ink-900);
  list-style: none;
  cursor: default;
}
.pp-toc-title::-webkit-details-marker { display: none; }
.pp-toc-chevron { display: none; color: var(--ink-500); transition: transform .2s var(--ease); }
.pp-toc-nav {
  overflow-y: auto;
  max-height: calc(100vh - 180px);
  padding: 0 8px 12px;
  scrollbar-width: thin;
}
.pp-toc-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pp-toc-list a {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 4px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--ink-600);
  transition: background .15s, color .15s;
}
.pp-toc-list a:hover { background: var(--ink-50); color: var(--ink-900); }
.pp-toc-list a.is-active { background: var(--blue-50); color: var(--blue-600); font-weight: 600; }
.pp-toc-num { color: var(--ink-400); font-variant-numeric: tabular-nums; font-weight: 600; }
.pp-toc-list a.is-active .pp-toc-num { color: var(--blue-500); }

/* ---------- Document ---------- */
.pp-doc {
  max-width: 820px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-700);
  overflow-wrap: break-word;
}
.pp-doc p { margin: 0 0 14px; }
.pp-doc strong { color: var(--ink-900); font-weight: 600; }
.pp-doc a { color: var(--blue-500); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.pp-doc a:hover { color: var(--blue-700); }

.pp-doc-head { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.pp-title {
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.12;
  margin: 0 0 20px;
}
.pp-meta { margin: 0 0 4px !important; font-size: 14.5px; color: var(--ink-500); }
.pp-meta strong { color: var(--ink-700); }

.pp-lead {
  padding: 16px 20px;
  border-left: 3px solid var(--blue-500);
  background: var(--ink-50);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink-600);
}
.pp-lead + .pp-lead { margin-top: -14px; padding-top: 0; }
.pp-lead em { font-style: italic; }

.pp-section { padding-top: 32px; }
.pp-section h2 {
  display: flex; align-items: baseline; gap: 12px;
  font-size: 20px; line-height: 1.3;
  letter-spacing: -.01em;
  margin: 0 0 18px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.pp-h-num {
  flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; height: 30px; padding: 0 8px;
  border-radius: 8px;
  background: var(--blue-50);
  color: var(--blue-600);
  font-size: 15px;
  transform: translateY(-2px);
}

.pp-clause { position: relative; padding-left: 52px; }
.pp-clause-num {
  position: absolute; left: 0; top: 0;
  font-weight: 700; color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.pp-clause ~ p:not(.pp-clause),
.pp-clause ~ .pp-list { margin-left: 52px; }

.pp-list { margin: -4px 0 16px; padding-left: 22px; }
.pp-list li { margin: 0 0 6px; padding-left: 4px; }
.pp-list li::marker { color: var(--blue-500); }

/* ---------- Tables ---------- */
.pp-table-wrap {
  margin: 6px 0 22px 52px;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.pp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.55; }
.pp-table th {
  text-align: left; vertical-align: bottom;
  padding: 12px 16px;
  background: var(--ink-50);
  font-weight: 600; color: var(--ink-900);
  border-bottom: 1px solid var(--border);
}
.pp-table td { vertical-align: top; padding: 12px 16px; border-top: 1px solid var(--border); }
.pp-table tbody tr:first-child td { border-top: 0; }
.pp-table td p { margin: 0 0 6px; }
.pp-table td p:last-child { margin-bottom: 0; }
.pp-table-3 td:first-child { width: 34%; color: var(--ink-900); }
.pp-table-3 td:nth-child(2) { width: 20%; white-space: normal; }
.pp-table-2 td:first-child { width: 42%; color: var(--ink-900); }

/* ---------- Annex ---------- */
.pp-annex { margin-top: 32px; }
.pp-annex-title {
  display: block !important;
  font-size: 24px !important;
  line-height: 1.25 !important;
}
.pp-annex-list { display: grid; gap: 14px; margin-top: 24px; }
.pp-annex-head {
  display: grid; grid-template-columns: 52px 1fr;
  padding: 0 20px;
  font-size: 14px; font-weight: 700;
  color: var(--ink-700);
}
.pp-service {
  display: grid; grid-template-columns: 52px 1fr;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--white);
  font-size: 14.5px; line-height: 1.6;
}
.pp-service-head { display: contents; }
.pp-service-num {
  grid-row: 1 / span 2;
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--ink-50);
  color: var(--ink-600);
  font-weight: 700; font-size: 14px;
}
.pp-service-num:empty { background: transparent; }
.pp-service h3 { font-size: 16px; line-height: 32px; margin: 0 0 6px; }
.pp-service-body { grid-column: 2; }
.pp-service-body p { margin: 0 0 4px; }

/* ---------- Back to top ---------- */
.pp-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink-700);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity .2s var(--ease), transform .2s var(--ease), color .15s;
}
.pp-to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.pp-to-top:hover { color: var(--blue-500); }

/* ---------- Responsive ---------- */
@media (max-width: 1023px) {
  .pp-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 20px; }
  .pp-aside { position: sticky; top: 72px; z-index: 50; max-height: none; min-width: 0; }
  html { scroll-padding-top: 140px; }
  .pp-toc { position: relative; overflow: visible; box-shadow: var(--shadow-md); }
  .pp-toc-title { padding: 14px 16px; cursor: pointer; }
  .pp-toc-chevron { display: block; }
  .pp-toc[open] .pp-toc-chevron { transform: rotate(180deg); }
  /* Dropdown overlays the text so opening/closing it does not shift the page */
  .pp-toc-nav {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    max-height: 60vh;
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
  }
  .pp-doc { max-width: none; }
}
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .pp-doc { font-size: 15px; }
  .pp-clause { padding-left: 0; }
  .pp-clause-num { position: static; margin-right: 4px; }
  .pp-clause ~ p:not(.pp-clause),
  .pp-clause ~ .pp-list,
  .pp-table-wrap { margin-left: 0; }
  .pp-section h2 { font-size: 18px; }
  .pp-table { font-size: 13.5px; }
  .pp-table th, .pp-table td { padding: 10px 12px; }
  .pp-table-3 { min-width: 560px; }
  .pp-service { grid-template-columns: 40px 1fr; padding: 14px; }
  .pp-annex-head { grid-template-columns: 40px 1fr; padding: 0 14px; }
  .pp-hero-actions .btn { padding: 0 12px; }
}
