/* gravelbar – dunkles, zurückhaltendes Design mit lokalen Schriften. */
:root {
  color-scheme: dark;
  --background: #101512;
  --surface: #181f1a;
  --surface-raised: #202922;
  --text: #f0f3ed;
  --muted: #b9c5ba;
  --accent: #bedba9;
  --rule: #3a473d;
  --heading: 'Space Grotesk', sans-serif;
  --body: 'Manrope', sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--background); color: var(--text); font-family: var(--body); font-size: 16px; line-height: 1.7; -webkit-font-smoothing: antialiased; -webkit-hyphens: auto; hyphens: auto; }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; border-radius: 2px; }
img { display: block; max-width: 100%; }
.wrap { width: min(100% - 112px, 1200px); margin-inline: auto; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 20; padding: 10px 16px; background: var(--accent); color: #101512; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.wordmark, .footer-wordmark { font-family: var(--heading); font-size: 29px; font-weight: 700; letter-spacing: -.055em; line-height: 1; text-decoration: none; white-space: nowrap; }
.wordmark:hover, .footer-wordmark:hover { color: var(--accent); }
.main-nav { display: flex; align-items: center; flex-wrap: wrap; gap: clamp(25px, 3.4vw, 51px); }
.main-nav a, .footer-nav a { font-size: 13px; font-weight: 700; text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current='page'], .footer-nav a:hover { color: var(--accent); text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 7px; }
.nav-external span[aria-hidden], .footer-nav span[aria-hidden] { margin-left: 5px; color: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--heading); font-weight: 600; letter-spacing: -.05em; }
h1, h2, h3, h4, h5, h6 { text-wrap: balance; }
h1 em, h2 em { color: var(--accent); font-style: normal; font-weight: inherit; }
.hero { padding-top: clamp(56px, 7vw, 88px); }
.hero-copy { max-width: 1000px; min-width: 0; }
.hero h1, .page-intro h1, .not-found h1 { margin-bottom: 26px; font-size: clamp(54px, 5.6vw, 84px); line-height: 1.04; overflow-wrap: anywhere; }
.hero-lead { max-width: 620px; margin-bottom: 28px; color: var(--muted); font-size: 18px; line-height: 1.7; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 25px; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 35px; max-width: 100%; min-height: 56px; padding: 15px 20px; border: 1px solid transparent; border-radius: 3px; font-size: 13px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; text-decoration: none; transition: background-color .2s, border-color .2s, color .2s; }
.button span[aria-hidden] { font-size: 18px; line-height: 1; font-weight: 400; }
.button-dark { background: var(--accent); color: #101512; }
.button-dark:hover { background: #d6edc8; }
.button-light { border-color: #91aa91; background: transparent; color: var(--text); }
.button-light:hover { border-color: var(--accent); background: var(--accent); color: #101512; }
.hero-small-link, .text-link { display: inline-flex; align-items: center; gap: 17px; font-size: 13px; font-weight: 800; text-decoration: none; }
.hero-small-link:hover, .text-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.hero-small-link span[aria-hidden], .text-link span[aria-hidden] { color: var(--accent); font-size: 18px; font-weight: 400; }
/* The hero is deliberately text-only, even with an older template. */
.hero-visual { display: none; }
.hero-bottom { display: flex; justify-content: space-between; gap: 20px; margin-top: 58px; padding: 21px 0; border-top: 1px solid var(--rule); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.copper-arrow { margin-left: 8px; color: var(--accent); font-size: 14px; }
.section-space { padding: 116px 0; }
.hero + .tours-section { padding-top: clamp(64px, 7vw, 96px); }
.intro-section { background: var(--surface); }
.intro-grid { display: grid; grid-template-columns: 1fr .69fr; gap: 90px; }
.intro-grid h2, .section-heading h2, .community-grid h2 { margin-bottom: 0; font-size: clamp(42px, 4.2vw, 64px); line-height: 1.1; overflow-wrap: anywhere; }
.intro-copy { padding-top: 6px; color: var(--muted); }
.intro-copy p { max-width: 510px; margin-bottom: 21px; }
.intro-copy .intro-large { color: var(--text); font-family: var(--heading); font-size: 25px; line-height: 1.4; letter-spacing: -.025em; }
.intro-copy .text-link { margin-top: 8px; color: var(--text); }
.intro-copy .text-link:hover { color: var(--accent); }
.section-heading { margin-bottom: 52px; }
.route-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.route-card { border: 1px solid #2c382e; border-radius: 4px; background: var(--surface); }
.route-card-link { display: grid; grid-template-columns: minmax(110px, 165px) minmax(0, 1fr); gap: 20px; align-items: center; height: 100%; padding: 20px; color: inherit; text-decoration: none; transition: background-color .2s; }
.route-card-link:hover { background-color: var(--surface-raised); }
.route-card-all { display: flex; align-items: center; justify-content: center; min-height: 108px; padding: 20px; border: 1px solid #2c382e; border-radius: 4px; background: var(--surface); text-decoration: none; transition: background-color .2s; }
.route-card-all:hover { background: var(--surface-raised); }
.route-card-all:hover .button-dark { background: #d6edc8; }
.route-thumb { display: block; position: relative; min-width: 0; width: 100%; height: 144px; overflow: hidden; background: transparent; color: #d3f2b8; }
.route-thumb > svg { display: block; width: 100%; height: 100%; }
.route-thumb > svg path { vector-effect: non-scaling-stroke; stroke-width: 2.5px; }
.route-thumb > svg text { display: none; }
.route-card[hidden] { display: none; }
.route-content { min-width: 0; }
.route-content h3 { margin: 0 0 9px; font-size: clamp(22px, 2vw, 28px); line-height: 1.2; overflow-wrap: anywhere; }
.route-card-link:hover .route-content h3 { color: var(--accent); }
.route-meta { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; }
.route-meta div { display: flex; gap: 7px; min-width: 0; max-width: 100%; }
.route-meta dt, .route-meta dd { margin: 0; font-size: 12px; }
.route-meta dt { color: var(--muted); }
.route-meta dd { min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.empty-state { display: grid; grid-template-columns: 70px 1fr; gap: 24px; padding: 40px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.empty-mark { color: var(--accent); font-family: var(--heading); font-size: 30px; line-height: 1; }
.empty-state h3 { margin-bottom: 10px; font-size: 28px; line-height: 1.2; }
.empty-state p { max-width: 560px; margin-bottom: 16px; color: var(--muted); }
.section-end { display: flex; justify-content: flex-end; padding-top: 28px; }
.community-section { padding: 104px 0 112px; background: var(--surface-raised); }
.community-grid { display: grid; grid-template-columns: 1fr .69fr; gap: 90px; align-items: end; }
.community-copy { max-width: 430px; color: var(--muted); }
.community-copy p { margin-bottom: 28px; font-size: 16px; }
.site-footer { padding-top: 73px; background: #0c100d; }
.footer-main { display: flex; justify-content: space-between; gap: 45px; padding-bottom: 70px; }
.footer-wordmark { font-size: 30px; }
.footer-main .footer-credit { margin: 10px 0 0; color: #89968b; font-size: 13px; line-height: 1.6; }
.footer-credit a { text-underline-offset: 3px; }
.footer-credit a:hover { color: var(--accent); }
.footer-thanks { width: min(100%, 460px); min-width: 0; color: #89968b; font-size: 13px; line-height: 1.6; white-space: pre-line; overflow-wrap: anywhere; }
.footer-thanks p { margin: 0 0 12px; }
.footer-thanks p:last-child { margin-bottom: 0; }
.footer-thanks a { text-decoration: underline; text-underline-offset: 3px; }
.footer-thanks a:hover { color: var(--accent); }
.footer-nav { display: flex; gap: 32px; align-items: flex-start; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding: 18px 0 21px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
/* Unterseiten */
.page-intro { padding-top: 94px; padding-bottom: 90px; }
.page-intro-grid { display: grid; grid-template-columns: 1fr .49fr; align-items: end; gap: 60px; }
.page-intro-grid > * { min-width: 0; }
.page-intro h1 { margin: 0; }
.page-intro-grid > p { max-width: 385px; margin: 0 0 7px; color: var(--muted); font-size: 16px; }
.page-intro-grid > .route-count { color: var(--accent); font-size: 16px; font-weight: 700; }
.tour-overview { padding-bottom: 110px; }
.tour-info { padding-bottom: clamp(75px, 8vw, 110px); }
.tour-info-copy { max-width: 720px; }
.tour-info h2 { margin-bottom: 22px; font-size: clamp(28px, 4vw, 38px); line-height: 1.2; overflow-wrap: anywhere; }
.tour-info p { margin-bottom: 18px; color: var(--muted); }
.tour-info p:last-child { margin-bottom: 0; }
.list-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: 25px; }
.list-heading h2 { margin: 0; font-size: 28px; line-height: 1.2; }
.list-heading > span { color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; }
.route-filter { display: grid; gap: 10px; max-width: 720px; margin-bottom: 24px; padding: 20px; border: 1px solid #2c382e; border-radius: 3px; background: #151c17; }
.route-filter[hidden], .route-filter-empty[hidden] { display: none; }
.route-filter-heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; }
.route-filter-heading label { font-family: var(--heading); font-size: 19px; font-weight: 600; line-height: 1.3; }
.route-filter-values { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.route-filter-offset { color: var(--muted); font-size: 12px; font-weight: 600; }
.route-filter-value { color: var(--accent); font-family: var(--heading); font-size: 21px; font-weight: 700; white-space: nowrap; }
.route-filter-distribution { position: relative; height: 28px; margin: 0 7px -20px; pointer-events: none; }
.route-filter-bar { position: absolute; bottom: 0; transform: translateX(-50%); background: linear-gradient(to right, transparent 15%, #799a7b 15% 85%, transparent 85%); }
.route-filter-bar.is-active { background: linear-gradient(to right, transparent 15%, var(--accent) 15% 85%, transparent 85%); }
.route-filter-range { width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.route-filter-scale { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: -14px; padding-inline: 7px; color: var(--muted); font-size: 11px; line-height: 1.3; }
.route-filter-scale span:nth-child(2) { text-align: center; }
.route-filter-scale span:last-child { text-align: right; }
.route-filter-help, .route-filter-empty { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.route-filter-feedback { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 18px; }
.route-filter-status { margin: 0; color: var(--text); font-size: 15px; font-weight: 700; line-height: 1.5; }
.route-filter-reset { justify-self: start; min-height: 44px; padding: 0; border: 0; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 800; text-align: left; text-decoration: underline; text-decoration-color: #91aa91; text-underline-offset: 5px; cursor: pointer; }
.route-filter-reset:hover { color: var(--accent); text-decoration-color: currentColor; }
.route-filter-range:focus-visible, .route-filter-reset:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.route-filter-empty { padding: 22px 0; }
.back-link { display: inline-flex; gap: 10px; align-items: center; margin-bottom: 67px; color: var(--muted); font-size: 13px; font-weight: 800; text-decoration: none; }
.back-link:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.back-link span { color: var(--accent); font-size: 18px; }
.route-detail { padding-top: 48px; padding-bottom: 104px; }
.detail-header { min-width: 0; }
.detail-header h1 { margin-bottom: 23px; font-size: clamp(46px, 4.8vw, 68px); line-height: 1.06; overflow-wrap: anywhere; }
.detail-lead { max-width: 700px; margin-bottom: 0; color: var(--muted); font-size: 19px; overflow-wrap: anywhere; }
.detail-metrics { display: flex; flex-wrap: wrap; gap: 25px 70px; margin: 0 0 26px; padding: 26px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.detail-metrics div { min-width: 0; }
.detail-metrics dt { margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.detail-metrics dd { margin: 0; font-family: var(--heading); font-size: 25px; line-height: 1.3; overflow-wrap: anywhere; }
.detail-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin-top: 28px; }
.detail-download-label { display: flex; flex-direction: column; align-items: flex-start; }
.detail-download-label .download-count { margin-top: 2px; color: #4f5f4a; font-size: 11px; font-weight: 600; line-height: 1.35; }
.detail-komoot { display: flex; align-items: center; gap: 10px; width: fit-content; max-width: 100%; min-height: 44px; color: var(--text); font-size: 13px; font-weight: 800; line-height: 1.4; overflow-wrap: anywhere; text-decoration: underline; text-decoration-color: #91aa91; text-underline-offset: 4px; }
.detail-komoot:hover { color: var(--accent); text-decoration-color: currentColor; }
.share-control { width: min(100%, 400px); max-width: 100%; }
.detail-share { display: inline-flex; align-items: center; gap: 9px; min-height: 44px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: 3px; background: transparent; color: var(--text); font: inherit; font-size: 13px; font-weight: 800; line-height: 1.4; cursor: pointer; }
.detail-share:hover { border-color: var(--accent); color: var(--accent); }
.detail-share:focus-visible, .share-fallback input:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.detail-share[hidden], .share-fallback[hidden], .share-status:empty { display: none; }
.share-status { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.share-fallback { display: grid; gap: 5px; width: min(100%, 400px); margin-top: 10px; }
.share-fallback label { color: var(--muted); font-size: 12px; font-weight: 700; }
.share-fallback input { width: 100%; min-width: 0; padding: 9px 11px; border: 1px solid var(--rule); border-radius: 3px; background: var(--surface); color: var(--text); font: inherit; font-size: 13px; }
.track-outline { min-width: 0; color: var(--accent); }
.track-outline svg { display: block; width: 100%; max-height: 320px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 72px; align-items: start; }
.detail-map-column, .detail-content { min-width: 0; }
.detail-content { margin-top: 60px; padding-top: 32px; border-top: 1px solid #2c382e; }
/* Keep the real SVG fallback and map canvas directly on the page, without a frame. */
.mini-map.detail-map[data-route-map] { width: 100%; min-width: 0; min-height: 0; height: clamp(320px, 36vw, 440px); aspect-ratio: auto; background: transparent; color: #d3f2b8; }
.mini-map.detail-map[data-route-map] > svg { display: block; width: 100%; height: 100%; max-height: none; }
.mini-map.detail-map[data-route-map] > svg path { vector-effect: non-scaling-stroke; stroke-width: 3px; }
.mini-map.detail-map[data-route-map] > svg text { display: none; }
.mini-map.detail-map[data-route-map]:not(.gb-map-ready)::after { content: 'Schematischer Streckenverlauf · keine Karte'; position: absolute; right: 8px; bottom: 8px; left: 8px; color: var(--muted); font-size: 11px; line-height: 1.4; text-align: center; pointer-events: none; }
/* Darken only base tiles; keep the route overlay and attribution unchanged. */
.detail-map .leaflet-tile-pane { filter: grayscale(1) invert(1) brightness(.78) contrast(.9); }
.detail-map .leaflet-control-attribution a:focus-visible { outline: 2px solid #003f72; outline-offset: 1px; }
.detail-copy { min-width: 0; }
.detail-copy h2 { margin-bottom: 20px; color: var(--muted); font-size: 36px; line-height: 1.13; overflow-wrap: anywhere; }
.detail-copy p { color: #98a69a; overflow-wrap: anywhere; }
.not-found { padding-top: 115px; padding-bottom: 145px; }
.not-found > p { max-width: 500px; color: var(--muted); }
.not-found .button { margin-top: 10px; }
@media (max-width: 900px) {
  .wrap { width: min(100% - 64px, 1200px); }
  .hero h1, .page-intro h1, .not-found h1 { font-size: clamp(48px, 6vw, 68px); }
  .hero-lead { font-size: 16px; }
  .intro-grid, .community-grid { gap: 50px; }
  .detail-grid { gap: 50px; }
  .route-card-link { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .route-thumb { height: 120px; }
}
@media (max-width: 840px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr); gap: 45px; }
}
@media (max-width: 650px) {
  /* Reserve room for fragment targets and keyboard-focused content below the header. */
  html { scroll-padding-top: 7rem; }
  .wrap { width: calc(100% - 40px); }
  /* Keep this below the fixed skip link, but above the isolated Leaflet maps. */
  .site-header { position: sticky; top: 0; z-index: 10; background: var(--background); }
  .header-inner { min-height: 77px; gap: 16px; }
  .wordmark { font-size: 25px; }
  .main-nav { gap: 16px; }
  .main-nav a { font-size: 12px; }
  .hero { padding-top: 58px; }
  .hero h1, .page-intro h1, .not-found h1 { font-size: clamp(40px, 9.4vw, 62px); }
  .hero-lead { margin-bottom: 26px; }
  .hero-bottom { margin-top: 31px; }
  .hero-bottom span:last-child { text-align: right; }
  .section-space { padding: 77px 0; }
  .intro-grid, .community-grid { display: block; }
  .intro-grid h2, .section-heading h2, .community-grid h2 { font-size: clamp(38px, 8.4vw, 54px); }
  .intro-copy { padding-top: 28px; }
  .section-heading { display: block; margin-bottom: 34px; }
  .route-list { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .route-card-link { gap: 20px; }
  .route-thumb { height: auto; max-height: 240px; aspect-ratio: 5 / 3; }
  .route-content h3 { margin-bottom: 10px; font-size: clamp(25px, 6vw, 30px); }
  .route-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 14px 16px; }
  .route-meta div { flex-direction: column; gap: 2px; }
  .route-meta dt { font-size: 11px; line-height: 1.4; }
  .route-meta dd { font-size: 14px; line-height: 1.4; }
  .empty-state { grid-template-columns: 32px 1fr; gap: 15px; }
  .empty-state h3 { font-size: 25px; }
  .community-section { padding: 75px 0 80px; }
  .community-copy { margin-top: 30px; }
  .footer-main { display: block; padding-bottom: 45px; }
  .footer-thanks { margin-top: 30px; }
  .footer-nav { flex-wrap: wrap; gap: 15px 25px; margin-top: 33px; }
  .page-intro { padding-top: 65px; padding-bottom: 65px; }
  .page-intro-grid { display: block; }
  .page-intro-grid > p { margin-top: 24px; }
  .tour-overview { padding-bottom: 75px; }
  .route-filter { gap: 8px; padding: 16px; }
  .route-filter-heading { gap: 8px 12px; }
  .route-filter-heading label { font-size: 17px; }
  .route-filter-values { gap: 8px; }
  .route-filter-value { font-size: 19px; }
  .route-filter-feedback { column-gap: 8px; }
  .route-filter-status { font-size: 13px; }
  .route-filter-reset { font-size: 12px; }
  .route-detail { padding-top: 35px; padding-bottom: 75px; }
  .back-link { margin-bottom: 50px; }
  .detail-header h1 { font-size: clamp(40px, 9vw, 65px); }
  .detail-lead { font-size: 17px; }
  .detail-metrics { gap: 20px 35px; }
  .mini-map.detail-map[data-route-map] { height: clamp(260px, 80vw, 360px); }
  .detail-grid { gap: 40px; }
  .detail-content { margin-top: 40px; padding-top: 26px; }
  .not-found { padding-top: 85px; padding-bottom: 100px; }
}
@media (max-width: 370px) {
  html { scroll-padding-top: 8rem; }
  .header-inner { align-items: flex-start; flex-direction: column; gap: 10px; padding: 12px 0; }
  .main-nav { width: 100%; justify-content: space-between; }
  .hero h1, .page-intro h1, .not-found h1 { font-size: 38px; }
  .list-heading { align-items: flex-start; flex-direction: column; gap: 8px; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 18px; }
}
@media (max-width: 240px) {
  /* Leave room for focused controls when browser zoom creates a narrow viewport. */
  .skip-link { max-width: calc(100% - 20px); }
  .detail-actions .button { gap: 10px; padding-inline: 10px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; } }
