/*
Theme Name: BrainFlow
Theme URI: https://brainflow.co
Author: BrainFlow
Description: Custom editorial theme for BrainFlow — biohacking, peptides, and longevity publishing. Mediavine-optimized.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: brainflow
Tags: news, blog, two-columns, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   1. Fonts (self-hosted Inter)
   ========================================================================== */

@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('fonts/inter-400.woff2') format('woff2');
}

@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('fonts/inter-600.woff2') format('woff2');
}

@font-face {
	font-family: 'Inter';
	font-style: normal;
	font-weight: 800;
	font-display: swap;
	src: url('fonts/inter-800.woff2') format('woff2');
}

/* ==========================================================================
   2. Custom properties + reset
   ========================================================================== */

:root {
	--bf-blue: #2BA6E0;
	--bf-blue-dark: #1B7FB5;
	--bf-navy: #0E1B26;
	--bf-ink: #10151A;
	--bf-body: #333B43;
	--bf-gray-line: #E6EAEE;
	--bf-gray-bg: #F5F7F9;
	--bf-white: #FFFFFF;
	--bf-meta: #6B7480;
	--bf-font: Inter, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--bf-font);
	font-size: 16px;
	line-height: 1.6;
	color: var(--bf-body);
	background: var(--bf-white);
	-webkit-font-smoothing: antialiased;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--bf-ink);
	font-weight: 800;
	letter-spacing: -0.015em;
	line-height: 1.2;
	margin: 0 0 0.5em;
}

a {
	color: var(--bf-blue);
	text-decoration: none;
	transition: color 150ms ease;
}

a:hover {
	color: var(--bf-blue-dark);
}

button {
	font-family: inherit;
	cursor: pointer;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	position: absolute !important;
	top: 5px;
	left: 5px;
	width: auto;
	height: auto;
	padding: 12px 16px;
	background: var(--bf-white);
	color: var(--bf-ink);
	clip: auto !important;
	z-index: 100000;
}

/* Shared layout containers */

.bf-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

.bf-container-wide {
	max-width: 1400px;
	margin: 0 auto;
}

/* Shared text patterns */

.bf-eyebrow,
.bf-eyebrow a {
	display: inline-block;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--bf-blue);
}

.bf-eyebrow a:hover {
	color: var(--bf-blue-dark);
}

.bf-meta {
	font-size: 14px;
	color: var(--bf-meta);
}

.bf-meta a {
	color: var(--bf-meta);
}

.bf-meta a:hover {
	color: var(--bf-blue);
}

/* ==========================================================================
   3. Header
   ========================================================================== */

/* 1px sentinel above the sticky header so IntersectionObserver can detect
   the stuck state reliably; negative margin cancels any layout impact. */
#bf-header-sentinel {
	height: 1px;
	margin-bottom: -1px;
}

.site-header {
	position: sticky;
	top: 0;
	z-index: 900;
	background: var(--bf-navy);
}

.header-inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 0 24px;
	min-height: 72px;
	display: flex;
	align-items: center;
	gap: 32px;
	transition: min-height 150ms ease;
}

.site-header.is-stuck .header-inner {
	min-height: 56px;
}

.site-branding {
	display: flex;
	align-items: center;
	flex-shrink: 0;
}

.site-branding .custom-logo-link {
	display: block;
	line-height: 0;
}

.site-branding .custom-logo {
	height: 40px;
	width: auto;
	transition: height 150ms ease;
}

.site-header.is-stuck .custom-logo {
	height: 32px;
}

.site-title-text {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.015em;
	color: var(--bf-blue);
}

.site-title-text:hover {
	color: var(--bf-white);
}

.primary-nav {
	flex: 1;
	min-width: 0;
}

.primary-nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 28px;
}

.primary-nav a {
	color: var(--bf-white);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	padding: 8px 0;
	display: inline-block;
}

.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a,
.primary-nav .current-menu-ancestor > a {
	color: var(--bf-blue);
}

/* Hide submenus in the top bar; the full tree shows in the mobile panel */
.primary-nav .sub-menu {
	display: none;
}

.header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
	margin-left: auto;
}

.header-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: transparent;
	border: 0;
	padding: 0;
	color: var(--bf-white);
	transition: color 150ms ease;
}

.header-icon-btn:hover,
.header-icon-btn[aria-expanded="true"] {
	color: var(--bf-blue);
}

.header-icon-btn svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

/* Search dropdown */

.header-search {
	background: var(--bf-navy);
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.header-search .bf-search-inner {
	max-width: 1400px;
	margin: 0 auto;
	padding: 16px 24px;
}

/* Mobile nav toggle + panel */

.nav-toggle {
	display: none;
}

.mobile-panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(360px, 90vw);
	background: var(--bf-navy);
	z-index: 1000;
	padding: 24px;
	overflow-y: auto;
	transform: translateX(100%);
	transition: transform 200ms ease;
	visibility: hidden;
}

.mobile-panel.is-open {
	transform: translateX(0);
	visibility: visible;
}

.mobile-panel-close {
	display: flex;
	margin-left: auto;
	margin-bottom: 16px;
}

.mobile-panel .search-form {
	margin-bottom: 24px;
}

.mobile-panel ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mobile-panel .sub-menu {
	padding-left: 16px;
}

.mobile-panel a {
	display: block;
	padding: 10px 0;
	color: var(--bf-white);
	font-size: 17px;
	font-weight: 600;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-panel .sub-menu a {
	font-size: 15px;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.75);
}

.mobile-panel a:hover {
	color: var(--bf-blue);
}

.mobile-overlay {
	position: fixed;
	inset: 0;
	background: rgba(14, 27, 38, 0.6);
	z-index: 950;
	opacity: 0;
	visibility: hidden;
	transition: opacity 200ms ease;
}

.mobile-overlay.is-open {
	opacity: 1;
	visibility: visible;
}

/* ==========================================================================
   4. Search form
   ========================================================================== */

.search-form {
	display: flex;
	gap: 8px;
}

.search-form .search-field {
	flex: 1;
	min-width: 0;
	font-family: inherit;
	font-size: 16px;
	padding: 10px 14px;
	border: 1px solid var(--bf-gray-line);
	border-radius: 0;
	background: var(--bf-white);
	color: var(--bf-ink);
}

.search-form .search-field:focus {
	outline: 2px solid var(--bf-blue);
	outline-offset: -1px;
}

.search-form .search-submit {
	font-size: 15px;
	font-weight: 600;
	padding: 10px 20px;
	background: var(--bf-blue);
	color: var(--bf-white);
	border: 0;
	border-radius: 0;
	transition: background-color 150ms ease;
}

.search-form .search-submit:hover {
	background: var(--bf-blue-dark);
}

/* ==========================================================================
   5. Hero
   ========================================================================== */

.bf-hero {
	position: relative;
	display: block;
	height: 520px;
	overflow: hidden;
	background: var(--bf-navy);
}

.bf-hero img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bf-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(14, 27, 38, 0) 30%, rgba(14, 27, 38, 0.55) 65%, rgba(14, 27, 38, 0.92) 100%);
}

.bf-hero-text {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1;
	padding: 40px 48px;
	max-width: 900px;
}

.bf-hero-text .bf-eyebrow {
	margin-bottom: 10px;
}

.bf-hero-title {
	color: var(--bf-white);
	font-size: clamp(34px, 4.5vw, 56px);
	font-weight: 800;
	letter-spacing: -0.015em;
	line-height: 1.1;
	margin: 0 0 12px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bf-hero-excerpt {
	color: rgba(255, 255, 255, 0.9);
	font-size: 17px;
	margin: 0;
	max-width: 640px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ==========================================================================
   6. Trending strip
   ========================================================================== */

.bf-trending {
	background: var(--bf-navy);
	padding: 28px 0 32px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.bf-trending .bf-eyebrow {
	margin-bottom: 18px;
}

.bf-trending-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 32px;
}

.bf-trending-item {
	display: flex;
	gap: 16px;
	align-items: flex-start;
}

.bf-trending-item img {
	width: 120px;
	height: 90px;
	object-fit: cover;
	border-radius: 8px;
	flex-shrink: 0;
}

.bf-trending-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.35;
}

.bf-trending-title a {
	color: var(--bf-white);
}

.bf-trending-title a:hover {
	color: var(--bf-blue);
}

/* ==========================================================================
   7. Two-column layout
   ========================================================================== */

.bf-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 48px;
	padding-top: 48px;
	padding-bottom: 64px;
}

.bf-main {
	min-width: 0;
}

/* ==========================================================================
   8. Section headers
   ========================================================================== */

.bf-section {
	margin-bottom: 48px;
}

.bf-section-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 20px;
}

.bf-section-title {
	font-size: 22px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: -0.015em;
	color: var(--bf-ink);
	margin: 0;
	flex-shrink: 0;
}

.bf-section-title a {
	color: var(--bf-ink);
}

.bf-section-title a:hover {
	color: var(--bf-blue);
}

.bf-section-header::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--bf-gray-line);
	order: 1;
}

.bf-section-more {
	order: 2;
	flex-shrink: 0;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
}

/* ==========================================================================
   9. Cards
   ========================================================================== */

.bf-card-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.bf-card {
	background: var(--bf-white);
	border: 1px solid var(--bf-gray-line);
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.bf-card-media {
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: var(--bf-gray-bg);
}

.bf-card-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 150ms ease;
}

.bf-card:hover .bf-card-media img {
	transform: scale(1.03);
}

.bf-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}

.bf-card-title {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.35;
	margin: 0;
}

.bf-card-title a {
	color: var(--bf-ink);
}

.bf-card-title a:hover {
	color: var(--bf-blue);
}

.bf-card-excerpt {
	font-size: 14px;
	color: var(--bf-body);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bf-card .bf-meta {
	margin-top: auto;
}

/* Flat editorial variant: no card chrome, whitespace does the work. */

.bf-card.is-flat {
	border: 0;
	border-radius: 0;
	background: transparent;
	overflow: visible;
}

.bf-card.is-flat .bf-card-media {
	border-radius: 8px;
}

.bf-card.is-flat .bf-card-body {
	padding: 14px 0 0;
}

.bf-card.is-flat .bf-card-title {
	font-size: 18px;
	line-height: 1.3;
}

/* Category feature package: lead story + stacked headline rows */

.bf-cat-feature {
	display: grid;
	grid-template-columns: 1.35fr 1fr;
	gap: 32px;
	align-items: start;
}

.bf-cat-lead-media {
	display: block;
	overflow: hidden;
	border-radius: 8px;
	background: var(--bf-gray-bg);
	margin-bottom: 14px;
}

.bf-cat-lead-media img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform 150ms ease;
}

.bf-cat-lead:hover .bf-cat-lead-media img {
	transform: scale(1.03);
}

.bf-cat-lead-title {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.015em;
	line-height: 1.15;
	margin: 0 0 8px;
}

.bf-cat-lead-title a {
	color: var(--bf-ink);
}

.bf-cat-lead-title a:hover {
	color: var(--bf-blue);
}

.bf-cat-lead-excerpt {
	font-size: 15px;
	color: var(--bf-body);
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bf-cat-minis {
	display: flex;
	flex-direction: column;
}

.bf-mini {
	display: flex;
	gap: 14px;
	align-items: center;
	padding: 16px 0;
	border-bottom: 1px solid var(--bf-gray-line);
}

.bf-mini:first-child {
	padding-top: 0;
}

.bf-mini:last-child {
	border-bottom: 0;
}

.bf-mini-media {
	display: block;
	flex-shrink: 0;
	overflow: hidden;
	border-radius: 8px;
	background: var(--bf-gray-bg);
}

.bf-mini-media img {
	width: 110px;
	height: 74px;
	object-fit: cover;
	transition: transform 150ms ease;
}

.bf-mini:hover .bf-mini-media img {
	transform: scale(1.03);
}

.bf-mini-title {
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.35;
	margin: 0;
}

.bf-mini-title a {
	color: var(--bf-ink);
}

.bf-mini-title a:hover {
	color: var(--bf-blue);
}

/* ==========================================================================
   10. Latest feed (horizontal rows)
   ========================================================================== */

.bf-feed {
	display: flex;
	flex-direction: column;
}

.bf-feed-item {
	display: flex;
	gap: 24px;
	padding: 24px 0;
	border-bottom: 1px solid var(--bf-gray-line);
}

.bf-feed-item:first-child {
	padding-top: 0;
}

.bf-feed-media {
	display: block;
	flex-shrink: 0;
	width: 200px;
	overflow: hidden;
	border-radius: 8px;
	background: var(--bf-gray-bg);
	align-self: flex-start;
}

.bf-feed-media img {
	width: 200px;
	height: 130px;
	object-fit: cover;
	transition: transform 150ms ease;
}

.bf-feed-item:hover .bf-feed-media img {
	transform: scale(1.03);
}

.bf-feed-body {
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bf-feed-title {
	font-size: 20px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.3;
	margin: 0;
}

.bf-feed-title a {
	color: var(--bf-ink);
}

.bf-feed-title a:hover {
	color: var(--bf-blue);
}

.bf-feed-excerpt {
	font-size: 15px;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ==========================================================================
   11. Pagination
   ========================================================================== */

.bf-pagination {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 32px;
}

.bf-pagination .page-numbers {
	display: inline-block;
	min-width: 40px;
	padding: 8px 12px;
	text-align: center;
	font-size: 15px;
	font-weight: 600;
	color: var(--bf-ink);
	border: 1px solid var(--bf-gray-line);
	border-radius: 8px;
	transition: color 150ms ease, border-color 150ms ease;
}

.bf-pagination a.page-numbers:hover {
	color: var(--bf-blue);
	border-color: var(--bf-blue);
}

.bf-pagination .page-numbers.current {
	background: var(--bf-navy);
	border-color: var(--bf-navy);
	color: var(--bf-white);
}

.bf-pagination .page-numbers.dots {
	border: 0;
}

/* ==========================================================================
   12. Sidebar
   ========================================================================== */

.bf-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
	align-self: start;
}

.bf-widget {
	background: var(--bf-white);
	border: 1px solid var(--bf-gray-line);
	border-radius: 8px;
	padding: 20px;
}

.bf-widget-title {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--bf-blue);
	margin: 0 0 16px;
}

/* Featured module */

.bf-widget-featured .bf-featured-media {
	display: block;
	overflow: hidden;
	border-radius: 8px;
	margin-bottom: 12px;
	background: var(--bf-gray-bg);
}

.bf-widget-featured img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform 150ms ease;
}

.bf-widget-featured:hover img {
	transform: scale(1.03);
}

.bf-featured-title {
	font-size: 17px;
	font-weight: 600;
	letter-spacing: 0;
	line-height: 1.35;
	margin: 6px 0 0;
}

.bf-featured-title a {
	color: var(--bf-ink);
}

.bf-featured-title a:hover {
	color: var(--bf-blue);
}

/* Popular categories */

.bf-cat-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bf-cat-list li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 12px;
	padding: 10px 0;
	border-bottom: 1px solid var(--bf-gray-line);
}

.bf-cat-list li:first-child {
	padding-top: 0;
}

.bf-cat-list li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.bf-cat-list a {
	color: var(--bf-ink);
	font-size: 15px;
	font-weight: 600;
}

.bf-cat-list a:hover {
	color: var(--bf-blue);
}

.bf-cat-count {
	font-size: 14px;
	color: var(--bf-meta);
}

/* About mini-card */

.bf-widget-about .bf-about-logo img {
	height: 32px;
	width: auto;
	margin-bottom: 12px;
}

.bf-widget-about p {
	font-size: 14px;
	margin: 0 0 12px;
}

.bf-widget-about .bf-about-link {
	font-size: 14px;
	font-weight: 600;
}

/* Registered-widget defaults */

.bf-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bf-widget ul li {
	padding: 8px 0;
	border-bottom: 1px solid var(--bf-gray-line);
}

.bf-widget ul li:last-child {
	border-bottom: 0;
}

/* ==========================================================================
   13. Single article
   ========================================================================== */

.bf-article-header {
	margin-bottom: 24px;
}

.bf-article-header .bf-eyebrow {
	margin-bottom: 10px;
}

.bf-article-title {
	font-size: clamp(30px, 4vw, 42px);
	line-height: 1.15;
	margin: 0 0 16px;
}

.bf-byline {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var(--bf-meta);
}

.bf-byline img.avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
}

.bf-byline a {
	color: var(--bf-meta);
	font-weight: 600;
}

.bf-byline a:hover {
	color: var(--bf-blue);
}

.bf-featured-image {
	margin: 24px 0 32px;
}

.bf-featured-image img {
	width: 100%;
	height: auto;
	border-radius: 8px;
}

/* Entry content — Mediavine reads this flow; keep it plain and unclipped.
   No overflow:hidden, no columns, no transforms here. */

.entry-content {
	font-size: 18px;
	line-height: 1.6;
	max-width: 720px;
}

.entry-content > * {
	margin-top: 0;
}

.entry-content p {
	margin: 0 0 1.4em;
}

.entry-content h2 {
	font-size: 26px;
	font-weight: 800;
	margin: 2em 0 0.6em;
}

.entry-content h3 {
	font-size: 21px;
	font-weight: 700;
	margin: 1.6em 0 0.6em;
}

.entry-content h4 {
	font-size: 18px;
	margin: 1.4em 0 0.6em;
}

.entry-content a {
	color: var(--bf-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.entry-content a:hover {
	color: var(--bf-blue-dark);
}

.entry-content img {
	border-radius: 8px;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.4em;
	padding-left: 1.4em;
}

.entry-content li {
	margin-bottom: 0.4em;
}

.entry-content blockquote {
	margin: 0 0 1.4em;
	padding: 16px 20px;
	border-left: 4px solid var(--bf-blue);
	background: var(--bf-gray-bg);
	font-style: normal;
}

.entry-content blockquote p:last-child {
	margin-bottom: 0;
}

.entry-content table {
	display: block;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: 16px;
	margin: 0 0 1.4em;
	max-width: 100%;
}

.entry-content th,
.entry-content td {
	border: 1px solid var(--bf-gray-line);
	padding: 10px 14px;
	text-align: left;
}

.entry-content th {
	background: var(--bf-gray-bg);
	font-weight: 600;
}

.entry-content pre {
	background: var(--bf-gray-bg);
	padding: 16px;
	overflow-x: auto;
	border-radius: 8px;
	font-size: 15px;
}

.entry-content hr {
	border: 0;
	border-top: 1px solid var(--bf-gray-line);
	margin: 2em 0;
}

.entry-content figure {
	margin: 0 0 1.4em;
}

.entry-content figcaption,
.entry-content .wp-caption-text {
	font-size: 14px;
	color: var(--bf-meta);
	margin-top: 8px;
}

.entry-content .wp-block-embed iframe,
.entry-content iframe {
	max-width: 100%;
}

.alignwide {
	max-width: 100%;
}

.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.alignleft {
	float: left;
	margin: 0 20px 12px 0;
}

.alignright {
	float: right;
	margin: 0 0 12px 20px;
}

/* Page links (<!--nextpage-->) */

.page-links {
	margin: 24px 0;
	font-size: 15px;
}

/* ==========================================================================
   14. After content: author box, related
   ========================================================================== */

.bf-after-content {
	max-width: 720px;
	margin-top: 40px;
}

.bf-related .bf-card-grid {
	grid-template-columns: repeat(3, 1fr);
}

/* ==========================================================================
   Newsletter opt-in (in-content + footer)
   ========================================================================== */

.bf-newsletter {
	margin: 28px 0 36px;
	padding: 28px 32px;
	background: var(--bf-gray-bg);
	border: 1px solid var(--bf-gray-line);
	border-left: 4px solid var(--bf-blue);
	border-radius: 8px;
	clear: both;
}

.bf-newsletter .bf-eyebrow {
	margin-bottom: 8px;
}

.bf-newsletter-title {
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.015em;
	margin: 0 0 8px;
}

.bf-newsletter-text {
	font-size: 15px;
	color: var(--bf-body);
	margin: 0 0 16px;
	max-width: 560px;
}

.bf-newsletter-form {
	display: flex;
	gap: 8px;
	max-width: 480px;
}

.bf-newsletter-input {
	flex: 1;
	min-width: 0;
	font-family: inherit;
	font-size: 16px;
	padding: 12px 14px;
	border: 1px solid var(--bf-gray-line);
	border-radius: 0;
	background: var(--bf-white);
	color: var(--bf-ink);
}

.bf-newsletter-input:focus {
	outline: 2px solid var(--bf-blue);
	outline-offset: -1px;
}

.bf-newsletter-submit {
	font-size: 15px;
	font-weight: 600;
	padding: 12px 24px;
	background: var(--bf-blue);
	color: var(--bf-white);
	border: 0;
	border-radius: 0;
	white-space: nowrap;
	transition: background-color 150ms ease;
}

.bf-newsletter-submit:hover {
	background: var(--bf-blue-dark);
}

.bf-newsletter-fineprint {
	font-size: 13px;
	color: var(--bf-meta);
	margin: 10px 0 0;
}

/* Honeypot field: hidden from people, visible to naive bots. */
.bf-hp-field {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.bf-newsletter-status {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 12px;
	padding: 10px 14px;
	border-left: 3px solid;
	max-width: 480px;
}

.bf-newsletter-status-success {
	color: #1a6b3c;
	background: #e8f6ee;
	border-color: #1a6b3c;
}

.bf-newsletter-status-error {
	color: #9b1c1c;
	background: #fdeaea;
	border-color: #9b1c1c;
}

.bf-newsletter-compact .bf-newsletter-status-success {
	color: #7ee2a8;
	background: rgba(126, 226, 168, 0.12);
	border-color: #7ee2a8;
}

.bf-newsletter-compact .bf-newsletter-status-error {
	color: #f3a1a1;
	background: rgba(243, 161, 161, 0.12);
	border-color: #f3a1a1;
}

/* Footer variant: dark band, no card chrome. */

.footer-newsletter-band {
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-newsletter-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 40px 24px;
}

.bf-newsletter-compact {
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	max-width: 640px;
}

.bf-newsletter-compact .bf-newsletter-title {
	color: var(--bf-white);
	font-size: 20px;
}

.bf-newsletter-compact .bf-newsletter-text {
	color: rgba(255, 255, 255, 0.75);
}

.bf-newsletter-compact .bf-newsletter-fineprint {
	color: rgba(255, 255, 255, 0.55);
}

/* ==========================================================================
   15. Archives / search / 404 / page
   ========================================================================== */

.bf-archive-header {
	padding: 56px 0 32px;
	border-bottom: 3px solid var(--bf-ink);
}

.bf-archive-header .bf-eyebrow {
	margin-bottom: 12px;
}

.bf-archive-title {
	font-size: clamp(40px, 6vw, 72px);
	line-height: 1.02;
	margin: 0;
}

.bf-archive-desc {
	max-width: 640px;
	margin: 16px 0 0;
	font-size: 17px;
	color: var(--bf-meta);
}

.bf-archive-count {
	margin: 12px 0 0;
}

.bf-layout-archive {
	padding-top: 40px;
}

/* Lead story on section fronts */

.bf-lead {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 32px;
	align-items: center;
	padding-bottom: 40px;
	margin-bottom: 40px;
	border-bottom: 1px solid var(--bf-gray-line);
}

.bf-lead-media {
	display: block;
	overflow: hidden;
	border-radius: 8px;
	background: var(--bf-gray-bg);
}

.bf-lead-media img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	transition: transform 150ms ease;
}

.bf-lead:hover .bf-lead-media img {
	transform: scale(1.03);
}

.bf-lead-body .bf-eyebrow {
	margin-bottom: 10px;
}

.bf-lead-title {
	font-size: clamp(24px, 2.6vw, 34px);
	line-height: 1.12;
	margin: 0 0 12px;
}

.bf-lead-title a {
	color: var(--bf-ink);
}

.bf-lead-title a:hover {
	color: var(--bf-blue);
}

.bf-lead-excerpt {
	font-size: 16px;
	margin: 0 0 12px;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.bf-page-content {
	max-width: 720px;
	margin: 0 auto;
	padding: 48px 0 64px;
}

.bf-page-title {
	font-size: clamp(30px, 4vw, 42px);
	margin-bottom: 24px;
}

.bf-404 {
	text-align: center;
	padding: 64px 0 32px;
}

.bf-404-code {
	font-size: clamp(72px, 12vw, 140px);
	color: var(--bf-navy);
	line-height: 1;
	margin: 0 0 8px;
}

.bf-404 .search-form {
	max-width: 480px;
	margin: 24px auto 0;
}

.bf-no-results {
	padding: 24px 0 40px;
}

.bf-no-results .search-form {
	max-width: 480px;
	margin-top: 16px;
}

/* ==========================================================================
   16. Comments
   ========================================================================== */

.bf-comments {
	max-width: 720px;
	margin-top: 40px;
	padding-top: 32px;
	border-top: 1px solid var(--bf-gray-line);
}

.bf-comments-title {
	font-size: 22px;
	margin-bottom: 24px;
}

.comment-list,
.comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list .children {
	padding-left: 32px;
}

.comment-body {
	padding: 16px 0;
	border-bottom: 1px solid var(--bf-gray-line);
	font-size: 15px;
}

.comment-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.comment-meta .avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
}

.comment-author-name {
	font-weight: 600;
	color: var(--bf-ink);
}

.comment-date {
	font-size: 13px;
	color: var(--bf-meta);
}

.comment-content p {
	margin: 0 0 0.8em;
}

.comment-reply-link {
	font-size: 13px;
	font-weight: 600;
}

.comment-respond {
	margin-top: 32px;
}

.comment-respond label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	margin-bottom: 4px;
	color: var(--bf-ink);
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
	width: 100%;
	font-family: inherit;
	font-size: 15px;
	padding: 10px 12px;
	border: 1px solid var(--bf-gray-line);
	border-radius: 0;
	margin-bottom: 16px;
}

.comment-respond input:focus,
.comment-respond textarea:focus {
	outline: 2px solid var(--bf-blue);
	outline-offset: -1px;
}

.comment-respond .submit {
	font-size: 15px;
	font-weight: 600;
	padding: 12px 24px;
	background: var(--bf-blue);
	color: var(--bf-white);
	border: 0;
	border-radius: 0;
	transition: background-color 150ms ease;
}

.comment-respond .submit:hover {
	background: var(--bf-blue-dark);
}

/* ==========================================================================
   17. Footer
   ========================================================================== */

.site-footer {
	background: var(--bf-navy);
	color: rgba(255, 255, 255, 0.75);
	margin-top: 0;
}

.footer-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 56px 24px 40px;
	display: grid;
	grid-template-columns: 1fr 2fr 1fr;
	gap: 48px;
}

.footer-brand .custom-logo {
	height: 40px;
	width: auto;
}

.footer-brand .site-title-text {
	color: var(--bf-blue);
}

.footer-heading {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--bf-white);
	margin: 0 0 14px;
}

.footer-about p {
	font-size: 15px;
	line-height: 1.7;
	margin: 0;
}

.footer-social-icons {
	display: flex;
	gap: 12px;
}

.footer-social-icons a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	color: var(--bf-white);
	transition: color 150ms ease, border-color 150ms ease;
}

.footer-social-icons a:hover {
	color: var(--bf-blue);
	border-color: var(--bf-blue);
}

.footer-social-icons svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.footer-legal {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-legal-inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 24px;
}

.footer-legal ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
}

.footer-legal a {
	font-size: 14px;
	color: rgba(255, 255, 255, 0.6);
}

.footer-legal a:hover {
	color: var(--bf-white);
}

/* Clean space for Mediavine/Grow injected CCPA link */

.footer-injected-space {
	min-height: 40px;
}

/* ==========================================================================
   18. Responsive
   ========================================================================== */

@media (max-width: 1023px) {
	.primary-nav,
	.header-search {
		display: none;
	}

	.header-actions .search-toggle {
		display: none;
	}

	.nav-toggle {
		display: inline-flex;
	}

	.bf-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
		padding-top: 32px;
	}

	.bf-hero {
		height: 420px;
	}

	.bf-hero-text {
		padding: 24px;
	}

	.bf-trending-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.footer-inner {
		grid-template-columns: 1fr;
		gap: 32px;
		padding-top: 40px;
	}
}

@media (max-width: 767px) {
	.bf-card-grid,
	.bf-related .bf-card-grid {
		grid-template-columns: 1fr;
	}

	.bf-feed-item {
		flex-direction: column;
		gap: 12px;
	}

	.bf-feed-media,
	.bf-feed-media img {
		width: 100%;
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.bf-hero-text {
		padding: 20px 16px;
	}

	.bf-container {
		padding: 0 16px;
	}

	.bf-newsletter {
		padding: 24px 20px;
	}

	.bf-newsletter-form {
		flex-direction: column;
	}

	.bf-newsletter-submit {
		width: 100%;
	}

	.bf-lead {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.bf-archive-header {
		padding-top: 36px;
	}

	.bf-cat-feature {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.entry-content {
		font-size: 18px; /* hard requirement: never reduce body size */
	}
}

@media (min-width: 768px) and (max-width: 1023px) {
	.bf-card-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Respect reduced motion */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
	}
}
