/* ═══════════════════════════════════════════════════════════════
   Human Development Map v2.1 – Stylesheet
   ═══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Lora:ital,wght@0,400;0,600;0,700;1,400&family=Source+Sans+3:wght@300;400;600&display=swap');

:root {
  --hdm-bg:        #0f1a0f;
  --hdm-surface:   #16231a;
  --hdm-surface2:  #1e2e22;
  --hdm-border:    #2a4030;
  --hdm-text:      #d6e8d0;
  --hdm-text-mute: #7a9e82;
  --hdm-text-dim:  #4d6b55;
  --hdm-accent:    #5cb85c;
  --hdm-accent2:   #a8d5a2;
  --hdm-gold:      #c9a84c;
  --hdm-gold-mute: #7d6930;
  --hdm-radius:    12px;
  --hdm-radius-sm: 6px;
  --hdm-shadow:    0 4px 24px rgba(0,0,0,.5);
  --hdm-font-s:    'Lora', Georgia, serif;
  --hdm-font-b:    'Source Sans 3', sans-serif;
}

/* ── Reset ──────────────────────────────────────────────────── */
.hdm-wrapper {
  font-family: var(--hdm-font-b);
  background: var(--hdm-bg);
  color: var(--hdm-text);
  border-radius: var(--hdm-radius);
  overflow: hidden;
  border: 1px solid var(--hdm-border);
  box-shadow: var(--hdm-shadow);
  width: 100%;
  position: relative;
}
.hdm-wrapper *, .hdm-wrapper *::before, .hdm-wrapper *::after {
  box-sizing: border-box; margin: 0; padding: 0;
}
.hdm-wrapper::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(ellipse 80% 40% at 50% 0%, rgba(92,184,92,.07) 0%, transparent 60%);
  pointer-events: none; z-index: 0;
}
.hdm-wrapper > * { position: relative; z-index: 1; }

/* ── Header ────────────────────────────────────────────────── */
.hdm-header {
  background: linear-gradient(135deg, #0d1f10 0%, #1a2e1e 100%);
  border-bottom: 1px solid var(--hdm-border);
  padding: 16px 24px;
}
.hdm-header-inner {
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 10px;
}
.hdm-title-block { display: flex; align-items: center; gap: 12px; }
.hdm-title-glyph { font-size: 2rem; }
.hdm-title {
  font-family: var(--hdm-font-s); font-size: 1.5rem; font-weight: 700;
  color: var(--hdm-accent2); line-height: 1.1; letter-spacing: -.02em;
}
.hdm-subtitle { font-size: 0.75rem; color: var(--hdm-text-mute); margin-top: 2px; letter-spacing: .02em; }
.hdm-header-actions { display: flex; gap: 5px; flex-wrap: wrap; }

.hdm-ctrl-btn {
  background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  color: var(--hdm-text); padding: 6px 12px; border-radius: 20px;
  cursor: pointer; font-size: 0.75rem; font-family: var(--hdm-font-b);
  white-space: nowrap; transition: all .18s; display: flex; align-items: center; gap: 4px;
}
.hdm-ctrl-btn:hover  { border-color: var(--hdm-accent); color: var(--hdm-accent2); background: #1e3025; }
.hdm-ctrl-btn.active { background: var(--hdm-accent); border-color: var(--hdm-accent); color: #0d1f10; font-weight: 600; }

/* ── Filter-Bar ────────────────────────────────────────────── */
.hdm-filter-bar {
  background: var(--hdm-surface); border-bottom: 1px solid var(--hdm-border);
  padding: 9px 24px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.hdm-filter-label {
  font-size: 0.68rem; color: var(--hdm-text-dim); font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; white-space: nowrap;
}
.hdm-filter-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.hdm-pill {
  background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  color: var(--hdm-text-mute); padding: 3px 10px; border-radius: 20px;
  cursor: pointer; font-size: 0.71rem; font-family: var(--hdm-font-b); transition: all .15s;
}
.hdm-pill:hover, .hdm-pill.active { background: var(--hdm-accent); border-color: var(--hdm-accent); color: #0d1f10; font-weight: 600; }
.hdm-pill-all.active { background: var(--hdm-gold); border-color: var(--hdm-gold); }

/* ── Timeline Track ────────────────────────────────────────── */
.hdm-timeline-wrapper {
  padding: 10px 24px 6px;
  background: var(--hdm-surface);
  border-bottom: 1px solid var(--hdm-border);
}
.hdm-timeline-track {
  display: flex; gap: 3px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: thin; scrollbar-color: var(--hdm-border) transparent;
}
.hdm-timeline-track::-webkit-scrollbar { height: 3px; }
.hdm-timeline-track::-webkit-scrollbar-thumb { background: var(--hdm-border); }

.hdm-tl-node { flex: 1; min-width: 82px; cursor: pointer; }
.hdm-tl-inner {
  background: var(--hdm-surface2); border: 1.5px solid var(--hdm-border);
  border-radius: var(--hdm-radius-sm); padding: 9px 5px 7px; text-align: center;
  transition: all .2s; border-top: 3px solid transparent;
}
.hdm-tl-node:hover .hdm-tl-inner,
.hdm-tl-node.active .hdm-tl-inner {
  border-top-color: var(--stage-color, var(--hdm-accent));
  background: #1e3025; transform: translateY(-2px);
  box-shadow: 0 5px 16px rgba(0,0,0,.35);
}
.hdm-tl-icon  { font-size: 1.2rem; display: block; margin-bottom: 3px; }
.hdm-tl-label { font-size: 0.6rem; color: var(--hdm-text-mute); display: block; font-weight: 600; line-height: 1.2; }
.hdm-tl-alter { font-size: 0.56rem; color: var(--hdm-text-dim); display: block; margin-top: 2px; }

/* ── Hauptbereich ──────────────────────────────────────────── */
.hdm-main { padding: 14px 24px 28px; }
.hdm-content-area {
  display: grid;
  grid-template-columns: 1fr;   /* default: no sidebar */
  gap: 14px; min-height: 560px;
}
.hdm-content-area.has-sidebar { grid-template-columns: 200px 1fr; }

/* ── Sidebar ───────────────────────────────────────────────── */
.hdm-sidebar-title {
  font-family: var(--hdm-font-s); font-size: 0.7rem; font-weight: 600;
  color: var(--hdm-gold); letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 8px; padding-bottom: 7px; border-bottom: 1px solid var(--hdm-border);
}
.hdm-stage-list { list-style: none; display: flex; flex-direction: column; gap: 3px; }
.hdm-stage-item {
  background: var(--hdm-surface); border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-radius-sm); padding: 7px 10px; cursor: pointer;
  display: flex; align-items: center; gap: 7px; transition: all .15s;
  border-left: 3px solid transparent;
}
.hdm-stage-item:hover   { background: var(--hdm-surface2); }
.hdm-stage-item.active  { border-left-color: var(--stage-color, var(--hdm-accent)); background: #1e3025; }
.hdm-stage-icon-sm { font-size: 0.9rem; }
.hdm-stage-name { font-size: 0.71rem; font-weight: 600; color: var(--hdm-text); display: block; line-height: 1.2; }
.hdm-stage-age  { font-size: 0.6rem;  color: var(--hdm-text-dim); display: block; margin-top: 1px; }

/* ── Detail-Panel ──────────────────────────────────────────── */
.hdm-detail-panel {
  background: var(--hdm-surface); border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-radius); overflow: hidden; display: flex; flex-direction: column;
}
.hdm-detail-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  flex: 1; min-height: 420px; text-align: center; padding: 40px; gap: 10px;
}
.hdm-placeholder-icon { font-size: 3.5rem; opacity: .35; animation: hdm-float 3s ease-in-out infinite; }
@keyframes hdm-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.hdm-detail-placeholder h3 { font-family: var(--hdm-font-s); font-size: 1.05rem; color: var(--hdm-text-mute); }
.hdm-detail-placeholder p  { font-size: 0.8rem; color: var(--hdm-text-dim); max-width: 340px; line-height: 1.5; }

.hdm-detail-content { flex: 1; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--hdm-border) transparent; }
.hdm-detail-content::-webkit-scrollbar { width: 4px; }
.hdm-detail-content::-webkit-scrollbar-thumb { background: var(--hdm-border); }

/* ── Detail Header ─────────────────────────────────────────── */
.hdm-detail-header {
  padding: 18px 22px 14px;
  background: linear-gradient(135deg, #0d1f10 0%, #16231a 100%);
  border-bottom: 1px solid var(--hdm-border);
  display: flex; align-items: flex-start; gap: 12px;
}
.hdm-detail-stage-icon { font-size: 2.4rem; line-height: 1; }
.hdm-detail-alter {
  font-size: 0.69rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 20px; border: 1px solid; display: inline-block; margin-bottom: 4px;
}
.hdm-detail-name {
  font-family: var(--hdm-font-s); font-size: 1.4rem; font-weight: 700;
  color: var(--hdm-accent2); line-height: 1.1;
}

/* ── Tabs – ALLE GLEICH BREIT ──────────────────────────────── */
.hdm-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--hdm-border);
  background: var(--hdm-surface2);
}
.hdm-tab-btn {
  background: none; border: none; padding: 10px 4px;
  color: var(--hdm-text-mute); cursor: pointer; font-family: var(--hdm-font-b);
  font-size: 0.7rem; font-weight: 600; text-align: center;
  border-bottom: 2px solid transparent; transition: all .15s; white-space: nowrap;
}
.hdm-tab-btn:hover { color: var(--hdm-text); }
.hdm-tab-btn.active { color: var(--hdm-accent); border-bottom-color: var(--hdm-accent); background: rgba(92,184,92,.05); }

/* ── Tab Panels ────────────────────────────────────────────── */
.hdm-tab-panel { display: none; padding: 18px 22px; animation: hdm-fadein .25s ease; }
.hdm-tab-panel.active { display: block; }
@keyframes hdm-fadein { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }

/* ── Theorien-Grid ─────────────────────────────────────────── */
.hdm-theories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 10px; }
.hdm-theory-card {
  background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  border-left: 3px solid var(--theory-color, var(--hdm-accent));
  border-radius: var(--hdm-radius-sm); padding: 12px 14px; transition: all .18s;
}
.hdm-theory-card:hover { background: #1e3025; transform: translateY(-2px); box-shadow: 0 5px 16px rgba(0,0,0,.25); }
.hdm-theory-card.hdm-dimmed { opacity: .2; filter: grayscale(.6); }
.hdm-theory-header { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.hdm-theory-icon  { font-size: 1rem; }
.hdm-theory-name  { font-family: var(--hdm-font-s); font-size: 0.85rem; font-weight: 700; color: var(--hdm-accent2); }
.hdm-theory-phase { font-size: 0.74rem; font-weight: 600; color: var(--hdm-gold); margin-bottom: 4px; line-height: 1.3; }
.hdm-theory-desc  { font-size: 0.74rem; color: var(--hdm-text-mute); line-height: 1.55; }

/* ── Einfluss-Balken ───────────────────────────────────────── */
.hdm-influences { display: flex; flex-direction: column; gap: 11px; }
.hdm-influence-header { display: flex; justify-content: space-between; margin-bottom: 3px; }
.hdm-influence-name { font-size: 0.8rem; font-weight: 600; color: var(--hdm-text); display: flex; align-items: center; gap: 5px; }
.hdm-influence-pct  { font-size: 0.76rem; font-weight: 700; color: var(--hdm-accent); }
.hdm-bar-track { height: 7px; background: var(--hdm-border); border-radius: 4px; overflow: hidden; }
.hdm-bar-fill  { height: 100%; border-radius: 4px; width: 0; transition: width 1s cubic-bezier(.25,.46,.45,.94); }

/* ── Meilensteine ──────────────────────────────────────────── */
.hdm-milestones { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 7px; }
.hdm-milestone-chip {
  background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-radius-sm); padding: 8px 11px; font-size: 0.76rem; color: var(--hdm-text);
  display: flex; align-items: center; gap: 7px; transition: border-color .15s;
}
.hdm-milestone-chip:hover { border-color: var(--hdm-accent); }
.hdm-milestone-dot { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }

/* ── Erziehung ─────────────────────────────────────────────── */
.hdm-erziehung-block { display: flex; flex-direction: column; gap: 12px; }
.hdm-erziehung-main {
  background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  border-left: 3px solid var(--hdm-gold); border-radius: var(--hdm-radius-sm); padding: 14px;
}
.hdm-erziehung-main p { font-size: 0.81rem; line-height: 1.65; color: var(--hdm-text-mute); }
.hdm-risiko-foerder-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hdm-risk-box, .hdm-foerder-box {
  background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-radius-sm); padding: 12px;
}
.hdm-risk-box    { border-top: 3px solid #e53935; }
.hdm-foerder-box { border-top: 3px solid var(--hdm-accent); }
.hdm-box-title { font-size: 0.69rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; margin-bottom: 8px; }
.hdm-risk-box    .hdm-box-title { color: #ef9a9a; }
.hdm-foerder-box .hdm-box-title { color: var(--hdm-accent2); }
.hdm-chip-list { display: flex; flex-wrap: wrap; gap: 4px; }
.hdm-chip { font-size: 0.68rem; padding: 2px 8px; border-radius: 20px; border: 1px solid; }
.hdm-chip-risk    { background: rgba(229,57,53,.1); border-color: rgba(229,57,53,.3); color: #ef9a9a; }
.hdm-chip-foerder { background: rgba(92,184,92,.1);  border-color: rgba(92,184,92,.3);  color: var(--hdm-accent2); }
.hdm-stil-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 10px; }
.hdm-stil-card { background: var(--hdm-bg); border: 1px solid var(--hdm-border); border-radius: var(--hdm-radius-sm); padding: 11px; border-top: 3px solid var(--stil-color, #888); }
.hdm-stil-name   { font-size: 0.78rem; font-weight: 700; color: var(--stil-color, #888); margin-bottom: 2px; }
.hdm-stil-sub    { font-size: 0.69rem; color: var(--hdm-text-mute); margin-bottom: 4px; }
.hdm-stil-effekt { font-size: 0.68rem; color: var(--hdm-text-dim); line-height: 1.4; }

/* ── Bronfenbrenner Konfigurator ───────────────────────────── */
.hdm-bronf-configurator { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }

/* Diagram */
.hdm-bronf-diagram-wrap { flex-shrink: 0; }
.hdm-bronf-svg-wrap { position: relative; width: 290px; height: 290px; }
.hdm-bronf-ring {
  position: absolute; border-radius: 50%; border: 2px solid;
  top: 50%; left: 50%; transform: translate(-50%,-50%);
  transition: opacity .45s ease;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 6px;
}
.hdm-bronf-ring-label { font-size: 0.6rem; font-weight: 700; text-align: center; line-height: 1.1; }
.hdm-bronf-ring-badge {
  font-size: 0.55rem; color: rgba(255,255,255,.6);
  background: rgba(0,0,0,.3); border-radius: 20px; padding: 0 5px;
  margin-top: 2px;
}
.hdm-bronf-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  font-size: 1.6rem; text-align: center; z-index: 10;
}

/* Controls */
.hdm-bronf-controls { flex: 1; min-width: 210px; }
.hdm-bronf-system-group { margin-bottom: 12px; }
.hdm-bronf-sys-label {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .04em; margin-bottom: 6px; display: flex; align-items: center; gap: 6px;
}
.hdm-bronf-sys-dot   { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.hdm-bronf-sys-count { font-size: 0.63rem; color: var(--hdm-text-dim); margin-left: auto; }
.hdm-bronf-toggle-row { display: flex; align-items: center; gap: 7px; margin-bottom: 4px; }

.hdm-bronf-toggle {
  position: relative; width: 28px; height: 15px;
  background: var(--hdm-border); border-radius: 8px; cursor: pointer;
  transition: background .18s; flex-shrink: 0; border: none;
}
.hdm-bronf-toggle.on { background: var(--toggle-color, var(--hdm-accent)); }
.hdm-bronf-toggle::after {
  content: ''; position: absolute; width: 11px; height: 11px;
  background: white; border-radius: 50%; top: 2px; left: 2px; transition: left .18s;
}
.hdm-bronf-toggle.on::after { left: 15px; }
.hdm-bronf-toggle-label {
  font-size: 0.72rem; color: var(--hdm-text-mute);
  transition: opacity .2s, text-decoration .2s;
}
.hdm-bronf-toggle-label.off {
  opacity: 0.3;
  text-decoration: line-through;
}

.hdm-bronf-score {
  background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-radius-sm); padding: 9px 13px; margin-top: 8px; font-size: 0.73rem; color: var(--hdm-text-mute);
}
.hdm-bronf-score-val { font-size: 1.2rem; font-weight: 700; color: var(--hdm-accent); display: block; margin-top: 2px; }

/* ── Karten-Übersicht ──────────────────────────────────────── */
.hdm-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; padding: 22px 24px; }
.hdm-card-tile {
  background: var(--hdm-surface); border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-radius); padding: 16px; cursor: pointer;
  transition: all .2s; border-top: 4px solid var(--stage-color, var(--hdm-accent));
}
.hdm-card-tile:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(0,0,0,.4); background: var(--hdm-surface2); }
.hdm-card-icon  { font-size: 2rem; margin-bottom: 9px; display: block; }
.hdm-card-label { font-family: var(--hdm-font-s); font-size: 1rem; font-weight: 700; color: var(--hdm-accent2); margin-bottom: 2px; }
.hdm-card-alter { font-size: 0.73rem; color: var(--hdm-text-dim); margin-bottom: 9px; }
.hdm-card-tags  { display: flex; flex-wrap: wrap; gap: 3px; }
.hdm-card-tag   { font-size: 0.63rem; padding: 2px 7px; background: var(--hdm-surface2); border: 1px solid var(--hdm-border); border-radius: 20px; color: var(--hdm-text-mute); }

/* ── Legende ───────────────────────────────────────────────── */
.hdm-legend { background: var(--hdm-surface); border-top: 1px solid var(--hdm-border); padding: 14px 24px; }
.hdm-legend-title { font-family: var(--hdm-font-s); font-size: 0.7rem; font-weight: 600; color: var(--hdm-gold); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 9px; }
.hdm-legend-grid  { display: flex; flex-wrap: wrap; gap: 7px; }
.hdm-legend-item  {
  display: flex; align-items: center; gap: 5px;
  background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  border-radius: 20px; padding: 3px 10px; cursor: pointer; transition: all .15s;
}
.hdm-legend-item:hover { border-color: var(--theory-color, var(--hdm-accent)); }
.hdm-legend-dot   { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.hdm-legend-text strong { font-size: 0.7rem; color: var(--hdm-text); display: block; }
.hdm-legend-text span   { font-size: 0.61rem; color: var(--hdm-text-dim); }

/* ── Inline Pages (Vergleich / Fallbeispiele) ──────────────── */
.hdm-page-header {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 24px; background: var(--hdm-surface); border-bottom: 1px solid var(--hdm-border);
}
.hdm-back-btn {
  background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  color: var(--hdm-text-mute); padding: 6px 12px; border-radius: 20px;
  cursor: pointer; font-size: 0.75rem; font-family: var(--hdm-font-b);
  transition: all .15s; white-space: nowrap;
}
.hdm-back-btn:hover { border-color: var(--hdm-accent); color: var(--hdm-accent2); }
.hdm-page-title {
  font-family: var(--hdm-font-s); font-size: 1.2rem; font-weight: 700; color: var(--hdm-accent2);
}
.hdm-page-body { padding: 24px; }

/* ── Vergleich ─────────────────────────────────────────────── */
.hdm-compare-selectors { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; align-items: center; }
.hdm-compare-select {
  flex: 1; background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  color: var(--hdm-text); padding: 8px 11px; border-radius: var(--hdm-radius-sm);
  font-family: var(--hdm-font-b); font-size: 0.8rem; cursor: pointer; min-width: 180px;
}
.hdm-compare-vs { color: var(--hdm-text-dim); font-size: 1rem; }
.hdm-compare-table { width: 100%; border-collapse: collapse; font-size: 0.76rem; }
.hdm-compare-table th, .hdm-compare-table td { padding: 8px 11px; text-align: left; border: 1px solid var(--hdm-border); vertical-align: top; }
.hdm-compare-table th  { background: var(--hdm-surface2); color: var(--hdm-gold); font-weight: 700; font-size: 0.69rem; text-transform: uppercase; letter-spacing: .04em; }
.hdm-compare-table tr:nth-child(even) td { background: rgba(255,255,255,.02); }
.hdm-compare-stage { color: var(--hdm-text-dim); font-weight: 600; }
.hdm-col-a { color: #a8d5ff; }
.hdm-col-b { color: #d5a8ff; }
.hdm-compare-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.hdm-compare-info-card {
  background: var(--hdm-surface2); border-radius: var(--hdm-radius-sm); padding: 12px;
  border: 1px solid; border-top: 3px solid;
}

/* ── Fallbeispiele ─────────────────────────────────────────── */
.hdm-cases-tabs { display: flex; gap: 5px; margin-bottom: 18px; flex-wrap: wrap; }
.hdm-case-tab {
  flex: 1; min-width: 120px; padding: 10px 8px;
  background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-radius-sm); cursor: pointer; text-align: center;
  font-family: var(--hdm-font-b); font-size: 0.78rem; color: var(--hdm-text-mute);
  transition: all .15s; border-top: 3px solid transparent;
}
.hdm-case-tab:hover, .hdm-case-tab.active { color: var(--hdm-text); }
.hdm-case-panel  { display: none; }
.hdm-case-panel.active { display: block; animation: hdm-fadein .25s ease; }
.hdm-case-header {
  display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px;
  padding: 14px; background: var(--hdm-surface2); border-radius: var(--hdm-radius-sm); border: 1px solid var(--hdm-border);
}
.hdm-case-icon    { font-size: 2.2rem; }
.hdm-case-name    { font-family: var(--hdm-font-s); font-size: 1.2rem; font-weight: 700; color: var(--hdm-accent2); }
.hdm-case-stil    { font-size: 0.75rem; font-weight: 700; padding: 2px 9px; border-radius: 20px; border: 1px solid; display: inline-block; margin: 3px 0; }
.hdm-case-profil  { font-size: 0.78rem; color: var(--hdm-text-mute); line-height: 1.5; margin-top: 3px; }
.hdm-case-timeline { display: flex; flex-direction: column; gap: 7px; }
.hdm-case-phase {
  background: var(--hdm-surface2); border: 1px solid var(--hdm-border);
  border-radius: var(--hdm-radius-sm); padding: 11px 13px;
  display: grid; grid-template-columns: 110px 1fr; gap: 10px; align-items: start;
}
.hdm-case-phase-label { font-size: 0.7rem; font-weight: 700; color: var(--hdm-text-mute); line-height: 1.4; }
.hdm-case-phase-text  { font-size: 0.76rem; color: var(--hdm-text-mute); line-height: 1.55; }
.hdm-case-outcome {
  margin-top: 12px; padding: 13px; border-radius: var(--hdm-radius-sm); border: 1px solid;
}
.hdm-case-outcome-title { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.hdm-case-outcome-text  { font-size: 0.76rem; line-height: 1.5; }
.hdm-case-key {
  margin-top: 8px; padding: 11px 13px; background: rgba(201,168,76,.08);
  border: 1px solid var(--hdm-gold-mute); border-radius: var(--hdm-radius-sm);
  font-size: 0.74rem; color: var(--hdm-text-mute); line-height: 1.55;
}

/* ── Glossar – "?" Indikator ───────────────────────────────── */
.hdm-g-q {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--hdm-accent); color: #0d1f10;
  font-size: 0.6rem; font-weight: 900; font-style: normal;
  cursor: help; margin-left: 2px; vertical-align: super;
  transition: background .15s; line-height: 1;
}
.hdm-g-q:hover { background: var(--hdm-accent2); }

.hdm-glossar-tooltip {
  position: fixed; z-index: 9999; max-width: 300px;
  background: #0d1f10; border: 1px solid var(--hdm-accent);
  border-radius: var(--hdm-radius-sm); padding: 11px 13px;
  pointer-events: none; opacity: 0; transition: opacity .15s;
  box-shadow: 0 8px 28px rgba(0,0,0,.6);
}
.hdm-glossar-tooltip.visible { opacity: 1; }
.hdm-glossar-term { font-size: 0.76rem; font-weight: 700; color: var(--hdm-accent); margin-bottom: 4px; }
.hdm-glossar-def  { font-size: 0.71rem; color: var(--hdm-text-mute); line-height: 1.5; }

/* ── Section Titles ────────────────────────────────────────── */
.hdm-section-title {
  font-family: var(--hdm-font-s); font-size: 0.78rem; font-weight: 700;
  color: var(--hdm-gold); letter-spacing: .04em; text-transform: uppercase;
  margin-bottom: 11px; display: flex; align-items: center; gap: 7px;
}
.hdm-section-title::after { content: ''; flex: 1; height: 1px; background: var(--hdm-border); }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 780px) {
  .hdm-theories-grid { grid-template-columns: 1fr; }
  .hdm-risiko-foerder-grid, .hdm-stil-grid { grid-template-columns: 1fr; }
  .hdm-header { padding: 12px 14px; }
  .hdm-main   { padding: 10px 14px 18px; }
  .hdm-timeline-wrapper { padding: 8px 14px 5px; }
  .hdm-filter-bar { padding: 7px 14px; }
  .hdm-legend { padding: 12px 14px; }
  .hdm-page-body { padding: 14px; }
  .hdm-tabs { grid-template-columns: repeat(3, 1fr); }
  .hdm-bronf-configurator { flex-direction: column; }
  .hdm-bronf-svg-wrap { width: 230px; height: 230px; }
  .hdm-compare-info-grid { grid-template-columns: 1fr; }
  .hdm-case-phase { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .hdm-tabs { grid-template-columns: repeat(2, 1fr); }
  .hdm-compare-selectors { flex-direction: column; }
}

/* ── Print ─────────────────────────────────────────────────── */
@media print {
  .hdm-header-actions, .hdm-filter-bar, .hdm-sidebar,
  .hdm-timeline-wrapper, .hdm-legend, .hdm-tabs { display: none !important; }
  .hdm-wrapper { border: none; box-shadow: none; }
  .hdm-detail-content { overflow: visible; }
  .hdm-tab-panel { display: block !important; margin-bottom: 18px; }
}
