/*
Theme Name:   Albarbari
Theme URI:    https://www.albarbari.com/
Description:  A bilingual, gold-and-navy author theme built for Numan Albarbari — a navy hero with a framed author portrait, a language-edition card grid, and a light/dark toggle. Fully standalone (no parent theme required). Presentation only: it never alters book, page, or author content.
Author:       Site maintenance
Author URI:   https://www.albarbari.com/
Version:      1.8.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  albarbari
Tags:         two-columns, right-sidebar, custom-menu, featured-images, translation-ready, rtl-language-support, blog, custom-logo, threaded-comments
*/

/* ===== Design tokens ===== */
:root {
	--bg: #FAF6EA;
	--bg-alt: #F2EAD2;
	--card: #FFFFFF;
	--ink: #1A2440;
	--ink-soft: rgba(26, 36, 64, 0.72);
	--text-muted: rgba(26, 36, 64, 0.72);
	--navy: #0F1F3D;
	--navy-deep: #0A1730;
	--gold: #AD8228;
	--gold-bright: #C79A3B;
	--gold-ink: #8A6A20;
	--line: rgba(26, 36, 64, 0.14);
	--card-shadow: 0 18px 40px rgba(15, 31, 61, 0.10);
	--wrap: 1300px;
}

html[data-theme="dark"] {
	--bg: #0B1730;
	--bg-alt: #101F3E;
	--card: #122549;
	--ink: #F3ECDA;
	--ink-soft: rgba(243, 236, 218, 0.72);
	--text-muted: rgba(243, 236, 218, 0.62);
	--navy: #081327;
	--navy-deep: #050C1C;
	--gold: #D8B564;
	--gold-bright: #EFCD84;
	--gold-ink: #EFCD84;
	--line: rgba(243, 236, 218, 0.14);
	--card-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

* {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	overflow-x: hidden;
	/* older Safari */
	overflow-x: clip;
	max-width: 100%;
}

body {
	margin: 0;
	background: var(--bg);
	color: var(--ink);
	font-family: 'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
	transition: background .35s ease, color .35s ease;
	overflow-x: hidden;
	overflow-x: clip;
	max-width: 100%;
}

a {
	color: var(--gold-ink);
	text-decoration: none;
}

a:hover {
	color: var(--gold);
}

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

.serif {
	font-family: 'Newsreader', Georgia, serif;
}

.ar {
	font-family: 'Amiri', serif;
}

.ar-display {
	font-family: 'Aref Ruqaa', serif;
}

svg.icon {
	width: 20px;
	height: 20px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.5;
}

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

.skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	background: var(--gold);
	color: var(--navy-deep);
	padding: 10px 16px;
	z-index: 100;
}

.skip-link:focus {
	left: 6px;
	top: 6px;
}

.wrap {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 clamp(16px, 4vw, 48px);
	width: 100%;
	box-sizing: border-box;
}

/* ===== Header / nav ===== */
.site-bar {
	position: sticky;
	top: 0;
	z-index: 40;
	background: rgba(247, 243, 232, 0.92);
	background: color-mix(in srgb, var(--bg) 92%, transparent);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--line);
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

html[data-theme="dark"] .site-bar {
	background: rgba(15, 31, 61, 0.92);
	background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.site-bar__inner {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px 20px;
	padding: 12px clamp(16px, 4vw, 48px);
	width: 100%;
	max-width: 100%;
	min-width: 0;
	box-sizing: border-box;
}

.site-bar__start {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	flex: 1 1 auto;
}

.site-bar__controls {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	min-width: 0;
	flex: 0 0 auto;
}

.menu-toggle--bar {
	display: none;
}

.reader-chrome {
	display: flex;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	padding: 3px;
	border: 1px solid var(--line);
	border-radius: 999px;
	background: var(--card);
	box-shadow: 0 6px 18px rgba(15, 31, 61, 0.05);
}

.reader-chip {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--gold-ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	height: 36px;
	min-width: 36px;
	padding: 0 10px;
	border-radius: 999px;
	cursor: pointer;
	font-family: Inter, system-ui, sans-serif;
	font-size: 12px;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	transition: background 0.2s ease, color 0.2s ease;
}

.reader-chip:hover,
.reader-chip[aria-expanded="true"],
.reader-chip.is-active {
	background: rgba(173, 130, 40, 0.14);
	color: var(--gold-ink);
}

.reader-progress {
	height: 2px;
	background: transparent;
	overflow: hidden;
}

.reader-progress__bar {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, rgba(173, 130, 40, 0.35), var(--gold));
	transform-origin: inline-start;
}

body.albarbari-reading {
	overflow-x: clip;
	width: 100%;
	max-width: 100%;
}

body.albarbari-reading .site-bar--reading {
	background: color-mix(in srgb, var(--bg) 94%, transparent);
}

body.albarbari-reading .nav-main {
	gap: 8px;
	min-width: 0;
}

body.albarbari-reading .site-bar__controls {
	gap: 8px;
}

body.albarbari-reading.is-index-open {
	overflow: hidden;
}


.brand {
	display: flex;
	align-items: center;
	gap: 14px;
	min-width: 0;
}

.brand-logo img {
	max-height: 52px;
	width: auto;
}

.brand-text {
	display: flex;
	flex-direction: column;
	line-height: 1.2;
}

.brand-text .lat {
	font-family: 'Newsreader', serif;
	font-style: italic;
	font-size: 18px;
	color: var(--ink);
}

.brand-text .ar-display {
	font-size: 16px;
	color: var(--gold);
	direction: rtl;
}

.nav-main {
	display: flex;
	align-items: center;
	gap: 28px;
}

.nav-main ul {
	display: flex;
	align-items: center;
	gap: 26px;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 13.5px;
	letter-spacing: 0.03em;
}

.nav-main a {
	color: var(--ink);
	opacity: 0.85;
}

.nav-main a:hover {
	opacity: 1;
	color: var(--gold);
}

.nav-main .current-menu-item>a {
	color: var(--gold);
	opacity: 1;
}

.theme-toggle {
	display: flex;
	align-items: center;
	gap: 2px;
	border: 1px solid var(--gold);
	border-radius: 999px;
	padding: 4px;
	cursor: pointer;
	background: transparent;
	color: var(--ink);
}

.theme-toggle span {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.theme-toggle span.active {
	background: var(--gold);
	color: var(--navy-deep);
}

.theme-toggle svg {
	width: 15px;
	height: 15px;
	stroke: currentColor;
	fill: none;
	stroke-width: 1.8;
}

.menu-toggle {
	display: none;
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 8px;
	padding: 8px 10px;
	cursor: pointer;
	color: var(--ink);
}

/* ===== Language flag switcher ===== */
.lang-switch {
	display: flex;
	align-items: center;
	gap: 6px;
}

.lang-flag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 999px;
	border: 1px solid transparent;
	line-height: 1;
	opacity: 0.7;
	transition: opacity .2s ease, border-color .2s ease, background .2s ease;
}

.lang-flag svg {
	width: 22px;
	height: 15px;
	border-radius: 2px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.12);
	display: block;
}

.lang-flag .lang-code {
	font-size: 11px;
	letter-spacing: 0.06em;
	font-weight: 600;
	color: var(--ink);
}

.lang-flag:hover {
	opacity: 1;
}

.lang-flag.is-active {
	opacity: 1;
	border-color: var(--gold);
	background: rgba(173, 130, 40, 0.10);
}

.lang-flag.is-active .lang-code {
	color: var(--gold-ink);
}

@media (max-width: 520px) {
	.lang-flag .lang-code {
		display: none;
	}
}

/* ===== Hero with framed author portrait ===== */
.hero {
	background: var(--navy-deep);
	color: #F3ECDA;
	overflow: hidden;
}

.hero-grid {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 70px 6vw 80px;
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	gap: 56px;
	align-items: center;
}

.kicker {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	border: 1px solid var(--gold);
	color: var(--gold-bright);
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 24px;
}

.hero h1 {
	font-family: 'Newsreader', serif;
	font-weight: 500;
	font-size: clamp(36px, 5vw, 64px);
	line-height: 1.07;
	margin: 0 0 20px;
	max-width: 16ch;
}

.hero p {
	font-size: 17.5px;
	max-width: 52ch;
	color: rgba(243, 236, 218, 0.82);
	margin: 0 0 32px;
}

.btn-gold {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: linear-gradient(135deg, var(--gold-bright), var(--gold));
	color: var(--navy-deep);
	font-weight: 600;
	font-size: 14px;
	padding: 14px 26px;
	border-radius: 999px;
	box-shadow: 0 10px 24px rgba(173, 130, 40, 0.35);
}

.btn-gold svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
}

.hero-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.btn-ghost {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 13px 22px;
	border-radius: 999px;
	border: 1px solid rgba(243, 236, 218, 0.35);
	color: #F3ECDA;
	font-weight: 600;
	font-size: 14px;
	transition: border-color 0.2s ease, background 0.2s ease;
}

.btn-ghost:hover {
	border-color: var(--gold-bright);
	color: var(--gold-bright);
	background: rgba(173, 130, 40, 0.08);
}

.home-passion {
	position: relative;
	padding: 88px 0 56px;
	background:
		radial-gradient(ellipse 55% 70% at 100% 0%, rgba(173, 130, 40, 0.1), transparent 55%),
		var(--bg);
	overflow: hidden;
}

.home-passion__inner {
	max-width: 820px;
	margin: 0 auto;
	text-align: center;
}

.home-passion__mark {
	display: block;
	width: 48px;
	height: 1px;
	margin: 0 auto 22px;
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.home-passion__title {
	font-size: clamp(1.75rem, 3.4vw, 2.6rem);
	font-weight: 500;
	margin: 0 0 20px;
	color: var(--ink);
	line-height: 1.2;
}

.home-passion__text {
	margin: 0 auto;
	max-width: 58ch;
	font-size: 1.08rem;
	line-height: 1.75;
	color: var(--ink-soft);
}

.home-preview {
	padding: 64px 0 80px;
	background:
		radial-gradient(ellipse 85% 70% at 12% 20%, rgba(173, 130, 40, 0.11), transparent 58%),
		radial-gradient(ellipse 60% 50% at 92% 80%, rgba(15, 31, 61, 0.06), transparent 55%),
		linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
	position: relative;
}

html[data-theme="dark"] .home-preview {
	background:
		radial-gradient(ellipse 85% 70% at 12% 20%, rgba(216, 181, 100, 0.08), transparent 58%),
		radial-gradient(ellipse 60% 50% at 92% 80%, rgba(0, 0, 0, 0.25), transparent 55%),
		linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}

.home-preview::before {
	content: "";
	position: absolute;
	top: 0;
	inset-inline: clamp(16px, 4vw, 48px);
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(173, 130, 40, 0.45), transparent);
	pointer-events: none;
}

.home-preview .works-shelf__heading {
	display: none;
}

.home-preview .works-shelf__head {
	justify-content: flex-end;
	margin-bottom: 14px;
}

.home-preview .works-shelf__stage {
	background:
		linear-gradient(180deg, color-mix(in srgb, var(--card) 55%, transparent), transparent 42%),
		radial-gradient(ellipse 110% 90% at 50% 110%, rgba(173, 130, 40, 0.09), transparent 65%);
}

.home-preview__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
}

.home-preview__head .works-shelf__title {
	font-size: clamp(1.65rem, 3vw, 2.35rem);
}

.card--featured {
	box-shadow: 0 0 0 1px rgba(173, 130, 40, 0.35), var(--card-shadow);
}

.card--featured .go {
	color: var(--gold);
}

.lang-blurb {
	display: block;
	margin-top: 8px;
	font-size: 12.5px;
	line-height: 1.45;
	color: var(--ink-soft);
	max-width: 28ch;
}

.home-preview__link {
	font-size: 13px;
	font-weight: 600;
	color: var(--gold-ink);
	display: inline-flex;
	align-items: center;
	gap: 6px;
	white-space: nowrap;
	padding: 10px 0;
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s ease, color 0.2s ease;
}

.home-preview__link:hover {
	border-bottom-color: var(--gold);
	color: var(--gold);
}

.home-quotes {
	padding: 64px 0 96px;
	background:
		radial-gradient(ellipse 70% 50% at 50% 0%, rgba(173, 130, 40, 0.1), transparent 60%),
		linear-gradient(180deg, var(--bg-alt), var(--bg));
}

.home-quotes__inner {
	max-width: var(--wrap);
	margin: 0 auto;
}

.home-quotes .eyebrow {
	text-align: center;
	margin-bottom: 12px;
}

.home-quotes__intro {
	text-align: center;
	max-width: 40ch;
	margin: 0 auto 34px;
	color: var(--ink-soft);
	font-size: 0.98rem;
}

.home-quotes__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 22px;
}

.home-quote {
	position: relative;
	margin: 0;
	padding: 36px 28px 28px;
	background: transparent;
	border: 0;
	border-block-start: 1px solid rgba(173, 130, 40, 0.35);
	border-radius: 0;
	box-shadow: none;
	display: flex;
	flex-direction: column;
	gap: 18px;
	overflow: visible;
}

.home-quote::before {
	content: "“";
	position: absolute;
	top: 8px;
	inset-inline-start: 18px;
	font-family: 'Newsreader', Georgia, serif;
	font-size: 64px;
	line-height: 1;
	color: rgba(173, 130, 40, 0.28);
	pointer-events: none;
}

.home-quote__text {
	margin: 0;
	position: relative;
	z-index: 1;
}

.home-quote__text p {
	margin: 0;
	font-size: 1.14rem;
	line-height: 1.55;
	color: var(--ink);
	font-style: italic;
}

.home-quote__source {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--gold-ink);
}

.editions {
	position: relative;
}

.editions::before {
	content: "";
	display: block;
	width: min(120px, 30vw);
	height: 1px;
	margin: 0 auto 48px;
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.card {
	position: relative;
	overflow: hidden;
}

.card::after {
	content: "";
	position: absolute;
	inset: auto 0 0 0;
	height: 0;
	background: linear-gradient(90deg, transparent, rgba(173, 130, 40, 0.35), transparent);
	transition: height 0.25s ease;
}

.card:hover::after {
	height: 2px;
}

@media (max-width: 900px) {
	.home-quotes__grid {
		grid-template-columns: 1fr;
	}

	.home-preview__head {
		flex-direction: column;
		align-items: flex-start;
	}
}

.hero-portrait {
	position: relative;
	justify-self: center;
}

.hero-portrait .frame {
	position: relative;
	width: min(360px, 72vw);
	aspect-ratio: 975/1024;
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}

.hero-portrait .frame img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hero-portrait figcaption {
	margin-top: 16px;
	text-align: center;
	font-size: 12.5px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(243, 236, 218, 0.6);
}

/* ===== Quick-stat strip ===== */
.quickstrip {
	background: var(--navy);
	color: #F3ECDA;
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	border-top: 1px solid rgba(216, 181, 100, 0.2);
}

.qcell {
	padding: 26px 6vw;
	border-right: 1px solid rgba(216, 181, 100, 0.15);
	text-align: center;
}

.qcell:last-child {
	border-right: none;
}

.qcell b {
	display: block;
	font-family: 'Newsreader', serif;
	font-size: 30px;
	color: var(--gold-bright);
	font-weight: 500;
}

.qcell span {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(243, 236, 218, 0.65);
}

/* ===== Editions grid ===== */
.editions {
	background: var(--bg-alt);
	padding: 100px 0;
}

.editions-head {
	max-width: var(--wrap);
	margin: 0 auto 50px;
	padding: 0 6vw;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	flex-wrap: wrap;
	gap: 20px;
}

.eyebrow {
	font-size: 13px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--gold-ink);
	margin-bottom: 14px;
	font-weight: 600;
}

.editions-head h2 {
	font-family: 'Newsreader', serif;
	font-size: clamp(28px, 3.4vw, 42px);
	font-weight: 500;
	margin: 0;
}

.editions-head p {
	max-width: 36ch;
	color: var(--ink-soft);
	font-size: 14.5px;
	margin: 0;
}

.cgrid {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 6vw;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 20px;
}

.card {
	background: var(--card);
	border-radius: 10px;
	padding: 28px 22px;
	box-shadow: var(--card-shadow);
	border-top: 3px solid var(--gold);
	transition: transform .25s ease;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.card:hover {
	transform: translateY(-6px);
}

.card .icon-wrap {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--bg-alt);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--gold);
}

.card .card-thumb {
	width: 100%;
	aspect-ratio: 16 / 10;
	border-radius: 8px;
	overflow: hidden;
	background: var(--bg-alt);
}

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

html[data-theme="dark"] .card .icon-wrap {
	background: var(--navy);
}

.card .lang-name {
	font-family: 'Newsreader', serif;
	font-size: 20px;
	color: var(--ink);
}

.card .ar-display {
	font-size: 24px;
	color: var(--ink);
}

.card .lang-en {
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ink-soft);
}

.card .go {
	margin-top: auto;
	font-size: 12.5px;
	color: var(--gold-ink);
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 6px;
}

/* ===== Works library page ===== */
.library-main {
	padding: 0 0 72px;
}

.library-hero {
	background:
		radial-gradient(ellipse 80% 60% at 10% 0%, rgba(173, 130, 40, 0.18), transparent 55%),
		linear-gradient(180deg, var(--navy-deep) 0%, var(--navy) 100%);
	color: #F3ECDA;
	padding: 72px 0 56px;
}

.library-hero__inner {
	max-width: 760px;
}

.library-hero .eyebrow {
	color: var(--gold-bright);
}

.library-hero__title {
	font-size: clamp(2rem, 4.5vw, 3.25rem);
	font-weight: 500;
	line-height: 1.15;
	margin: 0 0 14px;
	color: #F3ECDA;
}

.library-hero__lede {
	margin: 0;
	max-width: 46ch;
	font-size: 1.05rem;
	line-height: 1.55;
	color: rgba(243, 236, 218, 0.78);
}

.library-widgets {
	padding: 28px 0 8px;
}

.library-widget {
	margin-bottom: 18px;
	padding: 20px 22px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
}

.library-widget__title {
	margin: 0 0 10px;
	font-size: 1.25rem;
	font-weight: 500;
}

.library-band {
	padding: 28px 0 12px;
}

.library-band--featured {
	background:
		linear-gradient(180deg, rgba(173, 130, 40, 0.07), transparent 70%),
		var(--bg-alt);
	padding-top: 40px;
	padding-bottom: 20px;
	margin-bottom: 8px;
}

.works-shelf {
	--shelf-gap: 24px;
	margin-bottom: 12px;
}

.works-shelf__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 24px;
}

.works-shelf__eyebrow {
	margin: 0 0 8px;
	font-size: 11px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--gold-ink);
}

.works-shelf__title {
	margin: 0;
	font-size: clamp(1.45rem, 2.6vw, 2rem);
	font-weight: 500;
	color: var(--ink);
	letter-spacing: -0.01em;
}

.works-shelf__controls {
	display: flex;
	align-items: center;
	gap: 2px;
	flex-shrink: 0;
	padding: 5px;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: color-mix(in srgb, var(--card) 88%, transparent);
	box-shadow: 0 8px 28px rgba(15, 31, 61, 0.08);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

html[data-theme="dark"] .works-shelf__controls {
	box-shadow: 0 10px 32px rgba(0, 0, 0, 0.35);
}

.works-shelf__count {
	font-size: 10px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--ink-soft);
	min-width: 4.75rem;
	text-align: center;
	padding-inline: 10px;
	font-variant-numeric: tabular-nums;
	border-inline-end: 1px solid var(--line);
	margin-inline-end: 4px;
}

.works-shelf__btn {
	appearance: none;
	width: 42px;
	height: 42px;
	border-radius: 999px;
	border: 0;
	background: transparent;
	color: var(--ink);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease, opacity 0.22s ease;
}

.works-shelf__btn:hover:not(:disabled),
.works-shelf__btn:focus-visible {
	color: var(--gold-ink);
	background: rgba(173, 130, 40, 0.14);
	transform: scale(1.04);
}

.works-shelf__btn:disabled {
	opacity: 0.28;
	cursor: default;
}

.works-shelf__stage {
	position: relative;
	overflow: hidden;
	overflow-x: clip;
	outline: none;
	padding: 22px 6px 26px;
	margin-inline: -6px;
	contain: layout paint;
	isolation: isolate;
	border-radius: 18px;
	background:
		linear-gradient(180deg, color-mix(in srgb, var(--card) 40%, transparent), transparent 38%),
		radial-gradient(ellipse 120% 80% at 50% 100%, rgba(173, 130, 40, 0.06), transparent 62%);
}

.works-shelf__stage::after {
	content: "";
	position: absolute;
	inset: 8px 4px 12px;
	border-radius: 14px;
	border: 1px solid color-mix(in srgb, var(--gold) 22%, var(--line));
	pointer-events: none;
	z-index: 4;
	opacity: 0.85;
}

.works-shelf__fade {
	position: absolute;
	top: 0;
	bottom: 10px;
	width: 80px;
	z-index: 3;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.works-shelf__fade--start {
	inset-inline-start: 0;
	background: linear-gradient(to right, var(--bg) 15%, transparent);
}

.works-shelf__fade--end {
	inset-inline-end: 0;
	background: linear-gradient(to left, var(--bg) 15%, transparent);
}

.home-preview .works-shelf__fade--start {
	background: linear-gradient(to right, var(--bg-alt) 20%, transparent);
}

.home-preview .works-shelf__fade--end {
	background: linear-gradient(to left, var(--bg-alt) 20%, transparent);
}

.library-band--featured .works-shelf__fade--start {
	background: linear-gradient(to right, var(--bg-alt) 20%, transparent);
}

.library-band--featured .works-shelf__fade--end {
	background: linear-gradient(to left, var(--bg-alt) 20%, transparent);
}

.works-shelf:not(.is-at-start) .works-shelf__fade--start,
.works-shelf:not(.is-at-end) .works-shelf__fade--end {
	opacity: 1;
}

.works-shelf__track {
	list-style: none;
	margin: 0;
	padding: 4px 2px 8px;
	display: flex;
	gap: var(--shelf-gap, 24px);
	will-change: transform;
}

.works-shelf__slide {
	flex: 0 0 auto;
	padding-block: 4px;
}

.works-shelf__dots {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 26px;
	min-height: 12px;
	padding: 10px 18px;
	width: fit-content;
	max-width: 100%;
	margin-inline: auto;
	border-radius: 999px;
	border: 1px solid var(--line);
	background: color-mix(in srgb, var(--card) 90%, transparent);
	box-shadow: 0 6px 22px rgba(15, 31, 61, 0.06);
}

.works-shelf__dot {
	appearance: none;
	width: 6px;
	height: 6px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: color-mix(in srgb, var(--ink) 18%, transparent);
	cursor: pointer;
	transition: width 0.28s cubic-bezier(0.22, 1, 0.36, 1), background 0.28s ease, transform 0.2s ease;
}

.works-shelf__dot:hover {
	transform: scale(1.15);
	background: color-mix(in srgb, var(--gold) 45%, transparent);
}

html[data-theme="dark"] .works-shelf__dot {
	background: rgba(243, 236, 218, 0.2);
}

.works-shelf__dot.is-active {
	width: 32px;
	background: linear-gradient(90deg, var(--gold), var(--gold-bright));
	box-shadow: 0 2px 10px rgba(173, 130, 40, 0.35);
}

.works-shelf--featured .work-card__link {
	box-shadow:
		0 0 0 1px rgba(173, 130, 40, 0.22),
		0 18px 42px rgba(15, 31, 61, 0.1);
}

html[dir="rtl"] .works-shelf__btn svg {
	transform: scaleX(-1);
}

.work-card {
	height: 100%;
}

.work-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
	border-radius: 16px;
	overflow: hidden;
	background: var(--card);
	border: 1px solid color-mix(in srgb, var(--line) 85%, var(--gold) 15%);
	box-shadow:
		0 2px 0 rgba(255, 255, 255, 0.04) inset,
		0 14px 36px rgba(15, 31, 61, 0.08);
	transition:
		transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
		border-color 0.32s ease,
		box-shadow 0.32s ease;
	position: relative;
}

html[data-theme="dark"] .work-card__link {
	box-shadow:
		0 1px 0 rgba(255, 255, 255, 0.05) inset,
		0 16px 40px rgba(0, 0, 0, 0.32);
}

.work-card__link::after {
	content: "";
	position: absolute;
	inset-inline: 18px;
	bottom: 0;
	height: 2px;
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
	opacity: 0;
	transform: scaleX(0.6);
	transition: opacity 0.3s ease, transform 0.3s ease;
	pointer-events: none;
	z-index: 2;
}

.work-card__link:hover,
.work-card__link:focus-visible {
	transform: translateY(-8px);
	border-color: rgba(173, 130, 40, 0.55);
	box-shadow:
		0 0 0 1px rgba(173, 130, 40, 0.18),
		0 24px 52px rgba(15, 31, 61, 0.14);
	color: inherit;
}

.work-card__link:hover::after,
.work-card__link:focus-visible::after {
	opacity: 1;
	transform: scaleX(1);
}

.work-card.is-featured .work-card__link {
	border-color: rgba(173, 130, 40, 0.42);
	box-shadow:
		0 0 0 1px rgba(173, 130, 40, 0.28),
		0 20px 48px rgba(15, 31, 61, 0.12);
}

.work-card__cover {
	position: relative;
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	background: var(--navy);
}

.work-card__cover.has-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.work-card__link:hover .work-card__cover.has-image img,
.work-card__link:focus-visible .work-card__cover.has-image img {
	transform: scale(1.06);
}

.work-card__cover.has-image::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 45%, rgba(5, 12, 28, 0.55) 100%);
	z-index: 1;
	pointer-events: none;
	opacity: 0.75;
	transition: opacity 0.35s ease;
}

.work-card__cover.has-image::after {
	content: "";
	position: absolute;
	inset: 10px;
	border-radius: 10px;
	border: 1px solid rgba(216, 181, 100, 0.28);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
	z-index: 2;
	pointer-events: none;
}

.work-card__link:hover .work-card__cover.has-image::before {
	opacity: 0.55;
}

.work-card__cover.is-generated {
	background:
		linear-gradient(155deg, hsl(calc(210 + var(--cover-shift, 0deg)), 42%, 22%), var(--navy-deep) 70%);
	color: #F3ECDA;
	border-bottom: 1px solid rgba(173, 130, 40, 0.35);
}

.work-card__cover-inner {
	position: absolute;
	inset: 0;
	padding: 22px 18px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	gap: 10px;
	background:
		radial-gradient(ellipse 90% 55% at 20% 0%, rgba(173, 130, 40, 0.32), transparent 55%),
		linear-gradient(180deg, transparent 25%, rgba(5, 12, 28, 0.78) 100%);
}

.work-card__ornament {
	position: absolute;
	top: 18px;
	inset-inline-start: 18px;
	width: 32px;
	height: 32px;
	border: 1px solid rgba(216, 181, 100, 0.6);
	border-radius: 50%;
	box-shadow: inset 0 0 0 5px rgba(216, 181, 100, 0.1);
}

.work-card__cover-kind {
	font-size: 10px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--gold-bright);
}

.work-card__cover-title {
	font-size: 1.12rem;
	line-height: 1.28;
	color: #F3ECDA;
	text-shadow: 0 2px 12px rgba(0, 0, 0, 0.35);
}

.work-card__cover-author {
	font-size: 10px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(243, 236, 218, 0.7);
}

.work-card__badge {
	position: absolute;
	top: 14px;
	inset-inline-end: 14px;
	z-index: 3;
	padding: 5px 11px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--gold-bright), var(--gold));
	color: var(--navy-deep);
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	box-shadow: 0 4px 14px rgba(173, 130, 40, 0.45);
}

.work-card__meta {
	display: flex;
	flex-direction: column;
	gap: 9px;
	padding: 18px 18px 20px;
	flex: 1;
	background: linear-gradient(180deg, var(--card), color-mix(in srgb, var(--card) 92%, var(--bg-alt)));
}

.work-card__kind {
	font-size: 10px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--gold-ink);
}

.work-card__title {
	font-size: 1.12rem;
	line-height: 1.32;
	color: var(--ink);
	letter-spacing: -0.01em;
}

.work-card__go {
	margin-top: auto;
	padding-top: 10px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--gold-ink);
	display: inline-flex;
	align-items: center;
	gap: 7px;
	opacity: 0.88;
	transition: gap 0.25s ease, opacity 0.25s ease, color 0.25s ease;
}

.work-card__link:hover .work-card__go,
.work-card__link:focus-visible .work-card__go {
	opacity: 1;
	gap: 11px;
	color: var(--gold);
}

.library-empty {
	color: var(--ink-soft);
}

html[dir="rtl"] .work-card__go .icon,
html[dir="rtl"] .btn-gold svg {
	transform: scaleX(-1);
}

/* ===== Generic content (pages, posts, archives) ===== */
.site-main {
	padding: 70px 0;
}

.content-narrow {
	max-width: 760px;
}

.reading-shell {
	--read-size: 18px;
	max-width: 680px;
	transition: max-width 0.25s ease;
}

.reading-shell.is-wide {
	max-width: 820px;
}

/* Reader tools — Aa popover (never expands the sticky bar width) */
.reading-toolbar--header {
	position: relative;
	flex-shrink: 0;
	z-index: 42;
}

.reading-toolbar__toggle-mark {
	font-family: 'Newsreader', Georgia, serif;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: none;
	line-height: 1;
}

.reading-toolbar__panel {
	position: fixed;
	top: calc(var(--reader-bar-bottom, 64px) + 8px);
	inset-inline-end: max(12px, env(safe-area-inset-right, 0px));
	display: none;
	flex-direction: column;
	gap: 8px;
	width: min(280px, calc(100% - 24px));
	max-width: calc(100% - 24px);
	padding: 12px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 16px;
	box-shadow: 0 18px 40px rgba(15, 31, 61, 0.14);
	box-sizing: border-box;
	z-index: 45;
}

.reading-toolbar.is-expanded .reading-toolbar__panel {
	display: flex;
}

.reading-toolbar.is-collapsed .reading-toolbar__panel {
	display: none;
}

.reading-toolbar__group {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	justify-content: flex-start;
}

.reading-btn {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--ink-soft);
	width: 40px;
	height: 40px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: 'Newsreader', Georgia, serif;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	line-height: 1;
	flex: 0 0 auto;
	transition: background 0.2s ease, color 0.2s ease;
}

.reading-btn:hover,
.reading-btn.is-active,
.reading-btn[aria-pressed="true"] {
	background: rgba(173, 130, 40, 0.14);
	color: var(--gold-ink);
}

.reading-btn svg {
	display: block;
}

.reading-btn--mode {
	position: relative;
}

.reading-btn--mode .icon-expand,
.reading-btn--mode .icon-compress {
	position: absolute;
	inset: 0;
	margin: auto;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.reading-btn--mode .icon-compress,
.reading-btn--mode.is-active .icon-expand {
	opacity: 0;
	transform: scale(0.7);
}

.reading-btn--mode.is-active .icon-compress {
	opacity: 1;
	transform: scale(1);
}

.reading-btn--bookmark.is-active svg,
.reading-btn--bookmark[aria-pressed="true"] svg {
	fill: currentColor;
}

.reading-hl-palette {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	padding-top: 8px;
	border-top: 1px solid var(--line);
}

.reading-hl-palette[hidden] {
	display: none !important;
}

.reading-hl-palette__label {
	font-size: 11px;
	font-weight: 600;
	color: var(--ink-soft);
	letter-spacing: 0.02em;
	padding-inline-end: 2px;
	width: 100%;
}

.reading-hl-swatch {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	border: 2px solid rgba(26, 36, 64, 0.15);
	cursor: pointer;
	padding: 0;
	appearance: none;
}

.reading-hl-swatch.is-active {
	outline: 2px solid var(--gold);
	outline-offset: 1px;
}

.reading-hl-swatch[data-hl-color="gold"] {
	background: #E8C76A;
}

.reading-hl-swatch[data-hl-color="amber"] {
	background: #F0A35E;
}

.reading-hl-swatch[data-hl-color="sage"] {
	background: #9CB89A;
}

.reading-hl-swatch[data-hl-color="rose"] {
	background: #E0A0A8;
}

.reading-hl-clear {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--ink-soft);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	width: 22px;
	height: 22px;
	border-radius: 50%;
}

.reading-hl-clear:hover {
	background: rgba(173, 130, 40, 0.12);
	color: var(--gold-ink);
}

.reading-toast {
	position: fixed;
	top: calc(var(--reader-bar-bottom, 64px) + 8px);
	inset-inline-end: max(12px, env(safe-area-inset-right, 0px));
	max-width: min(240px, calc(100% - 24px));
	padding: 10px 14px;
	background: var(--navy);
	color: #F3ECDA;
	border-radius: 10px;
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.35;
	box-shadow: var(--card-shadow);
	cursor: pointer;
	opacity: 0;
	transform: translateY(-4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	z-index: 46;
	box-sizing: border-box;
}

.reading-toast.is-visible {
	opacity: 1;
	transform: translateY(0);
}

.reading-toast[hidden] {
	display: none !important;
}

/* Contents — fixed side drawer (never widens the page) */
.reading-index--header {
	position: relative;
	flex-shrink: 0;
	z-index: 42;
}

.reading-index--header[hidden] {
	display: none !important;
}

.reading-index__icon {
	display: block;
	flex-shrink: 0;
}

.reading-index__toggle-label {
	white-space: nowrap;
}

.reading-index__scrim {
	position: fixed;
	inset: 0;
	background: rgba(15, 31, 61, 0.38);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	z-index: 48;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

body.is-index-open {
	overflow: hidden;
}

.reading-index.is-sheet-open .reading-index__scrim,
.reading-index.is-expanded .reading-index__scrim,
body.is-index-open>.reading-index__scrim {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

.reading-index__panel {
	position: fixed;
	top: 0;
	bottom: 0;
	inset-inline-start: 0;
	width: min(320px, calc(100% - 48px));
	max-width: 100%;
	padding: 0;
	background: var(--card);
	border: 0;
	border-inline-end: 1px solid var(--line);
	border-radius: 0;
	box-shadow: 18px 0 48px rgba(15, 31, 61, 0.16);
	overscroll-behavior: contain;
	overflow: auto;
	z-index: 49;
	opacity: 1;
	visibility: hidden;
	pointer-events: none;
	transform: translateX(-100%);
	transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.28s ease;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	clip-path: inset(0 0 0 100%);
}

html[dir="rtl"] .reading-index__panel {
	transform: translateX(100%);
	box-shadow: -18px 0 48px rgba(15, 31, 61, 0.16);
	clip-path: inset(0 100% 0 0);
}

.reading-index.is-expanded .reading-index__panel,
.reading-index.is-sheet-open .reading-index__panel,
body.is-index-open>.reading-index__panel {
	transform: translateX(0);
	visibility: visible;
	pointer-events: auto;
	clip-path: none;
}

.reading-index.is-collapsed .reading-index__panel {
	transform: translateX(-100%);
	pointer-events: none;
	visibility: hidden;
	clip-path: inset(0 0 0 100%);
}

html[dir="rtl"] .reading-index.is-collapsed .reading-index__panel {
	transform: translateX(100%);
	clip-path: inset(0 100% 0 0);
}

/* Portaled to body — open/close follows body class (escapes header backdrop-filter) */
body.is-index-open>.reading-index__panel {
	transform: translateX(0);
	visibility: visible;
	pointer-events: auto;
	clip-path: none;
}

body:not(.is-index-open)>.reading-index__panel {
	transform: translateX(-100%);
	visibility: hidden;
	pointer-events: none;
	clip-path: inset(0 0 0 100%);
}

html[dir="rtl"] body:not(.is-index-open)>.reading-index__panel {
	transform: translateX(100%);
	clip-path: inset(0 100% 0 0);
}

.reading-index__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 16px 12px;
	border-bottom: 1px solid var(--line);
	position: sticky;
	top: 0;
	background: var(--card);
	z-index: 1;
}

.reading-index__eyebrow {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--gold-ink);
}

.reading-index__close {
	appearance: none;
	border: 1px solid var(--line);
	background: transparent;
	color: var(--ink-soft);
	width: 36px;
	height: 36px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.reading-index__close:hover {
	border-color: var(--gold);
	color: var(--gold-ink);
	background: rgba(173, 130, 40, 0.1);
}

.reading-index__list {
	list-style: none;
	margin: 0;
	padding: 10px 10px 28px;
}

.reading-index__item {
	margin: 0;
}

.reading-index__item a {
	display: block;
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--ink-soft);
	font-size: 13.5px;
	line-height: 1.4;
	text-decoration: none;
	border-inline-start: 2px solid transparent;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.reading-index__item--h3 a,
.reading-index__item--h4 a,
.reading-index__item--h5 a {
	padding-inline-start: 22px;
	font-size: 12.5px;
}

.reading-index__item a:hover,
.reading-index__item a:focus-visible {
	color: var(--ink);
	background: rgba(173, 130, 40, 0.1);
}

.reading-index__item a.is-active {
	color: var(--gold-ink);
	background: rgba(173, 130, 40, 0.14);
	border-inline-start-color: var(--gold);
	font-weight: 600;
}

/* Text highlights */
mark.albarbari-hl {
	border-radius: 2px;
	padding: 0.05em 0;
	color: inherit;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

mark.albarbari-hl--gold {
	background: rgba(232, 199, 106, 0.55);
}

mark.albarbari-hl--amber {
	background: rgba(240, 163, 94, 0.45);
}

mark.albarbari-hl--sage {
	background: rgba(156, 184, 154, 0.5);
}

mark.albarbari-hl--rose {
	background: rgba(224, 160, 168, 0.5);
}

html[data-theme="dark"] mark.albarbari-hl--gold {
	background: rgba(232, 199, 106, 0.35);
}

html[data-theme="dark"] mark.albarbari-hl--amber {
	background: rgba(240, 163, 94, 0.32);
}

html[data-theme="dark"] mark.albarbari-hl--sage {
	background: rgba(156, 184, 154, 0.32);
}

html[data-theme="dark"] mark.albarbari-hl--rose {
	background: rgba(224, 160, 168, 0.32);
}

html.is-highlight-mode .reading-shell .entry-content,
.reading-shell.is-highlight-mode .entry-content {
	cursor: text;
}

.entry-title {
	font-family: 'Newsreader', serif;
	font-weight: 500;
	font-size: clamp(28px, 4vw, 44px);
	line-height: 1.15;
	margin: 0 0 14px;
	color: var(--ink);
	letter-spacing: -0.01em;
}

.entry-meta {
	font-size: 13px;
	color: var(--ink-soft);
	margin-bottom: 26px;
	letter-spacing: 0.02em;
}

.entry-content {
	font-size: var(--read-size, 18px);
	line-height: 1.8;
	color: var(--ink);
	letter-spacing: 0.005em;
}

/* Reading typefaces: Elegant Latin + two Customizer Arabic slots */
.reading-shell.font-literary .entry-content,
.reading-shell.font-literary .entry-title {
	font-family: 'Newsreader', Georgia, 'Times New Roman', serif;
}

.reading-shell.font-naskh .entry-content,
.reading-shell.font-naskh .entry-title {
	font-family: var(--read-font-naskh, 'Amiri', 'Traditional Arabic', serif);
	line-height: var(--read-lh-naskh, 1.95);
	letter-spacing: 0;
}

.reading-shell.font-farsi .entry-content,
.reading-shell.font-farsi .entry-title {
	font-family: var(--read-font-farsi, 'Vazirmatn', 'Tahoma', sans-serif);
	line-height: var(--read-lh-farsi, 1.9);
	letter-spacing: 0;
}

.reading-btn--font .reading-btn__font-label {
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.reading-shell.font-naskh .reading-btn--font .reading-btn__font-label,
.reading-shell.font-farsi .reading-btn--font .reading-btn__font-label,
body.lang-ar .reading-btn--font .reading-btn__font-label {
	font-family: var(--read-font-naskh, 'Amiri', serif);
}

.entry-content>*:first-child {
	margin-top: 0;
}

.entry-content h2,
.entry-content h2.reading-section {
	font-family: 'Newsreader', Georgia, serif;
	font-weight: 500;
	font-size: 1.45em;
	line-height: 1.3;
	margin: 2.6em 0 0.85em;
	text-align: center;
	color: var(--ink);
	letter-spacing: 0.01em;
	scroll-margin-top: 96px;
}

.entry-content h2.reading-section::after {
	content: '';
	display: block;
	width: 2.75rem;
	height: 2px;
	margin: 0.7em auto 0;
	background: linear-gradient(90deg, transparent, var(--gold), transparent);
	border-radius: 2px;
}

.entry-content h3,
.entry-content h3.reading-section {
	font-family: 'Newsreader', Georgia, serif;
	font-weight: 500;
	font-size: 1.2em;
	line-height: 1.35;
	margin: 2.1em 0 0.6em;
	text-align: center;
	color: var(--ink);
	scroll-margin-top: 96px;
}

.entry-content h4,
.entry-content h4.reading-section {
	font-family: 'Newsreader', Georgia, serif;
	font-weight: 500;
	font-size: 1.05em;
	margin: 1.8em 0 0.5em;
	text-align: center;
	color: var(--ink-soft);
	scroll-margin-top: 96px;
}

.entry-content .reading-ornament {
	text-align: center;
	font-size: 1.35em;
	margin: 2em 0 0.35em;
	line-height: 1.2;
	user-select: none;
}

.entry-content hr.reading-break,
.entry-content .reading-break {
	border: 0;
	height: 0;
	margin: 2.4em auto;
	max-width: 12rem;
	border-top: 1px solid var(--line);
	background: none;
	position: relative;
}

.entry-content hr.reading-break::after {
	content: '◆';
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -55%);
	font-size: 8px;
	color: var(--gold);
	background: var(--bg);
	padding: 0 0.55em;
	line-height: 1;
}

.entry-content p {
	margin: 0 0 1.25em;
	hyphens: auto;
	-webkit-hyphens: auto;
}

.entry-content p:empty {
	display: none;
}

.entry-content strong,
.entry-content b {
	font-weight: 600;
	color: var(--ink);
}

.entry-content em,
.entry-content i {
	font-style: italic;
}

.entry-content ul,
.entry-content ol {
	margin: 0 0 1.25em;
	padding-inline-start: 1.35em;
}

.entry-content li {
	margin-bottom: 0.45em;
}

.entry-content a {
	color: var(--gold-ink);
	text-decoration: underline;
	text-decoration-color: rgba(173, 130, 40, 0.45);
	text-underline-offset: 0.22em;
	text-decoration-thickness: 1px;
	transition: color 0.18s ease, text-decoration-color 0.18s ease, text-decoration-thickness 0.18s ease;
}

.entry-content a:hover,
.entry-content a:focus-visible {
	color: var(--gold);
	text-decoration-color: var(--gold);
	text-decoration-thickness: 2px;
}

.entry-content a:visited {
	color: var(--gold-ink);
}

html[data-theme="dark"] .entry-content a {
	text-decoration-color: rgba(216, 181, 100, 0.45);
}

/* ===== Works catalog (language edition hubs) ===== */
.reading-shell:has(.works-catalog) {
	max-width: 920px;
}

.works-lead {
	display: grid;
	gap: 0.85rem;
	margin: 0 0 2rem;
	padding: 1.35rem 1.4rem 1.45rem;
	border-radius: 14px;
	background:
		linear-gradient(180deg, rgba(173, 130, 40, 0.08), transparent 55%),
		var(--card);
	border: 1px solid var(--line);
	box-shadow: var(--card-shadow);
}

.works-lead__line {
	margin: 0 !important;
	color: var(--ink-soft);
	font-size: 0.98em;
	line-height: 1.75;
	hyphens: none;
}

.works-lead__line:first-child {
	color: var(--ink);
	font-weight: 600;
	font-size: 1.05em;
}

.works-catalog {
	margin: 1.75rem 0 2.5rem;
}

.works-catalog__list {
	list-style: none;
	margin: 0 !important;
	padding: 0 !important;
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.7rem;
}

@media (min-width: 720px) {
	.works-catalog__list {
		grid-template-columns: 1fr 1fr;
		gap: 0.85rem;
	}
}

.works-catalog__item {
	margin: 0 !important;
}

.works-catalog__link {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 0.85rem;
	min-height: 4.25rem;
	padding: 0.95rem 1.05rem;
	border-radius: 12px;
	background: var(--card);
	border: 1px solid var(--line);
	border-inline-start: 3px solid var(--gold);
	box-shadow: 0 8px 22px rgba(15, 31, 61, 0.06);
	text-decoration: none !important;
	color: var(--ink) !important;
	transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.works-catalog__link:hover,
.works-catalog__link:focus-visible {
	transform: translateY(-3px);
	border-color: rgba(173, 130, 40, 0.45);
	box-shadow: 0 14px 30px rgba(15, 31, 61, 0.12);
	background: linear-gradient(135deg, rgba(173, 130, 40, 0.08), var(--card) 55%);
	text-decoration: none !important;
	color: var(--ink) !important;
}

.works-catalog__num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.35rem;
	height: 2.35rem;
	padding: 0 0.35rem;
	border-radius: 999px;
	background: rgba(173, 130, 40, 0.12);
	color: var(--gold-ink);
	font-family: 'Newsreader', 'Amiri', serif;
	font-size: 0.95rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1;
}

.works-catalog__title {
	font-size: 1.02rem;
	line-height: 1.45;
	font-weight: 600;
	text-wrap: pretty;
}

.works-catalog__go {
	display: inline-flex;
	color: var(--gold);
	opacity: 0.75;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.works-catalog__link:hover .works-catalog__go,
.works-catalog__link:focus-visible .works-catalog__go {
	opacity: 1;
	transform: translateX(3px);
}

html[dir="rtl"] .works-catalog__link:hover .works-catalog__go,
html[dir="rtl"] .works-catalog__link:focus-visible .works-catalog__go,
body.rtl .works-catalog__link:hover .works-catalog__go,
body.rtl .works-catalog__link:focus-visible .works-catalog__go {
	transform: translateX(-3px);
}

html[dir="rtl"] .works-catalog__go svg,
body.rtl .works-catalog__go svg {
	transform: scaleX(-1);
}

html[data-theme="dark"] .works-catalog__link {
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .works-catalog__link:hover,
html[data-theme="dark"] .works-catalog__link:focus-visible {
	box-shadow: 0 16px 34px rgba(0, 0, 0, 0.4);
}

html[data-theme="dark"] .works-catalog__num {
	background: rgba(216, 181, 100, 0.14);
	color: var(--gold-bright);
}

.entry-content img,
.entry-content .wp-block-image img {
	border-radius: 8px;
	margin: 1.6em auto;
	height: auto;
}

.entry-content figure,
.entry-content .wp-block-image {
	margin: 1.8em 0;
}

.entry-content figcaption,
.entry-content .wp-element-caption {
	font-size: 0.82em;
	color: var(--ink-soft);
	margin-top: 0.55em;
	text-align: center;
	font-family: Inter, system-ui, sans-serif;
	letter-spacing: 0.02em;
}

.entry-content blockquote,
.entry-content .wp-block-quote,
.entry-content .wp-block-pullquote {
	border-left: 3px solid var(--gold);
	margin: 1.8em 0;
	padding: 0.4em 0 0.4em 1.35em;
	color: var(--ink-soft);
	font-style: italic;
	font-size: 1.05em;
}

.entry-content hr,
.entry-content .wp-block-separator {
	border: 0;
	border-top: 1px solid var(--line);
	margin: 2.6em auto;
	max-width: 8rem;
	background: none;
}

.entry-content .wp-block-separator.is-style-wide {
	max-width: 100%;
}

.entry-content {
	overflow-wrap: anywhere;
	word-break: break-word;
	max-width: 100%;
}

.entry-content img,
.entry-content video,
.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content table,
.entry-content pre {
	max-width: 100%;
}

.entry-content .alignwide {
	max-width: min(920px, 100%);
}

/* Avoid 100vw breakout — it forces horizontal scroll on iOS Safari */
.entry-content .alignfull {
	width: 100%;
	max-width: 100%;
	margin-left: 0;
	margin-right: 0;
}

/* Soften share / plugin chrome inside literary pages */
.entry-content .sharedaddy,
.entry-content .jp-relatedposts,
.entry-content .ssba,
.entry-content .heateor_sss_sharing_container {
	margin-top: 2.5em;
	padding-top: 1.5em;
	border-top: 1px solid var(--line);
	font-family: Inter, system-ui, sans-serif;
	font-size: 14px;
	max-width: 100%;
	overflow-x: auto;
}

.page-links {
	margin-top: 2.2em;
	font-size: 0.9em;
	color: var(--ink-soft);
	font-family: Inter, system-ui, sans-serif;
}

.featured-media {
	margin: 0 0 36px;
	border-radius: 12px;
	overflow: hidden;
}

.featured-media img {
	width: 100%;
	height: auto;
	display: block;
}

/* Distraction-free / fullscreen reader mode */
html.is-reader-mode .home-footer,
html.is-reader-mode .comments-area,
html.is-reader-mode #wpadminbar,
html.is-reader-mode .sharedaddy,
html.is-reader-mode .jp-relatedposts,
html.is-reader-mode .heateor_sss_sharing_container,
html.is-reader-mode .ssba {
	display: none !important;
}

/* Keep reading tools available; hide the rest of the top chrome */
html.is-reader-mode .site-bar {
	background: transparent;
	border-bottom: 0;
	box-shadow: none;
	pointer-events: none;
}

html.is-reader-mode .site-bar__inner {
	justify-content: flex-end;
	padding-top: 10px;
	padding-bottom: 10px;
}

html.is-reader-mode .site-bar .brand,
html.is-reader-mode .site-bar .nav-main,
html.is-reader-mode .reader-progress {
	display: none !important;
}

html.is-reader-mode .site-bar .reader-chrome {
	pointer-events: auto;
	box-shadow: var(--card-shadow);
}

html.is-reader-mode {
	margin-top: 0 !important;
}

html.is-reader-mode body {
	background: var(--bg);
}

html.is-reader-mode .site-main--reading {
	padding-top: 36px;
	padding-bottom: 80px;
	min-height: 100vh;
}

html.is-reader-mode .featured-media {
	display: none;
}

html.is-reader-mode .reading-shell {
	max-width: 640px;
}

html.is-reader-mode .reading-shell.is-wide {
	max-width: 780px;
}


.post-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 28px;
}

.post-card {
	background: var(--card);
	border-radius: 12px;
	overflow: hidden;
	box-shadow: var(--card-shadow);
	border-top: 3px solid var(--gold);
	display: flex;
	flex-direction: column;
}

.post-card .thumb img {
	width: 100%;
	aspect-ratio: 16/10;
	object-fit: cover;
}

.post-card .body {
	padding: 22px 22px 26px;
}

.post-card h2 {
	font-family: 'Newsreader', serif;
	font-weight: 500;
	font-size: 22px;
	margin: 0 0 10px;
}

.post-card h2 a {
	color: var(--ink);
}

.post-card .excerpt {
	font-size: 14.5px;
	color: var(--ink-soft);
}

.page-title {
	font-family: 'Newsreader', serif;
	font-weight: 500;
	font-size: clamp(30px, 4vw, 46px);
	margin: 0 0 40px;
	color: var(--ink);
}

.pagination {
	margin-top: 50px;
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.pagination .page-numbers {
	padding: 10px 16px;
	border: 1px solid var(--line);
	border-radius: 8px;
	color: var(--ink);
}

.pagination .page-numbers.current {
	background: var(--gold);
	color: var(--navy-deep);
	border-color: var(--gold);
}

.btn-outline {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--gold);
	color: var(--gold-ink);
	padding: 12px 22px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 14px;
}

/* Comments */
.comments-area {
	max-width: 760px;
	margin-top: 60px;
	padding-top: 8px;
}

.comments-title {
	font-family: 'Newsreader', serif;
	font-weight: 500;
	font-size: clamp(22px, 3vw, 30px);
	margin: 0 0 24px;
	color: var(--ink);
}

.comment-list,
.comment-list .children {
	list-style: none;
	margin: 0;
	padding: 0;
}

.comment-list>.comment {
	border-top: 1px solid var(--line);
	padding: 22px 0 4px;
}

.comment-list .children {
	margin-top: 8px;
	margin-inline-start: 1.5rem;
	padding-inline-start: 1rem;
	border-inline-start: 2px solid rgba(173, 130, 40, 0.35);
}

.comment-list .children .comment {
	border-top: 1px solid var(--line);
	padding: 18px 0 4px;
}

.comment-body {
	position: relative;
}

.comment-author {
	font-weight: 600;
	color: var(--ink);
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.comment-author .avatar {
	border-radius: 50%;
	width: 44px;
	height: 44px;
	object-fit: cover;
}

.comment-author .fn {
	font-style: normal;
}

.comment-author .says {
	display: none;
}

.comment-meta {
	font-size: 12.5px;
	color: var(--ink-soft);
	margin: 6px 0 10px;
}

.comment-meta a {
	color: var(--ink-soft);
}

.comment-content {
	font-size: 15.5px;
	line-height: 1.65;
	color: var(--ink);
}

.comment-content p {
	margin: 0 0 12px;
}

.comment-awaiting-moderation {
	font-size: 13px;
	color: var(--gold-ink);
	margin: 0 0 10px;
}

.reply {
	margin: 4px 0 8px;
}

.comment-reply-link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	font-weight: 600;
	color: var(--gold-ink);
	padding: 6px 12px;
	border: 1px solid rgba(173, 130, 40, 0.4);
	border-radius: 999px;
	background: transparent;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.comment-reply-link:hover {
	background: rgba(173, 130, 40, 0.12);
	color: var(--gold);
	border-color: var(--gold);
}

.bypostauthor>.comment-body {
	background: rgba(173, 130, 40, 0.08);
	border-radius: 10px;
	padding: 14px 16px;
	margin-inline: -4px;
}

.no-comments {
	color: var(--ink-soft);
	font-size: 14.5px;
}

.comment-respond {
	margin-top: 36px;
	padding: 24px 22px 8px;
	background: var(--card);
	border: 1px solid var(--line);
	border-radius: 12px;
	box-shadow: var(--card-shadow);
}

.comment-reply-title {
	font-family: 'Newsreader', serif;
	font-weight: 500;
	font-size: 22px;
	margin: 0 0 16px;
	color: var(--ink);
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 10px;
}

.comment-reply-title small {
	font-family: Inter, system-ui, sans-serif;
	font-size: 13px;
	font-weight: 600;
}

#cancel-comment-reply-link {
	color: var(--gold-ink);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.comment-notes,
.logged-in-as,
.comment-form-cookies-consent {
	font-size: 13px;
	color: var(--ink-soft);
	margin: 0 0 14px;
}

.comment-form label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--ink);
	margin-bottom: 6px;
}

.comment-form-cookies-consent label {
	display: inline;
	font-weight: 400;
	margin-inline-start: 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: 1px solid var(--line);
	border-radius: 8px;
	background: var(--bg);
	color: var(--ink);
	margin-bottom: 14px;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
}

.comment-form textarea {
	min-height: 140px;
	resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
	outline: 2px solid rgba(173, 130, 40, 0.45);
	outline-offset: 1px;
	border-color: var(--gold);
}

.form-submit {
	margin: 8px 0 16px;
}

.comment-form .submit,
.comment-form input[type="submit"] {
	appearance: none;
	border: 0;
	background: var(--gold);
	color: var(--navy-deep);
	font-weight: 700;
	font-size: 14px;
	padding: 12px 22px;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.15s ease;
}

.comment-form .submit:hover,
.comment-form input[type="submit"]:hover {
	background: var(--gold-bright);
}

.comment-navigation,
.comments-pagination {
	margin: 20px 0;
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	font-size: 13px;
}

/* ===== Footer ===== */
.home-footer {
	background: var(--navy-deep);
	color: rgba(243, 236, 218, 0.78);
	padding-top: 70px;
}

.footer-top {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 6vw 50px;
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr;
	gap: 40px;
	border-bottom: 1px solid rgba(216, 181, 100, 0.18);
}

.footer-brand .brand-text .lat {
	color: #F3ECDA;
	font-size: 20px;
}

.footer-brand .brand-text .ar-display {
	font-size: 19px;
	color: var(--gold-bright);
}

.footer-brand p {
	margin-top: 16px;
	font-size: 13.5px;
	max-width: 34ch;
	color: rgba(243, 236, 218, 0.6);
}

.fcol h4 {
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--gold-bright);
	margin-bottom: 18px;
	font-weight: 600;
}

.fcol a {
	display: block;
	font-size: 14px;
	margin-bottom: 12px;
	color: rgba(243, 236, 218, 0.75);
}

.fcol a:hover {
	color: var(--gold-bright);
}

.footer-bottom {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 24px 6vw 34px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 14px;
	font-size: 12.5px;
	color: rgba(243, 236, 218, 0.5);
}

[dir="rtl"] {
	direction: rtl;
}

/* iOS Safari: RTL + transformed/off-screen layers can widen scroll width */
html[dir="rtl"],
html[dir="rtl"] body {
	overflow-x: clip;
	max-width: 100%;
}

html[dir="rtl"] body {
	touch-action: pan-y pinch-zoom;
	position: relative;
	width: 100%;
}

html[dir="rtl"] .site-main-home,
html[dir="rtl"] .hero,
html[dir="rtl"] .home-preview,
html[dir="rtl"] .home-quotes,
html[dir="rtl"] .home-author,
html[dir="rtl"] .editions,
html[dir="rtl"] .works-shelf,
html[dir="rtl"] .quickstrip {
	overflow-x: clip;
	max-width: 100%;
}

html[dir="rtl"] .brand-text {
	min-width: 0;
	max-width: 100%;
}

html[dir="rtl"] .nav-main {
	min-width: 0;
	flex-shrink: 1;
}

html[dir="rtl"] .works-shelf__stage {
	direction: ltr;
	overflow: hidden;
	overflow-x: clip;
	contain: layout paint;
	isolation: isolate;
}

[dir="rtl"] .entry-content,
[dir="rtl"] .hero-copy,
[dir="rtl"] .editions-head,
[dir="rtl"] .comments-area {
	text-align: right;
}

[dir="rtl"] .entry-content blockquote,
[dir="rtl"] .entry-content .wp-block-quote,
[dir="rtl"] .entry-content .wp-block-pullquote {
	border-left: 0;
	border-right: 3px solid var(--gold);
	padding-left: 0;
	padding-right: 1.25em;
}

[dir="rtl"] .card {
	text-align: right;
}

[dir="rtl"] .comment-list .children {
	border-inline-start: 0;
	border-inline-end: 2px solid rgba(173, 130, 40, 0.35);
}

[dir="rtl"] .btn-gold svg,
[dir="rtl"] .card .go svg {
	transform: scaleX(-1);
}

/* ===== Responsive ===== */
@media (max-width:1000px) {
	.cgrid {
		grid-template-columns: repeat(2, 1fr);
	}

	.hero-grid {
		grid-template-columns: 1fr;
		gap: 40px;
		text-align: center;
	}

	.hero h1,
	.hero p {
		max-width: none;
		margin-left: auto;
		margin-right: auto;
	}

	.hero .kicker {
		margin-inline: auto;
	}

	.hero-portrait {
		order: -1;
	}

	.footer-top {
		grid-template-columns: 1fr 1fr;
	}
}

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

	.qcell:nth-child(2) {
		border-right: none;
	}
}

/* Phones: one compact sticky row; panels are fixed and cannot widen the page */
@media (max-width:720px) {
	.menu-toggle {
		display: inline-flex;
	}

	.site-bar__inner {
		padding: 10px 12px;
		gap: 8px;
	}

	.nav-main {
		gap: 8px;
		position: relative;
	}

	.nav-main ul {
		display: none;
		position: fixed;
		top: calc(var(--reader-bar-bottom, 64px) + 8px);
		inset-inline-end: 12px;
		inset-inline-start: auto;
		width: min(280px, calc(100% - 24px));
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		background: var(--card);
		border: 1px solid var(--line);
		border-radius: 12px;
		padding: 18px 20px;
		box-shadow: var(--card-shadow);
		z-index: 44;
		box-sizing: border-box;
	}

	.nav-main.open ul {
		display: flex;
	}

	.brand-logo img {
		max-height: 40px;
	}

	.brand-text .lat {
		font-size: 16px;
	}

	.theme-toggle span {
		width: 26px;
		height: 26px;
	}

	body.albarbari-reading .site-bar__inner {
		gap: 8px;
	}

	body.albarbari-reading .site-bar__start {
		gap: 6px;
		min-width: 0;
	}

	body.albarbari-reading .menu-toggle--bar {
		display: inline-flex;
		flex: 0 0 auto;
	}

	body.albarbari-reading .brand {
		flex: 1 1 auto;
		min-width: 0;
		gap: 8px;
	}

	body.albarbari-reading .brand-logo img {
		max-height: 32px;
	}

	body.albarbari-reading .brand-text .lat {
		font-size: 14px;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 110px;
	}

	body.albarbari-reading .brand-text .ar-display {
		display: none;
	}

	body.albarbari-reading .site-bar__controls {
		gap: 6px;
		flex: 0 0 auto;
	}

	body.albarbari-reading .nav-main {
		gap: 4px;
	}

	body.albarbari-reading .lang-switch {
		display: none;
	}

	body.albarbari-reading .reader-chrome {
		gap: 2px;
		padding: 2px;
	}

	body.albarbari-reading .reader-chip {
		height: 34px;
		min-width: 34px;
		padding: 0 8px;
	}

	.reading-index__toggle-label {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		margin: -1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
		border: 0;
	}

	.reading-btn--width {
		display: none !important;
	}

	.reading-toolbar__panel {
		width: min(270px, calc(100% - 24px));
	}

	.reading-index__panel {
		width: min(300px, calc(100% - 40px));
	}

	html.is-reader-mode .site-main--reading {
		padding-top: 20px;
		padding-bottom: 48px;
	}

	html.is-reader-mode .reading-shell,
	html.is-reader-mode .reading-shell.is-wide {
		max-width: 100%;
	}

	.entry-content h2,
	.entry-content h3,
	.entry-content h4 {
		text-align: inherit;
	}

	.comment-list .children {
		margin-inline-start: 0.75rem;
		padding-inline-start: 0.75rem;
	}

	.comment-respond {
		padding: 18px 16px 4px;
	}

	.wrap,
	body.albarbari-reading .wrap {
		padding-left: 16px;
		padding-right: 16px;
	}

	body.albarbari-reading .site-main--reading,
	body.albarbari-reading .reading-shell,
	body.albarbari-reading .reading-article,
	body.albarbari-reading .entry-content {
		max-width: 100%;
		overflow-x: clip;
	}

	body.albarbari-reading .entry-content img,
	body.albarbari-reading .entry-content table,
	body.albarbari-reading .entry-content pre,
	body.albarbari-reading .entry-content iframe {
		max-width: 100% !important;
	}
}

/* Tablets: compact reading chrome */
@media (max-width: 1100px) and (min-width: 721px) {
	.site-bar__inner {
		padding: 12px 20px;
		gap: 12px;
	}

	body.albarbari-reading .brand {
		min-width: 0;
		flex: 1 1 auto;
	}

	body.albarbari-reading .brand-text .ar-display {
		display: none;
	}

	body.albarbari-reading .brand-text .lat {
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
		max-width: 180px;
	}

	body.albarbari-reading .nav-main {
		gap: 10px;
	}

	body.albarbari-reading .nav-main ul {
		gap: 14px;
	}

	body.albarbari-reading .lang-switch .lang-code {
		display: none;
	}

	.reading-index__toggle-label {
		max-width: 7em;
		overflow: hidden;
		text-overflow: ellipsis;
	}
}

@media (max-width:520px) {
	.cgrid {
		grid-template-columns: 1fr;
	}

	.footer-top {
		grid-template-columns: 1fr;
	}
}

/* ===== Author block (homepage) ===== */
.home-author {
	padding: 4rem 0;
	background: var(--bg-alt);
	border-block: 1px solid var(--line);
}

.home-author__inner {
	display: grid;
	grid-template-columns: minmax(180px, 240px) 1fr;
	gap: 2rem;
	align-items: center;
}

.home-author__portrait img {
	border-radius: 12px;
	width: 100%;
	height: auto;
	display: block;
}

.home-author__title {
	margin: 0.35rem 0 0.75rem;
	font-size: clamp(1.5rem, 3vw, 2rem);
}

.home-author__facts {
	margin: 1rem 0 1.25rem;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.35rem;
	color: var(--text-muted);
}

.home-author__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* ===== Linked homepage quotes ===== */
.home-quote--link {
	display: block;
	text-decoration: none;
	color: inherit;
	border-radius: 12px;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.home-quote--link:hover,
.home-quote--link:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.home-quote__go {
	display: inline-block;
	margin-inline-start: 0.5rem;
	color: var(--gold, #c9a227);
	font-size: 0.85em;
}

/* ===== Reading context nav ===== */
.reading-context {
	margin: 3rem 0 1rem;
	padding-top: 2rem;
	border-top: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
	display: grid;
	gap: 1.5rem;
}

.reading-context__chapters {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 1rem;
}

.reading-context__link {
	display: grid;
	gap: 0.25rem;
	padding: 1rem;
	border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.1));
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
}

.reading-context__link:hover,
.reading-context__link:focus-visible {
	border-color: var(--gold, #c9a227);
}

.reading-context__label {
	font-size: 0.78rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--text-muted);
}

.reading-context__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}

.reading-context__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/* ===== Search overlay & results ===== */
.search-toggle {
	background: transparent;
	border: 1px solid var(--line);
	border-radius: 999px;
	width: 40px;
	height: 40px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	color: inherit;
}

.search-toggle:hover,
.search-toggle:focus-visible {
	border-color: var(--gold);
	color: var(--gold-ink);
}

.search-toggle:focus-visible,
.theme-toggle:focus-visible,
.works-shelf__btn:focus-visible,
.btn-gold:focus-visible,
.btn-outline:focus-visible,
.btn-ghost:focus-visible {
	outline: 2px solid var(--gold);
	outline-offset: 2px;
}

.search-overlay[hidden] {
	display: none !important;
}

.search-overlay {
	position: fixed;
	inset: 0;
	z-index: 10000;
}

body.search-open {
	overflow: hidden;
}

.search-overlay__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(5, 12, 28, 0.62);
}

html[data-theme="dark"] .search-overlay__backdrop {
	background: rgba(0, 0, 0, 0.72);
}

.search-overlay__panel {
	position: relative;
	max-width: 640px;
	margin: 8vh auto 0;
	background: var(--card);
	color: var(--ink);
	border: 1px solid var(--line);
	border-radius: 14px;
	padding: 1.25rem;
	box-shadow: var(--card-shadow);
}

.search-overlay__title {
	margin: 0;
	font-family: 'Newsreader', Georgia, serif;
	font-size: 1.35rem;
	font-weight: 500;
	color: var(--ink);
}

.search-overlay__close {
	appearance: none;
	border: 0;
	background: transparent;
	color: var(--ink-soft);
	font-size: 1.75rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.15rem 0.35rem;
	border-radius: 6px;
}

.search-overlay__close:hover,
.search-overlay__close:focus-visible {
	color: var(--gold);
	background: rgba(173, 130, 40, 0.12);
}

.search-overlay__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 0.75rem;
}

.search-overlay__form {
	display: flex;
	gap: 0.5rem;
}

.search-overlay__input,
.search-form__input {
	flex: 1;
	min-width: 0;
	padding: 0.65rem 0.85rem;
	border: 1px solid var(--line);
	border-radius: 8px;
	font: inherit;
	background: var(--bg);
	color: var(--ink);
}

.search-overlay__input::placeholder,
.search-form__input::placeholder {
	color: var(--ink-soft);
	opacity: 0.85;
}

.search-overlay__hint {
	margin: 0.75rem 0 0;
	font-size: 0.85rem;
	color: var(--ink-soft);
}

.search-overlay__results {
	margin-top: 0.75rem;
	display: grid;
	gap: 0.35rem;
	max-height: 50vh;
	overflow: auto;
}

.search-overlay__result {
	display: grid;
	gap: 0.15rem;
	padding: 0.65rem 0.75rem;
	border-radius: 8px;
	text-decoration: none;
	color: inherit;
}

.search-overlay__result.is-active,
.search-overlay__result:hover,
.search-overlay__result:focus-visible {
	background: rgba(173, 130, 40, 0.12);
}

html[data-theme="dark"] .search-overlay__result.is-active,
html[data-theme="dark"] .search-overlay__result:hover,
html[data-theme="dark"] .search-overlay__result:focus-visible {
	background: rgba(216, 181, 100, 0.16);
}

.search-overlay__result-type {
	font-size: 0.75rem;
	color: var(--ink-soft);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.search-results__group {
	margin-top: 2rem;
}

.search-results__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.75rem;
}

.search-results__item a {
	display: grid;
	gap: 0.25rem;
	padding: 1rem;
	border: 1px solid var(--line);
	border-radius: 10px;
	text-decoration: none;
	color: inherit;
	background: var(--card);
}

.work-card__hook {
	display: block;
	font-size: 0.88rem;
	color: var(--ink-soft);
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.works-shelf--no-heading .works-shelf__head {
	justify-content: flex-end;
}

.topic-hub__header {
	margin-bottom: 2rem;
}

.works-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.25rem;
}

html.reduced-motion .works-shelf__track,
html.reduced-motion .home-quote--link,
html.reduced-motion * {
	scroll-behavior: auto !important;
	transition-duration: 0.01ms !important;
	animation-duration: 0.01ms !important;
}

@media (max-width: 720px) {
	.home-author__inner {
		grid-template-columns: 1fr;
	}

	.search-overlay__panel {
		margin: 0;
		min-height: 100vh;
		border-radius: 0;
		border-inline: 0;
	}

	html[dir="rtl"] .nav-main {
		flex-wrap: wrap;
		justify-content: flex-end;
		max-width: 100%;
	}

	html[dir="rtl"] .lang-switch {
		flex-shrink: 1;
		min-width: 0;
	}
}

/* ===== Contact page ===== */
.site-main--contact {
	padding: 70px 0 90px;
}

.contact-page__header {
	margin-bottom: 36px;
	max-width: 38rem;
}

.contact-page__title {
	margin: 0 0 16px;
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 500;
	line-height: 1.12;
}

.contact-page__intro {
	margin: 0;
	color: var(--ink-soft);
	font-size: 1.05rem;
	line-height: 1.65;
}

.contact-form-wrap {
	max-width: 520px;
}

.contact-form__notice {
	margin: 0 0 20px;
	padding: 14px 16px;
	border-radius: 10px;
	font-size: 0.95rem;
	line-height: 1.5;
}

.contact-form__notice--success {
	background: rgba(173, 130, 40, 0.12);
	border: 1px solid rgba(173, 130, 40, 0.35);
	color: var(--ink);
}

.contact-form__notice--error {
	background: rgba(180, 60, 60, 0.08);
	border: 1px solid rgba(180, 60, 60, 0.25);
	color: var(--ink);
}

.contact-form {
	display: grid;
	gap: 18px;
	padding: 28px;
	border-radius: 16px;
	border: 1px solid var(--line);
	background: var(--card);
	box-shadow: var(--card-shadow);
}

.contact-form__field {
	margin: 0;
	display: grid;
	gap: 8px;
}

.contact-form__field label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--gold-ink);
}

.contact-form__field input,
.contact-form__field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--line);
	border-radius: 10px;
	background: var(--bg);
	color: var(--ink);
	font: inherit;
	line-height: 1.5;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form__field textarea {
	resize: vertical;
	min-height: 140px;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
	outline: none;
	border-color: var(--gold);
	box-shadow: 0 0 0 3px rgba(173, 130, 40, 0.15);
}

.contact-form__field--honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.contact-form__actions {
	margin: 4px 0 0;
}

.contact-form__submit {
	border: 0;
	cursor: pointer;
	font: inherit;
}

.contact-form__privacy {
	margin: 0;
	font-size: 0.82rem;
	line-height: 1.5;
	color: var(--ink-soft);
}