/*
 * ZTD Announcement Feed — public styles.
 *
 * Two rules govern this file:
 *
 * 1. Everything is scoped under .ztdaf. Nothing here can reach another plugin's
 *    markup, and a theme rule on a bare element cannot reach in.
 *
 * 2. Anything a theme is likely to style — buttons, links, inputs — is pinned
 *    with !important in EVERY state, not just :hover. A theme's
 *    button[type="submit"] has specificity (0,1,1) and beats a plain class
 *    (0,1,0), while a class:hover (0,2,0) beats the theme. Style only the hover
 *    state and you get the signature bug: a control that is invisible until the
 *    mouse touches it.
 *
 * Colours come from custom properties so Elementor controls can change them
 * without ever fighting the cascade.
 */

.ztdaf {
	--ztdaf-card-bg: #ffffff;
	--ztdaf-title: #1f2937;
	--ztdaf-body: #4b5563;
	--ztdaf-meta: #6b7280;
	--ztdaf-border: #e2e6ea;
	--ztdaf-filter-bg: #f7f8f9;
	--ztdaf-accent: #4a5568;
	--ztdaf-accent-width: 5px;
	--ztdaf-accent-strong: #1f3a5f;
	--ztdaf-accent-strong-fg: #ffffff;
	--ztdaf-pill-on-default: #1f3a5f;
	--ztdaf-radius: 12px;
	--ztdaf-btn-radius: 8px;
	--ztdaf-badge-radius: 999px;
	--ztdaf-card-pad: 20px;
	--ztdaf-gap: 15px;
	--ztdaf-grid-gap: 28px;
	--ztdaf-img-height: 180px;
	--ztdaf-focus: #1a1a1a;
	--ztdaf-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
	--ztdaf-shadow-lift: 0 12px 26px rgba(15, 23, 42, 0.14);

	box-sizing: border-box;
	font-family: inherit;

	/*
	 * Inherit the theme's text colour rather than forcing a dark one. Cards,
	 * dialogs, the filter bar and the portal table all paint their own light
	 * background and set their own ink below; anything that sits directly on
	 * the site's background must take the site's colour, or the widget is
	 * invisible on a dark theme. Measured 1.2:1 on a dark theme before this.
	 */
	color: inherit;
}

/* Surfaces that paint their own background own their text colour too. */
.ztdaf .ztdaf-card,
.ztdaf .ztdaf-modal__dialog,
.ztdaf-archive .ztdaf-filters {
	color: var(--ztdaf-body);
}

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

/* Visually hidden, still announced. */
.ztdaf .ztdaf-sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/*
 * A focus ring that is always visible, on every interactive thing, in both
 * light and dark surroundings. Many themes remove outlines entirely; this puts
 * one back and makes it impossible to remove by accident.
 */
.ztdaf a:focus-visible,
.ztdaf button:focus-visible,
.ztdaf input:focus-visible,
.ztdaf select:focus-visible,
.ztdaf textarea:focus-visible,
.ztdaf [tabindex]:focus-visible {
	outline: 3px solid var(--ztdaf-focus) !important;
	outline-offset: 2px !important;
	border-radius: 4px;
}

/*
 * The hidden attribute has to win.
 *
 * The browser's own [hidden] rule is display:none at specificity 0-1-0, and
 * every layout rule in this file is at least 0-2-0 — ".ztdaf .ztdaf-card" sets
 * display:flex and beats it. So the JS would set hidden on a filtered-out card
 * and the card would sit there in plain sight: the result count changed, the
 * "No updates found" message appeared, and nothing else moved. The filters,
 * the category tabs and the search box all looked broken for the same reason,
 * because all three do their work by toggling this one attribute.
 *
 * The modal and the lightbox each had their own [hidden] rule further down,
 * which is exactly why those two were the only things that ever worked.
 *
 * !important because the point is to beat a theme's layout rules too.
 */
.ztdaf [hidden],
.ztdaf[hidden] {
	display: none !important;
}

/* ------------------------------------------------------------------ Cards */

.ztdaf .ztdaf-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--ztdaf-card-bg);
	border-radius: var(--ztdaf-radius);
	box-shadow: var(--ztdaf-shadow);
	overflow: hidden;
	height: 100%;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ztdaf .ztdaf-card__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	padding: var(--ztdaf-card-pad);
	min-width: 0;
}

.ztdaf .ztdaf-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
	min-height: 22px;
}

.ztdaf .ztdaf-card__date,
.ztdaf .ztdaf-modal__date {
	color: var(--ztdaf-meta);
	font-size: 0.85rem;
	line-height: 1.4;
}

.ztdaf .ztdaf-card__title {
	margin: 0 0 8px;
	color: var(--ztdaf-title);
	font-size: 1.15rem;
	font-weight: 600;
	line-height: 1.3;
	overflow-wrap: break-word;
}

.ztdaf .ztdaf-card__excerpt {
	margin: 0 0 16px;
	color: var(--ztdaf-body);
	font-size: 0.95rem;
	line-height: 1.55;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/*
 * The whole card is clickable, but there is exactly one link and one tab stop.
 * The stretched pseudo-element does the covering, so screen readers are not
 * told about six overlapping controls per card.
 */
.ztdaf .ztdaf-card__link {
	margin-top: auto;
	align-self: flex-start;
	text-decoration: none !important;
	color: var(--ztdaf-accent-strong) !important;
	background: transparent !important;
	border: 2px solid var(--ztdaf-accent-strong) !important;
	border-radius: var(--ztdaf-btn-radius) !important;
	padding: 8px 18px !important;
	font-weight: 600 !important;
	font-size: 0.95rem !important;
	line-height: 1.3 !important;
	box-shadow: none !important;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ztdaf .ztdaf-card__link::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.ztdaf .ztdaf-card:hover .ztdaf-card__link,
.ztdaf .ztdaf-card__link:hover,
.ztdaf .ztdaf-card__link:focus,
.ztdaf .ztdaf-card__link:focus-visible,
.ztdaf .ztdaf-card__link:active {
	background: var(--ztdaf-accent-strong) !important;
	color: var(--ztdaf-accent-strong-fg) !important;
	text-decoration: none !important;
}

/* Media */

.ztdaf .ztdaf-card__media {
	overflow: hidden;
	height: var(--ztdaf-img-height);
	background: #eef1f4;
	flex: 0 0 auto;
}

.ztdaf .ztdaf-card__img {
	display: block !important;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	object-position: center !important;
	margin: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	transition: transform 0.35s ease;
}

.ztdaf .ztdaf-card:hover .ztdaf-card__img {
	transform: scale(1.05);
}

/*
 * A card with no image gets no placeholder at all. A grey box captioned
 * "No Image" reads as broken, and display:none also removes it from the
 * accessibility tree instead of announcing it.
 */
.ztdaf .ztdaf-card--noimage .ztdaf-card__media {
	display: none !important;
}

/* Badge */

.ztdaf .ztdaf-badge {
	display: inline-block;
	background: var(--ztdaf-badge-bg, var(--ztdaf-accent)) !important;
	color: var(--ztdaf-badge-fg, #ffffff) !important;
	border-radius: var(--ztdaf-badge-radius);
	padding: 4px 11px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	line-height: 1.5;
	white-space: nowrap;
}

/* ----------------------------------------------------------- Compact feed */

/* Sits on the site's own background, so it takes the site's own colour. */
.ztdaf-mini .ztdaf-mini__heading {
	margin: 0 0 12px;
	color: inherit;
	font-size: 1.25rem;
	line-height: 1.3;
}

.ztdaf-mini .ztdaf-mini__list {
	display: flex;
	flex-direction: column;
	gap: var(--ztdaf-gap);
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.ztdaf-mini .ztdaf-mini__row {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
}

.ztdaf-mini .ztdaf-mini__row::before,
.ztdaf-mini .ztdaf-mini__row::marker {
	content: none !important;
}

.ztdaf .ztdaf-card--mini {
	border-left: var(--ztdaf-accent-width) solid var(--ztdaf-accent);
}

.ztdaf .ztdaf-card--mini .ztdaf-card__excerpt {
	-webkit-line-clamp: 1;
	line-clamp: 1;
	margin-bottom: 12px;
}

.ztdaf .ztdaf-card--mini .ztdaf-card__media {
	height: 140px;
}

/* --------------------------------------------------------------- Archive */

.ztdaf-archive .ztdaf-filters {
	background: var(--ztdaf-filter-bg);
	border: 1px solid var(--ztdaf-border);
	border-radius: var(--ztdaf-radius);
	padding: 18px;
	margin-bottom: var(--ztdaf-grid-gap);
}

.ztdaf-archive .ztdaf-filters__row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

.ztdaf-archive .ztdaf-filters__row + .ztdaf-filters__row {
	margin-top: 14px;
}

.ztdaf-archive .ztdaf-filters__row--bottom {
	justify-content: space-between;
}

.ztdaf-archive .ztdaf-filters__sep {
	color: var(--ztdaf-meta);
}

.ztdaf .ztdaf-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.ztdaf .ztdaf-field--grow {
	flex: 1 1 220px;
}

.ztdaf .ztdaf-input {
	width: 100% !important;
	max-width: 100% !important;
	background: #ffffff !important;
	color: #1f2937 !important;
	border: 1px solid #c8cfd6 !important;
	border-radius: 8px !important;
	padding: 9px 12px !important;
	font-family: inherit !important;
	font-size: 0.95rem !important;
	line-height: 1.4 !important;
	box-shadow: none !important;
	/* 16px on small screens stops iOS zooming the whole page on focus. */
	min-height: 42px;
}

@media (max-width: 782px) {
	.ztdaf .ztdaf-input {
		font-size: 16px !important;
	}
}

.ztdaf .ztdaf-count {
	margin: 0 !important;
	color: var(--ztdaf-meta);
	font-size: 0.9rem;
}

/* Filter pills — all four states pinned. */

.ztdaf .ztdaf-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ztdaf .ztdaf-pill {
	background: #ffffff !important;
	color: #3c4653 !important;
	border: 1px solid #c8cfd6 !important;
	border-radius: 999px !important;
	padding: 7px 18px !important;
	margin: 0 !important;
	font-family: inherit !important;
	font-size: 0.9rem !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	cursor: pointer !important;
	box-shadow: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.ztdaf .ztdaf-pill:hover,
.ztdaf .ztdaf-pill:focus {
	background: #eef1f4 !important;
	color: #1f2937 !important;
	border-color: #aab4be !important;
}

.ztdaf .ztdaf-pill[aria-pressed="true"] {
	background: var(--ztdaf-pill-on, var(--ztdaf-pill-on-default)) !important;
	color: var(--ztdaf-pill-on-fg, #ffffff) !important;
	border-color: var(--ztdaf-pill-on, var(--ztdaf-pill-on-default)) !important;
}

.ztdaf .ztdaf-pill[aria-pressed="true"]:hover,
.ztdaf .ztdaf-pill[aria-pressed="true"]:focus {
	filter: brightness(0.92);
	color: var(--ztdaf-pill-on-fg, #ffffff) !important;
}

/* Grid */

.ztdaf .ztdaf-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: var(--ztdaf-grid-gap);
	align-items: stretch;
}

.ztdaf .ztdaf-grid--1 { grid-template-columns: minmax(0, 1fr); }
.ztdaf .ztdaf-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ztdaf .ztdaf-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1024px) {
	.ztdaf .ztdaf-grid,
	.ztdaf .ztdaf-grid--3,
	.ztdaf .ztdaf-grid--4 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.ztdaf .ztdaf-grid,
	.ztdaf .ztdaf-grid--2,
	.ztdaf .ztdaf-grid--3,
	.ztdaf .ztdaf-grid--4 {
		grid-template-columns: minmax(0, 1fr);
	}

	.ztdaf-archive .ztdaf-filters__row--bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Also on the site's background. Inherit, and lean on opacity to read as muted. */
.ztdaf .ztdaf-empty {
	margin: 0;
	padding: 36px 16px;
	text-align: center;
	color: inherit;
	opacity: 0.85;
	font-size: 1rem;
}

.ztdaf .ztdaf-pager {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin-top: var(--ztdaf-grid-gap);
}

.ztdaf .ztdaf-pager__status {
	margin: 0 !important;
	color: inherit;
	opacity: 0.85;
	font-size: 0.9rem;
}

.ztdaf .ztdaf-editor-hint {
	padding: 24px;
	border: 1px dashed #b6bec7;
	border-radius: var(--ztdaf-radius);
	background: #fafbfc;
	color: #3c4653;
	text-align: center;
}

/* Hover lift, opt-in from the widget, and never for reduced-motion users. */
.ztdaf-lift-yes .ztdaf-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--ztdaf-shadow-lift);
}

/* ---------------------------------------------------------------- Buttons */

.ztdaf .ztdaf-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 8px !important;
	padding: 11px 22px !important;
	margin: 0 !important;
	border: 1px solid transparent !important;
	border-radius: var(--ztdaf-btn-radius) !important;
	font-family: inherit !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	line-height: 1.3 !important;
	text-align: center !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	cursor: pointer !important;
	box-shadow: none !important;
	/* 44px is the smallest comfortable touch target. */
	min-height: 44px;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.ztdaf .ztdaf-btn--primary,
.ztdaf .ztdaf-btn--accent {
	background: var(--ztdaf-accent-strong) !important;
	color: var(--ztdaf-accent-strong-fg) !important;
	border-color: var(--ztdaf-accent-strong) !important;
}

.ztdaf .ztdaf-btn--primary:hover,
.ztdaf .ztdaf-btn--primary:focus,
.ztdaf .ztdaf-btn--primary:active,
.ztdaf .ztdaf-btn--accent:hover,
.ztdaf .ztdaf-btn--accent:focus,
.ztdaf .ztdaf-btn--accent:active {
	background: var(--ztdaf-accent-strong) !important;
	color: var(--ztdaf-accent-strong-fg) !important;
	filter: brightness(0.9);
	text-decoration: none !important;
}

.ztdaf .ztdaf-btn--secondary {
	background: #ffffff !important;
	color: #1f2937 !important;
	border-color: #c8cfd6 !important;
}

.ztdaf .ztdaf-btn--secondary:hover,
.ztdaf .ztdaf-btn--secondary:focus,
.ztdaf .ztdaf-btn--secondary:active {
	background: #eef1f4 !important;
	color: #111827 !important;
	border-color: #aab4be !important;
}

.ztdaf .ztdaf-btn--ghost {
	background: transparent !important;
	color: #3c4653 !important;
	border-color: #c8cfd6 !important;
}

.ztdaf .ztdaf-btn--ghost:hover,
.ztdaf .ztdaf-btn--ghost:focus,
.ztdaf .ztdaf-btn--ghost:active {
	background: #eef1f4 !important;
	color: #111827 !important;
}

/* #b3261e on #ffffff is 5.9:1. A softer red would not pass. */
.ztdaf .ztdaf-btn--danger {
	background: #ffffff !important;
	color: #b3261e !important;
	border-color: #e7b9b6 !important;
}

.ztdaf .ztdaf-btn--danger:hover,
.ztdaf .ztdaf-btn--danger:focus,
.ztdaf .ztdaf-btn--danger:active {
	background: #b3261e !important;
	color: #ffffff !important;
	border-color: #b3261e !important;
}

.ztdaf .ztdaf-btn[disabled],
.ztdaf .ztdaf-btn[aria-disabled="true"] {
	opacity: 0.6 !important;
	cursor: not-allowed !important;
}

/* ------------------------------------------------------------------ Modal */

.ztdaf-modal[hidden] {
	display: none !important;
}

.ztdaf-modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.ztdaf-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.68);
	backdrop-filter: blur(3px);
}

.ztdaf-modal__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 660px;
	max-height: calc(100vh - 40px);
	max-height: calc(100dvh - 40px);
	background: #ffffff;
	border-radius: 14px;
	box-shadow: 0 24px 48px rgba(15, 23, 42, 0.3);
	overflow: hidden;
	animation: ztdaf-rise 0.22s ease;
}

@keyframes ztdaf-rise {
	from { transform: translateY(24px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.ztdaf-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 22px;
	border-bottom: 1px solid #eef1f4;
	flex: 0 0 auto;
}

.ztdaf-modal__meta {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.ztdaf-modal__eyebrow {
	margin: 0;
	color: #6b7280;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ztdaf .ztdaf-modal__close,
.ztdaf .ztdaf-lightbox__close {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 44px !important;
	height: 44px !important;
	padding: 0 !important;
	margin: 0 !important;
	background: transparent !important;
	border: 0 !important;
	border-radius: 8px !important;
	color: #4b5563 !important;
	font-size: 30px !important;
	line-height: 1 !important;
	cursor: pointer !important;
	box-shadow: none !important;
	flex: 0 0 auto;
}

.ztdaf .ztdaf-modal__close:hover,
.ztdaf .ztdaf-modal__close:focus {
	background: #eef1f4 !important;
	color: #111827 !important;
}

.ztdaf .ztdaf-modal__figure {
	display: block !important;
	width: 100% !important;
	padding: 0 !important;
	margin: 0 !important;
	background: #eef1f4 !important;
	border: 0 !important;
	border-bottom: 1px solid #eef1f4 !important;
	border-radius: 0 !important;
	cursor: zoom-in !important;
	box-shadow: none !important;
	flex: 0 0 auto;
}

.ztdaf .ztdaf-modal__img {
	display: block !important;
	width: 100% !important;
	max-height: 360px !important;
	object-fit: cover !important;
	margin: 0 !important;
	border-radius: 0 !important;
}

.ztdaf-modal__body {
	padding: 26px 30px 30px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

.ztdaf .ztdaf-modal__title {
	margin: 0 0 14px !important;
	color: var(--ztdaf-title);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.25;
	overflow-wrap: break-word;
}

.ztdaf .ztdaf-modal__content {
	color: var(--ztdaf-body);
	font-size: 1.02rem;
	line-height: 1.65;
}

.ztdaf .ztdaf-modal__content > *:first-child { margin-top: 0 !important; }
.ztdaf .ztdaf-modal__content > *:last-child { margin-bottom: 0 !important; }
.ztdaf .ztdaf-modal__content p { margin: 0 0 12px !important; }
.ztdaf .ztdaf-modal__content ul,
.ztdaf .ztdaf-modal__content ol { margin: 0 0 14px 22px !important; padding: 0 !important; }
.ztdaf .ztdaf-modal__content li { margin-bottom: 6px !important; }
.ztdaf .ztdaf-modal__content strong { font-weight: 600; color: var(--ztdaf-title); }
.ztdaf .ztdaf-modal__content a { color: var(--ztdaf-accent-strong) !important; text-decoration: underline !important; }

.ztdaf .ztdaf-modal__cta {
	margin-top: 24px !important;
}

.ztdaf .ztdaf-modal__permalink {
	margin: 18px 0 0 !important;
	font-size: 0.88rem;
}

.ztdaf .ztdaf-modal__permalink a {
	color: var(--ztdaf-meta) !important;
	text-decoration: underline !important;
}

@media (max-width: 640px) {
	.ztdaf-modal { padding: 0; }

	.ztdaf-modal__dialog {
		max-width: none;
		max-height: 100vh;
		max-height: 100dvh;
		height: 100%;
		border-radius: 0;
	}

	.ztdaf-modal__body { padding: 20px 18px 28px; }
	.ztdaf .ztdaf-modal__title { font-size: 1.3rem; }
}

/* --------------------------------------------------------------- Lightbox */

.ztdaf-lightbox[hidden] {
	display: none !important;
}

.ztdaf-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(0, 0, 0, 0.92);
}

.ztdaf-lightbox__img {
	max-width: 100%;
	max-height: 90vh;
	object-fit: contain;
	border-radius: 4px;
}

.ztdaf .ztdaf-lightbox__close {
	position: absolute !important;
	top: 14px !important;
	right: 16px !important;
	color: #f3f4f6 !important;
	font-size: 38px !important;
}

.ztdaf .ztdaf-lightbox__close:hover,
.ztdaf .ztdaf-lightbox__close:focus {
	background: rgba(255, 255, 255, 0.14) !important;
	color: #ffffff !important;
}

/* Stop the page behind a modal from scrolling under it. */
body.ztdaf-locked {
	overflow: hidden !important;
}

/* ------------------------------------------------------------- Single page */

/*
 * The page a card opens into.
 *
 * It paints its own surface for the same reason the staff portal does: the
 * theme this was built against sets #333 body text on a #0e172d background,
 * which makes its own paragraphs nearly unreadable, never mind ours. Inheriting
 * colour here would mean an announcement that opens into a blank-looking page.
 *
 * Sized in ch rather than px so the measure stays readable whatever base font
 * the theme sets.
 */
.ztdaf.ztdaf-single {
	max-width: 78ch;
	margin: 40px auto;
	padding: 0 16px;
}

.ztdaf-single .ztdaf-single__panel {
	background: var(--ztdaf-card-bg);
	color: var(--ztdaf-body);
	border: 1px solid var(--ztdaf-border);
	border-radius: var(--ztdaf-radius);
	box-shadow: var(--ztdaf-shadow);
	padding: clamp(22px, 4vw, 44px);
	/* The accent edge the cards use, so the page reads as the same family. */
	border-left: var(--ztdaf-accent-width) solid var(--ztdaf-accent);
}

.ztdaf-single .ztdaf-single__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
}

.ztdaf-single .ztdaf-single__date {
	color: var(--ztdaf-meta) !important;
	font-size: 0.9rem;
	letter-spacing: 0.02em;
}

.ztdaf-single .ztdaf-single__title {
	margin: 0 0 22px !important;
	color: var(--ztdaf-title) !important;
	font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem) !important;
	line-height: 1.22 !important;
	font-weight: 700 !important;
	/* Long unbroken strings in a title should wrap, not widen the page. */
	overflow-wrap: break-word;
}

.ztdaf-single .ztdaf-single__figure {
	margin: 0 0 26px !important;
	padding: 0;
}

.ztdaf-single .ztdaf-single__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: calc(var(--ztdaf-radius) - 4px);
}

.ztdaf-single .ztdaf-single__body {
	color: var(--ztdaf-body) !important;
	font-size: 1.02rem;
	line-height: 1.7;
}

/* The body is author-written, so style the elements it can contain rather
   than hoping the theme's defaults are legible on a white panel. */
.ztdaf-single .ztdaf-single__body p,
.ztdaf-single .ztdaf-single__body li {
	color: var(--ztdaf-body) !important;
}

.ztdaf-single .ztdaf-single__body > *:first-child {
	margin-top: 0 !important;
}

.ztdaf-single .ztdaf-single__body > *:last-child {
	margin-bottom: 0 !important;
}

.ztdaf-single .ztdaf-single__body h2,
.ztdaf-single .ztdaf-single__body h3,
.ztdaf-single .ztdaf-single__body h4 {
	color: var(--ztdaf-title) !important;
	line-height: 1.3;
	margin: 1.6em 0 0.5em;
}

.ztdaf-single .ztdaf-single__body a {
	color: var(--ztdaf-accent-strong) !important;
	text-decoration: underline;
}

.ztdaf-single .ztdaf-single__body img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
}

.ztdaf-single .ztdaf-single__body blockquote {
	margin: 1.4em 0;
	padding: 2px 0 2px 16px;
	border-left: 3px solid var(--ztdaf-border);
	color: var(--ztdaf-meta) !important;
}

.ztdaf.ztdaf-single__cta {
	margin-top: 28px;
}

.ztdaf-single .ztdaf-single__expired {
	margin: 26px 0 0 !important;
	padding: 12px 16px;
	border-radius: 8px;
	background: #fdf6e3;
	border: 1px solid #e8d9a8;
	color: #6b5310 !important;
	font-size: 0.95rem;
	line-height: 1.5;
}

.ztdaf-single .ztdaf-single__back {
	margin: 30px 0 0 !important;
	padding-top: 18px;
	border-top: 1px solid var(--ztdaf-border);
}

.ztdaf-single .ztdaf-single__back a {
	color: var(--ztdaf-accent-strong) !important;
	text-decoration: none !important;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
}

.ztdaf-single .ztdaf-single__back a:hover,
.ztdaf-single .ztdaf-single__back a:focus {
	text-decoration: underline !important;
}

/* --------------------------------------------------- Motion and contrast */

@media (prefers-reduced-motion: reduce) {
	.ztdaf *,
	.ztdaf-modal *,
	.ztdaf-lightbox * {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}

	.ztdaf-lift-yes .ztdaf-card:hover,
	.ztdaf .ztdaf-card:hover .ztdaf-card__img {
		transform: none !important;
	}
}

@media (prefers-contrast: more) {
	.ztdaf .ztdaf-card {
		border: 1px solid #1f2937;
	}

	.ztdaf .ztdaf-input {
		border-color: #1f2937 !important;
	}
}

/*
 * Touch targets.
 *
 * Measured on a real phone viewport, the filter pills came out 35px tall, the
 * "Read more" links 40px and the search field 42px. Only .ztdaf-btn had ever
 * been given the 44px it needs. 24px clears WCAG 2.2 SC 2.5.8 at AA, so none
 * of this was a failure — but 44px is the figure that actually stops people
 * mis-tapping, and it is the figure the handover notes claimed, so the
 * stylesheet should be the thing that changes.
 *
 * Gated on a coarse pointer so mouse users keep the tighter, tidier density.
 * Padding rather than height alone, so a pill that wraps to two lines grows
 * instead of clipping its own text.
 */
@media (pointer: coarse) {
	.ztdaf .ztdaf-pill {
		min-height: 44px !important;
		padding-top: 8px !important;
		padding-bottom: 8px !important;
	}

	.ztdaf .ztdaf-card__link {
		min-height: 44px !important;
		align-items: center !important;
	}

	.ztdaf .ztdaf-input,
	.ztdaf select.ztdaf-input {
		min-height: 44px !important;
	}

	.ztdaf .ztdaf-pager a,
	.ztdaf .ztdaf-pager span {
		min-height: 44px !important;
		display: inline-flex !important;
		align-items: center !important;
	}
}

@media print {
	.ztdaf-modal,
	.ztdaf-lightbox,
	.ztdaf-archive .ztdaf-filters {
		display: none !important;
	}

	.ztdaf .ztdaf-card {
		box-shadow: none;
		border: 1px solid #999;
		break-inside: avoid;
	}
}
