/*
 * HDW Hub front-end styles. Inherits your theme's fonts and text color.
 * To match your brand, override these in Appearance → Customize → Additional CSS:
 *   .hdwh-hub, .hdwh-dir { --hdwh-accent: #1d5c8c; }
 */
.hdwh-hub,
.hdwh-dir {
	--hdwh-accent: #2f6b4f;
	--hdwh-accent-text: #ffffff;
	--hdwh-line: color-mix(in srgb, currentColor 16%, transparent);
	--hdwh-soft: color-mix(in srgb, currentColor 5%, transparent);
	--hdwh-muted: color-mix(in srgb, currentColor 68%, transparent);
	--hdwh-radius: 10px;
}

.hdwh-hub *,
.hdwh-dir * {
	box-sizing: border-box;
}

/* Tabs */
.hdwh-tabs {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	border-bottom: 1px solid var(--hdwh-line);
	margin-bottom: 20px;
	scrollbar-width: thin;
}
.hdwh-tab {
	flex: 0 0 auto;
	appearance: none;
	background: none;
	border: 0;
	border-bottom: 3px solid transparent;
	color: inherit;
	font: inherit;
	font-size: 0.95em;
	padding: 10px 14px;
	cursor: pointer;
	opacity: 0.75;
	white-space: nowrap;
}
.hdwh-tab:hover {
	opacity: 1;
}
.hdwh-tab[aria-selected="true"] {
	opacity: 1;
	font-weight: 600;
	border-bottom-color: var(--hdwh-accent);
}
.hdwh-tab:focus-visible {
	outline: 2px solid var(--hdwh-accent);
	outline-offset: -2px;
}
.hdwh-tab__count {
	display: inline-block;
	min-width: 1.6em;
	padding: 0 6px;
	margin-left: 4px;
	border-radius: 999px;
	background: var(--hdwh-soft);
	font-size: 0.8em;
	font-weight: 500;
	text-align: center;
}

/* Toolbar */
.hdwh-toolbar {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 10px;
}
.hdwh-search {
	flex: 1 1 260px;
}
.hdwh-filter {
	flex: 0 1 auto;
	min-width: 0;
}
.hdwh-toolbar input,
.hdwh-toolbar select {
	width: 100%;
	max-width: 100%;
	height: 40px;
	padding: 0 12px;
	border: 1px solid var(--hdwh-line);
	border-radius: 8px;
	background-color: transparent;
	color: inherit;
	font: inherit;
	font-size: 0.92em;
}
.hdwh-toolbar select option {
	color: #111;
	background: #fff;
}
.hdwh-toolbar input:focus,
.hdwh-toolbar select:focus {
	outline: 2px solid var(--hdwh-accent);
	outline-offset: 0;
	border-color: transparent;
}
.hdwh-status {
	margin: 0 0 14px;
	font-size: 0.88em;
	color: var(--hdwh-muted);
}

/* Cards */
.hdwh-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: 16px;
}
.hdwh-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 18px;
	border: 1px solid var(--hdwh-line);
	border-radius: var(--hdwh-radius);
	min-width: 0;
}
.hdwh-card[hidden] {
	display: none;
}
.hdwh-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
}
.hdwh-card__title {
	margin: 0;
	font-size: 1.08em;
	line-height: 1.35;
	overflow-wrap: anywhere;
}
.hdwh-card__title a {
	color: inherit;
	text-decoration: none;
}
.hdwh-card__title a:hover {
	color: var(--hdwh-accent);
	text-decoration: underline;
}
.hdwh-new {
	flex: 0 0 auto;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--hdwh-accent);
	color: var(--hdwh-accent-text);
	font-size: 0.72em;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}
.hdwh-card__org {
	margin: -4px 0 0;
	font-size: 0.9em;
	color: var(--hdwh-muted);
}
.hdwh-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.hdwh-badge {
	padding: 3px 9px;
	border-radius: 999px;
	border: 1px solid color-mix(in srgb, var(--hdwh-accent) 45%, transparent);
	color: var(--hdwh-accent);
	font-size: 0.78em;
	font-weight: 500;
	line-height: 1.4;
}
@media (prefers-color-scheme: dark) {
	.hdwh-badge {
		color: inherit;
	}
}
.hdwh-card__summary {
	margin: 0;
	font-size: 0.92em;
	line-height: 1.55;
}
.hdwh-meta {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 8px 14px;
	margin: 0;
	padding: 10px 12px;
	border-radius: 8px;
	background: var(--hdwh-soft);
	font-size: 0.85em;
}
.hdwh-meta div {
	min-width: 0;
}
.hdwh-meta dt {
	margin: 0;
	font-size: 0.82em;
	color: var(--hdwh-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}
.hdwh-meta dd {
	margin: 0;
	overflow-wrap: anywhere;
}
.hdwh-soon {
	display: inline-block;
	margin-left: 4px;
	padding: 0 6px;
	border-radius: 4px;
	background: #b3261e;
	color: #fff;
	font-size: 0.85em;
	font-weight: 600;
}
.hdwh-card__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-top: auto;
}
.hdwh-topics {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.75em;
	color: var(--hdwh-muted);
}
.hdwh-topics li {
	margin: 0;
	padding: 2px 7px;
	border-radius: 4px;
	background: var(--hdwh-soft);
}
.hdwh-btn,
.hdwh-more {
	display: inline-block;
	padding: 8px 14px;
	border: 0;
	border-radius: 8px;
	background: var(--hdwh-accent);
	color: var(--hdwh-accent-text) !important;
	font: inherit;
	font-size: 0.88em;
	font-weight: 600;
	text-decoration: none !important;
	cursor: pointer;
	white-space: nowrap;
}
.hdwh-btn:hover,
.hdwh-more:hover {
	filter: brightness(1.1);
}
.hdwh-btn:focus-visible,
.hdwh-more:focus-visible {
	outline: 2px solid var(--hdwh-accent);
	outline-offset: 2px;
}
.hdwh-more {
	display: block;
	margin: 20px auto 0;
}
.hdwh-more[hidden],
.hdwh-empty[hidden] {
	display: none;
}
.hdwh-empty {
	padding: 32px 16px;
	text-align: center;
	color: var(--hdwh-muted);
	border: 1px dashed var(--hdwh-line);
	border-radius: var(--hdwh-radius);
}

@media (max-width: 600px) {
	.hdwh-filter {
		flex: 1 1 calc(50% - 4px);
	}
	.hdwh-card {
		padding: 14px;
	}
}
