/* ============================================================
   DESIGN TOKENS — Bochum Design Language
   ============================================================ */
:root {
  --cyan: #0AB4FF;
  --blue: #0F2864;
  --orange: #F49100;
  --green: #76B729;
  --red: #E61937;
  --bg: #F6F6F6;
  --card-bg: #FFFFFF;
  --text: #1A1A1A;
  --text-secondary: #4A5568;
  --text-muted: #718096;
  --border-light: #E2E8F0;
  --radius: 12px;
  --shadow-card: 0 1px 4px rgba(0,0,0,0.08);

  /* Farben für Diagramme. Regel (siehe README, Regel 11):
     - zwei Balken oder zwei Linien im Vergleich: --blue und --cyan
     - negative Zahlen (Defizit, Ausgaben): --red (Bochum-Pinkrot)
     - positive Zahlen (Überschuss, Einnahmen): --green (helleres Bochum-Grün)
     - mehr als zwei Reihen: die Bochumer Reihe in dieser Folge:
       green, cyan, blue, orange, red, #7A5EA8, #0E7C86, #B4531F
     - Jahre ohne veröffentlichten Wert: #B9C2CC (hell), nie geschätzt */
  --chart-series-1: var(--blue);
  --chart-series-2: var(--cyan);
  --chart-deficit: var(--red);
  --chart-surplus: var(--green);
  --chart-missing: #B9C2CC;
}

[data-theme="dark"] {
  --bg: #12161C;
  --card-bg: #1A1F27;
  --text: #E6EDF5;
  --text-secondary: #A8B3C1;
  --text-muted: #7D8896;
  --border-light: #2A313B;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text);
       font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

/* Globale Linkfarbe. ACHTUNG: sie ist der Grund, warum Header und Footer
   weiter unten eigene Regeln brauchen — Cyan auf cyanem Grund ist
   unlesbar, und genau daran sind schon zwei Footer zerbrochen. */
a { color: var(--cyan); text-decoration: none; }

#app { display: flex; flex-direction: column; min-height: 100vh;
       max-width: 1440px; margin: 0 auto; padding: 0 16px; }

/* Luft zwischen Inhalt und Footer. Der Abstand haengt am Inhalt, nicht am
   Footer: dessen margin-top: auto soll ihn bei kurzen Seiten nach unten
   druecken, und ein padding-top dort waere cyan eingefaerbt. */
.view { padding-bottom: 32px; }

/* ============================================================
   HEADER — cyan mit dunkler Schrift
   ============================================================ */
.app-header { background: var(--cyan); padding: 0; margin-bottom: 16px;
              width: 100vw; margin-left: calc(-50vw + 50%); }
.header-inner { max-width: 1440px; margin: 0 auto; padding: 0 16px; height: 70px;
                display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.header-left { display: flex; align-items: center; gap: 20px; }
.header-logo { height: 36px; width: auto; display: block; }
.header-title { font-size: 1.3rem; font-weight: 700; color: #1A1A1A; }
/* Dunkel, nicht weiss: der Grund ist cyan. */
.header-meta { font-size: 0.8rem; color: #1A1A1A; display: flex; align-items: center;
               gap: 10px; white-space: nowrap; }

/* ============================================================
   KARTE + SEITENLEISTE — gleiche Hoehe, damit beide buendig enden
   ============================================================ */
.main-content { display: grid; grid-template-columns: 1fr 380px; gap: 16px; }
#map, #sidebar { height: min(64vh, 680px); min-height: 420px;
                 border-radius: var(--radius); overflow: hidden; }
#sidebar { display: flex; flex-direction: column; background: var(--card-bg);
           box-shadow: var(--shadow-card); }
.sidebar-header { padding: 16px; border-bottom: 1px solid var(--border-light); flex-shrink: 0; }
.sidebar-header h2 { margin: 0; font-size: 1rem; }
.sidebar-body { flex: 1; overflow-y: auto; padding: 12px; }

.placeholder-card { background: var(--card-bg); border-radius: var(--radius);
                    box-shadow: var(--shadow-card); border: 1px solid var(--border-light);
                    padding: 60px 40px; text-align: center; margin-top: 16px; }
.placeholder-icon { font-size: 3rem; margin-bottom: 12px; }
.placeholder-card p { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }

/* ============================================================
   FOOTER — cyan mit dunkler Schrift, wie der Header
   ============================================================ */
.app-footer { margin-top: auto; padding: 24px 0; background: var(--cyan);
              width: 100vw; margin-left: calc(-50vw + 50%); }
.footer-inner { max-width: 1440px; margin: 0 auto; padding: 0 16px; display: flex;
                flex-direction: column; align-items: center; gap: 10px; }
.footer-main { font-size: 0.85rem; color: #1A1A1A; text-align: center; }
.footer-brand { font-weight: 700; }
.footer-data { display: block; font-size: 0.78rem; margin-top: 2px; color: rgba(26,26,26,0.75); }
/* Ohne diese beiden Regeln erben die Links die globale Cyan-Farbe und
   verschwinden auf dem cyanen Grund. Gilt fuer JEDEN Link im Footer. */
.footer-main a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.footer-main a:hover { color: rgba(26,26,26,0.7); }
.footer-links { margin-top: 4px; font-size: 0.78rem; }
.footer-links a { color: #1A1A1A; text-decoration: underline; }
.footer-links a:hover { color: rgba(26,26,26,0.7); }

.hint-banner { display: flex; align-items: center; gap: 8px; font-size: 0.78rem;
               color: #8D6E00; background: #FFF8E1; border: 1px solid #FFE082;
               border-radius: 8px; padding: 8px 14px; max-width: 680px; }

/* Header und Footer bleiben im Dark Mode cyan mit dunklem Text. */
[data-theme="dark"] .app-header, [data-theme="dark"] .app-footer { color: #1A1A1A; }

@media (max-width: 900px) {
  .main-content { grid-template-columns: 1fr; }
  #map, #sidebar { height: 380px; min-height: 320px; }
}

/* ============================================================
   KLIMAKOMPASS — Inhalt (Übersicht)
   Nur die Bochumer Farben aus :root, keine eigenen Töne.
   ============================================================ */
.content { display: flex; flex-direction: column; gap: 16px; }

.card { background: var(--card-bg); border-radius: var(--radius);
        box-shadow: var(--shadow-card); border: 1px solid var(--border-light);
        padding: 20px 22px; }
.card h2 { margin: 0 0 6px; font-size: 1.1rem; }
.lead { margin: 0 0 14px; color: var(--text-secondary); font-size: 0.9rem; }
.note { margin: 10px 0 0; color: var(--text-muted); font-size: 0.8rem; }

/* Vier Kernzahlen des letzten vollständigen Jahres */
.kernzahlen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kernzahl { background: var(--card-bg); border-radius: var(--radius);
            box-shadow: var(--shadow-card); border: 1px solid var(--border-light);
            padding: 18px 20px; }
.kernzahl-zahl { font-size: 2.2rem; font-weight: 700; color: var(--blue);
                 line-height: 1.1; }
.kernzahl-name { margin-top: 4px; color: var(--text-secondary); font-size: 0.85rem; }
.kernzahl-fuss { grid-column: 1 / -1; margin: 0; color: var(--text-muted);
                 font-size: 0.8rem; }

/* Zeitstrahl */
.chart-wrap { position: relative; height: 360px; }
.legende { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px;
           font-size: 0.8rem; color: var(--text-secondary); }
.legende-eintrag { display: inline-flex; align-items: center; gap: 6px; }
.legende-eintrag i { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

/* Stationsangaben */
.station { padding: 10px 0; border-top: 1px solid var(--border-light); }
.station:first-child { border-top: 0; }
.station-meta { color: var(--text-muted); font-size: 0.82rem; }

@media (max-width: 900px) {
  .kernzahlen { grid-template-columns: repeat(2, 1fr); }
}

