/* ==========================================================================
   BBI - Global Single Post template (0.4.0).

   Ported unchanged from the class-scoped Free-Form CSS block on the head
   section of the Divi Theme Builder "All Posts" template, as it rendered on
   staging on 21 October 2026 (Build Control, 20 Oct 2026, "Deviation -
   custom CSS"). Only Divi's own generated .et_pb_*_tb_body rules were left
   behind; Divi keeps writing those itself.

   Uses the :root tokens in bbi-hero.css (--bbi-black/white/muted/orange/font).
   Enqueued on single posts only. Once 0.4.0 is live, delete the Free-Form
   CSS block from the template so this file is the one source.

   Divi hooks (Advanced -> CSS ID & Classes):
     section   bbi-post bbi-post--head | bbi-post--body | bbi-post--cta
     row       bbi-post__row
     modules   bbi-post__title (Post Title), bbi-post__updated (Text),
               bbi-post__content (Post Content)
     code      a.bbi-post__brand, section.bbi-band
   ========================================================================== */

.bbi-post {
	font-family: var(--bbi-font);
}

.bbi-post.et_pb_section {
	padding: 0!important;
}

.bbi-post .et_pb_row.bbi-post__row {
	box-sizing: border-box;
	width: min(1240px,calc(100% - 2 * clamp(24px,5.3vw,76px)))!important;
	max-width: none!important;
	margin: 0 auto!important;
}

.bbi-post--head {
	background-color: var(--bbi-black)!important;
	color: var(--bbi-white);
}

.bbi-post--head .et_pb_row.bbi-post__row {
	padding: clamp(20px,3vw,32px) 0 clamp(40px,6vw,72px)!important;
}

.bbi-post__brand {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	color: var(--bbi-white);
	text-decoration: none;
	font-family: var(--bbi-font);
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .14em;
	text-transform: uppercase;
}

.bbi-post__brand img {
	width: 36px;
	height: 36px;
	display: block;
}

.bbi-post__brand span {
	color: var(--bbi-white);
}

.bbi-post__brand:hover span {
	color: var(--bbi-orange);
}

.bbi-post a:focus-visible {
	outline: 2px solid var(--bbi-orange);
	outline-offset: 4px;
}

.bbi-post__title {
	margin-top: clamp(48px,9vw,112px)!important;
	max-width: 980px;
}

.bbi-post__title .entry-title {
	font-family: var(--bbi-font)!important;
	font-weight: 800!important;
	color: var(--bbi-white)!important;
	font-size: clamp(34px,5.2vw,64px)!important;
	line-height: 1.08!important;
	letter-spacing: -.01em;
	padding-bottom: 0!important;
}

.bbi-post__title .et_pb_title_meta_container {
	font-family: var(--bbi-font)!important;
	color: var(--bbi-muted)!important;
	font-size: 15px!important;
	line-height: 1.5!important;
	margin-top: 20px;
}

.bbi-post__title .et_pb_title_meta_container a {
	color: var(--bbi-orange)!important;
}

.bbi-post__title .et_pb_title_featured_container {
	margin-top: clamp(32px,5vw,56px);
}

.bbi-post__title .et_pb_title_featured_container img {
	display: block;
	width: 100%;
	max-height: 600px;
	object-fit: cover;
}

.bbi-post__updated {
	margin-top: 16px!important;
}

.bbi-post__updated,
.bbi-post__updated p {
	font-family: var(--bbi-font)!important;
	color: var(--bbi-muted)!important;
	font-size: 14px!important;
	line-height: 1.5!important;
	padding: 0!important;
}

.bbi-post--body {
	background-color: var(--bbi-white)!important;
}

.bbi-post--body .et_pb_row.bbi-post__row {
	padding: clamp(40px,6vw,88px) 0!important;
}

.bbi-post__content {
	max-width: 720px;
}

.bbi-post__content,
.bbi-post__content p,
.bbi-post__content li {
	font-family: var(--bbi-font)!important;
	color: var(--bbi-black)!important;
	font-size: clamp(18px,0.6vw + 15px,20px)!important;
	line-height: 1.6!important;
	font-weight: 400;
}

.bbi-post__content p {
	padding-bottom: 1.1em!important;
}

.bbi-post__content h2,
.bbi-post__content h3,
.bbi-post__content h4 {
	font-family: var(--bbi-font)!important;
	color: var(--bbi-black)!important;
	font-weight: 800!important;
	line-height: 1.2!important;
	padding-bottom: 0!important;
}

.bbi-post__content h2 {
	font-size: clamp(26px,2.6vw,34px)!important;
	margin: 1.5em 0 .55em!important;
}

.bbi-post__content h3 {
	font-size: clamp(21px,2vw,25px)!important;
	margin: 1.3em 0 .5em!important;
}

.bbi-post__content a {
	color: var(--bbi-black)!important;
	text-decoration: underline;
	text-decoration-color: var(--bbi-orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.bbi-post__content a:hover {
	color: var(--bbi-orange)!important;
}

.bbi-post__content ul,
.bbi-post__content ol {
	padding: 0 0 1.1em 1.3em!important;
}

.bbi-post__content li {
	padding-bottom: .35em;
}

.bbi-post__content li::marker {
	color: var(--bbi-orange);
	font-weight: 700;
}

.bbi-post__content blockquote {
	border-left: 4px solid var(--bbi-orange)!important;
	margin: 1.6em 0!important;
	padding: .2em 0 .2em 1.2em!important;
}

.bbi-post__content blockquote p {
	font-size: clamp(20px,1vw + 15px,24px)!important;
	font-weight: 700!important;
	line-height: 1.4!important;
}

.bbi-post__content img {
	max-width: 100%;
	height: auto;
}

/* --------------------------------------------------------------------------
   Article body: CTA box + "At a glance" list (11 Nov 2026, Notion -> WordPress
   draft Zap build spec, job 3). Both are plain markup the Zap writes straight
   into post_content — no shortcode, no Divi module — so these rules are
   scoped under .bbi-post__content like the rest of this file:

     .bbi-cta            orange invitation box the Zap appends to every
                          article (build spec step 4), headline + body copy
       .bbi-cta__button   the "Book a call" button inside it; text/href set
                           by the Zap, not this theme
     ol.bbi-at-a-glance   the "At a glance" recap list. The Zap's Markdown
                          conversion (build spec step 4) should add this
                          class to the <ol> that follows the "At a glance"
                          heading; until that's built it's a plain list per
                          the rules above. Numbering is pure CSS (counters on
                          an ordinary <ol>), so no extra markup is required
                          per item.

   Colours are the :root tokens from bbi-hero.css, not hard-coded (Site
   Factory reuse note in the build spec) — any theme using those tokens gets
   this styling unchanged.
   -------------------------------------------------------------------------- */

.bbi-post__content .bbi-cta {
	background-color: var(--bbi-orange)!important;
	color: var(--bbi-black)!important;
	border-radius: 4px;
	padding: clamp(24px, 3vw, 36px);
	margin: 2em 0!important;
}

.bbi-post__content .bbi-cta p {
	color: var(--bbi-black)!important;
	padding-bottom: .6em!important;
}

.bbi-post__content .bbi-cta p:last-of-type {
	padding-bottom: 0!important;
}

.bbi-post__content .bbi-cta strong {
	font-weight: 800;
}

.bbi-post__content .bbi-cta__button {
	display: inline-block;
	margin-top: .6em;
	padding: .85em 1.6em;
	background-color: var(--bbi-black)!important;
	color: var(--bbi-white)!important;
	font-weight: 700;
	text-decoration: none!important;
	border-radius: 2px;
}

.bbi-post__content .bbi-cta__button:hover {
	opacity: .82;
}

.bbi-post__content ol.bbi-at-a-glance {
	list-style: none;
	counter-reset: bbi-glance;
	padding: 0!important;
	margin: 1.6em 0!important;
	border: 1px solid rgba(5, 5, 5, 0.12);
	border-radius: 4px;
	overflow: hidden;
}

.bbi-post__content ol.bbi-at-a-glance li {
	counter-increment: bbi-glance;
	position: relative;
	padding: .75em 1.2em .75em 3.2em!important;
	border-bottom: 1px solid rgba(5, 5, 5, 0.12);
}

.bbi-post__content ol.bbi-at-a-glance li:last-child {
	border-bottom: none;
}

.bbi-post__content ol.bbi-at-a-glance li::before {
	content: counter(bbi-glance);
	position: absolute;
	left: 1.1em;
	top: .78em;
	width: 1.5em;
	height: 1.5em;
	border-radius: 50%;
	background-color: var(--bbi-orange);
	color: var(--bbi-white);
	font-size: .78em;
	font-weight: 700;
	line-height: 1.5em;
	text-align: center;
}

.bbi-post__content ol.bbi-at-a-glance strong {
	font-weight: 800;
}

.bbi-post--cta {
	background-color: var(--bbi-black)!important;
	color: var(--bbi-white);
}

.bbi-post--cta .et_pb_row.bbi-post__row {
	width: 100%!important;
	padding: 0!important;
}

.bbi-post--cta .bbi-band {
	box-sizing: border-box;
	width: min(1240px,calc(100% - 2 * clamp(24px,5.3vw,76px)));
	margin: 0 auto;
	padding: 0 0 96px;
	border-top: 2px solid var(--bbi-orange);
	font-family: var(--bbi-font);
}

.bbi-post--cta .bbi-band__title {
	margin: 0;
	padding: 40px 0 16px;
	color: var(--bbi-white);
	font-family: var(--bbi-font);
	font-size: clamp(26px,2.4vw,36px);
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1.15;
}

.bbi-post--cta .bbi-band__body {
	max-width: 670px;
	color: var(--bbi-white);
	font-size: clamp(18px,1.25vw,20px);
	font-weight: 400;
	line-height: 1.55;
}

.bbi-post--cta .bbi-band__body p {
	margin: 0 0 1em;
	padding: 0;
	font-size: inherit;
	line-height: inherit;
	color: var(--bbi-white);
}

.bbi-post--cta .bbi-band__cta {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin-top: 12px;
	padding: 0 0 12px;
	border-bottom: 2px solid var(--bbi-orange);
	color: var(--bbi-white)!important;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .12em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
}

.bbi-post--cta .bbi-band__cta:hover {
	color: var(--bbi-orange)!important;
}

/* --------------------------------------------------------------------------
   "Jargon on this page" (15 Nov 2026, article template task) — the sidebar
   block from inc/jargon-on-this-page.php's [bbi_jargon_on_this_page]
   shortcode. Not scoped under .bbi-post__content: it lives in the sidebar
   column, not the article column.
   -------------------------------------------------------------------------- */

.bbi-jargon {
	font-family: var(--bbi-font);
}

.bbi-jargon__title {
	font-family: var(--bbi-font)!important;
	font-weight: 700!important;
	color: var(--bbi-black)!important;
	font-size: 13px!important;
	letter-spacing: 1.5px;
	text-transform: uppercase;
	margin: 0 0 .9em!important;
	padding-bottom: 0!important;
}

.bbi-jargon__list {
	list-style: none;
	margin: 0!important;
	padding: 0!important;
}

.bbi-jargon__list li {
	padding: 0 0 .6em!important;
}

.bbi-jargon__list a {
	color: var(--bbi-black)!important;
	font-size: 17px;
	text-decoration: underline;
	text-decoration-color: var(--bbi-orange);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.bbi-jargon__list a:hover {
	color: var(--bbi-orange)!important;
}

/* --------------------------------------------------------------------------
   Side column, three small fixes (16 Nov 2026, article template task):

   1. About John card sticky on desktop. Divi's own Sticky setting and a
      plain `position: sticky` typed into the module's Main Element field
      both failed live (Divi mis-measured the page before images finished
      loading; a since-removed ancestor clip blocked native sticky) -- both
      attempts were backed out, so nothing upstream clips overflow any more
      and this plain CSS rule now works. The side column stretches the full
      height of the row (Divi's flex row), so the card has room to travel
      and stops itself before the footer, which sits outside this row.
      Not scoped under .bbi-post__content: the card lives in the side
      column, not the article. et-last-child (Divi's own structural class,
      not a generated id) picks out the side column, then the card as its
      last module.
   2. .et_pb_widget's title-to-content gap is a Divi flex row-gap (30px on
      the "Topics"/"Recent articles" widgets, confirmed live), not a margin
      on the heading -- tightened to sit closer to the Jargon box above.
      -------------------------------------------------------------------- */

@media (min-width: 981px) {
	.bbi-post__row .et_pb_column.et-last-child > .et_pb_group.et-last-child {
		position: sticky;
		top: calc(130px + var(--wp-admin--admin-bar--height, 0px));
	}
}

.bbi-post__row .et_pb_widget {
	row-gap: 20px;
}
