/* CCL Manuals: cards, finder, spec chips, tiles. Accent matches the child theme (#1dd19b). */

:root {
	--ccl-accent: #1dd19b;
	--ccl-accent-dark: #128a66;
	--ccl-ink: #1f2933;
	--ccl-muted: #5f6b7a;
	--ccl-line: rgba(0, 0, 0, 0.1);
	--ccl-soft: #f4f6f7;
	--ccl-radius: 6px;
}

/* Finder */
.ccl-finder {
	background: var(--ccl-soft);
	border-radius: var(--ccl-radius);
	padding: 20px;
	margin: 0 0 32px;
}
.ccl-finder__title {
	font-weight: 700;
	margin: 0 0 10px;
}
.ccl-finder__fields {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.ccl-finder__field {
	flex: 1 1 180px;
	min-width: 0;
}
.ccl-finder select {
	width: 100%;
	margin: 0;
	padding: 10px 12px;
	border-radius: var(--ccl-radius);
}
.ccl-finder .ccl-finder__submit {
	flex: 0 0 auto;
	margin: 0;
	padding: 10px 22px;
}
.page-hero .ccl-finder {
	background: rgba(255, 255, 255, 0.94);
	color: var(--ccl-ink);
	max-width: 900px;
	margin: 24px 0 0;
	text-align: left;
}

/* Grid and cards */
.ccl-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 24px;
	margin: 0 0 32px;
}
.ccl-card {
	border: 1px solid var(--ccl-line);
	border-radius: var(--ccl-radius);
	overflow: hidden;
	background: #fff;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.ccl-card:hover {
	box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}
.ccl-card__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	color: inherit;
	text-decoration: none;
}
.ccl-card__cover {
	display: block;
	aspect-ratio: 3 / 4;
	background: var(--ccl-soft);
	overflow: hidden;
}
.ccl-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.ccl-card__placeholder {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	height: 100%;
	background: linear-gradient(160deg, #2b3a42, #121a1f);
	color: #fff;
	text-align: center;
	padding: 12px;
}
.ccl-card__placeholder-make {
	font-size: 0.85em;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	opacity: 0.8;
}
.ccl-card__placeholder-year {
	font-size: 2.4em;
	font-weight: 700;
	color: var(--ccl-accent);
}
.ccl-card__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 12px 14px 14px;
}
.ccl-card__badges {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.ccl-badge {
	font-size: 11px;
	line-height: 1;
	padding: 4px 7px;
	border-radius: 3px;
	background: var(--ccl-soft);
	color: var(--ccl-muted);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 600;
}
.ccl-badge--year {
	background: var(--ccl-accent);
	color: #06372a;
}
.ccl-card__title {
	font-weight: 600;
	line-height: 1.3;
	color: var(--ccl-ink);
}
.ccl-card__pub {
	font-size: 12px;
	color: var(--ccl-muted);
}

/* Spec chips on a manual */
.ccl-specs {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
}
.ccl-spec {
	display: flex;
	gap: 6px;
	align-items: baseline;
	border: 1px solid var(--ccl-line);
	border-radius: 999px;
	padding: 5px 12px;
	font-size: 14px;
}
.ccl-spec dt {
	font-weight: 400;
	color: var(--ccl-muted);
	margin: 0;
}
.ccl-spec dd {
	margin: 0;
	font-weight: 600;
}
.ccl-spec a {
	color: inherit;
}

/* Sections, tiles, archive */
.ccl-section-title {
	font-size: 1.5em;
	margin: 40px 0 16px;
}
.ccl-tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 16px;
	margin: 0 0 32px;
}
.ccl-tile {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 22px;
	border-radius: var(--ccl-radius);
	background: var(--ccl-soft);
	color: var(--ccl-ink);
	text-decoration: none;
	border-left: 4px solid var(--ccl-accent);
}
.ccl-tile:hover {
	background: #e9eef0;
}
.ccl-tile__name {
	font-size: 1.2em;
	font-weight: 700;
}
.ccl-tile__count {
	color: var(--ccl-muted);
	font-size: 14px;
}
.ccl-archive__header {
	margin-bottom: 20px;
}
.ccl-archive__title {
	margin-bottom: 4px;
}
.ccl-archive__count {
	color: var(--ccl-muted);
	margin: 0;
}
.ccl-archive__empty {
	padding: 24px 0;
}
.ccl-pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.ccl-description {
	max-width: 760px;
	margin: 24px 0;
}

@media (max-width: 600px) {
	.ccl-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 14px;
	}
	.ccl-finder .ccl-finder__submit {
		flex: 1 1 100%;
	}
}

/* Home hero */
.page-hero .ccl-hero-browse {
	display: inline-block;
	margin-top: 14px;
	color: #fff;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Pagination */
.ccl-pagination .page-numbers {
	display: inline-block;
	min-width: 36px;
	padding: 6px 10px;
	border: 1px solid var(--ccl-line);
	border-radius: var(--ccl-radius);
	text-align: center;
	text-decoration: none;
}
.ccl-pagination .page-numbers.current {
	background: var(--ccl-ink);
	border-color: var(--ccl-ink);
	color: #fff;
}

@media (max-width: 600px) {
	/* Compact spec chips so the reader starts higher on phones. */
	.ccl-specs {
		gap: 6px;
		margin-bottom: 14px;
	}
	.ccl-spec {
		font-size: 12px;
		padding: 3px 9px;
	}
}

/* What's inside */
.ccl-contents {
	margin: 32px 0;
}
.ccl-contents__intro {
	color: var(--ccl-muted);
}
.ccl-contents__part {
	font-size: 1.05em;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ccl-muted);
	margin: 24px 0 8px;
}
.ccl-contents__list {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--ccl-line);
}
.ccl-contents__item {
	display: flex;
	align-items: baseline;
	gap: 12px;
	padding: 10px 4px;
	border-bottom: 1px solid var(--ccl-line);
	margin: 0;
}
.ccl-contents__item.is-current {
	background: var(--ccl-soft);
}
.ccl-contents__code {
	flex: 0 0 2.6em;
	font-weight: 700;
	color: var(--ccl-accent-dark);
}
.ccl-contents__name {
	flex: 1 1 auto;
	min-width: 0;
	font-weight: 600;
}
.ccl-contents__note {
	display: block;
	font-weight: 400;
	font-size: 13px;
	color: var(--ccl-muted);
}
.ccl-contents__note:empty {
	display: none;
}
.ccl-contents__open {
	flex: 0 0 auto;
	font-size: 13px;
	white-space: nowrap;
}

/* Section pages */
.ccl-breadcrumbs {
	font-size: 13px;
	color: var(--ccl-muted);
	margin-bottom: 18px;
}
.ccl-breadcrumbs a {
	color: inherit;
}
.ccl-breadcrumbs span[aria-hidden] {
	margin: 0 6px;
}
.ccl-section-page__head {
	display: grid;
	grid-template-columns: 180px 1fr;
	gap: 28px;
	align-items: start;
	margin-bottom: 12px;
}
.ccl-section-page__cover img {
	width: 100%;
	height: auto;
	border: 1px solid var(--ccl-line);
	border-radius: var(--ccl-radius);
}
.ccl-section-page__eyebrow {
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ccl-accent-dark);
	font-weight: 700;
	margin: 0 0 6px;
}
.ccl-section-page__title {
	margin: 0 0 6px;
}
.ccl-section-page__book {
	color: var(--ccl-muted);
	margin: 0 0 14px;
}
.ccl-section-page__summary {
	font-size: 1.05em;
}
.ccl-section-page__covers {
	columns: 2 280px;
	column-gap: 32px;
	margin: 0 0 24px 1.2em;
}
.ccl-section-page__covers li {
	break-inside: avoid;
	margin-bottom: 6px;
}
.ccl-section-page__pager {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	margin: 24px 0;
	font-weight: 600;
}
.ccl-section-page__pager a[rel="next"] {
	margin-left: auto;
	text-align: right;
}
@media (max-width: 600px) {
	.ccl-section-page__head {
		grid-template-columns: 1fr;
	}
	.ccl-section-page__cover {
		max-width: 140px;
	}
}

/* Manual page: summary above, sections column beside the reader */
.ccl-summary,
.ccl-section-page__summary,
.ccl-contents__intro {
	/* Full width with squared edges; hyphenation keeps justified lines evenly spaced. */
	max-width: none;
	text-align: justify;
	text-justify: inter-word;
	hyphens: auto;
	-webkit-hyphens: auto;
}
.ccl-summary {
	margin: 0 0 20px;
	font-size: 1.02em;
}
.ccl-summary p:last-child {
	margin-bottom: 0;
}
.ccl-manual-layout.has-sections {
	display: grid;
	grid-template-columns: 250px minmax(0, 1fr);
	gap: 18px;
	align-items: start;
}
.ccl-secnav {
	position: sticky;
	top: 16px;
	font-size: 14px;
}
.ccl-secnav__details {
	border: 1px solid var(--ccl-line);
	border-radius: var(--ccl-radius);
	background: #fff;
}
.ccl-secnav__heading {
	padding: 10px 12px;
	font-weight: 700;
	cursor: pointer;
	list-style: none;
	border-bottom: 1px solid var(--ccl-line);
}
.ccl-secnav__heading::-webkit-details-marker {
	display: none;
}
.ccl-secnav__heading span {
	font-weight: 400;
	color: var(--ccl-muted);
}
.ccl-secnav__scroll {
	/* Matches the reader's height minus the "Sections" heading. */
	max-height: calc(clamp(480px, 82vh, 1100px) - 44px);
	max-height: calc(clamp(480px, 82dvh, 1100px) - 44px);
	overflow-y: auto;
	padding: 4px 0 8px;
}
.ccl-secnav__part {
	margin: 10px 12px 4px;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ccl-muted);
}
.ccl-secnav__list {
	list-style: none;
	margin: 0;
	padding: 0;
}
.ccl-secnav__list li {
	display: flex;
	align-items: center;
	margin: 0;
}
.ccl-secnav__jump {
	display: flex;
	align-items: baseline;
	gap: 6px;
	flex: 1 1 auto;
	min-width: 0;
	padding: 5px 6px 5px 12px;
	color: var(--ccl-ink);
	text-decoration: none;
	border-left: 3px solid transparent;
}
.ccl-secnav__jump:hover {
	background: var(--ccl-soft);
}
.ccl-secnav__jump.is-active {
	border-left-color: var(--ccl-accent);
	background: var(--ccl-soft);
	font-weight: 600;
}
.ccl-secnav__code {
	flex: 0 0 2.2em;
	color: var(--ccl-accent-dark);
	font-weight: 700;
	font-size: 12px;
}
.ccl-secnav__title {
	flex: 1 1 auto;
	min-width: 0;
	line-height: 1.3;
}
.ccl-secnav__pages {
	flex: 0 0 auto;
	font-size: 11px;
	color: var(--ccl-muted);
}
.ccl-secnav__more {
	flex: 0 0 auto;
	padding: 5px 10px 5px 4px;
	font-size: 11px;
	color: var(--ccl-muted);
}
@media (max-width: 900px) {
	.ccl-manual-layout.has-sections {
		grid-template-columns: 1fr;
	}
	.ccl-secnav {
		position: static;
	}
	.ccl-secnav__scroll {
		max-height: 50vh;
	}
}

/* Section details panel (opened from "details" in the sections column) */
.ccl-secdetail {
	margin: 0 0 20px;
	padding: 18px 20px;
	border: 1px solid var(--ccl-line);
	border-left: 4px solid var(--ccl-accent);
	border-radius: var(--ccl-radius);
	background: var(--ccl-soft);
	scroll-margin-top: 16px;
}
.ccl-secdetail__eyebrow {
	margin: 0 0 4px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--ccl-accent-dark);
}
.ccl-secdetail__title {
	margin: 0 0 10px;
	font-size: 1.4em;
}
.ccl-secdetail__summary {
	text-align: justify;
	hyphens: auto;
	-webkit-hyphens: auto;
	margin: 0 0 12px;
}
.ccl-secdetail__label {
	margin: 0 0 6px;
	font-weight: 700;
}
.ccl-secdetail__covers {
	columns: 2 260px;
	column-gap: 28px;
	margin: 0 0 14px 1.2em;
}
.ccl-secdetail__covers li {
	break-inside: avoid;
	margin-bottom: 4px;
}
.ccl-secdetail__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 18px;
}
.ccl-secdetail .ccl-secdetail__read {
	margin: 0;
}
.ccl-secnav__more.is-shown {
	color: var(--ccl-accent-dark);
	font-weight: 700;
}
