/*
Theme Name: FXRM
Theme URI: https://fxrm.com
Author: FXRM
Author URI: https://fxrm.com
Description: The official FXRM classic WordPress theme. Light-first, purple accent, Instrument Sans typography, and code-block styling built for long-form infrastructure writing — DNS, HAProxy, Proxmox, and email deliverability. UK hosting built by engineers who've been doing this since 1992.
Version: 1.0.5
Requires at least: 6.0
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: fxrm
Tags: one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, blog

FXRM WordPress theme is distributed under the terms of the GNU GPL v2 or later.
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */

:root {
	/* Brand purple */
	--fxrm-accent: #7c3aed;
	--fxrm-accent-hover: #6d28d9;
	--fxrm-accent-active: #5b21b6;
	--fxrm-accent-on: #ffffff;
	--fxrm-accent-soft: #f3e8ff;
	--fxrm-accent-soft-text: #6d28d9;
	--fxrm-accent-ring: rgba(124, 58, 237, 0.35);

	/* Neutrals — light */
	--fxrm-bg: #ffffff;
	--fxrm-surface: #fafafa;
	--fxrm-surface-raised: #f4f4f5;
	--fxrm-border: #e4e4e7;
	--fxrm-border-strong: #d4d4d8;
	--fxrm-text: #18181b;
	--fxrm-text-muted: #52525b;
	--fxrm-text-subtle: #a1a1aa;

	/* Status accents */
	--fxrm-green: #16a34a;
	--fxrm-red: #dc2626;
	--fxrm-blue: #2563eb;

	/* Code surfaces — deliberately dark in both themes, so config samples
	   read as terminal output rather than as body copy. */
	--fxrm-code-bg: #18181b;
	--fxrm-code-text: #f4f4f5;
	--fxrm-code-border: #27272a;
	--fxrm-code-scroll: #52525b;
	--fxrm-inline-code-bg: #f3e8ff;
	--fxrm-inline-code-text: #6d28d9;

	--fxrm-header-bg: rgba(255, 255, 255, 0.9);
	--fxrm-shadow-sm: 0 1px 2px rgba(24, 24, 27, 0.06);
	--fxrm-shadow-md: 0 8px 24px rgba(24, 24, 27, 0.08);

	--fxrm-font: "Instrument Sans", system-ui, -apple-system, sans-serif;
	--fxrm-font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

	--fxrm-content-width: 760px;
	--fxrm-wide-width: 1180px;
	--fxrm-radius: 16px;
	--fxrm-radius-sm: 8px;
	--fxrm-radius-lg: 24px;
}

@media (prefers-color-scheme: dark) {
	:root {
		--fxrm-accent: #a78bfa;
		--fxrm-accent-hover: #c4b5fd;
		--fxrm-accent-active: #8b5cf6;
		--fxrm-accent-on: #09090b;
		--fxrm-accent-soft: rgba(124, 58, 237, 0.22);
		--fxrm-accent-soft-text: #d8b4fe;
		--fxrm-accent-ring: rgba(167, 139, 250, 0.45);

		--fxrm-bg: #09090b;
		--fxrm-surface: #18181b;
		--fxrm-surface-raised: #202024;
		--fxrm-border: #27272a;
		--fxrm-border-strong: #3f3f46;
		--fxrm-text: #fafafa;
		--fxrm-text-muted: #a1a1aa;
		--fxrm-text-subtle: #71717a;

		--fxrm-green: #4ade80;
		--fxrm-red: #f87171;
		--fxrm-blue: #60a5fa;

		--fxrm-code-bg: #101012;
		--fxrm-code-text: #f4f4f5;
		--fxrm-code-border: #27272a;
		--fxrm-inline-code-bg: rgba(124, 58, 237, 0.22);
		--fxrm-inline-code-text: #d8b4fe;

		--fxrm-header-bg: rgba(9, 9, 11, 0.9);
		--fxrm-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.5);
		--fxrm-shadow-md: 0 12px 28px rgba(0, 0, 0, 0.55);
	}
}

/* ==========================================================================
   2. Base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

body {
	margin: 0;
	background: var(--fxrm-bg);
	color: var(--fxrm-text);
	font-family: var(--fxrm-font);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

img,
video,
iframe,
embed,
object {
	max-width: 100%;
}

img,
video {
	height: auto;
	display: block;
}

a {
	color: var(--fxrm-accent);
	text-decoration: none;
}

a:hover,
a:focus {
	color: var(--fxrm-accent-hover);
	text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
	outline: 2px solid var(--fxrm-accent);
	outline-offset: 2px;
	border-radius: 4px;
}

ul,
ol {
	padding-left: 1.35em;
}

li + li {
	margin-top: 0.35em;
}

hr {
	border: 0;
	border-top: 1px solid var(--fxrm-border);
	margin: 2.5em 0;
}

/* ==========================================================================
   3. Typography
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: var(--fxrm-font);
	font-weight: 700;
	line-height: 1.2;
	color: var(--fxrm-text);
	margin: 1.6em 0 0.5em;
	letter-spacing: -0.02em;
}

h1 {
	font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem);
	letter-spacing: -0.03em;
}

h2 {
	font-size: clamp(1.55rem, 1.25rem + 1.2vw, 2.1rem);
}

h3 {
	font-size: 1.4rem;
	font-weight: 600;
}

h4 {
	font-size: 1.175rem;
	font-weight: 600;
}

h5,
h6 {
	font-size: 1rem;
	font-weight: 600;
}

p {
	margin: 0 0 1.3em;
}

strong,
b {
	font-weight: 600;
	color: var(--fxrm-text);
}

blockquote {
	margin: 1.75em 0;
	padding: 0.25em 0 0.25em 1.35em;
	border-left: 3px solid var(--fxrm-accent);
	color: var(--fxrm-text-muted);
	font-style: italic;
}

blockquote > :last-child {
	margin-bottom: 0;
}

figure {
	margin: 1.75em 0;
}

figcaption,
.wp-caption-text {
	font-size: 0.875rem;
	color: var(--fxrm-text-muted);
	margin-top: 0.6em;
}

.fxrm-eyebrow {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--fxrm-accent);
	margin-bottom: 0.6em;
}

/* ==========================================================================
   4. Code — long-form config samples are a first-class citizen here
   ========================================================================== */

code,
kbd,
samp,
pre {
	font-family: var(--fxrm-font-mono);
	font-variant-ligatures: none;
}

/* Inline code: purple on a soft purple wash, matching the FXRM site. */
code {
	background: var(--fxrm-inline-code-bg);
	color: var(--fxrm-inline-code-text);
	padding: 0.14em 0.4em;
	border-radius: 5px;
	font-size: 0.875em;
	overflow-wrap: break-word;
}

/*
 * Block code: a dark slab regardless of theme. It scrolls within itself, never
 * pushing the page sideways, and keeps a comfortable measure for wide HAProxy
 * and DNS zone samples.
 */
pre {
	margin: 1.75em 0;
	padding: 20px 24px;
	background: var(--fxrm-code-bg);
	color: var(--fxrm-code-text);
	border: 1px solid var(--fxrm-code-border);
	border-radius: var(--fxrm-radius-sm);
	font-size: 0.875rem;
	line-height: 1.7;
	tab-size: 4;
	-moz-tab-size: 4;
	max-width: 100%;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	scrollbar-color: var(--fxrm-code-scroll) transparent;
	scrollbar-width: thin;
}

pre code {
	background: none;
	color: inherit;
	padding: 0;
	border-radius: 0;
	font-size: inherit;
	white-space: pre;
	overflow-wrap: normal;
	word-break: normal;
}

pre::-webkit-scrollbar {
	height: 10px;
}

pre::-webkit-scrollbar-track {
	background: transparent;
}

pre::-webkit-scrollbar-thumb {
	background: var(--fxrm-code-scroll);
	border-radius: 999px;
	border: 3px solid var(--fxrm-code-bg);
}

.wp-block-code,
.wp-block-preformatted {
	margin: 1.75em 0;
}

.wp-block-code pre,
.wp-block-preformatted pre {
	margin: 0;
}

/* ==========================================================================
   5. Tables
   ========================================================================== */

table {
	width: 100%;
	border-collapse: collapse;
	margin: 1.75em 0;
	font-size: 0.95rem;
}

th,
td {
	text-align: left;
	padding: 0.7em 0.9em;
	border-bottom: 1px solid var(--fxrm-border);
	vertical-align: top;
}

th {
	font-weight: 600;
	color: var(--fxrm-text);
	background: var(--fxrm-surface-raised);
}

/* Wide tables scroll inside their own figure rather than the page. */
.wp-block-table,
figure.wp-block-table {
	overflow-x: auto;
	max-width: 100%;
}

.wp-block-table table {
	margin: 0;
}

/* ==========================================================================
   6. Layout
   ========================================================================== */

.fxrm-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 10000;
	background: var(--fxrm-accent);
	color: #ffffff;
	padding: 0.85em 1.4em;
	font-weight: 700;
	border-radius: 0 0 var(--fxrm-radius-sm) 0;
	text-decoration: none;
}

.fxrm-skip-link:focus {
	left: 0;
	color: #ffffff;
}

.fxrm-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.fxrm-container {
	width: 100%;
	max-width: var(--fxrm-wide-width);
	margin: 0 auto;
	padding: 0 24px;
}

.fxrm-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 56px;
	padding: 56px 0 88px;
	align-items: start;
}

.fxrm-layout.has-sidebar {
	grid-template-columns: minmax(0, 1fr) 300px;
}

.fxrm-main {
	min-width: 0;
	max-width: var(--fxrm-content-width);
}

.fxrm-layout:not(.has-sidebar) .fxrm-main {
	margin: 0 auto;
	width: 100%;
}

/* ==========================================================================
   7. Header and navigation
   ========================================================================== */

.fxrm-header {
	position: sticky;
	top: 0;
	z-index: 100;
	padding: 16px 0;
	background: var(--fxrm-header-bg);
	border-bottom: 1px solid var(--fxrm-border);
	backdrop-filter: saturate(180%) blur(10px);
	-webkit-backdrop-filter: saturate(180%) blur(10px);
}

.fxrm-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	position: relative;
}

.fxrm-branding {
	display: flex;
	align-items: center;
	min-width: 0;
}

.fxrm-branding a,
.fxrm-branding-link {
	display: flex;
	align-items: center;
	gap: 10px;
	color: var(--fxrm-text);
	text-decoration: none;
}

.fxrm-branding a:hover,
.fxrm-branding a:focus {
	text-decoration: none;
	color: var(--fxrm-text);
}

.fxrm-branding .custom-logo,
.fxrm-branding .fxrm-custom-logo {
	max-height: 40px;
	width: auto;
	display: block;
}

.fxrm-logo-mark {
	display: inline-flex;
	flex-shrink: 0;
	line-height: 0;
}

.fxrm-wordmark {
	font-size: 1.2rem;
	font-weight: 700;
	letter-spacing: -0.03em;
	white-space: nowrap;
}

.fxrm-primary-nav ul {
	display: flex;
	align-items: center;
	list-style: none;
	gap: 2px;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}

.fxrm-primary-nav li {
	position: relative;
	margin: 0;
}

.fxrm-primary-nav a {
	display: block;
	padding: 8px 14px;
	border-radius: 999px;
	color: var(--fxrm-text-muted);
	font-weight: 500;
	font-size: 0.95rem;
	text-decoration: none;
	transition: color 0.15s ease, background-color 0.15s ease;
}

.fxrm-primary-nav a:hover,
.fxrm-primary-nav a:focus {
	color: var(--fxrm-text);
	background: var(--fxrm-surface-raised);
	text-decoration: none;
}

.fxrm-primary-nav .current-menu-item > a,
.fxrm-primary-nav .current_page_item > a,
.fxrm-primary-nav .current-menu-ancestor > a {
	color: var(--fxrm-accent);
	font-weight: 600;
}

.fxrm-footer-main-site {
	color: var(--fxrm-text-muted);
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.15s ease;
}

.fxrm-footer-main-site:hover,
.fxrm-footer-main-site:focus {
	color: var(--fxrm-accent);
	text-decoration: underline;
}

/* Route back to the main site. Deliberately styled as a bordered pill rather
   than another nav item: it leaves the blog for a different host, and should
   not read as a peer of the in-site links beside it. */
.fxrm-main-site-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: 10px;
	padding: 7px 14px;
	border: 1px solid var(--fxrm-border);
	border-radius: 999px;
	color: var(--fxrm-text-muted);
	font-weight: 500;
	font-size: 0.9rem;
	white-space: nowrap;
	text-decoration: none;
	transition: color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease;
}

.fxrm-main-site-link:hover,
.fxrm-main-site-link:focus {
	color: var(--fxrm-accent);
	border-color: var(--fxrm-accent);
	background: var(--fxrm-accent-soft);
	text-decoration: none;
}

.fxrm-main-site-arrow {
	transition: transform 0.15s ease;
}

.fxrm-main-site-link:hover .fxrm-main-site-arrow {
	transform: translateX(-2px);
}

@media (prefers-reduced-motion: reduce) {
	.fxrm-main-site-arrow,
	.fxrm-main-site-link {
		transition: none;
	}

	.fxrm-main-site-link:hover .fxrm-main-site-arrow {
		transform: none;
	}
}

.fxrm-primary-nav ul ul {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	flex-direction: column;
	align-items: stretch;
	background: var(--fxrm-bg);
	border: 1px solid var(--fxrm-border);
	border-radius: var(--fxrm-radius-sm);
	padding: 6px;
	min-width: 210px;
	box-shadow: var(--fxrm-shadow-md);
}

.fxrm-primary-nav li:hover > ul,
.fxrm-primary-nav li:focus-within > ul {
	display: flex;
}

.fxrm-menu-toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border-radius: var(--fxrm-radius-sm);
	background: var(--fxrm-surface-raised);
	border: 1px solid var(--fxrm-border);
	color: var(--fxrm-text);
	cursor: pointer;
}

.fxrm-menu-toggle svg {
	width: 20px;
	height: 20px;
	display: block;
}

.fxrm-menu-toggle .fxrm-icon-close,
.fxrm-menu-toggle.is-open .fxrm-icon-open {
	display: none;
}

.fxrm-menu-toggle.is-open .fxrm-icon-close {
	display: block;
}

/* ==========================================================================
   8. Hero (front page)
   ========================================================================== */

.fxrm-hero {
	text-align: center;
	padding: 72px 0 8px;
	max-width: 720px;
	margin: 0 auto;
}

.fxrm-hero-title {
	margin: 0 0 0.35em;
}

.fxrm-hero-lead {
	color: var(--fxrm-text-muted);
	font-size: 1.15rem;
	margin: 0;
}

/* ==========================================================================
   9. Entries
   ========================================================================== */

.fxrm-entry {
	margin-bottom: 56px;
	padding-bottom: 56px;
	border-bottom: 1px solid var(--fxrm-border);
}

.fxrm-entry:last-child {
	border-bottom: 0;
	margin-bottom: 0;
}

.singular .fxrm-entry {
	border-bottom: 0;
	padding-bottom: 0;
	margin-bottom: 0;
}

.fxrm-entry-header {
	margin-bottom: 20px;
}

.fxrm-entry-title {
	margin: 0.15em 0 0;
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}

.singular .fxrm-entry-title {
	font-size: clamp(1.9rem, 1.4rem + 2.2vw, 2.75rem);
}

.fxrm-entry-title a {
	color: var(--fxrm-text);
	text-decoration: none;
}

.fxrm-entry-title a:hover,
.fxrm-entry-title a:focus {
	color: var(--fxrm-accent);
	text-decoration: none;
}

.fxrm-entry-thumbnail {
	margin: 0 0 24px;
	border-radius: var(--fxrm-radius);
	overflow: hidden;
	border: 1px solid var(--fxrm-border);
	background: var(--fxrm-surface-raised);
}

.fxrm-entry-thumbnail img {
	width: 100%;
	border-radius: 0;
}

.fxrm-category-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--fxrm-accent-soft);
	color: var(--fxrm-accent-soft-text);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.01em;
	text-decoration: none;
}

.fxrm-category-badge:hover,
.fxrm-category-badge:focus {
	background: var(--fxrm-accent);
	color: var(--fxrm-accent-on);
	text-decoration: none;
}

.fxrm-entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 16px;
	font-size: 0.85rem;
	color: var(--fxrm-text-muted);
	margin-top: 12px;
}

.fxrm-entry-meta a {
	color: var(--fxrm-text-muted);
	text-decoration: none;
}

.fxrm-entry-meta a:hover,
.fxrm-entry-meta a:focus {
	color: var(--fxrm-accent);
	text-decoration: underline;
}

.fxrm-entry-summary {
	color: var(--fxrm-text-muted);
}

.fxrm-entry-content > :first-child {
	margin-top: 0;
}

.fxrm-entry-content > :last-child {
	margin-bottom: 0;
}

.fxrm-entry-content a {
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

.fxrm-read-more-wrap {
	margin: 0;
}

.fxrm-read-more {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
}

.fxrm-read-more:hover,
.fxrm-read-more:focus {
	text-decoration: underline;
}

.fxrm-entry-terms {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 40px 0 0;
	padding-top: 24px;
	border-top: 1px solid var(--fxrm-border);
}

.fxrm-term-group {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fxrm-term-group a {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--fxrm-surface-raised);
	border: 1px solid var(--fxrm-border);
	color: var(--fxrm-text-muted);
	font-size: 0.8rem;
	text-decoration: none;
}

.fxrm-term-group a:hover,
.fxrm-term-group a:focus {
	color: var(--fxrm-accent);
	border-color: var(--fxrm-accent);
	text-decoration: none;
}

.fxrm-author-box {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	margin-top: 40px;
	padding: 20px;
	background: var(--fxrm-surface);
	border: 1px solid var(--fxrm-border);
	border-radius: var(--fxrm-radius);
}

.fxrm-author-box img {
	border-radius: 50%;
	width: 56px;
	height: 56px;
	flex-shrink: 0;
}

.fxrm-author-name {
	font-size: 1rem;
	margin: 0 0 4px;
}

.fxrm-author-box p {
	margin: 0;
	font-size: 0.9rem;
	color: var(--fxrm-text-muted);
}

.fxrm-entry-footer {
	margin-top: 32px;
	font-size: 0.875rem;
}

/* ==========================================================================
   10. Archive headers, pagination, post navigation
   ========================================================================== */

.fxrm-archive-header,
.fxrm-page-header {
	margin-bottom: 44px;
}

.fxrm-page-title {
	margin: 0 0 0.3em;
	font-size: clamp(1.8rem, 1.4rem + 1.8vw, 2.5rem);
}

.fxrm-archive-description {
	color: var(--fxrm-text-muted);
}

.fxrm-archive-description > :last-child {
	margin-bottom: 0;
}

.fxrm-pagination {
	margin-top: 56px;
}

.fxrm-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.fxrm-pagination .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	border-radius: var(--fxrm-radius-sm);
	border: 1px solid var(--fxrm-border);
	background: var(--fxrm-bg);
	color: var(--fxrm-text);
	font-weight: 500;
	text-decoration: none;
}

.fxrm-pagination .page-numbers:hover,
.fxrm-pagination .page-numbers:focus {
	border-color: var(--fxrm-accent);
	color: var(--fxrm-accent);
	text-decoration: none;
}

.fxrm-pagination .page-numbers.current {
	background: var(--fxrm-accent);
	border-color: var(--fxrm-accent);
	color: var(--fxrm-accent-on);
}

.fxrm-pagination .page-numbers.dots {
	border-color: transparent;
	min-width: 24px;
	padding: 0;
}

.fxrm-post-nav {
	margin-top: 48px;
	padding-top: 40px;
	border-top: 1px solid var(--fxrm-border);
}

.fxrm-post-nav .nav-links {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.fxrm-post-nav .nav-next {
	text-align: right;
}

/* First/last post: keep a lone "next" link in the right-hand column. */
.fxrm-post-nav .nav-next:only-child {
	grid-column: 2;
}

.fxrm-post-nav a {
	display: block;
	padding: 16px 18px;
	border: 1px solid var(--fxrm-border);
	border-radius: var(--fxrm-radius);
	color: var(--fxrm-text);
	font-weight: 500;
	text-decoration: none;
}

.fxrm-post-nav a:hover,
.fxrm-post-nav a:focus {
	border-color: var(--fxrm-accent);
	color: var(--fxrm-accent);
	text-decoration: none;
}

.fxrm-post-nav a span {
	display: block;
	font-size: 0.72rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--fxrm-text-subtle);
	margin-bottom: 6px;
}

/* ==========================================================================
   11. Comments
   ========================================================================== */

.fxrm-comments {
	margin-top: 56px;
	padding-top: 40px;
	border-top: 1px solid var(--fxrm-border);
}

.fxrm-comments-title {
	margin: 0 0 24px;
	font-size: 1.35rem;
}

.fxrm-comment-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fxrm-comment-list .children {
	list-style: none;
	margin: 0 0 0 32px;
	padding: 0;
}

.fxrm-comment-body {
	display: flex;
	gap: 14px;
	padding: 20px 0;
	border-bottom: 1px solid var(--fxrm-border);
}

.fxrm-comment-content {
	min-width: 0;
}

.fxrm-comment-avatar img {
	border-radius: 50%;
	width: 44px;
	height: 44px;
}

.fxrm-comment-meta {
	display: flex;
	align-items: baseline;
	gap: 10px;
	flex-wrap: wrap;
	margin-bottom: 6px;
}

.fxrm-comment-author {
	font-weight: 600;
}

.fxrm-comment-date {
	font-size: 0.8rem;
	color: var(--fxrm-text-muted);
}

.fxrm-comment-date a {
	color: inherit;
	text-decoration: none;
}

.fxrm-comment-reply-link {
	font-size: 0.8rem;
	font-weight: 600;
	margin-top: 8px;
}

.fxrm-comment-awaiting-moderation,
.fxrm-comments-closed {
	font-size: 0.875rem;
	color: var(--fxrm-text-muted);
	font-style: italic;
}

.fxrm-comment-form,
.comment-respond {
	margin-top: 32px;
}

.comment-respond {
	padding: 24px;
	background: var(--fxrm-surface);
	border: 1px solid var(--fxrm-border);
	border-radius: var(--fxrm-radius);
}

.comment-reply-title {
	margin-top: 0;
	font-size: 1.2rem;
}

.comment-form p {
	margin-bottom: 1em;
}

.comment-notes,
.comment-form-cookies-consent label {
	font-size: 0.85rem;
	color: var(--fxrm-text-muted);
}

.comment-form-cookies-consent {
	display: flex;
	align-items: center;
	gap: 8px;
}

.comment-form-cookies-consent input {
	width: auto;
	min-height: 0;
}

.comment-form-cookies-consent label {
	margin: 0;
}

/* ==========================================================================
   12. Sidebar and widgets
   ========================================================================== */

.fxrm-sidebar {
	display: flex;
	flex-direction: column;
	gap: 28px;
	min-width: 0;
	position: sticky;
	top: 96px;
}

.fxrm-widget {
	background: var(--fxrm-surface);
	border: 1px solid var(--fxrm-border);
	border-radius: var(--fxrm-radius);
	padding: 20px;
}

.fxrm-widget-title {
	font-size: 0.8rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.07em;
	color: var(--fxrm-text-subtle);
	margin: 0 0 14px;
}

.fxrm-widget ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fxrm-widget li {
	padding: 8px 0;
	border-bottom: 1px solid var(--fxrm-border);
}

.fxrm-widget li:last-child {
	border-bottom: 0;
	padding-bottom: 0;
}

.fxrm-widget li + li {
	margin-top: 0;
}

.fxrm-widget a {
	text-decoration: none;
}

.fxrm-widget a:hover,
.fxrm-widget a:focus {
	text-decoration: underline;
}

/* ==========================================================================
   13. Footer
   ========================================================================== */

.fxrm-footer {
	margin-top: auto;
	padding: 48px 0 32px;
	background: var(--fxrm-surface);
	border-top: 1px solid var(--fxrm-border);
}

.fxrm-footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 32px;
	margin-bottom: 32px;
}

.fxrm-footer-widgets .fxrm-widget {
	background: transparent;
	border: 0;
	padding: 0;
}

.fxrm-footer-bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-top: 24px;
	border-top: 1px solid var(--fxrm-border);
}

.fxrm-footer-branding {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--fxrm-text-muted);
	font-size: 0.85rem;
}

.fxrm-footer-copy {
	display: flex;
	flex-direction: column;
}

.fxrm-footer-copyright {
	color: var(--fxrm-text);
	font-weight: 600;
}

.fxrm-footer-nav ul {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	gap: 4px 20px;
	margin: 0;
	padding: 0;
}

.fxrm-footer-nav li {
	margin: 0;
}

.fxrm-footer-nav a {
	color: var(--fxrm-text-muted);
	font-size: 0.85rem;
	text-decoration: none;
}

.fxrm-footer-nav a:hover,
.fxrm-footer-nav a:focus {
	color: var(--fxrm-accent);
	text-decoration: underline;
}

/* ==========================================================================
   14. Forms and buttons
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
select,
textarea {
	width: 100%;
	padding: 11px 14px;
	font-family: var(--fxrm-font);
	font-size: 1rem;
	color: var(--fxrm-text);
	background: var(--fxrm-bg);
	border: 1px solid var(--fxrm-border-strong);
	border-radius: var(--fxrm-radius-sm);
	min-height: 44px;
}

textarea {
	min-height: 140px;
	resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
	border-color: var(--fxrm-accent);
	outline: 2px solid var(--fxrm-accent-ring);
	outline-offset: 0;
}

label {
	display: block;
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--fxrm-text-muted);
	margin-bottom: 6px;
}

.fxrm-button,
button,
input[type="submit"],
input[type="button"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 10px 22px;
	font-family: var(--fxrm-font);
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	color: #ffffff;
	background: var(--fxrm-accent);
	border: 1px solid transparent;
	border-radius: var(--fxrm-radius-sm);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.fxrm-button:hover,
.fxrm-button:focus,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
	background: var(--fxrm-accent-hover);
	color: #ffffff;
	text-decoration: none;
}

.fxrm-button:active,
button:active,
input[type="submit"]:active {
	background: var(--fxrm-accent-active);
}

@media (prefers-color-scheme: dark) {
	.fxrm-button,
	button,
	input[type="submit"],
	input[type="button"] {
		background: #7c3aed;
	}

	.fxrm-button:hover,
	.fxrm-button:focus,
	button:hover,
	input[type="submit"]:hover,
	input[type="button"]:hover {
		background: #6d28d9;
	}
}

/* The menu toggle is a button but must not inherit the filled brand style. */
.fxrm-menu-toggle,
.fxrm-menu-toggle:hover,
.fxrm-menu-toggle:focus {
	background: var(--fxrm-surface-raised);
	color: var(--fxrm-text);
	border: 1px solid var(--fxrm-border);
}

.fxrm-search-form {
	display: flex;
	gap: 8px;
	max-width: 480px;
	margin: 0 auto;
}

.fxrm-sidebar .fxrm-search-form,
.fxrm-widget .fxrm-search-form {
	max-width: none;
}

.fxrm-search-form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
}

.fxrm-search-form .search-submit {
	flex-shrink: 0;
}

.fxrm-search-icon svg {
	width: 18px;
	height: 18px;
	display: block;
}

/* ==========================================================================
   15. Empty states
   ========================================================================== */

.fxrm-empty-state {
	text-align: center;
	padding: 72px 20px;
	color: var(--fxrm-text-muted);
}

.fxrm-empty-state h1 {
	color: var(--fxrm-text);
	margin-top: 0;
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
}

.fxrm-empty-mark {
	display: inline-flex;
	margin-bottom: 20px;
	line-height: 0;
}

.fxrm-empty-actions {
	margin-top: 28px;
	margin-bottom: 0;
}

/* ==========================================================================
   16. WordPress core helpers
   ========================================================================== */

.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;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--fxrm-bg);
	clip: auto !important;
	clip-path: none;
	color: var(--fxrm-accent);
	display: block;
	font-weight: 700;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

.alignwide {
	max-width: var(--fxrm-wide-width);
}

.alignfull {
	max-width: none;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.aligncenter {
	margin-left: auto;
	margin-right: auto;
}

.alignleft {
	float: left;
	margin: 0.4em 1.5em 1em 0;
}

.alignright {
	float: right;
	margin: 0.4em 0 1em 1.5em;
}

.sticky .fxrm-entry-title::after {
	content: "\2605";
	color: var(--fxrm-accent);
	margin-left: 0.3em;
	font-size: 0.7em;
	vertical-align: super;
}

.page-links {
	margin: 2em 0;
	font-size: 0.9rem;
	color: var(--fxrm-text-muted);
}

.page-links a {
	padding: 2px 8px;
	border: 1px solid var(--fxrm-border);
	border-radius: 4px;
	margin: 0 2px;
	text-decoration: none;
}

.says,
.bypostauthor {
	/* Required by the WordPress theme review guidelines. */
	display: initial;
}

/* ==========================================================================
   17. Responsive
   ========================================================================== */

@media (max-width: 1023px) {
	.fxrm-layout.has-sidebar {
		grid-template-columns: minmax(0, 1fr) 260px;
		gap: 40px;
	}
}

@media (max-width: 860px) {
	.fxrm-layout,
	.fxrm-layout.has-sidebar {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
	}

	.fxrm-sidebar {
		position: static;
	}

	.fxrm-menu-toggle {
		display: inline-flex;
	}

	.fxrm-primary-nav {
		display: none;
		position: absolute;
		top: calc(100% + 16px);
		left: 0;
		right: 0;
		background: var(--fxrm-bg);
		border: 1px solid var(--fxrm-border);
		border-radius: var(--fxrm-radius-sm);
		box-shadow: var(--fxrm-shadow-md);
		padding: 8px;
	}

	.fxrm-primary-nav.is-open {
		display: block;
	}

	.fxrm-primary-nav ul {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
	}

	.fxrm-primary-nav ul ul {
		display: flex;
		position: static;
		border: 0;
		box-shadow: none;
		padding: 0 0 0 14px;
		min-width: 0;
		background: transparent;
	}

	.fxrm-primary-nav a {
		padding: 11px 12px;
		min-height: 44px;
		border-radius: var(--fxrm-radius-sm);
	}

	/* Inside the collapsed dropdown the pill treatment reads as a stray button,
	   so it becomes a full-width row like the menu items — but keeps a divider
	   above it, since it still leads off-site. */
	.fxrm-main-site-link {
		display: flex;
		width: 100%;
		margin: 6px 0 0;
		padding: 11px 12px;
		min-height: 44px;
		border: 0;
		border-top: 1px solid var(--fxrm-border);
		border-radius: 0;
	}

	.fxrm-main-site-link:hover,
	.fxrm-main-site-link:focus {
		border-color: var(--fxrm-border);
		border-radius: var(--fxrm-radius-sm);
	}

	.fxrm-post-nav .nav-links {
		grid-template-columns: 1fr;
	}

	.fxrm-post-nav .nav-next {
		text-align: left;
	}
}

@media (max-width: 640px) {
	body {
		font-size: 16px;
	}

	.fxrm-container {
		padding: 0 18px;
	}

	.fxrm-layout {
		padding: 40px 0 64px;
	}

	.fxrm-hero {
		padding: 48px 0 4px;
	}

	.fxrm-entry {
		margin-bottom: 44px;
		padding-bottom: 44px;
	}

	.fxrm-comment-list .children {
		margin-left: 16px;
	}

	.comment-respond {
		padding: 18px;
	}

	pre {
		padding: 16px 18px;
		border-radius: var(--fxrm-radius-sm);
	}

	.fxrm-search-label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(1px, 1px, 1px, 1px);
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.fxrm-search-form .search-submit {
		padding: 10px 14px;
	}
}

/* ==========================================================================
   18. Print
   ========================================================================== */

@media print {
	.fxrm-header,
	.fxrm-footer,
	.fxrm-sidebar,
	.fxrm-pagination,
	.fxrm-post-nav,
	.fxrm-comments,
	.fxrm-skip-link {
		display: none !important;
	}

	body {
		background: #ffffff;
		color: #000000;
		font-size: 12pt;
	}

	pre {
		background: #f4f4f5;
		color: #18181b;
		border: 1px solid #d4d4d8;
		white-space: pre-wrap;
		overflow-x: visible;
	}

	a {
		color: #000000;
	}
}
