/* PaperPapa - script library (filter + search + cards). Scoped under .dse-lib. */
.dse-lib {
	--pp-ink: #1f2a37;
	--pp-accent: #2563eb;
	--pp-soft: #eef2f7;
	font-family: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--pp-ink);
	max-width: 100%;
}
.dse-lib-controls {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	padding: 1rem 0;
	border-bottom: 1px solid #e5e7eb;
	z-index: 30;
	margin-bottom: 1rem;
}
.dse-lib-search input {
	width: 100%;
	padding: 0.7rem 0.9rem;
	font-size: 1rem;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	box-sizing: border-box;
}
.dse-lib-search input:focus { outline: 2px solid var(--pp-accent); border-color: var(--pp-accent); }
.dse-lib-filters { display: flex; flex-direction: column; gap: 0.45rem; margin-top: 0.75rem; }
.dse-lib-group { display: flex; flex-wrap: wrap; gap: 0.35rem; align-items: center; }
.dse-lib-group > .label {
	font-size: 0.68rem; font-weight: 700; text-transform: uppercase;
	letter-spacing: 0.06em; color: #64748b; min-width: 3.2rem;
}
.dse-pill {
	font-size: 0.8rem; padding: 0.25rem 0.7rem; border-radius: 999px;
	background: var(--pp-soft); color: #334155; border: 1px solid transparent;
	cursor: pointer; user-select: none; transition: background 0.12s, color 0.12s;
}
.dse-pill:hover { background: #e2e8f0; }
.dse-pill.active { background: var(--pp-ink); color: #fff; }
.dse-lib-summary { font-size: 0.85rem; color: #64748b; margin: 0.6rem 0 0; }
.dse-grid {
	display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
	gap: 1rem; margin-top: 1.2rem;
}
.dse-card {
	display: flex; flex-direction: column; border: 1px solid #e5e7eb;
	border-radius: 14px; padding: 1.1rem 1.2rem; background: #fff;
	transition: box-shadow 0.18s, transform 0.15s, border-color 0.18s;
}
.dse-card:hover { box-shadow: 0 10px 28px rgba(2, 6, 23, 0.09); transform: translateY(-3px); border-color: #cbd5e1; }
.dse-card h3 { margin: 0.1rem 0 0.5rem; font-size: 1.02rem; line-height: 1.3; overflow-wrap: break-word; }
.dse-card-marks, .dse-card h3 a { overflow-wrap: break-word; }
.dse-card h3 a { color: var(--pp-ink); text-decoration: none; }
.dse-card h3 a:hover { color: var(--pp-accent); }
.dse-card-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-bottom: 0.5rem; }
.dse-tag { font-size: 0.7rem; padding: 0.1rem 0.5rem; border-radius: 6px; background: #f1f5f9; color: #475569; }
.dse-tag.grade-5-star-star { background: #fde68a; color: #92400e; font-weight: 700; }
.dse-tag.grade-5-star { background: #fef3c7; color: #92400e; font-weight: 600; }
.dse-tag.grade-band-5 { background: #dbeafe; color: #1e40af; }
.dse-tag.grade-band-4 { background: #e2e8f0; color: #475569; }
.dse-card-marks { font-size: 0.78rem; color: #64748b; margin-bottom: 0.7rem; }
.dse-card-foot {
	margin-top: auto; display: flex; align-items: center; justify-content: space-between;
	gap: 0.5rem; padding-top: 0.6rem; border-top: 1px solid #f1f5f9;
}
.dse-access {
	font-size: 0.66rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
	padding: 0.18rem 0.5rem; border-radius: 6px;
}
.dse-access.free_member, .dse-access.public_preview, .dse-access.extra_free_sample { background: #dcfce7; color: #166534; }
.dse-access.single_purchase { background: #fef3c7; color: #92400e; }
.dse-access.year_bundle { background: #e0e7ff; color: #3730a3; }
.dse-access.all_access { background: #ede9fe; color: #5b21b6; }
.dse-open { font-size: 0.82rem; font-weight: 600; color: var(--pp-accent); text-decoration: none; white-space: nowrap; }
.dse-empty { text-align: center; color: #94a3b8; padding: 2rem; display: none; }
@media (max-width: 600px) { .dse-grid { grid-template-columns: 1fr; } }
