/* STRC Document Library — front end
   Override any --strc-* variable from the theme or a BB custom CSS block, e.g.
   .strc-doclib { --strc-pill-bg: #fff3d6; } */

.strc-doclib {
	--strc-cols: 4;
	--strc-gap: 16px;
	--strc-card-bg: #ffffff;
	--strc-card-radius: 18px;
	--strc-card-pad: 24px 22px 28px;
	--strc-year-color: #4a3209;
	--strc-year-size: clamp(1.6rem, 1.2rem + 1vw, 2rem);
	--strc-year-font: inherit;
	--strc-pill-bg: #f7ecd3;
	--strc-pill-bg-hover: #ecd9ae;
	--strc-pill-color: #5a3d0c;
	--strc-pill-size: 0.875rem;
	--strc-focus: #6b4a0f;

	display: grid;
	grid-template-columns: repeat(var(--strc-cols), minmax(0, 1fr));
	gap: var(--strc-gap);
	margin: 0 0 2rem;
}

@media (max-width: 1024px) {
	.strc-doclib { grid-template-columns: repeat(min(var(--strc-cols), 3), minmax(0, 1fr)); }
}
@media (max-width: 768px) {
	.strc-doclib { grid-template-columns: repeat(min(var(--strc-cols), 2), minmax(0, 1fr)); }
}
@media (max-width: 480px) {
	.strc-doclib { grid-template-columns: minmax(0, 1fr); }
}

.strc-doclib__card {
	background: var(--strc-card-bg);
	border-radius: var(--strc-card-radius);
	padding: var(--strc-card-pad);
	min-width: 0;
}

.strc-doclib .strc-doclib__year {
	margin: 0 0 18px;
	padding: 0;
	font-family: var(--strc-year-font);
	font-size: var(--strc-year-size);
	font-weight: 400;
	line-height: 1.1;
	color: var(--strc-year-color);
}

.strc-doclib .strc-doclib__list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.strc-doclib .strc-doclib__list li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.strc-doclib .strc-doclib__list li::before { content: none; }

.strc-doclib .strc-doclib__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 999px;
	background: var(--strc-pill-bg);
	color: var(--strc-pill-color);
	font-size: var(--strc-pill-size);
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: none;
	transition: background-color 0.15s ease;
}

.strc-doclib .strc-doclib__link:hover,
.strc-doclib .strc-doclib__link:focus-visible {
	background: var(--strc-pill-bg-hover);
	color: var(--strc-pill-color);
	text-decoration: none;
}

.strc-doclib .strc-doclib__link:focus-visible {
	outline: 2px solid var(--strc-focus);
	outline-offset: 2px;
}

.strc-doclib__type {
	font-size: 0.7em;
	font-weight: 600;
	letter-spacing: 0.04em;
	opacity: 0.7;
}

/* Screen-reader text (in case the theme doesn't define it) */
.strc-doclib .strc-doclib__sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.strc-doclib-empty { font-style: italic; }
