/*
Theme Name: Centre Français
Author: centrefrancais.lt
Description: Redakcinė WordPress tema lietuviškam portalui apie Prancūziją, jos kultūrą ir kasdienį gyvenimą.
Version: 2.0.0
Requires at least: 6.7
Tested up to: 7.1
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: centrefrancais
Tags: news, blog, block-patterns, block-styles, full-site-editing, custom-logo, featured-images, translation-ready
*/

:root {
	--cf-shadow: 0 12px 30px rgba(23, 33, 58, 0.08);
	--cf-border: #ded8cd;
	--cf-muted: #606574;
	--cf-blue: #24527a;
	--cf-blue-dark: #183650;
	--cf-red: #b43a45;
	--cf-ink: #17213a;
	--cf-surface: #fbf8f2;
	--cf-site-width: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	background: #fffefd;
	color: var(--cf-ink);
}

.cf-topbar > .alignwide,
.cf-header-main > .alignwide,
.cf-footer > .alignwide,
.cf-main > .alignwide,
main.cf-main.alignwide,
main.cf-standard-page {
	margin-left: auto !important;
	margin-right: auto !important;
	max-width: var(--cf-site-width) !important;
	padding-left: 0;
	padding-right: 0;
	width: calc(100% - 2rem) !important;
}

a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.16em;
}

img { display: block; }

.cf-site-header {
	background: #fff;
	display: contents;
}

.cf-sticky-header,
header.wp-block-template-part:has(.cf-site-header) {
	display: contents;
}

.cf-topbar {
	background: var(--cf-surface);
	border-bottom: 1px solid var(--cf-border);
	font-size: 0.9rem;
}

.cf-topbar .wp-block-navigation-item__content {
	font-weight: 650;
	line-height: 1.2;
	padding-block: 0.55rem;
}

.cf-topbar .wp-block-navigation { font-size: 0.875rem !important; font-weight: 650; }

.cf-header-main {
	background: rgba(255, 254, 253, 0.98);
	border-bottom: 1px solid var(--cf-border);
	box-shadow: 0 4px 18px rgba(13, 45, 89, 0.04);
	margin-block: 0 !important;
	min-height: 65px;
	padding-block: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	position: sticky;
	top: 0;
	z-index: 1000;
}

/* Neutralize the global block gap WordPress adds between the two header rows. */
.cf-site-header > .cf-header-main,
.wp-site-blocks .cf-site-header > .cf-header-main {
	margin-block-start: 0 !important;
}

body.admin-bar .cf-header-main { top: 32px; }

.cf-header-main > .alignwide {
	align-items: center;
	display: grid !important;
	grid-template-columns: minmax(260px, auto) minmax(0, 1fr);
	margin-block: 0 !important;
	min-height: 64px;
}

.cf-brand-logo {
	align-items: center;
	color: var(--cf-ink);
	display: inline-flex;
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.45rem, 2.5vw, 1.9rem);
	font-weight: 700;
	letter-spacing: -0.035em;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.cf-brand-logo__mark {
	flex: 0 0 auto;
	height: 38px;
	margin-right: 0.55rem;
	width: 38px;
}

.cf-brand-logo__mark path { fill: none; stroke-linecap: square; stroke-width: 3; }
.cf-brand-logo__frame, .cf-brand-logo__stem { stroke: currentColor; }
.cf-brand-logo__blue { stroke: #24527a; }
.cf-brand-logo__red { stroke: var(--cf-red); }

.cf-brand-logo__suffix {
	color: var(--cf-red);
	font-size: 0.72em;
	font-family: Inter, ui-sans-serif, sans-serif;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.cf-category-navigation { grid-column: 2; justify-self: end; margin-left: 2rem; }

.cf-category-navigation__list {
	align-items: center;
	display: flex;
	gap: clamp(0.9rem, 2vw, 1.6rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.cf-category-navigation__list a {
	color: var(--cf-ink);
	display: block;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	padding-block: 0;
	text-decoration: none;
}

.cf-category-navigation__list a:hover,
.cf-category-navigation__list .is-current a { color: var(--cf-blue); }

.cf-menu-toggle,
.cf-menu-close {
	background: transparent;
	border: 0;
	color: var(--cf-ink);
	cursor: pointer;
}

.cf-menu-toggle { display: none; padding: 0.6rem; }
.cf-menu-close { display: none; }

.cf-menu-toggle__icon {
	display: grid;
	gap: 4px;
	width: 25px;
}

.cf-menu-toggle__icon > span {
	background: currentColor;
	border-radius: 2px;
	display: block;
	height: 2px;
	width: 100%;
}

.cf-main { min-height: 55vh; }

.cf-standard-page > * {
	margin-left: 0 !important;
	margin-right: auto !important;
	max-width: 760px;
}

.cf-featured-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	grid-template-rows: 1fr 1fr;
	gap: 0.9rem;
	height: clamp(340px, 38vw, 480px);
	margin-block: clamp(1.25rem, 3vw, 2.6rem);
	min-height: 0;
}

.cf-featured-card {
	position: relative;
	min-height: 0;
	overflow: hidden;
	background: var(--cf-blue-dark);
	border-radius: 4px;
}

.cf-featured-grid > .cf-featured-card:first-child { grid-row: 1 / 3; }

.cf-featured-grid > .cf-featured-card:nth-child(2) { grid-column: 2; }

.cf-featured-pair {
	align-items: stretch;
	display: grid;
	grid-auto-rows: 1fr;
	grid-template-columns: 1fr 1fr;
	gap: 0.9rem;
	grid-column: 2;
}

.cf-featured-pair .cf-featured-card { height: 100%; min-height: 0; min-width: 0; }

.cf-featured-card img {
	height: 100%;
	left: 0;
	object-fit: cover;
	position: absolute;
	top: 0;
	transition: transform 350ms ease;
	width: 100%;
}

.cf-image-placeholder {
	background: #d8e0e5;
	display: block;
	height: 100%;
	width: 100%;
}

.cf-featured-card > a > .cf-image-placeholder {
	inset: 0;
	position: absolute;
}

.cf-category-lead .cf-image-placeholder,
.cf-list-card .cf-image-placeholder,
.cf-related-card .cf-image-placeholder {
	aspect-ratio: 3 / 2;
	border-radius: 12px;
}

.cf-list-card .cf-image-placeholder { aspect-ratio: 4 / 3; }

.cf-featured-card:hover img { transform: scale(1.025); }

.cf-featured-card::after {
	background: linear-gradient(180deg, rgba(5, 23, 46, 0.02) 15%, rgba(5, 23, 46, 0.88) 100%);
	content: "";
	inset: 0;
	position: absolute;
}

.cf-featured-card__content {
	bottom: 0;
	color: #fff;
	left: 0;
	padding: clamp(1.1rem, 2.5vw, 2rem);
	position: absolute;
	right: 0;
	z-index: 1;
}

.cf-featured-card__content a { color: inherit; text-decoration: none; }
.cf-featured-card__content h2 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.35rem, 2.4vw, 2.7rem); font-weight: 700; line-height: 1.08; margin: 0; }
.cf-featured-grid > .cf-featured-card:nth-child(2) .cf-featured-card__content h2 { font-size: clamp(1.1rem, 1.65vw, 1.65rem); }
.cf-featured-pair > .cf-featured-card .cf-featured-card__content h2 { font-size: clamp(1rem, 1.3vw, 1.2rem); }

.cf-kicker {
	color: var(--cf-red);
	display: inline-flex;
	font-size: 0.9rem;
	font-weight: 700;
}

.cf-kicker a { color: inherit; text-decoration: none; }

.cf-featured-card__category {
	border-left: 3px solid var(--cf-red);
	display: block;
	font-size: 0.82rem;
	font-weight: 700;
	margin-top: 0.75rem;
	padding-left: 0.55rem;
}

.cf-home-layout {
	align-items: start;
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: clamp(2rem, 4vw, 4.25rem);
	margin-top: clamp(2.5rem, 5vw, 4rem);
}

.cf-category-section { margin-bottom: clamp(2.25rem, 3.5vw, 3.25rem); }

.cf-section-heading {
	align-items: center;
	border-bottom: 1px solid var(--cf-border);
	display: flex;
	justify-content: space-between;
	margin-bottom: 1.25rem;
	padding-bottom: 0.8rem;
}

.cf-section-heading h2 {
	font-family: Georgia, "Times New Roman", serif;
	font-size: clamp(1.55rem, 2vw, 2rem);
	margin: 0;
	padding-left: 0.85rem;
	position: relative;
}

.cf-section-heading h2::before {
	background: var(--cf-red);
	border-radius: 0;
	content: "";
	height: 1.25em;
	left: 0;
	position: absolute;
	top: 0.04em;
	width: 4px;
}

.cf-section-heading > a {
	align-items: center;
	color: var(--cf-blue-dark);
	display: inline-flex;
	font-size: 0.96rem;
	font-weight: 720;
	gap: 0.4rem;
	line-height: 1.2;
	text-decoration: none;
}

.cf-section-heading > a svg { flex: 0 0 auto; }

.cf-category-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(260px, 0.95fr);
	gap: 1.15rem;
}

.cf-category-lead > a,
.cf-list-card > a,
.cf-related-card > a {
	aspect-ratio: 3 / 2;
	border-radius: 3px;
	display: block;
	overflow: hidden;
	width: 100%;
}

.cf-category-lead > a img,
.cf-list-card > a img,
.cf-related-card > a img {
	border-radius: 0;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.cf-archive-card img {
	aspect-ratio: 3 / 2;
	border-radius: 3px;
	height: auto;
	object-fit: cover;
	width: 100%;
}

.cf-category-lead h3 { font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.3rem, 1.7vw, 1.7rem); line-height: 1.2; margin: 0.8rem 0 0.35rem; }
.cf-category-lead h3 a, .cf-list-card h3 a, .cf-related-card h3 a, .cf-archive-card h2 a { color: inherit; text-decoration: none; }
.cf-category-lead h3 a:hover, .cf-list-card h3 a:hover, .cf-related-card h3 a:hover, .cf-archive-card h2 a:hover { color: var(--cf-blue); }

.cf-card-meta,
.cf-post-meta,
.cf-archive-card .wp-block-post-date {
	color: #35465d;
	display: flex;
	flex-wrap: wrap;
	font-size: 0.82rem;
	font-weight: 520;
	gap: 0.45rem 0.85rem;
}

.cf-post-meta {
	color: #35465d;
	font-size: 0.86rem;
	font-weight: 520;
}

.cf-card-meta a,
.cf-post-meta a {
	color: inherit;
	font-weight: 650;
	text-decoration: none;
}

.cf-card-meta a:hover,
.cf-post-meta a:hover { color: var(--cf-blue); }

.cf-card-excerpt { color: #48576c; line-height: 1.5; margin: 0.45rem 0 0; }

.cf-category-list { display: grid; gap: 0.65rem; }

.cf-list-card {
	align-items: center;
	border-bottom: 1px solid var(--cf-border);
	display: grid;
	grid-template-columns: 104px minmax(0, 1fr);
	gap: 0.8rem;
	padding-bottom: 0.65rem;
}

.cf-list-card:last-child { border-bottom: 0; }
.cf-list-card > a { aspect-ratio: 4 / 3; }
.cf-list-card h3 { font-size: 0.96rem; line-height: 1.22; margin: 0 0 0.3rem; }

.cf-sidebar { min-width: 0; }

.cf-sidebar-sticky {
	position: static;
}

.cf-home-sidebar,
.cf-article-sidebar {
	position: sticky;
	top: calc(var(--cf-header-height, 112px) + 0.75rem);
}

body.admin-bar .cf-home-sidebar,
body.admin-bar .cf-article-sidebar { top: calc(var(--cf-header-height, 112px) + 33px + 0.75rem); }

.cf-widget {
	background: var(--cf-surface);
	border: 1px solid var(--cf-border);
	border-radius: 3px;
	margin-bottom: 1.25rem;
	padding: 1.25rem;
}

.cf-widget-title,
.cf-widget .wp-block-heading {
	font-size: 1.1rem;
	margin-top: 0;
}

.cf-widget ul { margin: 0; padding-left: 1.2rem; }
.cf-widget li + li { margin-top: 0.65rem; }

.cf-popular-widget {
	background: #fffefd;
	box-shadow: var(--cf-shadow);
	padding: 0;
	overflow: hidden;
}

.cf-popular-widget .cf-widget-title {
	background: var(--cf-blue-dark);
	color: #fff;
	font-size: 1.2rem;
	margin: 0;
	padding: 1rem 1.1rem 0.9rem;
}

.cf-popular-tabs {
	background: #f4f7fb;
	border-bottom: 1px solid var(--cf-border);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	padding: 0 0.45rem;
}

.cf-popular-tabs button {
	background: transparent;
	border: 0;
	border-bottom: 3px solid transparent;
	color: #52627a;
	cursor: pointer;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 720;
	line-height: 1.2;
	padding: 0.75rem 0.2rem 0.65rem;
}

.cf-popular-tabs button:hover,
.cf-popular-tabs button:focus-visible,
.cf-popular-tabs button.is-active {
	color: var(--cf-blue-dark);
}

.cf-popular-tabs button.is-active { border-bottom-color: var(--cf-blue); }
.cf-popular-tabs button:focus-visible { outline: 2px solid var(--cf-blue); outline-offset: -2px; }

.cf-widget .cf-popular-list {
	list-style: none;
	margin: 0;
	padding: 0.4rem 1rem 0.7rem;
}

.cf-popular-widget .cf-popular-item {
	align-items: center;
	border-bottom: 1px solid var(--cf-border);
	display: grid;
	gap: 0.65rem;
	grid-template-columns: 20px 72px minmax(0, 1fr);
	margin: 0;
	padding: 0.75rem 0;
}

.cf-popular-widget .cf-popular-item:last-child { border-bottom: 0; }

.cf-popular-item__rank {
	color: var(--cf-blue);
	font-size: 1.1rem;
	font-weight: 800;
	text-align: center;
}

.cf-popular-item__image {
	aspect-ratio: 4 / 3;
	border-radius: 7px;
	display: block;
	overflow: hidden;
}

.cf-popular-item__image img,
.cf-popular-item__image .cf-image-placeholder {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.cf-popular-item__content > a {
	color: var(--cf-ink);
	display: -webkit-box;
	font-size: 0.84rem;
	font-weight: 750;
	line-height: 1.25;
	overflow: hidden;
	text-decoration: none;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.cf-popular-item__content > a:hover { color: var(--cf-blue); }
.cf-popular-item__content time { color: #52627a; display: block; font-size: 0.8rem; margin-top: 0.25rem; }
.cf-popular-widget[aria-busy="true"] .cf-popular-list { opacity: 0.5; }

.cf-empty-state {
	background: var(--cf-surface);
	border: 1px dashed #b9c8db;
	border-radius: 14px;
	color: var(--cf-muted);
	padding: 1.2rem;
}

.cf-article-layout {
	align-items: start;
	column-gap: clamp(2rem, 5vw, 5.5rem);
	display: grid;
	grid-template-columns: minmax(0, 760px) 280px;
	justify-content: start;
	margin-block: clamp(1.25rem, 3vw, 2.75rem) clamp(2rem, 5vw, 4.5rem);
	row-gap: 1rem;
}

.cf-article-header { grid-column: 1; grid-row: 1; margin-bottom: 0; }
.cf-article-header h1 { font-size: clamp(2rem, 5vw, 3.7rem); letter-spacing: -0.035em; line-height: 1.04; margin: 0.8rem 0 1rem; }
.cf-article-body { grid-column: 1; grid-row: 2; min-width: 0; }
.cf-article-body > .wp-block-post-featured-image { margin: 0 0 2rem; }
.cf-article-body > .wp-block-post-featured-image img { aspect-ratio: 3 / 2; border-radius: 3px; height: auto; object-fit: cover; width: 100%; }
.cf-article-sidebar { align-self: start; grid-column: 2; grid-row: 2; }

.cf-article .wp-block-post-content {
	font-size: 1.125rem;
	line-height: 1.78;
}

.cf-article .wp-block-post-content > h2 {
	font-size: clamp(1.55rem, 3vw, 2.15rem);
	line-height: 1.2;
	margin-top: 1.5em;
	scroll-margin-top: calc(var(--cf-header-height, 112px) + 2rem);
}

.cf-article .wp-block-post-content > p + h2 {
	margin-block-start: 1em !important;
}

.cf-article .wp-block-post-content > h3 { margin-top: 1.8em; }
.cf-article .wp-block-post-content a { color: var(--cf-blue-dark); }

.cf-toc {
	background: #fff;
	border: 0;
	border-left: 4px solid var(--cf-blue);
	border-radius: 0 10px 10px 0;
	box-shadow: 0 10px 28px rgba(13, 45, 89, 0.1);
	margin-bottom: 1.25rem;
	padding: 1.05rem 1.15rem;
}

.cf-toc summary { color: var(--cf-ink); cursor: pointer; font-size: 1.05rem; font-weight: 800; letter-spacing: 0.01em; }
.cf-toc nav { border-top: 1px solid var(--cf-border); margin-top: 0.85rem; padding-top: 0.85rem; }
.cf-toc ol { margin: 0; padding-left: 1.2rem; }
.cf-toc li + li { margin-top: 0.7rem; }
.cf-toc a { color: #253a56; font-size: 0.92rem; font-weight: 650; line-height: 1.4; text-decoration: none; }
.cf-toc a:hover, .cf-toc a.is-active { color: var(--cf-blue); font-weight: 760; }
.cf-toc[hidden] { display: none; }

.cf-author-box {
	align-items: center;
	background: var(--cf-surface);
	border: 1px solid var(--cf-border);
	border-radius: 3px;
	display: grid;
	gap: 1.1rem;
	grid-template-columns: 84px minmax(0, 1fr);
	margin-top: 3.5rem;
	padding: 1.4rem;
}

.cf-author-box img { border-radius: 50%; }
.cf-author-box > a { display: block; }
.cf-author-box h2 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.cf-author-box h2 a { color: inherit; text-decoration: none; }
.cf-author-box h2 a:hover { color: var(--cf-blue); }
.cf-author-box p { color: #4c5c72; margin: 0; }

.cf-related { margin-top: 3.5rem; }
.cf-related > h2 { border-bottom: 1px solid var(--cf-border); font-size: 1.55rem; padding-bottom: 0.75rem; }
.cf-related-grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(3, 1fr); }
.cf-related-card h3 { font-size: 1rem; line-height: 1.3; margin: 0.7rem 0 0; }

.cf-archive-grid { display: grid; gap: 2rem; grid-template-columns: repeat(3, 1fr); }
.cf-archive-card h2,
.cf-archive-card .wp-block-post-title { font-size: 1.15rem !important; line-height: 1.28; margin: 0.7rem 0 0.4rem; }

.cf-footer {
	background: #151f35;
	color: #dbe8f8;
	margin-top: clamp(4rem, 8vw, 7rem);
	padding-block: clamp(3rem, 6vw, 5rem) 1.5rem;
}

.cf-footer a { color: #fff; }
.cf-footer .cf-brand-logo { color: #fff; }
.cf-footer .cf-brand-logo__suffix { color: #79b0ff; }
.cf-footer .wp-block-heading { font-size: 1rem !important; line-height: 1.25; margin-bottom: 0.75rem; }
.cf-footer-description { color: #dbe8f8; font-size: 0.92rem; line-height: 1.65; margin: 1rem 0 0; max-width: 34rem; }
.cf-footer-grid { align-items: start; display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; }
.cf-footer-bottom {
	border-top: 1px solid rgba(255,255,255,.2);
	color: #d6e1ef;
	font-size: 0.92rem;
	font-weight: 600;
	justify-content: center !important;
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	text-align: center;
}

.cf-footer-bottom p { margin: 0; }
.cf-footer-bottom p + p { display: none; }

.cf-pagination { margin-top: 3rem; }
.cf-pagination .page-numbers { border: 1px solid var(--cf-border); border-radius: 8px; display: inline-flex; min-height: 40px; min-width: 40px; padding: 0.45rem 0.7rem; place-content: center; text-decoration: none; }
.cf-pagination .current { background: var(--cf-blue); border-color: var(--cf-blue); color: #fff; }

.cf-breadcrumbs {
	color: var(--cf-muted);
	font-size: 0.88rem;
	margin: 1.25rem 0 0;
}

.cf-breadcrumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 0.55rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.cf-breadcrumbs li { align-items: center; display: inline-flex; gap: 0.55rem; }
.cf-breadcrumbs li + li::before { color: #9c968b; content: "/"; }
.cf-breadcrumbs a { color: var(--cf-blue-dark); }
.cf-breadcrumbs [aria-current="page"] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: #fff;
	clip: auto !important;
	clip-path: none;
	color: var(--cf-ink);
	display: block;
	font-weight: 700;
	height: auto;
	left: 0.75rem;
	padding: 0.8rem 1rem;
	top: 0.75rem;
	width: auto;
	z-index: 100000;
}

@media (max-width: 1020px) {
	.cf-home-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 2rem; }
	.cf-article-layout { column-gap: 2.5rem; grid-template-columns: minmax(0, 1fr) 250px; }
	.cf-featured-grid { min-height: 0; }
}

@media (max-width: 800px) {
	body.cf-menu-is-open { overflow: hidden; }
	.cf-header-main { padding-block: 0; }
	.cf-header-main > .alignwide { grid-template-columns: 1fr auto; min-height: 60px; }
	.cf-category-navigation { align-items: center; display: flex; grid-column: 2; justify-self: end; }
	.cf-menu-toggle { align-items: center; display: inline-flex; justify-content: center; }
	.cf-category-navigation__panel {
		background: #fff;
		display: none;
		inset: 0;
		overflow-y: auto;
		padding: 5.25rem 1.5rem 2rem;
		position: fixed;
		z-index: 1100;
	}
	.cf-category-navigation.is-open .cf-category-navigation__panel { display: block; }
	.cf-menu-close {
		display: grid;
		font-size: 2.25rem;
		height: 48px;
		line-height: 1;
		padding: 0;
		place-items: center;
		position: absolute;
		right: 1.25rem;
		top: 1.1rem;
		width: 48px;
	}
	.cf-category-navigation__list { align-items: stretch; display: grid; gap: 0; }
	.cf-category-navigation__list li { border-bottom: 1px solid var(--cf-border); }
	.cf-category-navigation__list a { font-size: 1.15rem; padding: 1rem 0.25rem; }
	.cf-featured-grid { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; min-height: 0; }
	.cf-featured-grid > .cf-featured-card:first-child,
	.cf-featured-grid > .cf-featured-card:nth-child(2),
	.cf-featured-pair { grid-column: auto; grid-row: auto; }
	.cf-featured-card { min-height: 360px; }
	.cf-featured-grid > .cf-featured-card:nth-child(2) { min-height: 290px; }
	.cf-featured-pair .cf-featured-card { min-height: 240px; }
	.cf-home-layout, .cf-article-layout { grid-template-columns: minmax(0, 1fr); }
	.cf-home-sidebar { position: static; }
	.cf-home-sidebar .cf-sidebar-sticky { position: static; }
	.cf-article-header { grid-column: 1; grid-row: 1; }
	.cf-article-sidebar {
		grid-column: 1;
		grid-row: 2;
		position: sticky;
		top: calc(var(--cf-header-height, 104px) + 0.6rem);
		z-index: 50;
	}
	body.admin-bar .cf-article-sidebar { top: calc(var(--cf-header-height, 104px) + 33px + 0.6rem); }
	.cf-article-sidebar .cf-sidebar-sticky { position: static; }
	.cf-article-body { grid-column: 1; grid-row: 3; }
	.cf-article-sidebar .cf-widget-area { display: none; }
	.cf-article-layout { margin-top: 1rem; row-gap: 0.85rem; }
	.cf-toc { margin-bottom: 0; }
	.cf-category-section { margin-bottom: clamp(3rem, 6vw, 5.5rem); }
	.cf-category-grid { gap: 1.5rem; grid-template-columns: 1fr; }
	.cf-category-lead h3 { font-size: clamp(1.35rem, 4vw, 1.65rem); margin: 0.9rem 0 0.45rem; }
	.cf-card-excerpt { line-height: 1.65; }
	.cf-category-list { gap: 1rem; }
	.cf-list-card { gap: 1rem; grid-template-columns: 116px minmax(0, 1fr); padding-bottom: 1rem; }
	.cf-list-card h3 { font-size: 1rem; margin-bottom: 0.45rem; }
	.cf-related-grid, .cf-archive-grid { grid-template-columns: repeat(2, 1fr); }
	.cf-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 801px) {
	.cf-category-grid { align-items: start; }
	.cf-category-list {
		align-content: start;
		align-self: start;
		grid-auto-rows: max-content;
	}
	.cf-list-card { align-items: start; }
	.cf-category-lead > a { aspect-ratio: 16 / 9; }
	.cf-category-lead .cf-card-excerpt {
		display: -webkit-box;
		overflow: hidden;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
	}
	.cf-toc summary { cursor: default; list-style: none; }
	.cf-toc summary::-webkit-details-marker { display: none; }
}

@media (max-width: 782px) {
	body.admin-bar .cf-header-main { top: 46px; }
	body.admin-bar .cf-article-sidebar { top: calc(var(--cf-header-height, 104px) + 47px + 0.6rem); }
}

@media (max-width: 560px) {
	.cf-topbar .wp-block-navigation { font-size: 0.875rem !important; font-weight: 650; }
	.cf-header-main { padding-block: 0 !important; }
	.cf-featured-card { min-height: 310px; }
	.cf-featured-pair { grid-template-columns: 1fr; }
	.cf-featured-pair .cf-featured-card { min-height: 230px; }
	.cf-featured-card__content h2,
	.cf-featured-grid > .cf-featured-card:nth-child(2) .cf-featured-card__content h2,
	.cf-featured-pair > .cf-featured-card .cf-featured-card__content h2 { font-size: 1.35rem; }
	.cf-category-section { margin-bottom: 3.5rem; }
	.cf-section-heading { align-items: flex-start; gap: 0.85rem; }
	.cf-section-heading > a { font-size: 0.9rem; margin-top: 0.25rem; }
	.cf-list-card { grid-template-columns: 100px minmax(0, 1fr); }
	.cf-related-grid, .cf-archive-grid, .cf-footer-grid { grid-template-columns: 1fr; }
	.cf-author-box { grid-template-columns: 64px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
