/*
 * Public pages: one published item, and a listing of them.
 *
 * Shares assets/tokens.css with the member area, so the palette, type scale
 * and radii are the same object rather than a copy. These pages sit inside the
 * theme's own header and footer, so this styles the content between them and
 * deliberately sets no page background, no body font and nothing global: a
 * plugin that restyles a theme's page furniture is a plugin somebody ends up
 * fighting.
 *
 * Layout follows the wireframes: a kicker line, a large heading, the summary
 * as a standfirst, then the description with the facts beside it.
 */

.dgl-pub {
	font-family: var(--dgl-font);
	font-size: var(--dgl-size);
	line-height: var(--dgl-line);
	color: var(--dgl-text);
	max-width: 1100px;
	margin: 0 auto;
	padding: var(--dgl-gap-lg) var(--dgl-gap);
}

/* ---- Breadcrumb and kicker --------------------------------------------- */

.dgl-pub__crumbs {
	font-size: 0.82em;
	color: var(--dgl-text-muted);
	margin: 0 0 var(--dgl-gap);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dgl-pub__crumbs a { color: var(--dgl-link); }

.dgl-pub__kicker {
	margin: 0 0 8px;
	font-size: 0.82em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dgl-teal-text);
}

.dgl-pub__org {
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
	color: var(--dgl-text-muted);
}

/* ---- Headings ---------------------------------------------------------- */

.dgl-pub__title {
	margin: 0 0 var(--dgl-gap);
	font-family: var(--dgl-font);
	font-weight: var(--dgl-weight-heading);
	line-height: 1.15;
	font-size: clamp( 1.9rem, 1.3rem + 2.2vw, 3rem );
	color: var(--dgl-navy);
}

.dgl-pub__standfirst {
	margin: 0 0 var(--dgl-gap-lg);
	font-size: 1.15em;
	line-height: 1.5;
	color: var(--dgl-text);
	max-width: 62ch;
}

.dgl-pub__lede {
	margin: 0 0 var(--dgl-gap-lg);
	color: var(--dgl-text-muted);
	max-width: 62ch;
}

/*
 * An item whose date has gone. The expiry sweep takes these off the listings
 * on their own schedule, so this is only reachable in the window between the
 * date passing and the sweep running. Saying so beats a stale listing that
 * sends somebody to a closed door.
 */
.dgl-pub__passed {
	margin: 0 0 var(--dgl-gap-lg);
	padding: 12px var(--dgl-gap);
	border-radius: var(--dgl-radius-button);
	background: var(--dgl-surface);
	font-size: 0.95em;
}

/* ---- Media ------------------------------------------------------------- */

.dgl-pub__image {
	margin: 0 0 var(--dgl-gap-lg);
	border-radius: var(--dgl-radius-card);
	overflow: hidden;
}

.dgl-pub__image img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---- Body and sidebar -------------------------------------------------- */

.dgl-pub__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 320px;
	gap: var(--dgl-gap-lg);
	align-items: start;
}

/*
 * An item with no description gets one column. The facts card stranded beside
 * an empty half-page looks like the page failed to load.
 */
.dgl-pub__layout--nobody {
	grid-template-columns: minmax(0, 520px);
}

.dgl-pub__layout--nobody .dgl-pub__aside { position: static; }

.dgl-pub__body { max-width: 66ch; }

.dgl-pub__body > *:first-child { margin-top: 0; }

.dgl-pub__body p { margin: 0 0 var(--dgl-gap); }

.dgl-pub__aside {
	display: flex;
	flex-direction: column;
	gap: var(--dgl-gap);
	position: sticky;
	top: var(--dgl-gap-lg);
}

.dgl-pub__card {
	background: var(--dgl-white);
	border: 1px solid var(--dgl-border);
	border-radius: var(--dgl-radius-card);
	padding: var(--dgl-gap-lg);
	box-shadow: var(--dgl-shadow-rest);
}

.dgl-pub__card-title {
	margin: 0 0 var(--dgl-gap);
	font-size: 1rem;
	font-weight: var(--dgl-weight-heading);
	color: var(--dgl-navy);
}

/* ---- Facts ------------------------------------------------------------- */

.dgl-pub__facts {
	margin: 0;
	font-size: 0.95em;
}

.dgl-pub__facts dt {
	margin: 0 0 2px;
	color: var(--dgl-text-muted);
	font-size: 0.78em;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.dgl-pub__facts dd {
	margin: 0 0 var(--dgl-gap);
	font-weight: 500;
	color: var(--dgl-text);
	overflow-wrap: anywhere;
}

/* The first fact is when. It is the one a visitor came for, so it leads. */
.dgl-pub__facts dd:first-of-type {
	font-size: 1.1em;
	font-weight: 600;
	color: var(--dgl-navy);
}

.dgl-pub__facts dd:last-child { margin-bottom: 0; }

.dgl-pub__facts a { color: var(--dgl-link); }

/* ---- Action ------------------------------------------------------------ */

.dgl-pub__card--action { text-align: center; }

.dgl-pub__button {
	display: block;
	padding: 14px var(--dgl-gap-lg);
	border-radius: var(--dgl-radius-button);
	background: var(--dgl-primary);
	color: var(--dgl-primary-text);
	font-weight: var(--dgl-weight-button);
	text-decoration: none;
	text-align: center;
}

.dgl-pub__button:hover,
.dgl-pub__button:focus {
	background: color-mix(in srgb, var(--dgl-primary) 82%, #000000);
	color: var(--dgl-primary-text);
}

.dgl-pub__note {
	margin: 12px 0 0;
	font-size: 0.82em;
	color: var(--dgl-text-muted);
	line-height: 1.45;
}

.dgl-pub__orgname {
	margin: 0;
	font-weight: 600;
	color: var(--dgl-text);
}

.dgl-pub__back {
	margin: var(--dgl-gap-lg) 0 0;
	padding-top: var(--dgl-gap);
	border-top: 1px solid var(--dgl-border);
}

.dgl-pub__back a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 20px;
	border: var(--dgl-field-border) solid var(--dgl-field-outline);
	border-radius: var(--dgl-radius-button);
	color: var(--dgl-link);
	font-weight: var(--dgl-weight-button);
	text-decoration: none;
}

.dgl-pub__back a:hover,
.dgl-pub__back a:focus { background: var(--dgl-surface); }

/* ---- Listing ----------------------------------------------------------- */

.dgl-pub__head { margin-bottom: var(--dgl-gap-lg); }

.dgl-pub__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--dgl-gap);
}

.dgl-pub__row {
	display: grid;
	grid-template-columns: 160px minmax(0, 1fr);
	gap: var(--dgl-gap-lg);
	align-items: start;
	background: var(--dgl-white);
	border: 1px solid var(--dgl-border);
	border-radius: var(--dgl-radius-card);
	padding: var(--dgl-gap);
	box-shadow: var(--dgl-shadow-rest);
	transition: box-shadow var(--dgl-motion), border-color var(--dgl-motion);
}

.dgl-pub__row:hover {
	border-color: var(--dgl-border-strong);
	box-shadow: var(--dgl-shadow-raise);
}

/* A row with no picture should not leave a hole where one would be. */
.dgl-pub__row:not(:has(.dgl-pub__thumb)) { grid-template-columns: minmax(0, 1fr); }

.dgl-pub__thumb img {
	display: block;
	width: 100%;
	height: 120px;
	object-fit: cover;
	border-radius: var(--dgl-radius-field);
}

.dgl-pub__pin {
	display: inline-block;
	margin: 0 0 6px;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--dgl-navy);
	color: var(--dgl-white);
	font-size: 0.74em;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
}

.dgl-pub__rowtitle {
	margin: 0 0 4px;
	font-size: 1.2rem;
	font-weight: var(--dgl-weight-heading);
	line-height: 1.3;
}

.dgl-pub__rowtitle a {
	color: var(--dgl-navy);
	text-decoration: none;
}

.dgl-pub__rowtitle a:hover,
.dgl-pub__rowtitle a:focus { text-decoration: underline; }

.dgl-pub__rowmeta {
	margin: 0 0 8px;
	font-size: 0.9em;
	color: var(--dgl-teal-text);
	font-weight: 500;
}

.dgl-pub__rowsummary {
	margin: 0 0 8px;
	font-size: 0.95em;
	color: var(--dgl-text);
	max-width: 70ch;
}

.dgl-pub__roworg {
	margin: 0;
	font-size: 0.85em;
	color: var(--dgl-text-muted);
}

.dgl-pub__empty { text-align: center; }

.dgl-pub__empty p { margin: 0; }

/* ---- Pagination -------------------------------------------------------- */

.dgl-pub__pagination { margin-top: var(--dgl-gap-lg); }

.dgl-pub__pagination ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.dgl-pub__pagination a,
.dgl-pub__pagination span {
	display: block;
	padding: 8px 14px;
	border-radius: var(--dgl-radius-button);
	border: 1px solid var(--dgl-border);
	text-decoration: none;
	color: var(--dgl-link);
	font-size: 0.9em;
}

.dgl-pub__pagination .current {
	background: var(--dgl-primary);
	border-color: var(--dgl-primary);
	color: var(--dgl-primary-text);
}

/* ---- Focus ------------------------------------------------------------- */

.dgl-pub a:focus-visible,
.dgl-pub button:focus-visible {
	outline: 3px solid var(--dgl-focus);
	outline-offset: 2px;
}

/* ---- Narrow ------------------------------------------------------------ */

@media ( max-width: 860px ) {
	.dgl-pub__layout { grid-template-columns: minmax(0, 1fr); }

	.dgl-pub__aside { position: static; }

	.dgl-pub__row { grid-template-columns: minmax(0, 1fr); }

	.dgl-pub__thumb img { height: 180px; }
}

/* ---- Listing: featured block, quiet filters, card rows ------------------ */

/*
 * The news and events pages open with one item large and three beside it,
 * then rows. Every row is the same three lines beside a square picture, so
 * the eye runs down the titles; the chip names the topic in one word.
 */
.dgl-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
	gap: var(--dgl-gap-lg);
	margin: 0 0 var(--dgl-gap-xl, 40px);
}

.dgl-hero__lead {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 420px;
	border-radius: var(--dgl-radius-card);
	overflow: hidden;
	background: var(--dgl-navy);
	box-shadow: var(--dgl-shadow-rest);
}

.dgl-hero__lead .dgl-card__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dgl-hero__lead .dgl-card__img--none { display: block; }

.dgl-hero__lead .dgl-card__img--none > span { display: none; }

.dgl-hero__lead::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, rgb(20 27 52 / 92%) 0%, rgb(20 27 52 / 55%) 45%, rgb(20 27 52 / 8%) 100%);
	pointer-events: none;
}

/* Fills the lead however tall the side column makes it; grows the lead when its own words need more. */
.dgl-hero__body {
	position: relative;
	z-index: 1;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	gap: 10px;
	padding: var(--dgl-gap-lg);
	color: var(--dgl-white);
}

.dgl-hero__title {
	margin: 0;
	font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.2rem);
	font-weight: var(--dgl-weight-heading);
	line-height: 1.15;
	text-wrap: balance;
	max-width: 24ch;
}

.dgl-hero__title a { color: var(--dgl-white); text-decoration: none; }

.dgl-hero__title a::after { content: ""; position: absolute; inset: 0; }

.dgl-hero__title a:hover,
.dgl-hero__title a:focus { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.dgl-hero__body .dgl-card__meta { color: rgb(255 255 255 / 88%); }

.dgl-hero__body .dgl-card__meta span::before { color: rgb(255 255 255 / 60%); }

.dgl-hero__more {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin-top: 4px;
	padding: 0 20px;
	border-radius: var(--dgl-radius-button);
	background: var(--dgl-white);
	color: var(--dgl-navy);
	font-weight: var(--dgl-weight-button);
	font-size: 15px;
	text-decoration: none;
}

.dgl-hero__lead:hover .dgl-hero__more { background: var(--dgl-page); }

.dgl-hero__lead:focus-within { outline: 3px solid var(--dgl-focus); outline-offset: 2px; }

.dgl-hero__side {
	display: grid;
	grid-template-rows: repeat(3, minmax(0, 1fr));
	gap: var(--dgl-gap);
}

/*
 * Side cards and rows are open, not boxed: picture on the left, words on
 * the right, a hairline between rows. The picture and the title carry the
 * hover; a box around each row only ever competed with the featured card.
 */
.dgl-hero__item,
.dgl-card {
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	gap: var(--dgl-gap);
	align-items: center;
	position: relative;
}

.dgl-pub__list .dgl-card {
	padding: 22px 0;
	border-bottom: 1px solid var(--dgl-border);
	align-items: start;
}

.dgl-pub__list .dgl-card:first-child { padding-top: 6px; }

.dgl-pub__list .dgl-card:last-child { border-bottom: 0; }

.dgl-card__pic {
	display: block;
	flex: none;
	width: 140px;
	height: 140px;
	border-radius: 14px;
	overflow: hidden;
	background: var(--dgl-surface);
}

.dgl-hero__item .dgl-card__pic { width: 104px; height: 104px; border-radius: 12px; }

.dgl-card__pic .dgl-card__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dgl-card__img--none,
.dgl-card__pic .dgl-card__img--none {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--dgl-navy);
	color: var(--dgl-white);
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.dgl-card__body { min-width: 0; }

.dgl-card__chip {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	margin: 0 0 6px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--dgl-teal-text);
}

.dgl-card__chip--onpic { color: var(--dgl-white); opacity: 0.92; }

.dgl-card__chip .dgl-pub__pin { margin: 0; font-size: 11px; }

.dgl-card__title {
	margin: 0 0 6px;
	font-size: 1.15rem;
	font-weight: var(--dgl-weight-heading);
	line-height: 1.3;
	text-wrap: balance;
}

.dgl-hero__item .dgl-card__title { font-size: 1.02rem; }

.dgl-pub__list .dgl-card__title { font-size: 1.25rem; }

.dgl-card__summary {
	margin: 0 0 8px;
	font-size: 0.98rem;
	line-height: 1.5;
	color: var(--dgl-text-muted, var(--dgl-text));
	max-width: 68ch;
}

.dgl-card__title a { color: var(--dgl-navy); text-decoration: none; }

/* The whole card is the way in; the title carries the name for keyboards and readers. */
.dgl-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: var(--dgl-radius-card); }

.dgl-card__title a:hover,
.dgl-card__title a:focus { text-decoration: underline; text-underline-offset: 3px; }

.dgl-card:focus-within,
.dgl-hero__item:focus-within { outline: 3px solid var(--dgl-focus); outline-offset: 2px; border-radius: var(--dgl-radius-card); }

.dgl-card:hover .dgl-card__img { filter: brightness(0.94); }

.dgl-card__title a:focus-visible { outline: none; }

.dgl-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 0;
	margin: 0;
	font-size: 0.86em;
	line-height: 1.5;
	color: var(--dgl-text-muted);
}

.dgl-card__meta span + span::before {
	content: "/";
	margin: 0 8px;
	color: var(--dgl-text-muted);
	opacity: 0.55;
}

.dgl-pub__pin--onpic { background: var(--dgl-white); color: var(--dgl-navy); }

/* The filters sit under the featured block as one quiet line: a heading, two selects, Show. */
.dgl-listing__filters { margin: 0 0 var(--dgl-gap); }

.dgl-listing__filterrow {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 14px;
	padding: 0 0 12px;
	border-bottom: 1px solid var(--dgl-border);
}

.dgl-listing__heading {
	margin: 0 auto 0 0;
	font-size: 1.15rem;
	font-weight: var(--dgl-weight-heading);
	color: var(--dgl-navy);
}

h2.dgl-listing__heading:only-child,
.dgl-listing > h2.dgl-listing__heading { padding-bottom: 12px; border-bottom: 1px solid var(--dgl-border); margin-bottom: var(--dgl-gap); }

.dgl-listing__filter { display: inline-flex; align-items: center; gap: 8px; font-size: 0.86em; color: var(--dgl-text-muted); }

.dgl-listing__filterlabel { font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; font-size: 12px; }

.dgl-pub .dgl-listing__select {
	min-height: 40px;
	padding: 0 32px 0 12px;
	border: var(--dgl-field-border) solid var(--dgl-field-outline);
	border-radius: var(--dgl-radius-field);
	background: var(--dgl-white);
	color: var(--dgl-text);
	font: var(--dgl-weight-body) 14px / 1.2 var(--dgl-font);
}

.dgl-pub .dgl-listing__select:focus-visible { outline: 3px solid var(--dgl-focus); outline-offset: 2px; }

.dgl-pub .dgl-listing__apply {
	min-height: 40px;
	padding: 0 16px;
	border: var(--dgl-field-border) solid var(--dgl-field-outline);
	border-radius: var(--dgl-radius-button);
	background: var(--dgl-white);
	color: var(--dgl-navy);
	font: var(--dgl-weight-button) 14px / 1 var(--dgl-font);
	cursor: pointer;
}

.dgl-pub .dgl-listing__apply:hover { background: var(--dgl-surface); }

.dgl-pub .dgl-listing__apply:focus-visible { outline: 3px solid var(--dgl-focus); outline-offset: 2px; }

@media ( max-width: 900px ) {
	.dgl-hero { grid-template-columns: minmax(0, 1fr); }
	.dgl-hero__lead { min-height: 340px; }
}

@media ( max-width: 560px ) {
	.dgl-hero__lead { min-height: 300px; }
	.dgl-hero__body { padding: var(--dgl-gap); }
	.dgl-card__pic { width: 96px; height: 96px; border-radius: 12px; }
	.dgl-hero__item .dgl-card__pic { width: 84px; height: 84px; }
	.dgl-pub__list .dgl-card { padding: 16px 0; gap: 12px; }
	.dgl-pub__list .dgl-card__title { font-size: 1.05rem; }
	.dgl-card__summary { font-size: 0.92rem; }
	.dgl-card__title { font-size: 1.02rem; }
	.dgl-listing__filterrow { display: grid; gap: 12px; }
	.dgl-listing__filterrow[hidden] { display: none; }
	.dgl-listing__filterrow .dgl-listing__heading { display: none; }
	.dgl-listing__filter { display: grid; gap: 4px; }
	.dgl-pub .dgl-listing__select { width: 100%; min-height: 44px; }
	.dgl-pub .dgl-listing__apply { min-height: 44px; }
	.dgl-listing__filters .dgl-dir__toggle { width: 100%; }
}

/* ---- Directory --------------------------------------------------------- */

/*
 * Search first, results second, nothing else. The form is one row of
 * fields on a desk and a stack on a phone; the results are equal cards so
 * the eye can scan down the names.
 */
.dgl-dir__search {
	display: grid;
	grid-template-columns: minmax(0, 2fr) repeat(4, minmax(0, 1fr)) auto;
	gap: 12px var(--dgl-gap);
	align-items: end;
	margin: 0 0 var(--dgl-gap-lg);
	padding: var(--dgl-gap);
	background: var(--dgl-white);
	border: 1px solid var(--dgl-border);
	border-radius: var(--dgl-radius-card);
	box-shadow: var(--dgl-shadow-rest);
}

.dgl-dir__label {
	display: block;
	margin: 0 0 4px;
	font-size: 0.78em;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--dgl-text-muted);
}

.dgl-pub .dgl-dir__input {
	box-sizing: border-box;
	width: 100%;
	min-height: var(--dgl-field-height);
	padding: 0 12px;
	border: var(--dgl-field-border) solid var(--dgl-field-outline);
	border-radius: var(--dgl-radius-field);
	background: var(--dgl-white);
	color: var(--dgl-text);
	font: var(--dgl-weight-body) 15px / var(--dgl-line) var(--dgl-font);
}

.dgl-pub .dgl-dir__input:focus-visible {
	outline: 3px solid var(--dgl-focus);
	outline-offset: 2px;
}

.dgl-dir__actions { display: flex; align-items: center; gap: 12px; }

.dgl-pub .dgl-dir__button {
	min-height: var(--dgl-field-height);
	padding: 0 22px;
	border: 0;
	cursor: pointer;
	font: var(--dgl-weight-button) 15px / 1 var(--dgl-font);
}

.dgl-dir__clear { color: var(--dgl-link); font-size: 0.9em; white-space: nowrap; }

.dgl-pub__filterbar {
	margin: 0 0 var(--dgl-gap-lg);
	padding: var(--dgl-gap);
	background: var(--dgl-white);
	border: 1px solid var(--dgl-border);
	border-radius: var(--dgl-radius-card);
	box-shadow: var(--dgl-shadow-rest);
}

.dgl-pub__filters {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
	gap: 12px var(--dgl-gap);
	align-items: end;
}

.dgl-pub__filters .dgl-dir__actions { padding-bottom: 2px; }

.dgl-dir__count {
	margin: 0 0 var(--dgl-gap);
	font-size: 0.9em;
	color: var(--dgl-text-muted);
}

.dgl-dir__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: var(--dgl-gap);
}

.dgl-dir__card { margin: 0; }

.dgl-dir__cardlink {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr);
	gap: var(--dgl-gap);
	height: 100%;
	box-sizing: border-box;
	padding: var(--dgl-gap);
	background: var(--dgl-white);
	border: 1px solid var(--dgl-border);
	border-radius: var(--dgl-radius-card);
	box-shadow: var(--dgl-shadow-rest);
	color: var(--dgl-text);
	text-decoration: none;
	transition: box-shadow var(--dgl-motion), border-color var(--dgl-motion);
}

.dgl-dir__cardlink:hover,
.dgl-dir__cardlink:focus-visible {
	border-color: var(--dgl-border-strong);
	box-shadow: var(--dgl-shadow-raise);
}

.dgl-dir__cardlink:hover .dgl-dir__name { text-decoration: underline; }

.dgl-dir__mark {
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 12px;
	background: var(--dgl-surface);
	overflow: hidden;
}

.dgl-dir__mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

.dgl-dir__initial {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--dgl-navy);
}

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

.dgl-dir__name {
	font-size: 1.05rem;
	font-weight: var(--dgl-weight-heading);
	line-height: 1.3;
	color: var(--dgl-navy);
}

.dgl-dir__where { font-size: 0.85em; color: var(--dgl-teal-text); font-weight: 500; }

.dgl-dir__blurb { font-size: 0.9em; line-height: 1.5; color: var(--dgl-text); }

.dgl-dir__tags,
.dgl-org__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 6px 0 0;
	padding: 0;
	list-style: none;
}

.dgl-dir__tag {
	display: inline-block;
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--dgl-surface);
	border: 1px solid var(--dgl-border);
	font-size: 0.74em;
	font-weight: 600;
	line-height: 1.4;
	color: var(--dgl-navy);
}

.dgl-dir__tag--more { color: var(--dgl-text-muted); }

.dgl-dir__foot {
	margin: var(--dgl-gap-lg) 0 0;
	font-size: 0.85em;
	color: var(--dgl-text-muted);
}

/* ---- One organisation -------------------------------------------------- */

.dgl-org__head {
	display: flex;
	align-items: center;
	gap: var(--dgl-gap-lg);
	margin: 0 0 var(--dgl-gap-lg);
}

.dgl-org__head .dgl-pub__title { margin-bottom: 4px; }

.dgl-org__logo {
	flex: none;
	width: 112px;
	height: 112px;
	display: grid;
	place-items: center;
	padding: 8px;
	box-sizing: border-box;
	background: var(--dgl-white);
	border: 1px solid var(--dgl-border);
	border-radius: var(--dgl-radius-card);
}

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

.dgl-org__where { margin: 0; color: var(--dgl-teal-text); font-weight: 500; }

.dgl-org__blurb { margin-bottom: 8px; }

.dgl-pub .dgl-org__more {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	margin: 0 0 var(--dgl-gap-lg);
	padding: 0 14px;
	border: var(--dgl-field-border) solid var(--dgl-field-outline);
	border-radius: var(--dgl-radius-button);
	background: var(--dgl-white);
	color: var(--dgl-link);
	font: var(--dgl-weight-button) 14px / 1 var(--dgl-font);
	cursor: pointer;
}

.dgl-pub .dgl-org__more:hover { background: var(--dgl-surface); }

.dgl-org__more + .dgl-org__areas { margin-top: 0; }

.dgl-org__areas {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: calc(-1 * var(--dgl-gap) + 12px) 0 var(--dgl-gap-lg);
	padding: 0;
	list-style: none;
}

.dgl-org__areas .dgl-dir__tag { font-size: 0.82em; padding: 5px 11px; }

.dgl-org__section {
	margin: 0 0 var(--dgl-gap);
	padding-top: var(--dgl-gap);
	border-top: 1px solid var(--dgl-border);
}

.dgl-org__line { margin: 0; }

.dgl-org__list {
	display: grid;
	grid-template-columns: minmax(150px, 200px) minmax(0, 1fr);
	gap: 8px var(--dgl-gap-lg);
	margin: 0;
}

.dgl-org__list dt {
	font-size: 0.82em;
	font-weight: 600;
	color: var(--dgl-text-muted);
	padding-top: 2px;
}

.dgl-org__list dd { margin: 0; }

@media ( max-width: 560px ) {
	.dgl-org__list { grid-template-columns: minmax(0, 1fr); gap: 2px; }
	.dgl-org__list dd { margin-bottom: 8px; }
}

.dgl-org__h2 {
	margin: 0 0 6px;
	font-size: 1.05rem;
	font-weight: var(--dgl-weight-heading);
	color: var(--dgl-navy);
}

.dgl-org__tags { margin: 0; }

.dgl-org__group { margin: 0 0 10px; }

.dgl-org__group:last-child { margin-bottom: 0; }

.dgl-org__h3 {
	margin: 0 0 4px;
	font-size: 0.78em;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--dgl-text-muted);
}

.dgl-org__tags .dgl-dir__tag { font-size: 0.82em; padding: 5px 11px; }

.dgl-org__live { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }

.dgl-org__live a { color: var(--dgl-link); font-weight: 500; }

.dgl-org__livetype { margin-left: 8px; font-size: 0.8em; color: var(--dgl-text-muted); }

/* The first fact on an organisation is not a date, so it does not lead. */
.dgl-org__facts dd:first-of-type { font-size: inherit; font-weight: 500; color: var(--dgl-text); }

@media ( max-width: 1000px ) {
	.dgl-dir__search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dgl-dir__query { grid-column: 1 / -1; }
}

@media ( max-width: 560px ) {
	.dgl-dir__search { grid-template-columns: minmax(0, 1fr); }
	.dgl-org__head { align-items: flex-start; }
	.dgl-org__logo { width: 80px; height: 80px; }
}

/* ---- Repeating events on an event page --------------------------------- */

.dgl-pub__when {
	margin: 0 0 var(--dgl-gap-lg);
	padding: var(--dgl-gap);
	border-radius: var(--dgl-radius-card);
	background: var(--dgl-surface);
}

.dgl-pub__whenline { margin: 0 0 10px; font-weight: 600; color: var(--dgl-navy); }

.dgl-pub__nextlabel {
	margin: 0 0 4px;
	font-size: 0.78em;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--dgl-text-muted);
}

.dgl-pub__dates { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; font-size: 0.95em; }

.dgl-pub__when .dgl-pub__note { margin-top: 10px; }

.dgl-pub__pin--off { background: var(--dgl-danger); }

.dgl-pub__passed--off { border-left: 4px solid var(--dgl-danger); }

.dgl-pub__passed--off strong { display: block; }

.dgl-pub__date--off { color: var(--dgl-text-muted); text-decoration: line-through; }

.dgl-pub__offtag,
.dgl-cal__tag.dgl-cal__tag--off {
	display: inline-block;
	padding: 1px 8px;
	border-radius: 999px;
	background: var(--dgl-danger);
	border-color: var(--dgl-danger);
	color: var(--dgl-white);
	font-size: 0.74em;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	text-decoration: none;
}

.dgl-pub__date--off .dgl-pub__offtag { text-decoration: none; }

.dgl-cal__row--off .dgl-cal__title,
.dgl-cal__row--off .dgl-cal__time { text-decoration: line-through; color: var(--dgl-text-muted); }

.dgl-pub__addcal {
	margin: 0 0 var(--dgl-gap-lg);
	font-size: 0.95em;
}

.dgl-pub__addcal a { font-weight: 600; color: var(--dgl-link); }

.dgl-pub__addcal-note { display: block; margin-top: 2px; color: var(--dgl-text-muted); }

.dgl-cal__subscribe {
	margin: calc(-1 * var(--dgl-gap)) 0 var(--dgl-gap-lg);
	font-size: 0.9em;
}

.dgl-cal__subscribe a { font-weight: 600; color: var(--dgl-link); }

.dgl-cal__subscribe span { display: block; margin-top: 2px; color: var(--dgl-text-muted); }

.dgl-pub__callink { display: inline-block; margin-left: 8px; color: var(--dgl-link); font-weight: 500; }

/* ---- Calendar ---------------------------------------------------------- */

.dgl-cal__nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0 0 var(--dgl-gap-lg);
	padding: 12px var(--dgl-gap);
	background: var(--dgl-white);
	border: 1px solid var(--dgl-border);
	border-radius: var(--dgl-radius-card);
	box-shadow: var(--dgl-shadow-rest);
	font-size: 0.9em;
}

.dgl-cal__months { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; flex: 1 1 auto; }

.dgl-cal__monthslabel { color: var(--dgl-text-muted); font-weight: 600; font-size: 0.85em; text-transform: uppercase; letter-spacing: 0.03em; }

.dgl-cal__navlink {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 0 12px;
	border: var(--dgl-field-border) solid var(--dgl-field-outline);
	border-radius: var(--dgl-radius-button);
	color: var(--dgl-link);
	font-weight: var(--dgl-weight-button);
	text-decoration: none;
}

.dgl-cal__navlink:hover, .dgl-cal__navlink:focus { background: var(--dgl-surface); }

.dgl-cal__month {
	margin: var(--dgl-gap-lg) 0 var(--dgl-gap);
	font-size: 1.3rem;
	font-weight: var(--dgl-weight-heading);
	color: var(--dgl-navy);
}

.dgl-cal__day { margin: 0 0 var(--dgl-gap); }

.dgl-cal__date {
	margin: 0 0 6px;
	font-size: 0.82em;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: var(--dgl-text-muted);
}

.dgl-cal__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.dgl-cal__row {
	display: grid;
	grid-template-columns: 8.75rem minmax(0, 1fr) auto;
	gap: 4px var(--dgl-gap);
	align-items: baseline;
	padding: 12px var(--dgl-gap);
	background: var(--dgl-white);
	border: 1px solid var(--dgl-border);
	border-radius: var(--dgl-radius-field);
}

.dgl-cal__time { font-weight: 600; color: var(--dgl-navy); white-space: nowrap; }

.dgl-cal__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.dgl-cal__title { color: var(--dgl-navy); font-weight: 600; text-decoration: none; }

.dgl-cal__title:hover, .dgl-cal__title:focus { text-decoration: underline; }

.dgl-cal__where { font-size: 0.85em; color: var(--dgl-text-muted); }

.dgl-cal__tag {
	padding: 3px 9px;
	border-radius: 999px;
	background: var(--dgl-surface);
	border: 1px solid var(--dgl-border);
	font-size: 0.74em;
	font-weight: 600;
	color: var(--dgl-navy);
	white-space: nowrap;
}

@media ( max-width: 560px ) {
	.dgl-cal__row { grid-template-columns: minmax(0, 1fr) auto; }
	.dgl-cal__time { grid-column: 1 / -1; }
}

/* ---- Load more on scroll ------------------------------------------------
 *
 * The pager stays in the markup for anybody without JavaScript. With it, the
 * script hides a pager marked "hide" and adds one button that scrolling
 * presses on the reader's behalf. */

.dgl-js [data-dgl-pager="hide"] { display: none; }

.dgl-more { margin-top: var(--dgl-gap-lg); text-align: center; }

.dgl-more__sentinel { height: 1px; }

.dgl-more__button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 20px;
	border: var(--dgl-field-border) solid var(--dgl-field-outline);
	border-radius: var(--dgl-radius-button);
	background: var(--dgl-white);
	color: var(--dgl-link);
	font: inherit;
	font-weight: var(--dgl-weight-button);
	cursor: pointer;
}

.dgl-more__button:hover,
.dgl-more__button:focus { background: var(--dgl-surface); }

.dgl-more__button[disabled] { cursor: progress; opacity: 0.7; }

.dgl-more__status { margin: 10px 0 0; color: var(--dgl-text-muted); font-size: 0.9em; }

.dgl-more__status:empty { display: none; }

/* ---- Phones and touch ---------------------------------------------------
 *
 * Read on a phone as often as at a desk. Everything pressable is at least
 * 44px tall there; list and calendar titles take the whole row; the
 * directory's four filters fold behind one button so the search box and
 * the first results share the first screen. */

.dgl-dir__filters { display: contents; }

.dgl-pub .dgl-dir__toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 18px;
	border: var(--dgl-field-border) solid var(--dgl-field-outline);
	border-radius: var(--dgl-radius-button);
	background: var(--dgl-white);
	color: var(--dgl-link);
	font: inherit;
	font-weight: var(--dgl-weight-button);
	cursor: pointer;
}

.dgl-pub .dgl-dir__toggle[aria-expanded="true"] { background: var(--dgl-surface); }

.dgl-pub .dgl-dir__toggle[hidden] { display: none; }

@media ( max-width: 560px ) {
	.dgl-dir__filters { display: grid; gap: 12px; }
	.dgl-dir__filters[hidden] { display: none; }
	.dgl-pub__filters { grid-template-columns: minmax(0, 1fr); margin-top: 12px; }
	.dgl-pub__filters[hidden] { display: none; }
	.dgl-pub__filterbar .dgl-dir__toggle { width: 100%; }
}

@media (pointer: coarse), (max-width: 782px) {
	.dgl-pub__rowtitle a { display: block; padding: 8px 0; margin: -8px 0; }
	.dgl-cal__title { display: flex; align-items: center; min-height: 44px; }
	.dgl-cal__navlink { min-height: 44px; }
	.dgl-pub__callink,
	.dgl-pub__note a,
	.dgl-dir__clear,
	.dgl-pub__facts a,
	.dgl-org__list a,
	.dgl-org__contact a { display: inline-block; padding: 10px 0; }
}

/* ---- Search results ------------------------------------------------------ */

/*
 * One section per kind of thing, in a fixed order, each with its count and a
 * "See all" when the overview holds back. Rows and organisation cards are the
 * same partials the lists and the directory use, so a result looks like the
 * thing it links to.
 */
.dgl-search__form {
	display: flex;
	gap: 8px;
	max-width: 640px;
	margin: 12px 0 8px;
}

.dgl-search__input {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 44px;
	padding: 8px 14px;
	font: inherit;
	color: var(--dgl-text);
	background: var(--dgl-white);
	border: var(--dgl-field-border) solid var(--dgl-field-outline);
	border-radius: var(--dgl-radius-field, 10px);
}

.dgl-search__input:focus { outline: 3px solid var(--dgl-focus); outline-offset: 2px; }

.dgl-search__go {
	flex: none;
	min-height: 44px;
	padding: 8px 18px;
	font: inherit;
	font-weight: 600;
	color: var(--dgl-white);
	background: var(--dgl-navy);
	border: 0;
	border-radius: 10px;
	cursor: pointer;
}

.dgl-search__go:hover { background: var(--dgl-navy-deep, var(--dgl-navy)); }

.dgl-search__go:focus-visible { outline: 3px solid var(--dgl-focus); outline-offset: 2px; }

.dgl-search__group { margin-top: 36px; }

.dgl-search__grouphead {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--dgl-border);
}

.dgl-search__grouphead .dgl-listing__heading { margin: 0; }

.dgl-search__count {
	margin-left: 8px;
	font-size: 0.85em;
	font-weight: 600;
	color: var(--dgl-text-muted, var(--dgl-text));
}

.dgl-search__more { white-space: nowrap; font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 3px; }

.dgl-search__orgs { margin-top: 16px; }

.dgl-search__back { margin: 4px 0 0; }

.dgl-search__empty { margin-top: 20px; max-width: 60ch; }

.dgl-search__browse {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 18px;
	margin: 8px 0 0;
	padding: 0;
	list-style: none;
}

.dgl-search__browse a { font-weight: 600; }

@media ( max-width: 560px ) {
	.dgl-search__form { flex-direction: column; }
	.dgl-search__grouphead { flex-direction: column; align-items: flex-start; gap: 4px; }
}
