/* Cogdell Public Notices — public listing
 *
 * Layout is a date chip + text + action, so the eye lands on the date first —
 * that is what someone scanning a records page is actually looking for.
 *
 * Salient sets `list-style: disc` on `li` directly, which a `list-style: none`
 * on the parent `ul` cannot beat. Every list reset below is therefore targeted
 * at the `li` itself with enough specificity to win.
 */

.cpn {
	--cpn-green: #137d3e;
	--cpn-ink: #1f2933;
	--cpn-muted: #5b6770;
	--cpn-line: #e5e9eb;
	--cpn-tint: #f7f9f8;

	max-width: 780px;
	margin: 0 0 2.5em;
	color: var(--cpn-ink);
}

/* ---------- Year ---------- */

.cpn .cpn-year {
	border-bottom: 1px solid var(--cpn-line);
}

.cpn .cpn-year:first-of-type {
	border-top: 1px solid var(--cpn-line);
}

.cpn .cpn-year-head {
	display: flex;
	align-items: center;
	gap: 0.75em;
	padding: 0.9em 0.25em;
	cursor: pointer;
	list-style: none;
	user-select: none;
}

.cpn .cpn-year-head::-webkit-details-marker {
	display: none;
}

/* Chevron */
.cpn .cpn-year-head::before {
	content: "";
	flex: none;
	width: 0.5em;
	height: 0.5em;
	margin-right: 0.15em;
	border-right: 2px solid var(--cpn-green);
	border-bottom: 2px solid var(--cpn-green);
	transform: rotate(-45deg);
	transition: transform 0.18s ease;
}

.cpn .cpn-year[open] > .cpn-year-head::before {
	transform: rotate(45deg);
}

.cpn .cpn-year-num {
	font-size: 1.35em;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -0.01em;
	color: var(--cpn-ink);
}

.cpn .cpn-year-head:hover .cpn-year-num {
	color: var(--cpn-green);
}

.cpn .cpn-year-head:focus-visible {
	outline: 2px solid var(--cpn-green);
	outline-offset: 3px;
	border-radius: 3px;
}

.cpn .cpn-year-body {
	padding: 0 0 0.9em;
}

/* ---------- Month ---------- */

.cpn .cpn-month + .cpn-month {
	margin-top: 1.15em;
}

.cpn .cpn-month-label {
	margin: 0 0 0.2em;
	padding: 0;
	font-size: 0.71em;
	font-weight: 700;
	letter-spacing: 0.09em;
	text-transform: uppercase;
	/* #4a5560 on #fff is 7.4:1 */
	color: #4a5560;
	border: 0;
}

/* ---------- Rows ---------- */

.cpn .cpn-rows {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Salient targets `li` directly, so this has to as well. */
.cpn .cpn-rows > li.cpn-row {
	margin: 0;
	padding: 0;
	list-style: none none outside;
	list-style-type: none;
	background: none;
	border: 0;
}

.cpn .cpn-rows > li.cpn-row::before,
.cpn .cpn-rows > li.cpn-row::marker {
	content: none;
	display: none;
}

.cpn .cpn-rows > li.cpn-row + li.cpn-row {
	border-top: 1px solid #eff2f3;
}

/* The whole row is the link */
.cpn a.cpn-link {
	display: grid;
	grid-template-columns: 3.1em 1fr auto;
	align-items: center;
	gap: 0 1em;
	padding: 0.5em 0.6em 0.5em 0.25em;
	text-decoration: none;
	color: inherit;
	border-radius: 5px;
	transition: background-color 0.12s ease;
}

.cpn a.cpn-link:hover,
.cpn a.cpn-link:focus-visible {
	background: var(--cpn-tint);
	text-decoration: none;
}

.cpn a.cpn-link:focus-visible {
	outline: 2px solid var(--cpn-green);
	outline-offset: 1px;
}

/* Date chip */
.cpn .cpn-date {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0.15em 0;
	border-right: 1px solid var(--cpn-line);
	line-height: 1;
}

.cpn .cpn-date-day {
	font-size: 1.22em;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--cpn-ink);
	font-variant-numeric: tabular-nums;
}

.cpn .cpn-date-unknown {
	color: #9aa4ab;
	font-weight: 400;
}

.cpn .cpn-date-dow {
	margin-top: 0.2em;
	font-size: 0.64em;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cpn-muted);
}

/* Text block */
.cpn .cpn-text {
	display: flex;
	flex-direction: column;
	gap: 0.1em;
	min-width: 0;
}

.cpn .cpn-title {
	font-size: 0.97em;
	font-weight: 600;
	line-height: 1.3;
	color: var(--cpn-ink);
}

.cpn a.cpn-link:hover .cpn-title {
	color: var(--cpn-green);
}

.cpn .cpn-detail {
	font-size: 0.83em;
	line-height: 1.4;
	/* #5b6770 on #fff is 5.4:1, and 5.1:1 on the hover tint */
	color: var(--cpn-muted);
}

/* Revised tag */
.cpn .cpn-tag-revised {
	display: inline-block;
	margin-left: 0.5em;
	padding: 0.1em 0.5em;
	border-radius: 3px;
	background: #fdf4e3;
	/* #6b4c00 on #fdf4e3 is 7.3:1 */
	color: #6b4c00;
	font-size: 0.7em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	vertical-align: 0.1em;
	white-space: nowrap;
}

/* PDF affordance */
.cpn .cpn-action {
	flex: none;
	padding: 0.28em 0.6em;
	border: 1px solid #d6dcde;
	border-radius: 3px;
	font-size: 0.7em;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: var(--cpn-muted);
	background: #fff;
	transition: all 0.12s ease;
}

.cpn a.cpn-link:hover .cpn-action {
	border-color: var(--cpn-green);
	background: var(--cpn-green);
	color: #fff;
}

/* ---------- Footer ---------- */

.cpn .cpn-foot {
	margin: 1.75em 0 0;
	padding-top: 1.25em;
	border-top: 1px solid var(--cpn-line);
	font-size: 0.87em;
	line-height: 1.55;
	color: var(--cpn-muted);
}

.cpn .cpn-foot p {
	margin: 0 0 0.4em;
}

.cpn .cpn-foot p:last-child {
	margin-bottom: 0;
}

.cpn .cpn-empty {
	padding: 1.2em;
	background: var(--cpn-tint);
	color: var(--cpn-muted);
}

/* Screen-reader-only text (full dates, format announcements) */
.cpn .cpn-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* ---------- Small screens ---------- */

@media (max-width: 560px) {
	.cpn a.cpn-link {
		grid-template-columns: 2.7em 1fr;
		grid-template-areas:
			"date text"
			"date action";
		gap: 0.2em 0.85em;
	}

	.cpn .cpn-date {
		grid-area: date;
	}

	.cpn .cpn-text {
		grid-area: text;
	}

	.cpn .cpn-action {
		grid-area: action;
		justify-self: start;
		margin-top: 0.35em;
	}
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
	.cpn .cpn-year-head::before,
	.cpn a.cpn-link,
	.cpn .cpn-action {
		transition: none;
	}
}

/* ---------- Text-only notices ---------- */

.cpn .cpn-textnotice > summary {
	list-style: none;
	cursor: pointer;
}

.cpn .cpn-textnotice > summary::-webkit-details-marker {
	display: none;
}

.cpn .cpn-action-text {
	border-color: #cfe0d5;
	color: var(--cpn-green);
}

.cpn .cpn-textnotice[open] .cpn-action-text {
	background: var(--cpn-green);
	border-color: var(--cpn-green);
	color: #fff;
}

.cpn .cpn-notice-text {
	margin: 0 0 0.5em 4.1em;
	padding: 0.1em 0.9em 0.1em 1em;
	border-left: 3px solid #d8e4dc;
	font-size: 0.92em;
	line-height: 1.62;
	color: #333f48;
}

.cpn .cpn-notice-text p {
	margin: 0 0 0.7em;
}

.cpn .cpn-notice-text p:last-child {
	margin-bottom: 0;
}

@media (max-width: 560px) {
	.cpn .cpn-notice-text {
		margin-left: 0;
		padding-left: 0.9em;
	}
}
