/* Blog kit: the single-post layout (patterns/single-post.php) and the
   .tbfs-article sections a refreshed post is built from. Loaded on single
   posts only, after style.css, so these rules win over the older
   .tbfs-post-* reading styles there. Rules and markup: docs/blog-kit.md. */

.tbfs-post-hero,
.tbfs-post-content {
	--art-r: 24px;
	--art-ink: var(--wp--preset--color--contrast);
	--art-soft: var(--wp--preset--color--muted);
}

/* ---------- Title band ---------- */

.tbfs-post-hero {
	background: var(--wp--preset--color--cream);
	padding: clamp(2rem, 5vw, 4rem) var(--wp--custom--spacing--band-x);
}

.tbfs-post-hero__inner {
	max-width: 1120px;
	margin-inline: auto;
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
	gap: clamp(2rem, 5vw, 4.5rem);
	align-items: center;
}

/* Posts without a featured image keep the text column alone. */
.tbfs-post-hero__inner:not(:has(> .tbfs-post-featured)) {
	grid-template-columns: minmax(0, 760px);
}

.tbfs-post-hero .tbfs-post-header {
	text-align: left;
	margin: 0;
}

.tbfs-post-hero .tbfs-post-header > * {
	margin-block: 0;
}

/* Category chips, PDP hero style: first chip coral-soft, the rest white. */
.tbfs-post-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin-bottom: 1.25rem !important;
}

.tbfs-post-chips .wp-block-post-terms__separator {
	display: none;
}

.tbfs-post-chips a {
	display: inline-flex;
	align-items: center;
	min-height: 2rem;
	padding: 0.2rem 0.85rem;
	border-radius: 999px;
	background: var(--wp--preset--color--base);
	color: var(--art-ink);
	font-size: 0.9rem;
	font-weight: 600;
	text-decoration: none;
	transition: background-color 0.18s ease;
}

.tbfs-post-chips a:first-child {
	background: var(--wp--preset--color--coral-soft);
}

.tbfs-post-chips a:hover {
	background: var(--wp--preset--color--teal-light);
}

.tbfs-post-hero .tbfs-post-title {
	font-size: clamp(1.95rem, 1.3rem + 2.8vw, 3.4rem);
	line-height: 1.08;
	letter-spacing: -0.025em;
	text-wrap: balance;
	color: var(--art-ink);
	margin: 0;
}

.tbfs-post-dek {
	margin: 1.1rem 0 0;
	max-width: 36rem;
	font-size: clamp(1.08rem, 1rem + 0.35vw, 1.25rem);
	line-height: 1.55;
	color: var(--art-ink);
}

.tbfs-post-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem 0;
	margin: 1.35rem 0 0;
	font-size: 0.95rem;
	color: var(--art-soft);
}

.tbfs-post-meta > span + span::before {
	content: "\00B7";
	margin-inline: 0.6rem;
}

.tbfs-post-hero .tbfs-post-featured {
	margin: 0;
	max-width: none;
}

.tbfs-post-hero .tbfs-post-featured img {
	border-radius: var(--art-r);
	box-shadow: none;
}

@media (max-width: 781px) {
	.tbfs-post-hero__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.75rem;
	}
}

/* Phones: byline and date only, spaced instead of dotted, so a wrapped
   line never starts with a lone separator. */
@media (max-width: 480px) {
	.tbfs-post-meta {
		gap: 0.25rem 1rem;
	}
	.tbfs-post-meta > span + span::before {
		content: none;
	}
	.tbfs-post-meta > span:last-child {
		display: none;
	}
}

/* ---------- Reading column ---------- */

.tbfs-post {
	padding-block: clamp(2.5rem, 5vw, 4.5rem) 0;
}

/* The CTA card band follows the article: its top padding is the gap. */
.single-post .tbfs-post + .tbfs-cta-section {
	padding-top: clamp(3rem, 6vw, 4.5rem);
}

.tbfs-post .tbfs-post-content > .tbfs-article {
	max-width: 1120px;
	font-size: 1.125rem;
	line-height: 1.7;
	color: var(--art-ink);
}

.tbfs-post-content .tbfs-article > * {
	max-width: 680px;
	margin-inline: auto;
}

.tbfs-post-content .tbfs-article > * {
	margin-block: 0;
}

.tbfs-post-content .tbfs-article > * + * {
	margin-top: 1.25rem;
}

/* A tinted block or table keeps more room from the text after it than
   paragraphs keep from each other; the opening blocks more still. */
.tbfs-post-content .tbfs-article > :is(.tbfs-art-table, .tbfs-art-pumps, .tbfs-art-note) + * {
	margin-top: 1.75rem;
}

.tbfs-post-content .tbfs-article > :is(.tbfs-art-takeaways, .tbfs-art-calc, .tbfs-art-toc) + * {
	margin-top: clamp(1.75rem, 4vw, 2.5rem);
}

.tbfs-post-content .tbfs-article > :is(p, ul, ol) + :is(.tbfs-art-table, .tbfs-art-pumps, .tbfs-art-note) {
	margin-top: 1.5rem;
}

/* Inside kit sections, undo the older reading-column margins; each section
   spaces its own parts below. */
.tbfs-post-content .tbfs-article > * :is(p, ul, ol, li) {
	margin-block: 0;
}

.tbfs-post-content .tbfs-article > h2 {
	font-size: clamp(1.55rem, 1.2rem + 1.1vw, 2rem);
	line-height: 1.18;
	letter-spacing: -0.015em;
	text-wrap: balance;
	margin-top: clamp(2.75rem, 5vw, 3.75rem);
	margin-bottom: 0;
	scroll-margin-top: 120px;
}

.tbfs-post-content .tbfs-article > h3 {
	font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.45rem);
	line-height: 1.25;
	margin-top: 2.1rem;
	margin-bottom: 0;
}

.tbfs-post-content .tbfs-article > h2 + *,
.tbfs-post-content .tbfs-article > h3 + * {
	margin-top: 0.8rem;
}

.tbfs-post-content .tbfs-article a {
	color: var(--wp--preset--color--teal-dark);
	text-underline-offset: 3px;
}

.tbfs-post-content .tbfs-article > ul,
.tbfs-post-content .tbfs-article > ol {
	padding-left: 1.35rem;
}

.tbfs-post-content .tbfs-article li + li {
	margin-top: 0.5rem;
}

.tbfs-post-content .tbfs-article > ul li::marker {
	color: var(--wp--preset--color--coral-dark);
}

.tbfs-post-content .tbfs-article > ol li::marker {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	color: var(--wp--preset--color--coral-dark);
}

.tbfs-post-content .tbfs-article strong {
	font-weight: 700;
}

/* Opening paragraph: the answer, one size up. */
.tbfs-post-content .tbfs-article .tbfs-art-lede {
	font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.3rem);
	line-height: 1.6;
}

/* ---------- Key takeaways ---------- */

.tbfs-post-content .tbfs-art-takeaways {
	padding: clamp(1.4rem, 4vw, 2.1rem) clamp(1.4rem, 4vw, 2.4rem);
	border-radius: var(--art-r);
	background: var(--wp--preset--color--teal-light);
}

.tbfs-post-content .tbfs-art-takeaways__title,
.tbfs-post-content .tbfs-art-cta__title,
.tbfs-post-content .tbfs-art-note__title,
.tbfs-post-content .tbfs-art-toc__title,
.tbfs-post-content .tbfs-art-sources__title {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 600;
	line-height: 1.25;
}

.tbfs-post-content .tbfs-art-takeaways__title {
	font-size: 1.3rem;
	margin-bottom: 0.9rem !important;
}

.tbfs-post-content .tbfs-art-takeaways ul {
	list-style: none;
	padding: 0;
}

.tbfs-post-content .tbfs-art-takeaways li {
	position: relative;
	padding-left: 1.6rem;
	line-height: 1.55;
}

.tbfs-post-content .tbfs-art-takeaways li + li {
	margin-top: 0.65rem;
}

.tbfs-post-content .tbfs-art-takeaways li::before {
	content: "";
	position: absolute;
	left: 0.1rem;
	top: 0.5em;
	width: 0.6rem;
	height: 0.6rem;
	border-radius: 50%;
	background: var(--wp--preset--color--coral);
}

/* ---------- Table of contents ----------
   A plain list, never a panel, so it never stacks against the tinted
   blocks around it. The section being read is set in ink and bold. */

.tbfs-post-content .tbfs-art-toc__title {
	font-size: 1.05rem;
	margin-bottom: 0.35rem !important;
}

.tbfs-post-content .tbfs-art-toc ol {
	list-style: none;
	padding: 0;
	font-size: 1rem;
	line-height: 1.4;
}

.tbfs-post-content .tbfs-article .tbfs-art-toc a {
	display: block;
	padding: 0.4rem 0;
	color: var(--art-soft);
	text-decoration: none;
	transition: color 0.15s ease;
}

.tbfs-post-content .tbfs-article .tbfs-art-toc a:hover {
	color: var(--art-ink);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tbfs-post-content .tbfs-article .tbfs-art-toc a.is-current {
	color: var(--art-ink);
	font-weight: 700;
}

/* Wide screens: the contents sit in a sticky column left of the text. */
@media (min-width: 1100px) {
	.tbfs-post-content .tbfs-article:has(> .tbfs-art-toc) {
		display: grid;
		grid-template-columns: 220px minmax(0, 680px);
		column-gap: 72px;
		justify-content: center;
	}

	.tbfs-post-content .tbfs-article:has(> .tbfs-art-toc) > * {
		grid-column: 2;
		margin-inline: 0;
		max-width: none;
	}

	.tbfs-post-content .tbfs-article > .tbfs-art-toc {
		grid-column: 1;
		grid-row: 1 / span 80;
		align-self: start;
		position: sticky;
		top: 110px;
		margin-top: 0;
	}
}

/* ---------- Coverage CTA ----------
   The point of every post: get her to the insurance order. Coral-soft card,
   topic-specific headline and line, three proof points, then the button
   with its reassurance line beside it (stacked on phones). */

.tbfs-post-content .tbfs-article .tbfs-art-cta {
	display: grid;
	gap: 1.4rem;
	margin-block: clamp(2.5rem, 5vw, 3.5rem);
	padding: clamp(1.6rem, 4.5vw, 2.5rem) clamp(1.4rem, 4.5vw, 2.75rem);
	border-radius: var(--art-r);
	background: var(--wp--preset--color--coral-soft);
}

.tbfs-post-content .tbfs-art-cta > div > * + * {
	margin-top: 0.6rem;
}

.tbfs-post-content .tbfs-art-cta__title {
	font-size: clamp(1.4rem, 1.15rem + 0.9vw, 1.75rem);
	line-height: 1.15;
	letter-spacing: -0.015em;
	text-wrap: balance;
}

.tbfs-post-content .tbfs-art-cta p:not(.tbfs-art-cta__title, .tbfs-art-cta__note) {
	font-size: 1.05rem;
	line-height: 1.5;
}

.tbfs-post-content .tbfs-art-cta ul {
	list-style: none;
	padding: 0;
	margin-top: 0.9rem;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
}

.tbfs-post-content .tbfs-art-cta li {
	position: relative;
	padding-left: 1.75rem;
}

.tbfs-post-content .tbfs-art-cta li + li {
	margin-top: 0.45rem;
}

/* Check mark: a coral disc with a white tick drawn in CSS. */
.tbfs-post-content .tbfs-art-cta li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.12em;
	width: 1.15rem;
	height: 1.15rem;
	border-radius: 50%;
	background: var(--wp--preset--color--coral);
}

.tbfs-post-content .tbfs-art-cta li::after {
	content: "";
	position: absolute;
	left: 0.4rem;
	top: 0.32em;
	width: 0.3rem;
	height: 0.55rem;
	border: solid var(--wp--preset--color--base);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.tbfs-post-content .tbfs-art-cta__action {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
}

.tbfs-post-content .tbfs-art-cta__note {
	font-size: 0.92rem;
	color: var(--art-soft);
}

.tbfs-post-content .tbfs-article .tbfs-art-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 15rem;
	min-height: 54px;
	padding: 0.9rem 2rem;
	border-radius: 999px;
	background: var(--wp--preset--color--coral);
	color: var(--wp--preset--color--base);
	font-size: 1.08rem;
	font-weight: 700;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	transition: background-color 0.18s ease, transform 0.18s ease;
}

.tbfs-post-content .tbfs-article .tbfs-art-btn:hover {
	background: var(--wp--preset--color--coral-dark);
}

.tbfs-post-content .tbfs-article .tbfs-art-btn:active {
	transform: scale(0.97);
}

.tbfs-post-content .tbfs-article .tbfs-art-btn:focus-visible {
	outline: 3px solid var(--wp--preset--color--teal-dark);
	outline-offset: 3px;
}

@media (max-width: 640px) {
	.tbfs-post-content .tbfs-art-cta__action {
		flex-direction: column;
		align-items: stretch;
		text-align: center;
	}
	.tbfs-post-content .tbfs-article .tbfs-art-btn {
		width: 100%;
		white-space: normal;
	}
}

/* ---------- Note: a cream callout (when to call the doctor) ---------- */

.tbfs-post-content .tbfs-article .tbfs-art-note {
	padding: clamp(1.25rem, 3.5vw, 1.75rem) clamp(1.25rem, 3.5vw, 2rem);
	border-radius: var(--art-r);
	background: var(--wp--preset--color--cream);
}

.tbfs-post-content .tbfs-article .tbfs-art-note > * + * {
	margin-top: 0.7rem;
}

.tbfs-post-content .tbfs-art-note__title {
	font-size: 1.2rem;
}

.tbfs-post-content .tbfs-art-note ul {
	padding-left: 1.25rem;
}

.tbfs-post-content .tbfs-art-note li::marker {
	color: var(--wp--preset--color--coral-dark);
}

/* ---------- Table ---------- */

.tbfs-post-content .tbfs-art-table {
	overflow-x: auto;
	border-radius: 18px;
}

.tbfs-post-content .tbfs-art-table table {
	width: 100%;
	border-collapse: collapse;
	font-size: 1rem;
	line-height: 1.45;
	font-variant-numeric: tabular-nums;
}

.tbfs-post-content .tbfs-art-table caption {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
}

.tbfs-post-content .tbfs-art-table th,
.tbfs-post-content .tbfs-art-table td {
	padding: 0.8rem 1rem;
	text-align: left;
	vertical-align: top;
}

.tbfs-post-content .tbfs-art-table thead th {
	background: var(--wp--preset--color--teal-dark);
	color: var(--wp--preset--color--base);
	font-weight: 700;
}

.tbfs-post-content .tbfs-art-table tbody tr:nth-child(odd) {
	background: var(--wp--preset--color--teal-light);
}

.tbfs-post-content .tbfs-art-table tbody tr:nth-child(even) {
	background: var(--wp--preset--color--cream);
}

.tbfs-post-content .tbfs-art-table tbody th {
	font-weight: 700;
}

/* ---------- Due date calculator (shared with /whats-my-due-date/) ---------- */

.tbfs-post-content .tbfs-article .tbfs-art-calc .tbfs-duedate-card {
	max-width: none;
}

/* ---------- Pump cards ----------
   Product shots sit on white with a thin border (Brandon's call for blog
   articles). Three across from tablet width, rows on phones. The whole card
   is the link. */

.tbfs-post-content .tbfs-article > .tbfs-art-pumps {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	padding: 0;
	list-style: none;
}

.tbfs-post-content .tbfs-article .tbfs-art-pumps li {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.9rem;
	margin: 0;
	padding: 0.75rem 0.75rem 1.1rem;
	border-radius: 20px;
	background: var(--wp--preset--color--cream);
	transition: background-color 0.18s ease;
}

.tbfs-post-content .tbfs-art-pumps li:hover {
	background: var(--wp--preset--color--coral-soft);
}

.tbfs-art-pumps__img {
	display: block;
	padding: 0.75rem;
	border: 1px solid var(--wp--custom--color--border-cool);
	border-radius: 14px;
	background: var(--wp--preset--color--base);
}

.tbfs-post-content .tbfs-art-pumps__img img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1;
	object-fit: contain;
	border-radius: 0;
}

.tbfs-art-pumps__text {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	padding-inline: 0.35rem;
	font-size: 0.98rem;
	line-height: 1.45;
	color: var(--art-soft);
}

.tbfs-post-content .tbfs-article .tbfs-art-pumps__text a {
	font-family: var(--wp--preset--font-family--heading);
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.25;
	color: var(--art-ink);
	text-decoration: none;
}

.tbfs-art-pumps__text a::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 20px;
}

.tbfs-art-pumps__text a:focus-visible {
	outline: none;
}

.tbfs-art-pumps__text a:focus-visible::after {
	outline: 3px solid var(--wp--preset--color--teal);
	outline-offset: 2px;
}

.tbfs-art-pumps__text small {
	margin-top: 0.25rem;
	font-size: 0.88rem;
	font-weight: 700;
	color: var(--wp--preset--color--teal-dark);
}

@media (max-width: 640px) {
	.tbfs-post-content .tbfs-article > .tbfs-art-pumps {
		grid-template-columns: minmax(0, 1fr);
		gap: 0.6rem;
	}
	.tbfs-post-content .tbfs-article .tbfs-art-pumps li {
		flex-direction: row;
		align-items: center;
		gap: 1rem;
		padding: 0.6rem 1rem 0.6rem 0.6rem;
	}
	.tbfs-art-pumps__img {
		flex: none;
		width: 92px;
		padding: 0.4rem;
	}
	.tbfs-art-pumps__text {
		padding-inline: 0;
	}
}

/* ---------- FAQ ---------- */

.tbfs-post-content .tbfs-art-faq {
	margin-top: clamp(2.75rem, 5vw, 3.75rem) !important;
}

.tbfs-post-content .tbfs-art-faq > h2 {
	font-size: clamp(1.55rem, 1.2rem + 1.1vw, 2rem);
	line-height: 1.18;
	letter-spacing: -0.015em;
	text-wrap: balance;
	margin: 0 0 1rem;
	scroll-margin-top: 120px;
}

.tbfs-post-content .tbfs-art-faq details {
	border-radius: 18px;
	background: var(--wp--preset--color--cream);
}

.tbfs-post-content .tbfs-art-faq details + details {
	margin-top: 0.6rem;
}

.tbfs-post-content .tbfs-art-faq summary {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.05rem 1.25rem;
	list-style: none;
	cursor: pointer;
	font-weight: 700;
	line-height: 1.4;
}

.tbfs-post-content .tbfs-art-faq summary::-webkit-details-marker {
	display: none;
}

.tbfs-post-content .tbfs-art-faq summary::after {
	content: "+";
	flex: none;
	font-size: 1.35rem;
	line-height: 1;
	color: var(--wp--preset--color--coral-dark);
	transition: transform 0.2s ease;
}

.tbfs-post-content .tbfs-art-faq details[open] summary::after {
	transform: rotate(45deg);
}

.tbfs-post-content .tbfs-art-faq summary:focus-visible {
	outline: 3px solid var(--wp--preset--color--teal);
	outline-offset: 2px;
	border-radius: 18px;
}

.tbfs-post-content .tbfs-art-faq details > div {
	padding: 0 1.25rem 1.2rem;
	font-size: 1.05rem;
	line-height: 1.6;
}

.tbfs-post-content .tbfs-art-faq details > div > * + * {
	margin-top: 0.7rem;
}

/* ---------- Sources ---------- */

.tbfs-post-content .tbfs-article .tbfs-art-sources {
	margin-top: clamp(2.5rem, 5vw, 3.25rem);
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--art-soft);
}

.tbfs-post-content .tbfs-art-sources__title {
	font-size: 1.05rem;
	color: var(--art-ink);
	margin-bottom: 0.5rem !important;
}

.tbfs-post-content .tbfs-art-sources ul {
	padding-left: 1.1rem;
}

.tbfs-post-content .tbfs-art-sources li + li {
	margin-top: 0.3rem;
}

/* ---------- After the article ---------- */

.tbfs-post-related .tbfs-section-title {
	text-align: left;
}

.tbfs-post-related .tbfs-journal-more {
	margin-top: clamp(1.75rem, 3vw, 2.25rem);
}

@media (max-width: 781px) {
	.tbfs-post .tbfs-post-content > .tbfs-article {
		font-size: 1.0625rem;
	}
}
