:root {
  --nacht: #0c1a27;
  --tief: #102335;
  --flaeche: #16304a;
  --linie: #24445f;
  --text: #e3ecf2;
  --leise: #9fb4c4;
  --akzent: #6fb7d6;
  --orange: #e8a23a;
  --gut: #5fbf8f;
  --schlecht: #e0736b;
  --land: #1f3a52;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--nacht);
  color: var(--text);
  font: 1.125rem/1.7 var(--serif);
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, .kicker, .logo, nav, button, .zahlen, figcaption, .legende, .info, .balken, .klein, .fuss, .szenarien-titel {
  font-family: var(--sans);
}
h1, h2, h3 { line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 0 0 1rem; }
h3 { font-size: 1.15rem; margin: 0 0 .5rem; }
p { margin: 0 0 1.1rem; }
b { color: #fff; }
a { color: var(--akzent); }
img { max-width: 100%; height: auto; display: block; }

/* Kopf */
.kopf {
  position: sticky; top: 0; z-index: 10;
  background: rgba(12, 26, 39, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linie);
}
.kopf-innen {
  max-width: 1200px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 24px; height: 56px;
}
.logo { font-weight: 800; color: #fff; text-decoration: none; white-space: nowrap; }
nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
nav::-webkit-scrollbar { display: none; }
nav a {
  color: var(--leise); text-decoration: none; font-size: .9rem; white-space: nowrap;
  padding: 8px 10px; border-radius: 6px;
}
nav a:hover, nav a:focus-visible { color: #fff; background: var(--flaeche); }
@media (max-width: 760px) { .logo { display: none; } .kopf-innen { gap: 0; } }

/* Hero */
.hero { position: relative; min-height: min(78vh, 680px); display: flex; align-items: flex-end; overflow: hidden; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(12,26,39,.15) 0%, rgba(12,26,39,.55) 50%, var(--nacht) 100%);
}
.hero-text { position: relative; z-index: 1; max-width: 860px; margin: 0 auto; padding: 120px 16px 40px; width: 100%; }
.kicker { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 700; color: var(--orange); margin-bottom: .6rem; }
h1 { font-size: clamp(2.2rem, 7vw, 4rem); margin: 0 0 1rem; font-weight: 800; text-shadow: 0 2px 20px rgba(0,0,0,.4); }
.lead { font-size: clamp(1.1rem, 2.4vw, 1.3rem); max-width: 680px; text-shadow: 0 1px 10px rgba(0,0,0,.5); }

/* Kennzahlen */
.zahlen {
  max-width: 1100px; margin: 0 auto; padding: 0 16px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
}
.zahlen div { background: var(--tief); border: 1px solid var(--linie); border-radius: 12px; padding: 18px; }
.zahlen strong { display: block; font-size: clamp(1.5rem, 3.4vw, 2rem); color: var(--akzent); line-height: 1.1; margin-bottom: 6px; }
.zahlen span { font-size: .9rem; color: var(--leise); line-height: 1.4; display: block; }
@media (max-width: 800px) { .zahlen { grid-template-columns: 1fr 1fr; } }

/* Inhalt */
.inhalt { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.inhalt > section { padding: 64px 0 8px; border-bottom: 1px solid var(--linie); }
.inhalt > section:last-child { border-bottom: 0; }
.breit { margin: 0 calc(50% - min(50vw, 600px)); padding-left: 16px !important; padding-right: 16px !important; }
.breit > h2, .breit > p { max-width: 728px; margin-left: auto; margin-right: auto; }

figure { margin: 1.5rem 0 1.8rem; }
figure img { border-radius: 10px; }
figcaption { font-size: .85rem; color: var(--leise); margin-top: .5rem; line-height: 1.45; }
@media (min-width: 900px) {
  .bild-rechts { float: right; width: 52%; margin: .3rem -120px 1rem 28px; }
  section::after { content: ""; display: block; clear: both; }
}
.bild-breit img { width: 100%; max-height: 440px; object-fit: cover; object-position: 50% 45%; }

/* Fachbegriffe */
.begriffe { display: grid; gap: 10px; margin: 1.5rem 0 1.5rem; clear: both; }
.begriffe div { background: var(--tief); border-left: 4px solid var(--akzent); border-radius: 0 8px 8px 0; padding: 12px 16px; }
.begriffe dt { font-family: var(--sans); font-weight: 700; }
.begriffe dd { margin: 0; color: var(--leise); font-size: 1rem; line-height: 1.55; }

/* Karte */
.karten-box { background: var(--tief); border: 1px solid var(--linie); border-radius: 14px; padding: 16px; margin: 1.5rem auto 1.6rem; max-width: 1168px; }
.szenarien { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.szenarien-titel { width: 100%; font-weight: 700; font-size: .95rem; }
.szenarien button {
  font-size: .9rem; padding: 10px 14px; min-height: 44px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--linie); background: var(--flaeche); color: var(--text);
}
.szenarien button:hover { border-color: var(--akzent); }
.szenarien button[aria-pressed="true"] { background: var(--orange); border-color: var(--orange); color: #1b1203; font-weight: 700; }
.karte-und-info { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
@media (max-width: 900px) { .karte-und-info { grid-template-columns: 1fr; } }
.karte { position: relative; background: #0a1622; border-radius: 10px; overflow: hidden; }
.karte svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.info { background: var(--flaeche); border-radius: 10px; padding: 16px; font-size: .95rem; line-height: 1.55; min-height: 220px; }
.info h3 { color: #fff; margin-bottom: .3rem; }
.info .typ { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--orange); font-weight: 700; margin: 0 0 .3rem; }
.info p { margin: 0 0 .7rem; }
.info .werte { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: .4rem 0 .8rem; }
.info .werte dt { color: var(--leise); }
.info .werte dd { margin: 0; font-weight: 700; color: #fff; }
.info .tipp { color: var(--leise); font-size: .85rem; }

.land { fill: var(--land); stroke: #2c4d68; stroke-width: .5; }
.gitter { fill: none; stroke: #13283b; stroke-width: .5; }
.route-neben { fill: none; stroke: #4f7f9e; stroke-width: 1.4; stroke-dasharray: 4 3; opacity: .8; }
.route-haupt { fill: none; stroke: var(--orange); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.route-geist { fill: none; stroke: var(--orange); stroke-width: 1.2; opacity: .25; stroke-dasharray: 2 4; }
.schiff { fill: #fff; }
.schiff-haupt { fill: #fff; stroke: var(--orange); stroke-width: 1.5; }
.punkt { cursor: pointer; outline: none; }
.punkt .ring { fill: transparent; }
.punkt .kern-nadel { fill: var(--schlecht); stroke: #fff; stroke-width: 1.5; }
.punkt .kern-hafen { fill: var(--akzent); stroke: #fff; stroke-width: 1.5; }
.punkt.gesperrt .kern-nadel { fill: #7a1f1a; }
.punkt text { font: 600 11px var(--sans); fill: #d9e6ee; paint-order: stroke; stroke: #0a1622; stroke-width: 3px; pointer-events: none; }
.punkt:hover .kern-nadel, .punkt:hover .kern-hafen, .punkt:focus-visible .kern-nadel, .punkt:focus-visible .kern-hafen, .punkt.aktiv .kern-nadel, .punkt.aktiv .kern-hafen { stroke: var(--orange); stroke-width: 3; }
.puls { fill: none; stroke: var(--schlecht); stroke-width: 1.5; animation: puls 2.4s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes puls { from { transform: scale(1); opacity: .9; } to { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .puls { animation: none; opacity: 0; } }
.kreuz { stroke: #fff; stroke-width: 2; }

.legende { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; padding: 0; margin: 12px 0 0; font-size: .82rem; color: var(--leise); }
.legende i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.l-route { width: 22px; height: 3px; background: var(--orange); border-radius: 2px; }
.l-neben { width: 22px; border-top: 2px dashed #4f7f9e; }
.l-hafen, .l-nadel { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid #fff; }
.l-hafen { background: var(--akzent); }
.l-nadel { background: var(--schlecht); }

/* Chancen / Probleme */
.zwei-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 1rem; }
@media (max-width: 700px) { .zwei-spalten { grid-template-columns: 1fr; } }
.karte-gut, .karte-schlecht { background: var(--tief); border-radius: 12px; padding: 18px 18px 6px; border-top: 4px solid; }
.karte-gut { border-color: var(--gut); }
.karte-schlecht { border-color: var(--schlecht); }
.karte-gut h3 { color: var(--gut); }
.karte-schlecht h3 { color: var(--schlecht); }
.zwei-spalten ul { padding-left: 1.1rem; margin: 0; font-size: 1rem; line-height: 1.55; }
.zwei-spalten li { margin-bottom: .8rem; }

/* Balken */
.balken { background: var(--tief); border-radius: 12px; padding: 18px; margin: 1.2rem 0 .4rem; display: grid; gap: 12px; }
.zeile { display: grid; grid-template-columns: 170px 1fr 64px; align-items: center; gap: 12px; font-size: .92rem; }
.spur { background: #0a1622; border-radius: 4px; height: 22px; overflow: hidden; }
.wert { display: block; height: 100%; width: max(var(--w), 6px); background: var(--akzent); border-radius: 4px; }
.wert.flug { background: var(--schlecht); }
.zahl { text-align: right; font-weight: 700; }
@media (max-width: 520px) {
  .zeile { grid-template-columns: 1fr 64px; }
  .zeile .name { grid-column: 1 / -1; margin-bottom: -6px; }
}
.klein { font-size: .82rem; color: var(--leise); line-height: 1.5; }

/* Ideen */
.ideen { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 1.2rem 0 1.4rem; }
@media (max-width: 640px) { .ideen { grid-template-columns: 1fr; } }
.ideen div { background: var(--tief); border-radius: 12px; padding: 16px 18px 4px; border-left: 4px solid var(--gut); }
.ideen p { font-size: 1rem; line-height: 1.55; color: #c8d6e0; }

/* Fazit */
.fazit-box { background: #e6eef3; color: #10202e; border-radius: 14px; padding: clamp(20px, 4vw, 36px); margin-bottom: 48px; }
.fazit-box h2 { color: #10202e; }
.fazit-box b { color: #0b1824; }
.fazit-box p { margin: 0; }

/* Quellen */
.quellen { font-size: .95rem; line-height: 1.6; color: #c8d6e0; }
.quellen ol { padding-left: 1.4rem; }
.quellen li { margin-bottom: .5rem; overflow-wrap: anywhere; }
.bildnachweis { padding-left: 1.1rem; font-size: .88rem; }

.fuss { text-align: center; color: var(--leise); font-size: .85rem; padding: 32px 16px 40px; border-top: 1px solid var(--linie); margin-top: 32px; }
.fuss p { margin: 0; }

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

/* Auf dem Handy: Karte breiter als der Bildschirm, seitlich wischbar */
@media (max-width: 700px) {
  .karte { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .karte svg { width: 720px; max-width: none; }
  .karte::after { content: "← wischen →"; position: sticky; left: 0; display: block; text-align: center; font: .75rem var(--sans); color: var(--leise); padding: 4px 0 6px; width: min(100%, calc(100vw - 66px)); }
}
