/* Route directory: compact facts and aligned actions. */
.rp-route-results .rp-card{display:flex;flex-direction:column;height:100%}
.rp-route-results .rp-card-body{display:flex;flex-direction:column;flex:1;min-width:0}
.rp-route-results .rp-card-body>p:not(.rp-route-rating){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;min-height:4.8em}
.rp-route-results .rp-route-card-stats{margin-top:auto}
.rp-route-results .rp-route-card-stats dd{font-size:15px;line-height:1.4}
.rp-route-results .rp-route-view{align-self:flex-start;margin-top:16px;background:#f4c400;color:#111}
.rp-route-results .rp-route-rating{min-height:24px;font-size:15px}
.rp-route-results .rp-route-rating>span{color:#f4c400}
.rp-route-search .rp-route-scale-help{font-size:13px;line-height:1.5;text-align:left}
.rp-route-directory-facts{margin:24px 0;padding:20px;background:#111}
.rp-route-directory-facts>p{font-size:14px;line-height:1.5}
.rp-route-directory-facts .rp-route-card-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.rp-route-directory-facts dt{font-weight:700;color:#f4c400}
.rp-route-directory-facts dd{margin:6px 0}
@media(max-width:600px){.rp-route-results .rp-card-body>p:not(.rp-route-rating){min-height:0}.rp-route-results .rp-route-view{align-self:stretch;text-align:center}}

/* Common route/trip detail shell. */
.rp-route-detail-v2 .rp-detail-media img{width:100%;max-height:460px;object-fit:contain;background:#111}
.rp-route-summary{padding:20px;margin:0 0 20px;background:#111}
.rp-route-summary dl{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin:0}
.rp-route-summary dt{font-size:13px;color:#f4c400;font-weight:700;text-transform:uppercase}
.rp-route-summary dd{margin:5px 0 0;font-size:17px;font-weight:700}
.rp-route-summary>p,.rp-route-summary details{font-size:14px;line-height:1.5}
.rp-route-jumps,.rp-route-end-actions{display:flex;flex-wrap:wrap;gap:10px;margin:22px 0}
.rp-route-jumps a{padding:9px 12px;border:1px solid #555;color:#f4c400;text-decoration:none}
.rp-route-index{padding:16px;background:#111;margin:16px 0}
.rp-route-index summary{cursor:pointer;font-weight:700;color:#f4c400}
.rp-route-index li{margin:8px 0}
.rp-route-table-scroll{overflow:auto;max-width:100%}
.rp-route-table-scroll table{border-collapse:collapse;width:100%;min-width:600px;font-size:15px}
.rp-route-table-scroll caption{text-align:left;margin-bottom:10px;color:#bbb}
.rp-route-table-scroll th,.rp-route-table-scroll td{padding:12px;border:1px solid #444;text-align:left;vertical-align:top}
.rp-route-table-scroll thead{background:#f4c400;color:#111}
.rp-route-more-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.rp-route-more-grid article{min-width:0;padding:12px;background:#111}
.rp-route-more-grid img{width:100%;height:150px;object-fit:cover}
.rp-route-more-grid h3{font-size:18px}
.rp-route-detail-v2 [id]{scroll-margin-top:150px}
.rp-route-map-zoom-stage{min-width:0!important;margin:0 auto}
@media(max-width:720px){.rp-route-summary dl{grid-template-columns:repeat(2,minmax(0,1fr))}.rp-route-detail-v2 .rp-detail-media img{max-height:300px}.rp-route-more-grid{grid-template-columns:1fr}.rp-route-summary{padding:16px}.rp-route-jumps a{flex:1;text-align:center}}
.rp-route-detail-v2 .rp-route-map-modal-panel{height:92dvh}
.rp-route-detail-v2 .rp-route-map-modal-media{flex:1;min-height:0}

/* Keep invitation and results together so a tall sidebar cannot create a gap. */
@media(min-width:901px){
 .rp-routes-layout{grid-template-areas:"main search"!important;grid-template-rows:auto;align-items:start}
 .rp-route-main-column{grid-area:main;display:flex;flex-direction:column;gap:16px;min-width:0}
 .rp-route-main-column>.rp-route-invitation,.rp-route-main-column>.rp-route-results{margin-top:0;min-width:0}
}
@media(max-width:900px){.rp-route-main-column{display:contents}}

/* Photo and existing practical facts enclosed in a single visual block. */
.rp-route-detail-v2 .rp-route-overview-block{background:#101213;border:1px solid #303336;margin-bottom:22px;overflow:hidden}
.rp-route-detail-v2 .rp-route-overview-block>.rp-detail-media{margin:0}
.rp-route-detail-v2 .rp-route-overview-block>.rp-route-summary{margin:0;background:transparent}

/* Route/trip facts use the event fact-card layout. */
.rp-route-detail-v2 .rp-route-summary dl{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0}
.rp-route-detail-v2 .rp-route-summary dl>div{background:#0c0c0c;border:0;padding:11px;min-width:0}
.rp-route-detail-v2 .rp-route-summary dt{display:block;color:#f4c400;font-size:14px;line-height:1.4;font-weight:700;margin-bottom:8px;text-transform:uppercase}
.rp-route-detail-v2 .rp-route-summary dd{color:#fff;font-size:17px;line-height:1.5;font-weight:700;overflow-wrap:anywhere;margin:0}
@media(max-width:720px){.rp-route-detail-v2 .rp-route-summary dl{grid-template-columns:minmax(0,1fr)}}

/* Shared labels, icons and difficulty stars across route/trip surfaces. */
.rp-route-detail-v2 .rp-route-summary dt,.rp-route-map-modal .rp-route-map-fact-label,.rp-route-directory-facts dt{display:flex;align-items:center;gap:8px;color:#f4c400}
.rp-route-summary dt>.rp-icon-solid,.rp-route-map-fact-label>.rp-icon-solid,.rp-route-directory-facts dt>.rp-icon-solid{flex:0 0 20px;color:#f4c400}
.rp-route-card-stat dd>.rp-difficulty-stars,.rp-route-summary dd>.rp-difficulty-stars,.rp-route-map-modal-facts strong>.rp-difficulty-stars,.rp-route-directory-facts dd>.rp-difficulty-stars{display:inline-flex;flex-direction:row;gap:3px;white-space:nowrap;font-size:23px;line-height:1.2}
.rp-difficulty-stars>span.is-filled{color:#f4c400}
.rp-difficulty-stars>span.is-empty{color:#777}
.rp-route-map-modal-facts .rp-route-map-fact-label>span{font:inherit;color:inherit;margin:0}
.rp-route-search .rp-directory-filters>.rp-btn{grid-column:1/-1;justify-self:center;width:100%;max-width:268px;margin-inline:auto}

/* Older modal rules target every span; keep star size and color intact. */
.rp-route-map-modal-facts .rp-difficulty-stars,.rp-route-map-modal-facts .rp-difficulty-stars>span{font-size:23px!important;line-height:1.2!important;letter-spacing:0!important;margin:0!important}
.rp-route-map-modal-facts .rp-difficulty-stars>span.is-filled{color:#f4c400!important}
.rp-route-map-modal-facts .rp-difficulty-stars>span.is-empty{color:#777!important}
.rp-route-map-modal-facts .rp-route-map-fact-label>span{margin:0!important}

/* Route/trip section navigation: visible hover and keyboard focus. */
.rp-route-detail-v2 .rp-route-jumps a{transition:background-color .18s ease,color .18s ease,border-color .18s ease}
.rp-route-detail-v2 .rp-route-jumps a:hover,.rp-route-detail-v2 .rp-route-jumps a:focus-visible,.rp-route-detail-v2 .rp-route-jumps a:active{background:#f4c400;color:#050505;border-color:#f4c400;text-decoration:none}
@media(prefers-reduced-motion:reduce){.rp-route-detail-v2 .rp-route-jumps a{transition:none}}

/* Reserve two equal route/trip slots even when only one entry is published. */
@media(min-width:721px){.rp-route-results .rp-directory-grid{grid-template-columns:repeat(2,minmax(0,1fr));max-width:none;width:100%;justify-content:stretch}}

/* Related route/trip actions share the bottom edge of each grid row. */
.rp-route-more-grid{align-items:stretch}
.rp-route-more-grid>article{display:flex;flex-direction:column;height:100%;box-sizing:border-box}
.rp-route-more-grid>article>.rp-btn{align-self:flex-start;margin-top:auto;max-width:100%;white-space:normal}
.rp-route-more-grid>article>p{margin-bottom:18px}

/* Related routes/trips form a separate vertical block beneath sidebar ads. */
.rp-route-detail-v2 .rp-route-more-sidebar{margin-top:24px;padding:16px;background:#17191a}
.rp-route-detail-v2 .rp-route-more-sidebar>.rp-section-title{font-size:23px;line-height:1.2;margin:0 0 22px}
.rp-route-detail-v2 .rp-route-more-sidebar .rp-route-more-grid{grid-template-columns:minmax(0,1fr);gap:20px}
.rp-route-detail-v2 .rp-route-more-sidebar .rp-route-more-grid>article{background:#101213;height:auto}
.rp-route-detail-v2 .rp-route-more-sidebar .rp-route-more-grid img{height:auto;aspect-ratio:16/9;object-fit:cover}
.rp-route-detail-v2 .rp-route-more-sidebar .rp-route-more-grid h3{font-size:17px;line-height:1.35;margin:14px 0 10px}
.rp-route-detail-v2 .rp-route-more-sidebar .rp-route-more-grid p{font-size:13px;line-height:1.5;margin:0 0 16px}
.rp-route-detail-v2 .rp-route-more-sidebar .rp-route-more-grid>.rp-btn{max-width:100%}
.rp-route-photos,.rp-route-gpx-block{margin:24px 0;padding:18px;background:#101213;min-width:0}
.rp-route-photos>h2,.rp-route-gpx-block>h2{color:#f4c400;font-size:22px;line-height:1.3;margin:0 0 18px}
.rp-route-photos .rp-route-gallery{margin:0}
.rp-route-gpx-block>.rp-btn{max-width:100%;white-space:normal}

/* Visitor rating helmets are separate from difficulty stars. */
.rp-route-vote .rp-stars{flex-wrap:nowrap;gap:4px;max-width:100%}
.rp-route-vote .rp-stars label>span{min-width:44px;min-height:48px;color:#888}
.rp-route-vote .rp-stars label>span svg{width:32px;height:32px}
.rp-route-vote .rp-stars label>span svg path{fill:none;stroke:currentColor;stroke-width:1.25;stroke-linejoin:round}
.rp-route-vote .rp-stars label:has(input:checked)>span svg path,.rp-route-vote .rp-stars label:has(~ label input:checked)>span svg path{fill:currentColor;stroke:currentColor}
@media(hover:hover){.rp-route-vote .rp-stars label:hover>span svg path,.rp-route-vote .rp-stars label:has(~ label:hover)>span svg path{fill:currentColor;stroke:currentColor}}
.rp-route-vote .rp-rating-choice{font-size:14px;line-height:1.5;margin:8px 0 12px}
.rp-route-summary-rating>.rp-icon-solid,.rp-route-rating .rp-icon-solid{vertical-align:middle;color:#f4c400}

.rp-route-vote .rp-stars label>span svg{width:38px;height:38px}
.rp-route-vote .rp-stars label>span svg path{stroke-width:1.4}

/* One vector renderer for list, detail and map: independent of star fonts. */
body.riderpress-ui .rp-difficulty-stars>.rp-difficulty-star{display:block!important;flex:0 0 21px!important;width:21px!important;height:21px!important;margin:0!important;filter:none!important}
body.riderpress-ui .rp-difficulty-stars>.rp-difficulty-star.is-filled>path{fill:#f4c400!important;stroke:#f4c400!important;stroke-width:1.6}
body.riderpress-ui .rp-difficulty-stars>.rp-difficulty-star.is-empty>path{fill:none!important;stroke:#999!important;stroke-width:1.6}
