/**
 * CounterWords — main stylesheet (layout, components, blog).
 * Design tokens live in style.css (:root) and are overridden inline by the Customizer.
 * The word counter workspace has its own file: editor.css.
 */

/* ------------------------------------------------------------------ *
 * Reset-ish base
 * ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

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

body {
	margin: 0;
	font-family: var(--cw-font-body);
	font-size: var(--cw-font-size-base);
	line-height: var(--cw-line-height);
	color: var(--cw-color-text);
	background: var(--cw-color-bg);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; }
img { display: block; }

a { color: var(--cw-color-primary); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--cw-font-heading);
	color: var(--cw-color-heading);
	line-height: 1.25;
	margin: 0 0 0.5em;
	font-weight: 700;
}
h1 { font-size: var(--cw-h1-size); }
h2 { font-size: var(--cw-h2-size); }
h3 { font-size: var(--cw-h3-size); }

p { margin: 0 0 1rem; }

:focus-visible {
	outline: 3px solid var(--cw-color-primary);
	outline-offset: 2px;
	border-radius: 3px;
}

/* ------------------------------------------------------------------ *
 * Utilities
 * ------------------------------------------------------------------ */
.cw-container {
	width: 100%;
	max-width: var(--cw-content-width);
	margin-inline: auto;
	padding-inline: 20px;
}
.cw-narrow {
	max-width: var(--cw-article-width);
	margin-inline: auto;
}

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px; width: 1px;
	margin: -1px; overflow: hidden; padding: 0;
	position: absolute !important; word-wrap: normal !important;
}
.screen-reader-text:focus {
	background: var(--cw-color-card);
	clip: auto; clip-path: none;
	color: var(--cw-color-primary);
	display: block;
	height: auto; width: auto;
	left: 8px; top: 8px;
	padding: 12px 20px;
	z-index: 100000;
	border-radius: var(--cw-radius-sm);
	box-shadow: var(--cw-shadow-lg);
}

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 8px; top: 8px; }

.cw-icon { display: inline-block; vertical-align: middle; flex: 0 0 auto; }

/* ------------------------------------------------------------------ *
 * Buttons
 * ------------------------------------------------------------------ */
.cw-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	background: var(--cw-color-primary);
	color: #fff;
	border: 1px solid transparent;
	padding: 10px 18px;
	border-radius: var(--cw-radius-sm);
	font: inherit; font-weight: 600;
	cursor: pointer;
	min-height: 44px;
	transition: background-color 0.15s ease, transform 0.05s ease;
}
.cw-btn:hover, .cw-btn:focus { background: var(--cw-color-primary-hover); text-decoration: none; color: #fff; }
.cw-btn:active { transform: translateY(1px); }
.cw-btn--ghost {
	background: transparent; color: var(--cw-color-primary);
	border-color: var(--cw-color-border);
}
.cw-btn--ghost:hover, .cw-btn--ghost:focus { background: rgba(0,0,0,0.03); color: var(--cw-color-primary); }
.cw-btn--small { padding: 7px 12px; min-height: 38px; font-size: 0.9rem; }
.cw-btn--tiny { padding: 4px 10px; min-height: 32px; font-size: 0.82rem; }

/* ------------------------------------------------------------------ *
 * Header
 * ------------------------------------------------------------------ */
.site-header {
	background: var(--cw-color-card);
	border-bottom: 1px solid var(--cw-color-border);
}
.site-header.is-sticky {
	position: sticky; top: 0; z-index: 500;
	backdrop-filter: saturate(1.2);
}
.header-inner {
	display: flex; align-items: center; gap: 20px;
	min-height: var(--cw-header-height);
	padding-block: 8px;
}
.site-branding { display: flex; flex-direction: column; justify-content: center; }
.custom-logo { max-height: 44px; width: auto; }
.custom-logo-link { display: inline-flex; }
.site-title { font-size: 1.35rem; font-weight: 800; margin: 0; line-height: 1.1; }
.site-title a { color: var(--cw-color-heading); }
.site-title a:hover { text-decoration: none; color: var(--cw-color-primary); }
.site-description { font-size: 0.8rem; color: var(--cw-color-muted); margin: 2px 0 0; }

.main-navigation { margin-left: auto; }
.main-navigation .menu {
	list-style: none; margin: 0; padding: 0;
	display: flex; align-items: center; gap: 4px;
}
.main-navigation .menu a {
	display: block; padding: 8px 12px;
	color: var(--cw-color-secondary); font-weight: 500;
	border-radius: var(--cw-radius-sm);
}
.main-navigation .menu a:hover,
.main-navigation .menu .current-menu-item > a {
	color: var(--cw-color-primary); text-decoration: none;
	background: rgba(0,0,0,0.03);
}

/* sub menus */
.main-navigation .sub-menu {
	list-style: none; margin: 0; padding: 6px;
	position: absolute; min-width: 200px;
	background: var(--cw-color-card);
	border: 1px solid var(--cw-color-border);
	border-radius: var(--cw-radius-sm);
	box-shadow: var(--cw-shadow-lg);
	opacity: 0; visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
	z-index: 600;
}
.main-navigation .menu-item-has-children { position: relative; }
.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1; visibility: visible; transform: translateY(0);
}
.submenu-toggle { display: none; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.header-search-toggle, .theme-toggle, .menu-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	width: 44px; height: 44px;
	background: transparent; border: 1px solid transparent;
	border-radius: var(--cw-radius-sm);
	color: var(--cw-color-secondary); cursor: pointer;
}
.header-search-toggle:hover, .theme-toggle:hover, .menu-toggle:hover {
	background: rgba(0,0,0,0.04);
}
.theme-toggle-moon { display: none; }
:root[data-theme="dark"] .theme-toggle-sun { display: none; }
:root[data-theme="dark"] .theme-toggle-moon { display: inline-flex; }

.menu-toggle { display: none; }
.menu-toggle-bar, .menu-toggle-bar::before, .menu-toggle-bar::after {
	content: ""; display: block; width: 22px; height: 2px;
	background: currentColor; border-radius: 2px; position: relative;
	transition: transform 0.2s ease, opacity 0.2s ease;
}
.menu-toggle-bar::before { position: absolute; top: -7px; }
.menu-toggle-bar::after { position: absolute; top: 7px; }
.main-navigation.is-open ~ .header-actions {}
.menu-toggle[aria-expanded="true"] .menu-toggle-bar { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.header-search { border-top: 1px solid var(--cw-color-border); padding: 14px 0; background: var(--cw-color-card); }

/* ------------------------------------------------------------------ *
 * Search form
 * ------------------------------------------------------------------ */
.search-form-inner { display: flex; gap: 8px; }
.search-field {
	flex: 1; padding: 10px 14px;
	border: 1px solid var(--cw-color-border);
	border-radius: var(--cw-radius-sm);
	background: var(--cw-color-card); color: var(--cw-color-text);
	font: inherit; min-height: 44px;
}
.search-submit {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 48px; min-height: 44px;
	background: var(--cw-color-primary); color: #fff;
	border: 0; border-radius: var(--cw-radius-sm); cursor: pointer;
}

/* ------------------------------------------------------------------ *
 * Layout: content + sidebar
 * ------------------------------------------------------------------ */
.site-content { padding-block: 32px; }
.site-main {
	display: grid;
	grid-template-columns: minmax(0, 1fr) var(--cw-sidebar-width);
	gap: var(--cw-gap);
	align-items: start;
}
.no-sidebar .site-main,
.site-main.cw-tool-main { grid-template-columns: 1fr; }
.sidebar-left .site-main { grid-template-columns: var(--cw-sidebar-width) minmax(0, 1fr); }
.sidebar-left .content-area { order: 2; }
.sidebar-none .site-main { grid-template-columns: 1fr; }

.content-area { min-width: 0; }
.content-area--article { max-width: 100%; }

.sidebar .sidebar-inner { display: flex; flex-direction: column; gap: 24px; }
.sidebar.is-sticky .sidebar-inner { position: sticky; top: calc(var(--cw-header-height) + 20px); }

.widget {
	background: var(--cw-color-card);
	border: 1px solid var(--cw-color-border);
	border-radius: var(--cw-radius);
	padding: 20px;
	box-shadow: var(--cw-shadow);
}
.widget-title { font-size: 1.05rem; margin-bottom: 14px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 6px 0; border-bottom: 1px solid var(--cw-color-border); }
.widget li:last-child { border-bottom: 0; }

/* ------------------------------------------------------------------ *
 * Post cards / archive list
 * ------------------------------------------------------------------ */
.posts-list { display: flex; flex-direction: column; gap: 24px; }
.post-card {
	background: var(--cw-color-card);
	border: 1px solid var(--cw-color-border);
	border-radius: var(--cw-radius);
	overflow: hidden;
	box-shadow: var(--cw-shadow);
	display: grid;
	grid-template-columns: 280px 1fr;
}
.post-card .post-thumbnail { display: block; overflow: hidden; }
.post-card .post-thumbnail img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.post-card:hover .post-thumbnail img { transform: scale(1.03); }
.post-card-body { padding: 22px; display: flex; flex-direction: column; }
.post-card .entry-title { font-size: 1.35rem; margin-bottom: 8px; }
.post-card .entry-title a { color: var(--cw-color-heading); }
.post-card .entry-title a:hover { color: var(--cw-color-primary); text-decoration: none; }
.entry-meta {
	display: flex; flex-wrap: wrap; gap: 12px;
	font-size: 0.85rem; color: var(--cw-color-muted);
	margin-bottom: 10px; align-items: center;
}
.entry-meta a { color: var(--cw-color-muted); }
.entry-summary { color: var(--cw-color-text); margin-bottom: 14px; }
.read-more { font-weight: 600; margin-top: auto; align-self: flex-start; }

.post-card--compact { grid-template-columns: 1fr; }
.post-card--compact .post-thumbnail img { aspect-ratio: 16/9; width: 100%; }
.card-category {
	text-transform: uppercase; letter-spacing: 0.04em; font-size: 0.72rem;
	font-weight: 700; color: var(--cw-color-primary);
}
.entry-meta--footer { margin-bottom: 0; margin-top: 12px; }

/* card grid (homepage recent) */
.cw-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

/* ------------------------------------------------------------------ *
 * Page headers, breadcrumbs, pagination
 * ------------------------------------------------------------------ */
.page-header { margin-bottom: 24px; }
.page-title { margin-bottom: 8px; }
.archive-description, .page-description { color: var(--cw-color-muted); }

.breadcrumbs { margin-bottom: 18px; font-size: 0.85rem; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs .crumb-sep { color: var(--cw-color-muted); margin-left: 6px; }
.breadcrumbs [aria-current="page"] { color: var(--cw-color-muted); }

.pagination, .comments-pagination { margin-top: 32px; }
.pagination .nav-links, .comment-navigation .nav-links { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center;
	min-width: 44px; min-height: 44px; padding: 0 12px;
	border: 1px solid var(--cw-color-border);
	border-radius: var(--cw-radius-sm);
	background: var(--cw-color-card); color: var(--cw-color-secondary);
}
.pagination .page-numbers.current { background: var(--cw-color-primary); color: #fff; border-color: var(--cw-color-primary); }
.pagination a.page-numbers:hover { border-color: var(--cw-color-primary); text-decoration: none; }

/* ------------------------------------------------------------------ *
 * Single article
 * ------------------------------------------------------------------ */
.single-post, .single-page {
	background: var(--cw-color-card);
	border: 1px solid var(--cw-color-border);
	border-radius: var(--cw-radius);
	padding: clamp(20px, 4vw, 44px);
	box-shadow: var(--cw-shadow);
}
.single-post .entry-header, .single-page .entry-header { margin-bottom: 18px; }
.single-post .entry-title { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.post-thumbnail { margin: 0 0 24px; border-radius: var(--cw-radius); overflow: hidden; }
.post-thumbnail img { width: 100%; }

.entry-content { max-width: var(--cw-article-width); }
.single-post .entry-content, .single-page .entry-content, .cw-section .entry-content { margin-inline: auto; }
.entry-content > * { margin-inline: auto; }

.entry-content p, .entry-content ul, .entry-content ol, .entry-content blockquote,
.entry-content table, .entry-content pre, .entry-content figure, .entry-content h2,
.entry-content h3, .entry-content h4 { margin-bottom: 1.15rem; }
.entry-content h2 { margin-top: 2rem; scroll-margin-top: calc(var(--cw-header-height) + 20px); }
.entry-content h3 { margin-top: 1.6rem; scroll-margin-top: calc(var(--cw-header-height) + 20px); }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content li { margin-bottom: 0.4em; }
.entry-content a { text-decoration: underline; }
.entry-content img, .entry-content figure { border-radius: var(--cw-radius-sm); }
.entry-content figcaption, .wp-caption-text { font-size: 0.85rem; color: var(--cw-color-muted); text-align: center; margin-top: 8px; }

.entry-content blockquote {
	border-left: 4px solid var(--cw-color-primary);
	background: rgba(0,0,0,0.02);
	padding: 14px 20px; margin-inline: 0;
	font-style: italic; color: var(--cw-color-secondary);
	border-radius: 0 var(--cw-radius-sm) var(--cw-radius-sm) 0;
}
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--cw-color-border); padding: 10px 14px; text-align: left; }
.entry-content th { background: rgba(0,0,0,0.03); font-weight: 700; }
.entry-content pre {
	background: #0f172a; color: #e2e8f0;
	padding: 16px 18px; border-radius: var(--cw-radius-sm);
	overflow-x: auto; font-family: var(--cw-font-mono); font-size: 0.9rem;
}
.entry-content code { font-family: var(--cw-font-mono); font-size: 0.9em; background: rgba(0,0,0,0.05); padding: 2px 6px; border-radius: 4px; }
.entry-content pre code { background: none; padding: 0; }
.entry-content .wp-block-embed, .entry-content iframe { max-width: 100%; }
.entry-content .wp-block-embed__wrapper { position: relative; }

/* content helper boxes */
.entry-content .cw-box, .entry-content .tip-box, .entry-content .warning-box, .entry-content .faq-box {
	border: 1px solid var(--cw-color-border);
	border-left: 4px solid var(--cw-color-primary);
	background: rgba(0,0,0,0.02);
	padding: 16px 20px; border-radius: var(--cw-radius-sm); margin-bottom: 1.2rem;
}
.entry-content .warning-box { border-left-color: var(--cw-color-warning); background: var(--cw-color-warning-bg); }

.entry-footer { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 0.9rem; color: var(--cw-color-muted); }
.entry-footer a { color: var(--cw-color-primary); }

/* ------------------------------------------------------------------ *
 * TOC
 * ------------------------------------------------------------------ */
.toc {
	max-width: var(--cw-article-width);
	margin: 0 auto 28px;
	background: var(--cw-color-bg);
	border: 1px solid var(--cw-color-border);
	border-radius: var(--cw-radius);
	padding: 6px 18px 14px;
}
.toc-toggle {
	display: flex; align-items: center; justify-content: space-between; gap: 10px;
	width: 100%; padding: 10px 0; background: none; border: 0; cursor: pointer;
	font-weight: 700; color: var(--cw-color-heading); font-size: 1rem; font-family: inherit;
}
.toc-chevron { width: 10px; height: 10px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.2s ease; }
.toc.is-collapsed .toc-chevron { transform: rotate(-45deg); }
.toc.is-collapsed .toc-list { display: none; }
.toc-list { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc-item { margin: 4px 0; }
.toc-item a { color: var(--cw-color-text); }
.toc-item a:hover { color: var(--cw-color-primary); }
.toc-level-3 { padding-left: 18px; font-size: 0.94em; }
.toc-item.is-active > a { color: var(--cw-color-primary); font-weight: 600; }

/* ------------------------------------------------------------------ *
 * Author box, related, sharing, post nav
 * ------------------------------------------------------------------ */
.author-box, .related-posts, .post-navigation, .social-sharing { max-width: var(--cw-article-width); margin-inline: auto; }
.author-box {
	display: flex; gap: 16px; margin-top: 32px;
	background: var(--cw-color-bg); border: 1px solid var(--cw-color-border);
	border-radius: var(--cw-radius); padding: 20px;
}
.author-box-avatar img { border-radius: 50%; }
.author-box-name { margin-bottom: 6px; font-size: 1.1rem; }
.author-box-bio { color: var(--cw-color-text); margin-bottom: 8px; }

.social-sharing { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 24px; }
.sharing-label { font-weight: 600; color: var(--cw-color-secondary); }
.share-link {
	padding: 6px 14px; border: 1px solid var(--cw-color-border);
	border-radius: 999px; font-size: 0.85rem; color: var(--cw-color-secondary);
}
.share-link:hover { border-color: var(--cw-color-primary); color: var(--cw-color-primary); text-decoration: none; }

.related-posts { margin-top: 40px; }
.related-title { margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.related-card { background: var(--cw-color-card); border: 1px solid var(--cw-color-border); border-radius: var(--cw-radius); overflow: hidden; }
.related-thumb img { aspect-ratio: 16/9; width: 100%; object-fit: cover; }
.related-body { padding: 14px; }
.related-card-title { font-size: 1rem; margin-bottom: 6px; }
.related-excerpt { font-size: 0.88rem; color: var(--cw-color-muted); margin-bottom: 8px; }
.related-date { font-size: 0.8rem; color: var(--cw-color-muted); }

.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 32px; }
.post-navigation a {
	display: flex; flex-direction: column; gap: 4px; padding: 16px;
	border: 1px solid var(--cw-color-border); border-radius: var(--cw-radius);
	background: var(--cw-color-card);
}
.post-navigation a:hover { border-color: var(--cw-color-primary); text-decoration: none; }
.post-navigation .nav-next { text-align: right; }
.nav-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--cw-color-muted); }
.nav-title { font-weight: 600; color: var(--cw-color-heading); }

/* ------------------------------------------------------------------ *
 * Comments
 * ------------------------------------------------------------------ */
.comments-area { max-width: var(--cw-article-width); margin: 40px auto 0; }
.comments-title, .comment-reply-title { margin-bottom: 20px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list ol { list-style: none; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--cw-color-border); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: 0.8rem; color: var(--cw-color-muted); }
.comment-respond { margin-top: 24px; }
.comment-form { display: grid; gap: 14px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 10px 14px; border: 1px solid var(--cw-color-border);
	border-radius: var(--cw-radius-sm); background: var(--cw-color-card); color: var(--cw-color-text); font: inherit;
}

/* ------------------------------------------------------------------ *
 * Author archive header
 * ------------------------------------------------------------------ */
.author-header-inner { display: flex; gap: 18px; align-items: center; }
.author-avatar img { border-radius: 50%; }
.author-bio { color: var(--cw-color-muted); margin: 6px 0 0; }

/* ------------------------------------------------------------------ *
 * Homepage tool sections (below the workspace)
 * ------------------------------------------------------------------ */
.cw-tool-header { text-align: center; margin: 8px auto 22px; max-width: 760px; }
.cw-tool-title { font-size: clamp(1.6rem, 4vw, 2.3rem); margin-bottom: 8px; }
.cw-tool-sub { color: var(--cw-color-muted); font-size: 1.05rem; margin: 0; }

.cw-section { padding-block: 30px; }
.cw-section-title { text-align: center; margin-bottom: 22px; }
.cw-intro-copy { text-align: center; color: var(--cw-color-text); }

.cw-feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cw-feature {
	background: var(--cw-color-card); border: 1px solid var(--cw-color-border);
	border-radius: var(--cw-radius); padding: 22px; box-shadow: var(--cw-shadow);
}
.cw-feature h3 { color: var(--cw-color-primary); margin-bottom: 8px; }
.cw-feature p { margin: 0; color: var(--cw-color-text); }

.cw-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: step; }
.cw-steps li { display: flex; gap: 14px; align-items: flex-start; background: var(--cw-color-card); border: 1px solid var(--cw-color-border); border-radius: var(--cw-radius); padding: 14px 18px; }
.cw-step-num {
	flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
	background: var(--cw-color-primary); color: #fff; font-weight: 700;
	display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem;
}
.cw-privacy-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cw-privacy-list li { padding-left: 28px; position: relative; }
.cw-privacy-list li::before { content: "✓"; position: absolute; left: 0; color: var(--cw-color-success); font-weight: 700; }

.cw-faq-item { border: 1px solid var(--cw-color-border); border-radius: var(--cw-radius); background: var(--cw-color-card); margin-bottom: 12px; overflow: hidden; }
.cw-faq-item summary { cursor: pointer; padding: 16px 20px; font-weight: 600; color: var(--cw-color-heading); list-style: none; }
.cw-faq-item summary::-webkit-details-marker { display: none; }
.cw-faq-item summary::after { content: "+"; float: right; color: var(--cw-color-primary); font-size: 1.3rem; line-height: 1; }
.cw-faq-item[open] summary::after { content: "–"; }
.cw-faq-answer { padding: 0 20px 16px; color: var(--cw-color-text); }

.cw-recent-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.cw-recent-head .cw-section-title { text-align: left; margin-bottom: 0; }
.cw-recent-all { font-weight: 600; white-space: nowrap; }

/* ------------------------------------------------------------------ *
 * Ads
 * ------------------------------------------------------------------ */
.cw-ad {
	display: block; margin: 20px auto; text-align: center;
	max-width: var(--cw-content-width);
}
.cw-ad-label {
	display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.08em;
	color: var(--cw-color-muted); margin-bottom: 4px;
}
.cw-ad .ad-widget { min-height: 90px; display: flex; align-items: center; justify-content: center; }
.cw-ad-sticky-mobile { display: none; }
.cw-ad-inline { margin: 24px 0; }

/* ------------------------------------------------------------------ *
 * Footer
 * ------------------------------------------------------------------ */
.site-footer {
	background: var(--cw-color-card);
	border-top: 1px solid var(--cw-color-border);
	margin-top: 48px; padding-block: 36px;
}
.footer-widgets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-bottom: 28px; }
.footer-widget-title { font-size: 1rem; margin-bottom: 12px; color: var(--cw-color-heading); }
.footer-widget ul { list-style: none; margin: 0; padding: 0; }
.footer-widget li { padding: 4px 0; }
.footer-widget a { color: var(--cw-color-text); }

.footer-bottom {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
	padding-top: 22px; border-top: 1px solid var(--cw-color-border);
	font-size: 0.9rem; color: var(--cw-color-muted);
}
.footer-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: 0; }
.footer-menu a { color: var(--cw-color-text); }
.footer-social { display: flex; gap: 14px; }
.footer-social a { color: var(--cw-color-muted); }

/* ------------------------------------------------------------------ *
 * 404 / no results
 * ------------------------------------------------------------------ */
.error-404, .no-results {
	background: var(--cw-color-card); border: 1px solid var(--cw-color-border);
	border-radius: var(--cw-radius); padding: clamp(24px, 5vw, 48px); text-align: center;
}
.error-404 .search-form, .no-results .search-form { max-width: 460px; margin: 20px auto; }
.error-404-actions { margin: 20px 0; }
.error-404-recent { text-align: left; max-width: 420px; margin: 24px auto 0; }
.error-404-recent ul { list-style: none; padding: 0; }
.error-404-recent li { padding: 6px 0; border-bottom: 1px solid var(--cw-color-border); }

/* body scroll lock helpers */
body.cw-modal-open, body.cw-fullscreen-lock, body.cw-menu-open { overflow: hidden; }
