/* ─── node.energy Design System ─────────────────────────────────────────── */
:root {
  --primary:        #17A697;
  --primary-dark:   #0F3A47;
  --primary-light:  #E5F6F5;
  --primary-mid:    #c8eceb;
  --accent:         #F5A623;
  --text:           #1a2e35;
  --text-muted:     #6b8189;
  --bg:             #f4f8f9;
  --white:          #ffffff;
  --border:         #d8e6e9;
  --shadow-sm:      0 2px 8px rgba(15,58,71,.07);
  --shadow-md:      0 4px 20px rgba(15,58,71,.10);
  --radius:         12px;
  --radius-sm:      8px;
  --transition:     .18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
.header {
  background: var(--primary-dark);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
}
.header-logo svg { flex-shrink: 0; }
.header-logo-img { height: 22px; width: auto; flex-shrink: 0; }
.header-logo-text {
  color: var(--white);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
}
.header-logo-sub {
  color: rgba(255,255,255,.55);
  font-size: .75rem;
  font-weight: 400;
  display: block;
  line-height: 1.1;
  margin-top: 1px;
}
.header-badge {
  background: var(--primary);
  color: var(--white);
  font-size: .7rem;
  font-weight: 600;
  padding: .25rem .65rem;
  border-radius: 100px;
  letter-spacing: .03em;
}

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, #1a5068 100%);
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(23,166,151,.15);
  top: -100px; right: -80px;
}
.hero-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.02em;
  position: relative;
}
.hero-sub {
  color: rgba(255,255,255,.65);
  margin-top: .4rem;
  font-size: .9rem;
  position: relative;
}

/* ─── Alert Banner ───────────────────────────────────────────────────────── */
.alert {
  margin: 1rem 2rem 0;
  padding: .8rem 1.2rem;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.alert-warning {
  background: #fff8e6;
  border: 1px solid #f5c842;
  color: #7a5c00;
}
.alert-error {
  background: #fff0f0;
  border: 1px solid #f5a0a0;
  color: #8a0000;
}

/* ─── Layout ─────────────────────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

/* ─── Sections / Cards ───────────────────────────────────────────────────── */
.section-title {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  border: 1px solid var(--border);
}
.card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.card-title-icon {
  width: 28px; height: 28px;
  background: var(--primary-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1rem;
}

/* ─── Form Grid ──────────────────────────────────────────────────────────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.form-grid-2 { grid-template-columns: repeat(2, 1fr); }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.span-2 { grid-column: span 2; }

.field {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.field label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
}
.field label .required {
  color: var(--primary);
  margin-left: .2rem;
}

input[type="text"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: .55rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(23,166,151,.12);
}
select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b8189' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .75rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}
input[type="number"] { -moz-appearance: textfield; }
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; }

.input-suffix {
  position: relative;
}
.input-suffix input { padding-right: 3rem; }
.input-suffix .suffix {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .78rem;
  color: var(--text-muted);
  pointer-events: none;
}

/* ─── Toggle (ja/nein) ───────────────────────────────────────────────────── */
.toggle-group {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.toggle-group input[type="radio"] { display: none; }
.toggle-group label {
  padding: .4rem .9rem;
  border-radius: 100px;
  border: 1.5px solid var(--border);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  color: var(--text-muted);
  transition: all var(--transition);
}
.toggle-group input[type="radio"]:checked + label {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* ─── Module Toggle (expand) ─────────────────────────────────────────────── */
.module-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.2rem;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: .75rem;
  user-select: none;
}
.module-toggle:hover { border-color: var(--primary); }
.module-toggle.active { border-color: var(--primary); background: var(--primary-light); }
.module-toggle-label {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-weight: 600;
  font-size: .9rem;
}
.module-toggle-icon { font-size: 1.2rem; }
.module-toggle-badge {
  font-size: .7rem;
  padding: .2rem .5rem;
  border-radius: 100px;
  font-weight: 600;
}
.badge-inactive { background: var(--bg); color: var(--text-muted); }
.badge-active   { background: var(--primary); color: var(--white); }
.toggle-chevron {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition);
  flex-shrink: 0;
}
.module-toggle.active .toggle-chevron { transform: rotate(180deg); background: var(--primary); color: white; }

.module-content {
  display: none;
  margin-top: -.5rem;
  margin-bottom: 1.25rem;
}
.module-content.visible { display: block; }

/* ─── Submit Button ──────────────────────────────────────────────────────── */
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: .85rem 2.5rem;
  border-radius: 100px;
  font-size: .95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  box-shadow: 0 4px 14px rgba(23,166,151,.35);
}
.btn-primary:hover:not(:disabled) {
  background: #13908a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(23,166,151,.4);
}
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: .75rem 2rem;
  border-radius: 100px;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  gap: .5rem;
}
.btn-secondary:hover { background: var(--primary-light); }

.form-actions {
  display: flex;
  justify-content: center;
  padding: 1.5rem 0;
}

/* ─── Loading ────────────────────────────────────────────────────────────── */
#loading {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,58,71,.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1.2rem;
}
#loading.visible { display: flex; }
.spinner {
  width: 48px; height: 48px;
  border: 4px solid rgba(255,255,255,.2);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  color: var(--white);
  font-weight: 600;
  font-size: .95rem;
}
.loading-sub {
  color: rgba(255,255,255,.6);
  font-size: .8rem;
}

/* ─── Results ────────────────────────────────────────────────────────────── */
#results { display: none; }
#results.visible { display: block; }

.results-header {
  background: var(--primary-dark);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.results-header h2 {
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
}
.results-header p {
  color: rgba(255,255,255,.6);
  font-size: .82rem;
  margin-top: .2rem;
}

/* ─── KPI Cards ──────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.kpi-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.kpi-card:hover { box-shadow: var(--shadow-md); }
.kpi-card.highlight {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}
.kpi-card.highlight .kpi-label { color: rgba(255,255,255,.6); }
.kpi-card.highlight .kpi-value { color: var(--white); }
.kpi-card.accent-green .kpi-value { color: var(--primary); }
.kpi-label {
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: .4rem;
  line-height: 1.3;
}
.kpi-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.03em;
  line-height: 1.1;
}
.kpi-suffix {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-left: .15rem;
}
.kpi-badge {
  display: inline-block;
  font-size: .7rem;
  padding: .15rem .5rem;
  border-radius: 100px;
  margin-top: .4rem;
  font-weight: 600;
}
.badge-good { background: #e6f7f0; color: #0a7a47; }
.badge-warn { background: #fff8e6; color: #7a5c00; }

/* ─── Charts ─────────────────────────────────────────────────────────────── */
.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}
.chart-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.chart-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 1rem;
}
.chart-wrap { position: relative; height: 260px; }

/* ─── Detail Table ───────────────────────────────────────────────────────── */
.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}
.detail-table th {
  background: var(--bg);
  padding: .65rem 1rem;
  text-align: left;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.detail-table td {
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--bg);
  color: var(--text);
}
.detail-table tr:last-child td { border-bottom: none; }
.detail-table .value-cell {
  text-align: right;
  font-weight: 600;
  color: var(--primary-dark);
  font-variant-numeric: tabular-nums;
}
.detail-table .section-row td {
  background: var(--primary-light);
  font-weight: 700;
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--primary);
  padding: .5rem 1rem;
}

/* ─── File Upload ────────────────────────────────────────────────────────── */
.upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 1.2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg);
}
.upload-area:hover { border-color: var(--primary); background: var(--primary-light); }
.upload-area.has-file { border-color: var(--primary); background: var(--primary-light); }
.upload-area.upload-error { border-color: #e53e3e; background: #fff5f5; animation: shake .3s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.upload-slot label .required { color: #e53e3e; }
.upload-area input { display: none; }
.upload-area .upload-label { font-size: .8rem; color: var(--text-muted); cursor: pointer; }
.upload-area .upload-label strong { color: var(--primary); }
.upload-area .file-info { font-size: .8rem; color: var(--primary); font-weight: 600; margin-top: .3rem; }

/* Template download link next to label */
.template-link {
  font-size: .72rem;
  font-weight: 500;
  color: var(--primary);
  text-decoration: none;
  float: right;
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: .5rem;
}
.template-link:hover { background: var(--primary-light); }

/* ─── Error state ────────────────────────────────────────────────────────── */
.error-card {
  background: #fff0f0;
  border: 1px solid #fca0a0;
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
}
.error-card h3 { color: #8a0000; margin-bottom: .5rem; }
.error-card p  { color: #5a1010; font-size: .85rem; }

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .form-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .form-grid-2 { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 1; }
  .charts-grid { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: 1.3rem; }
  .container { padding: 1rem 1rem 3rem; }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   TRANSPARENZ-BLÖCKE
═══════════════════════════════════════════════════════════════════════════ */
.transp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.75rem 0 .6rem;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.transp-hint { font-weight: 400; font-size: .75rem; }

#transp-container { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 2rem; }

.transp-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
  transition: box-shadow .2s;
}
.transp-block:hover { box-shadow: 0 2px 10px rgba(0,0,0,.07); }

.transp-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.1rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
}
.transp-toggle:hover { background: var(--bg); }
.transp-icon  { font-size: 1.1rem; flex-shrink: 0; }
.transp-title { font-weight: 600; font-size: .9rem; flex: 1; }
.transp-chevron {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0;
}

/* Body animiert hoch */
.transp-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s cubic-bezier(.4,0,.2,1);
  border-top: 0px solid var(--border);
}
.transp-open .transp-body {
  border-top: 1px solid var(--border);
}

/* Rechenweg-Tabelle */
.transp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}
.transp-table td { padding: .42rem .9rem; vertical-align: top; }
.transp-table .tr-main td { font-weight: 500; color: var(--text); }
.transp-table .tr-sub  td { color: var(--text-muted); padding-left: 1.6rem; }
.transp-table .tr-section td {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  background: var(--bg);
  padding: .55rem .9rem .3rem;
  border-top: 1px solid var(--border);
}
.transp-table tr:first-child .tr-section td { border-top: none; }
.transp-table .tr-main:hover td,
.transp-table .tr-sub:hover  td { background: rgba(24,108,192,.04); }
.transp-table .tr-val {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.tr-formula {
  font-size: .72rem;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: .15rem;
  white-space: normal;
  text-align: right;
  line-height: 1.4;
}
.tr-tag {
  display: inline-block;
  font-size: .68rem;
  background: #e8f5e9;
  color: #1a6e44;
  border-radius: 4px;
  padding: .1rem .35rem;
  font-weight: 600;
  margin-left: .25rem;
}

/* ── Szenarien-Leiste ────────────────────────────────────────────────────── */
.szenarien-bar {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: .65rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.sz-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.sz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  flex: 1;
}
.sz-actions {
  display: flex;
  gap: .4rem;
  margin-left: auto;
}

/* Chips */
.szenario-chip {
  display: flex;
  align-items: center;
  gap: .3rem;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: .25rem .55rem .25rem .75rem;
  background: #f8fafc;
  font-size: .82rem;
  transition: border-color .15s, background .15s;
  cursor: default;
}
.szenario-chip.active {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary-dark);
  font-weight: 600;
}
.chip-name {
  cursor: pointer;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.chip-rename, .chip-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0 .1rem;
  font-size: .75rem;
  opacity: .5;
  line-height: 1;
  transition: opacity .15s;
}
.chip-rename:hover, .chip-delete:hover { opacity: 1; }
.chip-delete { font-size: .9rem; font-weight: 700; color: #e53e3e; }
.chip-rename-input {
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: .1rem .3rem;
  font-size: .82rem;
  width: 130px;
  outline: none;
}

/* Buttons in Leiste */
.btn-sz-new, .btn-sz-compare {
  font-size: .8rem;
  font-weight: 600;
  padding: .3rem .75rem;
  border-radius: 20px;
  border: 1.5px solid var(--primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.btn-sz-new {
  background: var(--primary);
  color: white;
}
.btn-sz-new:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-sz-compare {
  background: white;
  color: var(--primary);
}
.btn-sz-compare:hover { background: var(--primary-light); }

/* ── Szenario-Name-Feld (im Formular) ───────────────────────────────────── */
.szenario-name-field {
  border: 1.5px solid var(--primary-light);
  border-radius: 10px;
  padding: .85rem 1rem;
  background: var(--primary-light);
  margin-bottom: .5rem;
}
.szenario-name-field label {
  font-weight: 600;
  color: var(--primary-dark);
  font-size: .85rem;
  margin-bottom: .35rem;
}
.szenario-name-field input {
  border: 1.5px solid var(--primary);
  background: white;
  font-weight: 600;
}
.szenario-name-field input:focus { border-color: var(--primary-dark); }
.field-hint {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .3rem;
  display: block;
}

/* ── Vergleichs-Panel ───────────────────────────────────────────────────── */
.vergleich-panel {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.vp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .85rem 1.25rem;
  background: var(--primary-dark);
  color: white;
  font-weight: 700;
  font-size: .95rem;
}
.btn-sz-close {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: white;
  border-radius: 6px;
  padding: .2rem .6rem;
  cursor: pointer;
  font-size: .82rem;
  transition: background .15s;
}
.btn-sz-close:hover { background: rgba(255,255,255,.25); }
.vp-scroll { overflow-x: auto; }
.vp-empty { padding: 1.25rem; color: var(--text-muted); font-size: .9rem; }

/* Vergleichs-Tabelle */
.vergleich-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.vergleich-table th,
.vergleich-table td {
  padding: .55rem .9rem;
  text-align: right;
  border-bottom: 1px solid #f0f4f6;
  white-space: nowrap;
}
.vergleich-table thead th {
  background: #f8fafc;
  font-weight: 700;
  font-size: .82rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.vergleich-table th.vt-active {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.vergleich-table .vt-label {
  text-align: left;
  font-weight: 600;
  color: var(--text);
  background: #fafbfc;
  position: sticky;
  left: 0;
}
.vergleich-table tbody tr:hover { background: #f8fafc; }
.vt-best  { background: #f0fff4; color: #276749; font-weight: 700; }
.vt-worst { background: #fff5f5; color: #c53030; }

/* ── PDF-Export / Druck ──────────────────────────────────────────────────── */
.results-header-actions {
  display: flex;
  gap: .6rem;
  align-items: center;
}

/* ─── Light-Version: Disabled Fields ────────────────────────────────────── */
input:disabled,
select:disabled {
  background: #f0f4f5;
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.75;
  border-color: var(--border);
}
select:disabled {
  background-image: none;
}
input[type="radio"]:disabled + label {
  cursor: not-allowed;
  opacity: 0.55;
  pointer-events: none;
}
input[type="radio"]:disabled:checked + label {
  background: var(--text-muted);
  border-color: var(--text-muted);
}
.module-toggle.module-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.transp-block.disabled-accordion {
  opacity: 0.45;
  cursor: not-allowed;
  overflow: visible;
}
.transp-block.disabled-accordion .transp-toggle {
  pointer-events: none;
}

/* Tooltip on disabled/locked elements */
.field:has(input:disabled),
.field:has(select:disabled),
.field:has(input[type="radio"]:disabled),
.module-toggle.module-disabled,
.transp-block.disabled-accordion {
  position: relative;
}
.field:has(input:disabled):hover::after,
.field:has(select:disabled):hover::after,
.field:has(input[type="radio"]:disabled):hover::after {
  content: "in der kostenlosen Version nicht anpassbar";
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,58,71,.92);
  color: #fff;
  font-size: .72rem;
  font-weight: 500;
  padding: .35rem .7rem;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
}
.module-toggle.module-disabled:hover::after,
.transp-block.disabled-accordion:hover::after {
  content: "in der kostenlosen Version nicht verfügbar";
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15,58,71,.92);
  color: #fff;
  font-size: .72rem;
  font-weight: 500;
  padding: .35rem .7rem;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 20;
  pointer-events: none;
}
.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ─── Hero Footnote ──────────────────────────────────────────────────────── */
.hero-footnote {
  color: rgba(255,255,255,.45);
  font-size: .72rem;
  margin-top: .9rem;
  position: relative;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}
.hero-footnote a {
  color: var(--primary);
  text-decoration: underline;
}
.hero-footnote a:hover {
  color: #1fcfbf;
}

/* ─── CTA Footer ─────────────────────────────────────────────────────────── */
.cta-footer {
  background: var(--primary-dark);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  margin-top: 2.5rem;
  text-align: center;
}
.cta-footer p {
  color: rgba(255,255,255,.85);
  font-size: .95rem;
  line-height: 1.75;
  max-width: 680px;
  margin: 0 auto 1.5rem;
}
.cta-footer .btn-cta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--primary);
  color: var(--white);
  border: none;
  padding: .85rem 2.5rem;
  border-radius: 100px;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 4px 14px rgba(23,166,151,.35);
}
.cta-footer .btn-cta:hover {
  background: #13908a;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(23,166,151,.4);
}

@media print {
  /* Nur Ergebnisinhalt drucken */
  .header, .hero, .szenarien-bar, .vergleich-panel,
  #form-view, .results-header-actions, .loading,
  .transp-hint, .transp-chevron { display: none !important; }

  /* Seitenlayout */
  body { background: white !important; font-size: 11pt; }
  .container { max-width: 100% !important; padding: 0 !important; }
  #results { display: block !important; }
  .results-header { margin-bottom: 12pt; }

  /* Cards ohne Schatten */
  .card, .kpi-card, .chart-card, .transp-block {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
    break-inside: avoid;
  }
  .kpi-grid    { break-inside: avoid; }
  .charts-grid { break-inside: avoid; }

  /* Accordions aufgeklappt zeigen */
  .transp-body { max-height: none !important; overflow: visible !important; }
  .transp-header { break-before: page; }

  /* Chart: Canvas verstecken, img-Kopie anzeigen */
  .print-hidden { display: none !important; }
  .print-chart-img { width: 100%; display: block; }

  /* Drucktitel */
  .results-header h2::after {
    content: ' – node.energy';
    font-weight: 400;
    color: #666;
  }
}
