.lspd-directory {
	--lspd-accent: #079da5;
	--lspd-accent-dark: #062e64;
	--lspd-border: #d9e0ea;
	--lspd-muted: #5d6878;
	--lspd-surface: #ffffff;
	--lspd-soft: #f5f7fa;
	--lspd-text: #1d2733;
	box-sizing: border-box;
	color: var(--lspd-text);
	font-size: 1rem;
	line-height: 1.6;
	margin: 1.5rem auto;
	max-width: 1280px;
	padding-inline: clamp(0rem, 1.5vw, 0.75rem);
	width: 100%;
}

.lspd-directory *,
.lspd-directory *::before,
.lspd-directory *::after {
	box-sizing: inherit;
}

.lspd-directory a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.lspd-directory a:focus-visible,
.lspd-directory button:focus-visible,
.lspd-directory input:focus-visible {
	outline: 3px solid currentColor;
	outline-offset: 3px;
}

.lspd-directory-header {
	align-items: flex-end;
	display: flex;
	gap: 1.5rem;
	justify-content: space-between;
	margin-bottom: 1rem;
}

.lspd-directory-header h2,
.lspd-profile h2,
.lspd-private-notice h2,
.lspd-profile-not-found h2 {
	color: var(--lspd-text);
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	line-height: 1.15;
	margin: 0;
}

.lspd-order-summary,
.lspd-search-summary {
	color: var(--lspd-muted);
	margin: 0.3rem 0 0;
}

.lspd-search-summary {
	font-weight: 600;
}

.lspd-search {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: flex-end;
}

.lspd-search input[type="search"] {
	background: var(--lspd-surface);
	border: 1px solid var(--lspd-border);
	border-radius: 0.45rem;
	color: var(--lspd-text);
	font: inherit;
	min-height: 2.75rem;
	min-width: min(20rem, 70vw);
	padding: 0.55rem 0.75rem;
}

.lspd-search button,
.lspd-button {
	align-items: center;
	background: var(--lspd-accent);
	border: 1px solid var(--lspd-accent);
	border-radius: 0.45rem;
	color: #ffffff;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	justify-content: center;
	line-height: 1.2;
	min-height: 2.75rem;
	padding: 0.65rem 1rem;
	text-decoration: none;
}

.lspd-search button:hover,
.lspd-button:hover {
	background: var(--lspd-accent-dark);
	border-color: var(--lspd-accent-dark);
	color: #ffffff;
}

.lspd-button--secondary {
	background: transparent;
	color: var(--lspd-accent);
}

.lspd-button--secondary:hover {
	background: var(--lspd-soft);
	color: var(--lspd-accent-dark);
}

.lspd-clear-search {
	color: var(--lspd-accent-dark);
	font-weight: 600;
	padding: 0.4rem;
}

.lspd-alphabet {
	align-items: center;
	background: var(--lspd-soft);
	border: 1px solid var(--lspd-border);
	border-radius: 0.75rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.3rem;
	justify-content: center;
	margin: 0 0 1.75rem;
	padding: 0.65rem;
}

.lspd-alphabet__item {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 0.35rem;
	color: var(--lspd-accent-dark);
	display: inline-flex;
	font-size: 0.9rem;
	font-weight: 700;
	justify-content: center;
	line-height: 1;
	min-height: 2rem;
	min-width: 2rem;
	padding: 0.35rem;
	text-decoration: none;
}

.lspd-alphabet__item:hover,
.lspd-alphabet__item:focus {
	background: var(--lspd-surface);
	border-color: var(--lspd-border);
	color: var(--lspd-accent-dark);
}

.lspd-alphabet__item.is-active {
	background: var(--lspd-accent);
	border-color: var(--lspd-accent);
	color: #ffffff;
}

.lspd-alphabet__item.is-disabled {
	color: var(--lspd-muted);
	cursor: default;
	opacity: 0.42;
}

.lspd-alphabet__all {
	min-width: 3rem;
}

.lspd-letter-groups {
	display: grid;
	gap: 2.25rem;
}

.lspd-letter-section,
.lspd-directory-cards {
	container-name: lspd-cards;
	container-type: inline-size;
	min-width: 0;
}

.lspd-letter-section {
	scroll-margin-top: 2rem;
}

.lspd-letter-heading {
	align-items: center;
	color: var(--lspd-accent-dark);
	display: flex;
	font-size: clamp(1.55rem, 2.5vw, 2rem);
	font-weight: 800;
	gap: 0.8rem;
	line-height: 1;
	margin: 0 0 1rem;
}

.lspd-letter-heading::after {
	background: var(--lspd-border);
	content: "";
	flex: 1 1 auto;
	height: 1px;
}

.lspd-letter-heading span {
	align-items: center;
	background: var(--lspd-accent);
	border-radius: 999px;
	color: #ffffff;
	display: inline-flex;
	height: 2.35rem;
	justify-content: center;
	min-width: 2.35rem;
	padding: 0.25rem;
}

.lspd-directory.lspd-layout-horizontal .lspd-grid {
	align-items: stretch;
	display: grid;
	gap: 1.25rem;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	min-width: 0;
	width: 100%;
}

.lspd-directory.lspd-layout-horizontal .lspd-card {
	align-items: start;
	background: var(--lspd-surface);
	border: 1px solid var(--lspd-border);
	border-radius: 0.85rem;
	box-shadow: 0 0.35rem 1.2rem rgba(28, 45, 70, 0.07);
	display: grid;
	gap: 1rem;
	grid-template-columns: 132px minmax(0, 1fr);
	height: 100%;
	max-width: 100%;
	min-height: 166px;
	min-width: 0;
	overflow: hidden;
	width: 100%;
	padding: 1rem;
	transition: box-shadow 160ms ease, transform 160ms ease;
}

.lspd-directory.lspd-layout-horizontal .lspd-card:hover,
.lspd-directory.lspd-layout-horizontal .lspd-card:focus-within {
	box-shadow: 0 0.55rem 1.6rem rgba(28, 45, 70, 0.13);
	transform: translateY(-2px);
}

.lspd-directory.lspd-layout-horizontal .lspd-card__photo-link {
	align-self: start;
	color: inherit;
	display: block;
	min-width: 0;
	text-decoration: none;
	width: 132px;
}

.lspd-card__photo {
	aspect-ratio: 1 / 1;
	background: var(--lspd-soft);
	border-radius: 0.65rem;
	overflow: hidden;
	width: 100%;
}

.lspd-photo {
	display: block;
	height: 100%;
	max-width: none;
	object-fit: cover;
	width: 100%;
}

.lspd-photo-placeholder {
	align-items: center;
	background: linear-gradient(145deg, #e8eef7, #d9e4f4);
	color: var(--lspd-accent-dark);
	display: flex;
	font-size: clamp(2rem, 5vw, 3rem);
	font-weight: 800;
	height: 100%;
	justify-content: center;
	letter-spacing: 0.04em;
	width: 100%;
}

.lspd-card__body {
	display: flex;
	flex-direction: column;
	min-height: 132px;
	min-width: 0;
	padding: 0.05rem 0;
	text-align: left;
}

.lspd-card__body h4 {
	color: var(--lspd-text);
	font-size: 1.2rem;
	line-height: 1.25;
	margin: 0;
	overflow-wrap: anywhere;
}

.lspd-card__name-link {
	color: inherit;
	text-decoration: none;
}

.lspd-card__name-link:hover,
.lspd-card__name-link:focus {
	color: var(--lspd-accent-dark);
	text-decoration: underline;
}

.lspd-card__role {
	color: var(--lspd-muted);
	font-size: 0.94rem;
	line-height: 1.35;
	margin: 0.22rem 0 0;
	overflow-wrap: anywhere;
}

.lspd-card__contact {
	border-top: 1px solid var(--lspd-border);
	display: grid;
	font-size: 0.88rem;
	gap: 0.45rem;
	margin: 0.7rem 0 0;
	max-width: 100%;
	min-width: 0;
	padding-top: 0.65rem;
	text-align: left;
}

.lspd-card__contact-item {
	align-items: start;
	display: grid;
	gap: 0.5rem;
	grid-template-columns: 3.5rem minmax(0, 1fr);
	line-height: 1.3;
	max-width: 100%;
	min-width: 0;
}

.lspd-card__contact-label {
	color: var(--lspd-muted);
	font-size: 0.72rem;
	font-weight: 800;
	letter-spacing: 0.035em;
	padding-top: 0.1rem;
	text-transform: uppercase;
}

.lspd-card__contact-value {
	color: var(--lspd-accent-dark);
	display: block;
	max-width: 100%;
	min-width: 0;
	overflow-wrap: anywhere;
	white-space: normal;
	word-break: break-word;
}

.lspd-card__view {
	align-self: flex-start;
	color: var(--lspd-accent);
	display: inline-block;
	font-size: 0.88rem;
	font-weight: 700;
	margin-top: auto;
	padding-top: 0.75rem;
}

.lspd-card__view::after {
	content: " \2192";
}

.lspd-empty,
.lspd-private-notice,
.lspd-profile-not-found {
	background: var(--lspd-soft);
	border: 1px solid var(--lspd-border);
	border-radius: 0.8rem;
	padding: clamp(1.25rem, 4vw, 2.5rem);
	text-align: center;
}

.lspd-empty h3 {
	font-size: 1.35rem;
	margin: 0;
}

.lspd-empty p:last-child,
.lspd-private-notice p:last-child,
.lspd-profile-not-found p:last-child {
	margin-bottom: 0;
}

.lspd-pagination {
	margin-top: 2rem;
}

.lspd-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.lspd-pagination a,
.lspd-pagination span {
	align-items: center;
	border: 1px solid var(--lspd-border);
	border-radius: 0.35rem;
	display: inline-flex;
	justify-content: center;
	min-height: 2.5rem;
	min-width: 2.5rem;
	padding: 0.35rem 0.7rem;
	text-decoration: none;
}

.lspd-pagination .current {
	background: var(--lspd-accent);
	border-color: var(--lspd-accent);
	color: #ffffff;
	font-weight: 700;
}

.lspd-back-link {
	margin: 0 0 1rem;
}

.lspd-back-link a {
	color: var(--lspd-accent-dark);
	font-weight: 700;
}

.lspd-profile {
	background: var(--lspd-surface);
	border: 1px solid var(--lspd-border);
	border-radius: 0.9rem;
	display: grid;
	gap: clamp(1.25rem, 4vw, 2.5rem);
	grid-template-columns: minmax(220px, 32%) minmax(0, 1fr);
	overflow: hidden;
	padding: clamp(1rem, 3vw, 2rem);
}

.lspd-profile__photo {
	align-self: start;
	aspect-ratio: 1 / 1;
	background: var(--lspd-soft);
	border-radius: 0.7rem;
	overflow: hidden;
}

.lspd-profile__header {
	border-bottom: 1px solid var(--lspd-border);
	margin-bottom: 1.25rem;
	padding-bottom: 1rem;
}

.lspd-profile__role {
	color: var(--lspd-muted);
	font-size: 1.12rem;
	margin: 0.4rem 0 0;
}

.lspd-contact-list {
	display: grid;
	gap: 0;
	margin: 0;
}

.lspd-contact-list__item {
	border-bottom: 1px solid var(--lspd-border);
	display: grid;
	gap: 0.75rem;
	grid-template-columns: minmax(5.5rem, 7rem) minmax(0, 1fr);
	padding: 0.8rem 0;
}

.lspd-contact-list__item dt {
	font-weight: 700;
}

.lspd-contact-list__item dd {
	margin: 0;
	overflow-wrap: anywhere;
}

.lspd-contact-list__item a {
	color: var(--lspd-accent-dark);
}

.lspd-profile__bio {
	margin-top: 1.5rem;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.lspd-profile__bio img,
.lspd-profile__bio video,
.lspd-profile__bio iframe {
	height: auto;
	max-width: 100%;
}

.lspd-profile__bio pre {
	max-width: 100%;
	overflow-x: auto;
	white-space: pre-wrap;
}

.lspd-profile__bio table {
	display: block;
	max-width: 100%;
	overflow-x: auto;
}

.lspd-profile__bio > :first-child {
	margin-top: 0;
}

.lspd-profile__bio > :last-child {
	margin-bottom: 0;
}

/*
 * Preserve the two-column directory on desktop even when a theme uses a
 * narrower page container. Cards become more compact as the available content
 * width decreases. The grid changes to one column only on smaller viewports.
 */
@container lspd-cards (max-width: 920px) {
	.lspd-directory.lspd-layout-horizontal .lspd-card {
		gap: 0.8rem;
		grid-template-columns: 108px minmax(0, 1fr);
		min-height: 142px;
		padding: 0.85rem;
	}

	.lspd-directory.lspd-layout-horizontal .lspd-card__photo-link {
		width: 108px;
	}

	.lspd-directory .lspd-card__body {
		min-height: 108px;
	}

	.lspd-directory .lspd-card__contact-item {
		gap: 0.35rem;
		grid-template-columns: 3rem minmax(0, 1fr);
	}
}

@container lspd-cards (max-width: 700px) {
	.lspd-directory.lspd-layout-horizontal .lspd-card {
		gap: 0.65rem;
		grid-template-columns: 84px minmax(0, 1fr);
		min-height: 116px;
		padding: 0.7rem;
	}

	.lspd-directory.lspd-layout-horizontal .lspd-card__photo-link {
		width: 84px;
	}

	.lspd-directory .lspd-card__body {
		min-height: 84px;
	}

	.lspd-directory .lspd-card__body h4 {
		font-size: 1.05rem;
	}

	.lspd-directory .lspd-card__role {
		font-size: 0.86rem;
	}

	.lspd-directory .lspd-card__contact {
		font-size: 0.82rem;
		gap: 0.35rem;
		margin-top: 0.55rem;
		padding-top: 0.5rem;
	}

	.lspd-directory .lspd-card__contact-item {
		gap: 0.05rem;
		grid-template-columns: minmax(0, 1fr);
	}

	.lspd-directory .lspd-card__contact-label {
		font-size: 0.66rem;
	}
}

/* Viewport fallback for browsers without container-query support. */
@media (min-width: 761px) and (max-width: 1000px) {
	.lspd-directory.lspd-layout-horizontal .lspd-card {
		gap: 0.8rem;
		grid-template-columns: 108px minmax(0, 1fr);
		min-height: 142px;
		padding: 0.85rem;
	}

	.lspd-directory.lspd-layout-horizontal .lspd-card__photo-link {
		width: 108px;
	}

	.lspd-directory .lspd-card__body {
		min-height: 108px;
	}

	.lspd-directory .lspd-card__contact-item {
		gap: 0.35rem;
		grid-template-columns: 3rem minmax(0, 1fr);
	}
}

@media (max-width: 760px) {
	.lspd-directory.lspd-layout-horizontal .lspd-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

@media (max-width: 680px) {
	.lspd-directory-header {
		align-items: stretch;
		flex-direction: column;
	}

	.lspd-search {
		justify-content: flex-start;
	}

	.lspd-search input[type="search"] {
		flex: 1 1 12rem;
		min-width: 0;
	}

	.lspd-alphabet {
		justify-content: flex-start;
	}

	.lspd-alphabet__item {
		min-height: 2.15rem;
		min-width: 2.15rem;
	}

	.lspd-directory.lspd-layout-horizontal .lspd-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.lspd-directory.lspd-layout-horizontal .lspd-card {
		gap: 0.9rem;
		grid-template-columns: 1fr;
		min-height: 0;
	}

	.lspd-directory.lspd-layout-horizontal .lspd-card__photo-link {
		justify-self: center;
		width: min(10.5rem, 70vw);
	}

	.lspd-card__body {
		min-height: 0;
		width: 100%;
	}

	.lspd-profile {
		grid-template-columns: 1fr;
	}

	.lspd-profile__photo {
		max-width: 26rem;
		width: 100%;
	}

	.lspd-contact-list__item {
		gap: 0.2rem;
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.lspd-card__contact-item {
		gap: 0.1rem;
		grid-template-columns: 1fr;
	}
}
