/**
 * DuSunnah Blog - library, category archive and single post.
 * ===========================================================================
 * ISOLATED and prefixed. The wrapper carries .dus-home as well as .dus-bloglib,
 * so css/home.css supplies every token and this file adds only the blog layer.
 * Nothing here restyles the masthead, footer, Articles, Audio or Videos, and it
 * is enqueued only on the blog surfaces (/blog/, single post, /category/).
 *
 * Blog belongs to the same publication family as the other libraries - the same
 * measures, kicker, search, subject row, result bar and pager - but it is
 * TEXT-LED: rows are pure typography (category, title, standfirst, author,
 * date), with an image only when a post genuinely has a featured one. No dark
 * cards, no floating share rail, no reading-time.
 *
 * TWO MEASURES, as in the other libraries:
 *   --blog  1040px  the functional width (intro, search, rows, rules, pager).
 *   --read   760px  the reading/single measure.
 */

/* The library draws its own measures; the theme wrapper must not add any. */
body.page-template-tpl-blog #main-content,
body.single-post #main-content,
body.category #main-content {
	margin: 0;
	padding: 0;
	max-width: none;
}

.dus-bloglib {
	--blog: 1040px;
	--read: 760px;
	padding: 0 0 80px;
}

.dus-blog__wrap {
	max-width: var(--wrap);
	margin: 0 auto;
	padding: 0 var(--gut);
}

.dus-blog__col {
	max-width: var(--blog);
}

/* ============================================================ INTRO */

.dus-blog__intro {
	padding: 44px 0 0;
}

.dus-blog__kicker {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: var(--acc);
}

.dus-blog__title {
	margin: 10px 0 0;
	font-size: 40px;
	line-height: 1.08;
	letter-spacing: -.025em;
	font-weight: 800;
	color: var(--ink);
}

.dus-blog__desc {
	margin: 12px 0 0;
	max-width: 58ch;
	font-size: 16px;
	line-height: 1.6;
	color: var(--body);
}

/* ============================================================ SEARCH */

.dus-blog__search {
	margin: 30px 0 0;
}

.dus-blog__field {
	display: flex;
	align-items: center;
	gap: 14px;
	height: 60px;
	padding: 0 7px 0 20px;
	background: #fff;
	border: 1px solid #cfc7bf;
	border-radius: 4px;
	color: var(--muted);
	transition: border-color .15s, box-shadow .15s;
}

.dus-blog__field:focus-within {
	border-color: var(--acc);
	box-shadow: 0 0 0 3px rgba(168, 80, 26, .10);
}

.dus-blog__field input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	height: 100%;
	border: 0;
	outline: 0;
	background: transparent;
	font: inherit;
	font-size: 17px;
	color: var(--ink);
	-webkit-appearance: none;
	appearance: none;
}

.dus-blog__field input::placeholder {
	color: #8e8e8e;
	opacity: 1;
}

.dus-blog__go {
	flex: 0 0 auto;
	height: 46px;
	padding: 0 22px;
	border: 0;
	border-radius: 3px;
	background: var(--acc);
	color: #fff;
	font: inherit;
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
}

.dus-blog__go:hover {
	background: var(--acc-d);
}

.dus-blog__scope {
	margin: 9px 0 0;
	font-size: 12.5px;
	color: var(--muted);
}

/* ============================================================ CATEGORIES */

.dus-blog__subjects {
	display: flex;
	gap: 8px;
	margin: 28px 0 0;
	padding-bottom: 4px;
	overflow-x: auto;
	scrollbar-width: none;
	-ms-overflow-style: none;
	overscroll-behavior-x: contain;
	scroll-snap-type: x proximity;
	-webkit-mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent);
	mask-image: linear-gradient(to right, #000 calc(100% - 30px), transparent);
}

.dus-blog__subjects::-webkit-scrollbar {
	display: none;
}

.dus-blog__subject {
	flex: 0 0 auto;
	scroll-snap-align: start;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	padding: 9px 14px;
	border: 1px solid var(--line);
	border-radius: 3px;
	background: #fff;
	color: var(--ink);
	font-size: 14px;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	transition: border-color .15s, color .15s;
}

.dus-blog__subject:hover {
	border-color: var(--acc);
	color: var(--acc);
}

.dus-blog__subject.is-active {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
}

.dus-blog__n {
	font-size: 11.5px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.dus-blog__subject.is-active .dus-blog__n {
	color: rgba(255, 255, 255, .72);
}

/* ============================================================ BAR */

.dus-blog__bar {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
	margin: 30px 0 0;
	padding-bottom: 9px;
	border-bottom: 1px solid var(--ink);
}

.dus-blog__count {
	font-size: 13px;
	color: var(--muted);
	font-variant-numeric: tabular-nums;
}

.dus-blog__filters {
	position: relative;
}

.dus-blog__filters > summary {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 5px 11px;
	border: 1px solid var(--line);
	border-radius: 3px;
	background: #fff;
	font-size: 13px;
	font-weight: 600;
	color: var(--ink);
	cursor: pointer;
	list-style: none;
	transition: border-color .15s;
}

.dus-blog__filters > summary::-webkit-details-marker {
	display: none;
}

.dus-blog__filters > summary:hover,
.dus-blog__filters[open] > summary {
	border-color: var(--ink);
}

.dus-blog__dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--acc);
}

.dus-blog__filterform {
	position: absolute;
	right: 0;
	z-index: 5;
	width: 272px;
	margin-top: 5px;
	padding: 16px;
	background: #fff;
	border: 1px solid #cfc7bf;
	border-radius: 4px;
	box-shadow: 0 6px 22px rgba(0, 0, 0, .07);
}

.dus-blog__ff {
	margin: 0 0 14px;
}

.dus-blog__ff label {
	display: block;
	margin-bottom: 6px;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--muted);
}

.dus-blog__ff select {
	width: 100%;
	height: 40px;
	padding: 0 10px;
	border: 1px solid var(--line);
	border-radius: 3px;
	background: #fff;
	font: inherit;
	font-size: 14px;
	color: var(--ink);
}

.dus-blog__ffact {
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 0;
}

.dus-blog__apply {
	height: 38px;
	padding: 0 16px;
	border: 0;
	border-radius: 3px;
	background: var(--ink);
	color: #fff;
	font: inherit;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
}

.dus-blog__reset {
	font-size: 13.5px;
	color: var(--acc);
	text-decoration: none;
	border-bottom: 1px solid currentColor;
}

/* ============================================================ ACTIVE FACETS */

.dus-blog__active {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin: 14px 0 0;
}

.dus-blog__active-label {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .09em;
	text-transform: uppercase;
	color: var(--muted);
}

.dus-blog__chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 11px;
	border: 1px solid var(--acc);
	border-radius: 3px;
	background: #faf1ea;
	color: var(--acc-d);
	font-size: 13px;
	line-height: 1;
	text-decoration: none;
}

.dus-blog__chip:hover {
	background: var(--acc);
	color: #fff;
}

.dus-blog__x {
	font-size: 15px;
	line-height: 1;
	opacity: .75;
}

/* ============================================================ ROWS (TEXT-LED) */

.dus-blog__list {
	margin-top: 4px;
}

.dus-blog__item {
	display: flex;
	align-items: flex-start;
	gap: 32px;
	padding: 22px 0;
	border-bottom: 1px solid var(--line);
}

.dus-blog__list .dus-blog__item:last-child {
	border-bottom: 0;
}

.dus-blog__body {
	flex: 1 1 auto;
	min-width: 0;
	max-width: var(--read);
}

.dus-blog__cat {
	margin: 0;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--acc);
}

.dus-blog__ttl {
	margin: 7px 0 0;
	font-size: 19px;
	line-height: 1.34;
	letter-spacing: -.012em;
	font-weight: 700;
}

.dus-blog__ttl a {
	color: inherit;
	text-decoration: none;
}

.dus-blog__ttl a:hover {
	color: var(--acc);
}

.dus-blog__stand {
	margin: 7px 0 0;
	font-size: 14.5px;
	line-height: 1.55;
	color: var(--body);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.dus-blog__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 9px;
	margin: 9px 0 0;
	font-size: 12.5px;
	color: var(--muted);
}

.dus-blog__by {
	color: var(--ink);
	font-weight: 600;
}

.dus-blog__sep {
	color: #c4bcb4;
}

/* Optional, and only when a real featured image exists: last, small, secondary. */
.dus-blog__thumb {
	flex: 0 0 132px;
	width: 132px;
	aspect-ratio: 4 / 3;
	max-width: 100%;
	overflow: hidden;
	border-radius: 4px;
	background: var(--img);
}

.dus-blog__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ============================================================ EMPTY */

.dus-blog__empty {
	padding: 44px 0 4px;
	max-width: 52ch;
}

.dus-blog__empty-lead {
	margin: 0;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: -.015em;
}

.dus-blog__empty-hint {
	margin: 10px 0 0;
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--body);
}

.dus-blog__empty-act {
	margin: 18px 0 0;
}

/* ============================================================ PAGER */

.dus-blog__pager {
	margin: 34px 0 0;
}

.dus-blog__pager ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.dus-blog__pager a,
.dus-blog__pager span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 38px;
	padding: 0 12px;
	border: 1px solid var(--line);
	border-radius: 3px;
	font-size: 14px;
	color: var(--ink);
	text-decoration: none;
	font-variant-numeric: tabular-nums;
}

.dus-blog__pager a:hover {
	border-color: var(--acc);
	color: var(--acc);
}

.dus-blog__pager .current {
	background: var(--ink);
	border-color: var(--ink);
	color: #fff;
}

.dus-blog__pager .dots {
	border-color: transparent;
}

/* ============================================================ SINGLE */

.dus-blog__single {
	max-width: var(--read);
	padding: 28px 0 0;
}

.dus-blog__back {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--muted);
	text-decoration: none;
}

.dus-blog__back:hover {
	color: var(--acc);
}

.dus-blog__head {
	margin: 22px 0 0;
}

.dus-blog__head .dus-blog__kicker {
	margin: 0;
}

.dus-blog__h1 {
	margin: 11px 0 0;
	font-size: 34px;
	line-height: 1.12;
	letter-spacing: -.022em;
	font-weight: 800;
	color: var(--ink);
}

.dus-blog__sub {
	margin: 13px 0 0;
	font-size: 18px;
	line-height: 1.6;
	color: var(--body);
}

.dus-blog__facts {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 9px;
	margin: 14px 0 0;
	font-size: 13px;
	color: var(--muted);
}

/* Featured image, only rendered when the post genuinely has one. */
.dus-blog__hero {
	margin: 26px 0 0;
}

.dus-blog__hero-media {
	overflow: hidden;
	border-radius: 6px;
	background: var(--img);
}

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

.dus-blog__hero-cap {
	margin: 10px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--muted);
}

/* ---------- PROSE: the editorial reading system, reused not reinvented ---------- */

.dus-blog__prose {
	margin: 30px 0 0;
	font-size: 18px;
	line-height: 1.75;
	color: var(--body);
}

.dus-blog__prose > *:first-child {
	margin-top: 0;
}

.dus-blog__prose p {
	margin: 0 0 1.15em;
}

.dus-blog__prose a {
	color: var(--acc);
	text-decoration: underline;
	text-underline-offset: 2px;
	text-decoration-thickness: 1px;
}

.dus-blog__prose a:hover {
	color: var(--acc-d);
}

.dus-blog__prose h2 {
	margin: 1.7em 0 .5em;
	font-size: 25px;
	line-height: 1.2;
	letter-spacing: -.02em;
	font-weight: 800;
	color: var(--ink);
}

.dus-blog__prose h3 {
	margin: 1.5em 0 .4em;
	font-size: 20px;
	line-height: 1.25;
	letter-spacing: -.012em;
	font-weight: 700;
	color: var(--ink);
}

.dus-blog__prose ul,
.dus-blog__prose ol {
	margin: 0 0 1.15em;
	padding-left: 1.4em;
}

.dus-blog__prose li {
	margin: 0 0 .5em;
	padding-left: .2em;
}

.dus-blog__prose li::marker {
	color: var(--muted);
}

.dus-blog__prose blockquote {
	margin: 1.5em 0;
	padding: 4px 0 4px 22px;
	border-left: 3px solid var(--acc);
	font-size: 19px;
	line-height: 1.6;
	color: var(--ink);
}

.dus-blog__prose blockquote p:last-child {
	margin-bottom: 0;
}

.dus-blog__prose blockquote cite {
	display: block;
	margin-top: 10px;
	font-size: 14px;
	font-style: normal;
	color: var(--muted);
}

.dus-blog__prose img,
.dus-blog__prose figure img {
	max-width: 100%;
	height: auto;
	border-radius: 5px;
	display: block;
}

.dus-blog__prose figure {
	margin: 1.6em 0;
}

.dus-blog__prose figcaption {
	margin: 10px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--muted);
}

.dus-blog__prose hr {
	margin: 2em 0;
	border: 0;
	border-top: 1px solid var(--line);
}

.dus-blog__prose code {
	font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
	font-size: .9em;
	background: var(--band);
	padding: .1em .35em;
	border-radius: 3px;
}

/*
 * Arabic passages carried by a lang attribute read right-to-left, at a larger
 * size, in the serif Arabic face already loaded site-wide for the masthead.
 * General Arabic only; Qur'anic Scheherazade belongs to the reading templates.
 */
.dus-blog__prose [lang="ar"],
.dus-blog__prose .dus-ar {
	font-family: "Amiri", "Scheherazade New", serif;
	direction: rtl;
	font-size: 1.15em;
	line-height: 2;
}

/* ---------- ABOUT THE AUTHOR ---------- */

.dus-blog__author {
	display: flex;
	gap: 18px;
	margin: 40px 0 0;
	padding: 26px 0 0;
	border-top: 1px solid var(--line);
}

.dus-blog__author-avatar {
	flex: 0 0 auto;
}

.dus-blog__author-avatar img {
	width: 64px;
	height: 64px;
	border-radius: 50%;
	display: block;
}

.dus-blog__author-kicker {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--muted);
}

.dus-blog__author-name {
	margin: 4px 0 0;
	font-size: 17px;
	font-weight: 700;
	color: var(--ink);
}

.dus-blog__author-bio {
	margin: 8px 0 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--body);
}

.dus-blog__author-link {
	display: inline-block;
	margin: 12px 0 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--acc);
	text-decoration: none;
}

.dus-blog__author-link:hover {
	color: var(--acc-d);
}

/* ---------- SUPPORT ---------- */

.dus-blog__support {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px 24px;
	margin: 34px 0 0;
	padding: 20px 22px;
	border: 1px solid var(--line);
	border-left: 3px solid var(--acc);
	border-radius: 4px;
	background: var(--band);
}

.dus-blog__support-lead {
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ink);
	max-width: 46ch;
}

.dus-blog__support-link {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	font-size: 14.5px;
	font-weight: 700;
	color: var(--acc);
	text-decoration: none;
	white-space: nowrap;
}

.dus-blog__support-link:hover {
	color: var(--acc-d);
}

.dus-blog__support-arrow {
	transition: transform .18s;
}

.dus-blog__support-link:hover .dus-blog__support-arrow {
	transform: translateX(3px);
}

/* ---------- RELATED ---------- */

.dus-blog__relwrap {
	margin: 44px 0 0;
	padding: 26px 0 0;
	border-top: 1px solid var(--ink);
}

.dus-blog__relhead {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -.02em;
	color: var(--ink);
}

.dus-blog__list--related .dus-blog__item {
	padding: 16px 0;
}

/* ---------- PREVIOUS / NEXT ---------- */

.dus-blog__prevnext {
	display: flex;
	gap: 20px;
	margin: 34px 0 0;
	padding: 24px 0 0;
	border-top: 1px solid var(--line);
}

.dus-blog__pn {
	flex: 1 1 0;
	min-width: 0;
}

.dus-blog__pn--next {
	text-align: right;
}

.dus-blog__pn a {
	display: inline-block;
	max-width: 100%;
	text-decoration: none;
}

.dus-blog__pn-label {
	display: block;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--muted);
}

.dus-blog__pn-title {
	display: block;
	margin-top: 5px;
	font-size: 15.5px;
	font-weight: 600;
	line-height: 1.35;
	color: var(--ink);
}

.dus-blog__pn a:hover .dus-blog__pn-title {
	color: var(--acc);
}

/* ---------- SHARE ---------- */

.dus-blog__share {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 36px 0 0;
	padding: 22px 0 0;
	border-top: 1px solid var(--line);
}

.dus-blog__share-label {
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .13em;
	text-transform: uppercase;
	color: var(--muted);
}

.dus-blog__share-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid var(--line);
	border-radius: 50%;
	color: var(--ink);
	transition: border-color .15s, color .15s, background .15s;
}

.dus-blog__share-btn svg {
	width: 17px;
	height: 17px;
}

.dus-blog__share-btn:hover {
	border-color: var(--acc);
	color: #fff;
	background: var(--acc);
}

/* ============================================================ 1100 */

@media (max-width: 1100px) {

	.dus-blog__wrap {
		padding: 0 32px;
	}

	.dus-blog__title {
		font-size: 36px;
	}

	.dus-blog__h1 {
		font-size: 30px;
	}
}

/* ============================================================ 767 */

@media (max-width: 767px) {

	.dus-bloglib {
		--read: 100%;
		padding-bottom: 56px;
	}

	.dus-blog__wrap {
		padding: 0 20px;
	}

	.dus-blog__intro {
		padding-top: 30px;
	}

	.dus-blog__title {
		font-size: 30px;
		letter-spacing: -.02em;
	}

	.dus-blog__desc {
		font-size: 15px;
	}

	.dus-blog__search {
		margin-top: 22px;
	}

	.dus-blog__field {
		height: 54px;
		padding-left: 15px;
		gap: 11px;
	}

	.dus-blog__field input[type="search"] {
		font-size: 16px;
	}

	.dus-blog__go {
		height: 42px;
		padding: 0 15px;
		font-size: 13.5px;
	}

	.dus-blog__subjects {
		margin-top: 20px;
	}

	.dus-blog__bar {
		margin-top: 22px;
	}

	.dus-blog__filterform {
		width: min(280px, calc(100vw - 40px));
	}

	.dus-blog__item {
		gap: 16px;
		padding: 16px 0;
	}

	.dus-blog__ttl {
		font-size: 17.5px;
	}

	.dus-blog__stand {
		font-size: 14px;
	}

	.dus-blog__meta {
		gap: 3px 8px;
		font-size: 12px;
	}

	.dus-blog__thumb {
		flex-basis: 92px;
		width: 92px;
	}

	.dus-blog__empty {
		padding: 32px 0 4px;
	}

	.dus-blog__empty-lead {
		font-size: 18px;
	}

	/* Single */
	.dus-blog__single {
		padding-top: 20px;
	}

	.dus-blog__h1 {
		font-size: 25px;
		line-height: 1.18;
	}

	.dus-blog__sub {
		font-size: 16px;
	}

	.dus-blog__prose {
		font-size: 16.5px;
	}

	.dus-blog__prose h2 {
		font-size: 22px;
	}

	.dus-blog__prose h3 {
		font-size: 18.5px;
	}

	.dus-blog__support {
		padding: 16px 18px;
	}

	.dus-blog__prevnext {
		gap: 14px;
	}

	.dus-blog__pn-title {
		font-size: 14.5px;
	}
}
