/*!
 * RRTheme — main.css
 * Modern, mobile-first, custom-property-driven.
 * Design tokens (colors) come from inline CSS injected by class-css.php.
 */

/* ============================================================
 * 1. Reset (low-specificity via :where())
 * ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

:where(html) {
	-moz-text-size-adjust: none;
	-webkit-text-size-adjust: none;
	text-size-adjust: none;
	tab-size: 4;
}

:where(body) {
	margin: 0;
	min-height: 100svh;
	line-height: var(--line-height-body, 1.6);
	-webkit-font-smoothing: antialiased;
	color: var(--color-text);
	background: var(--color-bg);
	font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

:where(h1, h2, h3, h4, h5, h6, p, ul, ol, dl, blockquote, figure, pre, hr) { margin: 0; }

:where(h1, h2, h3, h4, h5, h6) {
	line-height: 1.2;
	font-family: var(--font-headline, "Source Serif 4", Georgia, "Times New Roman", serif);
	font-weight: 700;
	color: var(--color-text);
}

:where(img, picture, video, canvas, svg) {
	display: block;
	max-width: 100%;
	height: auto;
}

:where(input, button, textarea, select) {
	font: inherit;
	color: inherit;
}

:where(button) {
	background: none;
	border: 0;
	padding: 0;
	cursor: pointer;
	color: inherit;
}

:where(a) {
	color: var(--color-link);
	text-decoration: underline;
	text-underline-offset: 0.15em;
	text-decoration-thickness: 1px;
}
:where(a:hover) { color: var(--color-link-hover); }

:where(p) {
	margin-block-end: 1.25em;
	text-wrap: pretty;
}

:where(h1, h2, h3, h4, h5, h6) {
	margin-block-end: 0.5em;
	text-wrap: balance;
}

h1, .entry-title { font-size: clamp(1.8rem, 0.939rem + 2.66vw, 2.8rem); }
h2 { font-size: clamp(1.5rem, 0.897rem + 1.85vw, 2.2rem); }
h3 { font-size: clamp(1.25rem, 0.819rem + 1.32vw, 1.75rem); }
h4 { font-size: clamp(1.1rem, 0.842rem + 0.79vw, 1.4rem); }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

ul, ol { margin-block-end: 1.25em; padding-inline-start: 1.5em; }
li { margin-block-end: 0.25em; }

blockquote {
	margin-block: 1.5em;
	padding-inline-start: 1.25em;
	border-inline-start: 4px solid var(--color-accent);
	font-style: italic;
}

pre, code, kbd, samp {
	font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, "Liberation Mono", Menlo, monospace;
	font-size: 0.92em;
}
pre {
	padding: 1rem;
	background: var(--color-bg-alt);
	overflow-x: auto;
	border-radius: 4px;
	line-height: 1.5;
}
code { background: var(--color-bg-alt); padding: 0.1em 0.35em; border-radius: 3px; }
pre code { background: transparent; padding: 0; }

hr {
	border: 0;
	height: 1px;
	background: var(--color-border);
	margin-block: 2rem;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-block-end: 1.5em;
}
th, td {
	padding: 0.6rem 0.8rem;
	border-block-end: 1px solid var(--color-border);
	text-align: start;
}

::selection {
	background: var(--color-accent);
	color: var(--color-text-inverted);
}

/* ============================================================
 * 2. Accessibility helpers
 * ============================================================ */
.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,
.skip-link:focus {
	background: var(--color-bg);
	color: var(--color-text);
	clip: auto !important;
	clip-path: none;
	display: block;
	font-weight: 600;
	height: auto;
	width: auto;
	left: 1rem;
	top: 1rem;
	padding: 0.75rem 1.25rem;
	z-index: 100000;
	border: 2px solid var(--color-accent);
	border-radius: 4px;
}

:focus-visible {
	outline: 2px solid var(--color-accent);
	outline-offset: 2px;
	border-radius: 2px;
}
.using-mouse :focus { outline: 0; }

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

/* ============================================================
 * 3. Layout — mobile-first
 * ============================================================ */
.grid-container,
.site-content,
.inside-header,
.inside-site-footer,
.inside-footer-widgets,
.inside-site-info {
	max-width: var(--container-max, 1200px);
	margin-inline: auto;
	padding-inline: 1rem;
}

.site-content {
	display: flex;
	flex-direction: column;
	gap: 2rem;
	padding-block: 2rem;
}

.content-area { min-width: 0; }
.site-main { min-width: 0; }

.widget-area {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

@media (min-width: 1024px) {
	.site-content { flex-direction: row; align-items: flex-start; gap: 3rem; padding-block: 3rem; }
	.right-sidebar .content-area { flex: 1 1 auto; }
	.right-sidebar .widget-area { flex: 0 0 320px; }
	.left-sidebar .content-area { flex: 1 1 auto; order: 2; }
	.left-sidebar .widget-area { flex: 0 0 320px; order: 1; }
	.both-sidebars .widget-area { flex: 0 0 280px; }
	.no-sidebar .content-area { width: 100%; }
}

/* ============================================================
 * 4. Site header
 * ============================================================ */
.site-header {
	background: var(--color-header-bg);
	color: var(--color-header-text);
	border-block-end: 1px solid var(--color-border);
}
.site-header[data-sticky="true"] {
	position: sticky;
	top: 0;
	z-index: 50;
}

.inside-header {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	padding-block: 1.1rem;
}

.site-branding {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	flex: 1 1 auto;
	min-width: 0;
}
.site-branding-text { display: flex; flex-direction: column; gap: 0.1rem; min-width: 0; }

.main-title {
	font-size: clamp(1.05rem, 0.85rem + 0.6vw, 1.35rem);
	font-weight: 900;
	letter-spacing: -0.015em;
	margin: 0;
	font-family: var(--font-headline, inherit);
	line-height: 1.15;
}
.main-title a {
	display: inline-block;
	color: var(--color-text);
	text-decoration: none;
}
.main-title a:hover { color: var(--color-accent); }

.site-description {
	color: var(--color-text-muted);
	font-size: 0.78rem;
	margin: 0;
	max-width: 60ch;
	display: -webkit-box;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.custom-logo-link { flex: 0 0 auto; }
.custom-logo-link img { max-height: 48px; width: auto; display: block; }

.rrtheme-header-actions {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	flex: 0 0 auto;
}

.rrtheme-search-toggle,
.rrtheme-dark-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 999px;
	color: var(--color-header-text);
	transition: background-color 120ms;
	background: transparent;
}
.rrtheme-search-toggle:hover,
.rrtheme-dark-toggle:hover { background: var(--color-bg-alt); }

@media (max-width: 599px) {
	.site-description { display: none; }
}

/* ============================================================
 * 5. Primary navigation
 * ============================================================ */
.main-navigation {
	background: var(--color-nav-bg);
	color: var(--color-nav-text);
}
.inside-navigation {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.menu-toggle {
	color: var(--color-nav-text);
	padding: 0.75rem 1rem;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.main-navigation .menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: none;
	width: 100%;
	flex-direction: column;
}
.main-navigation.toggled .menu { display: flex; }

.main-navigation .menu li { margin: 0; }
.main-navigation .menu a {
	color: var(--color-nav-text);
	text-decoration: none;
	display: block;
	padding: 0.85rem 1rem;
	font-weight: 600;
	font-size: 0.95rem;
}
.main-navigation .menu a:hover,
.main-navigation .menu .current-menu-item > a {
	color: var(--color-nav-text-hover);
}

@media (min-width: 768px) {
	.menu-toggle { display: none; }
	.main-navigation .menu { display: flex !important; flex-direction: row; align-items: center; }
	.main-navigation .menu .sub-menu {
		position: absolute;
		min-width: 220px;
		background: var(--color-nav-bg);
		border: 1px solid var(--color-border);
		display: none;
		list-style: none;
		padding: 0.4rem 0;
		flex-direction: column;
		z-index: 100;
		box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
	}
	.main-navigation .menu .menu-item-has-children { position: relative; }
	.main-navigation .menu .menu-item-has-children:hover > .sub-menu,
	.main-navigation .menu .menu-item-has-children:focus-within > .sub-menu { display: flex; }
}

/* ============================================================
 * 6. News card grid + hero treatment + section headings
 * ============================================================ */
.rrtheme-section-heading {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-block: 0 1.25rem;
}
.rrtheme-section-heading-bar {
	width: 6px;
	height: 1.4em;
	background: var(--color-accent);
	border-radius: 2px;
}
.rrtheme-section-heading h2 {
	font-size: clamp(1.2rem, 0.95rem + 0.6vw, 1.5rem);
	margin: 0;
	letter-spacing: -0.005em;
	font-weight: 800;
	text-transform: uppercase;
	font-family: var(--font-headline, inherit);
}

.rrtheme-loop-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}
.rrtheme-loop-grid > * { min-width: 0; } /* prevent overflow in grid items */

@media (min-width: 600px) {
	.rrtheme-loop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
	.rrtheme-loop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.75rem 1.5rem; }
}

/* Hero treatment ONLY on home / front page — not on category/tag/author/search archives. */
@media (min-width: 1024px) {
	body.home .rrtheme-loop-grid > .rrtheme-card:first-child,
	body.blog .rrtheme-loop-grid > .rrtheme-card:first-child {
		grid-column: 1 / -1;
		display: grid;
		grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
		gap: 1.5rem;
		align-items: start;
	}
	body.home .rrtheme-loop-grid > .rrtheme-card:first-child .rrtheme-card-title,
	body.blog .rrtheme-loop-grid > .rrtheme-card:first-child .rrtheme-card-title {
		font-size: clamp(1.5rem, 1rem + 1vw, 2.25rem);
		line-height: 1.15;
	}
	body.home .rrtheme-loop-grid > .rrtheme-card:first-child .rrtheme-card-excerpt,
	body.blog .rrtheme-loop-grid > .rrtheme-card:first-child .rrtheme-card-excerpt {
		-webkit-line-clamp: 4;
		font-size: 1.05rem;
	}
	body.home .rrtheme-loop-grid > .rrtheme-card:first-child .rrtheme-card-body,
	body.blog .rrtheme-loop-grid > .rrtheme-card:first-child .rrtheme-card-body {
		padding: 0;
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 0.75rem;
	}
}

.rrtheme-card {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	background: var(--color-bg);
	border-radius: 4px;
	border: 0;
	padding: 0;
	margin: 0;
	min-width: 0; /* prevent overflow when nested in grids */
	transition: transform 160ms ease;
}
.rrtheme-card:hover { transform: translateY(-2px); }

.rrtheme-card-media {
	display: block;
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--color-bg-alt);
	border-radius: 4px;
	contain: layout paint;
}
.rrtheme-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	object-fit: cover;
	transition: transform 600ms ease;
}
.rrtheme-card:hover .rrtheme-card-media img { transform: scale(1.04); }

.rrtheme-card-flag {
	position: absolute;
	top: 0.75rem;
	left: 0.75rem;
	background: #d63031;
	color: #fff;
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	padding: 0.25rem 0.6rem;
	border-radius: 2px;
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
}
.rrtheme-card-flag::before {
	content: "";
	display: inline-block;
	width: 6px;
	height: 6px;
	background: currentColor;
	border-radius: 999px;
	animation: rrtheme-blink 1.4s ease-in-out infinite;
}
@keyframes rrtheme-blink {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}

.rrtheme-card-body {
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}
.rrtheme-card-eyebrow {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-accent);
	text-decoration: none;
	width: fit-content;
}
.rrtheme-card-eyebrow:hover { color: var(--color-accent-hover); }

.rrtheme-card-title {
	font-size: 1.15rem;
	line-height: 1.25;
	margin: 0;
	font-weight: 700;
	font-family: var(--font-headline, inherit);
	letter-spacing: -0.005em;
}
.rrtheme-card-title a {
	color: var(--color-text);
	text-decoration: none;
}
.rrtheme-card-title a:hover { color: var(--color-accent); }

.rrtheme-card-excerpt {
	margin: 0;
	color: var(--color-text-muted);
	font-size: 0.95rem;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rrtheme-card-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.8rem;
	color: var(--color-text-muted);
	margin-block-start: 0.25rem;
}
.rrtheme-card-author { font-weight: 600; color: var(--color-text); }
.rrtheme-card-meta-sep { opacity: 0.5; }

/* Single article layout */
.rrtheme-article-inner { max-width: 760px; margin-inline: auto; }
.rrtheme-article-header { margin-block-end: 2rem; }
.rrtheme-article-eyebrow {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-accent);
	text-decoration: none;
	margin-block-end: 0.75rem;
}
.rrtheme-article-eyebrow:hover { color: var(--color-accent-hover); }

.rrtheme-article-title {
	font-size: clamp(1.8rem, 1.2rem + 1.8vw, 2.75rem);
	line-height: 1.15;
	margin: 0 0 0.85rem;
	font-weight: 800;
	letter-spacing: -0.01em;
	font-family: var(--font-headline, inherit);
}

.rrtheme-article-deck {
	font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.2rem);
	color: var(--color-text-muted);
	line-height: 1.5;
	margin: 0 0 1.5rem;
	font-style: normal;
}

.rrtheme-article-byline {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem;
	padding-block: 1rem;
	border-block: 1px solid var(--color-border);
	font-size: 0.9rem;
}
.rrtheme-article-byline-avatar img {
	border-radius: 999px;
	width: 40px;
	height: 40px;
	display: block;
}
.rrtheme-article-byline-meta { display: flex; flex-direction: column; gap: 0.1rem; }
.rrtheme-article-byline-author {
	font-weight: 700;
	color: var(--color-text);
	text-decoration: none;
}
.rrtheme-article-byline-author:hover { color: var(--color-accent); }
.rrtheme-article-byline-times {
	color: var(--color-text-muted);
	font-size: 0.82rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

/* Share buttons */
.rrtheme-share {
	margin-inline-start: auto;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}
.rrtheme-share-label {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--color-text-muted);
	margin-inline-end: 0.25rem;
}
.rrtheme-share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	background: var(--color-bg-alt);
	color: var(--color-text);
	border: 1px solid var(--color-border);
	cursor: pointer;
	transition: background-color 120ms, color 120ms, border-color 120ms;
	text-decoration: none;
}
.rrtheme-share-btn:hover {
	background: var(--color-accent);
	color: var(--color-text-inverted);
	border-color: var(--color-accent);
}
.rrtheme-share-btn.is-copied { background: #10b981; color: #fff; border-color: #10b981; }

/* Article body — keep serif for hX, sans for rest */
.entry-content {
	font-size: 1.075rem;
	line-height: 1.75;
	color: var(--color-text);
}
.entry-content > * + * { margin-block-start: 1.2em; }
.entry-content h2 {
	margin-block-start: 2em;
	margin-block-end: 0.4em;
	font-size: clamp(1.4rem, 1.1rem + 0.8vw, 1.75rem);
	font-weight: 800;
	line-height: 1.25;
	font-family: var(--font-headline, inherit);
}
.entry-content h3 {
	margin-block-start: 1.6em;
	margin-block-end: 0.3em;
	font-size: clamp(1.2rem, 1rem + 0.4vw, 1.4rem);
	font-weight: 700;
	line-height: 1.3;
	font-family: var(--font-headline, inherit);
}
.entry-content h4 {
	margin-block-start: 1.4em;
	margin-block-end: 0.25em;
	font-size: 1.15rem;
	font-weight: 700;
}
.entry-content a:not(.wp-block-button__link) {
	color: var(--color-link);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}
.entry-content a:not(.wp-block-button__link):hover { color: var(--color-link-hover); }
.entry-content blockquote {
	margin: 2rem 0;
	padding: 0 1.25rem;
	border-inline-start: 4px solid var(--color-accent);
	font-size: 1.15rem;
	line-height: 1.5;
	font-style: normal;
	font-family: var(--font-headline, inherit);
	font-weight: 600;
}
.entry-content figure { margin: 2rem 0; }
.entry-content figure img,
.entry-content .wp-block-image img {
	width: 100%;
	height: auto;
	border-radius: 4px;
}
.entry-content figcaption,
.entry-content .wp-block-image figcaption {
	font-size: 0.85rem;
	color: var(--color-text-muted);
	margin-top: 0.5rem;
	text-align: start;
}

/* Featured image (single) — kill any inherited weird borders */
.rrtheme-article .post-image,
.rrtheme-article figure.post-image {
	margin: 0 0 1.75rem;
	padding: 0;
	border: 0;
	background: var(--color-bg-alt);
	border-radius: 4px;
	overflow: hidden;
}
.rrtheme-article .post-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 0;
}
.rrtheme-article .post-image figcaption {
	padding: 0.5rem 0.75rem;
	font-size: 0.85rem;
	color: var(--color-text-muted);
}

/* Old .hentry container styles — neutralized for new card layout */
.separate-containers .rrtheme-loop-grid > article.hentry { padding: 0; border: 0; background: transparent; }
.separate-containers .rrtheme-article.hentry {
	padding: 2rem 1.5rem;
	background: var(--color-bg);
	border-radius: 4px;
	border: 1px solid var(--color-border);
}
@media (min-width: 768px) {
	.separate-containers .rrtheme-article.hentry { padding: 2.5rem 2.5rem; }
}

/* ============================================================
 * 7. Page header / archive title — newsroom style
 * ============================================================ */
.rrtheme-page-header,
.page-header {
	margin-block-end: 1.5rem;
	padding-block-end: 1rem;
	border-block-end: 3px solid var(--color-accent);
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}
.rrtheme-page-header-eyebrow {
	display: inline-block;
	width: fit-content;
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--color-text-muted);
}
.rrtheme-page-header-title,
.page-title {
	font-size: clamp(1.5rem, 1.1rem + 1vw, 2.1rem);
	margin: 0;
	font-weight: 800;
	line-height: 1.15;
	font-family: var(--font-headline, inherit);
	letter-spacing: -0.01em;
}
.rrtheme-page-header-title em { font-style: normal; color: var(--color-accent); }
.rrtheme-page-header-description,
.archive-description {
	color: var(--color-text-muted);
	font-size: 0.95rem;
	margin: 0;
	max-width: 60ch;
}
.rrtheme-page-header-count {
	font-size: 0.78rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--color-text-muted);
	margin: 0;
}

/* ============================================================
 * 8. Pagination
 * ============================================================ */
.pagination, .navigation.pagination, .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin-block: 2rem;
}
.nav-links .page-numbers,
.nav-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.4rem;
	padding: 0.5rem 0.8rem;
	border: 1px solid var(--color-border);
	border-radius: 4px;
	text-decoration: none;
	color: var(--color-text);
	font-weight: 600;
}
.nav-links .page-numbers.current {
	background: var(--color-accent);
	color: var(--color-text-inverted);
	border-color: var(--color-accent);
}
.nav-links a:hover { border-color: var(--color-accent); color: var(--color-accent); }

/* ============================================================
 * 9. Sidebar widgets — newsroom style
 * ============================================================ */
.widget-area { display: flex; flex-direction: column; gap: 1.75rem; }
.widget {
	background: transparent;
	padding: 0;
	border: 0;
	border-radius: 0;
	border-block-start: 3px solid var(--color-accent);
	padding-block-start: 1rem;
}
.widget-title {
	font-size: 0.95rem;
	margin: 0 0 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-text);
	font-weight: 800;
	padding: 0;
	border: 0;
	font-family: var(--font-headline, inherit);
}
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li {
	padding-block: 0.65rem;
	border-block-end: 1px solid var(--color-border);
	font-size: 0.95rem;
	line-height: 1.4;
}
.widget li:first-child { padding-block-start: 0; }
.widget li:last-child { border: 0; padding-block-end: 0; }
.widget a {
	text-decoration: none;
	color: var(--color-text);
	font-weight: 600;
}
.widget a:hover { color: var(--color-accent); }

/* Search widget */
.widget_search .search-form { gap: 0; }
.widget_search .search-field {
	border-radius: 4px 0 0 4px;
	border-inline-end: 0;
}
.widget_search .search-submit { border-radius: 0 4px 4px 0; }

/* ============================================================
 * 10. Search form
 * ============================================================ */
.search-form {
	display: flex;
	gap: 0.4rem;
	max-width: 100%;
}
.search-field {
	flex: 1;
	padding: 0.6rem 0.85rem;
	border: 1px solid var(--color-input-border);
	background: var(--color-input-bg);
	color: var(--color-input-text);
	border-radius: 4px;
}
.search-field:focus {
	outline: none;
	border-color: var(--color-input-border-focus);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--color-accent) 35%, transparent);
}
.search-submit {
	padding: 0 1rem;
	background: var(--color-accent);
	color: var(--color-text-inverted);
	border-radius: 4px;
	font-weight: 600;
}
.search-submit:hover { background: var(--color-accent-hover); }

/* ============================================================
 * 11. Comments
 * ============================================================ */
.comments-area { margin-block-start: 3rem; }
.comments-title { font-size: 1.4rem; margin-block-end: 1.5rem; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list .children { list-style: none; padding-inline-start: 2rem; margin-block-start: 1rem; }
.comment-body {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: 0.5rem 1rem;
	padding-block: 1.25rem;
	border-block-end: 1px solid var(--color-border);
}
.comment-body img.avatar { grid-row: 1 / span 2; border-radius: 50%; }
.comment-meta { display: flex; flex-direction: column; gap: 0.15rem; font-size: 0.875rem; }
.comment-meta cite { font-style: normal; font-weight: 700; color: var(--color-text); }
.comment-metadata a { color: var(--color-text-muted); text-decoration: none; }
.comment-content { grid-column: 2; }
.reply { grid-column: 2; margin-block-start: 0.5rem; }
.reply a {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--color-accent);
	text-decoration: none;
}

.comment-form { display: grid; gap: 0.85rem; margin-block-start: 1.5rem; }
.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
	width: 100%;
	padding: 0.65rem 0.8rem;
	border: 1px solid var(--color-input-border);
	background: var(--color-input-bg);
	color: var(--color-input-text);
	border-radius: 4px;
}
.form-submit input[type="submit"] {
	padding: 0.7rem 1.4rem;
	background: var(--color-button-bg);
	color: var(--color-button-text);
	border-radius: 4px;
	font-weight: 600;
	cursor: pointer;
}
.form-submit input[type="submit"]:hover {
	background: var(--color-button-bg-hover);
	color: var(--color-button-text-hover);
}

/* ============================================================
 * 12. Footer
 * ============================================================ */
.site-footer {
	background: var(--color-footer-bg);
	color: var(--color-footer-text);
	margin-block-start: 3rem;
}
.site-footer a { color: var(--color-footer-link); }

.footer-widgets {
	padding-block: 3rem;
	border-block-end: 1px solid color-mix(in srgb, var(--color-footer-text) 25%, transparent);
}
.inside-footer-widgets {
	display: grid;
	gap: 2rem;
	grid-template-columns: 1fr;
}
@media (min-width: 768px) {
	.inside-footer-widgets { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
	.inside-footer-widgets { grid-template-columns: repeat(4, 1fr); }
}
.footer-widget .widget {
	background: transparent;
	border: 0;
	padding: 0;
}
.footer-widget .widget-title { color: var(--color-footer-link); border-color: var(--color-accent); }

.site-info { padding-block: 1.5rem; font-size: 0.875rem; }
.inside-site-info {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	align-items: center;
	text-align: center;
}
@media (min-width: 768px) {
	.inside-site-info { flex-direction: row; justify-content: space-between; text-align: start; }
}
.footer-menu-list {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	padding: 0;
	margin: 0;
}

/* ============================================================
 * 13. Back-to-top
 * ============================================================ */
.rrtheme-back-to-top {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	background: var(--color-accent);
	color: var(--color-text-inverted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	z-index: 60;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
	opacity: 0;
	transform: translateY(0.5rem);
	transition: opacity 180ms, transform 180ms;
}
.rrtheme-back-to-top[hidden] { display: none; }
.rrtheme-back-to-top.is-visible { opacity: 1; transform: translateY(0); }

/* ============================================================
 * 14. Block alignment helpers
 * ============================================================ */
.alignleft { float: inline-start; margin-inline-end: 1.25rem; margin-block-end: 1rem; }
.alignright { float: inline-end; margin-inline-start: 1.25rem; margin-block-end: 1rem; }
.aligncenter { display: block; margin-inline: auto; }
.alignwide { max-width: var(--wide-max, 1100px); margin-inline: auto; }
.alignfull {
	margin-inline: calc(50% - 50vw);
	max-width: 100vw;
	width: auto;
}

/* ============================================================
 * 15. Sticky post highlight
 * ============================================================ */
article.sticky { border-color: var(--color-accent); }
article.sticky::before {
	content: "Pinned";
	display: inline-block;
	padding: 0.15rem 0.6rem;
	background: var(--color-accent);
	color: var(--color-text-inverted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	border-radius: 3px;
	margin-block-end: 0.5rem;
}

/* ============================================================
 * 16. Live blog & breaking ticker hooks (visuals come in component CSS)
 * ============================================================ */
.has-breaking-ticker .site-header { border-block-end: 0; }

/* ============================================================
 * 16b. Newspaper masthead date strip
 * ============================================================ */
.rrtheme-masthead-date {
	background: #0d0d10;
	color: #d6d6d6;
	font-size: 0.78rem;
	letter-spacing: 0.02em;
}
.rrtheme-masthead-date-inner {
	max-width: var(--container-max, 1200px);
	margin-inline: auto;
	padding: 0.45rem 1rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 0.85rem;
	align-items: center;
}
.rrtheme-masthead-date-date { font-weight: 700; color: #fff; }
.rrtheme-masthead-date-edition { color: #b8bcc4; }
.rrtheme-masthead-date-sep { flex: 1; }
.rrtheme-masthead-date-link {
	color: #fff;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-weight: 600;
}
.rrtheme-masthead-date-link:hover { color: #ffd54a; }
.rrtheme-masthead-date-link .dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	background: #d63031;
	border-radius: 999px;
	animation: rrtheme-blink 1.4s ease-in-out infinite;
}
@media (max-width: 599px) {
	.rrtheme-masthead-date-edition { display: none; }
}

/* ============================================================
 * 16c. Category navigation strip
 * ============================================================ */
.rrtheme-category-strip {
	background: var(--color-nav-bg);
	color: var(--color-nav-text);
}
.rrtheme-category-strip-inner {
	max-width: var(--container-max, 1200px);
	margin-inline: auto;
	padding-block: 0.85rem;   /* equal top and bottom breathing room */
	padding-inline: 1rem;
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 0;
}
.rrtheme-category-strip-home,
.rrtheme-category-strip a {
	display: inline-flex;
	align-items: center;
	padding-block: 0;         /* vertical space is owned by the inner wrapper */
	padding-inline: 0.95rem;
	color: var(--color-nav-text);
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	line-height: 1;
	white-space: nowrap;
	position: relative;
	transition: color 120ms;
}
.rrtheme-category-strip-home {
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-size: 0.82rem;
	padding-inline: 1rem;
}
.rrtheme-category-strip-home:hover { color: var(--color-nav-text-hover); }
.rrtheme-category-strip ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	overflow-x: auto;
	scrollbar-width: none;
}
.rrtheme-category-strip ul::-webkit-scrollbar { display: none; }
.rrtheme-category-strip a:hover { color: var(--color-nav-text-hover); }
.rrtheme-category-strip a:hover::after {
	content: "";
	position: absolute;
	inset-inline: 0.95rem;
	bottom: calc(-0.85rem + 1px);   /* sit just above the strip's bottom edge */
	height: 2px;
	background: var(--color-nav-text-hover);
}

/* ============================================================
 * 16d. Empty-state news cards
 * ============================================================ */
.rrtheme-empty-header { text-align: center; margin-block: 2rem 1.5rem; padding-block-end: 0; border: 0; }
.rrtheme-empty-header .eyebrow {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--color-accent);
	color: var(--color-text-inverted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	border-radius: 999px;
	margin-block-end: 0.5rem;
}
.rrtheme-empty-header .page-title { font-size: clamp(1.6rem, 1.1rem + 1.5vw, 2.4rem); }
.rrtheme-empty-header p { color: var(--color-text-muted); max-width: 50rem; margin-inline: auto; }

.rrtheme-empty-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin-block: 2rem;
}
@media (min-width: 768px) { .rrtheme-empty-grid { grid-template-columns: repeat(2, 1fr); } }
.rrtheme-empty-card {
	display: block;
	padding: 1.5rem;
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-inline-start: 4px solid var(--color-accent);
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
	transition: transform 160ms, border-color 160ms, box-shadow 160ms;
}
.rrtheme-empty-card:hover {
	transform: translateY(-2px);
	border-color: var(--color-accent);
	box-shadow: 0 8px 24px rgba(10, 78, 163, 0.12);
}
.rrtheme-empty-card .card-eyebrow {
	display: inline-block;
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-accent);
	margin-block-end: 0.4rem;
}
.rrtheme-empty-card h2 { font-size: 1.25rem; margin: 0 0 0.4rem; }
.rrtheme-empty-card p { color: var(--color-text-muted); margin: 0; font-size: 0.95rem; }

/* ============================================================
 * 16e. Newsletter card (inline + footer)
 * ============================================================ */
.rrtheme-newsletter {
	margin: 2rem 0;
	padding: 1.5rem;
	background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-hover) 100%);
	color: var(--color-text-inverted);
	border-radius: 6px;
	display: grid;
	gap: 1rem;
	grid-template-columns: 1fr;
}
@media (min-width: 768px) {
	.rrtheme-newsletter { grid-template-columns: 1.3fr 1fr; align-items: center; padding: 1.75rem 2rem; gap: 2rem; }
}
.rrtheme-newsletter--footer { margin: 0; border-radius: 0; padding-block: 2.25rem; }

.rrtheme-newsletter-heading h3 {
	margin: 0 0 0.35rem;
	font-size: clamp(1.2rem, 0.9rem + 0.8vw, 1.6rem);
	color: var(--color-text-inverted);
	letter-spacing: -0.005em;
	font-family: var(--font-headline, inherit);
}
.rrtheme-newsletter-heading p {
	margin: 0;
	color: rgba(255,255,255,0.85);
	font-size: 0.95rem;
	line-height: 1.45;
}
.rrtheme-newsletter-form {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
}
.rrtheme-newsletter-form input[type="email"] {
	flex: 1 1 200px;
	padding: 0.7rem 0.9rem;
	border: 0;
	border-radius: 4px;
	background: #fff;
	color: var(--color-text);
	font-size: 0.95rem;
}
.rrtheme-newsletter-form input[type="email"]:focus {
	outline: 2px solid #ffd54a;
	outline-offset: 1px;
}
.rrtheme-newsletter-form button {
	padding: 0.7rem 1.25rem;
	background: #0d0d10;
	color: #fff;
	border-radius: 4px;
	font-weight: 700;
	cursor: pointer;
	font-size: 0.9rem;
	letter-spacing: 0.02em;
	transition: background-color 120ms;
}
.rrtheme-newsletter-form button:hover { background: #1a1a1f; }

/* ============================================================
 * 16f. Author bio card
 * ============================================================ */
.rrtheme-author-bio {
	margin-block: 2.5rem 1rem;
	padding: 1.5rem;
	background: var(--color-bg-alt);
	border-inline-start: 4px solid var(--color-accent);
	border-radius: 4px;
	display: grid;
	gap: 1rem;
	grid-template-columns: auto 1fr;
	align-items: start;
}
.rrtheme-author-bio.is-author-archive {
	background: var(--color-bg);
	border: 1px solid var(--color-border);
	border-inline-start: 4px solid var(--color-accent);
	padding: 2rem;
	margin-block: 0 2rem;
}
.rrtheme-author-bio .author-bio-avatar img {
	width: 64px;
	height: 64px;
	border-radius: 999px;
	display: block;
	border: 2px solid #fff;
	box-shadow: 0 0 0 1px var(--color-border);
}
.rrtheme-author-bio.is-author-archive .author-bio-avatar img {
	width: 96px;
	height: 96px;
}
.rrtheme-author-bio .author-bio-name {
	margin: 0 0 0.25rem;
	font-size: 1.1rem;
	font-weight: 800;
	font-family: var(--font-headline, inherit);
}
.rrtheme-author-bio .author-bio-name a {
	color: var(--color-text);
	text-decoration: none;
}
.rrtheme-author-bio .author-bio-name a:hover { color: var(--color-accent); }
.rrtheme-author-bio .author-role {
	font-size: 0.8rem;
	color: var(--color-text-muted);
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	margin: 0 0 0.5rem;
}
.rrtheme-author-bio .author-bio-text {
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--color-text);
	margin: 0 0 0.75rem;
}
.rrtheme-author-bio .author-social {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem 1rem;
	font-size: 0.85rem;
}
.rrtheme-author-bio .author-social a {
	color: var(--color-link);
	text-decoration: none;
	font-weight: 600;
}
.rrtheme-author-bio .author-social a:hover { color: var(--color-link-hover); text-decoration: underline; }

/* ============================================================
 * 16g. Related articles grid
 * ============================================================ */
.rrtheme-related-articles { margin-block: 3rem 2rem; }
.rrtheme-related-articles .related-title {
	font-size: 1.1rem;
	margin: 0 0 1rem;
	letter-spacing: 0.02em;
	font-weight: 800;
	text-transform: uppercase;
	font-family: var(--font-headline, inherit);
	padding-block-start: 0.75rem;
	border-block-start: 3px solid var(--color-accent);
}
.related-grid {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.related-card a {
	display: block;
	text-decoration: none;
	color: var(--color-text);
}
.related-card img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 4px;
	margin-block-end: 0.5rem;
}
.related-card-title {
	font-size: 0.95rem;
	line-height: 1.3;
	margin: 0;
	font-weight: 700;
	font-family: var(--font-headline, inherit);
}
.related-card a:hover .related-card-title { color: var(--color-accent); }

/* ============================================================
 * 17. Post navigation
 * ============================================================ */
.post-navigation {
	margin-block: 2rem;
	display: grid;
	gap: 1rem;
}
@media (min-width: 768px) {
	.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
}
.post-navigation a {
	display: block;
	padding: 1rem;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	text-decoration: none;
}
.post-navigation a:hover { border-color: var(--color-accent); }
.post-navigation .nav-next a { text-align: end; }

/* ============================================================
 * 18. Search modal overlay
 * ============================================================ */
.rrtheme-search-modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 200;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 4rem 1rem 1rem;
}
.rrtheme-search-modal-inner {
	width: 100%;
	max-width: 640px;
	background: var(--color-bg);
	color: var(--color-text);
	border-radius: 6px;
	padding: 1rem;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	position: relative;
}
.rrtheme-search-close {
	position: absolute;
	top: -2.5rem;
	right: 0;
	color: #fff;
	font-size: 1.6rem;
	width: 2.5rem;
	height: 2.5rem;
}
.rrtheme-search-modal .search-form { gap: 0.5rem; }
body.rrtheme-modal-open { overflow: hidden; }
