/*
Theme Name: Ledger
Theme URI: https://example.com/ledger
Author: Your Studio
Author URI: https://example.com
Description: A premium editorial theme in oxblood and brass, built around a warm charcoal shell, Fraunces display type, and a light/dark content surface toggle. Adapted from the studio's internal dashboard design system.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
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: ledger
*/

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

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

body,
h1, h2, h3, h4, h5, h6,
p, ul, ol, li,
figure, blockquote, dl, dd {
	margin: 0;
}

ul[class], ol[class] {
	list-style: none;
	padding: 0;
}

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

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

button {
	cursor: pointer;
}

a {
	color: inherit;
	text-decoration: none;
}

table {
	border-collapse: collapse;
	width: 100%;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	width: 1px;
	overflow: hidden;
	position: absolute !important;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--lg-surface);
	color: var(--lg-ink);
	display: block;
	height: auto;
	width: auto;
	padding: 14px 20px;
	left: 6px;
	top: 6px;
	border-radius: var(--lg-radius-sm);
	z-index: 100000;
	box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

/* ===================================================================
   Design tokens

   The charcoal shell (header + footer) stays a constant deep charcoal
   in both modes, same as the dashboard's sidebar. Only the content
   surface swaps between the light and dark variable sets below.
   =================================================================== */
:root {
	--lg-primary: #7a2331;
	--lg-primary-dark: #5a1a24;
	--lg-primary-soft: #f1e4e0;
	--lg-brass: #b4915a;
	--lg-brass-soft: #dcc998;
	--lg-ink: #201c1a;
	--lg-muted: #7c736a;
	--lg-border: #e7dfd2;
	--lg-bg-soft: #f5f0e7;
	--lg-surface: #fffdf9;
	--lg-shell-1: #221c1d;
	--lg-shell-2: #120f10;
	--lg-success-bg: #ecfdf3;
	--lg-success-ink: #027a48;
	--lg-success-border: #abefc6;
	--lg-error-bg: #fef3f2;
	--lg-error-ink: #b42318;
	--lg-error-border: #fecdca;

	--lg-radius-lg: 18px;
	--lg-radius-md: 12px;
	--lg-radius-sm: 8px;

	--lg-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
	--lg-font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--lg-font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

	--lg-container: 1320px;

	/* Header/nav: unlike the old design, this now flips with the toggle
	   instead of staying a fixed dark shell year-round. */
	--lg-header-bg: #ffffff;
	--lg-header-ink: var(--lg-ink);
	--lg-header-muted: var(--lg-muted);
	--lg-header-border: var(--lg-border);
	--lg-header-hover-bg: rgba(32, 28, 26, 0.05);
	--lg-header-icon-btn-bg: rgba(32, 28, 26, 0.045);
	--lg-header-submenu-bg: #ffffff;

	/* Footer card: a warm glow card standing in for the old flat dark
	   shell, recolored per mode instead of a photographic gradient. */
	--lg-footer-card-bg: radial-gradient(130% 160% at 12% 0%, #ffffff 0%, #f6ece7 40%, #e7c9a8 100%);
	--lg-footer-card-ink: #201c1a;
	--lg-footer-card-muted: rgba(32, 28, 26, 0.62);
	--lg-footer-card-border: rgba(32, 28, 26, 0.14);
	--lg-footer-input-bg: rgba(32, 28, 26, 0.05);
}

html.lg-dark {
	--lg-ink: #f1eae0;
	--lg-muted: #a79c8d;
	--lg-border: #332c28;
	--lg-bg-soft: #221d1a;
	--lg-surface: #191512;
	--lg-primary-soft: #3a1e22;
	--lg-success-bg: #10251b;
	--lg-error-bg: #2a1414;

	--lg-header-bg: linear-gradient(165deg, var(--lg-shell-1) 0%, var(--lg-shell-2) 100%);
	--lg-header-ink: #f9f5ec;
	--lg-header-muted: #d8cfc2;
	--lg-header-border: rgba(180, 145, 90, 0.16);
	--lg-header-hover-bg: rgba(180, 145, 90, 0.14);
	--lg-header-icon-btn-bg: rgba(255, 255, 255, 0.05);
	--lg-header-submenu-bg: var(--lg-shell-1);

	--lg-footer-card-bg: radial-gradient(130% 160% at 12% 0%, #3a1e22 0%, #221a1c 45%, #120f10 100%);
	--lg-footer-card-ink: #f9f5ec;
	--lg-footer-card-muted: rgba(249, 245, 236, 0.62);
	--lg-footer-card-border: rgba(255, 255, 255, 0.14);
	--lg-footer-input-bg: rgba(255, 255, 255, 0.07);
}

/* ===================================================================
   Base typography
   =================================================================== */
body {
	font-family: var(--lg-font-body);
	font-size: 16px;
	line-height: 1.6;
	color: var(--lg-ink);
	background: var(--lg-bg-soft);
	-webkit-font-smoothing: antialiased;
	transition: background 0.25s ease, color 0.25s ease;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--lg-font-display);
	font-weight: 500;
	line-height: 1.25;
	color: var(--lg-ink);
}

h1 { font-size: 42px; font-weight: 400; }
h2 { font-size: 30px; }
h3 { font-size: 22px; }
h4 { font-size: 18px; }
h5, h6 { font-size: 15px; }

p { margin-bottom: 1.2em; }

a {
	transition: color 0.15s ease;
}

.entry-content a,
.widget a,
.comment-content a {
	color: var(--lg-primary);
	text-decoration: underline;
	text-decoration-color: var(--lg-brass-soft);
	text-underline-offset: 2px;
}

.entry-content a:hover,
.widget a:hover,
.comment-content a:hover {
	color: var(--lg-brass);
}

.entry-content blockquote {
	border-left: 3px solid var(--lg-primary);
	background: var(--lg-bg-soft);
	padding: 16px 22px;
	margin: 1.5em 0;
	font-family: var(--lg-font-display);
	font-size: 19px;
	font-style: italic;
	color: var(--lg-ink);
	border-radius: 0 var(--lg-radius-sm) var(--lg-radius-sm) 0;
}

.entry-content code,
.entry-content kbd,
.entry-content pre {
	font-family: var(--lg-font-mono);
	font-size: 0.85em;
	background: var(--lg-bg-soft);
	border-radius: 5px;
}

.entry-content code { padding: 2px 6px; }

.entry-content pre {
	padding: 18px 20px;
	overflow-x: auto;
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius-sm);
}

.entry-content pre code { background: none; padding: 0; }

.entry-content hr {
	border: none;
	border-top: 1px solid var(--lg-border);
	margin: 2.5em 0;
}

.entry-content img { border-radius: var(--lg-radius-md); }

.entry-content ul, .entry-content ol {
	margin: 0 0 1.2em;
	padding-left: 1.4em;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.4em; }

.entry-content table {
	margin: 1.5em 0;
	background: var(--lg-surface);
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius-sm);
	overflow: hidden;
}

.entry-content th, .entry-content td {
	text-align: left;
	padding: 12px 14px;
	border-bottom: 1px solid var(--lg-border);
	font-size: 14px;
}

.entry-content th {
	font-family: var(--lg-font-mono);
	color: var(--lg-muted);
	font-weight: 500;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	background: var(--lg-bg-soft);
}

/* ===================================================================
   Layout
   =================================================================== */
.lg-container {
	max-width: var(--lg-container);
	margin: 0 auto;
	padding: 0 24px;
}

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

.lg-main {
	flex: 1;
	padding: 56px 0 80px;
}

/* The nzi homepage's hero already has its own large top padding, and
   doesn't want the WP page-title block repeating "Homepage" above it —
   scoped to .home (added by body_class() only on the real front page) so
   every other page keeps its normal title and spacing. */
.home .lg-post-header {
	display: none;
}

.home .lg-entry {
	max-width: 1760px;
}

.home .lg-main {
	padding: 0px 0 80px;
}

/* ===================================================================
   Header / Nav shell
   =================================================================== */
.lg-header {
	position: relative;
	background: var(--lg-header-bg);
	box-shadow: 0 20px 40px -28px rgba(0, 0, 0, 0.35);
	transition: background 0.25s ease;
}

/* Slim attribution strip above the main nav row — no hard divider line,
   just a soft tonal shift down to the main row via its own bottom border. */
.lg-topbar {
	border-bottom: 1px solid var(--lg-header-border);
}

.lg-topbar-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	max-width: var(--lg-container);
	margin: 0 auto;
	padding: 7px 24px;
}

.lg-topbar-credit {
	font-family: var(--lg-font-mono);
	font-size: 10px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--lg-header-muted);
}

/* Dynamic login/account control, right side of the top bar */
.lg-account-menu {
	position: relative;
}

.lg-account-trigger {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-family: var(--lg-font-mono);
	font-size: 10px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--lg-brass);
	cursor: pointer;
}

.lg-account-avatar {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	flex-shrink: 0;
	border: 1px solid rgba(180, 145, 90, 0.4);
}

.lg-account-avatar-placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--lg-header-icon-btn-bg);
	color: var(--lg-brass);
}

.lg-account-avatar-placeholder svg {
	width: 12px;
	height: 12px;
	stroke: currentColor;
}

a.lg-account-trigger:hover {
	color: var(--lg-header-ink);
}

.lg-account-dropdown {
	display: none;
	position: absolute;
	top: 100%;
	right: 0;
	/* No margin-top gap: a gap here is a dead zone the cursor has to
	   cross without touching either element, which drops the :hover
	   before it reaches the dropdown. Padding-top fakes the same visual
	   spacing while keeping the box (and hover) unbroken. */
	margin-top: 0;
	padding-top: 10px;
	min-width: 130px;
	z-index: 20;
}

.lg-account-dropdown-inner {
	background: var(--lg-header-submenu-bg);
	border: 1px solid rgba(180, 145, 90, 0.2);
	border-radius: var(--lg-radius-sm);
	padding: 6px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.lg-account-menu:hover .lg-account-dropdown,
.lg-account-menu:focus-within .lg-account-dropdown {
	display: block;
}

.lg-account-dropdown a {
	display: block;
	padding: 8px 12px;
	border-radius: 6px;
	font-family: var(--lg-font-body);
	font-size: 13px;
	font-weight: 500;
	text-transform: none;
	letter-spacing: normal;
	color: var(--lg-header-muted);
}

.lg-account-dropdown a:hover {
	background: var(--lg-header-hover-bg);
	color: var(--lg-header-ink);
}

.lg-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	max-width: var(--lg-container);
	margin: 0 auto;
	padding: 14px 24px;
}

.lg-branding {
	display: flex;
	align-items: center;
	gap: 14px;
}

.lg-branding .custom-logo-link {
	display: flex;
	align-items: center;
}

.lg-branding img.custom-logo {
	max-height: 34px;
	width: auto;
	height: auto;
	border-radius: var(--lg-radius-sm);
}

.lg-site-title {
	font-family: var(--lg-font-display);
	font-size: 20px;
	font-weight: 500;
	color: var(--lg-header-ink);
	letter-spacing: 0.015em;
}

.lg-site-title a { color: inherit; }

.lg-site-description {
	font-family: var(--lg-font-mono);
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.1em;
	color: var(--lg-brass);
	display: block;
	margin-top: 3px;
}

.lg-header-controls .lg-nav-toggle {
	display: none;
	align-items: center;
	justify-content: center;
}

.lg-primary-nav {
	display: flex;
	align-items: center;
	gap: 4px;
}

.lg-primary-nav ul {
	display: flex;
	align-items: center;
	gap: 2px;
}

.lg-primary-nav li { position: relative; }

.lg-primary-nav a {
	display: inline-flex;
	align-items: center;
	padding: 9px 15px;
	border-radius: 7px;
	color: var(--lg-header-muted);
	font-size: 13.5px;
	font-weight: 500;
	letter-spacing: 0.01em;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.lg-primary-nav a:hover,
.lg-primary-nav .current-menu-item > a {
	background: var(--lg-header-hover-bg);
	color: var(--lg-header-ink);
	box-shadow: none;
}

.lg-primary-nav .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: var(--lg-header-submenu-bg);
	border: 1px solid rgba(180, 145, 90, 0.2);
	border-radius: var(--lg-radius-sm);
	padding: 6px;
	box-shadow: 0 20px 40px rgba(0,0,0,0.25);
	z-index: 10;
}

.lg-primary-nav li:hover > .sub-menu,
.lg-primary-nav li:focus-within > .sub-menu {
	display: block;
}

.lg-primary-nav .sub-menu a {
	display: block;
	box-shadow: none;
}

.lg-header-controls {
	display: flex;
	align-items: center;
	gap: 8px;
}

.lg-icon-btn {
	width: 34px;
	height: 34px;
	border-radius: 7px;
	border: 1px solid rgba(180, 145, 90, 0.3);
	background: var(--lg-header-icon-btn-bg);
	color: var(--lg-header-muted);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s ease, color 0.15s ease;
}

.lg-icon-btn:hover {
	background: rgba(180, 145, 90, 0.22);
	color: var(--lg-header-ink);
}

.lg-icon-btn svg {
	width: 17px;
	height: 17px;
	stroke: currentColor;
}

.lg-theme-toggle .lg-icon-moon { display: none; }
html.lg-dark .lg-theme-toggle .lg-icon-sun { display: none; }
html.lg-dark .lg-theme-toggle .lg-icon-moon { display: block; }

/* The header toggle is the single light/dark control site-wide; the
   dsw-dashboard plugin's own toggle is hidden and driven by theme.js
   instead (see ledgerSyncPluginDashboards), so the two never disagree. */
.dsw-dashboard .dsw-theme-toggle {
	display: none !important;
}

/* ===================================================================
   Buttons
   =================================================================== */
.lg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 24px;
	border-radius: 8px;
	border: 1px solid var(--lg-border);
	background: var(--lg-surface);
	color: var(--lg-ink);
	cursor: pointer;
	font-family: var(--lg-font-body);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	transition: background 0.15s ease, border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.lg-btn:hover { border-color: var(--lg-brass); background: var(--lg-bg-soft); color: var(--lg-ink); }
.lg-btn:active { transform: scale(0.97); }

.lg-btn-primary {
	background: var(--lg-primary);
	border-color: var(--lg-primary-dark);
	color: #f5efe2;
	box-shadow: 0 6px 16px -6px rgba(122, 35, 49, 0.5);
}

.lg-btn-primary:hover {
	background: var(--lg-primary-dark);
	border-color: var(--lg-primary-dark);
	color: #f5efe2;
}

.lg-btn-outline {
	background: transparent;
	border-color: var(--lg-brass);
	color: var(--lg-brass);
}

.lg-btn-outline:hover {
	background: var(--lg-brass-soft);
	color: var(--lg-ink);
}

.lg-btn-on-dark {
	background: rgba(255,255,255,0.06);
	border-color: rgba(180, 145, 90, 0.35);
	color: #f5efe2;
}

.lg-btn-on-dark:hover {
	background: rgba(180, 145, 90, 0.2);
}

/* ===================================================================
   Badges
   =================================================================== */
.lg-badge {
	display: inline-block;
	font-family: var(--lg-font-mono);
	font-size: 10px;
	font-weight: 500;
	padding: 4px 9px;
	border-radius: 4px;
	white-space: nowrap;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	border: 1px solid var(--lg-brass-soft);
	color: var(--lg-brass);
	background: transparent;
}

.lg-badge-muted {
	border-color: var(--lg-border);
	color: var(--lg-muted);
}

.lg-badge-accent {
	border-color: var(--lg-primary-soft);
	color: var(--lg-primary);
}

/* ===================================================================
   Hero
   =================================================================== */
.lg-hero {
	background: linear-gradient(160deg, var(--lg-shell-1) 0%, var(--lg-shell-2) 100%);
	color: #f5efe2;
	padding: 96px 0;
	text-align: center;
}

.lg-hero-eyebrow {
	display: inline-block;
	font-family: var(--lg-font-mono);
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.14em;
	color: var(--lg-brass);
	margin-bottom: 18px;
}

.lg-hero h1 {
	color: #f9f5ec;
	font-size: 52px;
	max-width: 780px;
	margin: 0 auto 20px;
}

.lg-hero p {
	color: rgba(245, 239, 226, 0.75);
	font-size: 18px;
	max-width: 600px;
	margin: 0 auto 34px;
}

.lg-hero-actions {
	display: flex;
	gap: 14px;
	justify-content: center;
	flex-wrap: wrap;
}

/* ===================================================================
   Stat tiles
   =================================================================== */
.lg-stats-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	margin: 0 auto;
	max-width: var(--lg-container);
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius-md);
	overflow: hidden;
	background: var(--lg-surface);
	transform: translateY(-40px);
	box-shadow: 0 24px 48px -24px rgba(0,0,0,0.25);
}

.lg-stat-tile {
	position: relative;
	background: var(--lg-surface);
	border-right: 1px solid var(--lg-border);
	padding: 26px 24px;
	transition: background 0.2s ease;
}

.lg-stat-tile:last-child { border-right: none; }

.lg-stat-tile::before {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--lg-brass), transparent);
}

.lg-stat-tile:hover { background: var(--lg-bg-soft); }

.lg-stat-value {
	font-family: var(--lg-font-display);
	font-size: 36px;
	font-weight: 400;
	line-height: 1;
	color: var(--lg-ink);
	margin-bottom: 8px;
}

.lg-stat-label {
	font-family: var(--lg-font-mono);
	color: var(--lg-muted);
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* ===================================================================
   Section headings
   =================================================================== */
.lg-section {
	padding: 64px 0;
}

.lg-section-head {
	max-width: 640px;
	margin: 0 auto 40px;
	text-align: center;
}

.lg-section-eyebrow {
	display: block;
	font-family: var(--lg-font-mono);
	font-size: 11px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: var(--lg-brass);
	margin-bottom: 10px;
}

.lg-section-head p { color: var(--lg-muted); margin-top: 12px; margin-bottom: 0; }

/* ===================================================================
   Features grid
   =================================================================== */
.lg-features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
}

.lg-feature-card {
	background: var(--lg-surface);
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius-md);
	padding: 32px 28px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.lg-feature-card:hover {
	border-color: var(--lg-brass);
	box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.2);
	transform: translateY(-3px);
}

.lg-feature-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: var(--lg-primary-soft);
	color: var(--lg-primary);
	margin-bottom: 20px;
	transition: background 0.2s ease, color 0.2s ease;
}

.lg-feature-card:hover .lg-feature-icon {
	background: var(--lg-primary);
	color: #f5efe2;
}

.lg-feature-icon svg {
	width: 22px;
	height: 22px;
	stroke: currentColor;
}

.lg-feature-card h3 {
	font-size: 18px;
	margin-bottom: 10px;
}

.lg-feature-card p {
	color: var(--lg-muted);
	font-size: 14px;
	margin-bottom: 0;
}

/* ===================================================================
   CTA band
   =================================================================== */
.lg-cta-band {
	background: linear-gradient(165deg, var(--lg-shell-1) 0%, var(--lg-shell-2) 100%);
	padding: 56px 0;
	margin: 16px 0;
}

.lg-cta-band-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.lg-cta-band h2 {
	color: #f9f5ec;
	font-size: 28px;
	margin-bottom: 8px;
}

.lg-cta-band p {
	color: rgba(245, 239, 226, 0.75);
	font-size: 15px;
	margin-bottom: 0;
	max-width: 480px;
}

@media (max-width: 640px) {
	.lg-cta-band-inner {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* ===================================================================
   Cards (services / posts)
   =================================================================== */
.lg-card-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 20px;
}

.lg-card {
	background: var(--lg-surface);
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius-md);
	padding: 26px;
	transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
	display: flex;
	flex-direction: column;
}

.lg-card:hover {
	border-color: var(--lg-brass);
	box-shadow: 0 18px 36px -18px rgba(0,0,0,0.2);
	transform: translateY(-3px);
}

.lg-card-thumb {
	border-radius: var(--lg-radius-sm);
	overflow: hidden;
	margin-bottom: 16px;
	aspect-ratio: 16/10;
}

.lg-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.lg-card-meta {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	flex-wrap: wrap;
}

.lg-card-meta .lg-mono {
	font-family: var(--lg-font-mono);
	font-size: 10.5px;
	color: var(--lg-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.lg-card-title {
	font-family: var(--lg-font-display);
	font-size: 20px;
	font-weight: 500;
	line-height: 1.3;
	margin-bottom: 10px;
}

.lg-card-title a:hover { color: var(--lg-primary); }

.lg-card-excerpt {
	color: var(--lg-muted);
	font-size: 14.5px;
	margin-bottom: 18px;
	flex: 1;
}

.lg-card-more {
	font-family: var(--lg-font-mono);
	font-size: 11.5px;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--lg-primary);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.lg-card-more:hover { color: var(--lg-brass); }

/* ===================================================================
   Single post
   =================================================================== */
.lg-post-header {
	max-width: 760px;
	margin: 0 auto 32px;
	text-align: center;
}

.lg-post-thumb {
	max-width: var(--lg-container);
	margin: 0 auto 40px;
	border-radius: var(--lg-radius-lg);
	overflow: hidden;
}

.lg-entry {
	max-width: 760px;
	margin: 0 auto;
}

@media (min-width: 560px) {
	.lg-entry {
		padding: 60px;
	}
}

/* The narrow reading width above is right for blog posts/pages, but the
   Demo Showcase plugin's dashboard/portal shortcodes need the full
   container to render as an actual dashboard rather than a squeezed
   column. Widen the entry automatically whenever it holds one of those
   panels, instead of hardcoding a list of page IDs/templates. */
.lg-entry:has(.dsw-dashboard),
.lg-entry:has(.dsw-portal) {
	max-width: none;
}

/* The login page's split card (form + image) wants more room than the
   760px reading column — just this page, not every .dsw-public form. */
.lg-entry:has(.dsw-login-page) {
	max-width: 960px;
}

.lg-post-meta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
	font-family: var(--lg-font-mono);
	font-size: 11.5px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--lg-muted);
	margin-bottom: 18px;
}

.lg-post-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 40px 0;
}

.lg-post-nav {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
	margin: 48px 0;
}

.lg-post-nav a {
	display: block;
	background: var(--lg-surface);
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius-md);
	padding: 18px 20px;
	transition: border-color 0.15s ease;
}

.lg-post-nav a:hover { border-color: var(--lg-brass); }

.lg-post-nav .lg-nav-dir {
	font-family: var(--lg-font-mono);
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--lg-brass);
	display: block;
	margin-bottom: 6px;
}

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

.lg-author-box {
	display: flex;
	gap: 16px;
	background: var(--lg-bg-soft);
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius-md);
	padding: 22px;
	margin: 40px 0;
}

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

.lg-author-box h3 { font-size: 15px; margin-bottom: 6px; }
.lg-author-box p { color: var(--lg-muted); font-size: 13.5px; margin-bottom: 0; }

/* ===================================================================
   Comments
   =================================================================== */
.lg-comments {
	max-width: 760px;
	margin: 56px auto 0;
}

.lg-comments-title { margin-bottom: 24px; }

.lg-comment-list { display: flex; flex-direction: column; gap: 14px; }
.lg-comment-list .children { margin-top: 14px; margin-left: 32px; display: flex; flex-direction: column; gap: 14px; }

.lg-comment-item {
	background: var(--lg-surface);
	border: 1px solid var(--lg-border);
	border-radius: var(--lg-radius-md);
	padding: 18px 20px;
}

.lg-comment-author {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.lg-comment-author img { width: 34px; height: 34px; border-radius: 50%; }
.lg-comment-author cite { font-style: normal; font-weight: 600; font-size: 14px; }

.lg-comment-date {
	font-family: var(--lg-font-mono);
	font-size: 10.5px;
	color: var(--lg-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.lg-comment-reply a {
	font-size: 12px;
	font-weight: 600;
	color: var(--lg-primary);
}

/* ===================================================================
   Forms (comment form, search form, widgets)
   =================================================================== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
select,
textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--lg-border);
	border-radius: 7px;
	font-family: var(--lg-font-body);
	font-size: 14px;
	background: var(--lg-surface);
	color: var(--lg-ink);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus, select:focus, textarea:focus {
	outline: none;
	border-color: var(--lg-brass);
	box-shadow: 0 0 0 3px rgba(180, 145, 90, 0.16);
}

.comment-form p { margin-bottom: 16px; }

.comment-form label {
	display: inline-block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 6px;
}

.comment-form .lg-btn { border: 1px solid var(--lg-primary-dark); }

.lg-search-form {
	display: flex;
	gap: 8px;
	max-width: 420px;
}

.lg-search-form input[type="search"] { flex: 1; }

/* ===================================================================
   Empty state (404 / no posts)
   =================================================================== */
.lg-empty-state {
	text-align: center;
	padding: 64px 32px;
	background: var(--lg-bg-soft);
	border: 1px dashed var(--lg-border);
	border-radius: var(--lg-radius-md);
	max-width: 560px;
	margin: 0 auto;
}

.lg-empty-state h1 { margin-bottom: 12px; }
.lg-empty-state p { color: var(--lg-muted); margin-bottom: 24px; }

/* ===================================================================
   Pagination
   =================================================================== */
.lg-pagination {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 48px;
	flex-wrap: wrap;
}

.lg-pagination .page-numbers {
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--lg-border);
	border-radius: 100px;
	font-family: var(--lg-font-mono);
	font-size: 13px;
	font-weight: 500;
	color: var(--lg-ink);
	background: var(--lg-surface);
}

.lg-pagination .page-numbers:hover { border-color: var(--lg-brass); }

.lg-pagination .page-numbers.current {
	background: var(--lg-primary);
	border-color: var(--lg-primary-dark);
	color: #f5efe2;
}

/* ===================================================================
   Footer shell - a single floating "glow" card (recolored per mode)
   holding a CTA, a newsletter box, the widget columns and the credit
   line, rather than a flat dark bar.
   =================================================================== */
.lg-footer {
	margin-top: 80px;
	padding: 0 24px 40px;
}

.lg-footer-card {
	max-width: var(--lg-container);
	margin: 0 auto;
	border-radius: 0;
	overflow: hidden;
	background: var(--lg-footer-card-bg);
	color: var(--lg-footer-card-ink);
	padding: 52px 44px 28px;
	transition: background 0.25s ease, color 0.25s ease;
}

.lg-footer-cta {
	max-width: 620px;
	margin-bottom: 40px;
}

.lg-footer-cta h2 {
	color: var(--lg-footer-card-ink);
	font-size: 32px;
	margin-bottom: 20px;
}

.lg-footer-cta-btn {
	background: var(--lg-primary);
	border-color: var(--lg-primary-dark);
	color: #f5efe2;
	box-shadow: 0 10px 24px -10px rgba(122, 35, 49, 0.5);
}

.lg-footer-cta-btn:hover {
	background: var(--lg-primary-dark);
	color: #f5efe2;
}

.lg-footer-main {
	display: grid;
	grid-template-columns: minmax(240px, 380px) 1fr;
	gap: 40px 60px;
	padding-bottom: 36px;
}

.lg-footer-newsletter h3 {
	color: var(--lg-footer-card-ink);
	font-size: 15px;
	margin-bottom: 10px;
}

.lg-footer-newsletter p {
	color: var(--lg-footer-card-muted);
	font-size: 13.5px;
	margin-bottom: 16px;
}

.lg-newsletter-form {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.lg-newsletter-form input[type="email"] {
	flex: 1 1 180px;
	background: var(--lg-footer-input-bg);
	border-color: var(--lg-footer-card-border);
	color: var(--lg-footer-card-ink);
}

.lg-newsletter-form input[type="email"]::placeholder {
	color: var(--lg-footer-card-muted);
}

.lg-newsletter-form button {
	flex: 0 0 auto;
	padding: 0 20px;
	border-radius: 8px;
	border: 1px solid var(--lg-footer-card-border);
	background: var(--lg-footer-input-bg);
	color: var(--lg-footer-card-ink);
	font-family: var(--lg-font-body);
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s ease;
}

.lg-newsletter-form button:hover {
	background: rgba(180, 145, 90, 0.28);
}

.lg-newsletter-notice {
	margin-top: 10px;
	font-size: 12.5px;
	color: var(--lg-brass);
}

.lg-footer-widgets {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 24px;
}

.lg-footer-widgets h2, .lg-footer-widgets h3 {
	color: var(--lg-footer-card-ink);
	font-size: 14.5px;
	margin-bottom: 14px;
}

.lg-footer-widgets ul { display: flex; flex-direction: column; gap: 9px; }
.lg-footer-widgets a { color: var(--lg-footer-card-muted); font-size: 13.5px; }
.lg-footer-widgets a:hover { color: var(--lg-brass); }

.lg-footer-widgets p {
	color: var(--lg-footer-card-muted);
	font-size: 13px;
	margin-bottom: 8px;
}

.lg-footer-widgets img {
	max-width: 64px;
	height: auto;
}

/* A search box reads as a stray form control against a CTA/link column
   footer — this column is for quick links, not another search field
   (the header already has one). Collapse the whole column wrapper too,
   so it doesn't leave a blank gap if search is the only widget in it. */
.lg-footer-widgets .widget_search {
	display: none;
}

.lg-footer-widgets > div:has(> .widget_search:only-child) {
	display: none;
}

.lg-footer-bottom {
	border-top: 1px solid var(--lg-footer-card-border);
	padding: 18px 0 4px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.lg-footer-credit {
	font-family: var(--lg-font-mono);
	font-size: 11px;
	color: var(--lg-footer-card-muted);
	letter-spacing: 0.04em;
}

.lg-footer-social {
	display: flex;
	gap: 8px;
}

.lg-footer-social a {
	display: inline-flex;
	align-items: center;
	padding: 6px 14px;
	border-radius: 100px;
	border: 1px solid var(--lg-footer-card-border);
	font-family: var(--lg-font-mono);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--lg-footer-card-muted);
	transition: color 0.15s ease, border-color 0.15s ease;
}

.lg-footer-social a:hover {
	color: var(--lg-brass);
	border-color: var(--lg-brass);
}

/* ===================================================================
   WordPress core alignment / block support
   =================================================================== */
.alignwide { max-width: 1000px; margin-left: auto; margin-right: auto; }
.alignfull { max-width: none; width: 100vw; margin-left: calc(50% - 50vw); }
.alignleft { float: left; margin: 0.4em 1.5em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.5em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }

.wp-caption { max-width: 100%; }
.wp-caption-text {
	font-size: 12.5px;
	color: var(--lg-muted);
	text-align: center;
	margin-top: 8px;
}

.wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border-radius: 8px;
	background: var(--lg-primary);
	color: #f5efe2;
	font-weight: 600;
	font-size: 14px;
}

.wp-block-button__link:hover { background: var(--lg-primary-dark); }

.wp-block-quote { border-left: 3px solid var(--lg-primary); padding-left: 22px; }

/* ===================================================================
   Responsive
   =================================================================== */
@media (max-width: 880px) {
	.lg-hero h1 { font-size: 38px; }
	.lg-post-nav { grid-template-columns: 1fr; }
	.lg-post-nav-next { text-align: left; }
}

@media (max-width: 720px) {
	.lg-primary-nav { display: none; }
	.lg-header-controls .lg-nav-toggle { display: inline-flex; }

	/* The toggle button is what doubles as the close (X) control once the
	   menu is open, so it must stay stacked above the full-screen overlay
	   (z-index: 500) rather than getting covered by it — otherwise there's
	   nothing left to click to close the menu. */
	.lg-header-controls {
		position: relative;
		z-index: 600;
	}

	.lg-header.lg-nav-open .lg-nav-toggle {
		background: rgba(180, 145, 90, 0.22);
		color: var(--lg-header-ink);
	}

	/* Full-screen takeover instead of a small dropdown — mode-aware via
	   the same --lg-header-* tokens as the header itself. */
	.lg-primary-nav {
		position: fixed;
		inset: 0;
		z-index: 500;
		display: flex;
		align-items: center;
		justify-content: center;
		background: var(--lg-header-bg);
		opacity: 0;
		visibility: hidden;
		transition: opacity 0.3s ease, visibility 0.3s ease, background 0.25s ease;
	}

	.lg-header.lg-nav-open .lg-primary-nav {
		display: flex;
		opacity: 1;
		visibility: visible;
	}

	.lg-header.lg-nav-open .lg-primary-nav ul {
		flex-direction: column;
		align-items: center;
		gap: 6px;
		width: 100%;
		max-width: 420px;
		padding: 0 24px;
	}

	.lg-header.lg-nav-open .lg-primary-nav li {
		width: 100%;
		text-align: center;
		opacity: 0;
		transform: translateY(14px);
		transition: opacity 0.35s ease, transform 0.35s ease;
	}

	.lg-header.lg-nav-open .lg-primary-nav.lg-nav-in li {
		opacity: 1;
		transform: none;
	}

	.lg-header.lg-nav-open .lg-primary-nav li:nth-child(1) { transition-delay: 0.05s; }
	.lg-header.lg-nav-open .lg-primary-nav li:nth-child(2) { transition-delay: 0.1s; }
	.lg-header.lg-nav-open .lg-primary-nav li:nth-child(3) { transition-delay: 0.15s; }
	.lg-header.lg-nav-open .lg-primary-nav li:nth-child(4) { transition-delay: 0.2s; }
	.lg-header.lg-nav-open .lg-primary-nav li:nth-child(5) { transition-delay: 0.25s; }

	.lg-header.lg-nav-open .lg-primary-nav a {
		display: block;
		padding: 12px 14px;
		font-family: var(--lg-font-display);
		font-size: 26px;
		font-weight: 500;
	}

	.lg-header.lg-nav-open .lg-primary-nav .sub-menu {
		position: static;
		display: block;
		border: none;
		background: none;
		box-shadow: none;
		padding: 0;
	}

	.lg-header.lg-nav-open .lg-primary-nav .sub-menu a {
		font-family: var(--lg-font-body);
		font-size: 15px;
		font-weight: 500;
		color: var(--lg-header-muted);
	}

	/* Hamburger → X bars, matched to the reference: uneven rest widths,
	   morphing to a close icon while the menu is open. */
	.lg-nav-toggle-bars {
		display: flex;
		flex-direction: column;
		align-items: flex-end;
		gap: 5px;
		width: 18px;
	}

	.lg-bar {
		display: block;
		height: 2px;
		width: 100%;
		border-radius: 2px;
		background: currentColor;
		transition: transform 0.3s ease, opacity 0.25s ease, width 0.25s ease;
	}

	.lg-bar-2 { width: 65%; }

	.lg-header.lg-nav-open .lg-bar-1 { transform: translateY(7px) rotate(45deg); width: 100%; }
	.lg-header.lg-nav-open .lg-bar-2 { opacity: 0; }
	.lg-header.lg-nav-open .lg-bar-3 { transform: translateY(-7px) rotate(-45deg); width: 100%; }

	.lg-stats-grid { grid-template-columns: repeat(2, 1fr); transform: none; margin-top: 32px; }
	.lg-stat-tile:nth-child(2n) { border-right: none; }

	.lg-hero { padding: 64px 0; }
	.lg-hero h1 { font-size: 30px; }

	.lg-footer-bottom-inner { flex-direction: column; align-items: flex-start; }
}
