/*
Theme Name: GadjetGeek
Theme URI: https://gadjetgeek.ir
Author: GadjetGeek
Description: قالب اختصاصی گجت‌گیک؛ مجلهٔ ترفندهای ویندوز، شبکه، لینوکس و هوش مصنوعی. راست‌چین، سبک، با حالت تاریک، جلد خودکار مطالب و سئوی داخلی.
Version: 1.1.0
Requires at least: 6.4
Tested up to: 7.2
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gadjetgeek
*/

/* ==========================================================================
   Fonts (self-hosted)
   ========================================================================== */

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

@font-face {
	font-family: "JetBrains Mono";
	src: url("assets/fonts/jetbrains-mono-var.woff2") format("woff2-variations"), url("assets/fonts/jetbrains-mono-var.woff2") format("woff2");
	font-weight: 100 800;
	font-style: normal;
	font-display: swap;
}

/* ==========================================================================
   Tokens
   ========================================================================== */

:root {
	--bg: #F7F5FF;
	--surface: #FFFFFF;
	--surface-2: #EFEAFE;
	--ink: #120F1C;
	--ink-2: #47435A;
	--ink-3: #625D75;
	--line: #E4DDF8;
	--dash: #C9BDF0;
	--brand: #7C3AED;
	--brand-2: #DB2777;
	--brand-ink: #6D28D9;
	--on-brand: #FFFFFF;
	--accent: #06B6D4;
	--grad: linear-gradient(135deg, var(--brand), var(--brand-2));
	--glow: rgba(124, 58, 237, .26);
	--glass: rgba(255, 255, 255, .66);
	--glass-strong: rgba(255, 255, 255, .74);
	--glass-line: rgba(124, 58, 237, .14);
	--foot: #130C22;
	--foot-line: #2A1F45;
	--win: #1D4ED8; --win-t: #E8EEFE;
	--net: #0E7490; --net-t: #E0F4F8;
	--linux: #166534; --linux-t: #E3F5E8;
	--ai: #6D28D9; --ai-t: #F0E9FD;
	--soft: #854D0E; --soft-t: #FBF3DB;
	--gadget: #BE123C; --gadget-t: #FDE8EC;
	--cover: #14111F;
	--warn: #9A5B07; --warn-t: #FFF6E6; --warn-b: #F3D9A8;
	--tip: #0F766E; --tip-t: #E8F6F3; --tip-b: #BFE3DB;
	--font: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
	--mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
	--gutter: clamp(16px, 3vw, 32px);
	color-scheme: light;
}

html.dark {
	--bg: #0D0B14;
	--surface: #15121E;
	--surface-2: #1D1929;
	--ink: #F2F0F8;
	--ink-2: #BDB8CC;
	--ink-3: #9A94AD;
	--line: #2A2539;
	--dash: #3C3550;
	--brand: #8B5CF6;
	--brand-2: #EC4899;
	--brand-ink: #C4A6FF;
	--glow: rgba(139, 92, 246, .34);
	--glass: rgba(13, 11, 20, .62);
	--glass-strong: rgba(13, 11, 20, .74);
	--glass-line: rgba(255, 255, 255, .08);
	--foot: #0A0812;
	--foot-line: #241E36;
	--win: #93B4FF; --win-t: #17223C;
	--net: #67E8F9; --net-t: #0B2830;
	--linux: #86EFAC; --linux-t: #0F2A1A;
	--ai: #C6A8FF; --ai-t: #221A39;
	--soft: #FDE68A; --soft-t: #2B220C;
	--gadget: #FFA3B4; --gadget-t: #36161E;
	--cover: #1B1728;
	--warn: #FBC25E; --warn-t: #261D0F; --warn-b: #4A3719;
	--tip: #5EE0CC; --tip-t: #0E2422; --tip-b: #1D423D;
	color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-h, 0px) + var(--wp-admin--admin-bar--height, 0px) + 16px); }

body {
	margin: 0;
	direction: rtl;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.8;
	background: var(--bg);
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--brand-ink); }
img, svg, video { max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
::placeholder { color: var(--ink-3); opacity: 1; }
h1, h2, h3, h4 { line-height: 1.55; }

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

.skip-link {
	position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
	background: var(--brand); color: var(--on-brand); font-weight: 800; padding: 10px 16px; border-radius: 10px;
}
.skip-link:focus { top: 12px; color: var(--on-brand); z-index: 200; }

.wrap { max-width: 1240px; margin-inline: auto; padding-inline: var(--gutter); }
.muted { color: var(--ink-3); font-size: 13px; }
.sep { display: inline-block; width: 1px; height: .95em; background: currentColor; opacity: .45; margin-inline: 8px; vertical-align: -0.12em; }
.post-meta .sep { margin-inline: 0; }
.empty { color: var(--ink-3); padding: 32px 0; }

/* Buttons */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line);
	background: var(--surface); color: var(--ink); font-weight: 700; font-size: 14px;
	cursor: pointer; text-decoration: none; transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--ink-3); color: var(--ink); }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--grad); border-color: transparent; color: var(--on-brand); font-weight: 800; box-shadow: 0 8px 22px -12px var(--glow); }
.btn--primary:hover { filter: brightness(1.08); border-color: transparent; color: var(--on-brand); }
.btn.is-on { background: var(--grad); border-color: transparent; color: var(--on-brand); }

/* Category pills */
.tag {
	display: inline-flex; align-items: center; align-self: flex-start;
	font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; line-height: 1.7;
}
a.tag:hover { filter: brightness(.95); }
.tag-win { color: #FFFFFF; background: var(--win); }
.tag-net { color: #FFFFFF; background: var(--net); }
.tag-linux { color: #FFFFFF; background: var(--linux); }
.tag-ai { color: #FFFFFF; background: var(--ai); }
.tag-soft { color: #FFFFFF; background: var(--soft); }
.tag-gadget { color: #FFFFFF; background: var(--gadget); }

/* ==========================================================================
   Generated covers
   ========================================================================== */

.cover {
	position: relative; aspect-ratio: 16 / 9; overflow: hidden; container-type: inline-size;
	background-color: var(--cover);
	background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.4px);
	background-size: 16px 16px;
	color: var(--cv);
}
.cv-win { --cv: #6E9BFF; } .cv-net { --cv: #22D3EE; } .cv-linux { --cv: #4ADE80; }
.cv-ai { --cv: #B28CFF; } .cv-soft { --cv: #FACC15; } .cv-gadget { --cv: #FF8FA3; }
.cv-ic { position: absolute; left: -3cqw; bottom: -12cqw; width: 50cqw; height: 50cqw; opacity: .3; }
.cv-chip {
	position: absolute; top: 5cqw; right: 5cqw; background: var(--cv); color: #0D0F12;
	font-weight: 800; font-size: max(10px, 3.2cqw); padding: .3em .95em; border-radius: 999px; line-height: 1.7;
}
.cv-mark { position: absolute; top: 4.5cqw; left: 4.5cqw; width: max(20px, 8.5cqw); height: max(20px, 8.5cqw); }
.cv-txt {
	position: absolute; right: 5cqw; bottom: 6cqw; left: 28cqw; color: #FFFFFF;
	font-weight: 900; font-size: clamp(13px, 7.4cqw, 46px); line-height: 1.45;
}
.cover.mini .cv-ic { left: 50%; top: 50%; bottom: auto; width: 40cqw; height: 40cqw; transform: translate(-50%, -50%); opacity: .95; }
.cover--img { background: var(--surface-2); }
.cover--img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Top strip and header
   ========================================================================== */

.topstrip { background: var(--grad); color: #FFFFFF; font-size: 13px; }
.topstrip__in { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; padding-block: 8px; }
.topstrip__date { color: rgba(255, 255, 255, .85); }
.topstrip__new { display: flex; align-items: center; gap: 8px; color: #FFFFFF; min-width: 0; }
.topstrip__new:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }
.topstrip__title { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.badge-new { background: #FFFFFF; color: #6D28D9; font-weight: 800; font-size: 11px; padding: 2px 8px; border-radius: 6px; flex: none; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header__top { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding-top: 14px; padding-bottom: 8px; }

.logo { display: flex; align-items: center; gap: 11px; color: var(--ink); }
.logo:hover { color: var(--ink); }
.logo__mark { width: 44px; height: 44px; flex: none; display: block; }
.logo__text { display: flex; flex-direction: column; line-height: 1.15; }
.logo__name { font-weight: 900; font-size: 23px; }
.logo__name span { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo__domain { font: 700 11px var(--mono); color: var(--ink-3); letter-spacing: .04em; text-align: right; }
.logo:hover .blink { animation: gg-blink 1s steps(1) infinite; }
@keyframes gg-blink { 50% { opacity: 0; } }

.search { position: relative; flex: 1 1 240px; max-width: 460px; margin-inline-start: auto; margin-block: 0; }
.search__icon { position: absolute; right: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search__input {
	width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--line);
	background: var(--surface-2); color: var(--ink); padding: 0 44px 0 14px; font-size: 15px;
}
.search__input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--glow); }

.theme-toggle {
	width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line);
	background: var(--surface-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; padding: 0;
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-sun { display: block; }
html.dark .theme-toggle .icon-moon { display: none; }

.main-nav .menu { display: flex; flex-wrap: wrap; gap: 0 4px; list-style: none; margin: 0; padding: 0; }
.main-nav .menu a {
	display: flex; align-items: center; min-height: 46px; padding: 0 12px;
	font-weight: 700; font-size: 15px; color: var(--ink-2); border-bottom: 3px solid transparent; white-space: nowrap;
}
.main-nav .menu a:hover { color: var(--ink); }
.main-nav .current-menu-item > a,
.main-nav .current-post-ancestor > a,
.main-nav .current-category-ancestor > a,
.main-nav .current-menu-parent > a { color: var(--ink); font-weight: 800; border-bottom-color: var(--brand); }

/* ==========================================================================
   Shared blocks: section heads, cards, tabs, widgets
   ========================================================================== */

.sec-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-title { margin: 0; display: flex; align-items: center; gap: 10px; font-size: 24px; font-weight: 900; }
.sec-title::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--grad); flex: none; }
.sec-more { display: flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 14px; color: var(--brand-ink); }

.meta-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ttl { transition: color .15s; }
.card:hover .ttl, .card a:hover .ttl { color: var(--brand-ink); }
.excerpt { margin: 0; font-size: 15px; line-height: 1.9; color: var(--ink-2); }

.card-feature, .card-side, .card-grid, .card-wide {
	background: var(--surface); border: 1px solid var(--line); border-radius: 18px; overflow: hidden;
}
.card-feature > a, .card-side > a { display: block; }
.card-feature__body { padding: 22px 26px 26px; display: flex; flex-direction: column; gap: 10px; }
.card-feature__title { margin: 0; font-size: clamp(22px, 2.3vw, 31px); font-weight: 900; line-height: 1.55; }
.card-side__body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; }
.card-side__title { margin: 0; font-size: 17px; font-weight: 800; line-height: 1.8; }

.card-row { border-top: 1px solid var(--line); padding: 18px 0; }
.card-row > a { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.card-row .cover { flex: 1 1 220px; min-width: 0; border-radius: 12px; }
.card-row__body { flex: 999 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.card-row__title { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.75; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 20px; }
.card-grid > a { display: flex; flex-direction: column; height: 100%; }
.card-grid__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.card-grid__title { margin: 0; font-size: 16px; font-weight: 800; line-height: 1.85; }

.card-mini { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.card-mini .cover { flex: 0 0 104px; border-radius: 10px; }
.card-mini__body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.card-mini__title { font-size: 15px; font-weight: 800; line-height: 1.8; }
.card-mini--boxed { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.card-mini--boxed .cover { flex-basis: 116px; }
.mini-list--tight .card-mini .cover { flex-basis: 92px; }
.mini-list--tight .card-mini__title { font-size: 14px; }
.mini-list > .card-mini:first-child { border-top: 0; }

.card-wide > a { display: flex; flex-wrap: wrap; height: 100%; }
.card-wide .cover { flex: 1 1 300px; min-width: 0; }
.card-wide__body { flex: 1 1 260px; min-width: 0; padding: 22px 24px; display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.card-wide__title { margin: 0; font-size: 21px; font-weight: 900; line-height: 1.7; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tab {
	min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
	background: var(--surface); color: var(--ink-2); font-weight: 700; font-size: 14px; cursor: pointer;
}
.tab:hover { border-color: var(--ink-3); color: var(--ink); }
.tab[aria-selected="true"] { background: var(--grad); color: var(--on-brand); border-color: transparent; }
.tab-panel[hidden] { display: none; }

.more-wrap { border-top: 1px solid var(--line); padding-top: 22px; display: flex; justify-content: center; }
.more-wrap--all { margin-top: 0; }
.tab-panel .more-wrap { margin-bottom: 0; }

.chips { margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.chips__label { font-weight: 800; font-size: 14px; color: var(--ink-2); margin-inline-end: 4px; }
.chip {
	display: flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px;
	background: var(--surface); border: 1px solid var(--line); font-size: 14px; font-weight: 600;
}
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip--sm { min-height: 38px; padding: 0 14px; font-size: 13px; }

.with-aside { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.with-aside__main { flex: 999 1 560px; min-width: 0; }
.aside { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

.widget { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; }
.widget--soft { background: var(--surface-2); border-color: transparent; }
.widget__title { margin: 0 0 8px; font-size: 18px; font-weight: 900; }
.widget__text { margin: 0 0 14px; font-size: 14px; line-height: 1.9; color: var(--ink-2); }
.popular { list-style: none; margin: 0; padding: 0; }
.popular li { border-top: 1px solid var(--line); }
.popular li:first-child { border-top: 0; }
.popular a { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; }
.popular__n { font-size: 28px; font-weight: 900; line-height: 1.1; min-width: 24px; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.popular .ttl { font-size: 15px; font-weight: 700; line-height: 1.85; }

.newsletter { display: flex; flex-direction: column; gap: 10px; }
.newsletter label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.newsletter input {
	min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
	color: var(--ink); padding: 0 14px; text-align: left;
}
.ad-slot { display: flex; justify-content: center; }

/* ==========================================================================
   Homepage
   ========================================================================== */

.home { padding-top: 24px; }
.home-intro { margin-bottom: 20px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 14px; }
.home-intro h1 { margin: 0; font-size: clamp(20px, 2.1vw, 26px); font-weight: 900; line-height: 1.6; }
.home-intro p { margin: 0; font-size: 15px; color: var(--ink-3); }

.hero { display: flex; flex-wrap: wrap; gap: 24px; }
.hero .card-feature { flex: 2 1 560px; min-width: 0; }
.hero__side { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }

.home-latest { margin-top: 44px; }
.home-latest .sec-head { margin-bottom: 8px; }
.home-sec { margin-top: 56px; }

.boxes { display: flex; flex-wrap: wrap; gap: 24px; }
.box { flex: 1 1 380px; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; }
.box__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.box__title { margin: 0; display: flex; align-items: center; gap: 12px; font-size: 22px; font-weight: 900; }
.box__icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.box__icon svg { width: 22px; height: 22px; }

.ai-wrap { display: flex; flex-wrap: wrap; gap: 24px; }
.ai-wrap .card-wide { flex: 3 1 480px; min-width: 0; }
.ai-list { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }

/* ==========================================================================
   Breadcrumbs, archives, search, 404
   ========================================================================== */

.breadcrumbs { font-size: 13px; color: var(--ink-3); }
.breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.breadcrumbs li { display: flex; align-items: center; gap: 8px; }
.breadcrumbs li + li::before { content: "‹"; color: var(--ink-3); }
.breadcrumbs a { display: inline-flex; align-items: center; min-height: 32px; }

main.wrap:not(.home) { padding-top: 22px; }
.archive-head { display: flex; align-items: center; gap: 16px; margin: 14px 0 22px; }
.archive-head__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; flex: none; }
.archive-head__icon svg { width: 28px; height: 28px; }
.archive-head__title { margin: 0; font-size: clamp(24px, 3vw, 34px); font-weight: 900; }
.archive-head__desc { color: var(--ink-2); font-size: 15px; }
.archive-head__desc p { margin: 4px 0 0; }
.archive-head + .with-aside .with-aside__main > .card-row:first-child { border-top: 0; padding-top: 0; }

.empty-box { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.empty-box p { margin: 0; color: var(--ink-2); }
.empty-box .search { margin-inline-start: 0; max-width: none; }

.err404 { text-align: center; max-width: 620px; margin: 40px auto 0; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.err404__code { margin: 0; font-size: 96px; font-weight: 900; line-height: 1; color: var(--brand); }
.err404__title { margin: 0; font-size: 30px; font-weight: 900; }
.err404__text { margin: 0; color: var(--ink-2); }
.err404 .search { margin-inline-start: 0; width: 100%; max-width: 460px; }

.pagination { margin-top: 28px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.page-numbers {
	min-width: 44px; min-height: 44px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center;
	border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 700;
}
.page-numbers.current { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.page-numbers.dots { border: 0; background: none; }

/* ==========================================================================
   Single article
   ========================================================================== */

.single-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.single-main { flex: 999 1 560px; min-width: 0; max-width: 800px; }
.single-aside { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 24px; padding-top: 44px; }
.page-layout .page-main { max-width: 800px; margin-inline: auto; }

.post-head { margin-top: 12px; display: flex; flex-direction: column; gap: 14px; }
.post-title { margin: 0; font-size: clamp(28px, 3.3vw, 42px); font-weight: 900; line-height: 1.5; }
.post-lead { margin: 0; font-size: 18px; line-height: 2; color: var(--ink-2); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; font-size: 14px; color: var(--ink-3); }
.post-meta__author { font-weight: 800; color: var(--ink); }

.avatar-initials {
	width: 38px; height: 38px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line);
	display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--ink); flex: none;
}
.avatar-initials--lg { width: 56px; height: 56px; font-size: 16px; font-weight: 900; }

.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 800; }
.badge svg { width: 16px; height: 16px; flex: none; }
.badge--win { background: var(--win-t); color: var(--win); }
.badge--net { background: var(--net-t); color: var(--net); }
.badge--linux { background: var(--linux-t); color: var(--linux); }
.badge--ai { background: var(--ai-t); color: var(--ai); }
.badge--soft { background: var(--soft-t); color: var(--soft); }
.badge--gadget { background: var(--gadget-t); color: var(--gadget); }
.badge--ok { background: var(--tip-t); color: var(--tip); }

.post-cover { margin-top: 26px; }
.post-cover .cover { border-radius: 18px; }

.quick { margin-top: 24px; padding: 18px 22px; border-radius: 16px; background: var(--surface-2); border-inline-start: 4px solid var(--brand); }
.quick__title { margin: 0 0 6px; display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 900; }
.quick__title::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--grad); }
.quick p { margin: 0; font-size: 16px; line-height: 2; }

.toc { margin-top: 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.toc__toggle {
	width: 100%; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 0 20px; background: none; border: 0; color: var(--ink); font-weight: 900; font-size: 16px; cursor: pointer;
}
.toc__toggle .chev { width: 20px; height: 20px; transition: transform .2s; transform: rotate(180deg); }
.toc__toggle[aria-expanded="false"] .chev { transform: none; }
.toc__list { margin: 0; padding: 0 20px 14px; list-style: none; display: flex; flex-direction: column; }
.toc__list[hidden] { display: none; }
.toc__list a { display: flex; align-items: center; gap: 12px; min-height: 42px; font-size: 15px; font-weight: 600; color: var(--ink-2); line-height: 1.7; }
.toc__list a:hover { color: var(--brand-ink); }
.toc__n {
	width: 26px; height: 26px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center;
	font-size: 13px; font-weight: 800; color: var(--ink); flex: none;
}

/* Article body ---------------------------------------------------------- */

.prose { margin-top: 8px; font-size: 17px; line-height: 2.05; color: var(--ink); counter-reset: gstep; overflow-wrap: anywhere; }
.prose > * { margin-top: 0; }
.prose p { margin: 0 0 18px; }
.prose h2 { font-size: clamp(21px, 2vw, 26px); font-weight: 900; line-height: 1.6; margin: 48px 0 16px; scroll-margin-top: 8px; }
.prose h3 { font-size: 19px; font-weight: 800; margin: 32px 0 12px; scroll-margin-top: 8px; }
.prose h4 { font-size: 17px; font-weight: 800; margin: 24px 0 10px; }
.prose h2.is-style-gg-step { display: flex; align-items: center; gap: 12px; counter-increment: gstep; }
.prose h2.is-style-gg-step::before {
	content: counter(gstep, persian); flex: none; width: 36px; height: 36px; border-radius: 10px;
	background: var(--grad); color: var(--on-brand); display: grid; place-items: center; font-size: 18px; font-weight: 900; line-height: 1;
}
.prose a { color: var(--brand-ink); font-weight: 700; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { margin: 0 0 20px; padding-inline-start: 24px; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--ink-3); }
.prose strong { font-weight: 800; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 36px 0; }
.prose blockquote { margin: 0 0 22px; padding: 14px 20px; border-radius: 14px; background: var(--surface-2); color: var(--ink-2); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose figure { margin: 0 0 24px; }
.prose img { border-radius: 12px; }
.prose figcaption, .prose .wp-element-caption { margin-top: 8px; font-size: 13px; line-height: 1.8; color: var(--ink-3); text-align: center; }
.prose .wp-block-table { overflow-x: auto; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface); }
.prose th, .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: start; vertical-align: top; }
.prose th { background: var(--surface-2); font-weight: 800; }
.prose .wp-block-table table, .prose .wp-block-table td, .prose .wp-block-table th { overflow-wrap: normal; word-break: normal; }
.prose td code, .prose th code { white-space: nowrap !important; }
@media (max-width: 600px) {
	.prose .wp-block-table .has-fixed-layout { table-layout: auto; }
	.prose th, .prose td { padding: 8px 10px; font-size: 14px; }
}
.prose .alignwide { margin-inline: 0; }

.prose kbd, .prose .kbd {
	font-family: var(--mono); font-size: .8em; font-weight: 700; padding: .1em .55em; border-radius: 7px;
	border: 1px solid var(--line); border-bottom-width: 3px; background: var(--surface); color: var(--ink);
	direction: ltr; unicode-bidi: isolate; display: inline-block; line-height: 1.6;
}
.prose :not(pre) > code {
	font-family: var(--mono); font-size: .84em; background: var(--surface-2); padding: .12em .45em;
	border-radius: 6px; direction: ltr; unicode-bidi: isolate; color: var(--ink); white-space: nowrap;
}
@media (max-width: 600px) { .prose :not(pre) > code { white-space: normal; } }
.prose .gg-shot-ph {
	padding: 18px 20px; border: 2px dashed var(--line); border-radius: 14px; background: var(--surface-2);
	color: var(--ink-2); font-size: 15px; line-height: 1.9;
}

/* Code blocks (the bar with the copy button is added by theme.js) */
.prose pre, .prose .wp-block-code {
	direction: ltr; text-align: left; margin: 0 0 24px; padding: 16px 18px; overflow-x: auto;
	background: #0E1116; color: #E6E9EE; border: 1px solid #232831; border-radius: 14px;
	font: 500 14px/1.85 var(--mono); tab-size: 4;
}
.prose pre code { font: inherit; background: none; padding: 0; color: inherit; white-space: pre; }
.code-box { margin: 0 0 24px; border-radius: 14px; overflow: hidden; background: #0E1116; border: 1px solid #232831; }
.code-box > pre, .code-box > .wp-block-code { margin: 0; border: 0; border-radius: 0; }
.code-box__bar {
	display: flex; align-items: center; justify-content: space-between; gap: 12px; direction: ltr;
	padding: 6px 8px 6px 16px; background: #161A21; border-bottom: 1px solid #232831;
}
.code-box__lang { font: 700 12px var(--mono); color: #9BA3AF; }
.code-copy {
	min-height: 44px; padding: 0 14px; border-radius: 9px; border: 1px solid #2C323C; background: #1F242C;
	color: #E6E9EE; font: 700 13px var(--font); cursor: pointer;
}
.code-copy:hover { background: #2A3039; }

/* Numbered steps (List block, style "مراحل شماره‌دار") */
.prose ol.is-style-gg-steps { list-style: none; counter-reset: st; padding: 0; margin: 0 0 24px; display: flex; flex-direction: column; gap: 12px; }
.prose ol.is-style-gg-steps > li { counter-increment: st; position: relative; padding-inline-start: 48px; min-height: 34px; margin: 0; }
.prose ol.is-style-gg-steps > li::before {
	content: counter(st, persian); position: absolute; inset-inline-start: 0; top: 2px; width: 32px; height: 32px; border-radius: 50%;
	background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center;
	font-weight: 800; font-size: 15px; line-height: 1; color: var(--ink);
}

/* Callouts (Group block styles "هشدار" / "نکته" / "پاسخ کوتاه") */
.prose .is-style-gg-warn, .prose .is-style-gg-tip {
	position: relative; margin: 0 0 24px; padding: 16px 18px; padding-inline-start: 54px; border-radius: 14px; border: 1px solid;
	font-size: 15px; line-height: 1.95; color: var(--ink-2);
}
.prose .is-style-gg-warn { background: var(--warn-t); border-color: var(--warn-b); }
.prose .is-style-gg-tip { background: var(--tip-t); border-color: var(--tip-b); }
.prose .is-style-gg-warn::before, .prose .is-style-gg-tip::before {
	content: ""; position: absolute; inset-inline-start: 18px; top: 20px; width: 24px; height: 24px;
	-webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.prose .is-style-gg-warn::before {
	background: var(--warn);
	--ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.5L2.8 19.5h18.4z'/%3E%3Cpath d='M12 10v4.5'/%3E%3Cpath d='M12 17.2v.1'/%3E%3C/svg%3E");
}
.prose .is-style-gg-tip::before {
	background: var(--tip);
	--ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.6 10.8c.6.5 1.1 1.3 1.1 2.2h5c0-.9.5-1.7 1.1-2.2A6 6 0 0 0 12 3z'/%3E%3C/svg%3E");
}
.prose .is-style-gg-warn p, .prose .is-style-gg-tip p { margin-bottom: 8px; }
.prose .is-style-gg-warn > :last-child, .prose .is-style-gg-tip > :last-child { margin-bottom: 0; }
.prose .is-style-gg-warn strong:first-child, .prose .is-style-gg-tip strong:first-child { color: var(--ink); }
.prose .is-style-gg-quick { margin: 0 0 24px; padding: 18px 22px; border-radius: 16px; background: var(--surface-2); }
.prose .is-style-gg-quick > :last-child { margin-bottom: 0; }

/* FAQ (Details block) */
.prose .wp-block-details { border: 1px solid var(--line); background: var(--surface); border-radius: 14px; margin: 0 0 10px; padding: 0; }
.prose .wp-block-details summary {
	cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px;
	min-height: 58px; padding: 14px 20px; font-weight: 800; font-size: 16px; line-height: 1.8;
}
.prose .wp-block-details summary::-webkit-details-marker { display: none; }
.prose .wp-block-details summary::after {
	content: ""; width: 20px; height: 20px; flex: none; background: currentColor; transition: transform .2s;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.prose .wp-block-details[open] summary::after { transform: rotate(180deg); }
.prose .wp-block-details > :not(summary) { margin: 0; padding-inline: 20px; font-size: 15px; line-height: 2; color: var(--ink-2); }
.prose .wp-block-details > :last-child { padding-bottom: 18px; }

/* Feedback, tags, share, author box */
.feedback { margin-top: 36px; padding: 16px 20px; border-radius: 16px; background: var(--surface-2); min-height: 76px; display: flex; align-items: center; }
.feedback__ask { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; width: 100%; }
.feedback__q { font-weight: 800; font-size: 16px; }
.feedback__btns { display: flex; flex-wrap: wrap; gap: 8px; }
.feedback__thanks { margin: 0; font-weight: 800; }
.feedback__ask[hidden], .feedback__thanks[hidden] { display: none; }

.post-tags, .share { margin-top: 18px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.post-tags__label, .share__label { font-size: 14px; font-weight: 800; color: var(--ink-2); margin-inline-end: 4px; }

.author-box { margin-top: 28px; display: flex; align-items: flex-start; gap: 16px; padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); scroll-margin-top: 24px; }
.author-box__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.author-box__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.author-box__name { font-weight: 900; font-size: 17px; }
.author-box p { margin: 0; font-size: 14px; line-height: 1.95; color: var(--ink-2); }
.author-box__more { align-self: flex-start; display: flex; align-items: center; min-height: 40px; font-size: 14px; font-weight: 800; color: var(--brand-ink); }

.page-links { margin-top: 20px; display: flex; gap: 6px; flex-wrap: wrap; }

/* Comments */
.comments { margin-top: 40px; }
.comments__title { font-size: 22px; font-weight: 900; margin: 0 0 16px; }
.comment-list, .comment-list .children { list-style: none; margin: 0; padding: 0; }
.comment-list .children { padding-inline-start: 24px; }
.comment-body { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; }
.comment-author { font-weight: 800; }
.comment-author .says { display: none; }
.comment-metadata { font-size: 12px; color: var(--ink-3); }
.comment-metadata a { color: inherit; }
.comment-content p { margin: 8px 0; }
.reply a { font-size: 13px; font-weight: 800; color: var(--brand-ink); }
.comment-respond { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-top: 16px; }
.comment-reply-title { margin: 0 0 8px; font-size: 18px; font-weight: 900; }
.comment-notes, .logged-in-as { font-size: 13px; color: var(--ink-3); }
.comment-form p { margin: 0 0 12px; }
.comment-form label { display: block; font-size: 14px; font-weight: 800; margin-bottom: 4px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; min-height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-2);
	color: var(--ink); padding: 10px 14px;
}
.comment-form-cookies-consent { display: flex; gap: 8px; align-items: flex-start; }
.comment-form-cookies-consent label { font-weight: 500; font-size: 13px; }

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { margin-top: 72px; background: var(--foot); color: #CFCADB; border-top: 4px solid transparent; border-image: var(--grad) 1; }
.footer__grid { display: flex; flex-wrap: wrap; gap: 36px 48px; padding-top: 48px; padding-bottom: 28px; }
.footer__about { flex: 2 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.footer__about p { margin: 0; font-size: 14px; line-height: 2; color: #ABA5BD; max-width: 440px; }
.logo--light, .logo--light:hover { color: #F1F3F6; }
.logo--light .logo__mark { width: 42px; height: 42px; }
.logo--light .logo__name { font-size: 22px; }
.footer__nav { flex: 1 1 150px; }
.footer__title { margin: 0 0 12px; font-size: 15px; font-weight: 800; color: #F1F3F6; }
.footer__nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.footer__nav a { display: flex; align-items: center; min-height: 36px; font-size: 14px; }
.site-footer a:hover { color: #C4A6FF; }
.footer__bottom { border-top: 1px solid var(--foot-line); }
.footer__bottom-in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-block: 16px; font-size: 13px; color: #ABA5BD; }
.footer__domain { font-family: var(--mono); }

/* ==========================================================================
   Neon accents
   ========================================================================== */

html:not(.dark) body {
	background:
		radial-gradient(1100px 520px at 92% -6%, var(--glow), transparent 62%),
		radial-gradient(900px 480px at 0% 0%, rgba(219, 39, 119, .12), transparent 60%),
		var(--bg);
	background-repeat: no-repeat;
	background-color: var(--bg);
}
html.dark body { background: radial-gradient(1100px 520px at 92% -6%, rgba(139, 92, 246, .16), transparent 62%), var(--bg); background-repeat: no-repeat; background-color: var(--bg); }
/* Category pills stay soft-tinted in dark mode */
html.dark .tag-win { color: var(--win); background: var(--win-t); }
html.dark .tag-net { color: var(--net); background: var(--net-t); }
html.dark .tag-linux { color: var(--linux); background: var(--linux-t); }
html.dark .tag-ai { color: var(--ai); background: var(--ai-t); }
html.dark .tag-soft { color: var(--soft); background: var(--soft-t); }
html.dark .tag-gadget { color: var(--gadget); background: var(--gadget-t); }

.home-intro {
	background: var(--grad); color: var(--on-brand); border-radius: 18px; padding: 16px 24px; margin-top: 8px;
	box-shadow: 0 18px 40px -24px var(--glow);
}
.home-intro p { color: rgba(255, 255, 255, .88); }
.chips__label { color: var(--brand-ink); }
.chip:hover, .tab:hover { border-color: var(--brand); color: var(--brand-ink); }
.main-nav .menu a:hover { color: var(--brand-ink); }
.card-feature, .card-side, .card-grid, .card-wide, .card-mini--boxed, .box { transition: border-color .15s, box-shadow .15s; }
.card-feature:hover, .card-side:hover, .card-grid:hover, .card-wide:hover, .box:hover { border-color: var(--brand); box-shadow: 0 16px 36px -18px var(--glow); }
.logo--light .logo__name span { background: linear-gradient(135deg, #A78BFA, #F472B6); -webkit-background-clip: text; background-clip: text; }

/* ==========================================================================
   Sticky glass header
   ========================================================================== */

.site-header {
	position: sticky; top: var(--wp-admin--admin-bar--height, 0px); z-index: 60;
	background: var(--glass); border-bottom: 1px solid var(--glass-line);
	-webkit-backdrop-filter: saturate(180%) blur(18px); backdrop-filter: saturate(180%) blur(18px);
	transition: background-color .2s, box-shadow .2s;
}
.site-header.is-scrolled { background: var(--glass-strong); box-shadow: 0 12px 32px -20px rgba(46, 16, 101, .45); }
html.dark .site-header.is-scrolled { box-shadow: 0 12px 32px -18px rgba(0, 0, 0, .7); }
.site-header__top { transition: padding .2s; }
.site-header.is-scrolled .site-header__top { padding-top: 8px; padding-bottom: 4px; }
.site-header .search__input, .site-header .theme-toggle, .site-header .search-toggle {
	background: color-mix(in srgb, var(--surface-2) 72%, transparent); border-color: var(--glass-line);
}
.search-toggle {
	display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line);
	color: var(--ink); place-items: center; cursor: pointer; padding: 0;
}
.search-toggle svg { width: 20px; height: 20px; }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	.site-header, .site-header.is-scrolled { background: var(--surface); }
}

/* ==========================================================================
   Small screens
   ========================================================================== */

@media (max-width: 640px) {
	.main-nav .menu { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter); }
	.main-nav .menu::-webkit-scrollbar { display: none; }
	.main-nav .menu li { flex: none; }
	.search { order: 3; flex-basis: 100%; max-width: none; margin-inline-start: 0; }
	html.js .site-header:not(.search-open) .search { display: none; }
	html.js .search-toggle { display: grid; margin-inline-start: auto; }
	html:not(.js) .theme-toggle { margin-inline-start: auto; }
	.search-toggle[aria-expanded="true"] { background: var(--grad); color: var(--on-brand); border-color: transparent; }
	.site-header.is-scrolled .site-header__top { padding-top: 6px; padding-bottom: 2px; }
	.site-header .logo__mark { width: 40px; height: 40px; }
	.card-feature__body { padding: 18px; }
	.card-row > a { gap: 12px; }
	.card-row__title { font-size: 17px; }
	.prose { font-size: 16px; }
	.author-box { flex-direction: column; }
	.sec-title { font-size: 21px; }
}

@media (max-width: 600px) {
	.site-header { top: 0; }
}

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

@media print {
	.topstrip, .site-header, .single-aside, .aside, .feedback, .share, .site-footer, .comments, .toc { display: none !important; }
	body { background: #fff; color: #000; }
}
