/**
 * DuSunnah Resources - the Pamphlets library and single resource.
 * ===========================================================================
 * ISOLATED and prefixed (dus-res__). Carries .dus-home for the tokens; enqueued
 * only on the resource surfaces. Text-led download library, not a card grid: a
 * cover appears only when genuine, a Download only when a valid file exists.
 */

body.post-type-archive-resource #main-content,
body.tax-resource-category #main-content,
body.single-resource #main-content {
	margin: 0;
	padding: 0;
	max-width: none;
}

.dus-reslib {
	--res: 1040px;
	--read: 760px;
	padding: 0 0 80px;
}

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

.dus-res__col {
	max-width: var(--res);
}

/* ---------- intro ---------- */

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

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

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

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

/* ---------- search ---------- */

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

.dus-res__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-res__field:focus-within {
	border-color: var(--acc);
	box-shadow: 0 0 0 3px rgba(168, 80, 26, .10);
}

.dus-res__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-res__field input::placeholder { color: #8e8e8e; opacity: 1; }

.dus-res__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-res__go:hover { background: var(--acc-d); }

/* ---------- categories ---------- */

.dus-res__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-res__subjects::-webkit-scrollbar { display: none; }

.dus-res__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-res__subject:hover { border-color: var(--acc); color: var(--acc); }
.dus-res__subject.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }

.dus-res__n { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.dus-res__subject.is-active .dus-res__n { color: rgba(255, 255, 255, .72); }

/* ---------- bar ---------- */

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

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

.dus-res__order { display: inline-flex; align-items: baseline; gap: 8px; font-size: 13px; }
.dus-res__order-link { color: var(--muted); text-decoration: none; }
.dus-res__order-link:hover { color: var(--acc); }
.dus-res__order-link.is-active { color: var(--ink); font-weight: 700; }
.dus-res__order-sep { color: #c4bcb4; }

/* ---------- rows ---------- */

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

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

.dus-res__list .dus-res__item:last-child { border-bottom: 0; }

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

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

.dus-res__ttl {
	margin: 7px 0 0;
	font-size: 20px;
	line-height: 1.3;
	letter-spacing: -.014em;
	font-weight: 700;
}

.dus-res__ttl a { color: inherit; text-decoration: none; }
.dus-res__ttl a:hover { color: var(--acc); }

.dus-res__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-res__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 9px;
	margin: 8px 0 0;
	font-size: 12.5px;
	color: var(--muted);
}

.dus-res__by { color: var(--ink); font-weight: 600; }
.dus-res__sep { color: #c4bcb4; }

.dus-res__act { margin: 12px 0 0; }

/* The row download: a quiet text action with an icon. */
.dus-res__dl {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 14px;
	font-weight: 600;
	color: var(--acc);
	text-decoration: none;
}

.dus-res__dl:hover { color: var(--acc-d); }
.dus-res__dl-icon { width: 17px; height: 17px; }
.dus-res__ext { font-size: 12px; }

/* Cover, only when a real featured image exists: secondary, portrait-ish. */
.dus-res__cover {
	flex: 0 0 120px;
	width: 120px;
	aspect-ratio: 3 / 4;
	max-width: 100%;
	overflow: hidden;
	border-radius: 4px;
	background: var(--img);
}

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

/* ---------- empty / pager ---------- */

.dus-res__empty { padding: 40px 0 4px; max-width: 52ch; }
.dus-res__empty-lead { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -.015em; color: var(--ink); }
.dus-res__empty-act { margin: 18px 0 0; }
.dus-res__reset { font-size: 13.5px; color: var(--acc); text-decoration: none; border-bottom: 1px solid currentColor; }

.dus-res__pager { margin: 34px 0 0; }
.dus-res__pager ul { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.dus-res__pager a, .dus-res__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-res__pager a:hover { border-color: var(--acc); color: var(--acc); }
.dus-res__pager .current { background: var(--ink); border-color: var(--ink); color: #fff; }
.dus-res__pager .dots { border-color: transparent; }

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

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

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

.dus-res__lead {
	display: flex;
	gap: 28px;
	margin: 22px 0 0;
	align-items: flex-start;
}

.dus-res__leadcover {
	flex: 0 0 190px;
	width: 190px;
	margin: 0;
	overflow: hidden;
	border-radius: 6px;
	background: var(--img);
}

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

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

.dus-res__leadbody .dus-res__kicker { margin: 0; }

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

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

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

.dus-res__leadact { margin: 20px 0 0; }

/* The single download: the prominent filled control on the page. */
.dus-res__dl--single {
	padding: 13px 24px;
	background: var(--acc);
	border-radius: 3px;
	color: #fff;
	font-size: 15px;
	gap: 9px;
}

.dus-res__dl--single:hover { background: var(--acc-d); color: #fff; }
.dus-res__dl--single .dus-res__dl-icon { width: 19px; height: 19px; }

/* ---- prose ---- */

.dus-res__prose { margin: 34px 0 0; font-size: 18px; line-height: 1.75; color: var(--body); }
.dus-res__prose > *:first-child { margin-top: 0; }
.dus-res__prose p { margin: 0 0 1.15em; }
.dus-res__prose a { color: var(--acc); text-decoration: underline; text-underline-offset: 2px; }
.dus-res__prose a:hover { color: var(--acc-d); }
.dus-res__prose h2 { margin: 1.7em 0 .5em; font-size: 24px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.dus-res__prose h3 { margin: 1.5em 0 .4em; font-size: 20px; font-weight: 700; color: var(--ink); }
.dus-res__prose ul, .dus-res__prose ol { margin: 0 0 1.15em; padding-left: 1.4em; }
.dus-res__prose li { margin: 0 0 .5em; }
.dus-res__prose blockquote { margin: 1.5em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--acc); color: var(--ink); }
.dus-res__prose img { max-width: 100%; height: auto; border-radius: 5px; }

/* ---- related ---- */

.dus-res__relwrap { margin: 44px 0 0; padding: 26px 0 0; border-top: 1px solid var(--ink); }
.dus-res__relhead { margin: 0 0 6px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }

/* ---- share ---- */

.dus-res__share { display: flex; align-items: center; gap: 14px; margin: 36px 0 0; padding: 22px 0 0; border-top: 1px solid var(--line); }
.dus-res__share-label { font-size: 11.5px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: var(--muted); }
.dus-res__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-res__share-btn svg { width: 17px; height: 17px; }
.dus-res__share-btn:hover { border-color: var(--acc); color: #fff; background: var(--acc); }

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

@media (max-width: 1100px) {
	.dus-res__wrap { padding: 0 32px; }
	.dus-res__title { font-size: 36px; }
	.dus-res__h1 { font-size: 28px; }
}

@media (max-width: 767px) {
	.dus-reslib { --read: 100%; padding-bottom: 56px; }
	.dus-res__wrap { padding: 0 20px; }
	.dus-res__intro { padding-top: 30px; }
	.dus-res__title { font-size: 30px; letter-spacing: -.02em; }
	.dus-res__search { margin-top: 22px; }
	.dus-res__field { height: 54px; padding-left: 15px; gap: 11px; }
	.dus-res__field input[type="search"] { font-size: 16px; }
	.dus-res__subjects { margin-top: 20px; }
	.dus-res__bar { margin-top: 22px; }
	.dus-res__item { gap: 16px; padding: 18px 0; }
	.dus-res__ttl { font-size: 18px; }
	.dus-res__cover { flex-basis: 88px; width: 88px; }
	.dus-res__empty-lead { font-size: 18px; }

	/* Single: cover stacks above the details. */
	.dus-res__single { padding-top: 20px; }
	.dus-res__lead { flex-direction: column; gap: 18px; }
	.dus-res__leadcover { flex-basis: auto; width: 190px; max-width: 60%; }
	.dus-res__h1 { font-size: 25px; line-height: 1.18; }
	.dus-res__prose { font-size: 16.5px; }
	.dus-res__prose h2 { font-size: 21px; }
}

/* ==========================================================================
   PAMPHLETS — EDITORIAL COVER LIBRARY
   2026-10
   --------------------------------------------------------------------------
   Archive/taxonomy only. The single-resource publication page deliberately
   retains the established reading layout above.

   Publications are treated as designed objects: covers lead, metadata
   supports them, and cover artwork is never cropped.
   ========================================================================== */

body.post-type-archive-resource .dus-reslib,
body.tax-resource-category .dus-reslib {
        --res: 1180px;
        padding-bottom: 104px;
}

body.post-type-archive-resource .dus-res__col,
body.tax-resource-category .dus-res__col {
        max-width: var(--res);
}

/* ---------- library masthead ---------- */

body.post-type-archive-resource .dus-res__intro,
body.tax-resource-category .dus-res__intro {
        padding-top: 58px;
        max-width: 760px;
}

body.post-type-archive-resource .dus-res__kicker,
body.tax-resource-category .dus-res__kicker {
        margin: 0;
        font-size: 11px;
        line-height: 1;
        letter-spacing: .18em;
}

body.post-type-archive-resource .dus-res__title,
body.tax-resource-category .dus-res__title {
        margin-top: 13px;
        font-size: clamp(38px, 4vw, 54px);
        line-height: .98;
        letter-spacing: -.035em;
}

body.post-type-archive-resource .dus-res__desc,
body.tax-resource-category .dus-res__desc {
        margin-top: 17px;
        max-width: 62ch;
        font-size: 16px;
        line-height: 1.7;
}

/* ---------- library controls ---------- */

body.post-type-archive-resource .dus-res__search,
body.tax-resource-category .dus-res__search {
        max-width: 760px;
        margin-top: 34px;
}

body.post-type-archive-resource .dus-res__field,
body.tax-resource-category .dus-res__field {
        height: 56px;
        border-color: var(--line);
        border-radius: 2px;
        box-shadow: none;
}

body.post-type-archive-resource .dus-res__field:focus-within,
body.tax-resource-category .dus-res__field:focus-within {
        border-color: var(--acc);
        box-shadow: 0 0 0 2px rgba(168, 80, 26, .08);
}

body.post-type-archive-resource .dus-res__go,
body.tax-resource-category .dus-res__go {
        height: 42px;
        border-radius: 2px;
}

body.post-type-archive-resource .dus-res__subjects,
body.tax-resource-category .dus-res__subjects {
        margin-top: 25px;
}

body.post-type-archive-resource .dus-res__subject,
body.tax-resource-category .dus-res__subject {
        padding: 9px 13px;
        border-radius: 2px;
        font-size: 13px;
}

body.post-type-archive-resource .dus-res__bar,
body.tax-resource-category .dus-res__bar {
        margin-top: 35px;
        padding: 0 0 12px;
        border-bottom: 1px solid var(--ink);
}

/* ==========================================================================
   PUBLICATION GRID
   ========================================================================== */

body.post-type-archive-resource .dus-res__list,
body.tax-resource-category .dus-res__list {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        column-gap: clamp(28px, 3.4vw, 48px);
        row-gap: 58px;
        margin-top: 32px;
}

body.post-type-archive-resource .dus-res__item,
body.tax-resource-category .dus-res__item {
        display: flex;
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 0;
        min-width: 0;
        padding: 0;
        border: 0;
}

body.post-type-archive-resource .dus-res__list .dus-res__item:last-child,
body.tax-resource-category .dus-res__list .dus-res__item:last-child {
        border-bottom: 0;
}

/* ---------- cover ---------- */

body.post-type-archive-resource .dus-res__cover,
body.tax-resource-category .dus-res__cover {
        position: relative;
        display: flex;
        flex: none;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: none;
        aspect-ratio: 1 / 2;
        min-height: 0;
        overflow: visible;
        border: 0;
        border-radius: 0;
        background: transparent;
        text-decoration: none;
}

/*
 * Every cover sits inside the SAME tall box (aspect-ratio above, matching
 * the site's tall portrait pamphlet covers) so the grid reads as one
 * consistent row of tall covers. object-fit: contain (not cover) means a
 * wide or square cover letterboxes inside that shared footprint instead of
 * being cropped - the "never cropped" principle below still holds, it is
 * just the surrounding box that is now uniform rather than the image itself.
 */
body.post-type-archive-resource .dus-res__cover img,
body.tax-resource-category .dus-res__cover img {
        display: block;
        width: 100%;
        height: 100%;
        max-width: 100%;
        object-fit: contain;
        border: 1px solid rgba(32, 29, 26, .10);
        box-shadow:
                0 1px 1px rgba(30, 25, 20, .04),
                0 8px 22px rgba(30, 25, 20, .07);
        transition:
                transform .22s ease,
                box-shadow .22s ease;
}

body.post-type-archive-resource .dus-res__item:hover .dus-res__cover img,
body.tax-resource-category .dus-res__item:hover .dus-res__cover img {
        transform: translateY(-3px);
        box-shadow:
                0 2px 2px rgba(30, 25, 20, .04),
                0 14px 30px rgba(30, 25, 20, .10);
}

/* ---------- publication information ---------- */

body.post-type-archive-resource .dus-res__body,
body.tax-resource-category .dus-res__body {
        flex: none;
        width: 100%;
        max-width: none;
        padding-top: 18px;
}

body.post-type-archive-resource .dus-res__cat,
body.tax-resource-category .dus-res__cat {
        margin: 0 0 8px;
        font-size: 10px;
        line-height: 1.2;
        letter-spacing: .15em;
}

body.post-type-archive-resource .dus-res__ttl,
body.tax-resource-category .dus-res__ttl {
        margin: 0;
        font-family: var(--ft-serif, Georgia, "Times New Roman", serif);
        font-size: 18px;
        line-height: 1.28;
        letter-spacing: -.012em;
        font-weight: 600;
        text-wrap: balance;
}

body.post-type-archive-resource .dus-res__ttl a,
body.tax-resource-category .dus-res__ttl a {
        text-decoration: none;
        text-decoration-thickness: 1px;
        text-underline-offset: 3px;
}

body.post-type-archive-resource .dus-res__ttl a:hover,
body.tax-resource-category .dus-res__ttl a:hover {
        color: var(--ink);
        text-decoration: underline;
        text-decoration-color: var(--acc);
}

/*
 * Standfirsts belong on the detail page. Keeping them out of the catalogue
 * gives publications a consistent bibliographic rhythm even when excerpts
 * vary considerably in length.
 */
body.post-type-archive-resource .dus-res__stand,
body.tax-resource-category .dus-res__stand {
        display: none;
}

body.post-type-archive-resource .dus-res__meta,
body.tax-resource-category .dus-res__meta {
        display: block;
        margin-top: 8px;
        font-size: 12.5px;
        line-height: 1.55;
        color: var(--muted);
}

body.post-type-archive-resource .dus-res__meta > span,
body.tax-resource-category .dus-res__meta > span {
        display: inline;
}

body.post-type-archive-resource .dus-res__by,
body.tax-resource-category .dus-res__by {
        color: var(--body);
        font-weight: 500;
}

body.post-type-archive-resource .dus-res__sep,
body.tax-resource-category .dus-res__sep {
        padding: 0 3px;
}

/* Download is secondary to opening/reading the publication record. */

body.post-type-archive-resource .dus-res__act,
body.tax-resource-category .dus-res__act {
        margin-top: 11px;
}

body.post-type-archive-resource .dus-res__dl,
body.tax-resource-category .dus-res__dl {
        gap: 6px;
        font-size: 12.5px;
        line-height: 1.3;
        font-weight: 600;
}

body.post-type-archive-resource .dus-res__dl-icon,
body.tax-resource-category .dus-res__dl-icon {
        width: 15px;
        height: 15px;
}

/* ---------- pagination ---------- */

body.post-type-archive-resource .dus-res__pager,
body.tax-resource-category .dus-res__pager {
        margin-top: 66px;
        padding-top: 24px;
        border-top: 1px solid var(--line);
}

/* ---------- large editorial displays ---------- */

@media (min-width: 1440px) {
        body.post-type-archive-resource .dus-reslib,
        body.tax-resource-category .dus-reslib {
                --res: 1280px;
        }

        body.post-type-archive-resource .dus-res__list,
        body.tax-resource-category .dus-res__list {
                grid-template-columns: repeat(4, minmax(0, 1fr));
                column-gap: 38px;
        }
}

/* ---------- tablet ---------- */

@media (max-width: 900px) {
        body.post-type-archive-resource .dus-res__list,
        body.tax-resource-category .dus-res__list {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                column-gap: 30px;
                row-gap: 48px;
        }
}

/* ---------- mobile ---------- */

@media (max-width: 767px) {
        body.post-type-archive-resource .dus-reslib,
        body.tax-resource-category .dus-reslib {
                padding-bottom: 72px;
        }

        body.post-type-archive-resource .dus-res__intro,
        body.tax-resource-category .dus-res__intro {
                padding-top: 35px;
        }

        body.post-type-archive-resource .dus-res__title,
        body.tax-resource-category .dus-res__title {
                font-size: 36px;
        }

        body.post-type-archive-resource .dus-res__search,
        body.tax-resource-category .dus-res__search {
                margin-top: 26px;
        }

        body.post-type-archive-resource .dus-res__bar,
        body.tax-resource-category .dus-res__bar {
                margin-top: 28px;
        }

        body.post-type-archive-resource .dus-res__list,
        body.tax-resource-category .dus-res__list {
                grid-template-columns: repeat(2, minmax(0, 1fr));
                column-gap: 18px;
                row-gap: 38px;
                margin-top: 24px;
        }

        body.post-type-archive-resource .dus-res__body,
        body.tax-resource-category .dus-res__body {
                padding-top: 13px;
        }

        body.post-type-archive-resource .dus-res__cat,
        body.tax-resource-category .dus-res__cat {
                margin-bottom: 6px;
                font-size: 9px;
        }

        body.post-type-archive-resource .dus-res__ttl,
        body.tax-resource-category .dus-res__ttl {
                font-size: 15.5px;
                line-height: 1.3;
        }

        body.post-type-archive-resource .dus-res__meta,
        body.tax-resource-category .dus-res__meta {
                margin-top: 6px;
                font-size: 11.5px;
                line-height: 1.45;
        }

        body.post-type-archive-resource .dus-res__act,
        body.tax-resource-category .dus-res__act {
                margin-top: 8px;
        }

        body.post-type-archive-resource .dus-res__dl,
        body.tax-resource-category .dus-res__dl {
                font-size: 11.5px;
        }

        body.post-type-archive-resource .dus-res__pager,
        body.tax-resource-category .dus-res__pager {
                margin-top: 48px;
        }
}

/* Very narrow screens: preserve legibility rather than forcing tiny covers. */

@media (max-width: 420px) {
        body.post-type-archive-resource .dus-res__list,
        body.tax-resource-category .dus-res__list {
                grid-template-columns: 1fr;
                row-gap: 44px;
        }

        body.post-type-archive-resource .dus-res__item,
        body.tax-resource-category .dus-res__item {
                max-width: 320px;
        }

        body.post-type-archive-resource .dus-res__ttl,
        body.tax-resource-category .dus-res__ttl {
                font-size: 18px;
        }

        body.post-type-archive-resource .dus-res__meta,
        body.tax-resource-category .dus-res__meta {
                font-size: 12.5px;
        }
}

/* Respect reduced-motion preferences. */

@media (prefers-reduced-motion: reduce) {
        body.post-type-archive-resource .dus-res__cover img,
        body.tax-resource-category .dus-res__cover img {
                transition: none;
        }

        body.post-type-archive-resource .dus-res__item:hover .dus-res__cover img,
        body.tax-resource-category .dus-res__item:hover .dus-res__cover img {
                transform: none;
        }
}

/* ==========================================================================
   PAMPHLET CATALOGUE — FINAL PUBLICATION CARDS

   Typography follows the shared DuSunnah system:
   - SF/system sans for catalogue/editorial Latin text and interface metadata.
   - EB Garamond remains reserved for the selective scholarly/editorial moments
     defined by the main design system.
   - Titles clamp to two lines without changing the stored WordPress title.

   The card is intentionally square and editorial rather than app-like:
   framed publication cover + restrained information panel.
   ========================================================================== */

/* ---------- catalogue grid card ---------- */

body.post-type-archive-resource .dus-res__item,
body.tax-resource-category .dus-res__item {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: auto 1fr;
        align-content: start;
        align-items: start;
        min-width: 0;
        gap: 0;
        padding: 0;
        border: 0;
        background: transparent;
}

/* ---------- publication cover ---------- */

body.post-type-archive-resource .dus-res__cover,
body.tax-resource-category .dus-res__cover {
        grid-column: 1;
        grid-row: 1;
        position: relative;
        display: block;
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 2;
        margin: 0;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 0;
        background: var(--img);
        line-height: 0;
        text-decoration: none;
        box-shadow:
                0 1px 1px rgba(30, 25, 20, .025),
                0 5px 16px rgba(30, 25, 20, .055);
}

body.post-type-archive-resource .dus-res__cover img,
body.tax-resource-category .dus-res__cover img {
        display: block;
        width: 100%;
        height: 100%;
        max-width: none;
        margin: 0;
        border: 0;
        object-fit: cover;
        object-position: center;
        box-shadow: none;
        transition: transform .22s ease;
}

body.post-type-archive-resource .dus-res__item:hover .dus-res__cover img,
body.tax-resource-category .dus-res__item:hover .dus-res__cover img {
        transform: scale(1.012);
        box-shadow: none;
}

/* ---------- publication information frame ---------- */

body.post-type-archive-resource .dus-res__body,
body.tax-resource-category .dus-res__body {
        grid-column: 1;
        grid-row: 2;
        align-self: stretch;
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: none;
        min-width: 0;
        height: 100%;
        margin: 0;
        padding: 15px 14px 14px;
        border: 1px solid var(--line);
        border-top: 0;
        border-radius: 0;
        background: var(--bg);
        font-family: var(--ft-sans);
}

/* ---------- category ---------- */

body.post-type-archive-resource .dus-res__cat,
body.tax-resource-category .dus-res__cat {
        margin: 0 0 7px;
        font-family: var(--ft-sans);
        font-size: 9.5px;
        line-height: 1.2;
        font-weight: 700;
        letter-spacing: .13em;
        text-transform: uppercase;
        color: var(--acc);
}

/* ---------- title ---------- */

body.post-type-archive-resource .dus-res__ttl,
body.tax-resource-category .dus-res__ttl {
        margin: 0;
        min-width: 0;
        font-family: var(--ft-sans);
        font-size: 16px;
        line-height: 1.28;
        font-weight: 650;
        letter-spacing: -.012em;
        text-wrap: initial;
        color: var(--ink);
}

body.post-type-archive-resource .dus-res__ttl a,
body.tax-resource-category .dus-res__ttl a {
        display: -webkit-box;
        width: 100%;
        max-width: 100%;
        min-height: calc(1.28em * 2);
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        text-overflow: ellipsis;
        color: inherit;
        text-decoration: none;
}

body.post-type-archive-resource .dus-res__ttl a:hover,
body.tax-resource-category .dus-res__ttl a:hover {
        color: var(--acc);
        text-decoration: none;
}

/* Archive cards do not carry standfirsts. */

body.post-type-archive-resource .dus-res__stand,
body.tax-resource-category .dus-res__stand {
        display: none;
}

/* ---------- bibliographic metadata ---------- */

body.post-type-archive-resource .dus-res__meta,
body.tax-resource-category .dus-res__meta {
        display: block;
        margin: 8px 0 0;
        font-family: var(--ft-sans);
        font-size: 11.5px;
        line-height: 1.45;
        font-weight: 400;
        letter-spacing: 0;
        color: var(--muted);
}

body.post-type-archive-resource .dus-res__meta > span,
body.tax-resource-category .dus-res__meta > span {
        display: inline;
}

body.post-type-archive-resource .dus-res__by,
body.tax-resource-category .dus-res__by {
        color: var(--body);
        font-weight: 500;
}

body.post-type-archive-resource .dus-res__sep,
body.tax-resource-category .dus-res__sep {
        padding: 0 3px;
        color: var(--muted);
}

/* ---------- download footer ---------- */

body.post-type-archive-resource .dus-res__act,
body.tax-resource-category .dus-res__act {
        margin: auto 0 0;
        padding-top: 13px;
}

body.post-type-archive-resource .dus-res__act::before,
body.tax-resource-category .dus-res__act::before {
        content: "";
        display: block;
        width: 100%;
        margin-bottom: 11px;
        border-top: 1px solid var(--line);
}

body.post-type-archive-resource .dus-res__dl,
body.tax-resource-category .dus-res__dl {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-family: var(--ft-sans);
        font-size: 11px;
        line-height: 1.2;
        font-weight: 650;
        letter-spacing: .055em;
        text-transform: uppercase;
        color: var(--ink);
        text-decoration: none;
}

body.post-type-archive-resource .dus-res__dl:hover,
body.tax-resource-category .dus-res__dl:hover {
        color: var(--acc);
}

body.post-type-archive-resource .dus-res__dl-icon,
body.tax-resource-category .dus-res__dl-icon {
        width: 14px;
        height: 14px;
        flex: none;
}

/* ---------- responsive ---------- */

@media (max-width: 767px) {
        body.post-type-archive-resource .dus-res__body,
        body.tax-resource-category .dus-res__body {
                padding: 12px 11px 11px;
        }

        body.post-type-archive-resource .dus-res__cat,
        body.tax-resource-category .dus-res__cat {
                margin-bottom: 6px;
                font-size: 8.5px;
        }

        body.post-type-archive-resource .dus-res__ttl,
        body.tax-resource-category .dus-res__ttl {
                font-size: 14.5px;
                line-height: 1.3;
        }

        body.post-type-archive-resource .dus-res__ttl a,
        body.tax-resource-category .dus-res__ttl a {
                min-height: calc(1.3em * 2);
        }

        body.post-type-archive-resource .dus-res__meta,
        body.tax-resource-category .dus-res__meta {
                margin-top: 7px;
                font-size: 10.5px;
        }

        body.post-type-archive-resource .dus-res__act,
        body.tax-resource-category .dus-res__act {
                padding-top: 11px;
        }

        body.post-type-archive-resource .dus-res__act::before,
        body.tax-resource-category .dus-res__act::before {
                margin-bottom: 9px;
        }

        body.post-type-archive-resource .dus-res__dl,
        body.tax-resource-category .dus-res__dl {
                font-size: 10px;
        }
}

@media (max-width: 420px) {
        body.post-type-archive-resource .dus-res__ttl,
        body.tax-resource-category .dus-res__ttl {
                font-size: 16px;
        }

        body.post-type-archive-resource .dus-res__meta,
        body.tax-resource-category .dus-res__meta {
                font-size: 11.5px;
        }
}

@media (prefers-reduced-motion: reduce) {
        body.post-type-archive-resource .dus-res__cover img,
        body.tax-resource-category .dus-res__cover img {
                transition: none;
        }

        body.post-type-archive-resource .dus-res__item:hover .dus-res__cover img,
        body.tax-resource-category .dus-res__item:hover .dus-res__cover img {
                transform: none;
        }
}

