/*
Theme Name: MugTools
Theme URI: https://mugtools.ir
Author: ژابیز پردا
Author URI: https://jabizparda.com
Description: قالب اختصاصی وب‌سایت ابزارهای ماگ (MugTools) — معرفی باگ‌ماگ، لاگ‌ماگ، دی‌بی‌ماگ، سرورماگ و بوردماگ، با بلاگ. فارسی، راست‌چین، سبک و بدون صفحه‌ساز؛ هم‌خانواده با قالب سایت‌های هر ابزار.
Version: 1.1.0
Requires at least: 6.4
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: mugtools
*/

/*
IRAN Sans-serif fonts are considered a proprietary software. To gain information about the laws regarding the use of these fonts, please visit www.fontiran.com
--------------------------------------------------------------------------------------
This set of fonts are used in this project under the license: (KBMJU7GR)
--------------------------------------------------------------------------------------
*/

@font-face {
	font-family: "Narengi";
	src: url("assets/fonts/NarengiVF.woff2") format("woff2-variations"),
	     url("assets/fonts/NarengiVF.woff2") format("woff2");
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

/* ---------- Tokens: the Mug family palette ---------- */
:root {
	--ink: #262A33;
	--ink-2: #333846;
	--accent: #FF6B4A;
	--accent-dark: #E15535;
	--accent-ink: #C2410C;      /* coral that passes 4.5:1 on white, for text links */
	--accent-soft: #FFF3EE;
	--bg: #ffffff;
	--bg-soft: #F6F6F9;
	--line: #E7E7EE;
	--text: #2B2F38;
	--muted: #646973;
	--ok: #2A9457;
	--radius: 14px;
	--radius-sm: 10px;
	--maxw: 1160px;
	--shadow: 0 1px 2px rgba(38, 42, 51, .04), 0 8px 24px rgba(38, 42, 51, .06);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: Narengi, Vazirmatn, Tahoma, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.9;
	color: var(--text);
	background: var(--bg);
	direction: rtl;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg, video { max-width: 100%; height: auto; }
h1, h2, h3, h4 { color: var(--ink); line-height: 1.45; margin: 0 0 .6em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.9rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.45rem, 1.2rem + 1vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
code, pre, kbd { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 820px; }
.center { text-align: center; }
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); white-space: nowrap;
}
.skip-link {
	position: absolute; top: -60px; right: 16px; z-index: 100;
	background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

/* Two-tone wordmark: "Bug" ink, "Mug" coral — as on every product site. */
.wordmark { font-weight: 900; letter-spacing: -.01em; color: var(--ink); white-space: nowrap; }
.wordmark b { color: var(--accent); font-weight: 900; }

/* ---------- Buttons, chips, links ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 10px 22px; border-radius: 12px;
	font: inherit; font-weight: 700; font-size: .98rem; line-height: 1.4;
	border: 1.5px solid transparent; cursor: pointer;
	transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-light { background: #fff; color: var(--ink); }
.btn-sm { min-height: 38px; padding: 6px 16px; font-size: .9rem; border-radius: 10px; }

.chip {
	display: inline-block; padding: 2px 12px; border-radius: 999px;
	background: var(--accent-soft); color: var(--accent-ink);
	font-size: .8rem; font-weight: 700; line-height: 1.9;
}
.eyebrow { color: var(--accent-ink); font-weight: 800; font-size: .9rem; margin-bottom: .5em; }
.lead { font-size: 1.12rem; color: var(--muted); }
.link-more { color: var(--accent-ink); font-weight: 700; }
.link-more::after { content: " ←"; }
.link-more:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-ext { color: var(--muted); font-size: .88rem; }
.link-ext:hover { color: var(--ink); }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: rgba(255, 255, 255, .92);
	backdrop-filter: saturate(1.4) blur(10px);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand .mark { flex: none; border-radius: 8px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand .wordmark { font-size: 1.2rem; }
.brand-fa { font-size: .78rem; color: var(--muted); font-weight: 600; }

.site-nav { margin-inline-start: auto; }
.site-nav .menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
	display: block; padding: 8px 12px; border-radius: 10px;
	font-weight: 600; font-size: .95rem; color: var(--ink-2);
}
.site-nav a:hover, .site-nav .current-menu-item > a, .site-nav .current_page_item > a,
.site-nav .current_page_parent > a { background: var(--bg-soft); color: var(--ink); }

.nav-toggle {
	display: none; margin-inline-start: auto; width: 44px; height: 44px;
	border: 1px solid var(--line); border-radius: 10px; background: #fff; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
	display: block; width: 20px; height: 2px; background: var(--ink); margin: 0 auto;
	position: relative; transition: transform .2s;
}
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; right: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-open .nav-toggle-bars { background: transparent; }
.nav-open .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
	.nav-toggle { display: block; }
	.site-nav {
		position: absolute; inset-inline: 0; top: 100%;
		background: #fff; border-bottom: 1px solid var(--line);
		display: none; padding: 8px 16px 16px;
	}
	.nav-open .site-nav { display: block; }
	.site-nav .menu { flex-direction: column; }
	.site-nav a { padding: 12px; }
}
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-tight { padding: 40px 0 72px; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 760px; margin-bottom: 40px; }
.section-head p:last-child { color: var(--muted); margin-bottom: 0; }
.section-head-row { max-width: none; display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head-row h2 { margin-bottom: 0; }

/* ---------- Hero ---------- */
.hero {
	padding: 72px 0 80px;
	background:
		radial-gradient(900px 400px at 85% -10%, var(--accent-soft), transparent 70%),
		linear-gradient(180deg, #fff, var(--bg-soft));
	border-bottom: 1px solid var(--line);
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero h1 .hl { color: var(--accent); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 22px; }
.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; color: var(--muted); font-size: .92rem; }
.hero-points li::before { content: "✓"; color: var(--ok); font-weight: 900; margin-inline-end: 6px; }

.mini-stack {
	display: grid; grid-template-columns: 1fr 112px; grid-template-rows: repeat(4, auto); gap: 10px;
	background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 16px;
	box-shadow: var(--shadow);
}
.mini-layer, .mini-side {
	display: flex; align-items: center; gap: 10px; padding: 12px 14px;
	border: 1px solid var(--line); border-radius: 12px; background: var(--bg-soft);
}
.mini-layer { grid-column: 1; }
.mini-layer svg, .mini-side svg { flex: none; border-radius: 7px; }
.mini-name { font-size: .95rem; }
.mini-q { margin-inline-start: auto; font-size: .8rem; color: var(--muted); }
.mini-side {
	grid-column: 2; grid-row: 1 / span 4; flex-direction: column; justify-content: center;
	text-align: center; background: var(--accent-soft); border-style: dashed; border-color: #FFC9BA;
}
.mini-side .mini-q { margin: 0; }

@media (max-width: 900px) {
	.hero { padding: 48px 0 56px; }
	.hero-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 480px) {
	.mini-stack { grid-template-columns: 1fr; }
	.mini-side { grid-column: 1; grid-row: auto; flex-direction: row; }
	.mini-side .mini-q { margin-inline-start: auto; }
}

/* ---------- Tool cards ---------- */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tool-card {
	display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 24px; transition: border-color .15s, box-shadow .15s, transform .15s;
}
.tool-card:hover { border-color: #D6D6E0; box-shadow: var(--shadow); transform: translateY(-2px); }
.tool-card-head { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.tool-card-head svg { flex: none; border-radius: 12px; }
.tool-card h3 { margin: 0 0 4px; font-size: 1.2rem; }
.tool-card h3 .wordmark { font-size: .85rem; color: var(--muted); font-weight: 800; margin-inline-start: 4px; }
.tool-card h3 .wordmark b { color: var(--accent); }
.tool-q { font-weight: 700; color: var(--ink); margin-bottom: .5em; }
.tool-card > p:not(.tool-q) { color: var(--muted); font-size: .95rem; }
.tool-card-foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tool-card-note { background: var(--ink); color: #DADCE3; border-color: var(--ink); }
.tool-card-note:hover { transform: none; }
.tool-card-note h3 { color: #fff; }
.tool-card-note ul { list-style: none; margin: 0; padding: 0; font-size: .93rem; }
.tool-card-note li { padding: 9px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.tool-card-note li:first-child { border-top: 0; }
.tool-card-note a { color: var(--accent); font-weight: 800; white-space: nowrap; }
.tool-card-note a::before { content: "← "; }

@media (max-width: 960px) { .tool-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .tool-grid { grid-template-columns: 1fr; } }

/* ---------- Stack diagram ---------- */
.stack { display: grid; grid-template-columns: 1fr 300px; gap: 24px; align-items: stretch; }
.stack-layers { list-style: none; margin: 0; padding: 0; }
.stack-layer {
	display: grid; grid-template-columns: 170px 1fr; align-items: center; gap: 16px;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px;
}
.stack-tag { display: flex; align-items: center; gap: 10px; font-weight: 800; color: var(--ink); }
.stack-tag span {
	display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px;
	background: var(--accent-soft); color: var(--accent-ink); font-size: .9rem;
}
.stack-tool { display: flex; align-items: center; gap: 12px; }
.stack-tool svg { flex: none; border-radius: 10px; }
.stack-tool strong { display: block; color: var(--ink); }
.stack-tool small { display: block; color: var(--muted); font-size: .88rem; }
a.stack-tool:hover strong { color: var(--accent-ink); }
.stack-link { display: flex; gap: 14px; padding: 10px 16px 10px 0; margin-inline-start: 30px; border-inline-start: 2px dashed #FFC9BA; }
.stack-arrow { color: var(--accent); font-weight: 900; margin-inline-start: -24px; background: var(--bg-soft); line-height: 1.6; }
.stack-link p { margin: 0; font-size: .92rem; color: var(--muted); }
.stack-side {
	background: #fff; border: 1.5px dashed #FFC9BA; border-radius: var(--radius); padding: 20px;
	display: flex; flex-direction: column; gap: 12px;
}
.stack-side p { margin: 0; color: var(--muted); font-size: .93rem; }
.stack-side .stack-side-note { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--line); color: var(--text); }
@media (max-width: 900px) {
	.stack { grid-template-columns: 1fr; }
	.stack-layer { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Story ---------- */
.story { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 16px; }
.story li {
	position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
	padding: 22px 24px 18px 24px; padding-inline-start: 72px;
}
.story li::before {
	counter-increment: s; content: counter(s, persian);
	position: absolute; inset-inline-start: 22px; top: 22px;
	width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
	background: var(--ink); color: #fff; font-weight: 800;
}
.story-tool { display: inline-flex; align-items: center; gap: 8px; font-size: .85rem; font-weight: 800; color: var(--accent-ink); margin-bottom: 4px; }
.story-tool svg { border-radius: 7px; }
.story h3 { margin-bottom: .35em; }
.story p { margin: 0; color: var(--muted); }
.story code { background: var(--bg-soft); padding: 1px 6px; border-radius: 6px; color: var(--ink); }
.story-note { margin-top: 20px; color: var(--muted); font-size: .93rem; }
.story-note a { color: var(--accent-ink); font-weight: 700; }

/* ---------- Comparison table ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.compare { width: 100%; border-collapse: collapse; min-width: 760px; font-size: .94rem; }
.compare th, .compare td { padding: 14px 16px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare thead th { background: var(--bg-soft); font-size: .85rem; color: var(--muted); font-weight: 700; }
.compare tbody tr:last-child > * { border-bottom: 0; }
.compare tbody th a { display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; color: var(--ink); }
.compare tbody th svg { border-radius: 6px; }
.compare td a { color: var(--accent-ink); font-weight: 700; white-space: nowrap; }

/* ---------- Principles ---------- */
.principles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.principles > div { border-top: 3px solid var(--accent); padding-top: 16px; }
.principles p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 900px) { .principles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .principles { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */
.faq { display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
.faq summary {
	cursor: pointer; list-style: none; padding: 16px 0; font-weight: 700; color: var(--ink);
	display: flex; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-weight: 900; font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--muted); padding-bottom: 6px; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #DADCE3; padding: 56px 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-inner h2 { color: #fff; margin-bottom: .3em; }
.cta-inner p { margin: 0; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.cta-tools { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-tools a {
	display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 86px;
	padding: 12px 10px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .12);
	font-size: .85rem; font-weight: 700; color: #fff;
}
.cta-tools a:hover { border-color: var(--accent); }
.cta-tools svg { border-radius: 8px; }

/* ---------- Tool page ---------- */
.hero-tool { padding-top: 28px; }
.tool-hero { display: flex; gap: 32px; align-items: flex-start; margin-top: 20px; }
.tool-hero-icon svg { border-radius: 22px; box-shadow: var(--shadow); }
.tool-hero .lead { max-width: 760px; }
.tool-hero .wordmark { font-size: 1em; }
@media (max-width: 640px) {
	.tool-hero { flex-direction: column; gap: 16px; }
	.tool-hero-icon svg { width: 64px; height: 64px; }
}
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 28px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.feature h3 { font-size: 1.05rem; }
.feature h3::before { content: ""; display: block; width: 28px; height: 4px; border-radius: 4px; background: var(--accent); margin-bottom: 12px; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .feature-grid { grid-template-columns: 1fr; } }

.family { display: grid; grid-template-columns: 300px 1fr; gap: 32px; align-items: start; }
.family-stack { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.family-stack a {
	display: flex; align-items: center; gap: 10px; padding: 12px 14px;
	border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.family-stack svg { border-radius: 7px; flex: none; }
.family-stack small { margin-inline-start: auto; color: var(--muted); }
.family-stack .is-side a { border-style: dashed; margin-top: 8px; }
.family-stack .is-current a { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.family-stack a:hover { border-color: var(--ink); }
.family-link { border-inline-start: 3px solid var(--accent); padding-inline-start: 18px; margin-bottom: 24px; }
.family-link h3 a { color: var(--accent-ink); }
.family-link p { color: var(--muted); margin: 0; }
@media (max-width: 860px) { .family { grid-template-columns: 1fr; } }

.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.fact { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.fact h2 { font-size: 1.1rem; }
.fact ul { margin: 0; padding-inline-start: 1.2em; }
.fact li { margin-bottom: .3em; }
.fact p { color: var(--muted); }
.fact-not { background: #FCFCFD; }
.fact-not ul { list-style: none; padding: 0; }
.fact-not li::before { content: "✕"; color: #C92A5E; font-weight: 900; margin-inline-end: 8px; }
@media (max-width: 720px) { .facts { grid-template-columns: 1fr; } }

/* ---------- Page head, breadcrumbs ---------- */
.page-head { padding: 36px 0 32px; background: linear-gradient(180deg, #fff, var(--bg-soft)); border-bottom: 1px solid var(--line); }
.page-head h1 { margin-top: 8px; }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; font-size: .85rem; color: var(--muted); }
.crumbs li + li::before { content: "‹"; margin-inline-end: 4px; color: #B4B7BF; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs li[aria-current] { color: var(--ink-2); max-width: 32ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Blog ---------- */
.topics { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 20px; }
.topics a {
	padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
	font-size: .9rem; font-weight: 600; color: var(--ink-2);
}
.topics a:hover { border-color: var(--ink); }
.topics a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.topics-search { margin-inline-start: auto; }
.topics-search input { min-width: 200px; }
@media (max-width: 640px) { .topics-search { width: 100%; margin: 4px 0 0; } .topics-search input { width: 100%; } }

input[type="search"], input[type="text"], input[type="email"], textarea {
	font: inherit; font-size: .95rem; padding: 8px 14px; min-height: 40px;
	border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text);
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-form { display: flex; gap: 8px; margin-top: 16px; max-width: 520px; }
.search-form input { flex: 1; }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 960px) { .post-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .post-grid { grid-template-columns: 1fr; } }

.post-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .15s, transform .15s; }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.post-card-cover { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); }
.post-card-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.post-card-body .chip { align-self: flex-start; margin-bottom: 8px; }
.post-card-title { font-size: 1.08rem; margin-bottom: .4em; }
.post-card-title a:hover { color: var(--accent-ink); }
.post-card-body > p:not(.meta) { color: var(--muted); font-size: .93rem; }
.meta { color: var(--muted); font-size: .84rem; display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; }

/* Drawn cover for posts without a featured image. */
.cover-art {
	width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; gap: 14px;
	background:
		radial-gradient(circle at 20% 120%, rgba(255, 107, 74, .35), transparent 55%),
		radial-gradient(circle at 90% -20%, rgba(255, 255, 255, .08), transparent 50%),
		var(--ink);
	color: #fff; font-weight: 900; font-size: 1.35rem;
}
.cover-art svg { border-radius: 12px; box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }
.cover-art span::after { content: ""; display: block; width: 36px; height: 3px; background: var(--accent); border-radius: 3px; margin-top: 4px; }
.cover-bugmug { background-color: #2A2731; }
.cover-dbmug { background-color: #232A33; }
.cover-servermug { background-color: #1F2630; }
.cover-boardmug { background-color: #2B2A33; }

.post-featured {
	display: grid; grid-template-columns: 1.2fr 1fr; gap: 0; margin-bottom: 32px;
	background: #fff; border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.post-featured .post-card-cover { aspect-ratio: auto; min-height: 300px; }
.post-featured-body { padding: 32px; display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.post-featured-body h2 a:hover { color: var(--accent-ink); }
.post-featured-body > p:not(.meta):not(.eyebrow) { color: var(--muted); }
.post-featured-body .meta { margin: 0 0 16px; }
.post-featured-body .btn { align-self: flex-start; }
@media (max-width: 860px) {
	.post-featured { grid-template-columns: 1fr; }
	.post-featured .post-card-cover { min-height: 0; aspect-ratio: 16 / 9; }
	.post-featured-body { padding: 22px; }
}

.pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 40px; }
.pagination .page-numbers {
	min-width: 42px; height: 42px; padding: 0 12px; display: inline-grid; place-items: center;
	border: 1px solid var(--line); border-radius: 10px; background: #fff; font-weight: 700;
}
.pagination .current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination a:hover { border-color: var(--ink); }

/* ---------- Article ---------- */
.article-head { padding: 32px 0 8px; }
.article-head h1 { margin: 12px 0 14px; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.5rem); }
.article-head .lead { margin-bottom: 14px; }
.article-head .meta { margin: 0; }
.article-cover { margin-top: 28px; }
.article-cover img { border-radius: 18px; width: 100%; }
.article-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 56px; padding-top: 28px; padding-bottom: 72px; }
.article-body { min-width: 0; max-width: 760px; }
.article-side .sticky { position: sticky; top: 96px; display: grid; gap: 20px; }
.side-title { font-size: .95rem; margin-bottom: 10px; }
.side-box { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; }
.side-tools ul { list-style: none; margin: 0; padding: 0; }
.side-tools a { display: flex; gap: 10px; align-items: center; padding: 7px 0; font-weight: 700; font-size: .92rem; }
.side-tools a:hover { color: var(--accent-ink); }
.side-tools svg { border-radius: 6px; flex: none; }
.side-tools small { display: block; color: var(--muted); font-weight: 500; font-size: .78rem; line-height: 1.3; }

.toc ol { margin: 0; padding-inline-start: 1.1em; font-size: .9rem; }
.toc ol ol { padding-inline-start: 1em; margin: 4px 0; font-size: .86rem; }
.toc li { margin: 4px 0; color: var(--muted); }
.toc a:hover, .toc a.is-active { color: var(--accent-ink); }
.toc a.is-active { font-weight: 700; }
.toc-side { border-inline-start: 2px solid var(--line); padding-inline-start: 16px; max-height: calc(100vh - 360px); overflow: auto; }
.toc-inline { display: none; border: 1px solid var(--line); border-radius: 12px; padding: 12px 18px; margin-bottom: 24px; background: var(--bg-soft); }
.toc-inline summary { cursor: pointer; font-weight: 800; color: var(--ink); }
.toc-inline ol { margin-top: 8px; }
@media (max-width: 1020px) {
	.article-layout { grid-template-columns: 1fr; gap: 32px; }
	.article-body { max-width: none; }
	.toc-inline { display: block; }
	.toc-side { display: none; }
	.article-side .sticky { position: static; }
}

/* Long-form text */
.prose { font-size: 1.06rem; line-height: 2.05; }
.prose > * + * { margin-top: 0; }
.prose h2 { margin-top: 2em; font-size: 1.55rem; scroll-margin-top: 96px; }
.prose h3 { margin-top: 1.6em; font-size: 1.2rem; scroll-margin-top: 96px; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-inline-start: 1.4em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--accent); }
.prose strong { color: var(--ink); }
.prose blockquote, .prose .wp-block-quote {
	margin: 1.6em 0; padding: 16px 22px; border: 0; border-inline-start: 4px solid var(--accent);
	background: var(--accent-soft); border-radius: 0 12px 12px 0; color: var(--ink-2);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose :not(pre) > code { background: var(--bg-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; color: var(--ink); direction: ltr; unicode-bidi: isolate; }
.prose pre, .prose .wp-block-code {
	direction: ltr; text-align: left; background: #1E2129; color: #E6E8EE;
	padding: 18px 20px; border-radius: 12px; overflow-x: auto; margin: 1.4em 0;
	font-size: .88rem; line-height: 1.75; border: 0;
}
.prose pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.prose .wp-block-table { margin: 1.6em 0; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: start; vertical-align: top; }
.prose thead th { background: var(--bg-soft); }
.prose img { border-radius: 12px; }
.prose figcaption { color: var(--muted); font-size: .88rem; text-align: center; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 32px 0 0; }
.tags a { font-size: .85rem; padding: 4px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-2); }
.tags a:hover { background: var(--accent-soft); color: var(--accent-ink); }

.share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.share a, .share button {
	font: inherit; font-size: .85rem; padding: 4px 12px; border-radius: 8px;
	border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer;
}
.share a:hover, .share button:hover { border-color: var(--ink); }

.tool-box {
	display: flex; gap: 18px; align-items: flex-start; margin-top: 36px; padding: 24px;
	background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius);
}
.tool-box svg { flex: none; border-radius: 12px; }
.tool-box h2 { font-size: 1.1rem; margin-bottom: .4em; }
.tool-box p { color: var(--muted); font-size: .95rem; }
.tool-box-links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin: 0; }
.tool-box-wide { margin: 0 0 32px; align-items: center; }
.tool-box-wide p { margin: 0; }
.tool-box-wide .btn { margin-inline-start: auto; flex: none; }
@media (max-width: 640px) { .tool-box, .tool-box-wide { flex-direction: column; } .tool-box-wide .btn { margin: 0; } }

.page-links { margin-top: 24px; }

/* Comments (closed by default; styled in case an editor opens them). */
.comments-area { margin-top: 48px; }
.comment-list { list-style: none; padding: 0; }
.comment-body { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.comment-form textarea { width: 100%; }

/* ---------- 404 ---------- */
.page-404 { text-align: center; padding: 72px 0; }
.page-404 .search-form { margin: 16px auto; }
.big-404 { font-size: 5rem; font-weight: 900; color: var(--accent); line-height: 1; margin: 0; }
.links-404 { list-style: none; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 24px; }
.links-404 a { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; }
.links-404 a:hover { border-color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { background: #1E2129; color: #A9ADB8; padding: 56px 0 0; font-size: .93rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.brand-light .wordmark { color: #fff; }
.brand-light .brand-fa { color: #A9ADB8; }
.footer-about p { margin-top: 16px; max-width: 340px; }
.footer-title { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.footer-list, .footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-list li { padding: 4px 0; display: flex; justify-content: space-between; gap: 8px; }
.footer-list a:hover, .footer-menu a:hover, .footer-bottom a:hover { color: #fff; }
.footer-list .ext { color: #6F7482; font-size: .82rem; }
.footer-menu { margin-top: 12px; display: flex; gap: 14px; flex-wrap: wrap; }
.footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 18px 20px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .85rem; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Small screens: section rhythm ---------- */
@media (max-width: 640px) {
	.section { padding: 56px 0; }
	.section-head { margin-bottom: 28px; }
	.story li { padding-inline-start: 22px; padding-top: 64px; }
	.story li::before { top: 18px; }
	.cta-band { padding: 44px 0; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
	.site-header, .site-footer, .article-side, .share, .cta-band, .tool-box { display: none !important; }
	.article-layout { display: block; }
}
