/**
 * Artix Privacy Policy — Page Styles
 * Clean editorial layout with sticky sidebar TOC and rich data tables.
 */

/* ── Tokens ──────────────────────────────────────────────────────────────── */
.pp-page {
  --pp-font-heading: 'Georgia', 'Times New Roman', serif;
  --pp-font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --pp-font-mono:    'SFMono-Regular', Consolas, monospace;

  --pp-dark:         #0a0a0a;
  --pp-mid:          #2c2c2c;
  --pp-muted:        #666;
  --pp-subtle:       #999;
  --pp-border:       #e2e2e2;
  --pp-surface:      #f8f8f8;
  --pp-white:        #ffffff;

  /* Legal basis colours */
  --pp-basis-contract:     #1a5276;
  --pp-basis-consent:      #1e8449;
  --pp-basis-legitimate:   #784212;
  --pp-basis-legal:        #6c3483;

  /* Site-tag colours */
  --pp-site-all:      #1a5276;
  --pp-site-education:#145a32;
  --pp-site-trading:  #7b241c;

  --pp-radius:       6px;
  --pp-toc-width:    240px;
  --pp-max-content:  760px;

  font-family:  var(--pp-font-body);
  color:        var(--pp-mid);
  background:   var(--pp-white);
  line-height:  1.7;
  font-size:    15px;
}

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.pp-hero {
  background:    var(--pp-dark);
  color:         var(--pp-white);
  padding:       72px 24px 60px;
}

.pp-hero__inner {
  max-width: 1100px;
  margin:    0 auto;
}

.pp-hero__eyebrow {
  font-size:      11px;
  font-weight:    600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color:          rgba(255,255,255,.45);
  margin:         0 0 16px;
}

.pp-hero__title {
  font-family:    var(--pp-font-heading);
  font-size:      clamp(2rem, 5vw, 3.25rem);
  font-weight:    400;
  margin:         0 0 8px;
  line-height:    1.12;
  letter-spacing: -.01em;
}

.pp-hero__company {
  font-size:   16px;
  color:       rgba(255,255,255,.55);
  margin:      0 0 20px;
}

.pp-hero__meta {
  font-size:  13px;
  color:      rgba(255,255,255,.45);
  margin:     0;
}

/* ── Two-column layout ──────────────────────────────────────────────────── */
.pp-layout {
  max-width:  1100px;
  margin:     0 auto;
  padding:    0 24px 80px;
  display:    grid;
  grid-template-columns: var(--pp-toc-width) 1fr;
  gap:        48px;
  align-items: start;
}

/* ── Sticky TOC ──────────────────────────────────────────────────────────── */
.pp-toc {
  position:  sticky;
  top:       24px;
  padding:   32px 0 0;
}

.pp-toc__inner {
  border-left: 3px solid var(--pp-border);
  padding-left: 20px;
}

.pp-toc__heading {
  font-size:      10px;
  font-weight:    700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color:          var(--pp-subtle);
  margin:         0 0 12px;
}

.pp-toc__list {
  list-style:  none;
  margin:      0;
  padding:     0;
  counter-reset: toc;
}

.pp-toc__list li {
  counter-increment: toc;
  margin-bottom: 2px;
}

.pp-toc__link {
  display:         flex;
  align-items:     flex-start;
  gap:             8px;
  font-size:       13px;
  color:           var(--pp-muted);
  text-decoration: none;
  padding:         5px 8px;
  border-radius:   4px;
  transition:      background 160ms, color 160ms;
  line-height:     1.4;
}

.pp-toc__link:hover,
.pp-toc__link.is-active {
  background: var(--pp-surface);
  color:      var(--pp-dark);
}

.pp-toc__icon {
  font-size:   13px;
  flex-shrink: 0;
  margin-top:  1px;
}

/* ── Main content column ─────────────────────────────────────────────────── */
.pp-main {
  padding-top: 32px;
  min-width:   0; /* prevent grid blowout */
}

/* ── Sections ─────────────────────────────────────────────────────────────── */
.pp-section {
  padding:       48px 0;
  border-bottom: 1px solid var(--pp-border);
  scroll-margin-top: 24px;
}

.pp-section:last-of-type { border-bottom: none; }

.pp-section__header {
  display:     flex;
  align-items: center;
  gap:         14px;
  margin-bottom: 28px;
}

.pp-section__icon {
  font-size:   1.8rem;
  flex-shrink: 0;
  line-height: 1;
}

.pp-section__title {
  font-family:    var(--pp-font-heading);
  font-size:      clamp(1.3rem, 2.5vw, 1.65rem);
  font-weight:    400;
  color:          var(--pp-dark);
  margin:         0;
  letter-spacing: -.01em;
  line-height:    1.2;
}

.pp-section__body > p,
.pp-section__body > ul,
.pp-section__body > dl,
.pp-section__body > div { margin-bottom: 24px; }

.pp-section__body > p:last-child,
.pp-section__body > *:last-child { margin-bottom: 0; }

/* ── Typography ──────────────────────────────────────────────────────────── */
.pp-section__body p {
  max-width:   var(--pp-max-content);
  color:       var(--pp-mid);
  line-height: 1.75;
}

.pp-section__body a {
  color:           var(--pp-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pp-sub-heading {
  font-size:   1rem;
  font-weight: 700;
  color:       var(--pp-dark);
  margin:      28px 0 10px;
}

/* ── Lists ──────────────────────────────────────────────────────────────── */
.pp-list {
  list-style:  none;
  margin:      0;
  padding:     0;
  max-width:   var(--pp-max-content);
}

.pp-list li {
  position:     relative;
  padding-left: 22px;
  margin-bottom: 10px;
  line-height:  1.65;
  color:        var(--pp-mid);
}

.pp-list li::before {
  content:     '—';
  position:    absolute;
  left:        0;
  color:       var(--pp-subtle);
  font-weight: 300;
}

/* ── Definition list ─────────────────────────────────────────────────────── */
.pp-dl {
  max-width:   var(--pp-max-content);
  margin:      0;
}

.pp-dl dt {
  font-weight: 700;
  color:       var(--pp-dark);
  font-size:   14px;
  margin:      20px 0 4px;
}

.pp-dl dt:first-child { margin-top: 0; }

.pp-dl dd {
  margin:      0 0 0 0;
  color:       var(--pp-mid);
  line-height: 1.7;
  padding-left: 16px;
  border-left:  2px solid var(--pp-border);
}

/* ── Data category blocks ───────────────────────────────────────────────── */
.pp-data-category {
  background:    var(--pp-surface);
  border:        1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  padding:       20px 24px;
  margin-bottom: 16px;
}

.pp-data-category:last-child { margin-bottom: 0; }

.pp-data-category__heading {
  font-size:     14px;
  font-weight:   700;
  color:         var(--pp-dark);
  margin:        0 0 14px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-family:   var(--pp-font-body);
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.pp-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border:        1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  margin:        16px 0;
}

.pp-table {
  width:            100%;
  border-collapse:  collapse;
  font-size:        13.5px;
  background:       var(--pp-white);
}

.pp-table thead {
  background: var(--pp-dark);
  color:      var(--pp-white);
}

.pp-table th {
  padding:        10px 14px;
  text-align:     left;
  font-size:      11px;
  font-weight:    600;
  letter-spacing: .07em;
  text-transform: uppercase;
  white-space:    nowrap;
}

.pp-table tbody tr {
  border-bottom: 1px solid var(--pp-border);
  transition:    background 150ms;
}

.pp-table tbody tr:last-child { border-bottom: none; }
.pp-table tbody tr:hover      { background: var(--pp-surface); }

.pp-table td {
  padding:        12px 14px;
  vertical-align: top;
  line-height:    1.55;
}

.pp-table__cell--muted  { color: var(--pp-muted); font-size: 13px; }
.pp-table__col--purpose { width: 25%; }
.pp-table__col--examples{ width: 50%; }
.pp-table__col--basis   { width: 25%; white-space: nowrap; }

.pp-table-footer-note {
  font-size:  13px;
  color:      var(--pp-muted);
  font-style: italic;
  margin-top: 12px;
}

/* ── Legal basis tags ───────────────────────────────────────────────────── */
.pp-basis-tag {
  display:        inline-block;
  font-size:      11px;
  font-weight:    600;
  padding:        3px 8px;
  border-radius:  20px;
  margin:         2px 2px 2px 0;
  white-space:    nowrap;
  vertical-align: middle;
}

.pp-basis-tag--contract,
.pp-basis-tag--contract-performance  { background: #d6eaf8; color: var(--pp-basis-contract); }
.pp-basis-tag--consent               { background: #d5f5e3; color: var(--pp-basis-consent); }
.pp-basis-tag--legitimate-interest,
.pp-basis-tag--legitimate-interests  { background: #fdebd0; color: var(--pp-basis-legitimate); }
.pp-basis-tag--legal-obligation,
.pp-basis-tag--legal-obligations     { background: #e8daef; color: var(--pp-basis-legal); }

/* ── Retention period pill ───────────────────────────────────────────────── */
.pp-retention-period {
  font-size:   12.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* ── Site-type tags ──────────────────────────────────────────────────────── */
.pp-site-tag {
  display:        inline-block;
  font-size:      11px;
  font-weight:    600;
  padding:        3px 8px;
  border-radius:  20px;
  white-space:    nowrap;
}

.pp-site-tag--all              { background: #d6eaf8; color: var(--pp-site-all); }
.pp-site-tag--education        { background: #d5f5e3; color: var(--pp-site-education); }
.pp-site-tag--trading-platform { background: #fadbd8; color: var(--pp-site-trading); }

/* ── Transfer location tag ───────────────────────────────────────────────── */
.pp-transfer-tag {
  font-size:  12px;
  color:      var(--pp-muted);
  font-style: italic;
}

/* ── Rights grid ─────────────────────────────────────────────────────────── */
.pp-rights-grid {
  display:               grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap:                   16px;
  margin:                16px 0;
}

.pp-right-card {
  border:        1px solid var(--pp-border);
  border-radius: var(--pp-radius);
  padding:       20px;
  background:    var(--pp-white);
  transition:    box-shadow 180ms;
}

.pp-right-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.07);
}

.pp-right-card__title {
  font-size:   14px;
  font-weight: 700;
  color:       var(--pp-dark);
  margin:      0 0 10px;
  line-height: 1.3;
  font-family: var(--pp-font-body);
}

.pp-right-card__desc {
  font-size:    13.5px;
  color:        var(--pp-mid);
  margin:       0 0 14px;
  line-height:  1.6;
}

.pp-right-card__meta,
.pp-right-card__limit {
  font-size:   12.5px;
  color:       var(--pp-muted);
  line-height: 1.5;
  margin-top:  8px;
}

.pp-right-card__label {
  font-weight: 600;
  color:       var(--pp-dark);
  display:     block;
  font-size:   11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 2px;
}

.pp-right-card__limit {
  border-top:  1px solid var(--pp-border);
  padding-top: 8px;
  margin-top:  10px;
}

/* ── Back to top ─────────────────────────────────────────────────────────── */
.pp-back-top {
  text-align:  right;
  padding:     32px 0 0;
}

.pp-back-top__link {
  font-size:       13px;
  color:           var(--pp-muted);
  text-decoration: none;
  border:          1px solid var(--pp-border);
  padding:         6px 14px;
  border-radius:   20px;
  transition:      background 160ms;
}

.pp-back-top__link:hover {
  background: var(--pp-surface);
  color:      var(--pp-dark);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .pp-layout {
    grid-template-columns: 1fr;
    gap:    0;
    padding: 0 16px 60px;
  }

  .pp-toc {
    position: static;
    padding:  24px 0 0;
  }

  .pp-toc__inner {
    border-left:  none;
    border-bottom: 2px solid var(--pp-border);
    padding:      0 0 16px;
  }

  .pp-toc__list {
    display:    flex;
    flex-wrap:  wrap;
    gap:        4px;
  }

  .pp-toc__link {
    padding:     4px 10px;
    border:      1px solid var(--pp-border);
    border-radius: 20px;
    font-size:   12px;
  }

  .pp-rights-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .pp-hero { padding: 48px 16px 40px; }
  .pp-table th, .pp-table td { padding: 8px 10px; font-size: 12px; }
  .pp-section__header { gap: 10px; }
  .pp-section__icon   { font-size: 1.4rem; }
}
