/* RLK Walking Tour — theme stylesheet.
 *
 * Mobile-first on purpose: the audience reads this on a phone, standing
 * outdoors, often in bright sunlight. That drives three choices throughout —
 * a large base size, high text contrast, and generous tap targets.
 *
 * Colours and the typeface are taken from the live Reiner Lemoine Stiftung
 * stylesheet (css/style-neu2.css) so the site sits next to the Kolleg pages
 * without looking borrowed.
 */

/* ---------------------------------------------------------------- tokens */
:root {
  --navy:        #1c3d5a;   /* RLS primary: headings, nav, rules */
  --navy-dark:   #14293c;
  --ink:         #2e2e2e;   /* darker than the RLS #454545: sunlight legibility */
  --ink-muted:   #5d6b78;
  --paper:       #ffffff;
  --paper-tint:  #f7f9fb;
  --blue-pale:   #e4f1ff;   /* RLS callout background */
  --blue-line:   #dde4eb;   /* RLS rules and borders */
  --yellow:      #fcb926;   /* RLS accent */
  --yellow-pale: #fff8e8;

  /* Line length. Widened on larger screens only — on a phone the viewport is
     always narrower than this, so the phone layout is unaffected. */
  --measure: 38rem;
  --radius: 6px;
  --gap: 1.5rem;

  --font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI",
          system-ui, sans-serif;
}

/* ---------------------------------------------------------------- reset */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--navy); text-underline-offset: 2px; }
a:hover { color: var(--navy-dark); }

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 74rem;
  margin: 0 auto;
  padding: 0 1.1rem;
}

.skiplink {
  position: absolute;
  left: -9999px;
}
.skiplink:focus {
  left: 1rem; top: 1rem;
  z-index: 10;
  background: var(--navy);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: var(--radius);
}

/* ---------------------------------------------------------------- header */
.siteheader {
  background: var(--navy);
  color: #fff;
}
.siteheader__inner {
  display: flex;
  align-items: center;
  min-height: 4rem;
  padding-top: .6rem;
  padding-bottom: .6rem;
}
.siteheader__brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #fff;
  text-decoration: none;
}
.siteheader__brand img {
  width: 40px; height: 40px;
  background: #fff;
  border-radius: var(--radius);
  padding: 4px;
  flex: none;
}
.siteheader__brand strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
  letter-spacing: .01em;
}
.siteheader__brand small {
  display: block;
  font-size: .8rem;
  font-weight: 400;
  opacity: .82;
  line-height: 1.3;
}

main { padding: 2rem 1.1rem 3rem; }

/* ---------------------------------------------------------------- typography */
h1, h2, h3 {
  color: var(--navy);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 .5em;
  overflow-wrap: break-word;
}
h1 { font-size: 1.85rem; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; margin-top: 2.2rem; }
h3 { font-size: 1.08rem; margin-top: 1.6rem; }

p { margin: 0 0 1.15em; }

.eyebrow {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: .5rem;
}

/* Constrain running prose to a readable measure; boxes and figures opt out. */
.prose { max-width: var(--measure); }
.prose h2 {
  padding-top: .4rem;
  border-top: 2px solid var(--blue-line);
}
.prose ul, .prose ol { margin: 0 0 1.15em; padding-left: 1.35rem; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--navy); }

/* Long URLs in the sources lists must not force a horizontal scrollbar. */
.prose a { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- station head */
.station__head { margin-bottom: 1.5rem; }
.station__subtitle {
  font-size: 1.12rem;
  color: var(--ink-muted);
  max-width: var(--measure);
  margin-bottom: 0;
}

.stationinfo {
  margin: 0 0 1.5rem;
  padding: .9rem 1.1rem;
  background: var(--paper-tint);
  border: 1px solid var(--blue-line);
  border-radius: var(--radius);
  display: grid;
  gap: .6rem;
}
.stationinfo > div { display: grid; gap: .1rem; }
.stationinfo dt {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.stationinfo dd { margin: 0; }

/* ---------------------------------------------------------------- photo */
.stationfoto { margin: 0 0 2rem; }
.stationfoto img {
  width: 100%;
  border-radius: var(--radius);
}
.stationfoto__leer {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  border: 2px dashed var(--blue-line);
  border-radius: var(--radius);
  background: var(--paper-tint);
  color: var(--ink-muted);
  font-size: .9rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.stationfoto figcaption {
  margin-top: .6rem;
  font-size: .86rem;
  line-height: 1.5;
  color: var(--ink-muted);
  max-width: var(--measure);
}

/* ---------------------------------------------------------------- boxes */
.box {
  margin: 1.6rem 0;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  border-left: 4px solid var(--navy);
  background: var(--paper-tint);
  max-width: var(--measure);
}
.box > :last-child { margin-bottom: 0; }
.box__title {
  font-weight: 700;
  color: var(--navy);
  margin-bottom: .6em;
  font-size: 1.02rem;
}
.box__meta {
  font-size: .82rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: .9em;
}
.box__link { margin-top: 1em; margin-bottom: 0; font-weight: 500; }

/* A figure the box brings along itself, e.g. Arnstein's ladder in station 3.
   White ground, because these are diagrams drawn for paper: on the box's
   tinted background their own white edges would otherwise show as a patch. */
.box__abb {
  margin: 1.2em 0 0;
}
.box__abb img {
  display: block;
  width: 100%;
  background: #fff;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius);
}
.box__abb figcaption {
  margin-top: .5em;
  font-size: .84rem;
  line-height: 1.45;
  color: var(--ink-muted);
}

/* "Kurz erklärt" — the orientation box at the top of each station. */
.box--kurz-erklaert {
  background: var(--blue-pale);
  border-left-color: var(--navy);
}

/* "Vertiefung" — optional depth, visually lighter than the main thread. */
.box--vertiefung {
  background: var(--paper-tint);
  border-left-color: var(--blue-line);
}
.box--vertiefung .box__title { color: var(--ink-muted); }

/* The researcher behind the station. */
.box--forschung {
  background: #fff;
  border: 1px solid var(--blue-line);
  border-left: 4px solid var(--navy);
}

/* The quiz — the one place that uses the RLS accent yellow. */
.box--denkfrage {
  background: var(--yellow-pale);
  border-left-color: var(--yellow);
}
.box--denkfrage .box__title { color: var(--navy); }
.box--denkfrage ul { list-style: none; padding-left: 0; }
.box--denkfrage li {
  background: #fff;
  border: 1px solid #f0e2c4;
  border-radius: var(--radius);
  padding: .55rem .8rem;
  margin-bottom: .45rem;
}

.denkfrage__answer {
  margin-top: 1rem;
  border-top: 1px solid #f0e2c4;
  padding-top: .9rem;
}
.denkfrage__answer > summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  padding: .5rem .2rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;           /* comfortable tap target */
}
.denkfrage__answer > summary::-webkit-details-marker { display: none; }
.denkfrage__answer > summary::before {
  content: "▶";
  font-size: .7em;
  transition: transform .15s ease;
}
.denkfrage__answer[open] > summary::before { transform: rotate(90deg); }
.denkfrage__answer[open] > summary { margin-bottom: .6rem; }

/* ------------------------------------------------- Quellen (eingeklappt) */
.quellen {
  margin: 2.5rem 0 0;
  max-width: var(--measure);
  border-top: 2px solid var(--blue-line);
  padding-top: .4rem;
}
.quellen > summary {
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.25;
  padding: .55rem .2rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
}
.quellen > summary::-webkit-details-marker { display: none; }
.quellen > summary::before {
  content: "▶";
  font-size: .55em;
  color: var(--ink-muted);
  transition: transform .15s ease;
  flex: none;
}
.quellen[open] > summary::before { transform: rotate(90deg); }
.quellen[open] > summary { margin-bottom: .5rem; }
.quellen ul { padding-left: 1.35rem; }
.quellen li { font-size: .93rem; line-height: 1.55; }
.quellen a { overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- station nav */
.stationnav {
  display: grid;
  gap: .75rem;
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--blue-line);
}
.stationnav a {
  display: block;
  padding: .9rem 1.1rem;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius);
  background: var(--paper-tint);
  text-decoration: none;
  min-height: 44px;
}
.stationnav a:hover {
  background: var(--blue-pale);
  border-color: var(--navy);
}
.stationnav span {
  display: block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.stationnav strong { color: var(--navy); line-height: 1.35; }
.stationnav__next { text-align: right; }

/* ---------------------------------------------------------------- home */
.hero { display: grid; gap: 1.8rem; }
.hero h1 { font-size: 2rem; }
/* Larger than a normal figure caption: this one carries the link to the
   interactive map, so it is something to read, not just an attribution. */
.hero__karte figcaption {
  margin-top: .6rem;
  font-size: .95rem;
  line-height: 1.5;
  color: var(--ink-muted);
}
.hero__karte figcaption a {
  color: inherit;
}
.hero__karte img {
  width: 100%;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius);
}

/* The "Startpunkt / Dauer" facts on the home page, emitted as a definition
   list by the Markdown source. */
.tourfakten {
  margin: 1.4rem 0 0;
  padding: 1rem 1.2rem;
  background: var(--blue-pale);
  border-radius: var(--radius);
  display: grid;
  gap: .7rem;
}
.tourfakten > div { display: grid; gap: .1rem; }
.tourfakten dt {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--navy);
}
.tourfakten dd { margin: 0; }

.stationen { margin-top: 3rem; }
.stationen h2 {
  border-top: 2px solid var(--blue-line);
  padding-top: .8rem;
}
.stationliste {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .7rem;
}
.stationliste a {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1.1rem;
  border: 1px solid var(--blue-line);
  border-radius: var(--radius);
  background: var(--paper-tint);
  text-decoration: none;
  transition: background .12s ease, border-color .12s ease;
}
.stationliste a:hover {
  background: var(--blue-pale);
  border-color: var(--navy);
}
.stationliste__nr {
  flex: none;
  width: 2.25rem; height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}
.stationliste__text { display: grid; gap: .15rem; }
.stationliste__text strong { color: var(--navy); line-height: 1.35; }
.stationliste__sub,
.stationliste__ort {
  font-size: .87rem;
  color: var(--ink-muted);
  line-height: 1.45;
}
.stationliste__ort { font-size: .8rem; }

/* ---------------------------------------------------------------- footer */
.sitefooter {
  margin-top: 3rem;
  padding: 1.8rem 0 2.4rem;
  background: var(--navy);
  color: #dbe6f0;
  font-size: .88rem;
}
.sitefooter p { margin: 0 0 .6em; }
.sitefooter p:last-child { margin-bottom: 0; }
.sitefooter a { color: #fff; }
.sitefooter__muted { opacity: .75; font-size: .82rem; }
.sitefooter__hinweis { opacity: .75; font-size: .82rem; max-width: var(--measure); }

/* ------------------------------------------------ Audio, über "Kurz erklärt" */
/* The native player is deliberate: no library, no third-party request, and it
   is the control people already know from every other site. */
.stationaudio {
  max-width: var(--measure);
  margin: 0 auto 1.8rem;
  padding: 1rem 1.1rem 1.1rem;
  background: var(--blue-pale);
  border-radius: var(--radius);
}
.stationaudio__titel {
  margin: 0 0 .7em;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--navy);
}
/* The note belongs to the heading, but is not part of the claim it makes --
   lighter and smaller, so "Diese Station zum Anhören" still reads as the
   label and the note as an aside. */
.stationaudio__hinweis {
  display: block;
  margin-top: .25em;
  font-weight: 400;
  font-size: .82rem;
  color: var(--ink-muted);
}
.stationaudio audio {
  display: block;
  width: 100%;
  /* Chrome renders the bare control at 54px, Firefox at 40px; pinning the
     height keeps the box the same size in both. */
  height: 44px;
}

/* ---------------------------------------------------------------- wider screens */
@media (min-width: 44rem) {
  body { font-size: 18px; }
  :root { --measure: 44rem; }
  h1 { font-size: 2.25rem; }
  .hero h1 { font-size: 2.5rem; }
  h2 { font-size: 1.5rem; }
  main { padding-top: 2.75rem; }

  .stationinfo {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.2rem;
  }
  .tourfakten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stationnav { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 62rem) {
  /* Wider measure and slightly larger type together: widening alone would
     push the line past a comfortable character count. */
  :root { --measure: 48rem; }
  body { font-size: 19px; }

  /* Map beside the description, as the brief asked. */
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 34rem);
    align-items: start;
    gap: 2.75rem;
  }
  /* The hero text sits next to the map, so it keeps the narrower measure
     while the station prose below uses the full width. */
  .hero__text .prose { max-width: 34rem; }
}

/* ---------------------------------------------------------------- print */
@media print {
  .siteheader, .sitefooter, .stationnav, .skiplink { display: none; }
  body { font-size: 11pt; }
  .box { break-inside: avoid; }

  /* Expand every <details> on paper — a printed page cannot be clicked, so a
     collapsed quiz answer or sources list would simply be missing. */
  details > *:not(summary) { display: revert !important; }
  details > summary::before { content: "" !important; }
  .quellen li { font-size: 9.5pt; }

  .prose a::after { content: " (" attr(href) ")"; font-size: .85em; }
}
