/*
Theme Name: Charlotteville CC
Template: twentytwentyfour
Description: Child theme carrying the Charlotteville Cycling Club design system. Change "Template" to the folder name of your current parent theme.
Version: 0.1.50
Text Domain: charlotteville
*/

/* Details theme.json can't express */
.is-style-eyebrow { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--wp--preset--color--green); }
.is-style-club-stripe { height: 6px; background: linear-gradient(90deg, var(--wp--preset--color--green) 50%, var(--wp--preset--color--red) 50%); border: 0; margin: 0; }
.wp-block-button.is-style-outline > .wp-block-button__link { background: transparent; color: var(--wp--preset--color--ink); border-color: var(--wp--preset--color--ink); }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); }
.wp-block-button__link:active { transform: translateY(1px); }
.is-style-club-card,
.is-style-club-card-race,
.is-style-club-card-rascals { background: var(--wp--preset--color--white); border: 1px solid #e4e1d8; border-top: 6px solid var(--wp--preset--color--secondary); }
/* Top border colours: Club card dark grey, Race card red, Rascals card green. */
.is-style-club-card-race { border-top-color: var(--wp--preset--color--red); }
.is-style-club-card-rascals { border-top-color: var(--wp--preset--color--green); }

/* Header */
/* The header is one 84px row at every width; the calendar block reads --ccc-site-header for its jump offset. */
:root { --ccc-sticky-offset: 84px; --ccc-site-header: 84px; }
body.admin-bar { --ccc-sticky-offset: 116px; }
.wp-site-blocks > header.wp-block-template-part { position: sticky; top: 0; z-index: 100; margin-block-start: 0; }
body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 32px; }
@media (max-width: 782px) { body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 46px; } }
@media (max-width: 600px) { body.admin-bar .wp-site-blocks > header.wp-block-template-part { top: 0; } }
.ccc-header { border-bottom: 2px solid var(--wp--preset--color--ink); padding-top: 18px; padding-bottom: 12px; position: relative; }
.ccc-header::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: linear-gradient(90deg, var(--wp--preset--color--green) 50%, var(--wp--preset--color--red) 50%); }
.ccc-header__row { gap: var(--wp--preset--spacing--50); min-height: 52px; }
.ccc-header__actions { gap: var(--wp--preset--spacing--40); }
.ccc-lockup { margin: 0; }
.ccc-lockup a { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--display); font-size: 28px; line-height: 0.9; text-transform: uppercase; }
.ccc-lockup img { width: 52px; height: 52px; }
.ccc-nav .wp-block-navigation-item__content { padding: 8px 12px; }
.ccc-nav .current-menu-item > .wp-block-navigation-item__content,
.ccc-nav .wp-block-navigation-item__content[aria-current="page"] { color: var(--wp--preset--color--green); box-shadow: inset 0 -3px 0 var(--wp--preset--color--green); }
.ccc-join .wp-block-button__link { background: var(--wp--preset--color--red); border-color: var(--wp--preset--color--red); color: var(--wp--preset--color--white); font-size: 14px; padding: 10px 16px; white-space: nowrap; }
.ccc-join .wp-block-button__link:hover { background: var(--wp--preset--color--red-700); border-color: var(--wp--preset--color--red-700); }
.ccc-nav .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--paper); padding: var(--wp--preset--spacing--50); }
/* The full menu needs ~860px, so show the ☰ button below 900px (core switches at 600px). */
@media (min-width: 600px) and (max-width: 899px) {
	.ccc-nav .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex; }
	.ccc-nav .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none; }
}
/* No-JavaScript menu: the ☰ button needs JS, so below 900px a <details> menu takes its place. */
.ccc-nojs-menu { display: none; }
@media (scripting: none) and (max-width: 899px) {
	.ccc-header .ccc-nav { display: none; }
	.ccc-nojs-menu { display: block; }
}
.ccc-nojs-menu summary { display: flex; align-items: center; justify-content: center; width: 32px; height: 40px; cursor: pointer; list-style: none; color: var(--wp--preset--color--ink); }
.ccc-nojs-menu summary::-webkit-details-marker { display: none; }
.ccc-nojs-menu summary svg { fill: currentColor; }
.ccc-nojs-menu summary:focus-visible { outline: 2px solid var(--wp--preset--color--red); outline-offset: 2px; }
.ccc-nojs-menu summary:focus:not(:focus-visible) { outline: none; }
.ccc-nojs-menu__close,
.ccc-nojs-menu[open] .ccc-nojs-menu__open { display: none; }
.ccc-nojs-menu[open] .ccc-nojs-menu__close { display: block; }
.ccc-nojs-menu .screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.ccc-nojs-menu ul { position: absolute; top: calc(100% + 2px); left: 0; right: 0; margin: 0; padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50) var(--wp--preset--spacing--50); list-style: none; background: var(--wp--preset--color--paper); border-bottom: 2px solid var(--wp--preset--color--ink); }
.ccc-nojs-menu li { margin: 0; }
.ccc-nojs-menu li a { display: block; padding: 4px 0; font-family: var(--wp--preset--font-family--display); font-size: 36px; line-height: 1.1; letter-spacing: 0.01em; text-transform: uppercase; text-decoration: none; color: var(--wp--preset--color--ink); }
.ccc-nojs-menu li a:hover { color: var(--wp--preset--color--green); }
.ccc-nojs-menu li a:focus-visible { outline: 2px solid var(--wp--preset--color--red); outline-offset: 2px; }
/* Small phones: shrink the lockup and Join Us so the row fits down to 320px. */
@media (max-width: 420px) {
	.ccc-header__row { gap: var(--wp--preset--spacing--40); }
	.ccc-header__actions { gap: var(--wp--preset--spacing--30); }
	.ccc-lockup a { gap: 8px; font-size: 22px; }
	.ccc-lockup img { width: 40px; height: 40px; }
	.ccc-join .wp-block-button__link { font-size: 13px; padding: 8px 12px; }
}
.ccc-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { font-family: var(--wp--preset--font-family--display); font-size: 36px; letter-spacing: 0.01em; padding: 4px 0; }

/* Footer */
.wp-site-blocks > footer.wp-block-template-part { margin-block-start: 0; }
.ccc-footer { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--50); }
.ccc-footer__grid { gap: var(--wp--preset--spacing--60); }
.ccc-footer__crest { margin: 0; }
.ccc-footer__crest img { width: 96px; height: auto; display: block; }
.ccc-footer__col > * + * { margin-top: 20px; }
/* The list and the social icons have their own "margin: 0" rules further down, so the gap must be set with higher specificity. */
.ccc-footer .ccc-footer__col > .ccc-footer__links,
.ccc-footer .ccc-footer__col > .wp-block-social-links { margin-top: 20px; }
.ccc-footer__title { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.8; }
.ccc-footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ccc-footer a { color: var(--wp--preset--color--white); text-decoration: none; font-size: 15px; }
.ccc-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.ccc-footer a:focus-visible { outline: 2px solid var(--wp--preset--color--white); outline-offset: 2px; }
.ccc-footer .wp-block-social-links { gap: 12px; margin: 0; }
.ccc-footer .wp-block-social-links .wp-social-link a { padding: 0; }
.ccc-footer__legal { margin-top: var(--wp--preset--spacing--60); padding-top: var(--wp--preset--spacing--40); border-top: 1px solid rgba(255, 255, 255, 0.3); font-size: 13px; line-height: 1.6; }

/* ---- Page sections (from the homepage mock-up) ---- */
/* Sections sit flush against each other; spacing comes from their own padding. */
.wp-site-blocks > main > * { margin-block-start: 0; }
.ccc-hero, .ccc-pagehead, .ccc-rides, .ccc-programme, .ccc-news { margin-block-start: 0; }

/* Hero (green on the home page, ink on race pages) */
.ccc-hero { padding-top: var(--wp--preset--spacing--80); padding-bottom: var(--wp--preset--spacing--80); }
.ccc-hero__cols { gap: var(--wp--preset--spacing--70); }
.ccc-hero .is-style-eyebrow { color: var(--wp--preset--color--white); opacity: 0.85; }
.ccc-hero .ccc-eyebrow--red-on-dark { color: #e0786b; opacity: 1; }
.ccc-hero h1 { margin-top: var(--wp--preset--spacing--40); }
.ccc-hero p.has-lead-font-size { max-width: 34em; }
.ccc-hero__buttons, .ccc-hero .wp-block-buttons { margin-top: var(--wp--preset--spacing--50); gap: var(--wp--preset--spacing--30); }
.wp-block-button.is-style-outline.ccc-btn-on-dark > .wp-block-button__link { color: var(--wp--preset--color--white); border-color: var(--wp--preset--color--white); background: transparent; }
.wp-block-button.is-style-outline.ccc-btn-on-dark > .wp-block-button__link:hover { background: var(--wp--preset--color--white); color: var(--wp--preset--color--ink); }
/* Striped image placeholder: delete the group and drop in an Image block when you have a photo. */
.ccc-placeholder { aspect-ratio: 4 / 3; position: relative; background: repeating-linear-gradient(135deg, rgba(0,0,0,.14) 0 14px, rgba(0,0,0,.04) 14px 28px); }
.ccc-placeholder--dark { background: repeating-linear-gradient(135deg, rgba(0,0,0,.28) 0 14px, rgba(255,255,255,.05) 14px 28px); }
.ccc-hero--race .ccc-placeholder--dark { background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 14px, rgba(255,255,255,.02) 14px 28px); }
.ccc-placeholder__label { position: absolute; left: 12px; bottom: 10px; margin: 0; font-family: var(--wp--preset--font-family--mono); font-size: 11px; opacity: .8; }
.ccc-hero .wp-block-image img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

/* Info strip */
.ccc-strip { border-bottom: 1px solid var(--wp--preset--color--rule); padding: 0; }
/* The strip uses the same three-column grid as the Ride / Race / Rascals cards below it (same gap, equal widths),
   so text lines up with each card's left edge, and the dividers sit in the middle of the gaps. */
.ccc-strip__cols { gap: var(--wp--preset--spacing--50); margin: 0; }
.ccc-strip__cell { position: relative; padding: var(--wp--preset--spacing--50) 0; }
.ccc-strip__cell + .ccc-strip__cell::before { content: ""; position: absolute; top: 0; bottom: 0; left: calc(var(--wp--preset--spacing--50) / -2); border-left: 1px solid var(--wp--preset--color--rule); }
.ccc-strip__cell > * { margin: 0; }
.ccc-strip__cell > * + * { margin-top: var(--wp--preset--spacing--20); }
.ccc-eyebrow--red { color: var(--wp--preset--color--red) !important; }
@media (max-width: 781px) {
	.ccc-strip__cols { gap: 0; }
	.ccc-strip__cell { padding-left: var(--wp--preset--spacing--50); padding-right: var(--wp--preset--spacing--50); }
	.ccc-strip__cell + .ccc-strip__cell::before { top: 0; bottom: auto; left: 0; right: 0; border-left: 0; border-top: 1px solid var(--wp--preset--color--rule); }
}

/* News cards */
.ccc-news { padding-top: var(--wp--preset--spacing--80); padding-bottom: var(--wp--preset--spacing--80); }
.ccc-news__head { margin-bottom: var(--wp--preset--spacing--50); align-items: flex-end; }
.ccc-news__head h2 { margin: 0; }
.ccc-news__all { margin: 0; font-weight: 600; }
.ccc-news-card.is-style-club-card,
.ccc-news-card.is-style-club-card-rascals { padding: 0; height: 100%; }
.ccc-news-card .wp-block-post-featured-image { margin: 0; background: var(--wp--preset--color--sunken); }
.ccc-news-card .wp-block-post-featured-image img { width: 100%; height: 100%; object-fit: cover; }
.ccc-news-card__body { padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50) var(--wp--preset--spacing--50); }
.ccc-news-card__body > * { margin: 0; }
.ccc-news-card__body > * + * { margin-top: var(--wp--preset--spacing--20); }
.ccc-news-card .wp-block-post-title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ccc-news-card .wp-block-post-title a:hover { color: var(--wp--preset--color--green); }
.ccc-news-card .wp-block-post-excerpt { font-size: 14px; }
.ccc-news-card .wp-block-post-terms a { color: inherit; text-decoration: none; }

/* Page header */
.ccc-pagehead { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--50); }
.ccc-pagehead h1 { margin: var(--wp--preset--spacing--20) 0 var(--wp--preset--spacing--40); }
.ccc-pagehead p.has-lead-font-size { max-width: 36em; }

/* Ride groups */
.ccc-rides { padding-bottom: var(--wp--preset--spacing--80); }
.ccc-rides__title { margin: 0 0 var(--wp--preset--spacing--40); }
.ccc-rides__list { border-top: 2px solid var(--wp--preset--color--ink); }
.ccc-ride-row { align-items: center; gap: var(--wp--preset--spacing--40); margin: 0; padding: var(--wp--preset--spacing--40) 0; border-bottom: 1px solid var(--wp--preset--color--rule); }
.ccc-ride-row h3, .ccc-ride-row p { margin: 0; }
.ccc-ride-row .wp-block-buttons { justify-content: flex-end; }
.ccc-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.ccc-pill { display: inline-block; padding: 2px 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--wp--preset--color--sunken); color: var(--wp--preset--color--secondary); }
.ccc-pill--green { background: var(--wp--preset--color--green-100); color: var(--wp--preset--color--green-700); }
.ccc-pill--red { background: var(--wp--preset--color--red-100); color: var(--wp--preset--color--red-700); }
/* Pill as paragraph styles (Styles panel): same look as .ccc-pill, sized to the text. */
.is-style-pill, .is-style-pill-green, .is-style-pill-red { display: inline-block; width: fit-content; padding: 2px 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em; line-height: 1.4; text-transform: uppercase; background: var(--wp--preset--color--sunken); color: var(--wp--preset--color--secondary); }
.is-style-pill-green { background: var(--wp--preset--color--green-100); color: var(--wp--preset--color--green-700); }
.is-style-pill-red { background: var(--wp--preset--color--red-100); color: var(--wp--preset--color--red-700); }
/* Equal-height rows: every row takes the height of the tallest one (side-by-side layout only). */
@media (min-width: 782px) { .ccc-rides__list { display: grid; grid-auto-rows: 1fr; } .ccc-rides__list > .ccc-ride-row { box-sizing: border-box; } }
@media (max-width: 781px) { .ccc-ride-row .wp-block-buttons { justify-content: flex-start; } }

/* Race programme */
.ccc-programme { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--80); }
.ccc-programme h2 { padding-bottom: var(--wp--preset--spacing--30); border-bottom: 2px solid var(--wp--preset--color--ink); margin-bottom: 0; }
.ccc-programme__row { padding: var(--wp--preset--spacing--30) 0; border-bottom: 1px solid var(--wp--preset--color--rule); margin: 0; }
.ccc-programme__row p { margin: 0; }
.ccc-tag { padding: 2px 8px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--wp--preset--color--sunken); }
.ccc-tag--red { background: var(--wp--preset--color--red-100); color: var(--wp--preset--color--red-700); }
.ccc-programme .has-caption-font-size { margin-top: var(--wp--preset--spacing--40); }

/* Explore cards (Ride / Race / Rascals) */
.ccc-explore { padding-top: var(--wp--preset--spacing--70); padding-bottom: 0; }
.ccc-explore__cols { gap: var(--wp--preset--spacing--50); }
.ccc-explore-card.is-style-club-card,
.ccc-explore-card.is-style-club-card-race,
.ccc-explore-card.is-style-club-card-rascals { position: relative; padding: 0; height: 100%; }
/* Equal-height cards: each column stretches to the tallest, and the card inside fills its column (works with or without images). */
.ccc-explore__cols > .wp-block-column { display: flex; flex-direction: column; }
.ccc-explore__cols > .wp-block-column > :is(.is-style-club-card, .is-style-club-card-race, .is-style-club-card-rascals) { flex: 1 1 auto; margin-block-start: 0; }
.ccc-explore-card .wp-block-image { margin: 0; }
.ccc-explore-card .wp-block-image a { display: block; } /* link fills the card width, so small images stretch to it */
/* Card with no image yet: keep the heading aligned with the others using a 3:2 placeholder panel. Disappears once an image is added. */
.ccc-explore-card:not(:has(.wp-block-image))::before { content: ""; display: block; aspect-ratio: 3 / 2; margin-bottom: var(--wp--preset--spacing--50); background: var(--wp--preset--color--sunken); }
.ccc-explore-card .wp-block-image img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.ccc-explore-card__body { padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50) var(--wp--preset--spacing--50); }
.ccc-explore-card__body > * { margin: 0; }
.ccc-explore-card__body > * + * { margin-top: var(--wp--preset--spacing--20); }
.ccc-explore-card { --ccc-explore-accent: var(--wp--preset--color--secondary); --ccc-explore-hover: var(--wp--preset--color--ink); }
.ccc-explore-card.is-style-club-card-race { --ccc-explore-accent: var(--wp--preset--color--red); --ccc-explore-hover: var(--wp--preset--color--red-700); }
.ccc-explore-card.is-style-club-card-rascals { --ccc-explore-accent: var(--wp--preset--color--green); --ccc-explore-hover: var(--wp--preset--color--green-700); }
.ccc-explore-card h3 a { color: var(--ccc-explore-accent); text-decoration: none; }
.ccc-explore-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card is clickable */
.ccc-explore-card:hover h3 a { color: var(--ccc-explore-hover); }
.ccc-explore-card h3 a:focus-visible { outline: 2px solid var(--wp--preset--color--red); outline-offset: 2px; }
.ccc-explore + .ccc-news { padding-top: var(--wp--preset--spacing--70); }
/* Two Explore card sections stacked: keep the same 24px gap between the rows as a card grid has. */
.ccc-explore + .ccc-explore { padding-top: var(--wp--preset--spacing--50); margin-block-start: 0; }

/* 3 col card grid for posts */
.ccc-cards { padding-top: var(--wp--preset--spacing--60); padding-bottom: var(--wp--preset--spacing--80); }
.ccc-cards .wp-block-query-pagination { margin-top: var(--wp--preset--spacing--60); }

/* Post card accent: Rascals (category or tag) is green, Races (category or tag) is red, everything else is dark grey.
   If a post matches both Rascals and Races, the conflict falls back to dark grey. */
.wp-block-post { --ccc-card-accent: var(--wp--preset--color--secondary); }
.wp-block-post:is(.category-rascals, .tag-rascals) { --ccc-card-accent: var(--wp--preset--color--green); }
.wp-block-post:is(.category-races, .tag-races) { --ccc-card-accent: var(--wp--preset--color--red); }
.wp-block-post:is(.category-rascals, .tag-rascals):is(.category-races, .tag-races) { --ccc-card-accent: var(--wp--preset--color--secondary); }
.wp-block-post .ccc-news-card { border-top-color: var(--ccc-card-accent); }
.wp-block-post .ccc-news-card .wp-block-post-terms { color: var(--ccc-card-accent); }
.wp-block-post .ccc-news-card .wp-block-post-terms a { color: inherit; }

/* Single post */
.ccc-article { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--80); --ccc-card-accent: var(--wp--preset--color--secondary); }
body:is(.category-rascals, .tag-rascals) .ccc-article { --ccc-card-accent: var(--wp--preset--color--green); }
body:is(.category-races, .tag-races) .ccc-article { --ccc-card-accent: var(--wp--preset--color--red); }
body:is(.category-rascals, .tag-rascals):is(.category-races, .tag-races) .ccc-article { --ccc-card-accent: var(--wp--preset--color--secondary); }
.ccc-article > * { margin-block-start: 0; }
.ccc-article__cat { color: var(--ccc-card-accent); margin-bottom: var(--wp--preset--spacing--30); }
.ccc-article__cat a { color: inherit; text-decoration: none; }
.ccc-article h1.wp-block-post-title { margin: 0 0 var(--wp--preset--spacing--30); }
.ccc-article__date { color: var(--wp--preset--color--muted); }
.ccc-article__image { margin-top: var(--wp--preset--spacing--60); margin-bottom: var(--wp--preset--spacing--60); }
.ccc-article__image img { width: 100%; height: 100%; object-fit: cover; }
.ccc-article__date + .ccc-article__body { margin-top: var(--wp--preset--spacing--60); }
.ccc-article__body { margin-top: var(--wp--preset--spacing--60); font-size: 17px; }
.ccc-article__body > * + * { margin-top: var(--wp--preset--spacing--40); }
.ccc-article__body h2, .ccc-article__body h3 { margin-top: var(--wp--preset--spacing--60); }
.ccc-article__tags { margin-top: var(--wp--preset--spacing--60); font-size: 13px; color: var(--wp--preset--color--muted); }
.ccc-article__tags a { display: inline-block; margin: 0 4px 4px 0; padding: 2px 10px; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; background: var(--wp--preset--color--sunken); color: var(--wp--preset--color--secondary); }
.ccc-article__tags a:hover { background: var(--wp--preset--color--ink); color: var(--wp--preset--color--paper); }
.ccc-article .is-style-club-stripe { margin-top: var(--wp--preset--spacing--60); margin-bottom: var(--wp--preset--spacing--50); }
.ccc-article__nav { gap: var(--wp--preset--spacing--50); }
.ccc-article__nav .post-navigation-link-previous, .ccc-article__nav .post-navigation-link-next { flex: 1 1 0; font-weight: 600; margin: 0; }
.ccc-article__nav a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ccc-article__nav a:hover { color: var(--wp--preset--color--green); }
.ccc-article__comments { margin-top: var(--wp--preset--spacing--70); }
.ccc-news--more { border-top: 2px solid var(--wp--preset--color--ink); }
@media (max-width: 600px) { .ccc-article__nav { flex-direction: column; align-items: flex-start; } }

/* Calendar page */
.ccc-calendar-page { padding-top: var(--wp--preset--spacing--70); padding-bottom: var(--wp--preset--spacing--80); margin-block-start: 0; }

/* GPX route cards (Routes archive) in the club card style */
.gpx-route-library { gap: var(--wp--preset--spacing--50); }
.gpx-route-library .gpx-route-card { background: var(--wp--preset--color--white); border: 1px solid #e4e1d8; border-top: 6px solid var(--wp--preset--color--secondary); border-radius: 0; }
.gpx-route-library .gpx-route-card__body { padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50) var(--wp--preset--spacing--50); gap: var(--wp--preset--spacing--20); }
.gpx-route-library .gpx-route-card__body .wp-block-post-title { font-family: var(--wp--preset--font-family--display); line-height: 1.1; }
.gpx-route-library .gpx-route-card__body .wp-block-post-title a:hover { color: var(--wp--preset--color--green); }
.gpx-route-library .gpx-route-download, .gpx-route-library .gpx-route-link { color: var(--wp--preset--color--green); font-weight: 600; }
.gpx-route-library .gpx-route-download:hover, .gpx-route-library .gpx-route-link:hover { color: var(--wp--preset--color--green-700); }

/* Keep Leaflet maps (their panes use z-index up to 1000) underneath the sticky header. */
.leaflet-container, .gpx-route-card__map { isolation: isolate; }

/* GPX Route Library: type pills, filter box, units toggle and pagination in the club style. */
.wp-block-gpx-route-library-route-gallery .gpx-route-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--wp--preset--spacing--50); }
.wp-block-gpx-route-library-route-gallery .gpx-route-pills__pill { display: inline-block; padding: 6px 12px; font-size: 11px; font-weight: 600; letter-spacing: .06em; line-height: 1.4; text-transform: uppercase; text-decoration: none; background: var(--wp--preset--color--sunken); color: var(--wp--preset--color--ink); transition: background-color .15s, color .15s; }
.wp-block-gpx-route-library-route-gallery .gpx-route-pills__pill:hover { background: var(--wp--preset--color--green-100); color: var(--wp--preset--color--green-700); }
.wp-block-gpx-route-library-route-gallery .gpx-route-pills__pill[aria-current="true"] { background: var(--wp--preset--color--green); color: var(--wp--preset--color--white); }
.wp-block-gpx-route-library-route-gallery .gpx-route-pills__pill:focus-visible { outline: 2px solid var(--wp--preset--color--red); outline-offset: 2px; }

.wp-block-gpx-route-library-route-gallery .gpx-route-filter { --gpx-filter-accent: var(--wp--preset--color--green); background: var(--wp--preset--color--white); border: 1px solid #e4e1d8; border-top: 6px solid var(--wp--preset--color--secondary); border-radius: 0; padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--50); gap: var(--wp--preset--spacing--40); margin-bottom: var(--wp--preset--spacing--50); }
.wp-block-gpx-route-library-route-gallery .gpx-route-filter__field label,
.wp-block-gpx-route-library-route-gallery .gpx-route-filter__range-label { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--secondary); }
.wp-block-gpx-route-library-route-gallery .gpx-route-filter__radio-group label { font-size: var(--wp--preset--font-size--small); font-weight: 400; letter-spacing: 0; text-transform: none; color: var(--wp--preset--color--ink); }
.wp-block-gpx-route-library-route-gallery .gpx-route-filter__field input:not([type=radio]):not([type=checkbox]):not([type=range]),
.wp-block-gpx-route-library-route-gallery .gpx-route-filter__field select { border: 1px solid var(--wp--preset--color--rule); border-radius: 0; background: var(--wp--preset--color--paper); color: var(--wp--preset--color--ink); font-family: inherit; }
.wp-block-gpx-route-library-route-gallery .gpx-route-filter__clear { color: var(--wp--preset--color--green); font-weight: 600; }
.wp-block-gpx-route-library-route-gallery .gpx-route-units { padding: var(--wp--preset--spacing--30) var(--wp--preset--spacing--50); }

.wp-block-gpx-route-library-route-gallery .gpx-route-library__pagination { margin-top: var(--wp--preset--spacing--60); }
.wp-block-gpx-route-library-route-gallery .gpx-route-library__pagination .page-numbers { border-radius: 0; font-weight: 600; }
.wp-block-gpx-route-library-route-gallery .gpx-route-library__pagination a.page-numbers { border: 1px solid var(--wp--preset--color--rule); }
.wp-block-gpx-route-library-route-gallery .gpx-route-library__pagination a.page-numbers:hover { border-color: var(--wp--preset--color--green); color: var(--wp--preset--color--green); }
.wp-block-gpx-route-library-route-gallery .gpx-route-library__pagination span.page-numbers.current { background: var(--wp--preset--color--green); color: var(--wp--preset--color--white); border-color: var(--wp--preset--color--green); }
.wp-block-gpx-route-library-route-gallery .gpx-route-filter__submit { font-size: 15px; line-height: 1.2; padding: 10px 18px; border-radius: 0; }

/* Route library: pills first, then the Units choice and the filter shown as one card. */
.wp-block-gpx-route-library-route-gallery { display: flex; flex-direction: column; }
.wp-block-gpx-route-library-route-gallery .gpx-route-pills { order: 1; }
.wp-block-gpx-route-library-route-gallery .gpx-route-units { order: 2; }
.wp-block-gpx-route-library-route-gallery .gpx-route-filter:not(.gpx-route-units) { order: 3; }
.wp-block-gpx-route-library-route-gallery .gpx-route-library { order: 4; }
.wp-block-gpx-route-library-route-gallery .gpx-route-library__pagination, .wp-block-gpx-route-library-route-gallery .gpx-route-library__empty { order: 5; }
.wp-block-gpx-route-library-route-gallery .gpx-route-units:has(~ .gpx-route-filter:not(.gpx-route-units)) { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.wp-block-gpx-route-library-route-gallery .gpx-route-units ~ .gpx-route-filter:not(.gpx-route-units) { border-top: 0; padding-top: var(--wp--preset--spacing--30); }

/* Short article template: wide header and image, a narrow left-aligned reading column, larger type, first paragraph as a lead. */
.ccc-short__head { margin-bottom: var(--wp--preset--spacing--60); }
.ccc-short__meta { gap: var(--wp--preset--spacing--30); align-items: baseline; margin-bottom: var(--wp--preset--spacing--30); }
.ccc-short__meta > * { margin: 0; }
.ccc-short__meta .ccc-article__cat { margin-bottom: 0; }
.ccc-short__meta .ccc-article__date::before { content: "\00B7"; margin-right: var(--wp--preset--spacing--30); }
.ccc-short__head h1.wp-block-post-title { margin: 0; max-width: 16em; }
.ccc-short__image { margin-top: 0; }
.ccc-short__body { font-size: 19px; line-height: 1.65; margin-top: 0; }
.ccc-short__body > :first-child:is(p) { font-size: var(--wp--preset--font-size--lead); line-height: 1.5; font-weight: 500; color: var(--wp--preset--color--ink); }
.ccc-short__body > * + * { margin-top: var(--wp--preset--spacing--50); }
.ccc-short__body > :is(h2, h3) { margin-top: var(--wp--preset--spacing--70); margin-bottom: calc(var(--wp--preset--spacing--30) * -1); }
.ccc-short__body > :is(blockquote, .wp-block-pullquote) { border-left: 6px solid var(--ccc-card-accent); border-top: 0; border-bottom: 0; padding: var(--wp--preset--spacing--20) 0 var(--wp--preset--spacing--20) var(--wp--preset--spacing--50); font-family: var(--wp--preset--font-family--display); font-size: var(--wp--preset--font-size--display-xs); line-height: 1.2; text-transform: uppercase; text-align: left; }
.ccc-short__body > :is(blockquote, .wp-block-pullquote) p { margin: 0; font-size: inherit; }
.ccc-short__body > .alignwide, .ccc-short__body > .alignfull { margin-top: var(--wp--preset--spacing--60); margin-bottom: var(--wp--preset--spacing--60); }
.ccc-short__tags { margin-top: var(--wp--preset--spacing--70); max-width: 640px; margin-left: 0; margin-right: auto; }
