/*
Theme Name: Last Z Guide
Theme URI: https://lastzguide.com/
Author: Sage, for JA
Description: A guide hub for Last Z: Survival Shooter. The front page is built from the live posts: search, a start-here row, the working gift codes from the LZG Tools plugin, the hero roster, every guide as a card filtered in place by topic, and the pages that carry a tool. Posts get a boxed opening answer, a table of contents, wide tables that scroll, and related guides. Dark and light modes.
Version: 1.0.1
Requires at least: 6.0
Tested up to: 6.8
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: last-z-guide
Tags: blog, one-column, custom-logo, custom-menu, editor-style, featured-images, threaded-comments, translation-ready
*/

/* ---------- tokens ---------- */
:root,
:root[data-theme="dark"] {
	color-scheme: dark;
	--bg: #0b0c0e;
	--bg-raise: #121316;
	--panel: #15171a;
	--panel-2: #1b1e22;
	--line: #2b2e33;
	--line-soft: #1f2226;
	--ink: #f0ebe0;
	--ink-dim: #b8b2a4;
	--muted: #8f8a7d;
	--accent: #e0232a;
	--accent-hi: #ff5f57;
	--accent-deep: #a3161c;
	--accent-wash: rgba(224, 35, 42, 0.12);
	--accent-bright: #ff6b62;
	--on-accent: #ffffff;
	--rose: #e06a62;
	--dawn: #e0b84f;
	--order: #8fb0cc;
	--good: #7fb069;
	--good-wash: rgba(127, 176, 105, 0.14);
	--header-bg: rgba(11, 12, 14, 0.94);
	--hazard-alt: #101112;
	--body-copy: #d8d2c2;
	--codes-grad: #1d1113;
	--shadow: 0 14px 40px rgba(0, 0, 0, 0.5);
	--radius: 10px;
	--font-d: "Oswald", "Arial Narrow", "Helvetica Neue", sans-serif;
	--font-b: "Barlow", "Helvetica Neue", Arial, sans-serif;
	--font-m: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
}
:root[data-theme="light"] {
	color-scheme: light;
	--bg: #faf6ee;
	--bg-raise: #fffdf8;
	--panel: #ffffff;
	--panel-2: #f3ecdd;
	--line: #ddd3bf;
	--line-soft: #eae2d0;
	--ink: #1c1915;
	--ink-dim: #4d473d;
	--muted: #716a5c;
	--accent: #c81e22;
	--accent-hi: #a81216;
	--accent-deep: #8f1216;
	--accent-wash: rgba(200, 30, 34, 0.08);
	--rose: #b3372f;
	--dawn: #8a6d14;
	--order: #3d6390;
	--good: #3f7a34;
	--good-wash: rgba(63, 122, 52, 0.1);
	--header-bg: rgba(250, 246, 238, 0.94);
	--hazard-alt: #1c1915;
	--body-copy: #33302a;
	--codes-grad: #fdf0ea;
	--shadow: 0 14px 34px rgba(60, 40, 10, 0.14);
}
.lzgt-system-fonts {
	--font-d: "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
	--font-b: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	* { transition: none !important; animation: none !important; }
}
body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: var(--font-b);
	font-size: 17px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-hi); }
button, input, select, textarea { font-family: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(0 0 0 0); white-space: nowrap;
}
.skip-link:focus {
	position: fixed; left: 12px; top: 12px; z-index: 100; width: auto; height: auto; clip: auto;
	background: var(--accent); color: var(--on-accent); padding: 10px 16px; border-radius: 8px;
}
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.hazard { height: 8px; background: var(--stripe, var(--accent)); }
.hazard.thin { height: 5px; }
.eyebrow {
	font-family: var(--font-m); font-size: 0.8rem; font-weight: 700; text-transform: uppercase;
	letter-spacing: 0.14em; color: var(--accent-hi); margin: 0 0 10px;
}
.eyebrow::before, .kicker::before { content: "// "; }
.tag {
	display: inline-block; font-family: var(--font-m); font-size: 0.7rem; letter-spacing: 0.1em;
	text-transform: uppercase; text-decoration: none; color: var(--accent-hi);
	border: 1px solid var(--accent-deep); border-radius: 3px; padding: 2px 7px;
}
.tag.alt { color: var(--ink-dim); border-color: var(--line); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-ghost {
	border: 1px solid var(--accent-deep); background: transparent; color: var(--accent-hi);
	font-weight: 700; font-size: 0.98rem; border-radius: 8px; padding: 10px 22px;
	cursor: pointer; min-height: 2.9rem;
}
.btn-ghost:hover { background: var(--accent-wash); }

/* ---------- header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 60;
	background: var(--header-bg);
	-webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.header-in { display: flex; align-items: center; gap: 22px; min-height: 62px; }
.wordmark {
	font-family: var(--font-d); font-weight: 700; font-size: 1.45rem; text-transform: uppercase;
	letter-spacing: 0.06em; color: var(--ink); text-decoration: none; white-space: nowrap;
	display: inline-block; line-height: 1.1;
}
.wordmark .z { color: var(--accent); }
.wordmark img { max-height: 40px; width: auto; display: block; }
.wordmark .logo-light { display: block; }
.wordmark .logo-dark { display: none; }
:root[data-theme="dark"] .wordmark.has-dark .logo-light { display: none; }
:root[data-theme="dark"] .wordmark.has-dark .logo-dark { display: block; }
.main-navigation { margin-left: auto; min-width: 0; }
.main-navigation ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-navigation li { position: relative; }
.main-navigation a {
	color: var(--ink-dim); text-decoration: none; font-weight: 600; font-size: 0.98rem;
	padding: 10px 13px; border-radius: 6px; display: inline-flex; align-items: center;
	min-height: 2.75rem; white-space: nowrap;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-cat > a { color: var(--ink); background: var(--panel-2); }
.main-navigation ul ul {
	display: none; position: absolute; top: 100%; left: 0; min-width: 210px; flex-direction: column;
	gap: 0; padding: 6px; background: var(--bg-raise); border: 1px solid var(--line);
	border-radius: var(--radius); box-shadow: var(--shadow);
}
.main-navigation li:hover > ul, .main-navigation li:focus-within > ul { display: flex; }
.main-navigation ul ul a { display: flex; }
.header-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.icon-btn {
	background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; color: var(--ink);
	width: 46px; height: 46px; cursor: pointer; flex: none; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { border-color: var(--accent-deep); }
.icon-btn svg { width: 21px; height: 21px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }
.menu-toggle { display: none; }
.menu-toggle .icon-close { display: none; }
.menu-toggle.is-open .icon-open { display: none; }
.menu-toggle.is-open .icon-close { display: block; }
.header-search-panel { display: none; border-top: 1px solid var(--line); background: var(--bg-raise); padding: 14px 0; }
.header-search-panel.open { display: block; }
.header-search-panel .searchbar { box-shadow: none; }
.mobile-menu { display: none; border-top: 1px solid var(--line); background: var(--bg-raise); padding: 8px 20px 16px; }
.mobile-menu.open { display: block; }
.mobile-menu ul { list-style: none; margin: 0; padding: 0; }
.mobile-menu ul ul { padding-left: 16px; }
.mobile-menu a {
	display: flex; align-items: center; min-height: 3rem; color: var(--ink); text-decoration: none;
	font-weight: 600; border-bottom: 1px solid var(--line-soft); padding: 4px 2px;
}
.mobile-menu li:last-child > a { border-bottom: 0; }
.read-progress { position: absolute; left: 0; right: 0; bottom: -3px; height: 3px; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
@media (max-width: 900px) {
	.main-navigation { display: none; }
	.header-actions { margin-left: auto; }
	.menu-toggle { display: inline-flex; }
}
@media (min-width: 901px) { .mobile-menu.open { display: none; } }

/* ---------- search bar ---------- */
.searchbar {
	display: flex; background: var(--bg-raise); border: 1px solid var(--line);
	border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); max-width: 760px;
}
.searchbar input {
	flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink);
	font-size: 1.05rem; padding: 14px 18px; min-height: 3.4rem; -webkit-appearance: none; appearance: none;
}
.searchbar input::placeholder { color: var(--muted); }
.searchbar input:focus { outline: none; }
.searchbar:focus-within { border-color: var(--accent); }
.searchbar button {
	border: 0; background: var(--accent); color: var(--on-accent); cursor: pointer;
	font-family: var(--font-d); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
	font-size: 1rem; padding: 0 26px; min-height: 3.4rem;
}
.searchbar button:hover { background: var(--accent-deep); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); background: #0b0c0e; }
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 38%; }
.hero-bg::after {
	content: ""; position: absolute; inset: 0;
	background:
		linear-gradient(90deg, rgba(11, 12, 14, 0.78) 0%, rgba(11, 12, 14, 0.35) 70%, rgba(11, 12, 14, 0.2) 100%),
		linear-gradient(180deg, rgba(11, 12, 14, 0.5) 0%, rgba(11, 12, 14, 0.5) 45%, rgba(11, 12, 14, 0.96) 100%);
}
.hero-in { position: relative; padding: 68px 20px 48px; }
.hero-in > * { max-width: 760px; }
.hero .kicker {
	font-family: var(--font-m); font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase;
	color: #ff6b62; margin: 0 0 14px; font-weight: 700;
}
.hero h1 {
	font-family: var(--font-d); font-weight: 700; text-transform: uppercase; color: #f7f3e8;
	font-size: clamp(2.5rem, 7.4vw, 4.7rem); line-height: 1; letter-spacing: 0.01em; margin: 0 0 18px;
	text-wrap: balance;
}
.hero h1 .accent { color: #ff6b62; }
.hero .lede { font-size: 1.13rem; color: #ddd7c8; max-width: 56ch; margin: 0 0 28px; }
.stat-strip {
	list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-wrap: wrap; gap: 8px 10px;
	font-family: var(--font-m); font-size: 0.84rem; letter-spacing: 0.1em; text-transform: uppercase;
}
.stat-strip a {
	display: inline-flex; gap: 7px; align-items: baseline; color: #f7f3e8; text-decoration: none;
	border: 1px solid rgba(247, 243, 232, 0.22); background: rgba(11, 12, 14, 0.55);
	border-radius: 999px; padding: 6px 13px;
}
.stat-strip a:hover { border-color: #ff6b62; }
.stat-strip b { color: #ff6b62; }

/* ---------- sections ---------- */
.block { padding: 54px 0 8px; }
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.sec-head h2 {
	font-family: var(--font-d); font-weight: 600; text-transform: uppercase;
	font-size: clamp(1.55rem, 3.4vw, 2.1rem); letter-spacing: 0.02em; margin: 0; line-height: 1.1;
}
.sec-head p:not(.eyebrow) { margin: 6px 0 0; color: var(--ink-dim); max-width: 62ch; }
.sec-link { font-weight: 600; text-decoration: none; white-space: nowrap; padding: 8px 0; }
.sec-link:hover { text-decoration: underline; }

/* ---------- start here ---------- */
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.trio-2 { grid-template-columns: repeat(2, 1fr); }
.trio-1 { grid-template-columns: 1fr; }
@media (max-width: 860px) { .trio, .trio-2 { grid-template-columns: 1fr; } }
.start-card {
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
	padding: 24px 24px 20px; text-decoration: none; color: var(--ink);
	display: flex; flex-direction: column; gap: 8px; transition: border-color 0.15s, transform 0.15s;
}
.start-card:hover { border-color: var(--accent-deep); background: var(--panel-2); transform: translateY(-2px); }
.start-card .num { font-family: var(--font-d); font-size: 2rem; font-weight: 700; color: var(--accent); line-height: 1; }
.start-title { font-family: var(--font-d); font-weight: 600; font-size: 1.3rem; text-transform: uppercase; letter-spacing: 0.02em; line-height: 1.2; margin-top: 2px; }
.start-text { color: var(--ink-dim); font-size: 0.98rem; }
.start-card .go { margin-top: auto; padding-top: 10px; color: var(--accent-hi); font-weight: 700; font-size: 0.95rem; }

/* ---------- gift codes ---------- */
.codes-panel {
	background: linear-gradient(180deg, var(--codes-grad), var(--panel));
	border: 1px solid var(--accent-deep); border-radius: var(--radius); overflow: hidden;
}
.codes-top { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: center; padding: 18px 24px 14px; border-bottom: 1px solid var(--line-soft); }
.codes-top h2 { font-family: var(--font-d); font-weight: 600; text-transform: uppercase; font-size: 1.5rem; margin: 0; letter-spacing: 0.02em; }
.live-dot {
	display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--good);
	margin-right: 9px; vertical-align: middle; box-shadow: 0 0 0 4px var(--good-wash);
}
.freshness { font-family: var(--font-m); font-size: 0.82rem; color: var(--ink-dim); letter-spacing: 0.02em; }
.freshness b { color: var(--accent-hi); font-weight: 600; }
.codes-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line-soft); }
@media (max-width: 760px) { .codes-grid { grid-template-columns: 1fr; } }
.code-row { background: var(--panel); padding: 16px 24px; display: flex; align-items: center; gap: 12px 16px; flex-wrap: wrap; }
.code-row:last-child:nth-child(odd) { grid-column: 1 / -1; }
.code-value {
	font-family: var(--font-m); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.08em; color: var(--ink);
	border: 1px dashed var(--accent-deep); border-radius: 6px; padding: 7px 12px; background: var(--accent-wash);
	overflow-wrap: anywhere;
}
.code-reward { flex: 1; min-width: 150px; }
.code-reward .r { display: block; font-weight: 600; font-size: 0.95rem; line-height: 1.35; }
.code-reward .a { display: block; font-size: 0.8rem; color: var(--muted); font-family: var(--font-m); margin-top: 3px; }
.copy-btn {
	border: 1px solid var(--accent-deep); background: transparent; color: var(--accent-hi);
	font-weight: 700; font-size: 0.9rem; border-radius: 7px; padding: 8px 18px;
	cursor: pointer; min-height: 2.5rem; min-width: 96px;
}
.copy-btn:hover { background: var(--accent-wash); }
.copy-btn.copied { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.codes-none { grid-column: 1 / -1; background: var(--panel); margin: 0; padding: 20px 24px; color: var(--ink-dim); }
.codes-foot { padding: 10px 24px 14px; border-top: 1px solid var(--line-soft); }
.codes-foot .sec-link { white-space: normal; display: inline-block; }

/* ---------- hero roster ---------- */
.faction-filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 20px; }
.faction-btn {
	border: 1px solid var(--line); background: var(--panel); color: var(--ink-dim); border-radius: 999px;
	padding: 9px 18px; font-weight: 600; font-size: 0.95rem; cursor: pointer; min-height: 2.6rem;
	display: inline-flex; align-items: center; gap: 8px;
}
.faction-btn .swatch { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.faction-btn[data-faction="blood-rose"] .swatch { background: var(--rose); }
.faction-btn[data-faction="wings-of-dawn"] .swatch { background: var(--dawn); }
.faction-btn[data-faction="guard-of-order"] .swatch { background: var(--order); }
.faction-btn[aria-pressed="true"] { border-color: var(--accent); color: var(--ink); background: var(--accent-wash); }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
@media (max-width: 480px) { .roster { grid-template-columns: repeat(2, 1fr); } }
.hero-chip {
	display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px;
	background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
	padding: 7px 12px 7px 7px; min-height: 3.2rem; text-decoration: none; color: var(--ink);
	transition: border-color 0.15s, opacity 0.15s;
}
.hero-chip:hover { border-color: var(--accent-deep); background: var(--panel-2); }
.hero-chip img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; grid-row: span 2; }
.hero-chip .hn { font-weight: 700; font-size: 0.98rem; line-height: 1.25; }
.hero-chip:not(:has(img)) { padding-left: 13px; }
.hero-chip:not(:has(img)) .hn, .hero-chip:not(:has(img)) .hf { grid-column: 1 / -1; }
.hero-chip .hf { font-size: 0.74rem; font-family: var(--font-m); letter-spacing: 0.03em; color: var(--muted); }
.hero-chip[data-faction="blood-rose"] .hf { color: var(--rose); }
.hero-chip[data-faction="wings-of-dawn"] .hf { color: var(--dawn); }
.hero-chip[data-faction="guard-of-order"] .hf { color: var(--order); }
.hero-chip.dim { opacity: 0.22; }

/* ---------- browse ---------- */
.tiles { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.tile {
	border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none;
	border-radius: var(--radius); padding: 12px 18px; cursor: pointer;
	display: inline-flex; align-items: center; gap: 10px; min-height: 3.2rem; font-weight: 600; font-size: 1rem;
}
.tile:hover { border-color: var(--accent-deep); }
.tile svg { width: 20px; height: 20px; color: var(--accent); flex: none; }
.tile .cnt { font-family: var(--font-m); font-size: 0.75rem; color: var(--muted); }
.tile[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tile[aria-pressed="true"] svg, .tile[aria-pressed="true"] .cnt { color: var(--on-accent); }
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 0 18px; border-top: 1px solid var(--line-soft); }
.result-count { font-family: var(--font-m); font-size: 0.85rem; color: var(--ink-dim); letter-spacing: 0.02em; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
	display: inline-flex; align-items: center; gap: 7px; background: var(--accent-wash);
	border: 1px solid var(--accent-deep); color: var(--accent-hi); border-radius: 999px;
	padding: 5px 8px 5px 13px; font-size: 0.87rem; font-weight: 600; min-height: 2.1rem;
}
.chip button {
	border: 0; background: var(--accent-wash); color: var(--accent-hi); cursor: pointer;
	width: 24px; height: 24px; border-radius: 50%; font-size: 0.95rem; line-height: 1; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
}
.clear-all {
	border: 0; background: none; color: var(--ink-dim); font-weight: 600; cursor: pointer; font-size: 0.95rem;
	text-decoration: underline; text-underline-offset: 3px; padding: 6px 4px; min-height: 2.25rem;
}
.clear-all:hover { color: var(--ink); }
.sort-wrap { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.sort-wrap select {
	background: var(--panel-2); color: var(--ink); border: 1px solid var(--line);
	border-radius: 7px; padding: 7px 10px; font-size: 0.92rem; min-height: 2.4rem;
}
.guide-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 980px) { .guide-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .guide-grid { grid-template-columns: 1fr; } }
.guide-card {
	background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
	display: flex; flex-direction: column; text-decoration: none; color: var(--ink);
	transition: border-color 0.15s, transform 0.15s;
}
.guide-card:hover { border-color: var(--accent-deep); background: var(--panel-2); transform: translateY(-2px); }
.card-media { display: block; aspect-ratio: 16 / 9; background: var(--panel-2); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-body { display: flex; flex-direction: column; gap: 9px; padding: 18px 20px 16px; flex: 1; }
.card-title { font-family: var(--font-d); font-weight: 600; font-size: 1.28rem; line-height: 1.2; letter-spacing: 0.01em; }
.card-text { color: var(--ink-dim); font-size: 0.95rem; }
.guide-card .meta {
	margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-soft);
	font-family: var(--font-m); font-size: 0.77rem; color: var(--muted);
	display: flex; gap: 14px; flex-wrap: wrap; letter-spacing: 0.02em;
}
.no-results {
	border: 1px dashed var(--line); border-radius: var(--radius); padding: 34px 24px;
	text-align: center; color: var(--ink-dim); background: var(--panel);
}
.no-results p { margin: 0 0 6px; }
.no-results b { color: var(--ink); }
.more-wrap { text-align: center; margin: 22px 0 0; }

/* ---------- tools ---------- */
.tools-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .tools-grid { grid-template-columns: 1fr; } }
.tool-card {
	display: flex; gap: 16px; align-items: flex-start; background: var(--panel); border: 1px solid var(--line);
	border-radius: var(--radius); padding: 22px 24px; text-decoration: none; color: var(--ink);
}
.tool-card:hover { border-color: var(--accent-deep); background: var(--panel-2); }
.tool-card svg { width: 30px; height: 30px; color: var(--accent); flex: none; margin-top: 2px; }
.tool-title { display: block; font-family: var(--font-d); font-weight: 600; text-transform: uppercase; font-size: 1.25rem; letter-spacing: 0.02em; line-height: 1.2; margin-bottom: 6px; }
.tool-text { display: block; color: var(--ink-dim); font-size: 0.97rem; }

/* ---------- newsletter ---------- */
.signup { margin-top: 54px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.signup-in { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; padding: 30px 32px; align-items: center; }
@media (max-width: 760px) { .signup-in { grid-template-columns: 1fr; padding: 24px 22px; } }
.signup h2 { font-family: var(--font-d); font-weight: 600; text-transform: uppercase; font-size: 1.6rem; margin: 0 0 8px; letter-spacing: 0.02em; line-height: 1.15; }
.signup p { margin: 0; color: var(--ink-dim); }
.signup-form form { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; }
.signup-form input[type="email"], .signup-form input[type="text"] {
	flex: 1; min-width: 200px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
	color: var(--ink); padding: 12px 16px; font-size: 1rem; min-height: 3.1rem;
}
.signup-form button, .signup-form input[type="submit"] {
	background: var(--accent); border: 0; color: var(--on-accent); border-radius: 8px;
	font-family: var(--font-d); font-weight: 600; text-transform: uppercase; letter-spacing: 0.07em;
	padding: 0 24px; cursor: pointer; min-height: 3.1rem; font-size: 1rem;
}

/* ---------- widgets ---------- */
.widget-area { margin: 28px auto; }
.widget-area .widget + .widget { margin-top: 20px; }
.widget-title { font-family: var(--font-d); text-transform: uppercase; font-size: 1.05rem; letter-spacing: 0.04em; margin: 0 0 10px; }

/* ---------- footer ---------- */
.site-footer { margin-top: 70px; border-top: 1px solid var(--line); background: var(--bg-raise); }
.footer-in { padding: 34px 20px 36px; display: flex; flex-wrap: wrap; gap: 26px 60px; }
.footer-in .col { min-width: 160px; }
.footer-in .col-about { flex: 1 1 280px; }
.footer-in h2 { font-family: var(--font-d); text-transform: uppercase; letter-spacing: 0.05em; font-size: 1rem; margin: 0 0 12px; color: var(--ink); }
.footer-in ul { list-style: none; margin: 0; padding: 0; }
.footer-in a { display: block; color: var(--ink-dim); text-decoration: none; padding: 4px 0; font-size: 0.95rem; }
.footer-in a:hover { color: var(--accent-hi); }
.footer-in p { color: var(--muted); font-size: 0.92rem; max-width: 44ch; margin: 0; }
.footer-base {
	border-top: 1px solid var(--line-soft); padding: 16px 20px 22px; font-size: 0.83rem; color: var(--muted);
	display: flex; flex-wrap: wrap; gap: 6px 24px; align-items: center;
}
.legal-menu { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.legal-menu a { color: var(--muted); }
.legal-menu a:hover { color: var(--accent-hi); }

/* ---------- article ---------- */
.crumb { padding: 22px 0 6px; font-family: var(--font-m); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; display: flex; gap: 10px; color: var(--muted); }
.crumb a { color: var(--ink-dim); text-decoration: none; }
.crumb a:hover { color: var(--accent-hi); }
.guide-hero { padding: 10px 0 8px; max-width: 880px; }
.guide-hero .tags { margin-bottom: 14px; }
.guide-hero h1, .archive-head h1 {
	font-family: var(--font-d); font-weight: 700; text-transform: uppercase;
	font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.05; margin: 0 0 14px; text-wrap: balance;
}
.guide-meta {
	display: flex; flex-wrap: wrap; gap: 8px 26px; font-family: var(--font-m); font-size: 0.85rem;
	color: var(--ink-dim); letter-spacing: 0.02em;
}
.guide-meta b { color: var(--ink); font-weight: 600; }
.guide-hero { border-bottom: 1px solid var(--line); padding-bottom: 20px; }
.guide-banner { margin: 26px 0 6px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--panel-2); }
.guide-banner img { width: 100%; max-height: 480px; object-fit: cover; object-position: 50% 22%; }
.guide-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 44px; padding: 26px 0 10px; align-items: start; }
.guide-layout.no-side { grid-template-columns: minmax(0, 820px); }
@media (max-width: 900px) { .guide-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.guide-side { position: sticky; top: 86px; max-height: calc(100vh - 106px); overflow: auto; }
@media (max-width: 900px) { .guide-side { position: static; max-height: none; } }
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 20px 12px; }
.toc summary {
	font-family: var(--font-m); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase;
	color: var(--muted); padding: 12px 0 8px; cursor: pointer; list-style: none;
	display: flex; justify-content: space-between; align-items: center; min-height: 2.6rem;
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "+"; font-family: var(--font-d); font-size: 1.2rem; color: var(--accent); }
.toc[open] summary::after { content: "\2013"; }
@media (min-width: 901px) { .toc summary { pointer-events: none; } .toc summary::after, .toc[open] summary::after { content: none; } }
.toc a {
	display: block; color: var(--ink-dim); text-decoration: none; padding: 6px 0 6px 12px; font-size: 0.93rem;
	font-weight: 500; border-left: 2px solid var(--line-soft); line-height: 1.35;
}
.toc a:hover { color: var(--accent-hi); }
.toc a.current { color: var(--ink); border-left-color: var(--accent); }

.entry-content { color: var(--body-copy); max-width: 76ch; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content p { margin: 0 0 16px; }
.entry-content h2 {
	font-family: var(--font-d); font-weight: 600; text-transform: uppercase; color: var(--ink);
	font-size: 1.65rem; letter-spacing: 0.02em; margin: 40px 0 12px; line-height: 1.15; scroll-margin-top: 92px;
}
.entry-content h3 { font-family: var(--font-d); font-weight: 600; color: var(--ink); font-size: 1.28rem; letter-spacing: 0.01em; margin: 28px 0 8px; line-height: 1.2; scroll-margin-top: 92px; }
.entry-content h4 { color: var(--ink); font-size: 1.05rem; margin: 22px 0 6px; }
.entry-content strong { color: var(--ink); }
.entry-content a { text-underline-offset: 3px; }
.entry-content ul, .entry-content ol { margin: 0 0 18px; padding-left: 24px; }
.entry-content li { margin: 6px 0; }
.entry-content li::marker { color: var(--accent); font-weight: 700; }
.entry-content blockquote { margin: 22px 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--accent); color: var(--ink-dim); }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
.entry-content code { font-family: var(--font-m); font-size: 0.92em; background: var(--panel-2); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.entry-content pre { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; overflow: auto; }
.entry-content pre code { background: none; border: 0; padding: 0; }
.entry-content figure { margin: 24px 0; }
.entry-content figcaption { font-size: 0.85rem; color: var(--muted); margin-top: 8px; text-align: center; }
.entry-content .wp-block-image img { border-radius: var(--radius); border: 1px solid var(--line); margin: 0 auto; }
/* A phone screenshot is far taller than it is wide; keep it at phone size. */
.entry-content .wp-block-image img[height] { max-height: 640px; width: auto; }
.entry-content .alignwide, .entry-content .alignfull { max-width: 100%; }

/* The opening answer */
.quick-answer {
	background: var(--accent-wash); border: 1px solid var(--accent-deep); border-radius: var(--radius);
	padding: 20px 24px 8px; margin: 0 0 28px;
}
.quick-answer .qa-label {
	font-family: var(--font-d); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em;
	color: var(--accent-hi); font-size: 1rem; margin-bottom: 8px;
}
.quick-answer > p { font-size: 1.05rem; color: var(--ink); margin-bottom: 12px; }
.quick-answer > p strong { font-weight: 600; }
.quick-answer ul { list-style: none; padding: 12px 0 0; margin: 0 0 12px; border-top: 1px solid var(--line); }
.quick-answer li { margin: 5px 0; font-size: 0.97rem; }

/* Tables: scroll sideways inside their own box, never break a word in two. */
.entry-content .wp-block-table, .entry-content .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: 0.93rem; table-layout: auto; }
.entry-content .wp-block-table table.has-fixed-layout { table-layout: auto; }
.entry-content th, .entry-content td {
	text-align: left; vertical-align: top; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--line-soft);
	word-break: normal; overflow-wrap: normal; hyphens: manual;
}
.entry-content th { font-family: var(--font-m); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); background: var(--panel-2); white-space: nowrap; }
.entry-content tbody tr:last-child td { border-bottom: 0; }
.entry-content tbody tr:hover td { background: var(--panel-2); }
.entry-content td:first-child { color: var(--ink); font-weight: 600; }
.entry-content > table { display: block; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }

/* Details blocks read as an FAQ */
.entry-content details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); margin-bottom: 10px; overflow: hidden; }
.entry-content details > summary {
	cursor: pointer; font-weight: 700; color: var(--ink); padding: 16px 20px; list-style: none;
	display: flex; justify-content: space-between; align-items: center; gap: 14px; min-height: 3.4rem;
}
.entry-content details > summary::-webkit-details-marker { display: none; }
.entry-content details > summary::after { content: "+"; font-family: var(--font-d); font-size: 1.4rem; color: var(--accent); line-height: 1; }
.entry-content details[open] > summary::after { content: "\2013"; }
.entry-content details > *:not(summary) { padding: 0 20px; }

/* LZG Tools plugin: its calculator and codes table, in the theme's colors. */
body .lzg-tool {
	--lzg-bg: var(--panel);
	--lzg-panel: var(--panel-2);
	--lzg-fg: var(--ink);
	--lzg-muted: var(--muted);
	--lzg-line: var(--line);
	--lzg-accent: var(--good);
	--lzg-accent-soft: var(--good-wash);
	--lzg-warn: var(--dawn);
	--lzg-done: var(--good-wash);
	--lzg-out: var(--panel-2);
	font-family: var(--font-b);
	border-radius: var(--radius);
}
body .lzg-tool .lzg-tool-title { font-family: var(--font-d); text-transform: uppercase; letter-spacing: 0.02em; color: var(--ink); margin-top: 0; }
body .lzg-tool button[aria-pressed="true"] { color: #0b0c0e; }
body .lzg-tool table { background: none; }
body .lzg-tool th, body .lzg-tool td { word-break: normal; overflow-wrap: normal; background: none; text-transform: none; letter-spacing: normal; font-family: inherit; white-space: normal; }
body .lzg-tool td:first-child { font-weight: inherit; }
body .lzg-tool .lzg-col-who { min-width: 9.5em; }
body .lzg-tool .lzg-tree-wrap, body .lzg-tool details.lzg-expired { border-radius: 8px; }
body .lzg-tool details.lzg-expired { border: 0; background: none; margin-bottom: 0; }
body .lzg-tool details.lzg-expired > summary { padding: 6px 0; min-height: 0; }
body .lzg-tool details.lzg-expired > *:not(summary) { padding: 0; }
body .lzg-tool .lzg-codes-table, body .lzg-tool .lzg-list, body .lzg-tool .lzg-static { display: table; }
body .lzg-tool .lzg-tool-root { overflow-x: auto; }

.page-links { margin: 24px 0; font-family: var(--font-m); font-size: 0.85rem; display: flex; gap: 10px; }
.related { margin-top: 48px; padding-top: 30px; border-top: 1px solid var(--line); }
.related .guide-grid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }

/* ---------- archives, search, 404 ---------- */
.archive-wrap { padding-bottom: 10px; }
.archive-head { padding: 14px 0 26px; max-width: 820px; }
.archive-head h1 { display: flex; align-items: center; gap: 14px; }
.archive-head h1 svg { width: 0.9em; height: 0.9em; color: var(--accent); flex: none; }
.archive-intro { color: var(--ink-dim); font-size: 1.05rem; margin: 0 0 20px; }
.archive-head .searchbar { box-shadow: none; margin-top: 6px; }
.other-topics { padding-top: 46px; }
.pagination, .comments-pagination { margin: 30px 0 0; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nav-links .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 2.7rem; min-height: 2.7rem; padding: 0 12px;
	border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); text-decoration: none; font-weight: 600;
}
.nav-links .page-numbers.current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

/* ---------- comments ---------- */
.comments-area { margin-top: 48px; padding-top: 30px; border-top: 1px solid var(--line); max-width: 76ch; }
.comments-title, .comment-reply-title { font-family: var(--font-d); text-transform: uppercase; font-size: 1.4rem; letter-spacing: 0.02em; margin: 0 0 16px; }
.comment-list { list-style: none; margin: 0 0 30px; padding: 0; }
.comment-list .children { list-style: none; padding-left: 22px; }
.comment-body { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; margin-bottom: 12px; }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-family: var(--font-m); font-size: 0.76rem; margin: 4px 0 8px; }
.comment-metadata a { color: var(--muted); text-decoration: none; }
.comment-form label { display: block; font-size: 0.88rem; color: var(--ink-dim); font-weight: 600; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: var(--ink); padding: 11px 14px; font-size: 1rem;
}
.comment-form .submit {
	background: var(--accent); border: 0; color: var(--on-accent); border-radius: 8px; font-family: var(--font-d); font-weight: 600;
	text-transform: uppercase; letter-spacing: 0.07em; padding: 0 24px; cursor: pointer; min-height: 3rem; font-size: 1rem;
}

/* ---------- print ---------- */
@media print {
	.site-header, .site-footer, .guide-side, .related, .signup, .widget-area, .comments-area { display: none !important; }
	body { background: #fff; color: #000; }
	.entry-content, .entry-content strong, .entry-content h2, .entry-content h3 { color: #000; }
}
