/* ==========================================================================
   PRCN Academy — legal pages (privacy notice, and any sibling that follows)

   Loaded AFTER register-landing/css/style.css, which it depends on for the
   design tokens, the nav and the footer. Nothing here redefines a token; this
   file only adds the long-form reading layout the landing page has no need for.

   The one override that matters: .nav on the landing page is transparent over
   a dark hero. A legal page has a light background under it, so the nav must
   carry its own dark surface from the first pixel — hence .nav--solid.
   ========================================================================== */

/* ---------- nav on a light page ---------- */
.nav--solid {
  background: var(--navy);
  padding-top: 14px;
  padding-bottom: 14px;
}
.nav--solid.is-scrolled {
  background: rgba(10, 17, 40, 0.94);
}

/* ---------- masthead ---------- */
.legal-hero {
  background: var(--navy);
  color: var(--white);
  padding: calc(96px + 72px) var(--pad) 72px;
}
.legal-hero__inner {
  max-width: 1100px;
  margin: 0 auto;
}
.legal-hero__eyebrow {
  font-family: var(--font-head);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}
.legal-hero__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.03;
  letter-spacing: -0.02em;
  margin-bottom: 22px;
}
.legal-hero__lead {
  max-width: 62ch;
  font-size: clamp(16px, 1.5vw, 18.5px);
  line-height: 1.65;
  color: var(--gray-200);
}
.legal-hero__updated {
  display: inline-block;
  margin-top: 28px;
  padding: 7px 14px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--gray-200);
}

/* ---------- body layout ---------- */
.legal {
  max-width: var(--container);
  margin: 0 auto;
  padding: 72px var(--pad) 96px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 72px;
  align-items: start;
}

/* ---------- sticky table of contents ---------- */
.legal__toc {
  position: sticky;
  top: 96px;
}
.legal__toc-label {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-600);
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--gray-200);
}
.legal__toc ol {
  list-style: none;
  counter-reset: toc;
}
.legal__toc li {
  counter-increment: toc;
}
.legal__toc a {
  display: flex;
  gap: 10px;
  padding: 7px 0;
  font-size: 14px;
  line-height: 1.4;
  color: var(--gray-600);
  transition: color 0.2s var(--ease);
}
.legal__toc a::before {
  content: counter(toc);
  flex: none;
  width: 18px;
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  color: var(--gray-400);
  padding-top: 2px;
}
.legal__toc a:hover,
.legal__toc a.is-current {
  color: var(--red);
}
.legal__toc a.is-current::before {
  color: var(--red);
}

/* ---------- prose ---------- */
.legal__body {
  max-width: 78ch;
  counter-reset: sec;
}
.legal__section {
  padding-bottom: 52px;
  margin-bottom: 52px;
  border-bottom: 1px solid var(--gray-100);
  counter-increment: sec;

  /* Fixed nav would otherwise cover the heading of a jumped-to section. */
  scroll-margin-top: 96px;
}
.legal__section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}
.legal__section > h2 {
  display: flex;
  gap: 16px;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(23px, 2.6vw, 31px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--navy);
  margin-bottom: 22px;
}
.legal__section > h2::before {
  content: counter(sec);
  flex: none;
  min-width: 34px;
  font-size: 15px;
  font-weight: 700;
  color: var(--red);
  padding-top: 8px;
}
.legal__section h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin: 34px 0 12px;
}
.legal__section h3:first-of-type {
  margin-top: 0;
}
.legal__section p {
  font-size: 16px;
  line-height: 1.75;
  color: var(--gray-800);
  margin-bottom: 16px;
}
.legal__section p:last-child {
  margin-bottom: 0;
}
.legal__section a {
  color: var(--red);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
.legal__section a:hover {
  color: var(--red-dark);
}
.legal__section strong {
  color: var(--navy);
  font-weight: 600;
}
.legal__section code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--gray-100);
  border-radius: 4px;
  padding: 2px 6px;
  color: var(--navy);
}

.legal__list {
  list-style: none;
  margin-bottom: 18px;
}
.legal__list li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 11px;
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-800);
}
.legal__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 11px;
  width: 7px;
  height: 1.5px;
  background: var(--red);
}

.legal__note {
  padding: 18px 20px;
  background: var(--gray-50);
  border-left: 2px solid var(--red);
  font-size: 15px !important;
  color: var(--gray-600) !important;
}
.legal__address {
  padding: 18px 20px;
  background: var(--gray-50);
  line-height: 1.7 !important;
}
.legal__muted {
  color: var(--gray-600);
  font-size: 13px;
}

/* ---------- tables ----------
   The wrapper scrolls, not the page: a three-column table of legal bases does
   not survive a 360px viewport, and a horizontally scrolling <body> would take
   the nav and footer with it. */
.legal__tablewrap {
  overflow-x: auto;
  margin: 4px 0 22px;
  border: 1px solid var(--gray-200);
  -webkit-overflow-scrolling: touch;
}
.legal__table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.legal__table th {
  text-align: left;
  padding: 13px 16px;
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.legal__table td {
  padding: 14px 16px;
  border-top: 1px solid var(--gray-100);
  vertical-align: top;
  line-height: 1.6;
  color: var(--gray-800);
}
.legal__table tbody tr:nth-child(even) {
  background: var(--gray-50);
}
.legal__table strong {
  color: var(--navy);
  font-weight: 600;
}

/* ---------- controller identity card ---------- */
.legal__identity {
  margin: 4px 0 20px;
  padding: 22px 24px;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
}
.legal__identity dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 9px 22px;
  font-size: 15px;
  line-height: 1.6;
}
.legal__identity dt {
  font-family: var(--font-head);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-600);
  padding-top: 4px;
  white-space: nowrap;
}
.legal__identity dd {
  color: var(--navy);
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .legal {
    grid-template-columns: 1fr;
    gap: 0;
  }
  /* Sticky is pointless once the TOC sits above the prose rather than beside
     it — it would pin an open list over the text being read. */
  .legal__toc {
    position: static;
    margin-bottom: 48px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--gray-200);
  }
  .legal__toc ol {
    columns: 2;
    column-gap: 32px;
  }
}
@media (max-width: 560px) {
  .legal-hero {
    padding-top: calc(72px + 56px);
    padding-bottom: 56px;
  }
  .legal {
    padding-top: 56px;
  }
  .legal__toc ol {
    columns: 1;
  }
  .legal__identity {
    padding: 18px;
  }
  .legal__identity dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .legal__identity dt {
    padding-top: 12px;
  }
  .legal__section > h2 {
    gap: 12px;
  }
  .legal__section > h2::before {
    min-width: 24px;
    font-size: 13px;
    padding-top: 6px;
  }
}
