/**
 * HealSmarter legal pages
 *
 * Tokens come from the Data G brand guide (6-10-26).
 * Type: Bebas Neue for display, EB Garamond for body.
 */

.smartlegal-tabs,
.smartlegal-toc,
.smartlegal-body,
.smartlegal-title,
.smartlegal-eyebrow {
	--hs-blue: #004AAD;
	--hs-aqua: #4FB4AD;
	--hs-purple: #875EFD;
	--hs-raspberry: #D6336C;
	--hs-offwhite: #EFEBEC;
	--hs-ink: #373D3B;
	--hs-sticky-offset: 120px;
}

/* ---------------------------------------------------------------------------
   Title block
   --------------------------------------------------------------------------- */

.smartlegal-eyebrow,
.smartlegal-eyebrow p {
	display: flex;
	align-items: center;
	gap: 11px;
	margin: 0 0 14px;
	color: var(--hs-raspberry);
	font-family: "Bebas Neue", sans-serif;
	font-size: 19px;
	line-height: 1;
	letter-spacing: 0.09em;
	text-transform: uppercase;
}

/* The square marker. Do not type a bullet character into the module. */
.smartlegal-eyebrow p::before {
	content: "";
	flex: 0 0 auto;
	width: 9px;
	height: 9px;
	background: currentColor;
}

.smartlegal-title,
.smartlegal-title h1,
.smartlegal-title h2 {
	margin: 0 0 36px;
	padding: 0;
	color: var(--hs-blue);
	font-family: "Bebas Neue", sans-serif;
	font-size: clamp( 52px, 7vw, 96px );
	line-height: 0.92;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}


/* ---------------------------------------------------------------------------
   Tab row
   --------------------------------------------------------------------------- */

.smartlegal-tabs {
	display: flex;
	flex-wrap: wrap;
	width: fit-content;
	max-width: 100%;
}

.smartlegal-tabs__tab {
	flex: 0 0 auto;
	padding: 18px 26px;
	background: #fff;
	color: var(--hs-ink);
	font-family: "Bebas Neue", sans-serif;
	font-size: 20px;
	line-height: 1;
	letter-spacing: 0.06em;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.smartlegal-tabs__tab:hover,
.smartlegal-tabs__tab:focus-visible {
	color: var(--hs-blue);
	text-decoration: none;
}

.smartlegal-tabs__tab[aria-current="page"] {
	background: var(--hs-blue);
	color: #fff;
}

.smartlegal-tabs__tab[aria-current="page"]:hover,
.smartlegal-tabs__tab[aria-current="page"]:focus-visible {
	color: #fff;
}

.smartlegal-tabs__tab:focus-visible {
	outline: 3px solid var(--hs-raspberry);
	outline-offset: -3px;
}

/* ---------------------------------------------------------------------------
   Dashed rules
   --------------------------------------------------------------------------- */

.smartlegal-rule {
	height: 0;
	border-top: 7px dashed var(--hs-raspberry);
}

/* ---------------------------------------------------------------------------
   Contents list
   --------------------------------------------------------------------------- */

.smartlegal-toc {
	position: sticky;
	top: var(--hs-sticky-offset);
	align-self: start;
}

.smartlegal-toc h3 {
	margin: 0 0 22px;
	color: var(--hs-ink);
	font-family: "Bebas Neue", sans-serif;
	font-size: 22px;
	letter-spacing: 0.1em;
}

/* Divi's own ol rules outrank a bare .smartlegal-toc-list selector, which
   leaves the browser marker showing next to the counter. Hence the extra
   qualifiers here rather than !important. */
.smartlegal-toc ol.smartlegal-toc-list,
.smartlegal-toc ol.smartlegal-toc-list li {
	list-style: none;
	list-style-type: none;
}

.smartlegal-toc ol.smartlegal-toc-list {
	margin: 0;
	padding: 0;
	counter-reset: hs-toc;
}

.smartlegal-toc ol.smartlegal-toc-list li {
	margin: 0 0 14px;
	padding: 0;
	counter-increment: hs-toc;
}

.smartlegal-toc-list a {
	display: flex;
	gap: 12px;
	color: var(--hs-raspberry);
	font-family: "EB Garamond", serif;
	font-size: 18px;
	line-height: 1.35;
	text-decoration: none;
}

.smartlegal-toc-list a::before {
	content: counter(hs-toc, decimal-leading-zero);
	flex: 0 0 auto;
	color: var(--hs-blue);
	font-family: "Bebas Neue", sans-serif;
	font-size: 17px;
	letter-spacing: 0.04em;
}

.smartlegal-toc-list a:hover,
.smartlegal-toc-list a.is-current {
	color: var(--hs-blue);
}

.smartlegal-toc-list a:focus-visible {
	outline: 2px solid var(--hs-raspberry);
	outline-offset: 3px;
}

.smartlegal-toc-rule {
	display: block;
	margin-top: 28px;
	border-top: 7px dashed var(--hs-raspberry);
}

/* Hidden by the script when the page has no h2 sections. */
.smartlegal-toc.is-empty {
	display: none;
}

/* ---------------------------------------------------------------------------
   Document body
   --------------------------------------------------------------------------- */

.smartlegal-body {
	counter-reset: hs-sec;
}

.smartlegal-body h2 {
	display: flex;
	align-items: center;
	gap: 18px;
	margin: 64px 0 18px;
	padding: 0;
	color: var(--hs-blue);
	counter-increment: hs-sec;
	font-family: "Bebas Neue", sans-serif;
	font-size: 34px;
	line-height: 1;
	letter-spacing: 0.02em;
	scroll-margin-top: var(--hs-sticky-offset);
}

.smartlegal-body h2:first-child {
	margin-top: 0;
}

.smartlegal-body h2::before {
	content: counter(hs-sec, decimal-leading-zero);
	flex: 0 0 auto;
	padding: 11px 9px;
	border-radius: 2px;
	background: var(--hs-blue);
	color: #fff;
	font-size: 16px;
	line-height: 1;
}

.smartlegal-body p,
.smartlegal-body li {
	color: var(--hs-ink);
	font-family: "EB Garamond", serif;
	font-size: 19px;
	line-height: 1.75;
}

.smartlegal-body p {
	margin: 0 0 20px;
}

.smartlegal-body a {
	color: var(--hs-blue);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Intro paragraph: any p that sits before the first heading. */
.smartlegal-body > *:first-child p:first-child {
	margin-bottom: 28px;
}

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */

@media (max-width: 1280px) {
	/* Four tabs get tight before the mobile breakpoint. */
	.smartlegal-tabs__tab {
		padding: 16px 18px;
		font-size: 18px;
	}
}

@media (max-width: 980px) {
	.smartlegal-toc {
		position: static;
		margin-bottom: 40px;
	}

	.smartlegal-tabs {
		flex-wrap: nowrap;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.smartlegal-body h2 {
		margin-top: 48px;
		font-size: 28px;
	}
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* ---------------------------------------------------------------------------
   Print
   --------------------------------------------------------------------------- */

@media print {
	.smartlegal-tabs,
	.smartlegal-toc {
		display: none;
	}

	.smartlegal-body h2 {
		break-after: avoid;
	}
}

/* ---------------------------------------------------------------------------
   Specificity fallback
   ---------------------------------------------------------------------------
   Divi's per-module generated CSS can outrank the plain selectors above. Set
   the Text module's H2 design back to defaults first; if something still wins,
   uncomment this block rather than reaching for !important.

   #page-container .smartlegal-body h2 { ... }
   --------------------------------------------------------------------------- */
