/* =============================================================
   Trupoint Health — Biomarker Editorial Template
   Design: Direction B (centered, magazine-style reading layout)
   Fonts: Inter (body) + Fraunces (headings)
   ============================================================= */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&display=swap");

/* ── Design tokens ── */
:root {
  /* Brand colour (#144652) and derived tints */
  --bm-brand:        #144652;   /* primary: headings, hero, CTA, links, buttons, active nav */
  --bm-brand-dark:   #0E343C;   /* hover / gradient end */
  --bm-brand-soft:   #E9EFF0;   /* light tint for soft backgrounds */
  --bm-brand-border: #D4DEE0;   /* light tint for borders */
  --bm-brand-pale:   #AFC5CA;   /* light tint for text on the brand-dark CTA */

  /* "Book this test" booking CTA */
  --bm-cta:          #73282E;   /* booking button background */
  --bm-cta-dark:     #5A1F24;   /* booking button hover */

  --tp-primary-navy:    #0B1F3A;
  --tp-clinical-blue:   var(--bm-brand);
  --tp-partner-teal:    #0EA5A4;
  --tp-soft-grey-bg:    #F7F9FC;
  --tp-white:           #FFFFFF;
  --tp-border-grey:     #E5E7EB;
  --tp-bg-subtle:       #F8FAFC;
  --tp-text-primary:    #111827;
  --tp-text-secondary:  #6B7280;
  --tp-shadow-card:     0 8px 24px rgba(11,31,58,.08);
  --tp-shadow-card-soft:0 2px 10px rgba(15,23,42,.06);

  --bm-teal:       #0EA5A4;       /* highlight accent — eyebrow, abbr, icons, progress bar */
  --bm-teal-soft:  #E6F7F6;
  --bm-blue:       var(--bm-brand);      /* links, buttons, arrows, active states */
  --bm-blue-soft:  var(--bm-brand-soft);
  --bm-navy:       var(--bm-brand);      /* headings, hero title, CTA gradient, sticky bar */
  --bm-low:        #1F7FB8;       /* semantic: low symptoms/causes (unchanged) */
  --bm-low-soft:   #EAF4FB;
  --bm-low-border: #CFE6F4;
  --bm-high:       #D9542B;       /* semantic: high symptoms/causes (unchanged) */
  --bm-high-soft:  #FBEEE8;
  --bm-high-border:#F3D6C8;
  --bm-ink:        #1A2433;
  --bm-ink-soft:   #51607A;
  --bm-radius:     16px;
  --bm-content:    1180px;

  /* Sticky offsets — set at runtime by biomarker-page.js to the site header height */
  --bm-secnav-top: 0px;
  --bm-scroll-pad: 96px;
}

html { scroll-padding-top: var(--bm-scroll-pad, 96px); }

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; }

body.tpt-bm-editorial {
  margin: 0;
  background: #FCFBF9;
  color: var(--bm-ink);
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.tpt-bm-editorial a { color: var(--bm-blue); text-decoration: none; }
body.tpt-bm-editorial a:hover { text-decoration: underline; text-underline-offset: 2px; }
body.tpt-bm-editorial p { margin: 0; }
body.tpt-bm-editorial h1, body.tpt-bm-editorial h2,
body.tpt-bm-editorial h3 { margin: 0; }

/* ── Reading progress bar ── */
.b-progress {
  position: fixed; top: var(--bm-secnav-top, 0px); left: 0;
  height: 2px; background: var(--bm-teal);
  width: 0; z-index: 61;
  transition: width 80ms linear;
}

/* ── Section nav (horizontal sticky pill rail) ──
   Floats below the site header; offset is measured by biomarker-page.js. */
.b-secnav {
  position: sticky; top: var(--bm-secnav-top, 0px); z-index: 60;
  background: rgba(252,251,249,0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--tp-border-grey);
}
.b-secnav__inner {
  max-width: 1180px; margin: 0 auto;
  padding: 10px 24px;
  display: flex; gap: 6px;
  overflow-x: auto; scrollbar-width: none;
}
.b-secnav__inner::-webkit-scrollbar { display: none; }
.b-secnav__inner a {
  flex: none; font-size: 13px; font-weight: 500; color: var(--bm-ink-soft);
  padding: 6px 13px; border-radius: 9999px; white-space: nowrap;
  transition: background-color 120ms ease, color 120ms ease;
}
.b-secnav__inner a:hover { background: var(--tp-soft-grey-bg); text-decoration: none; color: var(--bm-ink); }
.b-secnav__inner a.active { background: var(--bm-navy); color: #fff; }

/* ── Breadcrumb ── */
.bm-crumbs { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--tp-text-secondary); flex-wrap: wrap; }
.bm-crumbs a { color: var(--tp-text-secondary); }
.bm-crumbs a:hover { color: var(--bm-blue); }
.bm-crumbs .sep { opacity: 0.5; }
.bm-crumbs .cur { color: var(--bm-ink); font-weight: 500; }

/* ── Hero — editorial centered ── */
.b-hero {
  text-align: center;
  padding: 52px 24px 30px;
  max-width: 760px; margin: 0 auto;
}
.b-hero .bm-crumbs { justify-content: center; margin-bottom: 22px; }

.b-eyebrow {
  font-size: 12px; text-transform: uppercase;
  letter-spacing: 0.12em; font-weight: 600;
  color: var(--bm-teal); margin-bottom: 16px;
}
.b-title {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 56px;
  line-height: 1.04; letter-spacing: -0.015em;
  color: var(--bm-navy);
}
.b-title .abbr { color: var(--bm-teal); font-style: italic; }

.b-sub {
  font-size: 20px; line-height: 1.6;
  color: var(--bm-ink-soft);
  margin: 20px auto 26px; max-width: 60ch;
}
.bm-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.bm-chip {
  display: inline-flex; align-items: baseline; gap: 6px;
  background: var(--tp-white); border: 1px solid var(--tp-border-grey);
  border-radius: 9999px; padding: 7px 14px; font-size: 13px;
}
.bm-chip b { color: var(--bm-navy); font-weight: 600; }
.bm-chip span { color: var(--tp-text-secondary); }

/* ── Hero image ── */
.b-heroimg { max-width: 1000px; margin: 36px auto 0; padding: 0 24px; }
.bm-hero-img-wrap { margin: 0; }
.bm-hero-img {
  display: block; width: 100%;
  border-radius: 20px; overflow: hidden;
  height: 380px; object-fit: cover;
  box-shadow: var(--tp-shadow-card-soft);
}

/* ── Trust band ── */
.b-trustband { max-width: 1000px; margin: 28px auto 0; padding: 0 24px; }
.bm-trust {
  display: flex; flex-wrap: wrap; gap: 22px;
  justify-content: center; padding: 18px 22px;
  background: var(--tp-white);
  border: 1px solid var(--tp-border-grey);
  border-radius: 14px;
}
.bm-trust__item { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; color: var(--bm-ink); }
.bm-trust__item svg { width: 18px; height: 18px; color: var(--bm-teal); flex: none; }

/* ── Article reading column ── */
.b-article { max-width: 720px; margin: 0 auto; padding: 28px 24px 0; }
.b-article .bm-section + .bm-section { margin-top: 56px; }
.b-article .bm-section { scroll-margin-top: 120px; }

/* Section headings — Fraunces serif for editorial feel */
.b-article .bm-section__head {
  display: block;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--tp-border-grey);
  margin-bottom: 20px;
}
.b-article .bm-section h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600; font-size: 30px;
  letter-spacing: -0.01em; color: var(--bm-navy);
}

/* ── Prose ── */
.bm-prose { max-width: none; }
.bm-prose p { margin-bottom: 14px; color: var(--bm-ink); }
.bm-prose p:last-child { margin-bottom: 0; }
.b-article .bm-prose p { font-size: 17.5px; line-height: 1.72; }
.bm-lead { font-size: 20px; line-height: 1.6; color: var(--bm-ink); }

/* ── Info / medical note ── */
.bm-medical-note {
  display: flex; gap: 12px; padding: 16px 18px;
  border-radius: 12px; background: var(--bm-blue-soft);
  border: 1px solid var(--bm-brand-border); font-size: 13.5px;
  color: var(--bm-brand-dark); line-height: 1.5;
}
.bm-medical-note svg { flex: none; color: var(--bm-blue); width: 20px; height: 20px; margin-top: 1px; }

/* ── Functions grid ── */
.bm-func-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.bm-func {
  display: flex; gap: 13px; padding: 16px;
  background: var(--tp-white); border: 1px solid var(--tp-border-grey);
  border-radius: 14px;
}
.bm-func__ico {
  flex: none; width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--bm-teal-soft); color: var(--bm-teal);
}
.bm-func__ico svg { width: 20px; height: 20px; }
.bm-func h3 { font-size: 16px; font-weight: 700; color: var(--bm-ink); margin-bottom: 3px; }
.bm-func p { font-size: 14px; color: var(--bm-ink-soft); line-height: 1.55; }

/* ── Reference range card ── */
.bm-rangecard {
  background: var(--tp-white); border: 1px solid var(--tp-border-grey);
  border-radius: var(--bm-radius); padding: 26px;
  box-shadow: var(--tp-shadow-card-soft);
}
.bm-rangecard__header {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 6px;
}
.bm-rangecard__header h3 { font-size: 15px; font-weight: 700; color: var(--bm-ink); }
.bm-rangecard__unit { font-size: 13px; color: var(--tp-text-secondary); }
.bm-rangecard__disclaimer {
  font-size: 12.5px; color: var(--tp-text-secondary);
  margin-top: 14px; line-height: 1.5;
}

/* Gauge */
.bm-gauge { margin: 8px 0 6px; }
.bm-gauge__track {
  position: relative; height: 18px; border-radius: 9999px;
  overflow: hidden; display: flex;
}
.bm-gauge__zone { height: 100%; }
.bm-gauge__labels { display: flex; margin-top: 10px; }
.bm-gauge__lab { font-size: 12px; text-align: center; color: var(--tp-text-secondary); padding: 0 4px; }
.bm-gauge__lab b { display: block; font-size: 13px; font-weight: 600; }

/* Table */
.bm-table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 22px; }
.bm-table th,
.bm-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--tp-border-grey); }
.bm-table thead th {
  font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--tp-text-secondary); background: var(--tp-bg-subtle);
}
.bm-table tbody tr:last-child td { border-bottom: 0; }
.bm-table .dot {
  display: inline-block; width: 9px; height: 9px;
  border-radius: 50%; margin-right: 8px; vertical-align: middle;
}

/* ── Low / High panels ── */
.bm-lh { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.bm-lh__card { border-radius: var(--bm-radius); padding: 22px; border: 1px solid; }
.bm-lh__card--low  { background: var(--bm-low-soft);  border-color: var(--bm-low-border); }
.bm-lh__card--high { background: var(--bm-high-soft); border-color: var(--bm-high-border); }
.bm-lh__tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 13px;
  padding: 5px 12px; border-radius: 9999px; margin-bottom: 14px;
}
.bm-lh__tag--low  { background: var(--bm-low);  color: #fff; }
.bm-lh__tag--high { background: var(--bm-high); color: #fff; }
.bm-lh__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bm-lh__list li { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; line-height: 1.5; }
.bm-lh__list li svg { flex: none; width: 17px; height: 17px; margin-top: 2px; }
.bm-lh__card--low  .bm-lh__list li svg { color: var(--bm-low); }
.bm-lh__card--high .bm-lh__list li svg { color: var(--bm-high); }

/* ── Related cards ── */
.bm-rel-grid { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.bm-rel {
  display: block; padding: 16px 18px;
  background: var(--tp-white); border: 1px solid var(--tp-border-grey);
  border-radius: 14px;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.bm-rel:hover {
  text-decoration: none; border-color: var(--bm-blue);
  box-shadow: var(--tp-shadow-card-soft);
}
.bm-rel__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.bm-rel__title { font-weight: 700; color: var(--bm-navy); font-size: 15px; flex: 1; min-width: 0; line-height: 1.3; }
.bm-rel__arrow { color: var(--bm-blue); flex: none; margin-top: 2px; transition: transform 120ms ease; }
.bm-rel:hover .bm-rel__arrow { transform: translateX(3px); }
.bm-rel p { font-size: 13.5px; color: var(--bm-ink-soft); margin-top: 9px; line-height: 1.5; }
.bm-rel__pill {
  align-self: flex-start; white-space: nowrap;
  font-size: 11px; font-weight: 600;
  padding: 3px 9px; border-radius: 9999px;
}

/* ── FAQ accordion ── */
.bm-faq {
  border: 1px solid var(--tp-border-grey); border-radius: 14px;
  overflow: hidden; background: var(--tp-white);
}
.bm-faq__item + .bm-faq__item { border-top: 1px solid var(--tp-border-grey); }
.bm-faq__q {
  width: 100%; text-align: left; background: none; border: 0; cursor: pointer;
  padding: 18px 20px; font: inherit; font-weight: 600; font-size: 15.5px;
  color: var(--bm-navy);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.bm-faq__q:hover { background: var(--tp-soft-grey-bg); }
.bm-faq__q svg { flex: none; transition: transform 200ms ease; color: var(--bm-ink-soft); }
.bm-faq__item.open .bm-faq__q svg { transform: rotate(180deg); }
.bm-faq__a { max-height: 0; overflow: hidden; transition: max-height 240ms ease; }
.bm-faq__a-inner {
  padding: 0 20px 18px; color: var(--bm-ink-soft);
  font-size: 14.5px; line-height: 1.6;
}
.bm-faq__a-inner p { margin-bottom: 10px; }
.bm-faq__a-inner p:last-child { margin-bottom: 0; }

/* ── References ── */
.bm-refs { list-style: none; counter-reset: ref; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.bm-refs li { counter-increment: ref; display: flex; gap: 12px; font-size: 13.5px; color: var(--bm-ink-soft); line-height: 1.5; }
.bm-refs li::before {
  content: counter(ref); flex: none; width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: var(--tp-bg-subtle); color: var(--bm-ink-soft);
  border: 1px solid var(--tp-border-grey);
}
.bm-refs li a { word-break: break-word; }
.bm-refs__meta { font-size: 12.5px; color: var(--tp-text-secondary); margin-top: 16px; line-height: 1.5; }

/* ── Inline CTA band ── */
.b-cta-band { max-width: 720px; margin: 56px auto 0; padding: 0 24px; }
.b-cta-band__inner {
  background: linear-gradient(135deg, var(--bm-brand), var(--bm-brand-dark)); color: #fff;
  border-radius: 20px; padding: 32px;
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
}
.b-cta-band__inner h3 {
  font-family: "Fraunces", serif; font-size: 24px; color: #fff;
}
.b-cta-band__inner p { color: var(--bm-brand-pale); font-size: 15px; margin-top: 6px; max-width: 42ch; }
.b-cta-band__price { margin-left: auto; text-align: right; }
.b-cta-band__price .price { font-size: 30px; font-weight: 700; }
.b-cta-band__price .price small { font-size: 13px; font-weight: 500; color: var(--bm-brand-pale); display: block; }
.b-cta-band__inner .bm-btn { width: auto; margin-top: 12px; }

/* ── Buttons ── */
.bm-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14.5px; padding: 11px 18px; border-radius: 10px;
  border: 1px solid transparent; cursor: pointer;
  transition: background-color 120ms ease, transform 120ms ease;
  text-decoration: none;
}
/* Scoped under body.tpt-bm-editorial so the button text colour beats the
   base `body.tpt-bm-editorial a` link-colour rule (specificity). */
body.tpt-bm-editorial .bm-btn--primary { background: var(--bm-cta); color: #fff; }
body.tpt-bm-editorial .bm-btn--primary:hover { background: var(--bm-cta-dark); text-decoration: none; color: #fff; }
body.tpt-bm-editorial .bm-btn--white { background: #fff; color: var(--bm-navy); }
body.tpt-bm-editorial .bm-btn--white:hover { background: var(--bm-brand-soft); text-decoration: none; color: var(--bm-navy); }

/* ── Sticky bottom CTA bar ── */
.b-stickybar {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  background: var(--tp-white); border: 1px solid var(--tp-border-grey);
  box-shadow: var(--tp-shadow-card);
  border-radius: 9999px; padding: 8px 8px 8px 22px;
  display: flex; align-items: center; gap: 18px; z-index: 60;
  max-width: calc(100vw - 32px);
}
.b-stickybar .lab { font-weight: 700; color: var(--bm-navy); font-size: 14.5px; white-space: nowrap; }
.b-stickybar .lab small { font-weight: 500; color: var(--tp-text-secondary); }

/* ── Responsive ── */
@media (max-width: 720px) {
  .b-title { font-size: 38px; }
  .bm-func-grid,
  .bm-lh,
  .bm-rel-grid { grid-template-columns: 1fr; }
  .b-cta-band__price { margin-left: 0; text-align: left; }
  .b-stickybar { left: 16px; right: 16px; transform: none; max-width: none; }
  .b-stickybar .lab small { display: none; }
  .bm-hero-img { height: 220px; }
  .bm-trust { gap: 14px 22px; }
}
