
/* Scoped to this module only (standalone-safe) */
.bcms-content-with-title {
  --page-bg:       #f7f6f3;
  --surface:       #ffffff;
  --ink:           #181818;
  --ink-soft:      #009bcb;
  --text-dark:     #000000;
  --rule:          #e5e3de;
  --accent:        #1b1d36;       /* default accent (kept as-is) */
  --accent-mid:    #3b68f0;
  --accent-light:  #eaeffc;
  --toc-width:     252px;
  --gap:           52px;
  --radius:        8px;
  --font-display:  'Fraunces', Georgia, serif;
  --font-body:     Arial, Helvetica, sans-serif;

  /* Theme hooks: --cwt-accent* set per data-bc-brand in CSS; --cwt-accent-shade optional inline */
  --cwt-accent: unset;
  --cwt-accent-2: unset;
  --cwt-accent-shade: 10%;
}

/* Apply theme overrides only if set */
.bcms-content-with-title {
  --accent: var(--cwt-accent, var(--accent));
  /* accent-mid: link hover; maps to primary-hover from brand CSS */
  --accent-mid: var(--cwt-accent-2, var(--accent-mid));
  --accent-light: color-mix(in srgb, var(--accent) var(--cwt-accent-shade), #ffffff);
}

/* Full palettes per microsite (matches design system + bcms-card-component) */
.bcms-content-with-title[data-bc-brand="academy"] {
  --cwt-accent: #cc0000;
  --cwt-accent-2: #a30000;
  --page-bg: #f5f5f5;
  --surface: #ffffff;
  --ink: #000000;
  --text-dark: #333333;
  --rule: #e6e6e6;
  --ink-soft: #004b8d;
}

.bcms-content-with-title[data-bc-brand="automation"] {
  --cwt-accent: #1f6d82;
  --cwt-accent-2: #185b6c;
  --page-bg: #f0f6f7;
  --surface: #ffffff;
  --ink: #0e1f24;
  --text-dark: #2a3a3f;
  --rule: #dce7ea;
  --ink-soft: #cc0000;
}

.bcms-content-with-title[data-bc-brand="valueops"] {
  --cwt-accent: #f97316;
  --cwt-accent-2: #ea580c;
  --page-bg: #faf7f4;
  --surface: #ffffff;
  --ink: #1c1814;
  --text-dark: #3a3530;
  --rule: #eee8e2;
  --ink-soft: #004b8d;
}

.bcms-content-with-title[data-bc-brand="network_observability"] {
  --cwt-accent: #0f5b78;
  --cwt-accent-2: #0c4e68;
  --page-bg: #eff5f7;
  --surface: #ffffff;
  --ink: #0a1a22;
  --text-dark: #283840;
  --rule: #d4e2e8;
  --ink-soft: #cc0000;
}

/* ── Reset (scoped) ────────────────────────────────────────── */
.bcms-content-with-title,
.bcms-content-with-title * ,
.bcms-content-with-title *::before,
.bcms-content-with-title *::after { box-sizing: border-box; }
.bcms-content-with-title { font-family: var(--font-body); color: var(--ink); -webkit-font-smoothing: antialiased; }

/* ── Outer wrapper ─────────────────────────────────────────── */
/* 1246px + 15px horizontal gutter matches TSL .nob-header .inner (Automation / ValueOps broadcom.css) */
.bcms-content-with-title.hs-module {
  max-width: 1246px;
  width: 100%;
  margin: 0 auto;
  padding: 50px 32px;
  box-sizing: border-box;
/*   padding: 140rem 20rem 60rem; */
/*   padding: 72px 32px 120px; */
}

/* ── Layout ────────────────────────────────────────────────── */
.module-layout {
  display: flex;
  gap: var(--gap);
  align-items: flex-start;
}

/* ══════════════════════════════════════════════════════════════
   LEFT — CONTENT COLUMN
══════════════════════════════════════════════════════════════ */
.content-col {
  flex: 1;
  min-width: 0;
}

/* ── Rich Text Area ────────────────────────────────────────── */
.rich-text {
  /* Your HubSpot rich text field output drops here */
}

/* Base typography for whatever the editor produces */
.rich-text h2 {
  font-family: var(--font-display);
/*   font-size: clamp(1.5rem, 2.8vw, 2rem); */
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.02em;
  color: var(--ink);
  margin: 56px 0 16px;
  padding-top: 8px;
  scroll-margin-top: 32px;
}
.rich-text h2:first-child { margin-top: 0; }



.rich-text p {
  color: var(--text-dark);
  margin-bottom: 18px;
  font-size: 16px;
  line-height: 24px;
}
.rich-text p a{
  color: var(--ink-soft);
  font-weight: 700;
  text-decoration: none;
}
.rich-text p a:hover{
  color: var(--ink-soft);
  
}
.rich-text p:last-child { margin-bottom: 0; }

.rich-text ul,
.rich-text ol {
  padding-left: 22px;
  margin-bottom: 18px;
  color: var(--text-dark);
}
.rich-text li { margin-bottom: 6px; line-height: 1.7; list-style: initial;}

.rich-text a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.rich-text a:hover { color: var(--accent-mid); }

.rich-text strong { color: var(--ink); font-weight: 600; }

.rich-text blockquote {
  border-left: 3px solid var(--accent);
  background: var(--accent-light);
  padding: 16px 20px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 24px 0;
  font-style: italic;
  color: var(--ink);
}

.img-text-block {
  display: flex;
  gap: 28px;
  align-items: flex-start;
  margin: 40px 0;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 28px;
  transition: box-shadow .2s;
}
.img-text-block:hover {
  box-shadow: 0 6px 28px rgba(0,0,0,.07);
}
.img-text-block.itb-reverse { flex-direction: row-reverse; }

.itb-image {
  flex-shrink: 0;
  width: 200px;
}
.itb-image img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: calc(var(--radius) - 2px);
  display: block;
  background: var(--rule); /* placeholder colour while no image */
}

/* Empty image placeholder shown when no src is set */
.itb-image img[src=""],
.itb-image img:not([src]) {
  min-height: 150px;
}

.itb-text { flex: 1; min-width: 0; }
.itb-text h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  scroll-margin-top: 32px;
}
.itb-text p {
  font-size: 14.5px;
  color: var(--ink-soft);
  line-height: 1.75;
  margin-bottom: 10px;
}
.itb-text p:last-child { margin-bottom: 0; }

/* ── Blank Section Container ───────────────────────────────── */
/*
  Usage: drop anything inside — embed, video, table, custom HTML
  <div class="blank-section">
    YOUR CONTENT HERE
  </div>
*/
.blank-section {
  margin: 40px 0;
  padding: 32px;
  background: var(--surface);
  border: 1px dashed var(--rule);
  border-radius: var(--radius);
  min-height: 80px;
}

/* ── Section divider ───────────────────────────────────────── */
.section-rule {
  height: 1px;
  background: var(--rule);
  margin: 48px 0;
}

/* ══════════════════════════════════════════════════════════════
   RIGHT — TOC SIDEBAR (auto-generated via JS)
══════════════════════════════════════════════════════════════ */
.toc-col {
  width: var(--toc-width);
  flex-shrink: 0;
  position: sticky;
  top: 140px;
}
.toc-box {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

/* Header */
.toc-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 15px 18px 13px;
  border-bottom: 1px solid var(--rule);
}
.toc-head-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dark);
}

/* Progress */
.toc-progress-wrap {
  padding: 14px 18px;
  border-bottom: 1px solid var(--rule);
}
.toc-bar-track {
  height: 3px;
  background: var(--rule);
  border-radius: 99px;
  overflow: hidden;
}
.toc-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  width: 0%;
  transition: width .25s ease;
}
.toc-bar-pct {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 7px;
}

/* Nav links — injected by JS */
.toc-nav { padding: 10px 0 14px; }

.toc-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 18px;
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: background .15s, border-color .15s;
}
.toc-link:hover { background: var(--accent-light); }
.toc-link.active {
  border-left-color: var(--accent);
  background: var(--accent-light);
}
.toc-link.active .toc-dot { background: var(--accent); transform: scale(1.4); }
.toc-link.active .toc-text { color: var(--accent); font-weight: 600; }

/* h3 items indent */
.toc-link.is-h3 { /*padding-left: 30px;*/ }
.toc-link.is-h3 .toc-dot { width: 5px; height: 5px; margin-top: 7px; }

.toc-dot {
  flex-shrink: 0;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rule);
  margin-top: 5px;
  transition: all .2s;
}
.toc-text {
  font-size: 14px;
  font-weight: normal;
  line-height: 1.5;
  color: var(--text-dark);
  transition: color .2s;
}

/* Empty state when no headings found */
.toc-empty {
  padding: 18px;
  font-size: 12px;
  color: var(--ink);
  font-style: italic;
}

/* ── Responsive  */
@media (max-width: 860px) {
  .module-layout { flex-direction: column; }
  .toc-col { width: 100%; position: static; }
  .img-text-block,
  .img-text-block.itb-reverse { flex-direction: column; }
  .itb-image { width: 100%; }
  .itb-image img { height: 200px; }
  .hs-module { padding: 0px 0px 80px; }
}


/* ── Mobile TOC Dropdown ───────────────────────── */
.toc-mobile {
  display: none;
  margin-bottom: 20px;
}

.toc-dropdown {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}

.toc-toggle {
  width: 100%;
  padding: 14px 16px;
  font-size: 14px;
  background: var(--page-bg, #f3f4f6);
  border: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.toc-arrow {
  font-size: 12px;
}

.toc-dropdown-menu {
  display: none;
  border-top: 1px solid var(--rule);
  max-height: 260px;
  overflow-y: auto;
}

.toc-dropdown-menu a {
  display: block;
  padding: 12px 16px;
  font-size: 14px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
}

.toc-dropdown-menu a:hover {
  background: var(--accent-light);
}

/* Active */
.toc-dropdown-menu a.active {
  color: var(--accent);
  font-weight: 600;
}

/* Show only on mobile */
@media (max-width: 860px) {
  .toc-mobile { display: block; }
  .toc-col { display: none; }
  .content-col{width: 100%;}
}
/* ── Sticky Mobile TOC ───────────────────────── */
@media (max-width: 860px) {

  .toc-mobile {
    background: var(--page-bg);
    display: block;
    border-radius: 10px;
    position: sticky;
    top: 105px;
    z-index: 50;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .1);
  }

  .toc-dropdown {
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  }

}

.rich-text h2,
.rich-text h3 {
  scroll-margin-top: var(--sticky-offset, 140px);
}
.bcms-content-with-title .content-col .rich-text h2{
  font-size: 30px;
  font-family: Arial,Helvetica,sans-serif;
  font-weight: 300;