body {
  margin: 0;
  padding: 2rem;
  font-family: Georgia, "Times New Roman", Times, serif;
  line-height: 1.6;
  background: #ffffff;
  color: #1a1a1a;
}

header {
  max-width: 700px;
  margin: 0 auto 1.5rem;
}

.hero {
  position: relative;
  max-width: 1000px;
  width: 100%;
  height: 680px;
  margin: 0 auto 3rem;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  /* Löst den Fotorand unten weich auf, statt hart abzuschneiden */
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 84%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 84%, transparent 100%);
}

.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 9, 7, 0.92) 0%,
    rgba(10, 9, 7, 0.65) 40%,
    rgba(10, 9, 7, 0.1) 75%
  );
}

.hero-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 46px;
  padding: 2rem 2.25rem 0;
  max-width: 760px;
}

.hero-credit {
  position: absolute;
  top: 0.9rem;
  right: 1.1rem;
  font-size: 0.7rem;
  letter-spacing: 0.03em;
  color: rgba(255, 255, 255, 0.75);
  margin: 0;
}

.headline {
  font-size: 2.1rem;
  line-height: 1.22;
  color: #ffffff;
  margin: 0 0 0.85rem;
}

.lead {
  font-size: 1.15rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 0.85rem;
}

.byline {
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin: 0;
}

.byline-below {
  max-width: 640px;
  margin: 0 auto 1.5rem;
  color: #8a8a8a;
}

.article-intro {
  max-width: 640px;
  margin: 0 auto 3rem;
}

.article-intro p {
  font-size: 1.08rem;
  line-height: 1.75;
  color: #262626;
  margin: 0 0 1.3rem;
}

.article-intro p:last-child {
  margin-bottom: 0;
}

.world-chrome h2 {
  font-size: 1.6rem;
  margin: 0;
}

.source {
  max-width: 1000px;
  margin: 1rem auto 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: #8a8a8a;
}

.subtitle {
  font-size: 0.9rem;
  color: #555;
  margin: 0.5rem 0 0;
}

.map-sticky-wrap {
  position: sticky;
  top: 2rem;
  z-index: 1;
}

#map {
  max-width: 1000px;
  margin: 0 auto;
}

/* jedes Land */
.country {
  stroke: #ffffff;
  stroke-width: 0.5;
  cursor: pointer;
  vector-effect: non-scaling-stroke; /* Grenzen bleiben beim Reinzoomen dünn */
  transition: opacity 0.5s ease;
}

.country:hover {
  stroke: #1a1a1a;
  stroke-width: 1;
}

.country.selected {
  stroke: #1d5c8a;
  stroke-width: 1.5;
}

/* Während der Route-/Europa-/Schweiz-Etappen werden die jeweils nicht
   relevanten Länder ausgegraut, damit der Blick gezielt auf die gerade
   erzählten Länder fällt (siehe setCountryHighlight() in script.js). */
.country.dimmed {
  opacity: 0.2;
}

.map-layer {
  transition: transform 1.8s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.8s ease;
  transform-origin: 0 0;
}

.map-layer.faded-out {
  opacity: 0;
}

.ch-layer {
  opacity: 0;
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.ch-layer.visible {
  opacity: 1;
  pointer-events: auto;
}

.canton {
  stroke: #ffffff;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

/* Weltkarten-Oberfläche (Titel, Buttons, Legende, Quelle) blendet aus,
   sobald die Schweiz-Szene beginnt – body.showing-switzerland steuert das. */
.world-chrome {
  transition: opacity 0.6s ease;
}

body.showing-switzerland .world-chrome {
  opacity: 0;
  pointer-events: none;
}

.ch-hint {
  max-width: 1000px;
  margin: 0 auto 0.75rem;
  font-size: 0.88rem;
  color: #333;
  opacity: 0;
  transition: opacity 0.6s ease 0.4s;
}

body.showing-switzerland .ch-hint {
  opacity: 1;
}

/* Scrollytelling-Einleitung: liegt als kompakte, angedockte Karte auf der
   (stehenbleibenden) Karte und wird direkt per Scroll-Fortschritt ein-/
   ausgeblendet (kein CSS-Trigger, siehe script.js updateScrolly()). Deckt die
   Karte bewusst NICHT ab - die restliche Fläche bleibt sichtbar, damit Text
   und Karte gleichzeitig lesbar sind (siehe auch .country.dimmed unten, das
   pro Etappe die jeweils relevanten Länder hervorhebt). */
.ch-scrolly {
  position: absolute;
  left: 1.5rem;
  bottom: 1.5rem;
  max-width: 420px;
  width: calc(100% - 3rem);
  /* Percentage max-height wouldn't resolve here: .map-sticky-wrap's height is
     "auto" (sized by its content), and absolutely positioned descendants can't
     resolve percentage heights against an auto-height containing block - it
     silently computes to "none" (unconstrained), which is exactly how the
     panel ended up overflowing past the map before this was caught. Viewport
     units don't have that dependency. */
  max-height: min(480px, 75vh);
  overflow-y: auto;
  padding: 1.5rem 1.75rem;
  background: rgba(255, 255, 255, 0.97);
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
  opacity: 0;
  pointer-events: none;
  scrollbar-width: thin;
}

.ch-scrolly::-webkit-scrollbar {
  width: 6px;
}

.ch-scrolly::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 3px;
}

.ch-scrolly-inner {
  text-align: left;
}

.ch-scrolly-inner h2 {
  font-size: 1.35rem;
  margin: 0 0 0.75rem;
  text-align: left;
}

.ch-scrolly-inner p {
  font-size: 1rem;
  line-height: 1.65;
  color: #262626;
  margin: 0 0 1rem;
}

.ch-scrolly-inner p:last-child {
  margin-bottom: 0;
}

.cartel-figures {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: flex-start;
  margin-top: 1.1rem;
}

.cartel-figure {
  width: 82px;
  margin: 0;
  text-align: center;
}

.cartel-figure img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 0.4rem;
  border: 2px solid #1a1a1a;
}

.cartel-figure figcaption strong {
  display: block;
  font-size: 0.7rem;
  line-height: 1.2;
  margin-bottom: 0.2rem;
}

.cartel-figure figcaption span {
  display: block;
  font-size: 0.6rem;
  color: #666;
  line-height: 1.25;
}

/* Die Route-Etappe hat kein deckendes Text-Panel wie die anderen Scrolly-Stufen -
   die Karte mit dem fahrenden Schiff soll für sich alleine sichtbar bleiben,
   die Fakten stehen stattdessen direkt als Labels auf der Karte (siehe unten). */
.ch-scrolly-transparent {
  background: transparent;
  box-shadow: none;
  pointer-events: none;
}

/* Route-Pfeil Südamerika -> Europa, liegt in .map-layer und zoomt/verschiebt
   sich darum automatisch mit der Karte mit. Standardmässig unsichtbar, JS
   blendet ihn synchron mit dem zugehörigen Scrolly-Text ein/aus. */
.route-arrow {
  opacity: 0;
  pointer-events: none;
}

.route-arrow-line {
  fill: none;
  stroke: #b0231c;
  stroke-width: 3;
  stroke-dasharray: 8 6;
  vector-effect: non-scaling-stroke;
}

.route-arrow-head {
  fill: #b0231c;
}

.ship-hull,
.ship-deck {
  fill: #1a1a1a;
}

/* Fakten-Labels direkt auf der Karte (statt eines deckenden Text-Panels) -
   blenden erst ein, nachdem Pfeil und Schiff schon eine Weile alleine zu sehen
   waren (siehe LABEL_DELAY in script.js). */
.route-label {
  pointer-events: none;
}

.route-label-bg {
  fill: #fffdf7;
  fill-opacity: 0.92;
  stroke: #b0231c;
  stroke-width: 1;
}

.route-label-title {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-weight: 700;
  font-size: 8px;
  fill: #1a1a1a;
}

.route-label-text {
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: 7px;
  fill: #333;
}

.beat-subtitle {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b0231c;
  margin: 0 0 0.5rem;
}

.beat-placeholder {
  color: #999;
  font-style: italic;
}

/* Fall-Marker auf der Kantonskarte */
.case-markers {
  opacity: 0;
  transition: opacity 0.6s ease 0.3s;
  pointer-events: none;
}

.case-markers.visible {
  opacity: 1;
  pointer-events: auto;
}

.case-marker {
  cursor: pointer;
}

.case-marker circle.marker-ring {
  fill: #ffffff;
  stroke: #1a1a1a;
  stroke-width: 1.5;
}

.case-marker:hover circle.marker-ring {
  stroke: #b0231c;
}

.case-marker path.marker-face,
.case-marker circle.marker-head {
  fill: none;
  stroke: #1a1a1a;
  stroke-width: 1.2;
}

.case-marker text {
  font-size: 10px;
  font-weight: 700;
  fill: #1a1a1a;
  text-anchor: middle;
}

.case-marker .marker-label {
  font-size: 9px;
  font-weight: 400;
  fill: #555;
}

/* Die zwölf nicht vertieft recherchierten Fälle: unauffällig grau statt schwarz/rot */
.case-marker.minor circle.marker-ring {
  fill: #ececea;
  stroke: #b5b3ac;
  stroke-width: 1;
}

.case-marker.minor:hover circle.marker-ring {
  stroke: #8a8a8a;
}

.case-marker.minor path.marker-face,
.case-marker.minor circle.marker-head {
  stroke: #b5b3ac;
  stroke-width: 1;
}

.case-marker.minor .marker-number {
  font-size: 10px;
  font-weight: 400;
  fill: #9a9890;
}

/* Aufblitzen des Kantons, der zum angeklickten Fall gehört: kurz von Neutral
   auf Akzentrot und wieder zurück, statt nur heller/dunkler zu werden. */
@keyframes canton-flash {
  0%   { fill: #d8d8d3; }
  25%  { fill: #b0231c; }
  75%  { fill: #b0231c; }
  100% { fill: #d8d8d3; }
}

.canton.flash {
  animation: canton-flash 1.4s ease;
}

/* Fall-Steckbrief-Popup */
.case-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 14, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
  z-index: 10;
}

.case-popup-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.case-popup {
  background: #ffffff;
  max-width: 480px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 1.75rem 1.75rem 2rem;
  position: relative;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
  transform: translateY(12px);
  transition: transform 0.25s ease;
}

.case-popup-backdrop.open .case-popup {
  transform: translateY(0);
}

.case-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1rem;
  color: #8a8a8a;
  cursor: pointer;
  line-height: 1;
  padding: 0.25rem;
}

.case-popup-close:hover {
  color: #1a1a1a;
}

.case-popup-filenum {
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.7rem;
  color: #8a8a8a;
  letter-spacing: 0.02em;
  margin: 0 0 0.4rem;
}

.case-popup h3 {
  font-size: 1.25rem;
  margin: 0 0 0.6rem;
  padding-right: 1.5rem;
}

.case-popup-lede {
  font-size: 0.94rem;
  line-height: 1.65;
  color: #333;
  margin: 0 0 1.1rem;
}

.case-popup-section-label {
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b0231c;
  border-bottom: 1px solid #e5e2da;
  padding-bottom: 0.35rem;
  margin: 1.1rem 0 0.6rem;
}

.case-popup-accused,
.case-popup-facts {
  margin: 0;
  padding-left: 1.1rem;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #262626;
}

.case-popup-accused li,
.case-popup-facts li {
  margin-bottom: 0.4rem;
}

.case-popup-accused b {
  color: #1a1a1a;
}

.country-readout {
  max-width: 1000px;
  margin: 0 auto 0.75rem;
  font-size: 0.88rem;
  color: #333;
  min-height: 1.2em;
}

.controls {
  max-width: 1000px;
  margin: 1.25rem auto 0.75rem;
  display: flex;
  gap: 0.5rem;
}

.metric-btn {
  font-family: -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.82rem;
  padding: 0.45rem 0.9rem;
  background: #ffffff;
  color: #333;
  border: 1px solid #c9c9c9;
  cursor: pointer;
}

.metric-btn:hover {
  border-color: #8a8a8a;
}

.metric-btn.active {
  background: #2b2b2b;
  color: #ffffff;
  border-color: #2b2b2b;
}

.metric-btn:focus-visible {
  outline: 2px solid #1d5c8a;
  outline-offset: 2px;
}

.legend {
  max-width: 1000px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8rem;
  color: #555;
}

.legend-bar {
  width: 200px;
  height: 10px;
  background: linear-gradient(to right, #f2f2f2, #8a8a8a, #2b2b2b, #b0231c);
}

.legend-nodata {
  margin-left: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.legend-nodata i {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: repeating-linear-gradient(
    45deg,
    #f7f7f5,
    #f7f7f5 2px,
    #c7c7c2 2px,
    #c7c7c2 3px
  );
}

.scroll-spacer {
  height: 820vh; /* Vorlauf (Weltkarte bleibt stehen) + 3 Scrolly-Etappen (Route bekommt mehr Platz fürs alleinstehende Schiff, Europa, Schweiz) */
  display: flex;
  align-items: center;
  justify-content: center;
}

.trigger-marker {
  height: 10px;
}

.ch-space-below {
  height: 80vh;
}

/* Fliesstext-Artikel zu den drei Fällen, nach der Kantonskarte */
.case-writeups-intro {
  max-width: 640px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid #e5e2da;
  font-size: 1.15rem;
  line-height: 1.6;
  color: #1a1a1a;
}

.case-writeups {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.case-writeup {
  padding-top: 2.5rem;
  margin-top: 2.5rem;
  border-top: 1px solid #e5e2da;
}

.case-writeup:first-child {
  padding-top: 0;
  margin-top: 0;
  border-top: none;
}

.case-writeup h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

.case-writeup p {
  font-size: 1.08rem;
  line-height: 1.75;
  color: #262626;
  margin: 0 0 1.2rem;
}

.case-writeup p:last-child {
  margin-bottom: 0;
}

.case-writeup .beat-placeholder {
  font-size: 1.08rem;
  line-height: 1.75;
}

.site-footer {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 0 6rem;
  border-top: 1px solid #e5e2da;
  font-size: 0.9rem;
  color: #666;
}

.site-footer a {
  color: #1a1a1a;
}

