.route-profile,.trail-tools,.source-facts { margin-top:32px; padding:24px; border:1px solid var(--line); border-radius:16px; background:#fffefb; }
.route-profile h2,.trail-tools h2 { font-size:27px; }
.route-profile .sectionhead { flex-wrap:wrap; }
.route-profile p,.trail-tools p,.source-facts p { font-size:14px; margin:12px 0; }
.route-profile svg { width:100%; height:auto; min-height:150px; }
.route-profile svg text { font:12px Arial,sans-serif; fill:#4b5c4b; }
.profile-metrics { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:16px 0; }
.profile-metrics b,.profile-metrics span { display:block; }
.profile-metrics span { color:var(--muted); font-size:12px; }
.profile-loading { min-height:180px; background:var(--sage); animation:skeleton-breathe 1.2s alternate infinite; border-radius:12px; }
.source-facts dl { margin:20px 0; }
.source-facts dl > div { display:grid; grid-template-columns:minmax(100px,1fr) minmax(0,1.5fr); border-bottom:1px solid var(--line); gap:16px; padding:10px 0; font-size:13px; }
.source-facts dt { font-weight:600; }
.source-facts dd { margin:0; overflow-wrap:anywhere; }
.source-facts pre { white-space:pre-wrap; overflow-wrap:anywhere; max-height:400px; overflow:auto; font-size:12px; }
.source-facts details,.route-profile details { padding:12px 0; }
.source-facts summary,.route-profile summary { cursor:pointer; min-height:44px; }
.route-profile table { width:100%; font-size:13px; border-collapse:collapse; }
.route-profile td,.route-profile th { text-align:left; padding:7px; border-bottom:1px solid var(--line); }
.source-choice { display:block; padding:14px 0; border-bottom:1px solid var(--line); }
.source-choice span { display:block; font-size:12px; color:var(--muted); }
.tool-actions { display:flex; flex-wrap:wrap; gap:10px; margin:18px 0; }
.trail-tools h3 { margin-top:26px; }
.trail-tools form label { display:grid; gap:8px; margin:12px 0; }
.trail-tools select,.trail-tools textarea { padding:12px; min-height:46px; border:1px solid var(--line); border-radius:8px; width:100%; background:#fff; }
.trail-tools a,.route-profile a { text-decoration:underline; text-underline-offset:3px; }
.leaflet-control-layers { font:13px 'DM Sans',sans-serif; color:var(--forest); border-radius:10px!important; background:#fffefb; }
.leaflet-control-layers label { padding:6px; }
.leaflet-control-layers input { accent-color:var(--forest); }
#resultlist[aria-busy=true] { opacity:.65; }
@media(max-width:700px) { .route-profile,.trail-tools,.source-facts { padding:18px; } .route-profile h2,.trail-tools h2 { font-size:24px; } .profile-metrics { grid-template-columns:1fr 1fr; } .leaflet-control-layers { font-size:12px; } }
@media(prefers-reduced-motion:reduce) { .profile-loading { animation:none; } }

img[src^="data:image/svg+xml"] { object-fit:contain!important; background:#e3eadc; }
