/**
 * DeskPicko Editorial Engine — Phase 1H Category Module.
 *
 * Mobile-first. Base (no-media-query) styles are the small-screen
 * accordion index; the desktop breakpoint below overrides layout only
 * — it never depends on JavaScript to look correct, so a page with
 * this stylesheet but no JavaScript still renders a clean, fully
 * expanded, readable stack of category sections on any screen size.
 *
 * Namespace: every selector is prefixed `.dp-cat-` per project
 * convention (`.dp-` namespace, Section 26 of the architecture).
 */

.dp-cat-module {
	--dp-ink: #14181c;
	--dp-ink-soft: #4b5563;
	--dp-teal: #0f766e;
	--dp-line: #e5e7eb;
	--dp-surface: #ffffff;

	box-sizing: border-box;
	background: var(--dp-surface);
	border-bottom: 1px solid var(--dp-line);
	/* Mobile-first: adds a small horizontal gutter so the expanded
	   feature/panel content isn't flush with the screen edge. Reset
	   back to 0 by the existing "padding: 2.5rem 0" shorthand in the
	   desktop media query below — intentionally unchanged there. */
	padding: 1.5rem 1rem;
	font-family: inherit;
	color: var(--dp-ink);
}

.dp-cat-module *,
.dp-cat-module *::before,
.dp-cat-module *::after {
	box-sizing: inherit;
}

/* ---------------------------------------------------------------
   Heading / toggle
   --------------------------------------------------------------- */

.dp-cat-heading {
	margin: 0;
	font-size: inherit;
	font-weight: inherit;
}

.dp-cat-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	width: 100%;
	min-height: 44px;
	padding: 0.5rem 0;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font: inherit;
	color: inherit;
	/* Android Chrome/WebView paint a translucent blue rectangle on tap
	   by default; this suppresses only that tap-highlight flash, and
	   is scoped to this toggle alone. It has no effect on the
	   :focus-visible outline below, which is what keyboard users see. */
	-webkit-tap-highlight-color: transparent;
}

.dp-cat-toggle:focus-visible {
	outline: 2px solid var(--dp-teal);
	outline-offset: 2px;
}

.dp-cat-toggle-title {
	font-size: 1.25rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.dp-cat-toggle-icon {
	flex: none;
	width: 12px;
	height: 12px;
	border-right: 2px solid var(--dp-ink);
	border-bottom: 2px solid var(--dp-ink);
	transform: rotate(45deg);
	transition: transform 0.15s ease;
}

.dp-cat-toggle[aria-expanded='true'] .dp-cat-toggle-icon {
	transform: rotate(-135deg);
}

/* ---------------------------------------------------------------
   Panel (mobile: collapsible; see [hidden] below)
   --------------------------------------------------------------- */

.dp-cat-panel {
	padding-top: 0.75rem;
}

.dp-cat-panel[hidden] {
	display: none;
}

.dp-cat-description {
	margin: 0 0 1rem;
	color: var(--dp-ink-soft);
	font-size: 0.95rem;
	line-height: 1.5;
	max-width: 60ch;
}

.dp-cat-cta {
	display: inline-block;
	margin-top: 1rem;
	color: var(--dp-teal);
	font-weight: 600;
	text-decoration: none;
}

.dp-cat-cta:hover,
.dp-cat-cta:focus-visible {
	text-decoration: underline;
}

.dp-cat-body {
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

/* ---------------------------------------------------------------
   Feature article
   --------------------------------------------------------------- */

.dp-cat-feature-link {
	display: block;
	color: inherit;
	text-decoration: none;
}

.dp-cat-feature-link:focus-visible {
	outline: 2px solid var(--dp-teal);
	outline-offset: 2px;
}

.dp-cat-feature-media {
	display: block;
	overflow: hidden;
	border-radius: 4px;
	background: var(--dp-line);
	margin-bottom: 0.85rem;
}

.dp-cat-feature-media img {
	width: 100%;
	height: auto;
	object-fit: contain;
	object-position: center;
	display: block;
}

.dp-cat-feature-content {
	display: block;
}

.dp-cat-feature-eyebrow {
	display: block;
	margin-bottom: 0.35rem;
	color: var(--dp-teal);
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.dp-cat-feature-title {
	display: block;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.3;
	margin-bottom: 0.5rem;
}

.dp-cat-feature-link:hover .dp-cat-feature-title,
.dp-cat-feature-link:focus-visible .dp-cat-feature-title {
	text-decoration: underline;
}

.dp-cat-feature-excerpt {
	display: block;
	color: var(--dp-ink-soft);
	font-size: 0.95rem;
	line-height: 1.5;
	max-width: 60ch;
}

/* ---------------------------------------------------------------
   Supporting list
   --------------------------------------------------------------- */

.dp-cat-supporting {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
}

.dp-cat-supporting-item {
	border-top: 1px solid var(--dp-line);
}

.dp-cat-supporting-item:last-child {
	border-bottom: 1px solid var(--dp-line);
}

.dp-cat-supporting-link {
	display: flex;
	align-items: center;
	gap: 0.85rem;
	min-height: 44px;
	padding: 0.65rem 0;
	color: inherit;
	text-decoration: none;
}

.dp-cat-supporting-link:focus-visible {
	outline: 2px solid var(--dp-teal);
	outline-offset: 2px;
}

.dp-cat-supporting-media {
	flex: none;
	width: 56px;
	height: 56px;
	border-radius: 4px;
	overflow: hidden;
	background: var(--dp-line);
}

.dp-cat-supporting-media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.dp-cat-supporting-text {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	min-width: 0;
}

.dp-cat-supporting-title {
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.35;
}

.dp-cat-supporting-link:hover .dp-cat-supporting-title,
.dp-cat-supporting-link:focus-visible .dp-cat-supporting-title {
	text-decoration: underline;
}

.dp-cat-supporting-date {
	font-size: 0.8rem;
	color: var(--dp-ink-soft);
}

/* ---------------------------------------------------------------
   Desktop: feature + supporting side by side, toggle becomes a
   plain (non-interactive-looking) heading. This is a layout-only
   override — the panel is always rendered in the DOM; JS keeps
   aria-expanded/hidden in sync with this breakpoint (see .js file).
   --------------------------------------------------------------- */

@media (min-width: 900px) {
	.dp-cat-module {
		padding: 2.5rem 1rem;
	}

	.dp-cat-toggle {
		cursor: default;
		min-height: 0;
		padding: 0;
	}

	.dp-cat-toggle-icon {
		display: none;
	}

	.dp-cat-toggle-title {
		font-size: 1.75rem;
	}

	.dp-cat-panel {
		padding-top: 1.25rem;
	}

	.dp-cat-body {
		flex-direction: row;
		align-items: stretch;
		gap: 2.5rem;
	}

	.dp-cat-feature {
		flex: 1 1 60%;
		min-width: 0;
	}

	.dp-cat-feature-title {
		font-size: 1.6rem;
	}

	.dp-cat-supporting {
		flex: 1 1 40%;
		min-width: 0;
	}
}
