/*
Theme Name: Meridian
Theme URI: https://example.com/meridian
Author: Meridian Capital Advisors
Description: An editorial WordPress theme for a wealth-management firm: a blog-first front page, readable long-form article templates, and first-class bbPress forum styling. Brand name, colours, and legal text live in inc/branding.php.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: meridian
Tags: blog, news, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ---------------------------------------------------------------------------
   1. Design tokens
--------------------------------------------------------------------------- */

:root {
	--ink: #0f1b2d;
	--ink-soft: #33415c;
	--muted: #63708a;
	--accent: #1f6f5c;
	--accent-dark: #17564745;
	--gold: #a8802c;
	--bg: #f7f6f3;
	--surface: #ffffff;
	--surface-2: #f1efea;
	--line: #e2ded6;
	--line-strong: #cfc9bd;
	--danger: #9b2c2c;

	--radius: 6px;
	--radius-lg: 12px;
	--shadow: 0 1px 2px rgba(15, 27, 45, .06), 0 8px 24px rgba(15, 27, 45, .05);
	--shadow-sm: 0 1px 2px rgba(15, 27, 45, .08);

	--font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-display: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;

	--wrap: 1180px;
	--wrap-narrow: 760px;
	--gutter: 24px;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ink: #e9edf5;
		--ink-soft: #c3ccdb;
		--muted: #94a1b8;
		--accent: #5fbfa4;
		--gold: #d8ae5c;
		--bg: #0e1524;
		--surface: #151e30;
		--surface-2: #1c2639;
		--line: #26314a;
		--line-strong: #33415c;
		--danger: #f1a3a3;
		--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
		--shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
	}
}

:root[data-theme="dark"] {
	--ink: #e9edf5;
	--ink-soft: #c3ccdb;
	--muted: #94a1b8;
	--accent: #5fbfa4;
	--gold: #d8ae5c;
	--bg: #0e1524;
	--surface: #151e30;
	--surface-2: #1c2639;
	--line: #26314a;
	--line-strong: #33415c;
	--danger: #f1a3a3;
	--shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
	--shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
}

/* ---------------------------------------------------------------------------
   2. Base
--------------------------------------------------------------------------- */

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

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

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-body);
	font-size: 17px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-display);
	font-weight: 600;
	line-height: 1.2;
	color: var(--ink);
	margin: 0 0 .5em;
	letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p, ul, ol, blockquote, figure, table, pre { margin: 0 0 1.25em; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--ink); }

img, video, iframe { max-width: 100%; height: auto; }

blockquote {
	margin-inline: 0;
	padding: .25em 0 .25em 1.25em;
	border-left: 3px solid var(--gold);
	font-family: var(--font-display);
	font-size: 1.15em;
	color: var(--ink-soft);
}

code, kbd, pre { font-family: var(--font-mono); font-size: .9em; }

pre {
	background: var(--surface-2);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	padding: 16px;
	overflow-x: auto;
}

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

table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
th { font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
	border-radius: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 8px;
	z-index: 100;
	background: var(--surface);
	color: var(--ink);
	padding: 10px 16px;
	border-radius: var(--radius);
	box-shadow: var(--shadow);
}
.skip-link:focus { left: 8px; }

/* ---------------------------------------------------------------------------
   3. Layout primitives
--------------------------------------------------------------------------- */

.wrap {
	width: 100%;
	max-width: var(--wrap);
	margin-inline: auto;
	padding-inline: var(--gutter);
}

.wrap-narrow { max-width: var(--wrap-narrow); }

.site-main { padding-block: 48px 72px; }

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

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

.card {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}

.eyebrow {
	font-family: var(--font-body);
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--accent);
	margin: 0 0 10px;
}

.btn {
	display: inline-block;
	padding: 11px 20px;
	border-radius: var(--radius);
	border: 1px solid transparent;
	background: var(--accent);
	color: #fff;
	font-weight: 600;
	font-size: .95rem;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s ease, transform .15s ease;
}
.btn:hover { filter: brightness(1.08); color: #fff; transform: translateY(-1px); }

.btn-ghost {
	background: transparent;
	color: var(--ink);
	border-color: var(--line-strong);
}
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); filter: none; }

/* ---------------------------------------------------------------------------
   4. Header
--------------------------------------------------------------------------- */

.topbar {
	background: var(--ink);
	color: #cbd5e4;
	font-size: .8rem;
	letter-spacing: .02em;
}
:root[data-theme="dark"] .topbar,
:root:not([data-theme="light"]) .topbar { background: #0a1220; }

.topbar .wrap {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 16px;
	min-height: 38px;
	flex-wrap: wrap;
}
.topbar a { color: #fff; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.topbar-legal { color: #97a6bd; }

.site-header {
	background: var(--surface);
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	z-index: 50;
}

.site-header .wrap {
	display: flex;
	align-items: center;
	gap: 28px;
	min-height: 76px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }

.brand-mark {
	width: 40px; height: 40px;
	flex: none;
	display: grid; place-items: center;
	border-radius: 8px;
	background: linear-gradient(145deg, var(--ink), #24405f);
	color: #fff;
	font-family: var(--font-display);
	font-size: 1.25rem;
	font-weight: 700;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-display); font-size: 1.22rem; font-weight: 700; color: var(--ink); }
.brand-sub { font-size: .72rem; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }

.nav-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	padding: 8px 12px;
	color: var(--ink);
	font-size: .9rem;
	cursor: pointer;
}

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }

.main-nav a {
	display: block;
	padding: 9px 12px;
	border-radius: var(--radius);
	color: var(--ink-soft);
	font-size: .95rem;
	font-weight: 500;
	text-decoration: none;
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); }

.main-nav .current-menu-item > a,
.main-nav .current_page_item > a,
.main-nav .current-menu-parent > a {
	color: var(--accent);
	background: var(--surface-2);
}

/* Caret marking a menu item that opens a dropdown. */
.main-nav .menu-item-has-children > a::after {
	content: "";
	display: inline-block;
	width: 0;
	height: 0;
	margin-left: 7px;
	vertical-align: middle;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 4px solid currentColor;
	opacity: .55;
}
.main-nav .menu-item-has-children:hover > a::after,
.main-nav .menu-item-has-children:focus-within > a::after { opacity: 1; }

.main-nav li { position: relative; }
.main-nav .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	flex-direction: column;
	/* Reset the centring inherited from .main-nav ul. */
	align-items: stretch;
	text-align: left;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 6px;
	z-index: 60;
}
.main-nav .sub-menu a {
	padding: 9px 14px;
	white-space: nowrap;
	font-size: .92rem;
}

.main-nav li:hover > .sub-menu,
.main-nav li:focus-within > .sub-menu { display: flex; }

.header-actions { display: flex; align-items: center; gap: 10px; }

.theme-toggle {
	background: transparent;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	width: 38px; height: 38px;
	display: grid; place-items: center;
	cursor: pointer;
	color: var(--ink-soft);
	font-size: 1rem;
	line-height: 1;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 860px) {
	.nav-toggle { display: block; order: 3; }
	.main-nav {
		order: 4;
		flex-basis: 100%;
		display: none;
		padding-bottom: 16px;
	}
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
	.main-nav .sub-menu { position: static; display: flex; border: 0; box-shadow: none; padding-left: 14px; }
	.site-header .wrap { flex-wrap: wrap; padding-block: 12px; }
}

/* ---------------------------------------------------------------------------
   5. Front page
--------------------------------------------------------------------------- */

.hero {
	background:
		radial-gradient(1100px 400px at 12% -10%, rgba(31, 111, 92, .16), transparent 60%),
		linear-gradient(180deg, var(--surface), var(--bg));
	border-bottom: 1px solid var(--line);
	padding-block: 72px 64px;
}

.hero-grid {
	display: grid;
	grid-template-columns: 1.15fr .85fr;
	gap: 56px;
	align-items: center;
}

.hero h1 { margin-bottom: .35em; }
.hero-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 54ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1px;
	background: var(--line);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
}
.hero-stat { background: var(--surface); padding: 22px 24px; }
.hero-stat .figure {
	font-family: var(--font-display);
	font-size: 1.9rem;
	font-weight: 700;
	color: var(--ink);
	display: block;
	line-height: 1.1;
}
.hero-stat .label { font-size: .82rem; color: var(--muted); }

@media (max-width: 860px) {
	.hero { padding-block: 48px 44px; }
	.hero-grid { grid-template-columns: 1fr; gap: 36px; }
}

.section { padding-block: 60px; }
.section + .section { padding-top: 0; }

.section-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--line);
}
.section-head h2 { margin: 0; }
.section-head .more { font-size: .92rem; font-weight: 600; white-space: nowrap; text-decoration: none; }

.post-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
	gap: 28px;
}

.topic-strip {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
}

.topic-chip {
	display: block;
	padding: 18px 20px;
	border-radius: var(--radius-lg);
	background: var(--surface);
	border: 1px solid var(--line);
	text-decoration: none;
	transition: border-color .15s ease, transform .15s ease;
}
.topic-chip:hover { border-color: var(--accent); transform: translateY(-2px); }
.topic-chip .name { display: block; font-family: var(--font-display); font-size: 1.08rem; font-weight: 600; color: var(--ink); }
.topic-chip .count { font-size: .82rem; color: var(--muted); }

.forum-promo {
	background: linear-gradient(135deg, var(--ink), #223c59);
	color: #eaf0f8;
	border-radius: var(--radius-lg);
	padding: 44px 48px;
	display: grid;
	grid-template-columns: 1.1fr .9fr;
	gap: 40px;
	align-items: center;
}
.forum-promo h2 { color: #fff; }
.forum-promo p { color: #c3d0e2; }
.forum-promo .btn { background: var(--gold); }
.forum-promo .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.forum-promo .btn-ghost:hover { border-color: #fff; color: #fff; }

.forum-promo-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.forum-promo-list li {
	background: rgba(255, 255, 255, .07);
	border: 1px solid rgba(255, 255, 255, .12);
	border-radius: var(--radius);
	padding: 12px 16px;
	font-size: .95rem;
}
.forum-promo-list a { color: #fff; text-decoration: none; font-weight: 600; }
.forum-promo-list a:hover { text-decoration: underline; }
.forum-promo-list .meta { display: block; font-size: .8rem; color: #a9bad0; font-weight: 400; }

@media (max-width: 860px) {
	.forum-promo { grid-template-columns: 1fr; padding: 32px 26px; gap: 28px; }
}

.newsletter {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 36px 40px;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 32px;
	align-items: center;
}
.newsletter h2 { margin-bottom: .25em; }
.newsletter p { margin: 0; color: var(--muted); }
.newsletter form { display: flex; gap: 10px; flex-wrap: wrap; }
.newsletter input[type="email"] {
	min-width: 260px;
	padding: 11px 14px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--ink);
	font-size: .95rem;
	font-family: inherit;
}
@media (max-width: 760px) {
	.newsletter { grid-template-columns: 1fr; padding: 28px 24px; }
}

/* ---------------------------------------------------------------------------
   6. Post cards & archives
--------------------------------------------------------------------------- */

.post-card {
	display: flex;
	flex-direction: column;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.post-card .thumb { display: block; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-card .thumb-fallback {
	width: 100%; height: 100%;
	display: grid; place-items: center;
	background: linear-gradient(135deg, var(--surface-2), var(--bg));
	color: var(--line-strong);
	font-family: var(--font-display);
	font-size: 2.2rem;
}

.post-card .body { padding: 22px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.post-card h3 { margin: 0; font-size: 1.22rem; line-height: 1.3; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent); }
.post-card .excerpt { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.post-card .card-foot { margin-top: auto; padding-top: 6px; }

.post-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	font-size: .82rem;
	color: var(--muted);
}
.post-meta .sep { opacity: .5; }
.post-meta a { color: var(--muted); text-decoration: none; }
.post-meta a:hover { color: var(--accent); }

.cat-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--surface-2);
	border: 1px solid var(--line);
	color: var(--accent);
	font-size: .74rem;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	text-decoration: none;
}
.cat-badge:hover { border-color: var(--accent); }

.archive-head { margin-bottom: 36px; padding-bottom: 20px; border-bottom: 2px solid var(--ink); }
.archive-head h1 { margin-bottom: .2em; }
.archive-head .desc { color: var(--muted); margin: 0; max-width: 62ch; }

.post-list { display: grid; gap: 28px; }

.post-row {
	display: grid;
	grid-template-columns: 260px minmax(0, 1fr);
	gap: 26px;
	padding-bottom: 28px;
	border-bottom: 1px solid var(--line);
}
.post-row:last-child { border-bottom: 0; }
.post-row .thumb { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); }
.post-row .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-row h2 { font-size: 1.5rem; margin: 8px 0 10px; }
.post-row h2 a { color: var(--ink); text-decoration: none; }
.post-row h2 a:hover { color: var(--accent); }
.post-row .excerpt { color: var(--ink-soft); margin-bottom: 12px; }

@media (max-width: 680px) {
	.post-row { grid-template-columns: 1fr; gap: 16px; }
}

.pagination { margin-top: 44px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 40px; height: 40px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	background: var(--surface);
	color: var(--ink-soft);
	text-decoration: none;
	font-size: .92rem;
}
.pagination .page-numbers:hover { border-color: var(--accent); color: var(--accent); }
.pagination .page-numbers.current { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ---------------------------------------------------------------------------
   7. Single post
--------------------------------------------------------------------------- */

.entry-header { margin-bottom: 30px; }
.entry-header h1 { margin: 10px 0 14px; }
.entry-lede { font-size: 1.18rem; color: var(--ink-soft); font-family: var(--font-display); }

.entry-byline {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 0;
	border-top: 1px solid var(--line);
	border-bottom: 1px solid var(--line);
	font-size: .9rem;
	color: var(--muted);
	flex-wrap: wrap;
}
.entry-byline .avatar { border-radius: 50%; }
.entry-byline strong { color: var(--ink); font-weight: 600; }

.featured-image { margin: 30px 0; border-radius: var(--radius-lg); overflow: hidden; }
.featured-image img { width: 100%; display: block; }
.featured-image figcaption { font-size: .82rem; color: var(--muted); padding: 8px 2px; }

.entry-content { font-size: 1.06rem; }
.entry-content > * + * { margin-top: 1.2em; }
.entry-content h2 { margin-top: 1.8em; }
.entry-content h3 { margin-top: 1.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li + li { margin-top: .4em; }
.entry-content img { border-radius: var(--radius); }

.entry-content .wp-block-table td, .entry-content .wp-block-table th { border: 1px solid var(--line); }

.callout {
	background: var(--surface);
	border: 1px solid var(--line);
	border-left: 4px solid var(--accent);
	border-radius: var(--radius);
	padding: 18px 22px;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }

.entry-tags { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.entry-tags a {
	font-size: .82rem;
	padding: 5px 12px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: var(--surface);
	color: var(--ink-soft);
	text-decoration: none;
}
.entry-tags a:hover { border-color: var(--accent); color: var(--accent); }

.post-disclaimer {
	margin-top: 40px;
	padding: 20px 24px;
	border-radius: var(--radius);
	background: var(--surface-2);
	border: 1px solid var(--line);
	font-size: .86rem;
	color: var(--muted);
	line-height: 1.6;
}

.author-box {
	margin-top: 40px;
	padding: 26px;
	border-radius: var(--radius-lg);
	background: var(--surface);
	border: 1px solid var(--line);
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 20px;
	align-items: start;
}
.author-box img { border-radius: 50%; }
.author-box h3 { margin: 0 0 6px; font-size: 1.1rem; }
.author-box p { margin: 0; font-size: .93rem; color: var(--ink-soft); }

.post-nav {
	margin-top: 40px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
}
.post-nav a {
	display: block;
	padding: 18px 20px;
	border-radius: var(--radius-lg);
	background: var(--surface);
	border: 1px solid var(--line);
	text-decoration: none;
}
.post-nav a:hover { border-color: var(--accent); }
.post-nav .dir { display: block; font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 6px; }
.post-nav .title { font-family: var(--font-display); font-weight: 600; color: var(--ink); }
.post-nav .next { text-align: right; }
@media (max-width: 680px) { .post-nav { grid-template-columns: 1fr; } }

.related { margin-top: 56px; }

/* ---------------------------------------------------------------------------
   8. Comments
--------------------------------------------------------------------------- */

.comments-area { margin-top: 56px; padding-top: 36px; border-top: 2px solid var(--ink); }
.comment-list { list-style: none; margin: 0 0 40px; padding: 0; }
.comment-list ol.children { list-style: none; margin: 18px 0 0; padding-left: 28px; border-left: 2px solid var(--line); }
.comment-body {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 20px 22px;
	margin-bottom: 18px;
}
.comment-meta { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: .86rem; color: var(--muted); }
.comment-meta img { border-radius: 50%; }
.comment-author b { color: var(--ink); }
.comment-content p:last-child { margin-bottom: 0; }
.comment-reply-link { font-size: .85rem; font-weight: 600; text-decoration: none; }

.comment-respond {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 28px;
}
.comment-form label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 6px; color: var(--ink-soft); }
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--ink);
	font-family: inherit;
	font-size: .95rem;
}
.comment-form textarea { min-height: 150px; resize: vertical; }
.comment-form .form-submit input { all: unset; }
.comment-form input[type="submit"] {
	display: inline-block;
	padding: 11px 22px;
	border-radius: var(--radius);
	border: 0;
	background: var(--accent);
	color: #fff;
	font-weight: 600;
	font-size: .95rem;
	cursor: pointer;
}

/* ---------------------------------------------------------------------------
   9. Sidebar & widgets
--------------------------------------------------------------------------- */

.sidebar { position: sticky; top: 100px; display: grid; gap: 24px; }
@media (max-width: 960px) { .sidebar { position: static; } }

.widget {
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	padding: 22px 24px;
}
.widget-title {
	font-size: .82rem;
	text-transform: uppercase;
	letter-spacing: .1em;
	color: var(--muted);
	margin: 0 0 14px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--line);
	font-family: var(--font-body);
	font-weight: 700;
}
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .94rem; }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--ink-soft); text-decoration: none; }
.widget a:hover { color: var(--accent); }

.search-form { display: flex; gap: 8px; }
.search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	padding: 10px 13px;
	border: 1px solid var(--line-strong);
	border-radius: var(--radius);
	background: var(--bg);
	color: var(--ink);
	font-family: inherit;
	font-size: .93rem;
}
.search-form button {
	padding: 10px 16px;
	border: 0;
	border-radius: var(--radius);
	background: var(--ink);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	font-size: .9rem;
}

/* ---------------------------------------------------------------------------
   10. Footer
--------------------------------------------------------------------------- */

.site-footer {
	background: var(--ink);
	color: #b9c6d8;
	margin-top: 40px;
	font-size: .93rem;
}
:root[data-theme="dark"] .site-footer,
:root:not([data-theme="light"]) .site-footer { background: #0a1220; }

.footer-top {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 40px;
	padding-block: 56px 40px;
}
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 520px) { .footer-top { grid-template-columns: 1fr; } }

.site-footer h3 {
	color: #fff;
	font-family: var(--font-body);
	font-size: .8rem;
	letter-spacing: .12em;
	text-transform: uppercase;
	margin-bottom: 14px;
}
.site-footer a { color: #c8d4e4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }

.footer-brand .brand-mark { margin-bottom: 14px; }
.footer-brand p { color: #93a4bb; max-width: 40ch; }

.footer-legal {
	border-top: 1px solid rgba(255, 255, 255, .1);
	padding-block: 24px 36px;
	font-size: .78rem;
	line-height: 1.7;
	color: #8b9cb4;
}
.footer-legal p { margin: 0 0 10px; }
.footer-legal .copyright { color: #b9c6d8; }

/* ---------------------------------------------------------------------------
   11. Misc
--------------------------------------------------------------------------- */

.page-header { margin-bottom: 32px; padding-bottom: 18px; border-bottom: 2px solid var(--ink); }

.error-404 { text-align: center; padding-block: 60px; }
.error-404 .code { font-family: var(--font-display); font-size: 5rem; color: var(--line-strong); line-height: 1; }

.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { display: block; margin-inline: auto; }
.wp-caption-text, .wp-block-image figcaption { font-size: .82rem; color: var(--muted); }
.sticky .post-card { border-color: var(--gold); }

@media print {
	.site-header, .site-footer, .sidebar, .topbar, .comments-area, .post-nav { display: none; }
	body { background: #fff; color: #000; }
}
