/* ==========================================================================
   Swiss Cycling Alpenbrevet - Digitales Routebook
   Farben & Typografie stammen aus dem gedruckten Routebook (InDesign/PDF):
   Navy #12364D, Gold #AE862B, Rot #C5002B, Gelb #FFD300, Barlow.
   Mobile first - Desktop-Regeln stehen in den Media Queries am Ende.
   ========================================================================== */

/* --- Design Tokens ------------------------------------------------------ */
:root {
  --navy:        #12364D;
  --navy-deep:   #0C2637;
  --navy-soft:   #2A4A5F;
  --gold:        #AE862B;
  --gold-light:  #D4AC4E;
  --red:         #C5002B;
  --yellow:      #FFD300;
  --blue-light:  #7CA2C5;
  --sand:        #C1BBAD;

  --ink:         #12364D;
  --ink-muted:   #5A7080;
  --paper:       #FFFFFF;
  --paper-alt:   #F4F6F8;
  --line:        #DCE3E8;

  --font: "Barlow", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;

  --wrap:   min(100% - 2.5rem, 60rem);
  --radius: 4px;
  --shadow: 0 2px 10px rgba(18, 54, 77, .08);
  --shadow-lg: 0 12px 40px rgba(18, 54, 77, .22);

  --header-offset: 5rem; /* scroll-margin so anchors clear the menu button */
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Menuesprünge: JS setzt diese Klasse kurzzeitig, damit der Sprung sofort
   erfolgt statt sekundenlang animiert (und Android Chrome ihn nicht verschluckt) */
html.rb-scroll-instant { scroll-behavior: auto !important; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration-color: var(--gold); text-underline-offset: .18em; }
a:hover { color: var(--gold); }
button { font: inherit; color: inherit; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* --- Layout helpers ----------------------------------------------------- */
.wrap { width: var(--wrap); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ==========================================================================
   Sticky menu button + Inhalt panel
   ========================================================================== */
.rb-menu-btn {
  position: fixed;
  top: .875rem;
  right: .875rem;
  z-index: 60;
  width: 3.25rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  gap: 0;
  border: 0;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  transition: background .2s ease, transform .2s ease;
}
.rb-menu-btn:hover  { background: var(--gold); }
.rb-menu-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.rb-menu-btn__bars { position: relative; width: 1.35rem; height: .875rem; }
.rb-menu-btn__bars span {
  position: absolute; left: 0; width: 100%; height: 2px; background: currentColor;
  border-radius: 2px; transition: transform .25s ease, opacity .2s ease;
}
.rb-menu-btn__bars span:nth-child(1) { top: 0; }
.rb-menu-btn__bars span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.rb-menu-btn__bars span:nth-child(3) { bottom: 0; }
.rb-menu-btn__label {
  font-size: .5rem; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; margin-top: .18rem;
}

/* open state -> X */
body.rb-nav-open .rb-menu-btn { background: var(--gold); }
body.rb-nav-open .rb-menu-btn__bars span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
body.rb-nav-open .rb-menu-btn__bars span:nth-child(2) { opacity: 0; }
body.rb-nav-open .rb-menu-btn__bars span:nth-child(3) { bottom: auto; top: 50%; transform: translateY(-50%) rotate(-45deg); }

/* reading progress, sits directly under the button */
.rb-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 0%;
  background: var(--yellow); z-index: 61; transition: width .1s linear;
}

.rb-nav {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--navy);
  color: #fff;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-.75rem);
  transition: opacity .22s ease, transform .22s ease, visibility .22s;
}
body.rb-nav-open .rb-nav { opacity: 1; visibility: visible; transform: none; }

.rb-nav__inner { padding: 1.5rem 1.25rem 3rem; max-width: 40rem; margin-inline: auto; }
.rb-nav__title {
  margin: .25rem 0 1.25rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--yellow);
  padding-right: 3.5rem;
}

/* Sprachumschalter im Menü (DE | EN) */
.rb-lang { display: flex; gap: .5rem; margin: -.5rem 0 1.25rem; }
.rb-lang__item {
  padding: .35rem .85rem;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 999px;
  font-size: .8125rem; font-weight: 700; letter-spacing: .06em;
  color: #fff; text-decoration: none;
}
a.rb-lang__item:hover, a.rb-lang__item:focus-visible {
  background: var(--yellow); color: var(--navy); border-color: var(--yellow);
}
.rb-lang__item.is-active { background: #fff; color: var(--navy); border-color: #fff; }
.rb-nav__list { list-style: none; margin: 0; padding: 0; }
.rb-nav__item { border-bottom: 1px solid rgba(255, 255, 255, .16); }

/* first level row: link + optional expander */
.rb-nav__row { display: flex; align-items: stretch; gap: .5rem; }
.rb-nav__link {
  flex: 1;
  display: block;
  padding: .9rem .25rem;
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
}
.rb-nav__link:hover, .rb-nav__link:focus-visible { color: var(--yellow); }

.rb-nav__toggle {
  flex: 0 0 auto;
  width: 2.75rem;
  border: 0;
  background: transparent;
  color: var(--yellow);
  font-size: 1.5rem;
  line-height: 1;
  font-weight: 400;
  cursor: pointer;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
}
.rb-nav__toggle:hover { background: rgba(255, 255, 255, .1); }
.rb-nav__toggle:focus-visible { outline: 2px solid var(--yellow); outline-offset: -2px; }
/* the +/- glyph is drawn, not typed, so it stays perfectly centred */
.rb-nav__toggle::before,
.rb-nav__toggle::after {
  content: ""; position: absolute; width: .8rem; height: 2px;
  background: currentColor; border-radius: 2px; transition: transform .2s ease;
}
.rb-nav__toggle { position: relative; }
.rb-nav__toggle::after { transform: rotate(90deg); }
.rb-nav__toggle[aria-expanded="true"]::after { transform: rotate(0deg); }

/* second level, hidden until + is pressed */
.rb-nav__sub { list-style: none; margin: 0; padding: 0; display: none; }
.rb-nav__item.is-open .rb-nav__sub { display: block; padding-bottom: .6rem; }
.rb-nav__sublink {
  display: block;
  padding: .5rem .25rem .5rem 1rem;
  color: rgba(255, 255, 255, .82);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  border-left: 2px solid rgba(255, 255, 255, .22);
}
.rb-nav__sublink:hover, .rb-nav__sublink:focus-visible {
  color: var(--yellow); border-left-color: var(--yellow);
}

.rb-nav__tools { margin-top: 1.75rem; display: grid; gap: .75rem; }
.rb-nav__action {
  display: flex; align-items: center; gap: .65rem;
  width: 100%; padding: .95rem 1.1rem;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: var(--radius);
  background: transparent; color: #fff;
  font-size: 1rem; font-weight: 600; text-align: left;
  text-decoration: none; cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.rb-nav__action:hover { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.rb-nav__action svg { flex: 0 0 auto; width: 1.25rem; height: 1.25rem; }
.rb-nav__action--primary { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }
.rb-nav__action--primary:hover { background: #fff; border-color: #fff; }
.rb-nav__hint { margin: .25rem 0 0; font-size: .8125rem; color: rgba(255, 255, 255, .6); }

/* ==========================================================================
   Hero
   ========================================================================== */
.rb-hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  background: var(--navy-deep);
  color: #fff;
  overflow: hidden;
}
.rb-hero__media { position: absolute; inset: 0; }
.rb-hero__media img { width: 100%; height: 100%; object-fit: cover; }
.rb-hero__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12, 38, 55, .55) 0%, rgba(12, 38, 55, .25) 35%, rgba(12, 38, 55, .92) 100%);
}
.rb-hero__inner { position: relative; padding: 0 0 3.5rem; }
.rb-hero__logo { width: min(15rem, 62%); margin-bottom: 1.75rem; }
.rb-hero__kicker {
  margin: 0 0 .35rem;
  font-size: .8125rem; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--yellow);
}
.rb-hero__title {
  margin: 0;
  font-size: clamp(2.75rem, 15vw, 5.5rem);
  font-weight: 900;
  line-height: .92;
  letter-spacing: -.01em;
  text-transform: uppercase;
}
.rb-hero__year {
  display: block;
  font-size: clamp(1.5rem, 7vw, 2.5rem);
  font-weight: 300;
  letter-spacing: .1em;
  color: var(--yellow);
}
.rb-hero__lead { margin: 1.25rem 0 0; max-width: 34rem; color: rgba(255, 255, 255, .88); }
.rb-hero__cue {
  display: inline-flex; align-items: center; gap: .5rem;
  margin-top: 2rem; padding: .7rem 1.15rem;
  border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px;
  color: #fff; text-decoration: none; font-size: .875rem;
  font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
}
.rb-hero__cue:hover { background: var(--yellow); border-color: var(--yellow); color: var(--navy); }

/* ==========================================================================
   Chapters & topics
   ========================================================================== */
.rb-chapter { scroll-margin-top: var(--header-offset); }
.rb-chapter__head {
  background: var(--navy);
  color: #fff;
  padding: 2.75rem 0;
  margin-top: 3rem;
}
.rb-chapter:first-of-type .rb-chapter__head { margin-top: 0; }
.rb-chapter__num {
  display: block; margin-bottom: .4rem;
  font-size: .75rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--yellow);
}
.rb-chapter__title {
  margin: 0;
  font-size: clamp(1.75rem, 7.5vw, 3rem);
  font-weight: 900; line-height: 1.02;
  letter-spacing: -.005em; text-transform: uppercase;
}
.rb-chapter__intro { margin: 1rem 0 0; color: rgba(255, 255, 255, .85); max-width: 42rem; }
.rb-chapter__body { padding: 2rem 0 .5rem; }

.rb-topic { scroll-margin-top: var(--header-offset); padding: 1.25rem 0 1.75rem; }
.rb-topic + .rb-topic { border-top: 1px solid var(--line); }
.rb-topic__title {
  margin: 0 0 1rem;
  font-size: 1.1875rem; font-weight: 800;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--gold);
}
.rb-topic h4 {
  margin: 1.75rem 0 .6rem;
  font-size: 1rem; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase;
  color: var(--navy);
}
.rb-topic p { margin: 0 0 1rem; }
.rb-topic > :last-child { margin-bottom: 0; }

/* lists */
.rb-list { margin: 0 0 1rem; padding: 0; list-style: none; }
.rb-list li { position: relative; padding-left: 1.35rem; margin-bottom: .55rem; }
.rb-list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: .45rem; height: .45rem; border-radius: 50%; background: var(--gold);
}
.rb-list ul { list-style: none; margin: .5rem 0 0; padding: 0; }
.rb-list ul li::before { background: var(--blue-light); }

/* nummerierte Variante: <ol class="rb-list"> zeigt Zahlen statt Punkte
   (z. B. Aussteller 1-10, deren Nummern den Standorten auf dem Lageplan entsprechen) */
ol.rb-list { counter-reset: rb-num; }
ol.rb-list > li { counter-increment: rb-num; padding-left: 1.75rem; }
ol.rb-list > li::before {
  content: counter(rb-num);
  background: none; width: 1.25rem; height: auto; border-radius: 0;
  top: 0; text-align: right;
  color: var(--gold); font-weight: 800; font-size: .875em;
}

/* key/value blocks (Startzeit, Kontrollschlüsse, ...) */
.rb-facts { margin: 0 0 1.5rem; display: grid; gap: 0; border-top: 2px solid var(--navy); }
.rb-facts__row { display: grid; gap: .1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.rb-facts__key {
  font-size: .75rem; font-weight: 700; letter-spacing: .12em;
  text-transform: uppercase; color: var(--gold);
}
.rb-facts__val { margin: 0; }

/* time / place cards (Check-in) */
.rb-slots { display: grid; gap: 1rem; margin: 0 0 1.5rem; }
.rb-slot {
  padding: 1.1rem 1.25rem;
  background: var(--paper-alt);
  border-left: 4px solid var(--navy);
  border-radius: 0 var(--radius) var(--radius) 0;
}
.rb-slot__when { margin: 0 0 .2rem; font-weight: 800; }
.rb-slot__what { margin: 0; color: var(--ink-muted); font-size: .9375rem; }

/* callouts */
.rb-note {
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  border-radius: var(--radius);
  background: var(--paper-alt);
  border-left: 4px solid var(--gold);
}
.rb-note__title {
  margin: 0 0 .35rem;
  font-size: .75rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
}
.rb-note p:last-child { margin-bottom: 0; }
.rb-note--important { background: #FFF8DB; border-left-color: var(--yellow); }
.rb-note--important .rb-note__title { color: #8A6A00; }
.rb-note--danger { background: #FDEFF2; border-left-color: var(--red); }
.rb-note--danger .rb-note__title { color: var(--red); }
.rb-note--danger a { color: var(--red); }

/* emergency numbers */
.rb-emergency { display: grid; gap: .5rem; margin: 1rem 0 0; padding: 0; list-style: none; }
.rb-emergency li {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  padding: .6rem .9rem; background: #fff; border-radius: var(--radius);
  border: 1px solid var(--line);
}
.rb-emergency b { font-size: 1.25rem; color: var(--red); letter-spacing: .02em; }

/* figures */
.rb-figure { margin: 1.5rem 0; }
.rb-figure img { width: 100%; border-radius: var(--radius); background: #fff; }
.rb-figure figcaption {
  margin-top: .6rem; font-size: .8125rem; color: var(--ink-muted); line-height: 1.45;
}
.rb-figure--bordered img { border: 1px solid var(--line); }
.rb-figure--pair { display: grid; gap: 1rem; }
.rb-figure--pair img { background: var(--paper-alt); padding: 1rem; }
/* Hochformate (Startnummer, Rahmenkleber) sonst absurd hoch auf breiten Screens */
.rb-figure--pair img,
.rb-figure--tall img { max-height: 26rem; width: auto; margin-inline: auto; }

/* zoomable images get a hint cursor */
.rb-zoom { cursor: zoom-in; }

/* Piktogramm-Legende unter einer Karte/einem Luftbild */
.rb-legend {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem;
  margin: .75rem 0 0; padding: 0; list-style: none;
  font-size: .8125rem; color: var(--ink-muted);
}
.rb-legend li { display: flex; align-items: center; gap: .5rem; }
.rb-legend img { width: 1.5rem; height: auto; border-radius: 4px; }

/* tables */
.rb-table-scroll { overflow-x: auto; margin: 0 0 1rem; -webkit-overflow-scrolling: touch; }
.rb-table { width: 100%; border-collapse: collapse; font-size: .875rem; }
/* nur fuer wirklich breite Tabellen - erzwingt horizontales Scrollen im Container */
.rb-table--wide { min-width: 40rem; }
.rb-table th, .rb-table td { padding: .55rem .7rem; text-align: left; border-bottom: 1px solid var(--line); }
.rb-table thead th {
  background: var(--navy); color: #fff; font-size: .75rem;
  letter-spacing: .06em; text-transform: uppercase; vertical-align: bottom;
  position: sticky; top: 0;
}
.rb-table tbody th { font-weight: 600; white-space: nowrap; }
.rb-table tr.rb-table__group th {
  background: var(--paper-alt); color: var(--gold);
  font-size: .75rem; letter-spacing: .1em; text-transform: uppercase;
}
.rb-table td { text-align: center; }
.rb-table td:first-child, .rb-table th:first-child { text-align: left; }
.rb-table .rb-yes { color: var(--navy); font-size: 1.1rem; line-height: 1; }
.rb-table .rb-no  { color: #C3CDD4; font-size: 1.1rem; line-height: 1; }
.rb-matrix thead small { display: block; font-weight: 500; font-size: .6875rem; opacity: .85; text-transform: none; letter-spacing: 0; }

/* grosse Platzhalter-Notiz (z. B. Lageplan «Folgt noch.») */
.rb-placeholder {
  margin: 2rem 0;
  padding: 4rem 2rem;
  border: 3px dashed var(--blue-light);
  border-radius: var(--radius);
  text-align: center;
  font-size: clamp(1.75rem, 7vw, 2.75rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--navy);
  background: var(--paper-alt);
}
.rb-scroll-hint { margin: -.5rem 0 1rem; font-size: .8125rem; color: var(--ink-muted); }

/* signage chips */
.rb-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.25rem; padding: 0; list-style: none; }
.rb-chip {
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .9rem; border-radius: 999px;
  font-size: .8125rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  background: var(--navy); color: #fff;
}
/* Piktogramm im Chip (z. B. Tunnel-Warnschild) auf weisser Plakette */
.rb-chip__img {
  height: 1.35em; width: auto;
  background: #fff; border-radius: 3px; padding: 2px 4px;
}
.rb-chip--platin  { background: #7F8C97; }
.rb-chip--gold    { background: #C9A227; }
.rb-chip--silber  { background: #A3ADB5; color: var(--navy); }
.rb-chip--bronze  { background: #A15300; }
.rb-chip--warn    { background: var(--red); }

/* ==========================================================================
   Tours
   ========================================================================== */
.rb-tour { --tour: var(--navy); }
.rb-tour[data-tour="platin"] { --tour: #7F8C97; }
.rb-tour[data-tour="gold"]   { --tour: #C9A227; }
.rb-tour[data-tour="silber"] { --tour: #A3ADB5; }
.rb-tour[data-tour="bronze"] { --tour: #A15300; }

.rb-tour .rb-chapter__head { border-bottom: 6px solid var(--tour); }
.rb-tour .rb-chapter__num  { color: var(--tour); }

/* climb card */
.rb-climb { scroll-margin-top: var(--header-offset); padding: 1.75rem 0 2rem; }
.rb-climb + .rb-climb { border-top: 1px solid var(--line); }
.rb-climb__head { margin-bottom: 1.1rem; }
.rb-climb__name {
  margin: 0;
  font-size: clamp(1.35rem, 6vw, 1.9rem);
  font-weight: 900; line-height: 1.05;
  letter-spacing: .01em; text-transform: uppercase;
  color: var(--navy);
}
.rb-climb__from {
  display: block; margin-top: .2rem;
  font-size: .875rem; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold);
}
.rb-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin: 0 0 1.25rem; }
.rb-stat {
  padding: .8rem .6rem;
  background: var(--paper-alt);
  border-top: 3px solid var(--tour, var(--navy));
  border-radius: 0 0 var(--radius) var(--radius);
  text-align: center;
}
.rb-stat__val { display: block; font-size: 1.25rem; font-weight: 800; line-height: 1.15; }
.rb-stat__key {
  display: block; margin-top: .15rem;
  font-size: .625rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-muted);
}

/* Höhenprofil: offizielle Grafik inkl. eingebauter Distanz-Achse */
.rb-profile { margin: 0 0 1.25rem; }
.rb-profile img {
  width: 100%; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fff;
}

/* interaktive Streckenkarte (trackmaxx, siehe karten/streckenkarte.html) */
.rb-map {
  margin: 0 0 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-alt);
}
.rb-map iframe {
  display: block;
  width: 100%;
  height: clamp(380px, 60vh, 540px);
  border: 0;
}
/* Elemente, die nur im Druck erscheinen (z. B. statische Streckenkarte
   als Ersatz für die interaktive Karte) */
.rb-print-only { display: none; }

/* Link-Button unter den Streckenkarten (interaktive Strecke & GPX) */
.rb-track-cta { margin: 0 0 1.5rem; }
.rb-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .8rem 1.2rem;
  background: var(--navy); color: #fff;
  border-radius: var(--radius);
  font-weight: 700; font-size: .9375rem;
  text-decoration: none;
}
.rb-btn:hover { background: var(--gold); color: #fff; }

.rb-warn__title {
  margin: 1.25rem 0 .6rem;
  font-size: .8125rem; font-weight: 800; letter-spacing: .1em;
  text-transform: uppercase; color: var(--red);
}
.rb-warn .rb-list li::before { background: var(--red); }

/* ==========================================================================
   Partner grid
   ========================================================================== */
.rb-partners { margin: 0 0 2rem; }
.rb-partners__label {
  margin: 2rem 0 1rem;
  font-size: .75rem; font-weight: 800; letter-spacing: .18em;
  text-transform: uppercase; color: var(--gold);
  padding-bottom: .5rem; border-bottom: 1px solid var(--line);
}
.rb-partners__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
  gap: 1rem;
  align-items: center;
}
.rb-partner {
  display: grid; place-items: center;
  min-height: 5.5rem; padding: .9rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.rb-partner img { max-height: 3.5rem; width: auto; object-fit: contain; }
.rb-partner--dark { background: var(--navy); border-color: var(--navy); }
/* Partner ohne Bildlogo: Name als Text-Kachel */
.rb-partner--text {
  font-weight: 800; color: var(--navy); text-align: center;
  font-size: .9375rem; letter-spacing: .02em; line-height: 1.3;
}

/* ==========================================================================
   Lightbox
   ========================================================================== */
.rb-lightbox {
  position: fixed; inset: 0; z-index: 70;
  display: none; place-items: center;
  padding: 1rem;
  background: rgba(12, 38, 55, .94);
}
.rb-lightbox[open], .rb-lightbox.is-open { display: grid; }
.rb-lightbox img {
  max-width: 100%; max-height: 82vh; object-fit: contain;
  background: #fff; border-radius: var(--radius);
}
.rb-lightbox__cap { margin-top: .75rem; color: rgba(255,255,255,.8); font-size: .875rem; text-align: center; }
.rb-lightbox__close {
  position: absolute; top: 1rem; right: 1rem;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff;
  font-size: 1.5rem; line-height: 1; cursor: pointer;
}
.rb-lightbox__close:hover { background: var(--yellow); color: var(--navy); border-color: var(--yellow); }
.rb-lightbox__hint { margin-top: .35rem; color: rgba(255,255,255,.5); font-size: .75rem; text-align: center; }

/* ==========================================================================
   Footer
   ========================================================================== */
.rb-outro {
  margin-top: 3rem;
  padding: 4rem 0;
  background: var(--navy);
  color: #fff;
  text-align: center;
}
.rb-outro__title {
  margin: 0 auto;
  max-width: 22rem;
  font-size: clamp(1.75rem, 8vw, 3rem);
  font-weight: 900; line-height: 1.05; text-transform: uppercase;
}
.rb-outro__logo { width: 11rem; margin: 2rem auto 0; }

.rb-foot { padding: 2.5rem 0; background: var(--navy-deep); color: rgba(255,255,255,.7); font-size: .875rem; }
.rb-foot a { color: var(--yellow); }
.rb-foot p { margin: 0 0 .5rem; }
.rb-foot__links { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 1rem; }
/* Quellenangabe Höhenprofile mit Logos auf weissen Plaketten */
.rb-foot__credits {
  display: flex; flex-wrap: wrap; align-items: center; gap: .75rem;
  margin-top: 1.5rem; font-size: .8125rem;
}
.rb-foot__credits img {
  height: 1.5rem; width: auto;
  background: #fff; border-radius: 3px; padding: 3px 8px;
}

/* ==========================================================================
   Desktop
   ========================================================================== */
@media (min-width: 48rem) {
  body { font-size: 1.125rem; }
  :root { --header-offset: 6rem; }

  .rb-menu-btn { top: 1.5rem; right: 1.5rem; width: 3.75rem; height: 3.75rem; }

  /* panel docks to the right instead of covering the page */
  .rb-nav { inset: 0 0 0 auto; width: min(26rem, 90vw); box-shadow: var(--shadow-lg); transform: translateX(1rem); }
  body.rb-nav-open .rb-nav { transform: none; }
  .rb-nav::before {
    content: ""; position: fixed; inset: 0; z-index: -1;
    background: rgba(12, 38, 55, .5);
    opacity: 0; transition: opacity .22s ease;
  }
  body.rb-nav-open .rb-nav::before { opacity: 1; }
  .rb-nav__inner { padding: 2rem 2rem 3rem; }

  .rb-hero__inner { padding-bottom: 5rem; }
  .rb-chapter__head { padding: 4rem 0; }
  .rb-chapter__body { padding: 3rem 0 1rem; }
  .rb-topic { padding: 1.75rem 0 2.25rem; }
  .rb-topic__title { font-size: 1.3125rem; }

  .rb-slots { grid-template-columns: repeat(2, 1fr); }
  .rb-figure--pair { grid-template-columns: repeat(2, 1fr); align-items: start; }
  /* Hochformat-Bilder (Karten, Rahmenkleber, Tafeln) auf Desktop in voller
     Breite statt hoehenbegrenzt - besser lesbar, Zoom bleibt zusaetzlich */
  .rb-figure--pair img,
  .rb-figure--tall img { max-height: none; width: 100%; }
  .rb-facts__row { grid-template-columns: 14rem 1fr; gap: 1rem; align-items: baseline; }
  .rb-stat__val { font-size: 1.5rem; }
  .rb-emergency { grid-template-columns: repeat(3, 1fr); }
  .rb-emergency li { flex-direction: column; align-items: flex-start; gap: .1rem; }
  .rb-table--wide { min-width: 0; }
  .rb-scroll-hint { display: none; }
}

@media (min-width: 64rem) {
  :root { --wrap: min(100% - 5rem, 64rem); }
  .rb-partners__grid { grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
}

/* ==========================================================================
   Print / "Als PDF speichern"
   Every chapter starts on a fresh page; nav, hero overlay and hints drop out.
   ========================================================================== */
/* ==========================================================================
   Print / «Als PDF speichern» - bewusst leichtgewichtig:
   kompletter Text + alle Bilder, aber KEINE Farbflächen und KEIN Titelbild.
   Struktur entsteht über dünne Linien statt über Hintergründe.
   ========================================================================== */
@media print {
  @page { size: A4 portrait; margin: 16mm 14mm 18mm; }

  :root { --wrap: 100%; }
  html, body { background: #fff !important; color: #000; font-size: 10.5pt; line-height: 1.45; }

  /* Bedienelemente + grosse Deko ausblenden (Titelbild, weisse Logos) */
  .rb-menu-btn, .rb-nav, .rb-progress, .rb-lightbox,
  .rb-hero__cue, .rb-scroll-hint, .rb-print-hide,
  .rb-map, .rb-hero__media, .rb-hero__logo, .rb-outro__logo { display: none !important; }
  /* im Druck ersetzt die statische Streckenkarte die interaktive */
  .rb-print-only { display: block !important; }

  a { color: #000; text-decoration: none; }
  /* spell out non-obvious links so the paper version stays usable */
  .rb-topic a[href^="http"]::after,
  .rb-foot a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 8pt; word-break: break-all; }

  /* Titel als schlichter Textkopf - kein Farbblock, kein Bild */
  .rb-hero { min-height: auto; background: none !important; color: var(--ink); }
  .rb-hero__inner { padding: 0 0 6mm; }
  .rb-hero__kicker { color: var(--ink-muted); }
  .rb-hero__year { color: var(--gold); }
  .rb-hero__lead { color: var(--ink-muted); }

  /* Kapitelköpfe: Text + Linie statt Navy-Fläche */
  .rb-chapter { page-break-before: always; }
  .rb-chapter:first-of-type { page-break-before: avoid; }
  .rb-chapter__head {
    margin-top: 0; padding: 0 0 3mm;
    background: none !important; color: var(--ink) !important;
    border-bottom: 2px solid var(--ink);
  }
  .rb-tour .rb-chapter__head { border-bottom: 2px solid var(--tour); }
  .rb-chapter__num { color: var(--gold); }
  .rb-chapter__intro { color: var(--ink-muted); }
  .rb-chapter__body { padding: 5mm 0 0; }

  .rb-topic, .rb-climb, .rb-figure, .rb-note, .rb-table-scroll, .rb-slot {
    page-break-inside: avoid;
  }
  .rb-climb { page-break-before: always; }
  .rb-topic__title, .rb-climb__name { page-break-after: avoid; }

  /* Flächenfüllungen raus - Ränder übernehmen die Struktur */
  .rb-note, .rb-note--important, .rb-note--danger,
  .rb-slot, .rb-stat, .rb-table__group th { background: none !important; }
  .rb-table thead th {
    position: static;
    background: none !important; color: #000 !important;
    border-bottom: 1.5px solid #000;
  }

  .rb-table-scroll { overflow: visible; }
  .rb-table, .rb-table--wide { min-width: 0; font-size: 8.5pt; }

  /* Bilder: alle drin, aber seitenfreundlich begrenzt und ohne Rahmen */
  .rb-figure img { border: 0 !important; }
  .rb-profile img { max-height: 70mm; object-fit: contain; }
  .rb-figure--tall img, .rb-figure--pair img { max-height: 200mm; width: auto; margin-inline: auto; }

  .rb-btn { background: none !important; color: #000 !important; padding: 0; font-weight: 600; }

  /* kleine Logo-Kacheln behalten ihren Hintergrund (weisses Winforce-Logo
     braucht die dunkle Kachel) - das sind keine grossen Farbflächen */
  .rb-partner { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .rb-outro {
    margin-top: 8mm; padding: 4mm 0 0;
    background: none !important; color: var(--ink);
    text-align: left; border-top: 2px solid var(--ink);
  }
  .rb-foot { background: #fff !important; color: #444; padding: 3mm 0 0; }
  .rb-foot a { color: #000; }
}
