/* Public delegation overview (PublicContentDelegationOverviewRenderer): /Committees/ and /Committees/<key>/. */
.public-content .delegation-overview { margin-top: 2.5rem; }
.public-content .delegation-overview--committee { margin-top: 2rem; }
.public-content .delegation-overview__heading { margin-bottom: .35rem; }
.public-content .delegation-overview--committee .delegation-overview__heading { font-size: 1.35rem; }
.public-content .delegation-overview__meta { margin: 0 0 1rem; color: var(--content-muted); font-size: .95rem; }
.public-content .delegation-overview__notice {
	margin: 0;
	padding: .9rem 1rem;
	border: 1px dashed var(--content-border);
	border-radius: var(--content-radius);
	background: var(--content-surface);
	color: var(--content-muted);
}

/* Wide screens: matrix in its own scroll area (never the page), sticky delegation column and header row.
   position: relative makes the scroll area the containing block of the absolutely positioned visually-hidden
   texts in non-sticky cells; without it they escape the scroll area and widen the page (768-990px). */
.public-content .delegation-overview__matrix {
	position: relative;
	display: none;
	max-height: 85vh;
	overflow: auto;
	border: 1px solid var(--content-border);
	border-radius: var(--content-radius);
	background: var(--content-card);
	box-shadow: var(--content-shadow);
}
.public-content .delegation-overview__matrix:focus-visible { outline: 2px solid var(--content-primary); outline-offset: 2px; }
.public-content .delegation-overview__table { width: 100%; margin: 0; border-collapse: separate; border-spacing: 0; font-size: .9rem; }
.public-content .delegation-overview__table th,
.public-content .delegation-overview__table td {
	padding: .35rem .5rem;
	border-bottom: 1px solid var(--content-border);
	text-align: center;
	white-space: nowrap;
}
.public-content .delegation-overview__table tbody th[scope="row"],
.public-content .delegation-overview__table tfoot th,
.public-content .delegation-overview__corner {
	position: sticky;
	left: 0;
	z-index: 1;
	min-width: 11rem;
	max-width: 16rem;
	overflow: hidden;
	text-overflow: ellipsis;
	border-right: 1px solid var(--content-border);
	background: var(--content-card);
	text-align: left;
	font-weight: 600;
}
.public-content .delegation-overview__table thead th {
	position: sticky;
	top: 0;
	z-index: 2;
	background: var(--content-primary-soft);
	color: var(--content-primary);
	font-weight: 700;
}
.public-content .delegation-overview__table thead th:not(.delegation-overview__corner) { min-width: 3rem; max-width: 6.5rem; font-size: .8rem; line-height: 1.2; vertical-align: bottom; white-space: normal; overflow-wrap: anywhere; }
.public-content .delegation-overview__table thead .delegation-overview__corner { z-index: 3; background: var(--content-primary-soft); vertical-align: bottom; }
.public-content .delegation-overview__table .delegation-overview__corner,
.public-content .delegation-overview__table tbody th[scope="row"],
.public-content .delegation-overview__table tfoot th { text-align: left; }
.public-content .delegation-overview__table thead a { color: inherit; text-decoration: none; }
.public-content .delegation-overview__table thead a:hover,
.public-content .delegation-overview__table thead a:focus-visible { text-decoration: underline; }
.public-content .delegation-overview__table abbr[title] { text-decoration: none; cursor: help; }
.public-content .delegation-overview__table tbody tr:hover td,
.public-content .delegation-overview__table tbody tr:hover th[scope="row"] { background: var(--content-surface); }
.public-content .delegation-overview__group th {
	position: sticky;
	left: 0;
	padding-top: .8rem;
	background: var(--content-card);
	color: var(--content-accent);
	font-size: .78rem;
	letter-spacing: .06em;
	text-align: left;
	text-transform: uppercase;
}
.public-content .delegation-overview__parent td { color: var(--content-muted); font-style: italic; }
.public-content .delegation-overview__member th[scope="row"] { padding-left: 1.4rem; font-weight: 400; }
.public-content .delegation-overview__indent { color: var(--content-muted); }
.public-content .delegation-overview__table .delegation-overview__sum { background: var(--content-surface); font-weight: 700; }
.public-content .delegation-overview__table tfoot th,
.public-content .delegation-overview__table tfoot td { border-top: 2px solid var(--content-border); border-bottom: 0; background: var(--content-surface); font-weight: 700; }

/* Phones (and the scope "all" fallback below 768px): one collapsible list per committee. */
.public-content .delegation-overview__committees { display: grid; gap: .6rem; }
.public-content .delegation-overview__committee {
	border: 1px solid var(--content-border);
	border-left: 4px solid var(--content-primary);
	border-radius: var(--content-radius);
	background: var(--content-card);
	box-shadow: var(--content-shadow);
}
.public-content .delegation-overview__committee summary {
	display: flex;
	gap: .75rem;
	align-items: center;
	justify-content: space-between;
	padding: .75rem .9rem;
	cursor: pointer;
	font-weight: 700;
}
.public-content .delegation-overview__committee summary:focus-visible { outline: 2px solid var(--content-primary); outline-offset: -2px; }
.public-content .delegation-overview__committee-name { min-width: 0; overflow-wrap: anywhere; }
.public-content .delegation-overview__committee-count {
	flex: 0 0 auto;
	padding: .1rem .55rem;
	border-radius: 999px;
	background: var(--content-primary-soft);
	color: var(--content-primary);
	font-size: .85rem;
}
.public-content .delegation-overview__committee-body { padding: 0 .9rem .9rem; }

.public-content .delegation-overview__type + .delegation-overview__type { margin-top: 1rem; }
.public-content .delegation-overview__type-label {
	margin: 0 0 .4rem;
	color: var(--content-accent);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.public-content .delegation-overview__list,
.public-content .delegation-overview__members { margin: 0; padding: 0; list-style: none; }
.public-content .delegation-overview__list > li { border-bottom: 1px solid var(--content-border); }
.public-content .delegation-overview__list > li:last-child { border-bottom: 0; }
.public-content .delegation-overview__members { margin: 0 0 .35rem 1rem; padding-left: .75rem; border-left: 2px solid var(--content-primary-soft); }
.public-content .delegation-overview__item { display: flex; gap: .75rem; align-items: baseline; justify-content: space-between; padding: .35rem 0; }
.public-content .delegation-overview__name { min-width: 0; overflow-wrap: anywhere; }
.public-content .delegation-overview__seats { flex: 0 0 auto; color: var(--content-muted); font-size: .9rem; white-space: nowrap; }
.public-content .delegation-overview__members .delegation-overview__item { padding: .2rem 0; font-size: .95rem; }

/* The committee page list is always shown open (no details wrapper); on wide screens use two columns of type groups. */
@media (min-width: 768px) {
	.public-content .delegation-overview__matrix { display: block; }
	.public-content .delegation-overview__committees { display: none; }
	.public-content .delegation-overview--committee .delegation-overview__type + .delegation-overview__type { margin-top: 0; }
	.public-content .delegation-overview--committee { columns: 2; column-gap: 2.5rem; }
	.public-content .delegation-overview--committee > .delegation-overview__heading,
	.public-content .delegation-overview--committee > .delegation-overview__meta,
	.public-content .delegation-overview--committee > .delegation-overview__notice { column-span: all; }
	.public-content .delegation-overview--committee .delegation-overview__type { break-inside: avoid; margin-bottom: 1rem; }
}

/* Legend above the matrix (wide screens only, like the matrix). */
.public-content .delegation-overview__legend { display: none; margin: -.5rem 0 .75rem; color: var(--content-muted); font-size: .85rem; }

/* Single-seat marker in the matrix (one seat per delegation and committee). */
.public-content .delegation-overview__dot { color: var(--content-primary); font-size: .75rem; line-height: 1; }
.public-content .delegation-overview__parent .delegation-overview__dot { color: var(--content-muted); }
@media (min-width: 768px) { .public-content .delegation-overview__legend { display: block; } }
