/* ABOUTME: Styles for the [pslp_school_explorer] shortcode redesign. */
/* ABOUTME: Region picker first-step UX, bold colorful cards, generous modal profile layout. */

/* ================================================================
   Container
   ================================================================ */

.pslp-explorer {
	width: 100%;
	max-width: none;
	margin: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ================================================================
   Focus ring (shared tokens, CONTRACTS §1)
   White / dark / white: outline paints over the box-shadow, so the ring
   stays visible on white panels, brand-color buttons and gray trays alike.
   ================================================================ */

.pslp-explorer__picker-heading:focus-visible,
.pslp-explorer__results-title:focus-visible,
.pslp-explorer__picker-btn:focus-visible,
.pslp-explorer__tab:focus-visible,
.pslp-explorer__close:focus-visible,
.pslp-explorer__detail-cta:focus-visible,
.pslp-explorer__detail-link:focus-visible,
.pslp-explorer__detail-contact-email:focus-visible {
	outline: var(--pl-focus-ring-width, 3px) solid var(--pl-focus-ring-dark, #0B2B1E);
	outline-offset: var(--pl-focus-ring-offset, 2px);
	box-shadow: 0 0 0 calc(var(--pl-focus-ring-offset, 2px) + var(--pl-focus-ring-width, 3px) + 2px) var(--pl-focus-ring-light, #FFFFFF);
}

@media (forced-colors: active) {
	.pslp-explorer__picker-heading:focus-visible,
	.pslp-explorer__results-title:focus-visible,
	.pslp-explorer__picker-btn:focus-visible,
	.pslp-explorer__tab:focus-visible,
	.pslp-explorer__close:focus-visible,
	.pslp-explorer__detail-cta:focus-visible,
	.pslp-explorer__detail-link:focus-visible,
	.pslp-explorer__detail-contact-email:focus-visible {
		outline: 3px solid CanvasText;
		box-shadow: none;
	}
}

/* ================================================================
   Region Picker (first-step gate)
   ================================================================ */

.pslp-explorer__region-picker {
	text-align: left;
	padding: 3rem 0;
}

.pslp-explorer__picker-heading {
	font-size: 1.75rem;
	font-weight: 700;
	color: var(--pslp-green, #003c00);
	margin: 0 0 0.5rem;
	line-height: 1.3;
}

.pslp-explorer__picker-subtext {
	font-size: 1.05rem;
	color: #4b5563;
	margin: 0 0 2.5rem;
}

.pslp-explorer__picker-options {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.25rem;
	width: 100%;
}

.pslp-explorer__picker-btn {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 2rem 1.5rem;
	border: 2px solid #e5e7eb;
	border-radius: 1rem;
	background: #fff;
	cursor: pointer;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.pslp-explorer__picker-btn:hover,
.pslp-explorer__picker-btn:focus-visible {
	border-color: var(--pslp-teal, #096789);
	box-shadow: 0 8px 24px rgba(9, 103, 137, 0.12);
	transform: translateY(-3px);
	background: #f0f9fc;
}

/* Keep the lift shadow under the shared focus ring's white halo. */
.pslp-explorer__picker-btn:focus-visible {
	box-shadow:
		0 0 0 calc(var(--pl-focus-ring-offset, 2px) + var(--pl-focus-ring-width, 3px) + 2px) var(--pl-focus-ring-light, #FFFFFF),
		0 8px 24px rgba(9, 103, 137, 0.12);
}

.pslp-explorer__picker-btn-name {
	font-size: 1.1rem;
	font-weight: 700;
	color: #1f2937;
}

.pslp-explorer__picker-btn-count {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--pslp-teal, #096789);
	background: #e3f1f7;
	padding: 0.25em 0.75em;
	border-radius: 999px;
}

/* Hide picker when results are shown */
.pslp-explorer[data-state="browsing"] .pslp-explorer__region-picker {
	display: none;
}

/* ================================================================
   Results Header
   ================================================================ */

.pslp-explorer__results[hidden] {
	display: none;
}

.pslp-explorer__results-header {
	margin-bottom: 1.5rem;
}

.pslp-explorer__results-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--pslp-green, #003c00);
	margin: 0;
	line-height: 1.3;
}

/* ================================================================
   Region Toggle Buttons (secondary switcher once inside results)
   Plain buttons with aria-pressed; the "tab" class names are historical.
   ================================================================ */

.pslp-explorer__tabs {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0.5rem;
	margin-bottom: 2rem;
	padding: 0.35rem;
	background: #f4f5f7;
	border-radius: 0.75rem;
}

.pslp-explorer__tab {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	min-width: 0;
	width: 100%;
	padding: 0.625rem 0.75rem;
	border: none;
	border-radius: 0.5rem;
	background: transparent;
	color: #4b5563;
	font-size: 0.9rem;
	font-weight: 500;
	cursor: pointer;
	font-family: inherit;
	transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
	line-height: 1.35;
}

.pslp-explorer__tab:hover {
	background: rgba(255, 255, 255, 0.7);
	color: #1f2937;
}

.pslp-explorer__tab--active {
	background: #fff;
	color: var(--pslp-teal, #096789);
	font-weight: 600;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* Pressed state needs more than a white-on-gray fill (1.09:1): a bar with ≥3:1 on both. */
.pslp-explorer__tab--active::after {
	content: "";
	position: absolute;
	right: 0.75rem;
	bottom: 0;
	left: 0.75rem;
	height: 3px;
	border-radius: 3px 3px 0 0;
	background: var(--pslp-teal, #096789);
}

@media (forced-colors: active) {
	.pslp-explorer__tab--active::after {
		forced-color-adjust: none;
		background: Highlight;
	}
}

.pslp-explorer__tab-count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 1.5rem;
	height: 1.5rem;
	padding: 0 0.375rem;
	font-size: 0.75rem;
	font-weight: 600;
	border-radius: 999px;
	background: #e5e7eb;
	color: #4b5563;
}

.pslp-explorer__tab--active .pslp-explorer__tab-count {
	background: var(--pslp-teal, #096789);
	color: #fff;
}

/* ================================================================
   Region Groups
   ================================================================ */

.pslp-explorer__region {
	margin-bottom: 2.5rem;
}

.pslp-explorer__region[hidden] {
	display: none;
}

/* ================================================================
   Card Grid - 3 / 2 / 1 columns (slightly larger cards)
   ================================================================ */

.pslp-explorer__grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 1.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (max-width: 900px) {
	.pslp-explorer__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.pslp-explorer__grid {
		grid-template-columns: 1fr;
	}
}

/* ================================================================
   School Card (list item) - bold brand color treatment
   The name is an h3 holding the only control, a <button>; its ::after
   stretches over the card so the whole card stays clickable.
   ================================================================ */

.pslp-explorer__card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	margin: 0;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	padding: 0;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	font-size: inherit;
	line-height: normal; /* What the card had as a <button>; the section's 1.65 would add height. */
	color: inherit;
	transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
	overflow: hidden;
}

.pslp-explorer__card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
	transform: translateY(-3px);
	border-color: var(--pslp-school-accent, var(--pslp-teal, #096789));
}

/* Focus: same lift, plus the ring on the whole card (an outline sits outside the card, so
   overflow: hidden cannot clip it). Kept apart from :hover so browsers without :has() keep hover. */
.pslp-explorer__card:has(.pslp-explorer__card-button:focus-visible) {
	transform: translateY(-3px);
	border-color: var(--pslp-school-accent, var(--pslp-teal, #096789));
	outline: var(--pl-focus-ring-width, 3px) solid var(--pl-focus-ring-dark, #0B2B1E);
	outline-offset: var(--pl-focus-ring-offset, 2px);
	box-shadow:
		0 0 0 calc(var(--pl-focus-ring-offset, 2px) + var(--pl-focus-ring-width, 3px) + 2px) var(--pl-focus-ring-light, #FFFFFF),
		0 8px 24px rgba(0, 0, 0, 0.1);
}

@media (forced-colors: active) {
	.pslp-explorer__card:has(.pslp-explorer__card-button:focus-visible) {
		outline: 3px solid CanvasText;
	}
}

.pslp-explorer__card-button {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-align: inherit;
	text-transform: inherit;
	cursor: pointer;
}

.pslp-explorer__card-button::after {
	content: "";
	position: absolute;
	inset: 0;
}

.pslp-explorer__card-button:focus-visible {
	outline: none; /* The ring is drawn on the card (above). */
}

/* Without :has() support, ring the button text itself instead. */
@supports not selector(:has(*)) {
	.pslp-explorer__card-button:focus-visible {
		outline: var(--pl-focus-ring-width, 3px) solid var(--pl-focus-ring-dark, #0B2B1E);
		outline-offset: var(--pl-focus-ring-offset, 2px);
	}
}

/* Bold colored header strip on cards with brand color */
.pslp-explorer__card-header {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100px;
	padding: 1.25rem 1rem;
	background: #f8f9fa;
	border-bottom: 1px solid #e5e7eb;
}

.pslp-explorer__card--has-accent .pslp-explorer__card-header {
	background: var(--pslp-school-accent);
	border-bottom-color: var(--pslp-school-accent);
}

/* Card: logo area */
.pslp-explorer__card-logo {
	display: flex;
	align-items: center;
	justify-content: center;
}

.pslp-explorer__card-logo-img {
	max-height: 64px;
	max-width: 100%;
	width: auto;
	object-fit: contain;
}

.pslp-explorer__card--has-accent .pslp-explorer__card-logo-img {
	filter: brightness(0) invert(1);
}

/* Min sizes in rem: at 200% text-only zoom the circle grows into a pill instead of clipping the
   initials. The 0.85 white is mirrored in PHP when picking a readable initials color. */
.pslp-explorer__card-logo--placeholder {
	min-width: 3.5rem;
	min-height: 3.5rem;
	/* Horizontal padding lets long initials (NCCU, JCSU) widen the circle into a pill instead of
	   running past its curved edge onto the brand-colored header (text there fell to 2:1). */
	padding-inline: 0.625rem;
	box-sizing: border-box;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.85);
	display: flex;
	align-items: center;
	justify-content: center;
}

.pslp-explorer__card-initials {
	font-size: 1.1rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
	color: #4b5563;
	letter-spacing: 0.05em;
}

/* Brand color, darkened in PHP where needed to reach 4.5:1 on the circle. */
.pslp-explorer__card--has-accent .pslp-explorer__card-initials {
	color: var(--pslp-school-accent-text, var(--pslp-school-accent));
}

/* Card: body */
.pslp-explorer__card-body {
	padding: 1rem 1.25rem 1.25rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.pslp-explorer__card-name {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
	color: #1f2937;
}

/* Card names moved from h4 to h3 (under the region h2). Inside a Plumbline section the theme
   styles content headings, so pin the type it gave the old h4; (0,3,0) outranks its (0,2,1) rules. */
.pslp-explorer .pslp-explorer__card .pslp-explorer__card-name {
	font-size: var(--pl-text-xl, 1rem);
	line-height: 1.35;
	margin: var(--pl-space-4, 0) 0 var(--pl-space-2, 0);
}

.pslp-explorer__card-badges {
	display: flex;
	gap: 0.375rem;
	flex-wrap: wrap;
}

.pslp-explorer__card-meta {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
	margin-top: auto;
	padding-top: 0.5rem;
}

.pslp-explorer__card-city {
	font-size: 0.825rem;
	color: #4b5563;
	font-weight: 500;
}

.pslp-explorer__card-modalities {
	font-size: 0.775rem;
	color: #6b7280;
}

/* ================================================================
   Shared Badges (card + detail)
   ================================================================ */

.pslp-explorer__badge {
	display: inline-block;
	padding: 0.2em 0.6em;
	font-size: 0.7rem;
	font-weight: 700;
	border-radius: 0.25rem;
	line-height: 1.5;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.pslp-explorer__badge--bsw {
	background: #e3f1f7;
	color: #096789;
}

.pslp-explorer__badge--msw {
	background: #f0eaf4;
	color: #55376b;
}

.pslp-explorer__badge--jmsw {
	background: #fef3e2;
	color: #9a3412;
}

/* ================================================================
   Card Grid Entrance Animation
   ================================================================ */

.pslp-explorer__region {
	animation: pslpFadeUp 0.35s ease both;
}

@keyframes pslpFadeUp {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ================================================================
   Modal Overlay
   ================================================================ */

/* JS moves the dialog to <body>, outside .pslp-explorer and the page section, so it restates
   the type it used to inherit there. */
.pslp-explorer__modal {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--pl-color-text-primary, #1f2937);
	text-align: left;
}

.pslp-explorer__modal[hidden] {
	display: none;
}

.pslp-explorer__modal--entering,
.pslp-explorer__modal--leaving {
	display: flex !important;
}

/* Backdrop */
.pslp-explorer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.pslp-explorer__modal--open .pslp-explorer__backdrop {
	opacity: 1;
}

/* Panel: the scroll container. dvh (with a vh fallback) tracks the visible viewport on mobile and
   at 400% zoom, so the bottom of long profiles is never cut off. */
.pslp-explorer__panel {
	position: relative;
	background: #fff;
	border-radius: 1rem;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
	max-width: 720px;
	width: 100%;
	max-height: calc(100vh - 4rem);
	max-height: calc(100dvh - 4rem);
	overflow-y: auto;
	overscroll-behavior: contain;
	/* Focus scrolling stops below the sticky close button, so it never hides a focused link. */
	scroll-padding-top: 3.75rem;
	transform: translateY(20px) scale(0.97);
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.25s ease;
	padding-top: 0.5rem;
}

.pslp-explorer__modal--open .pslp-explorer__panel {
	transform: translateY(0) scale(1);
	opacity: 1;
}

/* Close button: sticky, so it stays in view while the profile scrolls. The negative bottom
   margin lets the content start underneath it, exactly where it did when this was absolute. */
.pslp-explorer__close {
	position: sticky;
	top: 0.5rem;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: 0.5rem 1rem calc(-2.75rem - 0.5rem) auto;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: #f4f5f7;
	color: #4b5563;
	font-size: 1.35rem;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
	line-height: 1;
}

.pslp-explorer__close:hover,
.pslp-explorer__close:focus-visible {
	background: #e5e7eb;
	color: #1f2937;
}

/* ================================================================
   Detail Content (inside the modal panel) - generous layout
   ================================================================ */

.pslp-explorer__detail-content {
	padding: 0 2.5rem 2.5rem;
}

/* Header with accent bar */
.pslp-explorer__detail-header {
	padding: 1.5rem 0 2rem;
	margin-bottom: 2rem;
	border-bottom: 3px solid var(--pslp-school-accent, var(--pslp-teal, #096789));
}

/* Right padding keeps long names from running under the close button. */
.pslp-explorer__detail-header-inner {
	display: flex;
	align-items: center;
	gap: 1.5rem;
	margin-bottom: 1.25rem;
	padding-right: 2.5rem;
}

.pslp-explorer__detail-logo {
	flex-shrink: 0;
}

.pslp-explorer__detail-logo-img {
	max-height: 72px;
	max-width: 140px;
	width: auto;
	object-fit: contain;
}

.pslp-explorer__detail-header-text {
	flex: 1;
}

/* Heading type matches what the theme gave these headings when the dialog lived in the section. */
.pslp-explorer__detail-name {
	font-family: var(--pl-font-heading, inherit);
	font-size: var(--pl-text-fluid-h2, 1.5rem);
	font-weight: 800;
	letter-spacing: -0.015em;
	color: var(--pl-color-text-primary, #1f2937);
	margin: 0 0 var(--pl-space-3, 0.25rem);
	line-height: 1.22;
}

.pslp-explorer__detail-location {
	font-size: 0.9rem;
	color: #6b7280;
	font-weight: 500;
	margin-bottom: 0.5rem;
}

.pslp-explorer__detail-sep {
	margin: 0 0.35em;
}

.pslp-explorer__detail-badges {
	display: flex;
	gap: 0.375rem;
	flex-wrap: wrap;
}

/* CTA in header. Text color comes from PHP (--pslp-school-on-accent), chosen by contrast
   against the brand fill; white stays the default where it passes. */
.pslp-explorer__detail-cta {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	padding: 0.75rem 1.75rem;
	background: var(--pslp-school-accent, var(--pslp-teal, #096789));
	color: var(--pslp-school-on-accent, #fff);
	font-weight: 600;
	font-size: 0.95rem;
	text-decoration: none;
	border-radius: 0.5rem;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.pslp-explorer__detail-cta:hover {
	opacity: 0.9;
	transform: translateY(-1px);
	color: var(--pslp-school-on-accent, #fff);
}

/* Visible new-tab cue (CONTRACTS §5), same glyph as Plumbline's text-link cue. Empty generated
   content adds nothing to the link's name; the spoken cue is aria-describedby="pl-new-tab-hint"
   or hidden text from PHP. */
.pslp-explorer__detail-cta::after,
.pslp-explorer__detail-link::after {
	content: "";
	flex: none;
	width: 0.8em;
	height: 0.8em;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 256 256'%3E%3Cpath d='M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z'/%3E%3C/svg%3E") center / contain no-repeat;
}

@media (forced-colors: active) {
	.pslp-explorer__detail-cta::after,
	.pslp-explorer__detail-link::after {
		forced-color-adjust: none;
		background-color: LinkText;
	}
}

/* Sections */
.pslp-explorer__detail-section {
	margin-bottom: 2rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid #f0f1f3;
}

.pslp-explorer__detail-section:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

/* Dark text, not the brand color: light brands fell to 2.3-3.0:1. */
.pslp-explorer__detail-section-title {
	font-family: var(--pl-font-heading, inherit);
	font-size: var(--pslp-text-h3, 0.8rem);
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--pl-color-text-primary, #1f2937);
	margin: var(--pl-space-5, 0) 0 var(--pl-space-2, 1rem);
}

/* Key Facts (definition list grid) */
.pslp-explorer__detail-facts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
	margin: 0;
}

.pslp-explorer__detail-fact {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	padding: 0.75rem 1rem;
	background: #f8f9fa;
	border-radius: 0.5rem;
}

.pslp-explorer__detail-fact dt {
	font-size: 0.7rem;
	font-weight: 700;
	color: #4b5563;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.pslp-explorer__detail-fact dd {
	margin: 0;
	font-size: 0.925rem;
	color: #1f2937;
	font-weight: 500;
}

.pslp-explorer__detail-modality-notes {
	margin-top: 0.75rem;
	font-size: 0.85rem;
	color: #6b7280;
	line-height: 1.5;
	font-style: italic;
}

/* Program Details */
.pslp-explorer__detail-focus {
	font-size: 0.95rem;
	color: #374151;
	line-height: 1.7;
	margin-bottom: 1rem;
}

.pslp-explorer__detail-highlights {
	font-size: 0.925rem;
	color: #374151;
	line-height: 1.7;
	margin-bottom: 1rem;
}

.pslp-explorer__detail-highlights p {
	margin: 0 0 0.75em;
}

.pslp-explorer__detail-highlights ul,
.pslp-explorer__detail-highlights ol {
	margin: 0 0 0.75em;
	padding-left: 1.25em;
}

.pslp-explorer__detail-link {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--pslp-teal, #096789);
	text-decoration: none;
	padding: 0.5rem 1rem;
	background: #f0f9fc;
	border-radius: 0.375rem;
	transition: background 0.15s ease;
}

.pslp-explorer__detail-link:hover {
	background: #e0f2f7;
	text-decoration: none;
}

/* Critical Domains (pill list) */
.pslp-explorer__detail-domains {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.pslp-explorer__detail-domains li {
	display: inline-block;
	padding: 0.4em 0.9em;
	font-size: 0.825rem;
	font-weight: 500;
	background: #f0fdf4;
	color: #166534;
	border-radius: 999px;
	border: 1px solid #bbf7d0;
}

/* Community / Demographics blocks */
.pslp-explorer__detail-block {
	margin-bottom: 1rem;
}

.pslp-explorer__detail-block:last-child {
	margin-bottom: 0;
}

.pslp-explorer__detail-block-label {
	display: block;
	font-size: 0.8rem;
	font-weight: 600;
	color: #4b5563;
	margin-bottom: 0.25rem;
}

.pslp-explorer__detail-block-text {
	font-size: 0.9rem;
	color: #374151;
	line-height: 1.6;
	margin: 0;
}

/* Contact */
.pslp-explorer__detail-section--contact {
	background: #f8f9fa;
	border-radius: 0.75rem;
	padding: 1.5rem;
	border-bottom: none;
	margin-bottom: 0;
}

.pslp-explorer__detail-contact {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
}

.pslp-explorer__detail-contact-name {
	font-size: 1rem;
	font-weight: 600;
	color: #1f2937;
}

.pslp-explorer__detail-contact-title {
	font-size: 0.875rem;
	color: #4b5563;
}

.pslp-explorer__detail-contact-email {
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--pslp-teal, #096789);
	text-decoration: none;
	margin-top: 0.25rem;
}

.pslp-explorer__detail-contact-email:hover {
	text-decoration: underline;
	text-underline-offset: 0.15em;
}

.pslp-explorer__detail-contact-notes {
	font-size: 0.825rem;
	color: #4b5563;
	margin-top: 0.375rem;
	line-height: 1.5;
}

/* Empty state */
.pslp-explorer__empty {
	text-align: center;
	color: #6b7280;
	padding: 3rem 1rem;
	font-size: 1rem;
}

/* ================================================================
   Responsive Adjustments
   ================================================================ */

@media (max-width: 700px) {
	.pslp-explorer__picker-options {
		grid-template-columns: 1fr;
	}

	.pslp-explorer__picker-btn {
		padding: 1.5rem 1rem;
	}

	.pslp-explorer__picker-heading {
		font-size: 1.35rem;
	}
}

@media (max-width: 600px) {
	.pslp-explorer__tabs {
		gap: 0.35rem;
		padding: 0.3rem;
	}

	.pslp-explorer__tab {
		padding: 0.5rem 0.35rem;
		font-size: 0.75rem;
		flex-wrap: wrap;
	}

	.pslp-explorer__modal {
		padding: 0.75rem;
	}

	.pslp-explorer__panel {
		max-height: calc(100vh - 1.5rem);
		max-height: calc(100dvh - 1.5rem);
	}

	.pslp-explorer__detail-content {
		padding: 0 1.5rem 1.5rem;
	}

	.pslp-explorer__detail-header-inner {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}

	.pslp-explorer__detail-facts {
		grid-template-columns: 1fr;
	}

	/* Smaller than desktop so a long name fits a 320px (400% zoom) screen; the name stays larger
	   than the section titles. */
	.pslp-explorer__detail-name {
		font-size: var(--pl-text-xl, 1.2rem);
	}

	.pslp-explorer__detail-section-title {
		font-size: var(--pl-text-lg, 0.8rem);
	}

	.pslp-explorer__detail-section--contact {
		padding: 1rem;
	}
}

/* Short viewports (landscape phones, 400% zoom): give the profile every pixel of height. */
@media (max-height: 30em) {
	.pslp-explorer__modal {
		padding: 0.5rem;
	}

	.pslp-explorer__panel {
		max-height: calc(100vh - 1rem);
		max-height: calc(100dvh - 1rem);
		border-radius: 0.5rem;
	}
}

/* ================================================================
   Reduced motion: no fade, scale, slide or lift
   ================================================================ */

@media (prefers-reduced-motion: reduce) {
	.pslp-explorer__region {
		animation: none;
	}

	.pslp-explorer__backdrop,
	.pslp-explorer__panel,
	.pslp-explorer__picker-btn,
	.pslp-explorer__card,
	.pslp-explorer__close,
	.pslp-explorer__detail-cta {
		transition: none;
	}

	.pslp-explorer__panel,
	.pslp-explorer__modal--open .pslp-explorer__panel,
	.pslp-explorer__picker-btn:hover,
	.pslp-explorer__picker-btn:focus-visible,
	.pslp-explorer__card:hover,
	.pslp-explorer__detail-cta:hover {
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pslp-explorer__card:has(.pslp-explorer__card-button:focus-visible) {
		transform: none;
	}
}
