/* ==========================================================================
   Relaunch blumen-maedler.de — Dashboard Styles
   Light-Theme · Print-friendly · Vanilla CSS
   ========================================================================== */

:root {
  /* Color tokens */
  --bg: #f6f5f1;
  --bg-elevated: #ffffff;
  --bg-soft: #faf9f5;
  --bg-warm: #f0eee6;
  --border: #e4e0d4;
  --border-strong: #c8c2b0;
  --text: #1c1b18;
  --text-muted: #6b6a64;
  --text-soft: #9a988e;

  --primary: #16a34a;
  --primary-soft: #dcfce7;
  --primary-dark: #15803d;

  --accent: #ea580c;
  --accent-soft: #ffedd5;
  --accent-dark: #c2410c;

  --warn: #facc15;
  --warn-soft: #fef9c3;
  --skip: #9ca3af;
  --skip-soft: #f3f4f6;

  --info: #2563eb;
  --info-soft: #dbeafe;

  /* SV-heat (for keyword bars + tree volume bars) */
  --heat-low: #fef3e2;
  --heat-mid: #fdba74;
  --heat-high: #ea580c;
  --heat-peak: #9a3412;

  /* Floristik / Pflanzen / Galabau accent colors */
  --silo-floristik: #c026d3;
  --silo-floristik-soft: #fae8ff;
  --silo-pflanzen: #16a34a;
  --silo-pflanzen-soft: #dcfce7;
  --silo-galabau: #ea580c;
  --silo-galabau-soft: #ffedd5;

  /* Spacing */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 24px;
  --sp-6: 32px;
  --sp-7: 48px;

  /* Radius / Shadow */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(28, 27, 24, 0.04), 0 0 0 1px var(--border);
  --shadow-md: 0 4px 12px rgba(28, 27, 24, 0.06), 0 0 0 1px var(--border);
  --shadow-lg: 0 12px 32px rgba(28, 27, 24, 0.08), 0 0 0 1px var(--border);

  /* Typo */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", "Monaco", "Cascadia Code", "Consolas", monospace;
}

/* Reset */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; border: none; background: none; cursor: pointer; color: inherit; }
input, textarea { font: inherit; color: inherit; }

/* ==========================================================================
   Topbar
   ========================================================================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
  padding: var(--sp-4) var(--sp-5);
  display: grid;
  grid-template-columns: 1fr auto 320px;
  align-items: center;
  gap: var(--sp-5);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  display: inline-block;
  flex: 0 0 auto;
  position: relative;
}
.brand-mark::after {
  content: "🌿";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 18px;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}
.brand h1 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--text);
}
.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.tabs {
  display: flex;
  gap: 2px;
  background: var(--bg-warm);
  padding: 4px;
  border-radius: var(--r-md);
}
.tabs a {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all 0.12s ease;
  text-decoration: none;
}
.tabs a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}
.tabs a.active {
  background: var(--bg-elevated);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* Search */
.search-wrap {
  position: relative;
}
#search {
  width: 100%;
  padding: 8px 12px 8px 32px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-soft) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239a988e'><path d='M9 3a6 6 0 1 0 3.75 10.69l3.78 3.78a1 1 0 1 0 1.42-1.42l-3.78-3.78A6 6 0 0 0 9 3zm0 2a4 4 0 1 1 0 8 4 4 0 0 1 0-8z'/></svg>") no-repeat 9px center / 16px;
  outline: none;
  transition: border-color 0.12s, box-shadow 0.12s;
}
#search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
  background-color: var(--bg-elevated);
}
.search-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 380px;
  overflow-y: auto;
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  z-index: 40;
}
.search-results.hidden { display: none; }
.search-row {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2px;
  transition: background 0.08s;
}
.search-row:last-child { border-bottom: none; }
.search-row:hover, .search-row.focused { background: var(--bg-soft); }
.search-row .sr-kw {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}
.search-row .sr-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.search-row .sr-meta b { color: var(--text); font-weight: 600; }
.search-row .sr-empty { color: var(--text-muted); font-style: italic; }
mark { background: var(--accent-soft); color: var(--accent-dark); padding: 0 2px; border-radius: 2px; }

/* ==========================================================================
   Main + footer
   ========================================================================== */
.app-main {
  max-width: 1380px;
  margin: 0 auto;
  padding: var(--sp-6) var(--sp-5);
}
.bottombar {
  margin-top: var(--sp-7);
  padding: var(--sp-4) var(--sp-5);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-elevated);
}
.footer-links a {
  color: var(--text-muted);
  margin: 0 2px;
}
.footer-links a:hover { color: var(--primary); }

.loading {
  text-align: center;
  padding: var(--sp-7);
  color: var(--text-muted);
  font-size: 13px;
}

/* ==========================================================================
   Common — section, card, headline
   ========================================================================== */
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--sp-5);
  gap: var(--sp-4);
  flex-wrap: wrap;
}
.section-head h2 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}
.section-head p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
  max-width: 600px;
}
.section-head-end { justify-content: flex-end; }

.card {
  background: var(--bg-elevated);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: var(--sp-5);
}

/* ==========================================================================
   Overview — KPI grid + headline
   ========================================================================== */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.kpi-card {
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  position: relative;
  overflow: hidden;
}
.kpi-card .kpi-value {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.kpi-card .kpi-label {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 500;
}
.kpi-card .kpi-icon {
  position: absolute;
  top: var(--sp-3);
  right: var(--sp-3);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}
.kpi-card.kpi-accent .kpi-icon { background: var(--accent-soft); color: var(--accent-dark); }
.kpi-card.kpi-info .kpi-icon { background: var(--info-soft); color: var(--info); }
.kpi-card.kpi-warn .kpi-icon { background: var(--warn-soft); color: #854d0e; }

.headline-card {
  background: linear-gradient(135deg, var(--accent) 0%, #db2777 100%);
  color: white;
  padding: var(--sp-6);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-6);
  position: relative;
  overflow: hidden;
}
.headline-card::after {
  content: "";
  position: absolute;
  right: -50px;
  top: -50px;
  width: 250px;
  height: 250px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  pointer-events: none;
}
.headline-card h2 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: var(--sp-2);
}
.headline-card p {
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  max-width: 80%;
}
.headline-card a {
  display: inline-block;
  margin-top: var(--sp-4);
  padding: 8px 16px;
  background: rgba(255,255,255,0.95);
  color: var(--accent-dark);
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
}
.headline-card a:hover { background: white; text-decoration: none; }

.silo-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}
.silo-summary-card {
  padding: var(--sp-4) var(--sp-5);
  background: var(--bg-elevated);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
}
.silo-summary-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--silo-color, var(--primary));
}
.silo-summary-card.silo-floristik   { --silo-color: var(--silo-floristik); }
.silo-summary-card.silo-pflanzen    { --silo-color: var(--silo-pflanzen); }
.silo-summary-card.silo-galabau     { --silo-color: var(--silo-galabau); }
.silo-summary-card.silo-naturpool   { --silo-color: #0891b2; }
.silo-summary-card.silo-planung     { --silo-color: #7c3aed; }
.silo-summary-card.silo-unternehmen { --silo-color: #64748b; }

.silo-summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
  text-decoration: none;
}
.silo-summary-card .silo-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.silo-summary-card .silo-dot {
  width: 10px; height: 10px; border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
}
.silo-summary-card h3 { font-size: 15px; font-weight: 600; line-height: 1.3; }
.silo-summary-card .silo-stats {
  display: flex; gap: var(--sp-4);
  font-variant-numeric: tabular-nums;
}
.silo-summary-card .stat-val { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.silo-summary-card .stat-lbl { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.silo-summary-card .silo-desc { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.silo-summary-card .silo-hint {
  font-size: 11px;
  padding: 8px 10px;
  background: var(--warn-soft);
  color: #854d0e;
  border-radius: var(--r-sm);
  line-height: 1.45;
  margin-top: 2px;
}

.silo-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.silo-tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
  white-space: nowrap;
}
.silo-tag.tag-info { background: var(--info-soft); color: var(--info); }
.silo-tag.tag-warn { background: var(--warn-soft); color: #854d0e; }
.silo-tag.tag-muted { background: var(--bg-warm); color: var(--text-muted); }

.overview-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--sp-5);
  margin-bottom: var(--sp-6);
}
.overview-row .card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.overview-row .card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.overview-row .card ul {
  margin-top: var(--sp-3);
  padding-left: var(--sp-4);
  font-size: 13px;
  color: var(--text);
}
.overview-row .card ul li { margin-bottom: 6px; }

/* ==========================================================================
   Silos view — three-column trees
   ========================================================================== */
.silos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.silo-column {
  background: var(--bg-elevated);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  overflow: hidden;
  border-left: 3px solid var(--silo-color, var(--primary));
}
.silo-floristik   { --silo-color: var(--silo-floristik); }
.silo-pflanzen    { --silo-color: var(--silo-pflanzen); }
.silo-galabau     { --silo-color: var(--silo-galabau); }
.silo-naturpool   { --silo-color: #0891b2; }
.silo-planung     { --silo-color: #7c3aed; }
.silo-unternehmen { --silo-color: #64748b; }

.silo-header {
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.silo-header h3 {
  font-size: 13px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
}
.silo-header .silo-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex: 0 0 auto;
}
.silo-header .silo-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.silo-tree {
  padding: 4px 8px 8px;
  list-style: none;
  height: 400px;
  overflow-y: auto;
}
.silo-tree ul {
  list-style: none;
  margin: 0;
  padding-left: 10px;
  border-left: 1px dashed var(--border-strong);
}
.tree-node {
  margin-bottom: 1px;
}
.tree-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.08s;
}
.tree-row:hover {
  background: var(--bg-warm);
}
.tree-row.synthetic {
  cursor: default;
  opacity: 0.7;
}
.tree-row.synthetic:hover { background: transparent; }

.tree-row.static-node {
  cursor: default;
  background: transparent;
}
.tree-row.static-node:hover { background: var(--bg-soft); }
.tree-row.static-node .tl-name { color: var(--text-muted); }
.tree-row.no-briefing {
  cursor: default;
  opacity: 0.85;
}
.tree-row.no-briefing:hover { background: var(--bg-soft); }
.tl-meta {
  font-size: 10px;
  color: var(--text-soft);
  font-style: italic;
}
.tl-meta-gap {
  color: #b45309;  /* amber-700 */
  background: #fef3c7;
  padding: 1px 6px;
  border-radius: 3px;
  font-style: normal;
  font-weight: 500;
  cursor: help;
}
.tree-row.data-gap {
  background: linear-gradient(90deg, #fffbeb 0%, transparent 60%);
}
.tree-row.data-gap:hover {
  background: linear-gradient(90deg, #fef3c7 0%, transparent 60%);
}
.tree-city-chip {
  display: inline-block;
  font-size: 10px;
  background: var(--bg-soft);
  color: var(--text-soft);
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  font-weight: 500;
}
.tree-action-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tree-action-badge.action-high { background: #dcfce7; color: #15803d; }
.tree-action-badge.action-build { background: #d1fae5; color: #047857; }
.tree-action-badge.action-maybe { background: #fef3c7; color: #b45309; }
.tree-action-badge.action-skip  { background: #f1f5f9; color: var(--text-soft); }

.data-gap-banner {
  background: #fef3c7;
  border-left: 3px solid #b45309;
  color: #78350f;
  padding: 12px 16px;
  border-radius: 4px;
  margin: 1rem 0;
  font-size: 13px;
  line-height: 1.5;
}

.tree-toggle {
  width: 12px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  font-size: 9px;
  color: var(--text-soft);
  flex: 0 0 auto;
  align-self: center;
}
.tree-toggle.placeholder { visibility: hidden; }
.tree-label {
  flex: 1;
  font-size: 12px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 1px;
  overflow: hidden;
  min-width: 0;
  line-height: 1.3;
}
.tree-label .tl-name {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tree-label .tl-url {
  font-size: 10.5px;
  font-family: var(--font-mono);
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.tree-vol {
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text-muted);
  flex: 0 0 auto;
  align-self: center;
  text-align: right;
  min-width: 48px;
}

.tree-children.collapsed { display: none; }

/* ==========================================================================
   Detail panel (slide-in)
   ========================================================================== */
.detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  z-index: 50;
}
.detail-overlay.active {
  opacity: 1;
  pointer-events: auto;
}
.detail-panel {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(640px, 96vw);
  background: var(--bg-elevated);
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 32px rgba(0,0,0,0.08);
  transform: translateX(100%);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 51;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.detail-panel.active { transform: translateX(0); }
.detail-head {
  padding: var(--sp-3) var(--sp-4);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  flex: 0 0 auto;
}
.detail-close {
  width: 28px; height: 28px;
  border-radius: 6px;
  font-size: 22px;
  line-height: 1;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  transition: background 0.1s, color 0.1s;
}
.detail-close:hover { background: var(--bg-warm); color: var(--text); }

#detail-content {
  flex: 1;
  overflow-y: auto;
  padding: 0 var(--sp-5) var(--sp-6);
}

/* Briefing detail content */
.briefing-breadcrumb {
  font-size: 12px;
  color: var(--text-muted);
  margin: var(--sp-2) 0 var(--sp-2);
}
.briefing-breadcrumb span:not(:last-child)::after { content: " › "; color: var(--text-soft); }

.briefing-url {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-warm);
  border-radius: 4px;
  margin-bottom: var(--sp-3);
}

.briefing-area-badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: var(--sp-2);
}
.area-floristik { background: var(--silo-floristik-soft); color: var(--silo-floristik); }
.area-pflanzen  { background: var(--silo-pflanzen-soft);  color: var(--silo-pflanzen); }
.area-galabau   { background: var(--silo-galabau-soft);   color: var(--silo-galabau); }
.area-naturpool { background: #cffafe; color: #0e7490; }
.area-lokal     { background: var(--info-soft); color: var(--info); }

.briefing-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin: var(--sp-2) 0 var(--sp-3);
}

.briefing-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.briefing-stats > div {
  background: var(--bg-soft);
  padding: var(--sp-3);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
}
.briefing-stats .bs-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.briefing-stats .bs-value {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-top: 2px;
}

.briefing-block {
  margin-bottom: var(--sp-5);
}
.briefing-block h4 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--sp-2);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  justify-content: space-between;
}

.copy-btn {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--bg-warm);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  transition: all 0.1s;
}
.copy-btn:hover { background: var(--primary-soft); color: var(--primary-dark); }
.copy-btn.copied { background: var(--primary); color: white; }

.briefing-suggestion {
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-soft);
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.5;
}
.briefing-suggestion code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  display: block;
  word-break: break-word;
}

.section-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.section-item {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-soft);
}
.section-item h5 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.section-item .si-reason {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  margin-bottom: var(--sp-2);
}
.section-item .si-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.section-item .ev-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--text);
}
.section-item .ev-chip b {
  color: var(--accent-dark);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.kw-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.kw-table thead th {
  text-align: left;
  padding: 6px 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.kw-table tbody td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.kw-table tbody tr:last-child td { border-bottom: none; }
.kw-table .kw-name { color: var(--text); font-size: 12px; }
.kw-table .kw-vol {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
  width: 70px;
}
.kw-table .kw-kd {
  text-align: right;
  width: 50px;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}
.kw-table .kw-bar-cell { width: 100px; }
.kw-bar {
  display: block;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}
.kw-bar > span {
  display: block;
  height: 100%;
  background: var(--heat-mid);
  border-radius: 3px;
}
.kw-bar.bar-low > span { background: var(--heat-low); }
.kw-bar.bar-mid > span { background: var(--heat-mid); }
.kw-bar.bar-high > span { background: var(--heat-high); }
.kw-bar.bar-peak > span { background: var(--heat-peak); }

.link-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.link-chip {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text);
  cursor: pointer;
  transition: all 0.1s;
}
.link-chip:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-dark);
}

/* ==========================================================================
   Ratgeber view — Cluster-Cards
   ========================================================================== */
.cluster-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
}
.cluster-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  height: 400px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.cluster-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: var(--sp-2);
}
.cluster-card .cc-meta {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--sp-3);
}
.cluster-card ol {
  list-style: none;
  counter-reset: ck;
  padding: 0;
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}
.cluster-card ol li {
  counter-increment: ck;
  padding: 4px 0;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  border-bottom: 1px dashed var(--border);
}
.cluster-card ol li::before {
  content: counter(ck);
  color: var(--text-soft);
  width: 18px;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}
.cluster-card ol li span:first-of-type { flex: 1; color: var(--text); }
.cluster-card ol li b {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--accent-dark);
}

/* ==========================================================================
   Lokal view — card grid
   ========================================================================== */
.lokal-filter {
  display: flex;
  gap: var(--sp-2);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.lokal-filter button {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: 500;
  transition: all 0.1s;
}
.lokal-filter button:hover { background: var(--bg-warm); color: var(--text); }
.lokal-filter button.active {
  background: var(--text);
  color: white;
  border-color: var(--text);
}

.lokal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-4);
}
.lokal-card {
  background: var(--bg-elevated);
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  padding: var(--sp-5);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.lokal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--border-strong);
}
.lokal-card .lc-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--sp-2);
}
.lokal-card .lc-city {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.lokal-card .lc-service {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.lokal-card .lc-stats {
  display: flex;
  gap: var(--sp-4);
}
.lokal-card .lc-stat-val {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.lokal-card .lc-stat-lbl {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.lokal-card .lc-url {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-soft);
  word-break: break-word;
}
.lokal-card .lc-top {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
  border-top: 1px dashed var(--border);
  padding-top: var(--sp-2);
}

.action-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-radius: 999px;
  white-space: nowrap;
}
.action-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.action-build, .action-build-high, .action-build-high-priority {
  background: var(--primary-soft);
  color: var(--primary-dark);
}
.action-build::before, .action-build-high::before, .action-build-high-priority::before { background: var(--primary); }
.action-maybe { background: var(--warn-soft); color: #854d0e; }
.action-maybe::before { background: var(--warn); }
.action-skip { background: var(--skip-soft); color: var(--text-muted); }
.action-skip::before { background: var(--skip); }

/* ==========================================================================
   Backlog view
   ========================================================================== */
.backlog-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.backlog-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-3);
  align-items: start;
}
.backlog-item .bl-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.backlog-item .bl-filename {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-warm);
  padding: 1px 7px;
  border-radius: 3px;
  font-weight: 400;
}
.backlog-item .bl-size {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
}
.backlog-item .bl-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.backlog-item .bl-actions {
  display: flex;
  gap: var(--sp-2);
  flex-direction: column;
  align-items: flex-end;
}
.backlog-item .bl-download {
  padding: 7px 14px;
  background: var(--text);
  color: white;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.backlog-item .bl-download:hover { background: var(--primary); text-decoration: none; }
.backlog-item .bl-preview-toggle {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: underline;
  background: none;
  padding: 0;
}
.backlog-item .bl-preview {
  grid-column: 1 / -1;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
  overflow-x: auto;
}
.backlog-item .bl-preview table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 11px;
}
.backlog-item .bl-preview th,
.backlog-item .bl-preview td {
  padding: 4px 8px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.backlog-item .bl-preview th {
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-soft);
}
.backlog-item .bl-preview.hidden { display: none; }

/* ==========================================================================
   Overview — Navigation-Mockup
   ========================================================================== */
.nav-mock-frame {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  margin-bottom: var(--sp-6);
  position: relative;
}
.nav-mock-browser {
  background: var(--bg-warm);
  border-bottom: 1px solid var(--border);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nm-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.nm-dot-r { background: #ff5f57; }
.nm-dot-y { background: #febc2e; }
.nm-dot-g { background: #28c840; }
.nm-url {
  margin-left: var(--sp-3);
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-elevated);
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.nav-mock-shell { background: var(--bg-elevated); }
.nav-mock-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
}
.nav-mock-logo {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.nav-mock-logo-mark {
  width: 26px; height: 26px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}
.nav-mock-menu {
  list-style: none;
  display: flex;
  gap: 2px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.nav-mock-item { position: relative; list-style: none; }
.nav-mock-item > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--r-sm);
  transition: background 0.12s, color 0.12s, border-color 0.12s;
  cursor: pointer;
  text-decoration: none;
  border-bottom: 2px solid transparent;
}
.nav-mock-item > a:hover {
  background: var(--bg-warm);
  color: var(--text);
  text-decoration: none;
}
.nav-mock-item:hover > a {
  border-bottom-color: var(--silo-color, var(--primary));
}
.nm-caret {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}
.nav-mock-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  list-style: none;
  margin: 4px 0 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.14s, transform 0.14s, visibility 0s 0.14s;
  z-index: 5;
  border-top: 3px solid var(--silo-color, var(--primary));
}
.nav-mock-item:hover > .nav-mock-dropdown,
.nav-mock-item:focus-within > .nav-mock-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}
.nav-mock-dropdown li { list-style: none; }
.nav-mock-dropdown a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-3);
  padding: 8px 12px;
  border-radius: var(--r-sm);
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  transition: background 0.1s;
}
.nav-mock-dropdown a:hover {
  background: var(--bg-soft);
  color: var(--text);
  text-decoration: none;
}
.nav-mock-dropdown .nm-label { flex: 1; }
.nav-mock-dropdown .nm-vol {
  font-size: 11px;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.nav-mock-item-static > a { opacity: 0.7; }
.nav-mock-hero {
  padding: var(--sp-7) var(--sp-5);
  text-align: center;
  background: linear-gradient(180deg, var(--bg-soft) 0%, var(--bg-elevated) 100%);
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
.nav-mock-hero h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.015em;
  margin-bottom: var(--sp-2);
}
.nav-mock-hero p {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 540px;
  margin: 0 auto;
}

/* Silo-Tokens */
.silo-floristik   { --silo-color: var(--silo-floristik); }
.silo-pflanzen    { --silo-color: var(--silo-pflanzen); }
.silo-galabau     { --silo-color: var(--silo-galabau); }
.silo-naturpool   { --silo-color: #0891b2; }
.silo-planung     { --silo-color: #7c3aed; }
.silo-unternehmen { --silo-color: #64748b; }
.silo-statisch    { --silo-color: #64748b; }

/* ==========================================================================
   Insights
   ========================================================================== */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.insight-card {
  position: relative;
  padding: var(--sp-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  overflow: hidden;
}
.insight-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--insight-color, var(--primary));
}
.insight-tone-primary { --insight-color: var(--primary); }
.insight-tone-accent  { --insight-color: var(--accent); }
.insight-tone-info    { --insight-color: var(--info); }
.insight-card .insight-metric {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--insight-color, var(--primary));
}
.insight-card h4 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}
.insight-card p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* ==========================================================================
   Sitemap-Visualisierungen (Collapsible-Blocks auf Übersichts-Seite)
   ========================================================================== */
.sitemap-block {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  margin-bottom: var(--sp-5);
  overflow: hidden;
}
.sitemap-block-head {
  list-style: none;
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: var(--sp-4) var(--sp-5);
  transition: background 0.1s;
}
.sitemap-block-head::-webkit-details-marker { display: none; }
.sitemap-block-head::marker { display: none; content: ""; }
.sitemap-block-head:hover { background: var(--bg-soft); }
.sitemap-block[open] > .sitemap-block-head {
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
}
.sitemap-chevron {
  font-size: 11px;
  color: var(--text-soft);
  display: inline-block;
  transition: transform 0.15s ease;
  flex: 0 0 auto;
  margin-top: 4px;
  width: 10px;
}
.sitemap-block[open] .sitemap-chevron { transform: rotate(90deg); }
.sitemap-block-titles { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.sitemap-block-titles h3 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sitemap-block-titles p {
  font-size: 12px;
  color: var(--text-muted);
}
.sitemap-block-body {
  padding: var(--sp-5);
  position: relative;
}
.sitemap-block-action {
  position: absolute;
  top: var(--sp-4);
  right: var(--sp-5);
  z-index: 1;
}
.sitemap-tree {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre;
  overflow-x: auto;
}

.cluster-diagram { padding: var(--sp-4) var(--sp-2); position: relative; }
.cd-root { display: flex; justify-content: center; margin-bottom: 8px; }
.cd-box {
  background: var(--bg-elevated);
  border: 1.5px solid var(--text);
  border-radius: var(--r-sm);
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.cd-box-root { background: var(--text); color: var(--bg-elevated); border-color: var(--text); }
.cd-connectors { height: 32px; display: flex; position: relative; margin-bottom: 4px; }
.cd-connectors::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 1.5px;
  height: 16px;
  background: var(--border-strong);
  transform: translateX(-50%);
}
.cd-connectors::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 8%;
  right: 8%;
  height: 1.5px;
  background: var(--border-strong);
}
.cd-conn { flex: 1; position: relative; }
.cd-conn::after {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  width: 1.5px;
  height: 16px;
  background: var(--border-strong);
  transform: translateX(-50%);
}
.cd-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--sp-3);
}
.cd-col {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: center;
}
.cd-box-silo {
  background: var(--bg-elevated);
  border-color: var(--silo-color, var(--primary));
  color: var(--silo-color, var(--primary));
  width: 100%;
  text-align: center;
  border-width: 2px;
}
.cd-children {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: stretch;
  width: 100%;
}
.cd-chip {
  display: block;
  padding: 5px 10px;
  font-size: 12px;
  background: var(--bg-soft);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-sm);
  color: var(--text);
  text-align: center;
}
.cd-chip-empty { opacity: 0.6; font-style: italic; }
.cd-chip-more { opacity: 0.7; font-size: 11px; }

.cd-chip-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cd-chip-parent {
  border-style: solid;
  border-color: var(--silo-color, var(--border-strong));
  background: var(--bg-elevated);
}
.cd-subchildren {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-left: var(--sp-3);
  padding-left: var(--sp-3);
  border-left: 1px dashed var(--border-strong);
}
.cd-chip-sub {
  padding: 3px 8px;
  font-size: 11px;
  color: var(--text-muted);
  background: transparent;
  border-style: dotted;
  text-align: left;
}

.sitemap-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.sitemap-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.sitemap-table thead th {
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}
.sitemap-table tbody td {
  padding: 7px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.sitemap-table tbody tr:last-child td { border-bottom: none; }
.sitemap-table tbody tr:hover { background: var(--bg-soft); }
.sitemap-table code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.sitemap-table .depth-pill {
  display: inline-grid;
  place-items: center;
  width: 22px; height: 22px;
  border-radius: 6px;
  background: var(--bg-warm);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.sitemap-table .depth-indent {
  display: inline-block;
  width: calc(var(--depth, 0) * 16px);
}
.sitemap-row.depth-0 td { font-weight: 600; background: var(--bg-soft); }
.sitemap-row.depth-1 td { font-weight: 500; }

/* ==========================================================================
   Backlog-Groups
   ========================================================================== */
.backlog-group { margin-bottom: var(--sp-6); }
.backlog-group-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--sp-3);
  padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
}
.backlog-group-head h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.backlog-group-head .bg-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-warm);
  padding: 2px 8px;
  border-radius: 999px;
}
.backlog-group-head p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}
.backlog-item .bl-main { min-width: 0; grid-column: 1; }
.backlog-item .bl-md,
.backlog-item .bl-sitemap {
  grid-column: 1 / -1;
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--border);
}
.backlog-item .bl-md.hidden,
.backlog-item .bl-sitemap.hidden { display: none; }
.bl-md-pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
  word-wrap: break-word;
  max-height: 480px;
  overflow-y: auto;
}
.bl-md-toggle,
.bl-sitemap-toggle {
  font-size: 11px;
  color: var(--text-muted);
  text-decoration: underline;
  background: none;
  padding: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
    padding: var(--sp-3);
  }
  .tabs { justify-self: stretch; overflow-x: auto; }
  .silos-grid, .silo-summary-grid { grid-template-columns: 1fr; }
  .overview-row { grid-template-columns: 1fr; }
  .briefing-stats { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  .app-main { padding: var(--sp-4) var(--sp-3); }
  .headline-card p { font-size: 20px; max-width: 100%; }
  .kpi-card .kpi-value { font-size: 26px; }
  .section-head h2 { font-size: 18px; }
  .backlog-item { grid-template-columns: 1fr; }
  .backlog-item .bl-actions { flex-direction: row; align-items: center; flex-wrap: wrap; }
  .nav-mock-menu { gap: 0; }
  .nav-mock-item > a { padding: 8px 10px; font-size: 12px; }
  .nav-mock-dropdown { left: auto; right: 0; min-width: 200px; }
  .cd-row { grid-template-columns: 1fr 1fr; }
  .insights-grid { grid-template-columns: 1fr; }
  .sitemap-block-action { position: static; margin-bottom: var(--sp-3); align-self: flex-start; }
}

/* ==========================================================================
   Print
   ========================================================================== */
@media print {
  :root {
    --bg: white;
    --bg-elevated: white;
    --bg-soft: #fafafa;
    --bg-warm: #f5f5f5;
    --border: #d0d0d0;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
  }
  body { font-size: 11pt; background: white; color: #000; }
  .topbar {
    position: static;
    border-bottom: 2px solid #000;
    box-shadow: none;
    page-break-after: avoid;
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
  .tabs, .search-wrap, .bottombar, .detail-overlay,
  .copy-btn, .lokal-filter, .bl-actions, .bl-preview-toggle,
  .bl-md-toggle, .bl-sitemap-toggle, .nav-mock-browser {
    display: none !important;
  }
  .nav-mock-dropdown {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none;
    border: 1px solid #d0d0d0;
    margin-top: var(--sp-2);
  }
  .insights-grid, .cd-row { grid-template-columns: 1fr 1fr; }
  .insight-card, .sitemap-block, .backlog-group {
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .bl-md.hidden, .bl-sitemap.hidden, .bl-preview.hidden { display: block !important; }
  details.sitemap-block .sitemap-block-body { display: block !important; }
  details.sitemap-block .sitemap-chevron { display: none; }
  .detail-panel {
    position: static;
    transform: none;
    box-shadow: none;
    border: none;
    width: 100%;
    page-break-before: always;
  }
  .detail-panel:not(.active) { display: none; }
  .detail-head { display: none; }
  .silos-grid { grid-template-columns: 1fr; gap: var(--sp-4); }
  .tree-children.collapsed { display: block !important; }
  .kpi-grid, .silo-summary-grid { page-break-inside: avoid; }
  .silo-column, .lokal-card, .cluster-card, .backlog-item, .briefing-block {
    page-break-inside: avoid;
    break-inside: avoid;
    box-shadow: none;
  }
  .silo-tree { height: auto; overflow: visible; }
  .cluster-card { height: auto; overflow: visible; display: block; }
  .cluster-card ol { overflow: visible; }
  .headline-card { background: #f5f5f5; color: #000; border: 2px solid #000; }
  .headline-card a { background: #000; color: #fff; }
  a { color: #000; text-decoration: underline; }
  .app-main { max-width: none; padding: 0; }

  /* Force show all routes' content for print? No — print current view only.
     But add a tip via :before on body if no route loaded. */
}

@page {
  size: A4;
  margin: 1.5cm 1.2cm;
}
