/* Changelog (/changelog/index.php) in the homepage design. Loaded after legal-v9.css: the page uses the legal pages'
   hero, side list, closing card and tokens (--legal-*), and adds the entry list and type filter below.
   Each entry is its own white card (user's choice, 2026-10-19). Restraint, as on the homepage: Poppins only, white
   sections, one blue for links. The three type labels are soft
   tints (blue New, green Improved, grey Fixed) whose text passes WCAG AA on its own tint. */
body.bp-cl-page {
  --cl-text-meta: #6b7280;   /* dates and areas: 4.8:1 on white (--legal-muted is decorative only) */
  --cl-date-w: 4.5rem;
  --cl-card-pad-y: var(--space-6, 1.5rem);
  --cl-card-pad-x: var(--space-6, 1.5rem);
}

/* hero: "Last update" line under the lead */
body.bp-cl-page #wrap #legal-hero .bp-cl-hero-meta {
  margin: var(--space-6, 1.5rem) 0 0;
  color: var(--bp-hero-text-soft, rgba(255, 255, 255, 0.68));
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  line-height: 1.5;
}
body.bp-cl-page #wrap #legal-hero .bp-cl-hero-meta .fa-clock {
  margin-right: 0.5rem;
}

/* a long run of months scrolls inside the sticky side list instead of running off screen */
@media (min-width: 992px) {
  body.bp-cl-page #wrap #bp-legal .bp-legal-toc-list {
    max-height: calc(100vh - var(--sticky-nav-height, 0px) - 14rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* type filter: the phone contents chips' look; the pressed one is ink */
body.bp-cl-page #wrap #bp-legal .bp-cl-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2, 0.5rem);
  margin: 0 0 var(--space-8, 2rem);
}
body.bp-cl-page #wrap #bp-legal .bp-cl-filter[hidden] {
  display: none;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.5rem;
  margin: 0;
  padding: 0 1rem;
  border: 1px solid #e5e7eb;
  border-radius: var(--radius-full, 9999px);
  background: #fff;
  color: #4b5563;
  font: inherit;
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  transition: border-color var(--dur-fast, 160ms) ease, background-color var(--dur-fast, 160ms) ease, color var(--dur-fast, 160ms) ease;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-filter-btn:hover {
  border-color: #c9ced6;
  color: var(--legal-ink);
}
body.bp-cl-page #wrap #bp-legal .bp-cl-filter-btn[aria-pressed="true"] {
  border-color: var(--legal-ink);
  background: var(--legal-ink);
  color: #fff;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-filter-btn:focus-visible {
  outline: 2px solid var(--legal-link);
  outline-offset: 2px;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-filter-count {
  color: var(--cl-text-meta);
  font-size: 0.8125rem;
  font-weight: 400;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-filter-btn[aria-pressed="true"] .bp-cl-filter-count {
  color: rgba(255, 255, 255, 0.75);
}

/* months */
body.bp-cl-page #bp-legal .bp-cl-month + .bp-cl-month {
  margin-top: var(--space-10, 2.5rem);
  padding-top: var(--space-10, 2.5rem);
  border-top: 1px solid var(--legal-line);
}
body.bp-cl-page #bp-legal .bp-cl-month[hidden] {
  display: none;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-doc h2 {
  margin-bottom: var(--space-2, 0.5rem);
  font-size: var(--text-2xl, 1.5rem) !important;
}

/* entries: the date in its own column, then one card per entry (type, area, title, summary, link). Cards of the
   same day sit 16px apart; a new day adds 12px more, so the days read as groups. */
body.bp-cl-page #wrap #bp-legal .bp-cl-list {
  display: grid;
  gap: var(--space-4, 1rem);
  margin: var(--space-4, 1rem) 0 0;
  padding: 0;
  list-style: none;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-entry {
  position: relative;
  display: grid;
  grid-template-columns: var(--cl-date-w) minmax(0, 1fr);
  column-gap: var(--space-6, 1.5rem);
  margin: 0;
  padding: 0;
  scroll-margin-top: calc(var(--sticky-nav-height, 0px) + var(--legal-scroll-gap));
}
body.bp-cl-page #wrap #bp-legal .bp-cl-entry:not(:first-child):not(.bp-cl-entry--first):not(.bp-cl-entry--same-day) {
  margin-top: var(--space-3, 0.75rem);
}
body.bp-cl-page #wrap #bp-legal .bp-cl-entry[hidden] {
  display: none;
}
/* lines up with the card's type label (card padding + its 1px border) */
body.bp-cl-page #wrap #bp-legal .bp-cl-date {
  padding-top: calc(var(--cl-card-pad-y) + 0.25rem);
  color: var(--cl-text-meta);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
/* later entries of the same day: the date stays for screen readers only */
body.bp-cl-page #wrap #bp-legal .bp-cl-entry--same-day > .bp-cl-date {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
/* the card: the legal pages' white card (1px #ededed, 16px radius) with a lighter shadow, so a long list stays calm */
body.bp-cl-page #wrap #bp-legal .bp-cl-body {
  grid-column: 2;
  min-width: 0;
  padding: var(--cl-card-pad-y) var(--cl-card-pad-x);
  background: #fff;
  border: 1px solid var(--legal-line);
  border-radius: var(--legal-radius);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
}
body.bp-cl-page #wrap #bp-legal .bp-cl-doc p.bp-cl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.75rem;
  margin: 0 0 var(--space-2, 0.5rem);
  line-height: 1.5;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-type {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full, 9999px);
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: var(--tracking-caps, 0.06em);
  text-transform: uppercase;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-type--new {
  background: #e6f2fd;
  color: #0261b0;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-type--improved {
  background: #e7f5ed;
  color: #1d7346;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-type--fixed {
  background: #f1f3f6;
  color: #4b5563;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-area {
  color: var(--cl-text-meta);
  font-size: 0.8125rem;
  font-weight: 500;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-doc .bp-cl-body h3 {
  margin: 0 0 var(--space-2, 0.5rem);
  font-size: var(--text-lg, 1.125rem) !important;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-doc .bp-cl-body p:not(.bp-cl-meta) {
  margin: 0;
  font-size: var(--text-base, 1rem);
  line-height: 1.6;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-doc .bp-cl-body a.bp-legal-more {
  display: inline-block;
  margin-top: var(--space-3, 0.75rem);
}

/* the entry's image: under the text, above the link. A click opens it larger (#cl-zoom). */
body.bp-cl-page #wrap #bp-legal .bp-cl-doc .bp-cl-body a.bp-cl-shot {
  position: relative;
  display: block;
  margin-top: var(--space-4, 1rem);
  overflow: hidden;
  border: 1px solid var(--legal-line);
  border-radius: 0.625rem;
  background: var(--legal-tint);
  line-height: 0;
  cursor: zoom-in;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-shot img {
  display: block;
  width: 100%;
  height: auto;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-shot-hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.18);
  color: var(--legal-ink);
  font-size: 0.875rem;
  line-height: 1;
  transition: background-color var(--dur-fast, 160ms) ease, color var(--dur-fast, 160ms) ease;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-shot:hover .bp-cl-shot-hint {
  background: var(--legal-ink);
  color: #fff;
}
body.bp-cl-page #wrap #bp-legal .bp-cl-doc .bp-cl-body a.bp-cl-shot:focus-visible {
  outline: 2px solid var(--legal-link);
  outline-offset: 2px;
}

/* the larger view: the affiliate page's video dialog (navy backdrop, close button above the right corner) */
html.bp-cl-zoom-open {
  overflow: hidden;
}
body.bp-cl-page .bp-cl-zoom {
  width: min(75rem, calc(100vw - 2rem));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  background: transparent;
}
body.bp-cl-page .bp-cl-zoom::backdrop {
  background: rgba(10, 20, 35, 0.85);
}
body.bp-cl-page .bp-cl-zoom-figure {
  margin: 0;
  text-align: center;
}
body.bp-cl-page .bp-cl-zoom-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 9rem);
  margin: 0 auto;
  border-radius: 0.75rem;
  background: #fff;
  cursor: zoom-out;
}
body.bp-cl-page .bp-cl-zoom-caption {
  margin-top: var(--space-3, 0.75rem);
  color: rgba(255, 255, 255, 0.85);
  font-size: var(--text-sm, 0.875rem);
  font-weight: 500;
  line-height: 1.5;
}
body.bp-cl-page .bp-cl-zoom-close {
  position: absolute;
  top: -3.25rem;
  right: -0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  transition: background-color 160ms ease;
}
body.bp-cl-page .bp-cl-zoom-close:hover {
  background: rgba(255, 255, 255, 0.14);
}
body.bp-cl-page .bp-cl-zoom-close:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* a highlighted (major) update: the legal pages' full card shadow and a larger title */
body.bp-cl-page #wrap #bp-legal .bp-cl-entry--highlight .bp-cl-body {
  box-shadow: var(--legal-card-shadow);
}
body.bp-cl-page #wrap #bp-legal .bp-cl-doc .bp-cl-entry--highlight .bp-cl-body h3 {
  font-size: var(--text-xl, 1.25rem) !important;
}

/* an entry opened from a link (#slug) gets a soft blue outline */
body.bp-cl-page #wrap #bp-legal .bp-cl-entry:target .bp-cl-body {
  border-color: #9fcdf5;
  box-shadow: 0 0 0 3px rgba(2, 135, 237, 0.12), 0 4px 16px rgba(15, 23, 42, 0.05);
}

body.bp-cl-page #wrap #bp-legal .bp-cl-empty {
  padding: var(--space-8, 2rem);
  border: 1px solid var(--legal-line);
  border-radius: var(--legal-radius);
}

/* phones: the date sits above its day's first card */
@media (max-width: 767px) {
  body.bp-cl-page {
    --cl-card-pad-y: var(--space-5, 1.25rem);
    --cl-card-pad-x: var(--space-5, 1.25rem);
  }
  body.bp-cl-page #wrap #bp-legal .bp-cl-filter {
    gap: 0.375rem;
    margin-bottom: var(--space-6, 1.5rem);
  }
  body.bp-cl-page #wrap #bp-legal .bp-cl-filter-btn {
    gap: 0.3rem;
    min-height: 2.75rem;
    padding: 0 0.75rem;
  }
  body.bp-cl-page #wrap #bp-legal .bp-cl-doc h2 {
    font-size: 1.375rem !important;
  }
  body.bp-cl-page #wrap #bp-legal .bp-cl-entry {
    display: block;
  }
  body.bp-cl-page #wrap #bp-legal .bp-cl-entry:not(:first-child):not(.bp-cl-entry--first):not(.bp-cl-entry--same-day) {
    margin-top: var(--space-4, 1rem);
  }
  body.bp-cl-page #wrap #bp-legal .bp-cl-date {
    display: block;
    margin: 0 0 var(--space-2, 0.5rem);
    padding: 0;
  }
  body.bp-cl-page #wrap #bp-legal .bp-cl-doc .bp-cl-entry--highlight .bp-cl-body h3 {
    font-size: var(--text-lg, 1.125rem) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.bp-cl-page #wrap #bp-legal .bp-cl-filter-btn,
  body.bp-cl-page #wrap #bp-legal .bp-cl-shot-hint,
  body.bp-cl-page .bp-cl-zoom-close {
    transition: none;
  }
}
