/* ==========================================================================
   MedicareInsights — "The Medicare Advantage Bid Process" learning module
   Scoped to .bp-module. Surfaces/typography inherit the site base CSS
   (--bg/--surface/--ink/--muted/--faint/--border/--chip/--accent); this file
   only adds the module's display type and semantic colour coding.
   ========================================================================== */

.bp-module {
  /* --- brand accents (module display type) --- */
  --bp-navy: #173a5a;
  --bp-navy-soft: #2a4f70;
  --bp-navy-tint: #e3eaf0;
  --bp-amber: #8f5a0d;
  --bp-amber-soft: #b07114;
  --bp-amber-tint: #f4e7cf;

  /* --- semantic colour coding for content blocks --- */
  --bp-cms: #1f5d8c;
  --bp-cms-tint: #dfeaf3;
  --bp-ben: #2f6b3f;
  --bp-ben-tint: #dceadf;
  --bp-carrier: #6b4f8c;
  --bp-carrier-tint: #e7e0ef;
  --bp-critical: #9b2c2c;
  --bp-critical-tint: #f1dcdc;

  /* --- surfaces mapped to the existing site tokens --- */
  --bp-surface: var(--surface);
  --bp-surface-2: var(--surface);
  --bp-surface-offset: var(--chip);
  --bp-border: var(--border);
  --bp-divider: var(--border);

  --bp-radius-sm: 0.375rem;
  --bp-radius-md: 0.625rem;
  --bp-radius-lg: 0.875rem;
  --bp-radius-xl: 1.25rem;
  --bp-radius-full: 9999px;

  --bp-shadow-sm: 0 1px 2px rgba(22, 32, 43, 0.06);
  --bp-shadow-md: 0 6px 18px rgba(22, 32, 43, 0.08);
  --bp-shadow-lg: 0 18px 44px rgba(22, 32, 43, 0.12);

  --bp-display: "Fraunces", Georgia, "Times New Roman", serif;
  --bp-transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] .bp-module {
  --bp-navy: #6fa3c9;
  --bp-navy-soft: #8fb8d6;
  --bp-navy-tint: #1e2a35;
  --bp-amber: #e0a93f;
  --bp-amber-soft: #ecbf63;
  --bp-amber-tint: #2f2818;

  --bp-cms: #7bb0d8;
  --bp-cms-tint: #1c2832;
  --bp-ben: #7bbf86;
  --bp-ben-tint: #1d2a20;
  --bp-carrier: #b79ad1;
  --bp-carrier-tint: #272032;
  --bp-critical: #e08585;
  --bp-critical-tint: #2f1f1f;

  --bp-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --bp-shadow-md: 0 6px 18px rgba(0, 0, 0, 0.45);
  --bp-shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.5);
}

/* ---------- section rhythm ---------- */
.bp-module section {
  padding: 4rem 0 0;
  scroll-margin-top: 4.5rem;
}
.bp-module .bp-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bp-amber);
  margin: 0 0 0.85rem;
}
.bp-module h2.bp-h2 {
  font-family: var(--bp-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(1.35rem, 2.6vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--bp-navy);
  margin: 0 0 0.55rem;
}
.bp-module .bp-lede {
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.65;
  max-width: 68ch;
  margin: 0 0 1.6rem;
}

/* ---------- hero ---------- */
.bp-hero {
  padding: 2.75rem 0 0.5rem !important;
}
.bp-hero h1 {
  font-family: var(--bp-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(1.95rem, 5vw, 3rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--bp-navy);
  margin: 0 0 0.9rem;
  max-width: 24ch;
}
.bp-hero .bp-sub {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 64ch;
  margin: 0 0 1.35rem;
}
.bp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.6rem;
}
.bp-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: var(--bp-radius-full);
  padding: 0.3rem 0.85rem;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid var(--bp-border);
}
.bp-chip--navy {
  background: var(--bp-navy-tint);
  color: var(--bp-navy);
}
.bp-chip--amber {
  background: var(--bp-amber-tint);
  color: var(--bp-amber);
}
.bp-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.bp-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--bp-radius-md);
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid var(--bp-navy);
  transition: transform var(--bp-transition), box-shadow var(--bp-transition),
    background-color var(--bp-transition);
}
.bp-btn--solid {
  background: var(--bp-navy);
  color: #fbfaf6;
}
[data-theme="dark"] .bp-btn--solid {
  color: #14171d;
}
.bp-btn--ghost {
  background: transparent;
  color: var(--bp-navy);
}
.bp-btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--bp-shadow-md);
}

/* ---------- how to use / legend ---------- */
.bp-legend {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.7rem;
  margin: 1.25rem 0 0;
  padding: 0;
  list-style: none;
}
.bp-legend li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-md);
  padding: 0.7rem 0.9rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.bp-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: var(--bp-radius-full);
  flex: 0 0 auto;
  margin-top: 0.3rem;
}
.bp-dot--cms { background: var(--bp-cms); }
.bp-dot--ben { background: var(--bp-ben); }
.bp-dot--carrier { background: var(--bp-carrier); }
.bp-dot--critical { background: var(--bp-critical); }

.bp-howto-steps {
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
  max-width: 70ch;
}

/* ==========================================================================
   Interactive timeline
   ========================================================================== */
.bp-timeline {
  display: grid;
  grid-template-columns: 22rem minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
  margin-top: 1.75rem;
}

/* --- left rail --- */
.bp-rail {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.35rem 0;
}
.bp-rail::before {
  content: "";
  position: absolute;
  /* aligned to the marker centre: node padding (0.65rem) + marker margin
     (0.275rem) + half the 0.95rem marker, less half the 3px rule */
  left: 1.3rem;
  top: 1.35rem;
  bottom: 1.35rem;
  width: 3px;
  border-radius: 3px;
  background: linear-gradient(
    to bottom,
    var(--bp-navy),
    var(--bp-amber),
    var(--bp-navy)
  );
  opacity: 0.4;
  pointer-events: none;
}
.tl-node {
  position: relative;
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.85rem;
  align-items: start;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: var(--bp-radius-md);
  padding: 0.6rem 0.65rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
  transition: background-color var(--bp-transition);
}
.tl-node:hover {
  background: var(--bp-surface-offset);
}
.tl-marker {
  position: relative;
  z-index: 1;
  width: 0.95rem;
  height: 0.95rem;
  margin: 0.28rem 0.275rem;
  border-radius: var(--bp-radius-full);
  border: 2px solid var(--bp-navy);
  background: var(--bp-surface);
  transition: transform var(--bp-transition), background-color var(--bp-transition),
    border-color var(--bp-transition);
}
.tl-node[data-cat="critical"] .tl-marker {
  border-color: var(--bp-critical);
}
.tl-node:hover .tl-marker,
.tl-node[aria-selected="true"] .tl-marker {
  background: var(--bp-amber);
  border-color: var(--bp-amber);
  transform: scale(1.12);
}
.tl-node[data-cat="critical"]:hover .tl-marker,
.tl-node[data-cat="critical"][aria-selected="true"] .tl-marker {
  background: var(--bp-critical);
  border-color: var(--bp-critical);
}
.tl-month {
  display: block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--bp-amber);
  margin-bottom: 0.15rem;
}
.tl-title {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--muted);
}
.tl-node[aria-selected="true"] {
  background: var(--bp-surface);
  box-shadow: var(--bp-shadow-sm);
}
.tl-node[aria-selected="true"] .tl-title {
  color: var(--ink);
  font-weight: 600;
}

/* --- right detail panel --- */
.bp-detail {
  position: sticky;
  top: 5rem;
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-radius: var(--bp-radius-xl);
  box-shadow: var(--bp-shadow-md);
  overflow: hidden;
}
.bp-detail__head {
  padding: 1.6rem 1.75rem 1.35rem;
  border-bottom: 1px solid var(--bp-divider);
  background: var(--bp-surface);
}
.bp-detail__month {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--bp-amber);
  margin: 0 0 0.4rem;
}
.bp-detail__title {
  font-family: var(--bp-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.25;
  letter-spacing: -0.015em;
  color: var(--bp-navy);
  margin: 0 0 0.7rem;
}
.bp-detail__date {
  display: block;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  text-transform: none;
  margin-bottom: 0.3rem;
}
.bp-tag {
  display: inline-block;
  background: var(--bp-navy-tint);
  color: var(--bp-navy);
  border-radius: var(--bp-radius-full);
  padding: 0.25rem 0.8rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.bp-tag--critical {
  background: var(--bp-critical-tint);
  color: var(--bp-critical);
}
.bp-detail__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 1.5rem 1.75rem;
}
.bp-block {
  background: var(--bp-surface-offset);
  border-radius: var(--bp-radius-lg);
  padding: 1rem 1.1rem;
}
.bp-block--plain {
  grid-column: 1 / -1;
  background: var(--bp-amber-tint);
}
.bp-block--cms { background: var(--bp-cms-tint); }
.bp-block--ben { background: var(--bp-ben-tint); }
.bp-block--carrier { background: var(--bp-carrier-tint); }
.bp-block__label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.5rem;
}
.bp-block--cms .bp-block__label { color: var(--bp-cms); }
.bp-block--ben .bp-block__label { color: var(--bp-ben); }
.bp-block--carrier .bp-block__label { color: var(--bp-carrier); }
.bp-block--plain .bp-block__label { color: var(--bp-amber); }
.bp-block p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink);
}
.bp-block--plain p {
  font-size: 15px;
  line-height: 1.55;
}
.bp-detail__foot {
  border-top: 1px solid var(--bp-divider);
  background: var(--bp-surface-offset);
  padding: 1rem 1.75rem 1.15rem;
}
.bp-detail__foot h4 {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.5rem;
}
.bp-cites {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1rem;
}
.bp-cites a {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--bp-navy);
  text-decoration: underline dashed var(--bp-border);
  text-underline-offset: 3px;
}
.bp-cites a:hover {
  text-decoration: underline solid var(--bp-amber);
}

/* ==========================================================================
   D-SNP service area reductions
   ========================================================================== */
.bp-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 1.1rem;
}
.bp-card {
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-top: 4px solid var(--bp-amber);
  border-radius: var(--bp-radius-lg);
  padding: 1.35rem 1.4rem;
  transition: transform var(--bp-transition), box-shadow var(--bp-transition);
}
.bp-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--bp-shadow-lg);
}
.bp-card h3 {
  font-family: var(--bp-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--bp-navy);
  margin: 0 0 0.6rem;
}
.bp-card p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}
.bp-card .bp-card__cite {
  display: block;
  margin-top: 0.85rem;
  font-size: 11.5px;
  color: var(--faint);
  font-weight: 600;
}
.bp-callout {
  margin-top: 1.35rem;
  background: var(--bp-amber-tint);
  border: 1px solid var(--bp-border);
  border-left: 4px solid var(--bp-amber);
  border-radius: var(--bp-radius-lg);
  padding: 1.35rem 1.5rem;
}
.bp-callout h3 {
  font-family: var(--bp-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.08rem;
  color: var(--bp-amber);
  margin: 0 0 0.55rem;
}
.bp-callout p {
  margin: 0;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  max-width: 78ch;
}

/* ==========================================================================
   Renewal / non-renewal accordion
   ========================================================================== */
.bp-accordion {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}
.bp-acc {
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-left: 4px solid var(--bp-critical);
  border-radius: var(--bp-radius-lg);
  overflow: hidden;
}
.bp-acc__btn {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 1.1rem 1.35rem;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.bp-acc__btn:hover {
  background: var(--bp-surface-offset);
}
.bp-acc__label {
  flex: 1 1 auto;
  min-width: 0;
}
.bp-acc__when {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--bp-critical);
  margin-bottom: 0.2rem;
}
.bp-acc__title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--ink);
}
.bp-acc__chev {
  flex: 0 0 auto;
  width: 1rem;
  height: 1rem;
  color: var(--bp-navy);
  transition: transform var(--bp-transition);
}
.bp-acc__btn[aria-expanded="true"] .bp-acc__chev {
  transform: rotate(45deg);
}
.bp-acc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--bp-transition);
}
.bp-acc__panel[data-open="true"] {
  grid-template-rows: 1fr;
}
.bp-acc__inner {
  overflow: hidden;
}
.bp-acc__rows {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  padding: 0 1.35rem 1.2rem;
}
.bp-acc__row h4 {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 0.45rem;
}
.bp-acc__row--cms h4 { color: var(--bp-cms); }
.bp-acc__row--ben h4 { color: var(--bp-ben); }
.bp-acc__row--carrier h4 { color: var(--bp-carrier); }
.bp-acc__row p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}
.bp-acc__cite {
  padding: 0 1.35rem 1.2rem;
  font-size: 11.5px;
  color: var(--faint);
  font-weight: 600;
}

/* ==========================================================================
   Beneficiary impact
   ========================================================================== */
.bp-impact {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.1rem;
}
.bp-ic {
  background: var(--bp-surface);
  border: 1px solid var(--bp-border);
  border-left: 4px solid var(--bp-cms);
  border-radius: var(--bp-radius-lg);
  padding: 1.35rem 1.4rem;
}
.bp-ic--ben { border-left-color: var(--bp-ben); }
.bp-ic--critical { border-left-color: var(--bp-critical); }
.bp-ic__num {
  font-family: var(--bp-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--bp-amber);
  opacity: 0.7;
  display: block;
  margin-bottom: 0.5rem;
}
.bp-ic h3 {
  font-family: var(--bp-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.3;
  color: var(--bp-navy);
  margin: 0 0 0.55rem;
}
.bp-ic p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--muted);
}
.bp-ic__cite {
  display: block;
  margin-top: 0.8rem;
  font-size: 11.5px;
  color: var(--faint);
  font-weight: 600;
}

/* ==========================================================================
   Sources
   ========================================================================== */
.bp-sources {
  counter-reset: src;
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  /* multi-column so the numbering reads down the first column, then the second */
  columns: 2 20rem;
  column-gap: 2.5rem;
}
.bp-sources li {
  counter-increment: src;
  display: grid;
  grid-template-columns: 2.1rem minmax(0, 1fr);
  gap: 0.5rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--bp-divider);
  break-inside: avoid;
}
.bp-sources li::before {
  content: counter(src);
  font-family: var(--bp-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--bp-amber);
  text-align: right;
  padding-top: 0.05rem;
}
.bp-src__name {
  display: block;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
}
.bp-src__note {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin: 0.15rem 0 0.25rem;
  line-height: 1.5;
}
.bp-src__link {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--bp-navy);
}
.bp-disclaimer {
  margin-top: 1.75rem;
  background: var(--bp-surface-offset);
  border-left: 4px solid var(--bp-navy);
  border-radius: 0 var(--bp-radius-md) var(--bp-radius-md) 0;
  padding: 1.1rem 1.35rem;
  font-size: 12.5px;
  line-height: 1.7;
  color: var(--muted);
  max-width: 82ch;
}

/* ==========================================================================
   Accessibility & motion
   ========================================================================== */
.bp-module :focus-visible {
  outline: 2px solid var(--bp-amber);
  outline-offset: 3px;
  border-radius: var(--bp-radius-sm);
}
.bp-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (prefers-reduced-motion: reduce) {
  .bp-module *,
  .bp-module *::before,
  .bp-module *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 880px) {
  .bp-timeline {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
  }
  .bp-detail {
    position: static;
  }
  .bp-rail {
    max-height: 22rem;
    overflow-y: auto;
    padding-right: 0.35rem;
  }
}

@media (max-width: 760px) {
  .bp-module section {
    padding-top: 3rem;
  }
  .bp-acc__rows {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .bp-detail__body {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 620px) {
  .bp-detail__head {
    padding: 1.2rem 1.15rem 1rem;
  }
  .bp-detail__body {
    padding: 1.1rem 1.15rem;
  }
  .bp-detail__foot {
    padding: 0.9rem 1.15rem 1rem;
  }
  .bp-block {
    padding: 0.85rem 0.95rem;
  }
  .bp-acc__btn,
  .bp-acc__rows,
  .bp-acc__cite {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .bp-ctas .bp-btn {
    width: 100%;
    justify-content: center;
  }
}
