/* Publications Table — Studio Bacon */

.sbpt {
	--sbpt-accent: #104551;
	--sbpt-head: #104551;
	--sbpt-text: inherit;
	--sbpt-link: #104551;
	--sbpt-link-hv: #1d6f7d;
	--sbpt-rule: #9adde3;
	--sbpt-line: #e2e4e5;
	--sbpt-stripe: transparent;
	--sbpt-hover: #eff9fa;
	container-type: inline-size;
	container-name: sbpt;
	color: var(--sbpt-text);
	margin: 0 0 1.5em;
}

.sbpt-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;
}

/* Search and year filter */
.sbpt-tools {
	display: flex;
	flex-wrap: wrap;
	gap: .75em;
	margin: 0 0 1em;
}
.sbpt-tools label { margin: 0; }
.sbpt-tools__search { flex: 1 1 16em; }
.sbpt-tools__year,
.sbpt-tools__filter { flex: 0 0 auto; }
.sbpt .sbpt-search,
.sbpt .sbpt-filter,
.sbpt .sbpt-year {
	width: 100%;
	min-height: 2.6em;
	padding: .5em .85em;
	font: inherit;
	color: inherit;
	background: #fff;
	border: 1px solid var(--sbpt-line);
	border-bottom: 2px solid var(--sbpt-accent);
	border-radius: 0;
	box-shadow: none;
}
.sbpt .sbpt-year,
.sbpt .sbpt-filter { padding-right: 2.2em; max-width: 22em; }
.sbpt .sbpt-search:focus,
.sbpt .sbpt-filter:focus,
.sbpt .sbpt-year:focus {
	outline: 2px solid var(--sbpt-accent);
	outline-offset: 1px;
}

.sbpt-count {
	margin: 0 0 .5em;
	font-size: .85em;
	opacity: .75;
}

/* Table */
.sbpt-wrap { width: 100%; }

.sbpt-table {
	width: 100%;
	border-collapse: collapse;
	border: 0;
	margin: 0;
	table-layout: auto;
	background: transparent;
}

.sbpt-table th,
.sbpt-table td {
	border: 0;
	background: transparent;
	text-align: left;
	vertical-align: top;
}

.sbpt-table th {
	color: var(--sbpt-head);
	font-weight: 700;
	font-size: .8em;
	letter-spacing: .08em;
	text-transform: uppercase;
	padding: .4em 1em .6em 0;
	border-bottom: 3px solid var(--sbpt-rule);
}

.sbpt-table td {
	padding: 1em 1.25em 1em 0;
	border-bottom: 1px solid var(--sbpt-line);
	line-height: 1.55;
	overflow-wrap: anywhere;
}
.sbpt-table th:last-child,
.sbpt-table td:last-child { padding-right: 0; }

.sbpt-table tbody tr:nth-child(even) td { background: var(--sbpt-stripe); }
.sbpt-table tbody tr:hover td { background: var(--sbpt-hover); }

.sbpt-table .sbpt-th-title,
.sbpt-table .sbpt-td-title { width: 30%; }
.sbpt-table .sbpt-th-link,
.sbpt-table .sbpt-td-link { width: 1%; white-space: nowrap; }

.sbpt-table td:first-child,
.sbpt-table th:first-child { padding-left: .5em; }

.sbpt-td-citation strong { font-weight: 700; }
.sbpt-td-citation em { font-style: italic; }
.sbpt-table .sbpt-th-extra,
.sbpt-table .sbpt-td-extra {
	width: 1%;
	min-width: 7.5em;
	overflow-wrap: normal;
	word-break: normal;
	hyphens: auto;
}

.sbpt-table a {
	color: var(--sbpt-link);
	text-decoration: underline;
	text-underline-offset: .15em;
	text-decoration-thickness: 1px;
}
.sbpt-table a:hover,
.sbpt-table a:focus { color: var(--sbpt-link-hv); }

.sbpt-link {
	display: inline-flex;
	align-items: center;
	gap: .35em;
	font-weight: 700;
}
.sbpt .sbpt-table .sbpt-link { text-decoration: none; }
.sbpt .sbpt-table .sbpt-link:hover { text-decoration: underline; }
.sbpt-ext { flex: none; }

.sbpt-row[hidden] { display: none !important; }

.sbpt-nomatch,
.sbpt-empty {
	padding: 1em .5em;
	margin: 0;
	border-bottom: 1px solid var(--sbpt-line);
	font-style: italic;
}

.sbpt-more-wrap { text-align: center; margin-top: 1.25em; }
.sbpt .sbpt-more {
	font: inherit;
	font-weight: 700;
	cursor: pointer;
	padding: .65em 1.6em;
	background: transparent;
	color: var(--sbpt-accent);
	border: 2px solid var(--sbpt-accent);
	border-radius: 0;
}
.sbpt .sbpt-more:hover,
.sbpt .sbpt-more:focus { background: var(--sbpt-accent); color: #fff; }

/* Narrow: each row becomes a stacked entry */
@container sbpt (max-width: 600px) {
	.sbpt-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
	.sbpt-table,
	.sbpt-table tbody,
	.sbpt-table tr,
	.sbpt-table td { display: block; width: 100% !important; }
	.sbpt-table tbody { border-top: 3px solid var(--sbpt-rule); }
	.sbpt-table tr {
		padding: 1em 0;
		border-bottom: 1px solid var(--sbpt-line);
	}
	.sbpt-table td,
	.sbpt-table td:first-child { padding: 0; border: 0; white-space: normal; }
	.sbpt-table tbody tr:nth-child(even) { background: var(--sbpt-stripe); }
	.sbpt-table tbody tr:nth-child(even) td,
	.sbpt-table tbody tr:hover td { background: transparent; }
	.sbpt-table td + td { margin-top: .5em; }
	.sbpt-td-title { font-weight: 700; }
	.sbpt-table .sbpt-td-extra { font-size: .9em; }
	.sbpt-table .sbpt-td-extra::before { content: attr(data-label) ": "; font-weight: 700; }
}
