/* /books/ series-first page. Structure from the Sept 2026 mockup; styled to sit in the current Author Pro theme. */
.post-type-archive-books .nav-secondary { display: none; }
.post-type-archive-books .content-sidebar-wrap { margin-top: 0; }
.post-type-archive-books .content { padding-top: 32px; }
.cg-books-page { max-width: 1140px; margin: 0 auto; }
.cg-books-page a { text-decoration: none; }

.cg-books-head { padding: 0; }
.cg-books-head h1 { font-size: 40px; margin: 0 0 8px; }
.cg-books-head p { font-size: 18px; color: #555; margin: 0 0 20px; max-width: 640px; }
.cg-books-intro p:last-child { margin-bottom: 20px; }
.cg-books-tabs { position: sticky; top: var(--cg-sticky-top, 0px); z-index: 20; display: flex; flex-wrap: wrap; gap: 0 28px; background: #fff; border-bottom: 1px solid #e3e5ea; }
.cg-books-tabs a.is-active { border-bottom-color: #111; }
.cg-series { scroll-margin-top: calc(var(--cg-sticky-top, 0px) + 72px); }
.cg-books-tabs a { padding: 10px 0; font-weight: 700; font-size: 15px; color: #333; border-bottom: 2px solid transparent; }
.cg-books-tabs a:hover { border-bottom-color: #333; }

.cg-latest { display: grid; grid-template-columns: 150px minmax(0, 1fr) auto; gap: 28px; align-items: center; margin: 28px 0 8px; padding: 24px; background: #f5f6f8; border: 1px solid #e3e5ea; border-radius: 6px; }
.cg-latest-cover img { display: block; width: 150px; height: auto; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.cg-latest-kicker { font-size: 13px; font-weight: 700; color: #b8641c; }
.cg-latest h2 { font-size: 28px; margin: 4px 0 4px; line-height: 1.1; }
.cg-latest h2 a { color: #111; }
.cg-latest-series { margin: 0 0 8px; color: #555; }
.cg-latest-blurb { margin: 0; color: #555; font-size: 15px; line-height: 1.5; max-width: 560px; }
.cg-latest-actions { display: flex; flex-direction: column; gap: 10px; }
.cg-latest-actions .button { text-align: center; padding: 12px 22px; font-size: 15px; }
.cg-btn-primary.button { background: #f28c38; color: #1b1206; border: 1px solid #f28c38; }
.cg-btn-secondary.button { background: #fff; color: #111; border: 1px solid #c9ccd3; }

.cg-series { padding: 40px 0 0; }
.cg-series-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding-bottom: 14px; border-bottom: 1px solid #e3e5ea; }
.cg-series-head h2 { font-size: 26px; margin: 0; line-height: 1.15; }
.cg-series-head p { margin: 6px 0 0; color: #555; font-size: 15px; line-height: 1.5; max-width: 680px; }
.cg-series-all { white-space: nowrap; font-weight: 700; font-size: 15px; color: #333; }

.cg-book-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 16px; padding-top: 20px; }
.cg-book-row-small { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.cg-book-card { display: block; color: #111; }
.cg-book-cover { position: relative; display: block; }
.cg-book-cover img { display: block; width: 100%; height: auto; box-shadow: 0 6px 16px rgba(0,0,0,.18); }
.cg-book-nocover { display: block; padding-top: 150%; background: #e3e5ea; }
.cg-book-number { position: absolute; top: 6px; left: 6px; min-width: 22px; height: 22px; padding: 0 6px; display: flex; align-items: center; justify-content: center; background: #111; color: #fff; font-size: 12px; font-weight: 700; border-radius: 3px; }
.cg-book-title { display: block; margin-top: 8px; font-size: 14px; font-weight: 700; line-height: 1.3; }
.cg-book-label { display: block; margin-top: 3px; font-size: 12px; font-weight: 700; color: #b8641c; }
.cg-collections { margin-top: 40px; padding: 28px 0 8px; border-top: 1px solid #e3e5ea; }
.cg-collections .cg-book-title { font-weight: 400; color: #555; font-size: 12px; }

@media (max-width: 800px) {
	.post-type-archive-books .content { padding-left: 5%; padding-right: 5%; }
	.cg-book-row, .cg-book-row-small { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px 12px; }
	.cg-latest { grid-template-columns: 110px minmax(0, 1fr); }
	.cg-latest-cover img { width: 110px; }
	.cg-latest-actions { grid-column: 1 / -1; flex-direction: row; }
	.cg-latest-actions .button { flex: 1; }
	.cg-series-head { flex-direction: column; align-items: flex-start; gap: 8px; }
}
