/*! BioCollex Refresh · module: legal · Terms & Conditions, Privacy Policy, Refund Policy, RUO Agreement
 * The look for legal.js (html.bxrf-legal is set once the page is set up). Phone first; from
 * 1024px the contents list sits beside the text. The theme's header is sticky (67px), so section
 * links stop just below it. Without the script the theme's own layout shows unchanged.
 */

html.bxrf-legal { scroll-behavior: smooth; }

/* ---------- Hero: the facts as pills; the padding under them makes up their height ---------- */
html.bxrf-legal main > section:first-child > div.relative > div { padding-bottom: 40px !important; }
.bxrf-lg-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 16px; }
html.bxrf-legal .bxrf-lg-meta > p {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 6px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; line-height: 1.2; color: #24406f;
  background: rgba(255, 255, 255, .82); box-shadow: 0 2px 10px rgba(10, 31, 68, .06), inset 0 0 0 1px rgba(42, 106, 208, .14);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.bxrf-lg-meta svg { flex: none; color: #2a6ad0; }
@media (min-width: 768px) {
  html.bxrf-legal main > section:first-child > div.relative > div { padding-bottom: 60px !important; }
}
/* Tablets and laptops: the row of pills is wider than the theme's single date line, so the
   lower vial moves out from behind its end. */
@media (min-width: 768px) and (max-width: 1599.98px) {
  html.bxrf-legal main > section:first-child > div[aria-hidden="true"] > div:nth-child(3) { right: 4% !important; }
}

/* ---------- Reading column ---------- */
html.bxrf-legal .bx-legal { padding: 26px 16px 64px; background: linear-gradient(180deg, #fff 0%, #f7faff 55%, #fff 100%); }
html.bxrf-legal .bx-legal-wrap { max-width: 760px; font-size: 15.5px; line-height: 1.75; color: #334155; }
html.bxrf-legal .bxrf-lg-body > p { margin: 0 0 14px; }
html.bxrf-legal .bx-legal-wrap strong { color: #0b1530; font-weight: 700; }
html.bxrf-legal .bxrf-lg-body a:not([class]) { color: #2a6ad0; text-decoration: underline; text-decoration-color: rgba(42, 106, 208, .35); text-underline-offset: 3px; overflow-wrap: anywhere; }
html.bxrf-legal .bxrf-lg-body a:not([class]):hover { text-decoration-color: currentColor; }
/* The theme's navy "Questions about your privacy?" box keeps its white email link */
html.bxrf-legal .bx-legal-wrap .bx-legal-help a:not([class]) { color: #fff; text-decoration-color: rgba(255, 255, 255, .5); }
html.bxrf-legal .bxrf-lg-body > p.bx-legal-lead {
  margin: 0 0 6px; padding: 14px 16px; border-left: 3px solid #2a6ad0; border-radius: 0 14px 14px 0;
  font-size: 16px; color: #1e293b; background: #f3f7fd;
}

/* Section headings: a number badge where the page numbers them, an accent bar where it doesn't */
html.bxrf-legal .bx-legal-wrap .bx-legal-h {
  display: flex; align-items: flex-start; gap: 12px; margin: 40px 0 14px; padding: 0 0 12px;
  border-bottom: 1px solid #e3eaf5; font-size: 21px; line-height: 1.3; font-weight: 800; letter-spacing: -.015em; color: #0b1530;
  scroll-margin-top: 84px;
}
html.bxrf-legal .bx-legal-wrap .bx-legal-h:not(.bxrf-lg-is-num)::before {
  content: ""; flex: none; width: 5px; height: 22px; margin-top: 3px; border-radius: 3px;
  background: linear-gradient(180deg, #2a6ad0, #6fb1f5);
}
.bxrf-lg-num {
  flex: none; display: inline-grid; place-items: center; min-width: 30px; height: 30px; margin-top: -1px; padding: 0 8px;
  border-radius: 10px; font-size: 14px; font-weight: 800; letter-spacing: 0; color: #fff;
  background: linear-gradient(135deg, #213b66, #2a6ad0); box-shadow: 0 8px 16px -10px rgba(42, 106, 208, .9);
}
.bxrf-lg-dot { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* Lists */
html.bxrf-legal .bx-legal-wrap .bxrf-lg-body ul { gap: 8px; margin-bottom: 16px; }
html.bxrf-legal .bx-legal-wrap .bxrf-lg-body ul li { padding-left: 18px; }
html.bxrf-legal .bx-legal-wrap .bxrf-lg-body ul li::before { top: .68em; width: 6px; height: 6px; background: #2a6ad0; }

/* Notices ("Important Notice", "For Research Use Only"): amber, because they are warnings */
html.bxrf-legal .bx-legal-wrap .bx-legal-notice:not(.bx-legal-center) {
  margin: 20px 0 18px; padding: 16px 18px 16px 18px; border: 1px solid #f1d7a6; border-left: 4px solid #e08a1e; border-radius: 14px;
  background: linear-gradient(135deg, #fff7e9, #fffdf8); box-shadow: 0 14px 30px -26px rgba(146, 84, 0, .6);
}
html.bxrf-legal .bx-legal-wrap .bx-legal-notice:not(.bx-legal-center) .bx-legal-notice-h {
  font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #8a4b00;
}
html.bxrf-legal .bx-legal-wrap .bx-legal-notice:not(.bx-legal-center) .bx-legal-notice-h span { border-radius: 8px; color: #fff; background: #e08a1e; }
html.bxrf-legal .bx-legal-wrap .bx-legal-notice:not(.bx-legal-center) > p:not(.bx-legal-notice-h) { color: #4a3510; }
/* "Your Data is Protected" (Privacy): calm blue */
html.bxrf-legal .bx-legal-wrap .bx-legal-center {
  margin: 18px 0; padding: 22px 20px; border: 1px solid #cfe0f7; border-radius: 16px; background: linear-gradient(135deg, #eef5ff, #f8fbff);
}
html.bxrf-legal .bx-legal-wrap .bx-legal-center-ic { width: 38px; height: 38px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #213b66, #2a6ad0); }
html.bxrf-legal .bx-legal-wrap .bx-legal-center-h { font-size: 15px; color: #0b1530; }
/* Privacy's two cards */
html.bxrf-legal .bx-legal-wrap .bx-legal-card {
  padding: 16px 18px; border: 1px solid #dbe6f5; border-radius: 16px; background: linear-gradient(180deg, #f6f9fe, #fff);
  box-shadow: 0 16px 30px -26px rgba(26, 58, 120, .55);
}
html.bxrf-legal .bx-legal-wrap .bx-legal-card .bx-legal-notice-h { font-size: 14.5px; color: #0b1530; }
html.bxrf-legal .bx-legal-wrap .bx-legal-card .bx-legal-notice-h span { border-radius: 9px; color: #2a6ad0; background: #e3edfb; }
/* Address lines */
html.bxrf-legal .bx-legal-wrap .bx-legal-lines {
  padding: 14px 16px; border: 1px solid #e3eaf5; border-radius: 14px; background: #f8fbff; line-height: 1.8; color: #1e293b;
}

/* ---------- "On this page" ---------- */
.bxrf-lg-toc {
  margin: 0 auto 22px; max-width: 760px; border: 1px solid #dbe6f5; border-radius: 18px; background: #fff;
  box-shadow: 0 18px 34px -30px rgba(26, 58, 120, .65); overflow: hidden;
}
.bxrf-lg-toc-h {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border: 0; background: none;
  font: inherit; text-align: left; color: #0b1530; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.bxrf-lg-toc-h:disabled { cursor: default; color: #0b1530; opacity: 1; }
.bxrf-lg-toc-ic { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #fff; background: linear-gradient(135deg, #213b66, #2a6ad0); }
.bxrf-lg-toc-h b { font-size: 15px; font-weight: 800; }
.bxrf-lg-toc-h small { margin-left: auto; font-size: 12.5px; font-weight: 600; color: #5b6a7f; }
.bxrf-lg-toc-chev { flex: none; display: grid; place-items: center; color: #2a6ad0; transition: transform .25s ease; }
.bxrf-lg-toc.is-open .bxrf-lg-toc-chev { transform: rotate(180deg); }
.bxrf-lg-toc > .bxrf-lg-list { display: none; border-top: 1px solid #eef3fa; }
.bxrf-lg-toc.is-open > .bxrf-lg-list { display: block; }
.bxrf-lg-list { list-style: none; margin: 0; padding: 6px 8px 10px; }
html.bxrf-legal .bxrf-lg-list a {
  display: flex; align-items: flex-start; gap: 10px; padding: 8px 10px; border-radius: 12px;
  font-size: 14px; line-height: 1.35; font-weight: 600; color: #24406f; text-decoration: none;
  transition: background-color .2s ease, color .2s ease;
}
html.bxrf-legal .bxrf-lg-list a:hover { background: #f3f7fd; color: #0b1530; }
.bxrf-lg-n {
  flex: none; display: grid; place-items: center; min-width: 22px; height: 22px; margin-top: -1px; border-radius: 7px;
  font-size: 11.5px; font-weight: 800; color: #2a6ad0; background: #eef4fd; transition: background-color .2s ease, color .2s ease;
}
.bxrf-lg-n:empty { min-width: 7px; width: 7px; height: 7px; margin: 6px 7px 0; border-radius: 50%; background: #9cc0f5; }
html.bxrf-legal .bxrf-lg-list a.is-on { color: #0b1530; background: #eaf2fd; }
.bxrf-lg-list a.is-on .bxrf-lg-n { color: #fff; background: #2a6ad0; }
.bxrf-lg-list a.is-on .bxrf-lg-n:empty { background: #2a6ad0; }

/* ---------- Phones and tablets: the "Contents" pill and its sheet ---------- */
.bxrf-lg-fab {
  position: fixed; z-index: 60; left: 14px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 10px; max-width: calc(100% - 112px); height: 50px; padding: 0 14px 0 7px;
  border: 0; border-radius: 999px; color: #fff; font: inherit; text-align: left;
  background: linear-gradient(135deg, #0a1f44 0%, #213b66 60%, #2a6ad0 100%); box-shadow: 0 16px 30px -14px rgba(10, 31, 68, .8);
  opacity: 0; transform: translateY(14px); pointer-events: none; -webkit-tap-highlight-color: transparent;
  transition: opacity .25s ease, transform .3s var(--bxrf-ease, ease);
}
.bxrf-lg-fab.is-on { opacity: 1; transform: none; pointer-events: auto; }
.bxrf-lg-fab-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.bxrf-lg-fab-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
.bxrf-lg-fab-t b { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9cc0f5; }
.bxrf-lg-fab-t small { overflow: hidden; font-size: 13.5px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; color: #fff; }
.bxrf-lg-fab-n { flex: none; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; color: #0a1f44; background: #fff; }
html.bxrf-lock .bxrf-lg-fab { opacity: 0; pointer-events: none; }

.bxrf-lg-sheet { position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: flex-end; justify-content: center; }
.bxrf-lg-sheet[hidden] { display: none; }
.bxrf-lg-sheet-scrim {
  position: absolute; inset: 0; background: rgba(10, 31, 68, .45); opacity: 0; transition: opacity .3s ease;
  -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.bxrf-lg-sheet-card {
  position: relative; width: 100%; max-width: 560px; max-height: 78%; overflow: auto; overscroll-behavior: contain;
  padding: 6px 8px calc(14px + env(safe-area-inset-bottom, 0px)); border-radius: 24px 24px 0 0; background: #fff;
  box-shadow: 0 -20px 50px -20px rgba(10, 31, 68, .45); transform: translateY(100%); transition: transform .32s var(--bxrf-ease, ease);
}
.bxrf-lg-sheet.is-open .bxrf-lg-sheet-scrim { opacity: 1; }
.bxrf-lg-sheet.is-open .bxrf-lg-sheet-card { transform: none; }
.bxrf-lg-sheet-top {
  position: sticky; top: -6px; z-index: 1; display: flex; align-items: center; justify-content: space-between;
  margin: -6px -8px 0; padding: 14px 14px 10px 18px; background: #fff; font-size: 16px; color: #0b1530;
}
.bxrf-lg-sheet-top b { font-weight: 800; }
.bxrf-lg-sheet-x { display: grid; place-items: center; width: 38px; height: 38px; border: 0; border-radius: 50%; color: #24406f; background: #eef4fd; cursor: pointer; }
.bxrf-lg-sheet .bxrf-lg-list { padding-top: 0; }
html.bxrf-legal .bxrf-lg-sheet .bxrf-lg-list a { padding: 11px 10px; font-size: 15px; }

/* ---------- Reading progress ---------- */
.bxrf-lg-progress { position: fixed; z-index: 70; top: 0; left: 0; right: 0; height: 3px; pointer-events: none; }
.bxrf-lg-progress i { display: block; height: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, #2a6ad0, #6fb1f5); }

/* ---------- Related policies ---------- */
.bxrf-lg-rel { margin: 44px 0 0; }
html.bxrf-legal .bxrf-lg-body > aside.bxrf-lg-rel p.bxrf-lg-rel-h { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #2a6ad0; }
.bxrf-lg-rel-grid { display: grid; gap: 10px; }
html.bxrf-legal .bxrf-lg-rel-card {
  display: flex; align-items: center; gap: 12px; padding: 14px; border: 1px solid #dbe6f5; border-radius: 16px;
  color: #0b1530; text-decoration: none; background: #fff; box-shadow: 0 16px 30px -28px rgba(26, 58, 120, .7);
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.bxrf-lg-rel-ic { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #2a6ad0; background: #eef4fd; }
.bxrf-lg-rel-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.bxrf-lg-rel-t b { font-size: 15px; font-weight: 800; }
.bxrf-lg-rel-t small { margin-top: 2px; font-size: 12.5px; color: #5b6a7f; }
.bxrf-lg-rel-go { flex: none; margin-left: auto; color: #2a6ad0; transition: transform .2s ease; }
@media (min-width: 640px) {
  .bxrf-lg-rel-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  html.bxrf-legal .bxrf-lg-rel-card { flex-direction: column; align-items: flex-start; }
  .bxrf-lg-rel-go { position: absolute; right: 14px; top: 14px; }
  html.bxrf-legal .bxrf-lg-rel-card { position: relative; }
}
@media (hover: hover) and (pointer: fine) {
  html.bxrf-legal .bxrf-lg-rel-card:hover { transform: translateY(-2px); border-color: #b9cff0; box-shadow: 0 20px 34px -24px rgba(26, 58, 120, .6); }
  html.bxrf-legal .bxrf-lg-rel-card:hover .bxrf-lg-rel-go { transform: translateX(3px); }
}

/* ---------- Desktop: the contents beside the text ---------- */
@media (min-width: 1024px) {
  html.bxrf-legal .bx-legal { padding: 52px 32px 92px; }
  html.bxrf-legal .bx-legal-wrap { display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 56px; max-width: 1120px; font-size: 16px; }
  .bxrf-lg-toc {
    position: sticky; top: 92px; align-self: start; margin: 0; max-width: none;
    max-height: calc(var(--bxrf-lg-vh, 100vh) - 120px); overflow: auto; overscroll-behavior: contain;
  }
  .bxrf-lg-toc-chev { display: none; }
  .bxrf-lg-body { min-width: 0; max-width: 780px; }
  html.bxrf-legal .bx-legal-wrap .bx-legal-h { font-size: 23px; }
  html.bxrf-legal .bxrf-lg-body > *:first-child { margin-top: 0; }
  .bxrf-lg-fab, .bxrf-lg-sheet { display: none !important; }
}

/* ---------- Print: the document only ---------- */
@media print {
  .bxrf-lg-toc, .bxrf-lg-fab, .bxrf-lg-sheet, .bxrf-lg-progress, .bxrf-lg-rel { display: none !important; }
  html.bxrf-legal .bx-legal-wrap { display: block; max-width: none; }
  html.bxrf-legal .bx-legal { padding: 0; background: none; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html.bxrf-legal { scroll-behavior: auto; }
  .bxrf-lg-fab, .bxrf-lg-sheet-scrim, .bxrf-lg-sheet-card, .bxrf-lg-toc-chev, html.bxrf-legal .bxrf-lg-rel-card, .bxrf-lg-rel-go { transition: none; }
}
