/* ===========================================================
   News Hero — v5 Design (paper-white slate, übernommen aus
   Claude-Design "Stromfeed v5"). Map-Container behält bestehende
   MapLibre-Layer (Mask/States/Pins). Sidebar/Filters/Tabs neu.
   =========================================================== */
:root {
  /* Editorial palette — paper white, deep ink, single steel-blue accent. */
  --bg:        #f7f9fb;
  --bg-2:      #ffffff;
  --surface:   #ffffff;
  --surface-2: #eef2f6;
  --line:      #e1e7ed;
  --line-2:    #c9d2dc;
  --ink:       #0e141c;
  --ink-2:     #2a3642;
  --ink-3:     #5a6875;
  --ink-4:     #a6b3c0;
  --accent:    #3a5269;
  --accent-2:  #536e86;
  --accent-soft: rgba(58, 82, 105, 0.10);

  /* Ressort-Farben — v5-Themen als Map-/Filter-Vorlage */
  --n-bess:        #2f7d8c;
  --n-pv:          #b07322;
  --n-wind:        #477785;
  --n-netz:        #3a5269;
  --n-regulatorik: #4a5a8a;
  --n-markt:       #7d6a3a;
  --n-foerderung:  #5f7f58;
  --n-industrie:   #8a5548;
  --n-forschung:   #446c78;
  --n-kommunal:    #70745e;

  /* Legacy aliases, solange die API noch 3 Buckets ausliefert. */
  --n-projekte:      var(--n-bess);
  --n-politik-recht: var(--n-regulatorik);
  --n-markt-netz:    var(--n-netz);
  --n-pv-hybrid:     var(--n-pv);

  /* Lifecycle (Tier-Mapping) */
  --life-fresh:   #b07322;
  --life-warm:    #4a5a8a;
  --life-quiet:   #3a5269;
  --life-archive: #5a6875;

  /* Legacy aliases (alte Pop-Animation auf der Karte) */
  --news-cream: var(--bg);
  --news-cream-2: var(--surface-2);
  --news-ink: var(--ink);
  --news-ink-soft: var(--ink-3);
  --news-forest: var(--accent);
  --news-forest-soft: var(--accent-2);
  --news-amber: var(--life-fresh);
  --news-rule: var(--line);
  --news-radius: 14px;

  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Consolas, monospace;
}

/* ============ Hero-Container ============ */
#news-hero {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  padding: 32px 28px 64px;
  border-top: 1px solid var(--line);
}
#news-hero > * { max-width: 1480px; margin-left: auto; margin-right: auto; }

/* ============ Top status bar ============ */
.nh-topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 24px; border-bottom: 1px solid var(--line);
  margin-bottom: 28px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.nh-topbar .nh-brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--ink); font-family: var(--sans);
  font-size: 14px; font-weight: 600; letter-spacing: -0.01em;
  text-transform: none;
}
.nh-brand-mark {
  width: 28px; height: 28px; border-radius: 6px;
  background: var(--ink); display: grid; place-items: center; position: relative;
}
.nh-brand-mark::before, .nh-brand-mark::after {
  content: ""; position: absolute; left: 6px; right: 6px;
  height: 2px; background: var(--bg-2); border-radius: 1px;
}
.nh-brand-mark::before { top: 9px; }
.nh-brand-mark::after  { top: 14px; right: 10px; }
.nh-brand-mark .nh-dot {
  position: absolute; top: 19px; left: 6px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--bg-2);
}
.nh-topbar .nh-meta { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.nh-topbar .nh-meta b { color: var(--ink); font-weight: 500; }
.nh-pill-live {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 10px; border-radius: 4px;
  color: var(--ink-3); font-weight: 500; letter-spacing: 0.12em; font-size: 10px;
}

/* 24h Heartbeat-Sparkline in der Topbar */
.nh-spark-wrap {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 2px 8px;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
}
.nh-spark-label {
  font-size: 9px; letter-spacing: 0.12em;
  color: var(--ink-3);
}
.nh-spark {
  display: inline-flex; align-items: flex-end; gap: 1px;
  height: 16px; width: 96px;
  position: relative;
}
.nh-spark-bar {
  flex: 1 1 0;
  min-height: 2px;
  height: 2px;
  background: color-mix(in oklab, var(--ink-3) 32%, transparent);
  border-radius: 1px;
  transition: height 0.6s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s;
}
.nh-spark-bar.is-now {
  background: var(--accent);
  animation: nh-spark-pulse 2.4s ease-in-out infinite;
}
.nh-spark-bar.is-recent {
  background: color-mix(in oklab, var(--accent) 65%, var(--ink-3));
}
@keyframes nh-spark-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}
#nh-spark-total {
  font-variant-numeric: tabular-nums;
  font-weight: 600; color: var(--ink);
  min-width: 1.5em; text-align: right;
}
.nh-pill-live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgba(58, 82, 105, 0.45);
  animation: nh-pulse-rec 2.4s ease-out infinite;
}
@keyframes nh-pulse-rec {
  0% { box-shadow: 0 0 0 0 rgba(58, 82, 105, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(58, 82, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(58, 82, 105, 0); }
}

/* ============ Header ============ */
.nh-head {
  display: grid; grid-template-columns: 1fr auto; gap: 40px;
  align-items: end; margin-bottom: 28px;
}
.nh-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11px; color: var(--accent-2);
  letter-spacing: 0.2em; text-transform: uppercase;
  margin-bottom: 16px;
}
.nh-eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--accent);
}
.nh-head h1 {
  font-size: clamp(28px, 4vw, 48px); font-weight: 500;
  line-height: 1.04; letter-spacing: -0.035em; color: var(--ink);
  text-wrap: balance; margin: 0;
}
.nh-head h1 em { font-style: italic; font-weight: 500; color: var(--ink-2); }
.nh-head-sub {
  font-family: var(--mono); font-size: 12px; color: var(--ink-3);
  letter-spacing: 0.04em; text-align: right; max-width: 320px;
}
.nh-head-sub b { color: var(--ink); font-weight: 500; }

/* ============ Main module ============ */
.nh-console {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 380px;
  min-height: 720px;
  box-shadow: 0 24px 60px rgba(40, 52, 46, 0.10), 0 2px 6px rgba(40, 52, 46, 0.06);
}

/* ----- Map column ----- */
.nh-map-col {
  position: relative;
  padding: 22px 24px;
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  background: var(--bg-2);
  min-height: 540px;
}
.nh-map-titlebar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.nh-map-titlebar .nh-tb-left { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.nh-map-titlebar b { color: var(--ink); font-weight: 500; }
.nh-map-titlebar .nh-tb-right { display: flex; gap: 8px; align-items: center; }
.nh-ctrl {
  border: 1px solid var(--line-2); background: transparent;
  color: var(--ink-3); font-family: var(--mono); font-size: 10px;
  padding: 5px 10px; border-radius: 5px; cursor: pointer;
  text-transform: uppercase; letter-spacing: 0.1em;
  transition: all 0.15s;
}
.nh-ctrl:hover { color: var(--ink); border-color: var(--accent); }
.nh-ctrl.is-paused { color: var(--accent-2); border-color: var(--accent); background: var(--accent-soft); }

/* ----- Ressort filter (v5-style overlay, bottom-right of map) ----- */
.nh-map-stage .nh-cat-filter {
  position: absolute;
  bottom: 18px;
  right: 18px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  width: min(232px, calc(100% - 36px));
  max-height: calc(100% - 36px);
  overflow: auto;
  padding: 10px 10px 8px;
  margin: 0;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  border-radius: 10px;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(14, 20, 28, 0.08);
}
.nh-cf-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
  padding: 0 2px 3px;
  border-bottom: 1px solid var(--line);
}
.nh-cat-pill {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 28px;
  padding: 5px 8px;
  border-radius: 7px;
  background: transparent; border: 1px solid transparent;
  color: var(--ink-2);
  text-align: left;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.04em;
  cursor: pointer; transition: all 0.15s;
}
.nh-cat-pill:hover { background: var(--bg); color: var(--ink); }
.nh-cat-pill[data-cat="bess"]        { --cc: var(--n-bess); }
.nh-cat-pill[data-cat="pv"]          { --cc: var(--n-pv); }
.nh-cat-pill[data-cat="pv-hybrid"]   { --cc: var(--n-pv); }
.nh-cat-pill[data-cat="wind"]        { --cc: var(--n-wind); }
.nh-cat-pill[data-cat="netz"]        { --cc: var(--n-netz); }
.nh-cat-pill[data-cat="regulatorik"] { --cc: var(--n-regulatorik); }
.nh-cat-pill[data-cat="markt"]       { --cc: var(--n-markt); }
.nh-cat-pill[data-cat="foerderung"]  { --cc: var(--n-foerderung); }
.nh-cat-pill[data-cat="industrie"]   { --cc: var(--n-industrie); }
.nh-cat-pill[data-cat="forschung"]   { --cc: var(--n-forschung); }
.nh-cat-pill[data-cat="kommunal"]    { --cc: var(--n-kommunal); }
.nh-cat-pill[data-cat="projekte"]      { --cc: var(--n-projekte); }
.nh-cat-pill[data-cat="politik-recht"] { --cc: var(--n-politik-recht); }
.nh-cat-pill[data-cat="markt-netz"]    { --cc: var(--n-markt-netz); }
.nh-cat-pill .nh-glyph {
  width: 16px; height: 16px; border-radius: 4px; background: var(--cc, var(--ink-4));
  color: rgba(255, 255, 255, 0.9); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 700; line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.nh-cat-pill.is-on {
  color: var(--ink);
  background: color-mix(in oklab, var(--cc, var(--accent)) 9%, transparent);
}
.nh-cat-pill:not(.is-on) { opacity: 0.55; }
.nh-cat-pill:not(.is-on) .nh-glyph { background: var(--ink-4); }
.nh-cat-pill .nh-ct {
  justify-self: end;
  font-size: 9px; padding: 1px 5px; border-radius: 4px;
  color: var(--ink-3); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.nh-cf-action {
  margin: 2px 0 0;
  background: transparent; border: 0; border-top: 1px solid var(--line);
  padding: 7px 2px 0; cursor: pointer;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-align: right; text-transform: uppercase; color: var(--ink-3);
}
.nh-cf-action:hover { color: var(--ink); }

/* ----- Layer toggle (template layer switch; data stays MapLibre-native) ----- */
.nh-layer-toggle {
  position: absolute;
  top: 18px;
  left: 18px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 28px rgba(14, 20, 28, 0.07);
}
.nh-layer-toggle button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 9px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}
.nh-layer-toggle button .ld {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--n-bess);
}
.nh-layer-toggle button[data-layer="pins"] .ld { background: var(--n-bess); }
.nh-layer-toggle button[data-layer="heatmap"] .ld {
  background: radial-gradient(circle at 50% 50%,
    rgba(206, 116, 68, 0.95) 0%,
    rgba(214, 169, 86, 0.85) 45%,
    rgba(95, 152, 134, 0.55) 100%);
}
.nh-layer-toggle button.is-on {
  color: var(--bg-2);
  background: var(--ink);
}
.nh-layer-toggle button:focus-visible,
.nh-cat-pill:focus-visible,
.nh-cf-action:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.nh-map-stage[data-layer="pins"] .nh-layer-toggle button[data-layer="pins"],
.nh-map-stage[data-layer="heatmap"] .nh-layer-toggle button[data-layer="heatmap"] {
  color: var(--bg-2);
  background: var(--ink);
}
.nh-map-stage[data-layer="heatmap"] .news-pins { display: none; }
.nh-map-stage[data-layer="heatmap"] .news-pin-pop { display: none; }

/* ----- Map canvas (paper-framed) ----- */
.nh-map-stage {
  position: relative; flex: 1;
  background:
    radial-gradient(circle at 1px 1px, rgba(58,82,105,0.07) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  min-height: 520px;
  overflow: hidden;
}
#news-map {
  position: relative; height: 100%;
  min-height: 508px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--bg-2);
}
/* Tone the OSM tiles down so they read as "paper" instead of saturated map */
#news-map .maplibregl-canvas { filter: saturate(0.46) contrast(0.92) brightness(1.08); }
#news-map::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(circle at 1px 1px, rgba(58,82,105,0.07) 1px, transparent 1px) 0 0 / 28px 28px;
  opacity: 0.85;
  mix-blend-mode: multiply;
}
#news-map::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(225, 231, 237, 0.64), inset 0 0 80px rgba(247, 249, 251, 0.46);
}
#news-map .maplibregl-control-container,
#news-map .maplibregl-marker,
#news-map .maplibregl-popup {
  position: relative;
  z-index: 3;
}
#news-map .maplibregl-ctrl-top-right {
  top: auto;
  right: auto;
  bottom: 14px;
  left: 14px;
}

/* v5 DOM news pins: rounded category squares above MapLibre tiles/layers */
.news-pins {
  position: absolute;
  inset: 6px;
  z-index: 4;
  pointer-events: none;
  opacity: 0;
  transition: opacity 280ms ease-out;
}
.news-pins.is-ready {
  opacity: 1;
}
.news-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  --nc: var(--n-bess);
  --na: 1;
  width: calc(11px + 6px * var(--na));
  height: calc(11px + 6px * var(--na));
  border-radius: 4px;
  background: var(--nc);
  border: 1.5px solid var(--bg-2);
  opacity: var(--na);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--nc) 60%, transparent),
    0 2px 8px color-mix(in oklab, var(--nc) calc(35% + 25% * var(--na)), transparent);
  transition: width 0.4s, height 0.4s, opacity 0.4s, transform 0.18s, box-shadow 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.9);
  font-size: 9px;
  font-weight: 700;
  z-index: 2;
}
.news-pin:hover {
  transform: translate(-50%, -50%) scale(1.25);
  opacity: 1;
  z-index: 4;
}
.news-pin[data-cat="bess"]        { --nc: var(--n-bess); }
.news-pin[data-cat="pv"]          { --nc: var(--n-pv); }
.news-pin[data-cat="wind"]        { --nc: var(--n-wind); }
.news-pin[data-cat="regulatorik"] { --nc: var(--n-regulatorik); }
.news-pin[data-cat="netz"]        { --nc: var(--n-netz); }
.news-pin[data-cat="markt"]       { --nc: var(--n-markt); }
.news-pin[data-cat="foerderung"]  { --nc: var(--n-foerderung); }
.news-pin[data-cat="industrie"]   { --nc: var(--n-industrie); }
.news-pin[data-cat="forschung"]   { --nc: var(--n-forschung); }
.news-pin[data-cat="kommunal"]    { --nc: var(--n-kommunal); }
/* Ungenaue Pins: BL-Centroid bzw. low-Importance → gefüllt, aber dashed border
   + leicht reduzierte Sättigung signalisiert die geringere Präzision. */
.news-pin[data-quality="bundesland"] {
  border-style: dashed;
  opacity: calc(0.85 * var(--na));
}
.news-pin[data-quality="low"] {
  border-style: dashed;
  opacity: calc(0.8 * var(--na));
}
.news-pin[data-tier="1"] {
  box-shadow:
    0 0 0 1px var(--bg-2),
    0 0 0 2.5px color-mix(in oklab, var(--nc) 75%, transparent),
    0 2px 10px color-mix(in oklab, var(--nc) calc(45% + 25% * var(--na)), transparent);
}
.news-pin .cat-glyph {
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.news-pin .pin-age {
  position: absolute;
  bottom: -14px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  color: var(--ink-3);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0.85;
  letter-spacing: 0.02em;
}
.news-pin:hover .pin-age {
  opacity: 1;
  color: var(--ink);
}
/* Pin lifecycle animations: drop-in für jeden, dauerhaftes Pulse für fresh */
.news-pin {
  animation: news-pin-drop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.news-pin:hover {
  transform: translate(-50%, -50%) scale(1.18);
  box-shadow:
    0 0 0 2px var(--bg-2),
    0 0 0 4px color-mix(in oklab, var(--nc) 60%, transparent),
    0 0 24px color-mix(in oklab, var(--nc) 70%, transparent);
  cursor: pointer;
  z-index: 10;
}
.news-pin.is-fresh {
  animation:
    news-pin-drop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both,
    news-pin-breathe 2.2s ease-in-out 0.55s infinite;
}
.news-pin.is-fresh::before {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 7px;
  border: 1.5px solid var(--nc);
  animation: news-halo 1.6s ease-out infinite;
}
.news-pin.is-fresh::after {
  content: "";
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  background: radial-gradient(
    closest-side,
    color-mix(in oklab, var(--nc) 35%, transparent),
    transparent 70%
  );
  animation: news-pin-glow 2.2s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}
.news-pin.is-active {
  transform: translate(-50%, -50%) scale(1.35);
  box-shadow:
    0 0 0 2px var(--bg-2),
    0 0 0 4px var(--nc),
    0 6px 20px color-mix(in oklab, var(--nc) 50%, transparent);
  opacity: 1;
  filter: none;
}
@keyframes news-pin-drop {
  0%   { transform: translate(-50%, -120%) scale(0.4); opacity: 0; }
  60%  { transform: translate(-50%, -50%) scale(1.25); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: var(--na); }
}
@keyframes news-pin-breathe {
  0%, 100% { transform: translate(-50%, -50%) scale(1); }
  50%      { transform: translate(-50%, -50%) scale(1.10); }
}
@keyframes news-pin-glow {
  0%, 100% { opacity: 0.55; transform: scale(0.85); }
  50%      { opacity: 0.95; transform: scale(1.25); }
}
@keyframes news-halo {
  0%   { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(2.6); opacity: 0; }
}

/* LIVE pill — kompakt, sitzt jetzt im Titlebar */
.nh-live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 10px; border-radius: 999px;
  background: var(--ink); color: var(--bg-2);
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nh-live-pill::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--bg-2); animation: nh-pulse-rec 2.4s infinite ease-out;
}

/* Map foot — legend + sync-hint */
.nh-map-foot {
  margin-top: 14px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 18px; align-items: center;
  padding: 12px 16px;
  background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3);
}
.nh-map-foot .nh-summary { text-align: right; font-size: 10px; }
.nh-map-foot .nh-summary b { color: var(--ink); font-weight: 500; font-size: 13px; letter-spacing: 0; }
.nh-legend-note {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-4);
  letter-spacing: 0.04em;
}

/* ============ Feed column ============ */
.nh-feed-col {
  display: flex; flex-direction: column;
  background: var(--bg-2); min-height: 0;
}
.nh-feed-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.nh-feed-tabs {
  display: flex; align-items: center; gap: 4px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; margin-bottom: 14px;
}
.nh-ftab {
  background: transparent; border: 0; padding: 6px 0; margin-right: 18px;
  color: var(--ink-3); cursor: pointer; position: relative;
  font: inherit; letter-spacing: inherit; text-transform: inherit;
  display: inline-flex; gap: 7px; align-items: baseline;
}
.nh-ftab .nh-ct {
  color: var(--ink-4); font-variant-numeric: tabular-nums;
  background: var(--bg); border-radius: 4px; padding: 1px 5px;
  font-size: 9px;
}
.nh-ftab.is-on { color: var(--ink); }
.nh-ftab.is-on::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px;
  height: 2px; background: var(--ink);
}
.nh-ftab.is-on .nh-ct { color: var(--ink); background: var(--accent-soft); }
.nh-feed-tabs .nh-rec {
  margin-left: auto; color: var(--accent);
  display: inline-flex; gap: 6px; align-items: center;
}
.nh-feed-tabs .nh-rec::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  animation: nh-pulse-rec 2.4s ease-out infinite;
}
.nh-feed-head h2 {
  font-size: 18px; font-weight: 600; letter-spacing: -0.015em; color: var(--ink);
  margin: 0 0 8px;
}
.nh-feed-head h2 em { font-style: italic; color: var(--accent); font-weight: 600; }

.nh-stats {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 8px; margin-top: 10px;
}
.nh-stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 8px; padding: 9px 11px;
}
.nh-stat .nh-k {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3); margin-bottom: 2px;
}
.nh-stat .nh-v {
  font-size: 17px; font-weight: 600; letter-spacing: -0.02em;
}

/* Feed list */
.nh-feed-list {
  flex: 1; overflow-y: auto; min-height: 0;
  max-height: 540px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
  padding: 0 10px 8px;
}
.nh-feed-list::-webkit-scrollbar { width: 6px; }
.nh-feed-list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }

.nh-feed-section {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 12px 6px;
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--ink-3);
}
.nh-feed-section::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.nh-feed-section .nh-ct {
  color: var(--ink-2); font-weight: 600;
  padding: 1px 6px; border-radius: 4px;
  background: var(--surface); border: 1px solid var(--line-2);
}

/* News-Item card (Meldungen-Tab) */
.nh-news-item {
  --nc: var(--n-projekte);
  padding: 12px 12px; border-top: 1px solid var(--line);
  cursor: pointer;
  display: grid; gap: 6px;
  transition: background 0.15s;
  text-decoration: none; color: inherit;
  animation: nh-item-glide-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.nh-news-item:nth-child(1) { animation-delay: 0.00s; }
.nh-news-item:nth-child(2) { animation-delay: 0.04s; }
.nh-news-item:nth-child(3) { animation-delay: 0.08s; }
.nh-news-item:nth-child(4) { animation-delay: 0.12s; }
.nh-news-item:nth-child(5) { animation-delay: 0.16s; }
.nh-news-item:nth-child(6) { animation-delay: 0.20s; }
.nh-news-item:nth-child(7) { animation-delay: 0.24s; }
.nh-news-item:nth-child(8) { animation-delay: 0.28s; }
.nh-news-item:nth-child(n+9) { animation-delay: 0.32s; }
@keyframes nh-item-glide-in {
  0%   { opacity: 0; transform: translateY(-12px); }
  100% { opacity: 1; transform: translateY(0); }
}
.nh-news-item:first-child { border-top: 0; }
.nh-news-item:hover { background: var(--bg); }
.nh-news-item.is-active { background: var(--accent-soft); }
.nh-news-item.cat-bess        { --nc: var(--n-bess); }
.nh-news-item.cat-pv          { --nc: var(--n-pv); }
.nh-news-item.cat-pv-hybrid   { --nc: var(--n-pv); }
.nh-news-item.cat-wind        { --nc: var(--n-wind); }
.nh-news-item.cat-netz        { --nc: var(--n-netz); }
.nh-news-item.cat-regulatorik { --nc: var(--n-regulatorik); }
.nh-news-item.cat-markt       { --nc: var(--n-markt); }
.nh-news-item.cat-foerderung  { --nc: var(--n-foerderung); }
.nh-news-item.cat-industrie   { --nc: var(--n-industrie); }
.nh-news-item.cat-forschung   { --nc: var(--n-forschung); }
.nh-news-item.cat-kommunal    { --nc: var(--n-kommunal); }
.nh-news-item.cat-projekte      { --nc: var(--n-projekte); }
.nh-news-item.cat-politik-recht { --nc: var(--n-politik-recht); }
.nh-news-item.cat-markt-netz    { --nc: var(--n-markt-netz); }

.nh-ni-row1 {
  display: flex; align-items: baseline; gap: 10px;
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
}
.nh-ni-cat {
  color: var(--ink-2); font-weight: 600;
  display: inline-flex; align-items: center; gap: 6px;
}
.nh-ni-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--nc);
}
.nh-ni-src { color: var(--ink-3); }
.nh-ni-age {
  margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums;
}
.nh-ni-title {
  font-size: 13.5px; line-height: 1.4; color: var(--ink);
  font-weight: 500; letter-spacing: -0.005em;
  text-wrap: pretty;
}
.nh-ni-meta {
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  font-family: var(--mono); font-size: 9.5px;
  letter-spacing: 0.08em; color: var(--ink-3);
}
.nh-ni-region { text-transform: uppercase; color: var(--ink-2); font-weight: 500; }
.nh-ni-tier {
  font-size: 9px; padding: 1px 5px; border-radius: 3px;
  font-weight: 600; letter-spacing: 0.05em;
}
.nh-ni-tier.t-1 { background: #e6f0ea; color: #20593b; }
.nh-ni-tier.t-2 { background: #f3eee0; color: #7a5e1a; }
.nh-ni-tier.t-3 { background: #ece4d2; color: #595149; }
.nh-ni-tag {
  color: var(--ink-3); background: var(--bg);
  padding: 2px 6px; border-radius: 3px; border: 1px solid var(--line);
  font-size: 9px;
}
.nh-news-item.is-new { animation: nh-flash 1.4s ease-out; }
@keyframes nh-flash {
  0% { background: color-mix(in oklab, var(--nc) 18%, transparent); }
  100% { background: transparent; }
}

.nh-news-item.is-highlight {
  animation: nh-highlight 2.4s ease-out;
  position: relative;
}
.nh-news-item.is-highlight::before {
  content: '';
  position: absolute;
  inset: 0 0 0 0;
  width: 3px;
  background: var(--nc, var(--accent));
  animation: nh-highlight-bar 2.4s ease-out;
  pointer-events: none;
}
@keyframes nh-highlight {
  0%   { background: color-mix(in oklab, var(--nc, var(--accent)) 28%, transparent); }
  20%  { background: color-mix(in oklab, var(--nc, var(--accent)) 22%, transparent); }
  100% { background: transparent; }
}
@keyframes nh-highlight-bar {
  0%   { opacity: 1; }
  70%  { opacity: 0.85; }
  100% { opacity: 0; }
}

.nh-feed-empty {
  padding: 60px 20px; text-align: center;
  color: var(--ink-3); font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
}

.nh-feed-foot {
  padding: 12px 20px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-3);
}
.nh-feed-foot a {
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--line-2); padding-bottom: 1px;
}
.nh-feed-foot a:hover { color: var(--accent); border-color: var(--accent); }

/* ============ Pop-Animation auf der Karte (Legacy, behalten) ============ */
.news-pin-pop {
  pointer-events: none; border-radius: 50%;
  background: var(--accent);
  width: 14px; height: 14px;
  animation: news-pop 1600ms cubic-bezier(.2, .9, .25, 1) forwards;
  will-change: transform, opacity, box-shadow;
}
.news-pin-pop-fresh   { background: var(--life-fresh);   --pop-halo: rgba(176, 115, 34, .55); }
.news-pin-pop-warm    { background: var(--life-warm);    --pop-halo: rgba(74, 90, 138, .50); }
.news-pin-pop-quiet   { background: var(--life-quiet);   --pop-halo: rgba(58, 82, 105, .45); }
.news-pin-pop-archive { background: var(--life-archive); --pop-halo: rgba(90, 104, 117, .35); }
.news-pin-pop-tier-1 { width: 18px; height: 18px; }
.news-pin-pop-tier-2 { width: 14px; height: 14px; }
.news-pin-pop-tier-3 { width: 10px; height: 10px; }
@keyframes news-pop {
  0%   { transform: scale(0.1); opacity: 0; box-shadow: 0 0 0 0 var(--pop-halo, rgba(58,82,105,.4)); }
  18%  { transform: scale(1.9); opacity: 1; box-shadow: 0 0 0 6px var(--pop-halo, rgba(58,82,105,.4)); }
  55%  { transform: scale(1.0); opacity: 1; box-shadow: 0 0 0 28px rgba(0,0,0,0); }
  100% { transform: scale(1.0); opacity: 0; box-shadow: 0 0 0 28px rgba(0,0,0,0); }
}

/* ============ Map popup styles (Legacy-Fallback) ============ */
.news-popup-title {
  display: block; font-weight: 600; color: var(--ink);
  text-decoration: none; line-height: 1.35; margin-bottom: 6px;
}
.news-popup-title:hover { color: var(--accent); }
.news-popup-meta {
  font-family: var(--mono); font-size: 11px; color: var(--ink-3);
}

/* ============ Hover-Tooltip auf der Karte (Design Handoff v5) ============ */
.ttip {
  position: absolute;
  pointer-events: none;
  transform: translate(-50%, calc(-100% - 18px));
  background: var(--surface);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  overflow: hidden;
  width: 280px;
  box-shadow:
    0 16px 40px rgba(40, 52, 46, 0.20),
    0 2px 8px rgba(40, 52, 46, 0.10);
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 10;
  will-change: opacity, transform;
}
.ttip.show {
  opacity: 1;
  transform: translate(-50%, calc(-100% - 22px));
}
.ttip.is-pinned {
  pointer-events: auto;
  cursor: default;
}
.ttip-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  font-size: 18px;
  line-height: 1;
  color: #888;
  cursor: pointer;
  pointer-events: auto;
  z-index: 1;
  border-radius: 4px;
}
.ttip-close:hover {
  color: #222;
  background: rgba(0,0,0,0.07);
}
.ttip.is-news .t-photo {
  background: linear-gradient(
    135deg,
    color-mix(in oklab, var(--nc, var(--n-bess)) 18%, var(--bg)) 0%,
    var(--bg) 100%
  );
  height: 84px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ttip.is-news .t-source-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.ttip.is-news .t-logo-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  color: var(--ink);
  flex-shrink: 0;
}
.ttip.is-news .t-tier {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line-2);
  color: var(--ink-3);
}
.ttip.is-news .t-tier[data-tier="1"] {
  color: var(--accent);
  border-color: color-mix(in oklab, var(--accent) 35%, transparent);
  background: var(--accent-soft);
}
.ttip.is-news .t-tier[data-tier="2"] {
  color: var(--ink-2);
}
.ttip.is-news .t-tier[data-tier="3"] {
  color: var(--n-regulatorik);
  border-color: color-mix(in oklab, var(--n-regulatorik) 30%, transparent);
}
.ttip.is-news .t-body {
  padding: 12px 14px;
}
.ttip.is-news .t-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ttip.is-news .t-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}
.ttip.is-news .t-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.ttip.is-news .t-tags .tag {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--ink-3);
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--surface-2);
}
.ttip.is-news .t-link {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
}
.ttip.is-news .t-link:hover {
  text-decoration: underline;
}

/* ============ Responsive ============ */
@media (max-width: 920px) {
  .nh-console { grid-template-columns: 1fr; }
  .nh-map-col { border-right: none; border-bottom: 1px solid var(--line); }
  .nh-feed-list { max-height: min(400px, calc(100svh - 320px)); }
}
@media (max-width: 768px) {
  #news-hero { padding: 24px 14px 48px; }
  .nh-head { grid-template-columns: 1fr; }
  .nh-head-sub { text-align: left; }
  .nh-topbar { font-size: 9px; flex-wrap: wrap; gap: 8px; }
  .nh-topbar .nh-meta { gap: 12px; }
  .nh-spark { width: 64px; height: 14px; }
  .nh-spark-wrap { padding: 2px 6px; gap: 6px; }
  .nh-map-col { padding: 16px; }
  .nh-map-stage { min-height: 420px; }
  #news-map { min-height: 408px; }
  .nh-map-stage .nh-layer-toggle {
    top: 12px;
    left: 12px;
    max-width: calc(100% - 24px);
    overflow-x: auto;
  }
  .nh-map-stage .nh-cat-filter {
    bottom: 12px;
    right: 12px;
    width: min(210px, calc(100% - 24px));
    max-height: min(300px, calc(100% - 74px));
    padding: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .nh-pill-live::before,
  .news-pin,
  .news-pin.is-fresh,
  .news-pin.is-fresh::before,
  .news-pin.is-fresh::after,
  .news-pin-pop,
  .nh-news-item,
  .nh-news-item.is-new,
  .nh-news-item.is-highlight,
  .nh-news-item.is-highlight::before,
  .nh-feed-tabs .nh-rec::before,
  .nh-spark-bar { animation: none !important; }
  .news-pin-pop { display: none; }
  .news-pin.is-fresh::before,
  .news-pin.is-fresh::after { display: none !important; }
  .nh-news-item { opacity: 1 !important; transform: none !important; }
  .nh-news-item.is-highlight {
    background: color-mix(in oklab, var(--nc, var(--accent)) 14%, transparent) !important;
  }
  .nh-cat-pill { transition: none !important; }
  .nh-cat-pill:hover { transform: none !important; }
  .nh-spark-bar { transition: none !important; }
}

/* ===========================================================
   Power-View (/news.html) — Listenansicht
   =========================================================== */

.news-section-marker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.news-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.news-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(58,82,105,0.08);
}
.news-card > a {
  display: block;
  padding: 14px 18px;
  text-decoration: none;
  color: inherit;
}

.news-card-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  line-height: 1.4;
  margin-bottom: 6px;
}

.news-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-3);
}
.news-card-meta > span:not(.news-tier-badge) {
  padding: 2px 6px;
  background: var(--surface-2);
  border-radius: 4px;
}

/* Tier-Badges */
.news-tier-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.news-tier-1 {
  background: rgba(47,125,140,0.12);
  color: var(--n-bess);
  border: 1px solid rgba(47,125,140,0.25);
}
.news-tier-2 {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(58,82,105,0.2);
}
.news-tier-3 {
  background: rgba(176,115,34,0.10);
  color: var(--life-fresh);
  border: 1px solid rgba(176,115,34,0.2);
}
