/* Terms, Privacy, Cookies and Safeguarding.
   ---------------------------------------------------------------------------
   These four pages were built on the site's older coral palette
   (--color-primary: #F25C4D) while everything else moved to the green and
   cream brand, so the pages people are pointed at from the footer, from the
   signup form and from a safeguarding concern were the ones that looked least
   like Learningly.

   Everything here is scoped under .policy-page and styles the markup that is
   already in those templates — including the Bootstrap utility classes they
   use. That is deliberate: the bodies of these pages are legal text, and the
   right diff on a legal template is no diff at all. Each one gains a single
   line naming the page; not a word of the content changes.

   Long-form reading, so: one measured column, generous line height, and a
   contents rail that keeps its place. */

.policy-page {
  background: var(--ll-cream);
  color: var(--ll-body);
}

/* ---- header ---------------------------------------------------------- */

.policy-page .container { max-width: 1120px; }

.policy-page h1 {
  color: var(--ll-ink);
  font-size: clamp(2rem, 4.5vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* The "Last updated" line. Bootstrap's .lead .text-muted, re-toned. */
.policy-page .lead {
  color: var(--ll-body);
  font-size: 0.95rem;
  font-weight: 500;
}

.policy-page .text-muted { color: var(--ll-body) !important; }

/* ---- body ------------------------------------------------------------ */

.policy-content {
  /* The Bootstrap column already sets the measure; a max-width here as well
     left a strip of dead space between the card and the contents rail. */
  padding: 30px 34px 34px;
  border: 1px solid var(--ll-line);
  border-radius: 14px;
  background: #fff;
}

.policy-content section { margin-bottom: 2.4rem; }
.policy-content section:last-child { margin-bottom: 0; }

/* Scroll-margin so a link from the contents rail does not tuck the heading
   under the sticky site header. */
.policy-content section[id] { scroll-margin-top: 90px; }

.policy-content h2 {
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ll-line);
  color: var(--ll-ink);
  font-size: 1.22rem;
  font-weight: 700;
}

.policy-content h3, .policy-content h4, .policy-content h5 {
  margin: 1.5rem 0 0.5rem;
  color: var(--ll-ink);
  font-size: 1.02rem;
  font-weight: 600;
}

.policy-content p, .policy-content li {
  color: var(--ll-body);
  font-size: 0.96rem;
  line-height: 1.75;
}

.policy-content p { margin: 0 0 1rem; }
.policy-content ul, .policy-content ol { margin: 0 0 1.1rem; padding-left: 1.25rem; }
.policy-content li { margin-bottom: 0.45rem; }
.policy-content li::marker { color: var(--ll-green); }

.policy-content strong { color: var(--ll-ink); font-weight: 600; }

.policy-content a {
  color: var(--ll-green);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.policy-content a:hover { color: var(--ll-green-deep); }

.policy-content table {
  width: 100%;
  margin: 0 0 1.2rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.policy-content th, .policy-content td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--ll-line);
  text-align: left;
  vertical-align: top;
}

.policy-content th { color: var(--ll-ink); font-weight: 600; }

/* The summary box at the top of the Terms. Bootstrap's alert-warning is amber
   on amber; this is the product's own standing-notice colouring. */
.policy-content .alert {
  margin: 0 0 1.8rem;
  padding: 16px 18px;
  border: 0;
  border-left: 3px solid var(--ll-green);
  border-radius: 10px;
  background: var(--ll-mint);
  color: var(--ll-ink);
  font-size: 0.93rem;
  line-height: 1.7;
}

.policy-content .alert-danger {
  border-left-color: #B4442E;
  background: var(--ll-peach);
}

/* ---- contents rail --------------------------------------------------- */

.policy-nav-sidebar {
  position: sticky;
  top: 90px;
  padding: 20px 20px 22px;
  border: 1px solid var(--ll-line);
  border-radius: 14px;
  background: #fff;
}

.policy-nav-sidebar h5 {
  margin: 0 0 12px;
  color: var(--ll-body);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.policy-nav-sidebar .nav-link {
  padding: 0.4rem 0 0.4rem 0.75rem;
  border-left: 2px solid var(--ll-line);
  color: var(--ll-body);
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.policy-nav-sidebar .nav-link:hover {
  border-left-color: var(--ll-green);
  color: var(--ll-green);
}

.policy-nav-sidebar .nav-link.active {
  border-left-color: var(--ll-green);
  color: var(--ll-green-deep);
  font-weight: 700;
}

@media (max-width: 991px) {
  /* The rail becomes a contents list above the text rather than a column
     beside it; sticky would pin it over the reading area. */
  .policy-nav-sidebar { position: static; margin-bottom: 22px; }
  .policy-content { padding: 24px 20px 26px; }
}
