/* ==========================================================================
   Business7 — main stylesheet
   Idea: every story wears one of seven hues. Everything else stays calm.
   ========================================================================== */

/* ---------- Fonts (local, Persian digits) ---------- */
@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-Medium.woff2") format("woff2"); font-weight: 500 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-Bold.woff2") format("woff2"); font-weight: 700 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Vazirmatn FD"; src: url("../fonts/Vazirmatn-FD-Black.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
/* Display face for headlines. Latin digits are left out on purpose so they fall back to Vazirmatn FD and show as Persian digits. */
@font-face { font-family: "Estedad B7"; src: url("../fonts/estedad-arabic-var.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+200C-200E, U+2010-2011, U+204F, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Estedad B7"; src: url("../fonts/estedad-latin-var.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; unicode-range: U+0000-002F, U+003A-00FF, U+0131, U+0152-0153, U+02C6, U+02DA, U+02DC, U+2000-200B, U+2012-206F, U+20AC, U+2122; }

/* ---------- Tokens ---------- */
:root {
	--brand: #2B54D9;
	--accent: #F2A007;

	--ink: #14213D;
	--ink-2: #4B5673;
	--ink-3: #6E7893;
	--paper: #F4F6FB;
	--surface: #FFFFFF;
	--soft: #ECEFF7;
	--line: #DFE3EE;
	--footer: #101A31;

	--h0: #2B54D9; /* cobalt */
	--h1: #0A7C70; /* teal */
	--h2: #F2A007; /* saffron */
	--h3: #D23350; /* rose */
	--h4: #6C3FD6; /* violet */
	--h5: #23843A; /* green */
	--h6: #0B78B8; /* sky */

	--hue: var(--brand);
	--hue-text: var(--brand);
	--on-hue: #FFFFFF;

	--font: "Vazirmatn FD", Vazirmatn, Tahoma, "Segoe UI", sans-serif;
	--font-display: "Estedad B7", "Vazirmatn FD", Vazirmatn, Tahoma, sans-serif;
	--read-size: 18px;
	--container: 1240px;
	--gutter: clamp(16px, 3vw, 28px);
	--r-sm: 6px;
	--r-md: 12px;
	--r-lg: 22px;
	--header-h: 68px;
	--article-w: 1080px;
	--shadow-lift: 0 10px 30px -12px rgba(20, 33, 61, .28);

	color-scheme: light;
}

.hue-0 { --hue: var(--h0); --hue-text: var(--h0); --on-hue: #fff; }
.hue-1 { --hue: var(--h1); --hue-text: var(--h1); --on-hue: #fff; }
.hue-2 { --hue: var(--h2); --hue-text: #8A5A00; --on-hue: #1E1600; }
.hue-3 { --hue: var(--h3); --hue-text: var(--h3); --on-hue: #fff; }
.hue-4 { --hue: var(--h4); --hue-text: var(--h4); --on-hue: #fff; }
.hue-5 { --hue: var(--h5); --hue-text: var(--h5); --on-hue: #fff; }
.hue-6 { --hue: var(--h6); --hue-text: var(--h6); --on-hue: #fff; }

/* Dark mode: explicit choice or system preference */
:root[data-theme="dark"] {
	--ink: #E7EBF5;
	--ink-2: #B3BCD2;
	--ink-3: #8C96B0;
	--paper: #0C1323;
	--surface: #131C30;
	--soft: #1A2440;
	--line: #26314D;
	--footer: #080D19;
	--shadow-lift: 0 10px 30px -12px rgba(0, 0, 0, .6);
	color-scheme: dark;
}
:root[data-theme="dark"] [class*="hue-"] { --hue-text: color-mix(in srgb, var(--hue) 55%, #fff); }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ink: #E7EBF5;
		--ink-2: #B3BCD2;
		--ink-3: #8C96B0;
		--paper: #0C1323;
		--surface: #131C30;
		--soft: #1A2440;
		--line: #26314D;
		--footer: #080D19;
		--shadow-lift: 0 10px 30px -12px rgba(0, 0, 0, .6);
		color-scheme: dark;
	}
	:root:not([data-theme="light"]) [class*="hue-"] { --hue-text: color-mix(in srgb, var(--hue) 55%, #fff); }
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
	margin: 0;
	font-family: var(--font);
	font-size: 16px;
	line-height: 1.85;
	color: var(--ink);
	background: var(--paper);
	direction: rtl;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}
img, svg, video, iframe { max-width: 100%; }
img { height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, h6 { margin: 0; line-height: 1.55; font-weight: 800; font-family: var(--font-display); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }

.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:focus {
	position: fixed !important; top: 12px; right: 12px; z-index: 1000;
	width: auto; height: auto; clip: auto; margin: 0;
	padding: 10px 18px; background: var(--brand); color: #fff; border-radius: var(--r-sm);
}
.site-main:focus { outline: none; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }

.icon { display: block; flex: none; }
.thumb-fallback span, .rank-list li::before, .nf-mark, .ticker-title, .fs-btn { font-family: var(--font-display); }

.icon-btn {
	display: inline-grid; place-items: center;
	width: 42px; height: 42px;
	border: 0; border-radius: 50%;
	background: transparent; color: var(--ink);
	cursor: pointer;
	transition: background-color .2s;
}
.icon-btn:hover { background: var(--soft); }

.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 46px; padding: 0 26px;
	border-radius: 999px; border: 0;
	background: var(--ink); color: var(--paper);
	font-weight: 700; font-size: .95rem;
	cursor: pointer;
	transition: background-color .2s, color .2s;
}
.btn:hover { background: var(--brand); color: #fff; }

/* ---------- Reading progress ---------- */
.read-progress { position: fixed; inset: 0 0 auto 0; height: 4px; z-index: 200; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--hue); transform-origin: right center; transform: scaleX(0); }

/* ---------- Top bar & ticker ---------- */
.topbar { background: var(--ink); color: var(--paper); font-size: .86rem; }
:root[data-theme="dark"] .topbar { background: #050A15; color: #DCE2F0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .topbar { background: #050A15; color: #DCE2F0; } }
.topbar-inner { display: flex; align-items: center; gap: 22px; min-height: 42px; }
.today { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; opacity: .9; }

.ticker { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; }
.ticker-title {
	flex: none;
	padding: 2px 12px; border-radius: 999px;
	background: var(--accent); color: #1E1600;
	font-weight: 800; font-size: .8rem;
}
.ticker-window { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(to left, transparent, #000 4%, #000 92%, transparent); }
.ticker-track { list-style: none; display: flex; width: max-content; }
.ticker-track.is-running { animation: b7-ticker var(--ticker-duration, 60s) linear infinite; }
.ticker:hover .ticker-track, .ticker:focus-within .ticker-track { animation-play-state: paused; }
.ticker-track li { display: flex; align-items: center; gap: 10px; white-space: nowrap; padding-inline-end: 34px; }
.ticker-track li::before { content: ""; width: 8px; height: 8px; border-radius: 2px; background: var(--hue); flex: none; }
.ticker-track a:hover { text-decoration: underline; text-underline-offset: 5px; }
@keyframes b7-ticker { from { transform: translateX(0); } to { transform: translateX(50%); } }

/* ---------- Header ---------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: color-mix(in srgb, var(--surface) 92%, transparent);
	backdrop-filter: saturate(1.4) blur(12px);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.header-inner { display: flex; align-items: center; gap: 20px; min-height: var(--header-h); }
.menu-toggle { display: none; }

.site-brand { margin: 0; flex: none; }
.site-brand .custom-logo { max-height: 42px; width: auto; }
.site-brand--footer .custom-logo { max-height: 48px; }
/* No light footer logo uploaded: show the header logo on a small light plate so it stays readable. */
.site-brand--footer.is-auto-light .custom-logo-link { display: inline-block; padding: 10px 16px; border-radius: var(--r-md); background: #FFFFFF; }
.site-brand--footer.is-auto-light .custom-logo { max-height: 40px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; }
.wordmark-ring {
	position: relative;
	width: 42px; height: 42px; border-radius: 50%;
	background: conic-gradient(var(--h0) 0 14.28%, var(--h1) 0 28.57%, var(--h2) 0 42.85%, var(--h3) 0 57.14%, var(--h4) 0 71.42%, var(--h5) 0 85.71%, var(--h6) 0 100%);
	display: grid; place-items: center;
}
.wordmark-ring span {
	width: 30px; height: 30px; border-radius: 50%;
	background: var(--surface); color: var(--ink);
	display: grid; place-items: center;
	font-family: var(--font-display); font-weight: 900; font-size: 1.15rem; line-height: 1;
}
.wordmark-text { font-family: var(--font-display); font-weight: 850; font-size: 1.4rem; }

.site-nav { flex: 1; min-width: 0; }
.nav-head, .nav-social { display: none; }
.site-nav .menu { list-style: none; display: flex; align-items: center; gap: 4px; }
.site-nav .menu > li { position: relative; }
.site-nav .menu a {
	display: block; padding: 8px 14px; border-radius: 999px;
	font-weight: 600; font-size: .95rem; color: var(--ink-2);
	transition: color .2s, background-color .2s;
}
.site-nav .menu a:hover { color: var(--ink); background: var(--soft); }
.site-nav .menu > .current-menu-item > a,
.site-nav .menu > .current-menu-ancestor > a { color: var(--ink); background: var(--soft); }
.site-nav .sub-menu {
	list-style: none;
	position: absolute; top: 100%; right: 0; min-width: 220px;
	padding: 8px; margin-top: 6px;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
	box-shadow: var(--shadow-lift);
	opacity: 0; visibility: hidden; transform: translateY(6px);
	transition: opacity .18s, transform .18s, visibility .18s;
}
.site-nav .menu li:hover > .sub-menu,
.site-nav .menu li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.site-nav .sub-menu a { border-radius: var(--r-sm); }

.header-tools { display: flex; align-items: center; gap: 4px; margin-inline-start: auto; }
.theme-toggle .when-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .when-dark { display: block; }
:root[data-theme="dark"] .theme-toggle .when-light { display: none; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .when-dark { display: block; }
	:root:not([data-theme="light"]) .theme-toggle .when-light { display: none; }
}

.search-panel { border-top: 1px solid var(--line); padding: 16px 0; background: var(--surface); }
.search-panel .search-form { max-width: 720px; margin-inline: auto; }

/* ---------- Search form ---------- */
.search-form { display: flex; align-items: stretch; gap: 8px; }
.search-field {
	flex: 1; min-width: 0; min-height: 50px;
	padding: 0 18px;
	background: var(--paper); border: 1.5px solid var(--line); border-radius: 999px;
	font-size: 1rem;
	transition: border-color .2s;
}
.search-field:focus { outline: none; border-color: var(--brand); }
.search-submit {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 0 22px; border: 0; border-radius: 999px;
	background: var(--brand); color: #fff; font-weight: 700; cursor: pointer;
}
.search-submit:hover { filter: brightness(1.08); }

/* ---------- Ads ---------- */
.ad-slot { margin: 20px auto; text-align: center; overflow: hidden; }
.ad-slot img { margin-inline: auto; border-radius: var(--r-md); }

/* ---------- Shared bits ---------- */
.label {
	display: inline-flex; align-items: center; gap: 7px;
	font-size: .8rem; font-weight: 700; color: var(--hue-text);
}
.label::before { content: ""; width: 9px; height: 9px; border-radius: 2px; background: var(--hue); }

.card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: .8rem; color: var(--ink-3); }
.card-meta .sep { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }

.thumb-fallback {
	display: grid; place-items: center;
	width: 100%; height: 100%; min-height: 100%;
	background: var(--hue);
	color: var(--on-hue);
}
.thumb-fallback span { font-weight: 900; font-size: 2.6rem; opacity: .55; }

.section-head {
	display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
	margin-bottom: 22px; padding-bottom: 12px;
	border-bottom: 1px solid var(--line);
	position: relative;
}
.section-head::after {
	content: ""; position: absolute; bottom: -1px; right: 0;
	width: 70px; height: 3px;
	background: linear-gradient(to left, var(--h0) 0 14.28%, var(--h1) 0 28.57%, var(--h2) 0 42.85%, var(--h3) 0 57.14%, var(--h4) 0 71.42%, var(--h5) 0 85.71%, var(--h6) 0 100%);
}
.section-title { font-size: 1.35rem; font-weight: 900; }
.section-more { font-size: .88rem; font-weight: 700; color: var(--brand); white-space: nowrap; }
:root[data-theme="dark"] .section-more { color: #8FA8FF; }
.section-more:hover { text-decoration: underline; text-underline-offset: 5px; }

.grid { display: grid; gap: 28px 24px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

/* ---------- Lead card ---------- */
.card-lead {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
	border-radius: var(--r-lg);
	overflow: hidden;
	background: var(--hue);
	color: var(--on-hue);
	min-height: 440px;
}
.lead-media { position: relative; display: block; min-height: 280px; }
.lead-media img, .lead-media .thumb-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lead-media .thumb-fallback { background: color-mix(in srgb, var(--hue) 80%, #000); }
.lead-panel { display: flex; flex-direction: column; gap: 14px; padding: clamp(24px, 3vw, 40px); justify-content: flex-end; }
.card-lead .label { color: var(--on-hue); }
.card-lead .label::before { background: var(--on-hue); }
.lead-title { font-size: clamp(1.4rem, .95rem + 1.3vw, 2.05rem); font-weight: 900; line-height: 1.55; }
.lead-title a { background-image: linear-gradient(currentColor, currentColor); background-size: 0 2px; background-repeat: no-repeat; background-position: right bottom; transition: background-size .35s; padding-bottom: 2px; }
.lead-title a:hover { background-size: 100% 2px; }
.lead-excerpt { font-size: 1.02rem; line-height: 1.95; opacity: .92; }
.card-lead .card-meta { color: var(--on-hue); opacity: .85; }

/* ---------- Grid card ---------- */
.card-grid { display: flex; flex-direction: column; gap: 12px; }
.card-media {
	display: block; position: relative;
	aspect-ratio: 16 / 10; border-radius: var(--r-md); overflow: hidden;
	background: var(--soft);
}
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card-grid:hover .card-media img { transform: scale(1.04); }
.card-media::after { content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 4px; background: var(--hue); transform: scaleX(0); transform-origin: right; transition: transform .35s ease; }
.card-grid:hover .card-media::after { transform: scaleX(1); }
.card-body { display: flex; flex-direction: column; gap: 8px; }
.card-title { font-size: 1.08rem; font-weight: 800; line-height: 1.75; }
.card-title a { transition: color .2s; }
.card-title a:hover, .row-title a:hover { color: var(--hue-text); }
.card-excerpt { font-size: .93rem; line-height: 1.95; color: var(--ink-2); }

/* ---------- Row card ---------- */
.card-row { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 14px; align-items: start; }
.row-media { display: block; aspect-ratio: 4 / 3; border-radius: var(--r-sm); overflow: hidden; background: var(--soft); position: relative; }
.row-media img, .row-media .thumb-fallback { width: 100%; height: 100%; object-fit: cover; }
.row-media .thumb-fallback span { font-size: 1.4rem; }
.row-body { display: flex; flex-direction: column; gap: 6px; }
.row-title { font-size: .98rem; font-weight: 700; line-height: 1.8; }
.row-title a { transition: color .2s; }

/* Rows with excerpts (archives, "more" section) */
.list { display: flex; flex-direction: column; }
.list .card-row, .rows-with-excerpt .card-row { grid-template-columns: 260px minmax(0, 1fr); gap: 22px; }
.list .card-row { padding: 22px 0; border-bottom: 1px solid var(--line); }
.list .card-row:first-child { padding-top: 0; }
.list .row-media, .rows-with-excerpt .row-media { aspect-ratio: 16 / 10; border-radius: var(--r-md); }
.list .row-title, .rows-with-excerpt .row-title { font-size: 1.15rem; font-weight: 800; }
.list .row-media .thumb-fallback span, .rows-with-excerpt .row-media .thumb-fallback span { font-size: 2.2rem; }

/* ---------- Home ---------- */
.home-top { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; margin-top: 28px; }
.top-side { display: flex; flex-direction: column; justify-content: space-between; gap: 4px; }
.top-side .card-row { padding: 14px 0; border-bottom: 1px solid var(--line); }
.top-side .card-row:first-child { padding-top: 0; }
.top-side .card-row:last-child { border-bottom: 0; padding-bottom: 0; }

.layout-with-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 40px; margin-top: 56px; align-items: start; }
.layout-side { display: flex; flex-direction: column; gap: 24px; align-self: stretch; }
.layout-side > :last-child { position: sticky; top: calc(var(--header-h) + 20px); }
.admin-bar .layout-side > :last-child { top: calc(var(--header-h) + 52px); }
.home-section { margin-top: 0; }
.home-more { margin-top: 64px; }
.more-cta { margin-top: 32px; text-align: center; }

.topics { display: grid; gap: 40px; margin-top: 64px; }
.topics-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topic-inner { display: grid; gap: 20px; }
.topic-list { display: flex; flex-direction: column; gap: 16px; }
.topic-inner > .card-grid .card-media { aspect-ratio: 16 / 9; }
.topic-inner > .card-grid .card-title { font-size: 1.2rem; }
.topics-1 .topic-inner { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }

/* ---------- Widgets ---------- */
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; }
.widget-title { font-size: 1.05rem; font-weight: 900; margin-bottom: 16px; }
.widget ul { list-style: none; }
.widget li + li { margin-top: 10px; }
.widget a:hover { color: var(--brand); }

.widget h2, .widget .wp-block-heading { font-size: 1.05rem; font-weight: 900; margin-bottom: 14px; }
.widget .wp-block-search__label { display: block; font-weight: 800; margin-bottom: 10px; }
.widget .wp-block-search__inside-wrapper { display: flex; gap: 6px; }
.widget .wp-block-search__input { flex: 1; min-width: 0; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--paper); }
.widget .wp-block-search__input:focus { outline: none; border-color: var(--brand); }
.widget .wp-block-search__button { min-height: 44px; padding: 0 16px; margin: 0; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 700; cursor: pointer; }
.widget .wp-block-latest-posts, .widget .wp-block-archives, .widget .wp-block-categories, .widget .wp-block-latest-comments { padding: 0; margin: 0; list-style: none; }
.widget .wp-block-latest-posts li, .widget .wp-block-archives li, .widget .wp-block-categories li { padding: 8px 0; border-top: 1px dashed var(--line); margin: 0; font-size: .93rem; line-height: 1.8; }
.widget .wp-block-latest-posts li:first-child, .widget .wp-block-archives li:first-child, .widget .wp-block-categories li:first-child { border-top: 0; padding-top: 0; }
.widget .wp-block-tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.widget .wp-block-tag-cloud a, .widget .tagcloud a { font-size: .85rem !important; padding: 3px 12px; border-radius: 999px; background: var(--soft); }
.widget .wp-block-group__inner-container > * + * { margin-top: 0; }

.rank-list { list-style: none; counter-reset: rank; }
.rank-list li {
	counter-increment: rank;
	display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 12px;
	padding: 12px 0; border-top: 1px dashed var(--line);
}
.rank-list li:first-child { border-top: 0; padding-top: 0; }
.rank-list li + li { margin-top: 0; }
.rank-list li::before {
	content: counter(rank, persian);
	grid-row: span 2;
	display: grid; place-items: center;
	width: 40px; height: 40px; border-radius: var(--r-sm);
	background: var(--hue); color: var(--on-hue);
	font-weight: 900; font-size: 1.1rem;
}
.rank-list a { font-weight: 700; font-size: .95rem; line-height: 1.75; }
.rank-list a:hover { color: var(--hue-text); }
.rank-meta { display: inline-flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--ink-3); margin-top: 2px; }

/* ---------- Archive head ---------- */
.archive-head { padding: 36px 0 30px; background: var(--surface); border-bottom: 1px solid var(--line); }
.archive-title { font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.2rem); font-weight: 900; margin-top: 10px; }
.archive-page { font-weight: 500; color: var(--ink-3); font-size: .7em; }
.archive-desc { margin-top: 10px; color: var(--ink-2); max-width: 70ch; }
.archive-count { margin-top: 6px; color: var(--ink-3); font-size: .9rem; }
.archive-search { margin-top: 18px; max-width: 620px; }
.archive-head + .layout-with-sidebar { margin-top: 36px; }

.breadcrumbs { font-size: .84rem; color: var(--ink-3); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: 6px; }
.breadcrumbs li + li::before { content: "/"; opacity: .5; }
.breadcrumbs a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Pagination ---------- */
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination .page-numbers {
	min-width: 44px; height: 44px; padding: 0 14px;
	display: inline-grid; place-items: center;
	border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
	font-weight: 700;
}
.pagination a.page-numbers:hover { border-color: var(--brand); color: var(--brand); }
.pagination .current { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pagination .dots { border: 0; background: none; }

.empty-state { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 36px; }
.empty-state h2 { font-size: 1.3rem; margin-bottom: 8px; }
.empty-state p { color: var(--ink-2); margin-bottom: 20px; }

/* ---------- Single: head ---------- */
.article-head { background: var(--hue); color: var(--on-hue); padding: 34px 0 56px; }
.single-article.has-post-thumbnail .article-head { padding-bottom: 150px; }
/* Head and cover share one width so their edges line up. */
.article-head-inner, .article-cover { max-width: var(--article-w); }
.article-head .breadcrumbs { color: var(--on-hue); opacity: .85; }
.head-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.head-tags a {
	padding: 3px 14px; border-radius: 999px;
	background: color-mix(in srgb, var(--on-hue) 16%, transparent);
	font-size: .82rem; font-weight: 700;
	transition: background-color .2s;
}
.head-tags a:hover { background: color-mix(in srgb, var(--on-hue) 28%, transparent); }
.article-title {
	margin-top: 16px;
	font-size: clamp(1.65rem, 1.05rem + 2.1vw, 2.75rem);
	font-weight: 900; line-height: 1.5;
	text-wrap: pretty;
	max-width: 100%;
}
.article-lede { margin-top: 16px; font-size: clamp(1.02rem, .95rem + .3vw, 1.18rem); line-height: 2; max-width: 880px; text-wrap: pretty; opacity: .93; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; margin-top: 26px; font-size: .88rem; }
.article-meta .meta-author { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.article-meta .meta-avatar { border-radius: 50%; border: 2px solid color-mix(in srgb, var(--on-hue) 40%, transparent); }
.article-meta .meta-item { display: inline-flex; align-items: center; gap: 6px; opacity: .9; }
.article-meta a:hover { text-decoration: underline; text-underline-offset: 4px; }

.article-cover { margin: -118px auto 0; }
.article-cover img { width: 100%; max-height: 600px; object-fit: cover; border-radius: var(--r-lg); box-shadow: var(--shadow-lift); background: var(--soft); }
.article-cover figcaption { margin-top: 10px; font-size: .84rem; color: var(--ink-3); text-align: center; }

/* ---------- Single: layout ---------- */
.article-layout {
	display: grid;
	grid-template-columns: 64px minmax(0, 760px);
	justify-content: center;
	gap: 44px;
	margin-top: 44px;
}
.article-rail { position: relative; }
.rail-sticky { position: sticky; top: calc(var(--header-h) + 28px); }
.admin-bar .rail-sticky { top: calc(var(--header-h) + 60px); }

.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-title { font-size: .85rem; font-weight: 700; color: var(--ink-3); }
.share-btn {
	position: relative;
	display: inline-grid; place-items: center;
	width: 44px; height: 44px; border-radius: 50%;
	border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
	cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}
.share-btn:hover { background: var(--hue); border-color: var(--hue); color: var(--on-hue); }
.copy-done {
	position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%);
	padding: 2px 10px; border-radius: 999px; background: var(--ink); color: var(--paper);
	font-size: .75rem; white-space: nowrap; pointer-events: none;
	opacity: 0; transition: opacity .2s;
}
.copy-done.is-on { opacity: 1; }
.share-rail { flex-direction: column; }
.share-rail .share-title { writing-mode: vertical-rl; margin-bottom: 4px; }

.font-tools { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 18px; padding: 6px 0; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); width: 44px; margin-inline: auto; color: var(--ink-3); }
.fs-btn { width: 36px; height: 36px; font-weight: 900; font-size: 1.1rem; }

.share-inline { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.share-inline .share-title { margin-inline-end: 6px; }

/* ---------- Entry content ---------- */
.entry-content { font-size: var(--read-size); line-height: 2.05; color: var(--ink); overflow-wrap: break-word; }
.entry-content > * + * { margin-top: 1.25em; }
.entry-content p { text-align: start; }
.entry-content h2, .entry-content h3, .entry-content h4 { scroll-margin-top: calc(var(--header-h) + 24px); }
.entry-content h2 { font-size: 1.45em; font-weight: 900; margin-top: 1.9em; line-height: 1.6; display: flex; gap: .45em; align-items: baseline; }
.entry-content h2::before { content: ""; flex: none; width: .5em; height: .5em; border-radius: 3px; background: var(--hue); transform: translateY(-.12em); }
.entry-content h3 { font-size: 1.2em; font-weight: 800; margin-top: 1.6em; }
.entry-content h4 { font-size: 1.05em; font-weight: 800; margin-top: 1.4em; }
.entry-content a { color: var(--hue-text); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 6px; text-decoration-color: color-mix(in srgb, var(--hue) 45%, transparent); transition: text-decoration-color .2s; }
.entry-content a:hover { text-decoration-color: currentColor; }
.entry-content strong, .entry-content b { font-weight: 800; }
.entry-content ul, .entry-content ol { padding-inline-start: 1.4em; }
.entry-content ol { list-style-type: persian; }
.entry-content li + li { margin-top: .45em; }
.entry-content ul li::marker { color: var(--hue); }
.entry-content ol li::marker { color: var(--hue-text); font-weight: 800; }
.entry-content blockquote, .entry-content .wp-block-quote {
	margin-inline: 0; padding: 1.1em 1.4em;
	border-inline-start: 5px solid var(--hue);
	background: var(--surface); border-radius: var(--r-sm) 0 0 var(--r-sm);
	font-size: 1.05em; font-weight: 500; color: var(--ink);
}
.entry-content blockquote p + p { margin-top: .8em; }
.entry-content blockquote cite, .entry-content .wp-block-quote cite { display: block; margin-top: .6em; font-size: .82em; font-style: normal; color: var(--ink-3); }
.entry-content .wp-block-pullquote { border-block: 4px solid var(--hue); padding: 1.5em 0; text-align: center; font-size: 1.2em; font-weight: 800; }
.entry-content img { border-radius: var(--r-md); }
.entry-content figure { margin-inline: 0; }
.entry-content figcaption, .entry-content .wp-caption-text { margin-top: .6em; font-size: .8em; color: var(--ink-3); text-align: center; line-height: 1.8; }
.entry-content .wp-caption { max-width: 100%; }
.entry-content .aligncenter { margin-inline: auto; }
.entry-content .alignwide { margin-inline: -40px; max-width: calc(100% + 80px); }
.entry-content hr { border: 0; height: 4px; width: 84px; margin: 2.2em auto; border-radius: 2px; background: linear-gradient(to left, var(--h0) 0 14.28%, var(--h1) 0 28.57%, var(--h2) 0 42.85%, var(--h3) 0 57.14%, var(--h4) 0 71.42%, var(--h5) 0 85.71%, var(--h6) 0 100%); }
.entry-content code { font-family: ui-monospace, Consolas, monospace; font-size: .85em; padding: .1em .4em; background: var(--soft); border-radius: 4px; direction: ltr; unicode-bidi: embed; }
.entry-content pre { direction: ltr; text-align: left; overflow-x: auto; padding: 1.1em 1.3em; border-radius: var(--r-md); background: #0F172A; color: #E2E8F0; font-size: .82em; line-height: 1.7; }
.entry-content pre code { background: none; padding: 0; color: inherit; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r-md); }
.entry-content table { width: 100%; border-collapse: collapse; font-size: .88em; line-height: 1.8; background: var(--surface); }
.entry-content th, .entry-content td { padding: .75em 1em; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
.entry-content thead th { background: var(--hue); color: var(--on-hue); font-weight: 800; }
.entry-content tbody tr:nth-child(even) { background: var(--paper); }
.entry-content .wp-block-table { overflow-x: auto; margin-inline: 0; }
.entry-content .wp-block-table thead, .entry-content .wp-block-table tfoot { border: 0; }
.entry-content .wp-block-table th, .entry-content .wp-block-table td { border: 0; border-bottom: 1px solid var(--line); }
.entry-content .wp-block-table tr:last-child td { border-bottom: 0; }
.table-wrap > .wp-block-table { margin: 0; }
.entry-content iframe, .entry-content video { border-radius: var(--r-md); }
.entry-content .wp-block-embed__wrapper iframe { width: 100%; }
.entry-content .wp-block-button__link { background: var(--hue); color: var(--on-hue); text-decoration: none; border-radius: 999px; padding: .6em 1.5em; font-weight: 700; }

/* Block style: "کادر نکته" (paragraph or group) */
.entry-content .is-style-b7-note {
	position: relative;
	padding: 1.1em 1.3em 1.1em 1.3em; padding-inline-start: 3.2em;
	border-radius: var(--r-md);
	background: color-mix(in srgb, var(--hue) 9%, var(--surface));
	border: 1px solid color-mix(in srgb, var(--hue) 28%, transparent);
}
.entry-content .is-style-b7-note::before {
	content: "!"; position: absolute; inset-inline-start: 1em; top: 1.05em;
	width: 1.5em; height: 1.5em; border-radius: 50%;
	display: grid; place-items: center;
	background: var(--hue); color: var(--on-hue);
	font-family: var(--font-display); font-weight: 900; font-size: .85em; line-height: 1;
}
.entry-content .is-style-b7-note > * + * { margin-top: .8em; }

/* Table of contents */
.toc { margin: 1.6em 0; }
.toc details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: .4em 1.2em; font-size: .9em; }
.toc summary { cursor: pointer; font-weight: 800; padding: .5em 0; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "−"; font-size: 1.3em; color: var(--hue-text); }
.toc details:not([open]) summary::after { content: "+"; }
.toc ol { list-style: persian; padding-inline-start: 1.4em; margin: 0; }
.toc > details > ol { padding-bottom: .8em; }
.toc ol ol { list-style: none; padding-inline-start: 1em; margin-top: .3em; }
.toc li + li { margin-top: .25em; }
.toc a { text-decoration: none; color: var(--ink-2); }
.toc a:hover { color: var(--hue-text); }

.ad-mid { margin: 2em 0; }

.page-links { display: flex; gap: 8px; align-items: center; margin-top: 2em; font-size: .9em; }
.page-links a, .page-links > .post-page-numbers { display: inline-grid; place-items: center; min-width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); text-decoration: none; }

/* ---------- Single: after content ---------- */
.article-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 36px; }
.article-tags-title { font-weight: 800; font-size: .9rem; margin-inline-end: 6px; }
.article-tags a { padding: 4px 14px; border-radius: 999px; background: var(--soft); font-size: .85rem; font-weight: 600; transition: background-color .2s, color .2s; }
.article-tags a:hover { background: var(--hue); color: var(--on-hue); }

.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 32px; padding: 22px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.author-box img { border-radius: 50%; flex: none; }
.author-name { font-size: 1.05rem; font-weight: 900; margin-bottom: 4px; }
.author-box p { color: var(--ink-2); font-size: .93rem; }

.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 24px; }
.post-nav a { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line); transition: border-color .2s; }
.post-nav a:hover { border-color: var(--hue); }
.post-nav span { font-size: .8rem; color: var(--ink-3); }
.post-nav strong { font-size: .95rem; line-height: 1.75; }
.post-nav-next { grid-column: 2; text-align: left; }

.related { margin-top: 64px; padding: 48px 0 8px; background: var(--surface); border-top: 1px solid var(--line); }

/* ---------- Comments ---------- */
.comments-wrap { max-width: 868px; margin-top: 48px; }
.comments { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: clamp(20px, 3vw, 32px); }
.comments-title, .comment-reply-title { font-size: 1.2rem; font-weight: 900; margin-bottom: 18px; }
.comment-list { list-style: none; margin-bottom: 30px; }
.comment-list .children { list-style: none; padding-inline-start: 28px; border-inline-start: 2px solid var(--line); margin-top: 14px; }
.comment-body { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.comment-author img { border-radius: 50%; }
.comment-author .says { display: none; }
.comment-metadata { font-size: .8rem; color: var(--ink-3); margin: 4px 0 8px; }
.comment-content { font-size: .98rem; line-height: 2; }
.reply a { font-size: .85rem; font-weight: 700; color: var(--brand); }
.comment-form p { margin-bottom: 14px; }
.comment-form label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: 6px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--paper);
}
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--brand); }
.comment-form .comment-form-cookies-consent { display: flex; gap: 8px; align-items: center; }
.comment-form .comment-form-cookies-consent label { display: inline; font-weight: 500; margin: 0; }
.comment-form .submit { min-height: 48px; padding: 0 28px; border: 0; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; cursor: pointer; }
.comment-notes { font-size: .85rem; color: var(--ink-3); }

/* ---------- Page ---------- */
.page-body { max-width: 860px; margin-top: 36px; }
.page-cover img { border-radius: var(--r-lg); margin-bottom: 28px; }

/* ---------- 404 ---------- */
.not-found { max-width: 720px; text-align: center; padding-top: 56px; padding-bottom: 40px; }
.nf-mark {
	font-size: clamp(5rem, 16vw, 9rem); font-weight: 900; line-height: 1;
	background: linear-gradient(to left, var(--h0), var(--h1), var(--h2), var(--h3), var(--h4), var(--h5), var(--h6));
	-webkit-background-clip: text; background-clip: text; color: transparent;
}
.not-found h1 { font-size: 1.7rem; margin-top: 12px; }
.not-found p { color: var(--ink-2); margin: 10px auto 24px; max-width: 52ch; }
.not-found .search-form { margin-bottom: 20px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 80px; background: var(--footer); color: #C9D1E4; }
.footer-spectrum { display: grid; grid-template-columns: repeat(7, 1fr); height: 6px; }
.footer-spectrum span { background: var(--hue); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(auto-fit, minmax(190px, 1fr)); gap: 36px 48px; padding-top: 52px; padding-bottom: 40px; }
.footer-about p { margin-top: 16px; font-size: .93rem; line-height: 2; max-width: 44ch; }
.site-footer .wordmark-ring span { background: var(--footer); color: #fff; }
.site-footer .wordmark-text { color: #fff; }
.site-footer .widget { background: none; border: 0; padding: 0; }
.site-footer .widget-title { color: #fff; }
.site-footer a:hover { color: #fff; }
.footer-list { list-style: none; }
.footer-list li + li { margin-top: 10px; }
.footer-list a { font-size: .92rem; line-height: 1.8; }
.footer-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-tags a { padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .16); font-size: .85rem; transition: background-color .2s, border-color .2s; }
.site-footer .footer-tags a:hover { background: var(--brand); border-color: var(--brand); }
.social { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.social a { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .16); transition: background-color .2s, border-color .2s; }
.site-footer .social a:hover { background: var(--brand); border-color: var(--brand); color: #fff; }
.footer-trust img { max-width: 120px; background: #fff; border-radius: var(--r-sm); }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-bottom-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 18px; padding-bottom: 18px; font-size: .85rem; }
.footer-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; }

.to-top {
	position: fixed; left: 20px; bottom: 20px; z-index: 90;
	background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lift);
	width: 48px; height: 48px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
	.layout-with-sidebar { grid-template-columns: minmax(0, 1fr) 290px; gap: 30px; }
}

@media (max-width: 1024px) {
	.home-top { grid-template-columns: 1fr; }
	.top-side { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
	.top-side .card-row, .top-side .card-row:first-child, .top-side .card-row:last-child { padding: 14px 0; border-bottom: 1px solid var(--line); }
	.layout-with-sidebar { grid-template-columns: 1fr; }
	.layout-side { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
	.layout-side > :last-child { position: static; }
	.article-layout { grid-template-columns: minmax(0, 760px); }
	.article-rail { display: none; }
}

@media (max-width: 960px) {
	:root { --header-h: 60px; }
	.menu-toggle { display: inline-grid; }
	.header-inner { gap: 8px; }
	.site-brand { margin-inline: auto; }
	.site-brand .custom-logo { max-height: 32px; }
	.header-tools { margin-inline-start: 0; }
	.site-nav {
		position: fixed; top: 0; bottom: 0; right: 0; z-index: 300;
		width: min(86vw, 340px);
		padding: 16px 18px 28px;
		background: var(--surface);
		box-shadow: var(--shadow-lift);
		overflow-y: auto;
		transform: translateX(105%);
		transition: transform .28s ease;
		visibility: hidden;
	}
	.site-nav.is-open { transform: none; visibility: visible; }
	.nav-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
	.nav-head-title { font-weight: 900; font-size: 1.1rem; }
	.site-nav .menu { flex-direction: column; align-items: stretch; gap: 2px; }
	.site-nav .menu a { padding: 12px 14px; border-radius: var(--r-sm); font-size: 1rem; }
	.site-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 12px 0 0; margin: 0; min-width: 0; }
	.nav-social { display: block; }
	.nav-social .social a { border-color: var(--line); }
	.nav-overlay { position: fixed; inset: 0; z-index: 250; background: rgba(8, 13, 25, .5); }
	.today { display: none; }
}

@media (max-width: 860px) {
	.card-lead { grid-template-columns: 1fr; min-height: 0; }
	.lead-media { aspect-ratio: 16 / 10; min-height: 0; }
	.topics-2, .topics-1 .topic-inner { grid-template-columns: 1fr; }
	.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.grid-2 { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
	body { font-size: 15.5px; }
	.grid-3 { grid-template-columns: 1fr; }
	.top-side { grid-template-columns: 1fr; }
	.layout-side { grid-template-columns: 1fr; }
	.list .card-row, .rows-with-excerpt .card-row { grid-template-columns: 120px minmax(0, 1fr); gap: 14px; }
	.list .card-excerpt, .rows-with-excerpt .card-excerpt { display: none; }
	.list .row-title, .rows-with-excerpt .row-title { font-size: 1rem; }
	.list .row-media, .rows-with-excerpt .row-media { aspect-ratio: 4 / 3; border-radius: var(--r-sm); }
	.card-lead { border-radius: var(--r-md); }
	.single-article.has-post-thumbnail .article-head { padding-bottom: 90px; }
	.article-cover { margin-top: -64px; }
	.article-cover img { border-radius: var(--r-md); }
	.entry-content { line-height: 2; }
	.entry-content .alignwide { margin-inline: 0; max-width: 100%; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav-next { grid-column: auto; text-align: start; }
	.author-box { flex-direction: column; }
	.search-submit span { display: none; }
	/* Compact feed on phones: first card large, the rest as rows */
	.home-section .grid-3 { gap: 18px; }
	.home-section .grid-3 .card-grid + .card-grid { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; align-items: start; padding-top: 18px; border-top: 1px solid var(--line); }
	.home-section .grid-3 .card-grid + .card-grid .card-media { aspect-ratio: 4 / 3; border-radius: var(--r-sm); }
	.home-section .grid-3 .card-grid + .card-grid .card-title { font-size: .98rem; }
	.home-section .grid-3 .card-grid + .card-grid .thumb-fallback span { font-size: 1.4rem; }
	.ticker-title { display: none; }
	.to-top { left: 14px; bottom: 14px; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
	.ticker-window { overflow-x: auto; mask-image: none; }
	.ticker-track.is-running { animation: none; }
}

@media print {
	.topbar, .site-header, .article-rail, .share, .related, .comments-wrap, .site-footer, .to-top, .ad-slot, .read-progress, .post-nav { display: none !important; }
	.article-head { background: none; color: #000; padding: 0; }
	.article-cover { margin-top: 16px; }
	body { background: #fff; color: #000; }
}
