/*
Theme Name: FireBorn
Theme URI: https://example.com/fireborn
Author: Master Coder
Author URI: https://example.com
Description: A clean, fast, secure-by-construction blog theme. No remote dependencies, no jQuery, and responsive images.
Version: 1.3.0
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fireborn
Tags: blog, two-columns, right-sidebar, left-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* =========================================================================
   Design tokens
   NOTE: This is a functional Phase 2 baseline. Visual polish (color palette,
   typography scale, spacing rhythm) is finalised in the Phase 3 design pass.
   ========================================================================= */
:root {
	/* Palette carried over from the previous theme design. */
	--color-text: #333333;
	--color-heading: #222222;
	--color-muted: #6b7077;
	--color-bg: #ffffff;
	--color-accent: #bd1515;        /* link / highlight color */
	--color-accent-hover: #000000;  /* link hover */
	--color-border: #e6e6e6;
	--color-button: var(--color-accent); /* filled button background (Customizer) */
	--color-surface: #f7f6f4;
	--color-navbar-bg: #f0f0f0;
	--color-navbar-text: #000000;

	/* Fonts (self-hosted). Body/UI: Lato. Headings: Lora. Title: Dancing Script.
	   The blog/page/carousel families inherit a base family by default and are
	   overridable per-target from the Customizer Typography section. */
	--font-body: "Lato", Arial, Helvetica, sans-serif;
	--font-heading: "Lora", Georgia, "Times New Roman", serif;
	--font-title: "Dancing Script", "Lora", Georgia, cursive;
	--font-blog: var(--font-body);
	--font-page: var(--font-body);
	--font-carousel-title: var(--font-heading);
	--font-carousel-caption: var(--font-heading);
	--font-post-date: var(--font-body);
	--font-pagination: var(--font-body);
	--font-header-menu: var(--font-body);
	--font-dropdown-menu: var(--font-header-menu); /* header dropdown; defaults to the header menu font */
	--font-footer-menu: var(--font-body);
	--font-link: inherit; /* content links follow surrounding text unless set */

	/* Per-heading-level fonts/colours/styles. Each defaults to the shared
	   heading base, so H1–H6 look identical until customised individually from
	   the Customizer (Typography → Heading H1…H6). */
	--font-h1: var(--font-heading);
	--font-h2: var(--font-heading);
	--font-h3: var(--font-heading);
	--font-h4: var(--font-heading);
	--font-h5: var(--font-heading);
	--font-h6: var(--font-heading);
	--color-h1: var(--color-heading);
	--color-h2: var(--color-heading);
	--color-h3: var(--color-heading);
	--color-h4: var(--color-heading);
	--color-h5: var(--color-heading);
	--color-h6: var(--color-heading);
	--fstyle-h1: var(--fstyle-heading);
	--fstyle-h2: var(--fstyle-heading);
	--fstyle-h3: var(--fstyle-heading);
	--fstyle-h4: var(--fstyle-heading);
	--fstyle-h5: var(--fstyle-heading);
	--fstyle-h6: var(--fstyle-heading);

	/* Card titles for the grid and mosaic layouts each have their own target,
	   defaulting to the shared heading look at the card sizes, so both are
	   unchanged until customised (Typography → Grid title / Mosaic title). */
	--font-grid-title: var(--font-heading);
	--color-grid-title: var(--color-heading);
	--fstyle-grid-title: var(--fstyle-heading);
	--fs-grid-title: 20px;
	--font-mosaic-title: var(--font-heading);
	--color-mosaic-title: var(--color-heading);
	--fstyle-mosaic-title: var(--fstyle-heading);
	--fs-mosaic-title: 20px;

	/* Per-target font styles. Normal is the standard for every target; the
	   Customizer Typography "style" control can switch any target to italic. */
	--fstyle-title: normal;
	--fstyle-heading: normal;
	--fstyle-post-date: normal;
	--fstyle-carousel-title: normal;
	--fstyle-carousel-caption: normal;
	--fstyle-body: normal;
	--fstyle-blog: normal;
	--fstyle-page: normal;
	--fstyle-pagination: normal;
	--fstyle-header-menu: normal;
	--fstyle-dropdown-menu: var(--fstyle-header-menu);
	--fstyle-footer-menu: normal;
	--fstyle-link: normal;

	/* Per-target text colors. These default to the shared palette above so the
	   design is unchanged until a color is set in the Customizer. */
	--color-title: var(--color-heading);
	--color-blog: var(--color-text);
	--color-page: var(--color-text);
	--color-carousel-title: var(--color-heading);
	--color-carousel-caption: var(--color-heading);
	--color-post-date: var(--color-muted);
	--color-pagination: var(--color-text);
	--color-header-menu: var(--color-navbar-text);
	--color-dropdown-menu: var(--color-header-menu);
	--color-footer-menu: var(--color-accent);
	--color-link: var(--color-accent);            /* normal link color */
	--color-link-hover: var(--color-accent-hover); /* link hover/highlight color */

	/* Type sizes preserved from the original theme. */
	--fs-base: 14px;
	--fs-post-title: 28px;
	--fs-nav: 12px;
	--fs-meta: 11px;
	--fs-widget-title: 10px;
	--fs-h1: 28px;
	--fs-h2: 22px;
	--fs-h3: 22px;
	--fs-h4: 19px;
	--fs-h5: 18px;
	--fs-h6: 17px;
	--fs-title: clamp(2.5rem, 6vw, 4rem);
	--fs-blog: var(--fs-base);
	--fs-page: var(--fs-base);
	--fs-carousel-title: 22px;
	--fs-carousel-caption: 16px;
	--fs-post-date: var(--fs-meta);
	--fs-pagination: var(--fs-base);
	--fs-header-menu: var(--fs-nav);
	--fs-dropdown-menu: var(--fs-nav);
	--fs-footer-menu: var(--fs-base);
	--fs-link: inherit; /* content links follow surrounding size unless set */

	--container: 1200px;
	--content-gap: 3rem;
	--sidebar-width: 320px;
	--radius: 4px;
	/* Single shadow used everywhere a shadow is shown (matches the pagination
	   Previous/Next buttons). --shadow-img points here so images share it too. */
	--shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
	--shadow-img: var(--shadow);
}

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

body {
	margin: 0;
	font-family: var(--font-body);
	font-style: var(--fstyle-body);
	font-size: var(--fs-base);
	font-weight: 400;
	line-height: 1.6;
	color: var(--color-text);
	background: var(--color-bg);
	overflow-x: clip; /* clip stray horizontal overflow without breaking position: sticky */
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
	font-weight: 400;
	line-height: 1.25;
	margin: 0 0 0.5em;
}

/* Each level pulls its own font/style/colour/size so H1–H6 are independently
   customisable. These govern content headings too (previously .entry-content
   hN hardcoded fixed sizes, which made the size controls appear to do nothing). */
h1 { font-family: var(--font-h1); font-style: var(--fstyle-h1); color: var(--color-h1); font-size: var(--fs-h1); }
h2 { font-family: var(--font-h2); font-style: var(--fstyle-h2); color: var(--color-h2); font-size: var(--fs-h2); }
h3 { font-family: var(--font-h3); font-style: var(--fstyle-h3); color: var(--color-h3); font-size: var(--fs-h3); }
h4 { font-family: var(--font-h4); font-style: var(--fstyle-h4); color: var(--color-h4); font-size: var(--fs-h4); }
h5 { font-family: var(--font-h5); font-style: var(--fstyle-h5); color: var(--color-h5); font-size: var(--fs-h5); }
h6 { font-family: var(--font-h6); font-style: var(--fstyle-h6); color: var(--color-h6); font-size: var(--fs-h6); }

/* Per-context reading typography (Customizer "Blog post text" / "Page article
   text" targets). Defaults inherit the body family/size/color, so appearance is
   unchanged until overridden. Headings inside content keep their own sizes. */
.single-post .entry-content,
.blog .entry-content,
.archive .entry-content,
.search .entry-content,
.entry-summary {
	font-family: var(--font-blog);
	font-style: var(--fstyle-blog);
	font-size: var(--fs-blog);
	color: var(--color-blog);
}

.page .entry-content {
	font-family: var(--font-page);
	font-style: var(--fstyle-page);
	font-size: var(--fs-page);
	color: var(--color-page);
}

blockquote {
	margin: 0 0 1.5rem;
	padding-left: 1rem;
	border-left: 3px solid var(--color-accent);
}

blockquote p {
	color: #111;
	font-size: 16px;
	font-style: italic;
	line-height: 1.6;
}

a {
	color: var(--color-link);
	font-family: var(--font-link);
	font-style: var(--fstyle-link);
	font-size: var(--fs-link);
	text-decoration: none;
	transition: color 0.2s linear;
}

/* The highlight color appears on hover/focus only. */
a:hover,
a:focus {
	color: var(--color-link-hover);
	text-decoration: none;
}

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

figure {
	margin: 0 0 1.5rem;
}

/* =========================================================================
   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;
}

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 100000;
	background: #fff;
	padding: 0.75rem 1rem;
	border-radius: 0 0 var(--radius) 0;
}

.skip-link:focus {
	left: 0;
}

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

/* =========================================================================
   Layout
   ========================================================================= */
.container {
	width: 100%;
	max-width: var(--container);
	margin: 0 auto;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
}

.site-content {
	padding: 2.5rem 0 3.5rem;
}

.content-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--content-gap);
}

@media (min-width: 900px) {
	body.has-sidebar .content-row {
		grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
	}

	body.sidebar-left .content-area {
		order: 2;
	}

	body.sidebar-left #secondary {
		order: 1;
	}
}

/* Sidebar widgets are desktop-only; hide them once the layout collapses to a
   single column (below the 900px sidebar breakpoint). */
@media (max-width: 899px) {
	#secondary.site-sidebar {
		display: none;
	}
}

/* =========================================================================
   Header & navigation
   ========================================================================= */
.site-top {
	position: sticky;
	top: 0;
	z-index: 1000;
	border-bottom: 1px solid var(--color-border);
	background: var(--color-navbar-bg);
	transition: background 0.3s ease, box-shadow 0.3s ease,
		backdrop-filter 0.3s ease, border-color 0.3s ease;
}

/* Once the page is scrolled, the bar turns into a translucent frosted-glass
   strip (added by theme.js). */
.site-top.is-stuck {
	background: rgba(240, 240, 240, 0.72);
	-webkit-backdrop-filter: saturate(180%) blur(12px);
	backdrop-filter: saturate(180%) blur(12px);
	border-bottom-color: rgba(0, 0, 0, 0.08);
	box-shadow: var(--shadow);
}

.site-top-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 56px;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 1.25rem;
}

.main-navigation a {
	color: var(--color-header-menu);
	font-family: var(--font-header-menu);
	font-style: var(--fstyle-header-menu);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-size: var(--fs-header-menu);
	font-weight: 700;
	/* Use the font's real bold face but never synthesise one: a single-weight
	   custom nav font would otherwise get faux-bolded into thick, smeared
	   strokes (same guard as the site title). */
	font-synthesis: none;
	display: block;
	padding: 0.5rem 0;
}

/* Hover/focus uses the shared link hover color. The current menu item is left
   to the base rule above so it keeps the header menu color (follows the
   Header menu color setting rather than a fixed accent). */
.main-navigation a:hover,
.main-navigation a:focus {
	color: var(--color-link-hover);
}

.main-navigation li {
	position: relative;
}

/* Dropdown sub-menus (desktop): present in the DOM but hidden until the parent
   item is hovered or a descendant receives keyboard focus. */
.main-navigation .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 999;
	/* Shrink to the widest item so the longest label has equal side padding
	   (the 1.1rem on .sub-menu a) rather than a fixed, oversized box. */
	min-width: max-content;
	margin: 0.4rem 0 0;
	padding: 0.35rem 0;
	flex-direction: column;
	gap: 0;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 10px;
	box-shadow: var(--shadow);
	transform-origin: top center;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px) scaleY(0.96);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

/* Invisible bridge spanning the 0.4rem gap between a parent item and its
   dropdown. Without it the pointer crosses a dead strip (the margin) that
   belongs to neither element, dropping :hover and causing the flicker/close.
   The pseudo-element is part of the sub-menu, so hovering it keeps the parent
   item hovered and the menu open. */
.main-navigation .sub-menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -0.4rem;
	height: 0.4rem;
}

.main-navigation .menu-item-has-children > a {
	display: flex;
	align-items: center;
	gap: 0.3em;
}

/* Caret to signal an expandable item. */
.main-navigation .menu-item-has-children > a::after {
	content: "";
	flex: none;
	width: 0;
	height: 0;
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 5px solid currentColor;
	transition: transform 0.2s ease;
}

/* Caret toggle button (injected by JS for touch/mobile) is hidden on desktop,
   where sub-menus open on hover/focus. */
.sub-menu-toggle {
	display: none;
}

.main-navigation .menu-item-has-children:hover > .sub-menu,
.main-navigation .menu-item-has-children:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scaleY(1);
}

.main-navigation .sub-menu li {
	border: 0;
}

.main-navigation .sub-menu a {
	padding: 0.3rem 1.1rem;
	text-transform: none;
	letter-spacing: 0;
	font-weight: 400;
	white-space: nowrap;
	/* Dropdown items have their own typography target, separate from the
	   top-level header menu. Defaults resolve to the header-menu look. */
	font-family: var(--font-dropdown-menu);
	font-style: var(--fstyle-dropdown-menu);
	font-size: var(--fs-dropdown-menu);
	color: var(--color-dropdown-menu);
}

.main-navigation .sub-menu a:hover,
.main-navigation .sub-menu a:focus {
	color: var(--color-link-hover);
}

/* Second-level items fly out to the side. */
.main-navigation .sub-menu .sub-menu {
	top: 0;
	left: 100%;
}

.menu-toggle {
	display: none;
	background: none;
	border: 0;
	padding: 0.5rem;
	cursor: pointer;
}

.menu-toggle-bar,
.menu-toggle-bar::before,
.menu-toggle-bar::after {
	display: block;
	width: 30px;
	height: 3px;
	background: var(--color-text);
	position: relative;
}

.menu-toggle-bar::before,
.menu-toggle-bar::after {
	content: "";
	position: absolute;
	left: 0;
}

.menu-toggle-bar::before { top: -9px; }
.menu-toggle-bar::after { top: 9px; }

/* Header search: a magnifying-glass button that reveals a floating search
   field. The field is absolutely positioned so opening it never shifts the
   layout, and it keeps whatever was typed because JS only toggles a class. */
.header-search {
	position: relative;
}

.header-search .search-form {
	display: flex;
	align-items: center;
}

/* Icon-only toggle/submit button. Scoped selector beats the generic
   button/.search-submit styling regardless of source order. */
.header-search .search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: var(--radius);
	/* Match the hamburger bars, which use --color-text (the glass SVG inherits
	   this via currentColor). Previously --color-navbar-text made it a different
	   shade from the hamburger. */
	color: var(--color-text);
	cursor: pointer;
}

.header-search .search-submit:hover,
.header-search .search-submit:focus {
	background: none;
	color: var(--color-link-hover);
}

.header-search .search-submit svg {
	display: block;
	width: 26px;
	height: 26px;
}

/* Floating field: hidden until .header-search.is-open, sitting beside the
   glass and vertically centred on it. Opens to the LEFT of the glass by
   default (the desktop glass sits at the far right, so opening rightward would
   overflow); the mobile query flips it to the right. Shadow matches the
   blog-preview image depth. */
.header-search .search-field {
	position: absolute;
	top: 50%;
	right: calc(100% + 0.4rem);
	left: auto;
	z-index: 1000;
	width: 240px;
	max-width: 60vw;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-img);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-50%) translateX(6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.header-search.is-open .search-field {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%);
}

/* Focus highlight on the open search field uses the link hover color. */
.header-search .search-field:focus,
.header-search .search-field:focus-visible {
	outline: 2px solid var(--color-link-hover);
	outline-offset: 2px;
}

.site-branding {
	text-align: center;
	padding: 2.5rem 1.25rem 2rem;
}

.site-title {
	font-family: var(--font-title);
	font-style: var(--fstyle-title);
	font-weight: 700;
	/* Use a font's real 700 face (e.g. Dancing Script) but never fake one: a
	   single-weight upload like Alison would otherwise get synthesised bold,
	   which looks like grossly thickened strokes when the title is scaled up. */
	font-synthesis: none;
	font-size: var(--fs-title);
	line-height: 1.1;
	margin: 0;
	white-space: nowrap; /* keep the title on a single line */
}

.site-title a {
	color: var(--color-title);
	/* Inherit the title's own font/size (from .site-title) so the content-link
	   font/size selection (global `a` rule) never overrides the site title. */
	font-family: inherit;
	font-size: inherit;
	text-decoration: none;
}

/* The site title takes the link hover color on hover, like other links. */
.site-title a:hover,
.site-title a:focus {
	color: var(--color-link-hover);
}

.custom-logo-link {
	display: inline-block;
}

.site-description {
	color: var(--color-muted);
	margin: 0.5rem 0 0;
	font-style: italic;
}

@media (max-width: 899px) {
	/* Single row: [search — left] [hamburger — right].
	   Padding gives visible gray space above and below the row.
	   Nav wraps to its own row below when opened. */
	.site-top-inner {
		flex-wrap: wrap;
		/* The collapsed nav wraps to a second flex line. The base `gap: 1rem`
		   would otherwise add a 1rem row-gap of empty gray *below* the icon row,
		   pushing the icons above centre — so zero the row-gap here and let the
		   content (not a forced min-height) set the bar height. Horizontal
		   spacing is handled by justify-content/order, so column-gap can stay. */
		align-content: center;
		min-height: auto;
		row-gap: 0;
		/* Vertical breathing room only — keep the container's horizontal
		   padding so the nav lines up with the blog content below. */
		padding-top: 0.4rem;
		padding-bottom: 0.4rem;
	}

	/* Glass button sits at the top-left of the row. */
	.header-search {
		order: 1;
		flex: 0 0 auto;
	}

	/* Field opens to the right of the top-left glass here. */
	.header-search .search-field {
		right: auto;
		left: calc(100% + 0.4rem);
		transform: translateY(-50%) translateX(-6px);
	}

	/* Hamburger sits on the right end of the same row. */
	.menu-toggle {
		display: inline-flex;
		align-items: center;
		order: 2;
		flex-shrink: 0;
	}

	/* Nav panel drops below the row, full width. */
	.main-navigation {
		flex-basis: 100%;
		order: 3;
	}

	/* Only the direct top-level <ul> toggles with the hamburger.
	   Sub-menus are controlled independently below. */
	.main-navigation > ul {
		display: none;
		flex-direction: column;
		gap: 0;
		padding: 0.5rem 0;
	}

	.main-navigation.is-open > ul {
		display: flex;
	}

	.main-navigation li {
		border-top: 1px solid var(--color-border);
	}

	/* Parent items: flex row with the text link on the left (taps → navigate)
	   and the caret toggle on the right (taps → open/close). The sub-menu wraps
	   onto its own line beneath them. */
	.main-navigation .menu-item-has-children {
		display: flex;
		flex-wrap: wrap;
		align-items: center;
	}

	/* Text link fills the row so the whole word area navigates to the page. */
	.main-navigation .menu-item-has-children > a {
		flex: 1;
	}

	/* The button carries the caret on mobile, so drop the link's own indicator. */
	.main-navigation .menu-item-has-children > a::after {
		display: none;
	}

	/* Slim caret toggle: just the triangle with a comfortable tap area — no box,
	   border or background, so it isn't bulky. */
	.sub-menu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: none;
		align-self: stretch;
		width: 44px;
		padding: 0;
		background: none;
		border: 0;
		color: var(--color-navbar-text);
		cursor: pointer;
	}

	.sub-menu-toggle-icon {
		display: block;
		width: 0;
		height: 0;
		border-left: 5px solid transparent;
		border-right: 5px solid transparent;
		border-top: 6px solid currentColor;
		transition: transform 0.2s ease;
	}

	.menu-item-has-children.is-open > .sub-menu-toggle .sub-menu-toggle-icon {
		transform: rotate(180deg);
	}

	/* Sub-menus: hidden by default; take the full width of the flex parent when
	   they become visible so they span the whole row beneath the link. */
	.main-navigation .sub-menu {
		display: none;
		flex-basis: 100%;
		flex-direction: column;
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		min-width: 0;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 0;
		box-shadow: none;
		background: transparent;
	}

	/* No hover bridge on mobile: sub-menus are static (no gap) and open on tap,
	   so the desktop bridge would only overlap the parent link. */
	.main-navigation .sub-menu::before {
		content: none;
	}

	/* Revealed when the parent <li> is toggled open by JS. */
	.main-navigation .menu-item-has-children.is-open > .sub-menu {
		display: flex;
	}

	.main-navigation .sub-menu a {
		padding-left: 2rem;
	}

	/* Nested sub-sub-menus indent further. */
	.main-navigation .sub-menu .sub-menu a {
		padding-left: 3rem;
	}

}

/* =========================================================================
   Entries
   ========================================================================= */
.entry {
	margin: 0 0 3rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid var(--color-border);
}

.entry-title {
	font-size: var(--fs-post-title);
	margin: 0.5rem 0;
}

/* The single post / page title is an <h1>, tied to the H1 heading target for
   size and colour (font/style already come from the base h1 rule). */
h1.entry-title {
	font-size: var(--fs-h1);
	color: var(--color-h1);
}

.entry-title a {
	color: var(--color-heading);
}

.entry-title a:hover,
.entry-title a:focus {
	color: var(--color-link-hover);
}

/* The post meta line (author byline + date, shown above the image on the
   blog/classic layout) is governed by the "Post date (above image)" target.
   Defaults resolve to the previous muted/meta look, so appearance is unchanged
   until the target is customised. */
.entry-meta {
	font-family: var(--font-post-date);
	font-style: var(--fstyle-post-date);
	font-size: var(--fs-post-date);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-post-date);
}

.entry-footer {
	font-size: var(--fs-meta);
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--color-muted);
}

/* Author-name link in the meta line: force it onto the Post date target too, so
   "By <author>" matches the surrounding byline instead of the content-link font
   ( a { font-family: var(--font-link) } would otherwise win over inheritance ). */
.entry-meta a {
	font-family: var(--font-post-date);
	font-style: var(--fstyle-post-date);
	font-size: var(--fs-post-date);
	color: var(--color-post-date);
}

.entry-footer a {
	color: var(--color-muted);
}

.entry-meta a:hover,
.entry-footer a:hover {
	color: var(--color-link-hover);
}

.entry-meta .byline,
.entry-meta .posted-on {
	margin-right: 0.75rem;
}

/* Author byline in natural case (e.g. "By Shebo Kusiyo"), not all caps. */
.entry-meta .byline {
	text-transform: none;
}

.entry-footer span {
	margin-right: 1rem;
}

.post-thumbnail {
	display: block;
	margin-bottom: 1.25rem;
	overflow: hidden; /* clip the hover zoom within the frame */
	border-radius: var(--radius);
	box-shadow: var(--shadow-img);
}

.post-thumbnail img {
	width: 100%;
	display: block;
	border-radius: var(--radius);
	transition: transform 0.3s ease;
}

/* Subtle zoom-in on hover/focus, matching the featured carousel. */
.post-thumbnail:hover img,
.post-thumbnail:focus-visible img {
	transform: scale(1.04);
}

/* Tie the image and title together like the carousel card (one shared link):
   hovering either the picture or the title triggers both the zoom and the
   title-colour change.

   Grid cards are compact (just picture + title), so the whole card is the
   hover group. This also bridges the gap between the two: a child's own
   :hover stops at its box, but the container's :hover covers the space
   between its children, so moving across the gap never drops the effect. */
.grid-item:hover .post-thumbnail img {
	transform: scale(1.04);
}

.grid-item:hover .entry-title a {
	color: var(--color-link-hover);
}

/* Taller listings (excerpt / standard) link the picture and title via :has()
   without pulling in the excerpt or footer below. */
.entry:not(.grid-item):has(.post-thumbnail:hover) .post-thumbnail img,
.entry:not(.grid-item):has(.entry-title a:hover) .post-thumbnail img {
	transform: scale(1.04);
}

.entry:not(.grid-item):has(.post-thumbnail:hover) .entry-title a,
.entry:not(.grid-item):has(.entry-title a:hover) .entry-title a {
	color: var(--color-link-hover);
}

@media (prefers-reduced-motion: reduce) {
	.post-thumbnail img {
		transition: none;
	}
	.post-thumbnail:hover img,
	.post-thumbnail:focus-visible img,
	.grid-item:hover .post-thumbnail img,
	.entry:not(.grid-item):has(.post-thumbnail:hover) .post-thumbnail img,
	.entry:not(.grid-item):has(.entry-title a:hover) .post-thumbnail img {
		transform: none;
	}
}

/* Images placed inside post/page content get the same featured-style treatment
   as the thumbnails: rounded corners, image-depth shadow and a subtle hover
   zoom. Applies to both single posts and pages (both wrap the body in
   .entry-content). */
.entry-content img {
	border-radius: var(--radius);
	box-shadow: var(--shadow-img);
	transition: transform 0.3s ease;
}

/* Block-editor images are wrapped in <figure>; use it as the frame so the hover
   zoom is clipped to the image bounds, exactly like the thumbnails. The figure
   carries the rounding/shadow and the inner image's own shadow is hidden by the
   clip, so there's no doubling. */
.entry-content figure {
	overflow: hidden;
	border-radius: var(--radius);
	box-shadow: var(--shadow-img);
}

.entry-content figure img {
	display: block;
}

.entry-content figure:hover img,
.entry-content img:hover,
.entry-content a:hover img {
	transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
	.entry-content img {
		transition: none;
	}
	.entry-content figure:hover img,
	.entry-content img:hover,
	.entry-content a:hover img {
		transform: none;
	}
}


.page-header {
	margin-bottom: 2rem;
}

.page-title {
	font-size: 2rem;
}

/* Pagination & post navigation */
.pagination,
.post-navigation,
.comment-navigation {
	margin: 2rem 0;
}

/* Redesigned pagination: fixed Previous / Next buttons flanking a swipable,
   snap-to-number strip that always shows exactly three page numbers. */
.fireborn-pagination {
	font-family: var(--font-pagination);
	font-style: var(--fstyle-pagination);
	font-size: var(--fs-pagination);
	color: var(--color-pagination);
}

.fireborn-pagination-inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0 auto;
	width: max-content;
	max-width: 100%;
}

/* Prev/Next stay put outside the scroller: reduced height, drop shadow. */
.fireborn-pagination .prev.page-numbers,
.fireborn-pagination .next.page-numbers {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	padding: 0.3rem 0.9rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	background: var(--color-bg, #fff);
	color: var(--color-pagination);
	text-decoration: none;
	white-space: nowrap;
	box-shadow: var(--shadow);
}

.fireborn-pagination .prev.page-numbers.is-disabled,
.fireborn-pagination .next.page-numbers.is-disabled {
	opacity: 0.4;
	box-shadow: none;
	pointer-events: none;
}

/* Prev/Next buttons and page-number links take the link hover color on hover. */
.fireborn-pagination a.page-numbers:hover,
.fireborn-pagination a.page-numbers:focus {
	color: var(--color-link-hover);
}

/* The swipable strip. Three uniform cells wide; scroll-snap keeps it resting on
   whole numbers so one is never left half-visible. */
.fireborn-pagination-track {
	flex: 0 0 auto;
	width: calc(3 * 2.75rem);
	display: flex;
	align-items: center;
	overflow-x: auto;
	/* overflow-x:auto forces overflow-y to compute to auto as well, so the strip
	   clips vertically too. Symmetric top/bottom padding keeps the cells on the
	   track's centerline (level with Prev/Next) while leaving room for the active
	   pill's shadow (0 3px 6px) so it isn't cut off. */
	padding: 10px 0;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	cursor: grab;
}

.fireborn-pagination-track::-webkit-scrollbar {
	display: none;
}

.fireborn-pagination-track.is-dragging {
	cursor: grabbing;
	scroll-behavior: auto;
	scroll-snap-type: none;
	user-select: none;
}

.fireborn-pagination-track .page-numbers {
	flex: 0 0 calc(100% / 3);
	scroll-snap-align: center;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	/* Same vertical box model as the Prev/Next buttons (padding + 1px border) so
	   the active pill lands at exactly their height. Border is transparent on
	   non-active cells and colored on .current below. */
	padding: 0.3rem 0;
	border: 1px solid transparent;
	border-radius: var(--radius);
	color: var(--color-pagination);
	text-decoration: none;
}

/* Active page: subtle surface highlight matching the Previous/Next buttons
   (bordered white pill) rather than a solid accent fill. */
.fireborn-pagination-track .page-numbers.current {
	background: var(--color-bg, #fff);
	border: 1px solid var(--color-border);
	box-shadow: var(--shadow);
	color: var(--color-pagination);
	font-weight: 600;
}

.fireborn-pagination-track .page-numbers.dots {
	cursor: default;
}

@media (prefers-reduced-motion: reduce) {
	.fireborn-pagination-track {
		scroll-behavior: auto;
	}
}

/* Single-post Previous / Next links get the same button treatment as the
   pagination controls: reduced height with a drop shadow underneath. */
.post-navigation .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.5rem;
}

.post-navigation .nav-next {
	margin-left: auto;
}

.post-navigation .nav-previous a,
.post-navigation .nav-next a {
	/* Shrink-wrap the text so the button is sized by its content, with the
	   horizontal padding equal on both sides. */
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: fit-content;
	max-width: 100%;
	padding: 0.3rem 0.9rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	background: var(--color-bg, #fff);
	color: var(--color-text);
	text-align: center;
	text-decoration: none;
	box-shadow: var(--shadow);
}

.post-navigation .nav-subtitle {
	display: block;
	font-size: var(--fs-nav);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	opacity: 0.7;
}

.post-navigation .nav-title {
	display: block;
	/* Break long titles across similarly sized lines instead of leaving a
	   single stray word on the last line. */
	max-width: 20ch;
	text-wrap: balance;
}

/* =========================================================================
   Widgets & sidebar
   ========================================================================= */
.widget {
	margin: 0 0 2rem;
}

.widget-title {
	font-family: var(--font-body);
	font-style: normal;
	font-weight: 700;
	font-size: var(--fs-widget-title);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--color-heading);
	border-bottom: 2px solid var(--color-accent);
	display: inline-block;
	padding-bottom: 0.25rem;
	margin-bottom: 1rem;
}

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

.widget li {
	padding: 0.35rem 0;
	border-bottom: 1px solid var(--color-border);
}

.after-post-widgets,
.header-1-widgets {
	margin: 2rem 0;
	text-align: center;
}

.ad-area {
	text-align: center;
	padding: 1rem 0;
}

/* =========================================================================
   Footer
   ========================================================================= */
.site-footer {
	background: var(--color-surface);
	margin-top: 3rem;
	/* Divider sits at the very top of the grey area so the background begins at
	   the line and does not bleed up into the (white) page above. */
	border-top: 1px solid var(--color-border);
	/* No top padding — the grey must start at the border line. Bottom padding
	   clears the fixed Complianz "Manage consent" button (height 50px) so it
	   never overlaps the footer links when fully expanded. */
	padding: 0 0 3.5rem;
}

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

/* Footer bottom is centred and stacked at every width. The divider line now
   lives on .site-footer (full width, at the top of the grey area). */
.footer-bottom {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	gap: 1rem;
	padding-top: 2rem;
	font-size: 0.9rem;
	color: var(--color-muted);
}

.site-info {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	/* One shared line-height for the copyright and every link line, so all
	   rows have identical height. */
	line-height: 1.5;
}

/* The copyright / credit line sits in .site-info alongside the footer menu, so
   it follows the same "Footer menu" typography target. Defaults resolve to the
   body font, so appearance is unchanged until the target is customised. The
   link selector guards the site-name link against the content-link overrides. */
.site-info,
.site-info a {
	font-family: var(--font-footer-menu);
	font-style: var(--fstyle-footer-menu);
	font-size: var(--fs-footer-menu);
	color: var(--color-footer-menu);
}

/* Footer menu: full-width flex that wraps items onto centred lines. The gap
   ABOVE the menu (margin-top) and the gap BETWEEN link lines (row-gap) use the
   SAME value, so the copyright line and both link lines are evenly spaced.
   Change this one number to tighten/loosen all of them. */
.footer-menu {
	list-style: none;
	padding: 0;
	display: flex;
	width: 100%;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0.35rem 0 0;
	row-gap: 0.35rem;
	column-gap: 0;
}

.footer-menu li {
	margin: 0 0.4rem;
	line-height: inherit;
	/* Never let a multi-word item wrap inside itself — that would make its line
	   taller than the others and throw off the vertical rhythm. Items wrap only
	   between each other, so every line is the same height. */
	white-space: nowrap;
}

.footer-menu a {
	font-family: var(--font-footer-menu);
	font-style: var(--fstyle-footer-menu);
	font-size: var(--fs-footer-menu);
	color: var(--color-footer-menu);
}

/* Keep the hover on the shared link hover color (the base .footer-menu a rule
   would otherwise win over the global a:hover at equal specificity). */
.footer-menu a:hover,
.footer-menu a:focus {
	color: var(--color-link-hover);
}

/* =========================================================================
   Social links
   ========================================================================= */
.social-links ul {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
	padding: 0;
}

.social-links a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: var(--color-text);
	color: #fff;
	transition: background-color 0.2s ease;
}

.social-links a:hover,
.social-links a:focus {
	background: var(--color-link-hover);
}

.social-icon {
	fill: currentColor;
}

/* =========================================================================
   Forms & buttons
   ========================================================================= */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="password"],
textarea {
	width: 100%;
	max-width: 100%;
	padding: 0.6rem 0.75rem;
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	font: inherit;
	background: #fff;
	color: var(--color-text);
}

button,
.search-submit,
input[type="submit"] {
	font: inherit;
	cursor: pointer;
	border: 0;
	border-radius: var(--radius);
	background: var(--color-button);
	color: #fff;
	padding: 0.6rem 1.1rem;
}

button:hover,
.search-submit:hover {
	opacity: 0.9;
}


/* =========================================================================
   Comments
   ========================================================================= */
.comments-area {
	margin-top: 3rem;
}

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

.comment-list .children {
	list-style: none;
	margin-left: 1.5rem;
}

.comment-body {
	padding: 1rem 0;
	border-bottom: 1px solid var(--color-border);
}

/* =========================================================================
   Back to top
   ========================================================================= */
.back-to-top {
	position: fixed;
	left: 1.25rem;
	bottom: 1.25rem;
	width: 44px;
	height: 44px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	/* Same subtle surface treatment as the pagination Previous/Next buttons
	   (bordered white pill) rather than the filled accent button default. */
	border: 1px solid var(--color-border);
	border-radius: 50%;
	background: var(--color-bg, #fff);
	color: var(--color-text);
	box-shadow: var(--shadow);
	z-index: 1000;
}

.back-to-top[hidden] {
	display: none;
}

.back-to-top svg {
	fill: none;
	stroke: currentColor;
}

/* =========================================================================
   Blog layouts: Grid, Featured+grid (Kensington), Mosaic
   ========================================================================= */

/* Grid ---------------------------------------------------------------- */
.posts-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 2rem;
	margin-bottom: 2rem;
}

.grid-item {
	margin: 0;
	padding: 0;
	border: 0;
	/* Anchor the stretched-link overlay below. */
	position: relative;
}

/* Make the whole grid card behave like one link. The title's <a> is stretched
   over the entire card with a ::after overlay, so the pointer cursor and the
   click target cover the picture, the title and the gap between them — no
   arrow-cursor dead zone. The picture's own <a> is aria-hidden and sits under
   the overlay; clicks land on the title link (same URL). */
.grid-item .entry-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.grid-item .post-thumbnail {
	margin-bottom: 0.75rem;
}

.grid-item .post-thumbnail img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--radius);
}

/* Grid-layout card titles have their own "Grid title" typography target. */
.grid-item .entry-title {
	font-family: var(--font-grid-title);
	font-style: var(--fstyle-grid-title);
	font-size: var(--fs-grid-title);
	margin: 0.25rem 0;
}

.grid-item .entry-title a {
	font-family: var(--font-grid-title);
	font-style: var(--fstyle-grid-title);
	font-size: var(--fs-grid-title);
	color: var(--color-grid-title);
}

/* Date sits above the picture, centred, with a horizontal rule filling the
   space on each side. The rules are the flex container's pseudo-elements, so
   align-items:center keeps them level with the middle of the date text. Shared
   by the grid card (content-grid.php) and the excerpt layout (content.php). */
.entry-date-divider {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0 0 0.5rem;
}

.entry-date-divider::before,
.entry-date-divider::after {
	content: "";
	flex: 1 1 0;
	height: 1px;
	background: var(--color-border);
}

.entry-date-divider .entry-date {
	white-space: nowrap;
	font-family: var(--font-post-date);
	font-style: var(--fstyle-post-date);
	font-size: var(--fs-post-date);
	color: var(--color-post-date);
}

/* Mosaic (CSS-columns masonry, no JS) --------------------------------- */
.posts-mosaic {
	column-count: 3;
	column-gap: 1rem;
	margin-bottom: 2rem;
}

.mosaic-item {
	break-inside: avoid;
	margin: 0 0 1rem;
	padding: 0;
	border: 0;
}

.mosaic-link {
	position: relative;
	display: block;
	border-radius: var(--radius);
	overflow: hidden;
	box-shadow: var(--shadow-img);
}

.mosaic-link img {
	width: 100%;
	display: block;
	transition: transform 0.3s ease;
}

/* Subtle zoom-in on hover/focus, matching the carousel and grid. */
.mosaic-link:hover img,
.mosaic-link:focus-visible img {
	transform: scale(1.04);
}

@media (prefers-reduced-motion: reduce) {
	.mosaic-link img {
		transition: none;
	}
	.mosaic-link:hover img,
	.mosaic-link:focus-visible img {
		transform: none;
	}
}

.mosaic-meta {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 1rem;
	text-align: center;
	background: rgba(255, 255, 255, 0.82);
	color: #000;
	opacity: 0;
	transition: opacity 0.25s ease;
}

.mosaic-link:hover .mosaic-meta,
.mosaic-link:focus .mosaic-meta,
.mosaic-link:focus-within .mosaic-meta {
	opacity: 1;
}

.mosaic-date {
	font-size: var(--fs-meta);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* The Mosaic overlay title has its own "Mosaic title" typography target. */
.mosaic-title {
	font-family: var(--font-mosaic-title);
	font-style: var(--fstyle-mosaic-title);
	font-size: var(--fs-mosaic-title);
	line-height: 1.2;
	color: var(--color-mosaic-title);
}

/* Items with no featured image still need to show their meta. */
.mosaic-item:not(:has(img)) .mosaic-link {
	background: var(--color-surface);
	padding: 2.5rem 1rem;
}

.mosaic-item:not(:has(img)) .mosaic-meta {
	position: static;
	opacity: 1;
	background: none;
}

@media (max-width: 1024px) {
	.posts-mosaic {
		column-count: 2;
	}
}

@media (max-width: 600px) {
	.posts-mosaic {
		column-count: 1;
	}
}

/* =========================================================================
   Alignments (block editor)
   ========================================================================= */
.alignleft {
	float: left;
	margin: 0 1.5rem 1rem 0;
}

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

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

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

.wp-caption-text,
.entry-content figcaption {
	font-size: 0.85rem;
	color: var(--color-muted);
	text-align: center;
}

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