:root {
  --orange:       #ef7300;
  --orange-dark:  #c45f00;
  --orange-light: #fdf3e7;
  --green:        #27a047;
  --black:        #1a1a1a;
  --dark:         #4b4948;
  --gray:         #7a7877;
  --light:        #f4f4f4;
  --rule:         #e0e0e0;
  --white:        #ffffff;
  --shadow:       0 6px 28px rgba(20, 30, 40, 0.07), 0 1px 2px rgba(20, 30, 40, 0.05);
  --shadow-sm:    0 2px 10px rgba(20, 30, 40, 0.06);
  --radius:       16px;   /* Karten */
  --radius-sm:    10px;   /* Eingaben, Buttons, Kacheln */
}

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

html {
  scrollbar-gutter: stable;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}
/* Mobil: kein grauer Tipp-Blitz, kein Doppeltipp-Zoom auf Bedienelementen
   (touch-action: manipulation laesst Scrollen/Pinch auf der Seite zu). */
button, a, label, input, textarea, .choice, .roof-panel {
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

body {
  margin: 0;
  background: var(--light);
  background-image:
    radial-gradient(1200px 500px at 50% -120px, color-mix(in srgb, var(--orange) 14%, transparent), transparent 70%),
    linear-gradient(180deg, #f7f7f7 0%, #f1f2f1 100%);
  background-attachment: fixed;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", sans-serif;
  color: var(--black);
  font-size: 16px;
  line-height: 1.5;
}
@media (hover: none), (max-width: 860px) {
  body { background-attachment: scroll; }
}

.progress-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--rule);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.progress-wrap[hidden] { display: none; }
.progress-track {
  flex: 1;
  height: 6px;
  background: var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--orange);
  border-radius: 2px;
  transition: width 0.35s ease;
  width: 0%;
}
.progress-label { font-size: 12px; color: var(--gray); white-space: nowrap; }
@media (max-width: 480px) {
  .progress-wrap { flex-direction: column-reverse; align-items: stretch; gap: 6px; padding: 8px 16px 10px; }
  .progress-label { white-space: normal; }
}

.wizard {
  min-height: calc(100vh - 45px);
  min-height: calc(100dvh - 45px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 36px 16px 72px;
}
.is-embedded .wizard { min-height: 0; }
.is-embedded body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.is-embedded .wizard { flex: 1 0 auto; }
.is-embedded .page-footer { flex: 0 0 auto; }

.step { display: none; width: 100%; max-width: 680px; }
.step.step-wide { max-width: 920px; }
.step.active { display: block; }

.step-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(24px, 5vw, 48px);
  box-shadow: var(--shadow);
}
.step-card.center { text-align: center; padding: 56px 40px; }
@media (max-width: 480px) {
  .wizard { padding: 20px 12px 56px; }
  .step-card, .intro-card { padding: 22px 18px; }
  .step-card.center { padding: 40px 18px; }
  /* Mieter-Hinweis: Icon ueber dem Text, sonst bleibt fuer den Text zu wenig Breite. */
  .info-banner { flex-direction: column; gap: 12px; padding: 18px 16px; }
  .info-banner > div { min-width: 0; }
}

.intro-card .tag {
  display: inline-block;
  background: var(--orange-light);
  color: var(--orange-dark);
  border: 1px solid color-mix(in srgb, var(--orange) 35%, transparent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 18px;
}
.intro-card h1 {
  margin: 0 0 14px;
  font-size: clamp(28px, 3.3vw, 38px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--black);
}
.intro-card .lead {
  color: var(--dark);
  font-size: 16.5px;
  max-width: 540px;
  margin: 0 0 22px;
}
.feature-list {
  list-style: none;
  padding: 0; margin: 0 0 32px;
  display: flex; flex-direction: column; gap: 10px;
}
.feature-list li {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px; color: var(--dark);
}
.tick {
  width: 22px; height: 22px; border-radius: 50%;
  background: color-mix(in srgb, var(--green) 14%, white); color: var(--green); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.contact-line { margin: 16px 0 0; font-size: 14px; color: var(--gray); }
.contact-line a { color: var(--orange); font-weight: 700; text-decoration: none; }
.contact-line a:hover { text-decoration: underline; }

.step-card h2 { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: var(--black); }
.step-hint    { margin: 0 0 22px; color: var(--gray); font-size: 14px; }

.addr-grid {
  display: grid;
  /* Feste Mindestbreiten, damit auch lange Beschriftungen (hr: "Poštanski broj")
     einzeilig bleiben; align-items:end haelt die Eingabefelder auf einer Linie,
     falls ein Label doch einmal umbricht. */
  grid-template-columns: minmax(0, 2fr) minmax(72px, 0.6fr) minmax(130px, 0.9fr) minmax(0, 1.4fr);
  gap: 12px;
  align-items: end;
  margin-bottom: 8px;
}
.addr-grid .field > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.addr-hint { margin: 0 0 24px; font-size: 12px; color: var(--gray); }
/* Abdeckungshinweis (geo.coverage_areas): direkt unter dem Vervollständigungs-Hinweis */
.addr-hint + .addr-coverage { margin-top: -14px; }
.addr-coverage {
  display: flex; align-items: flex-start; gap: 8px;
  margin: 0 0 24px; padding: 10px 12px;
  font-size: 13px; line-height: 1.45; color: var(--dark);
  background: var(--orange-light); border-radius: var(--radius-sm);
}
.addr-coverage svg { flex: 0 0 auto; margin-top: 2px; color: var(--orange-dark); }
.addr-coverage[hidden] { display: none; }
.field { display: block; position: relative; }

.ac-dropdown {
  position: absolute;
  top: calc(100% + 4px); left: 0; right: 0;
  z-index: 50;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  /* Mobil mit offener Tastatur bleibt wenig Platz: Liste nicht hoeher als
     der halbe sichtbare Bereich. */
  max-height: min(280px, 45vh);
  overflow-y: auto;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}
.ac-dropdown[hidden] { display: none; }
.ac-item {
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--rule);
}
.ac-item:last-child { border-bottom: 0; }
.ac-item.active { background: var(--orange-light); }
@media (hover: hover) { .ac-item:hover { background: var(--orange-light); } }
.ac-main { font-size: 14px; font-weight: 600; color: var(--black); line-height: 1.3; }
.ac-sub  { font-size: 12px; color: var(--gray); margin-top: 2px; }
.ac-empty { padding: 12px 14px; font-size: 13px; color: var(--gray); }
.ac-attrib {
  padding: 5px 14px 7px;
  font-size: 11px;
  line-height: 1.2;
  color: var(--gray);
  text-align: right;
  white-space: nowrap;
  border-top: 1px solid var(--rule, #e6e6e6);
  background: #fafafa;
}
.field > span {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--dark); margin-bottom: 6px;
}
/* Ein Feld-Look fuer alle Eingaben (Text, E-Mail, Telefon, Kommentar):
   gleiche Kante, gleicher Rahmen, gleicher Platzhalter. */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  border: 1px solid var(--rule);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--black);
  font: inherit; font-size: 16px;
  outline: none;
  transition: border-color 0.15s;
  /* iOS: eigene Rahmen/Radien statt System-Optik; 16px, sonst zoomt Safari beim Fokus hinein. */
  -webkit-appearance: none;
  appearance: none;
}
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"] {
  height: 48px;
  padding: 0 14px;
}
textarea {
  /* block statt inline-block: sonst bleibt unter dem Feld eine
     Baseline-Luecke, an der sich absolut positionierte Kinder verrechnen. */
  display: block;
  padding: 12px 14px;
}
input::placeholder,
textarea::placeholder {
  /* opacity: 1 — Firefox dimmt den Platzhalter sonst zusaetzlich ab. */
  color: var(--gray);
  opacity: 1;
}
input:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 18%, transparent);
}

.choice-grid { display: grid; gap: 12px; margin-bottom: 24px; }
.choice-grid.four { grid-template-columns: repeat(4, 1fr); }
.choice-grid.two  { grid-template-columns: 1fr 1fr; }

.choice {
  display: flex; flex-direction: column; align-items: center;
  gap: 8px; padding: 20px 12px;
  border: 1.5px solid var(--rule);
  border-radius: 14px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, transform 0.15s, box-shadow 0.15s;
  text-align: center; font: inherit;
}
.choice.selected {
  border-color: var(--orange);
  background: var(--orange-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
@media (hover: hover) {
  .choice:hover {
    border-color: var(--orange);
    background: var(--orange-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
  }
  .choice:hover .choice-badge { background: var(--orange); color: var(--white); border-color: var(--orange); }
}
/* Touch: kurzes Eindruecken als Rueckmeldung statt Hover. */
@media (hover: none) {
  .choice:active, .persons-btn:active, .btn-primary:active, .btn-ghost:active, .roof-tool:active { transform: scale(0.98); transition-duration: 0.05s; }
}
.choice-wide {
  align-items: flex-start; text-align: left; padding: 20px;
}
.choice strong { font-size: 14px; color: var(--black); display: block; line-height: 1.3; }
.choice-sub    { font-size: 12px; color: var(--gray); display: block; margin-top: 4px; line-height: 1.4; }

.choice-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: var(--orange-light);
  border: 1.5px solid var(--rule);
  border-radius: 6px;
  font-size: 11px; font-weight: 800; color: var(--orange);
  letter-spacing: 0.03em;
  transition: background 0.15s, border-color 0.15s;
}
.choice.selected .choice-badge {
  background: var(--orange); color: var(--white); border-color: var(--orange);
}

.roof-preview {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--light);
  border: 1px solid var(--rule);
  border-radius: 12px;
  margin: 18px 0 18px;
  overflow: hidden;
}
.roof-preview img,
.confirm-map {
  width: 100%;
  height: 100%;
  display: block;
}
.roof-preview img {
  object-fit: cover;
}
.confirm-actions {
  margin-top: 0;
}

/* Die Demo verwendet dieselbe Dachansicht zur Bestätigung und Modulkorrektur. */
.roof-preview[hidden],
.roof-scene[hidden],
.address-analysis-progress[hidden],
#step-roof[hidden],
#roof-image-status[hidden],
#roof-selection-error[hidden],
.result-tick[hidden],
.contact-section[hidden] { display: none; }
.address-analysis-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0 18px;
  padding: 14px;
  color: var(--dark);
  background: var(--orange-light);
  font-size: 13px;
}
.analysis-spinner {
  flex: 0 0 24px;
  height: 24px;
  border: 2px solid var(--rule);
  border-top-color: var(--orange);
  border-radius: 50%;
  animation: spin 0.85s linear infinite;
}
.roof-optional { margin: 0 0 8px; font-size: 12px; color: var(--orange-dark); font-weight: 700; }
.roof-scene { position: relative; margin: 18px 0; border: 1px solid var(--rule); border-radius: 12px; overflow: hidden; background: #e6e9e6; }
.roof-viewport { width: 100%; aspect-ratio: 16 / 10; overflow: auto; overscroll-behavior: contain; touch-action: pan-x pan-y; }
.roof-canvas { width: 100%; height: 100%; position: relative; }
#roof-image, #roof-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
#roof-image { object-fit: contain; user-select: none; -webkit-user-drag: none; }
#roof-svg { overflow: visible; }
.roof-viewport.is-zoomed { cursor: grab; }
.roof-viewport.is-zoomed:active { cursor: grabbing; }
.roof-image-credit { position: absolute; right: 0; bottom: 0; padding: 2px 5px; font-size: 9px; color: #303630; background: rgba(255,255,255,.9); pointer-events: none; }
.roof-image-status { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; padding: 22px; text-align: center; color: var(--dark); background: var(--light); font-size: 14px; }
#roof-panels.is-hidden { visibility: hidden; }
.roof-scene:not(.image-ready) #roof-panels { visibility: hidden; }
.roof-panel { cursor: pointer; outline: none; }
.roof-panel polygon { fill: rgba(23, 95, 162, .20); stroke: #d9eeff; stroke-width: 1.5px; vector-effect: non-scaling-stroke; transition: fill .15s; }
@media (hover: hover) { .roof-panel:hover polygon { fill: rgba(63, 147, 220, .45); stroke: white; } }
.roof-panel:focus-visible polygon { stroke: #ffdc55; stroke-width: 3px; }
.roof-panel line { display: none; pointer-events: none; stroke: #ff7373; stroke-width: 2px; vector-effect: non-scaling-stroke; }
.roof-panel.is-excluded polygon { fill: rgba(158, 19, 28, .18); stroke: #ff7373; stroke-width: 2px; }
.roof-panel.is-excluded line { display: block; }
.roof-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.roof-zoom-controls { display: flex; align-items: center; gap: 8px; }
#roof-zoom-level { min-width: 48px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; color: var(--dark); }
.roof-tool { min-height: 44px; padding: 8px 12px; font: inherit; font-size: 13px; font-weight: 600; color: var(--dark); background: white; border: 1px solid var(--rule); border-radius: var(--radius-sm); cursor: pointer; }
@media (hover: hover) { .roof-tool:hover { border-color: var(--orange); } }
.roof-tool[aria-pressed="true"] { color: var(--orange-dark); border-color: var(--orange); background: var(--orange-light); }
.roof-tool:disabled, .roof-reset:disabled { opacity: .45; cursor: default; }
.roof-tool.roof-zoom { width: 44px; padding: 0; font-size: 22px; }
.roof-tool:focus-visible, .roof-reset:focus-visible, .roof-skip:focus-visible, .roof-viewport:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.roof-pan-hint { margin: 8px 0 16px; color: var(--gray); font-size: 12px; }
.roof-selection-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; background: var(--orange-light); border-radius: var(--radius-sm); }
#roof-remaining { display: block; color: var(--black); font-size: 17px; }
#roof-excluded-count { display: block; color: var(--dark); font-size: 12px; margin-top: 2px; }
.roof-reset { min-height: 44px; padding: 6px 0 6px 8px; border: 0; background: none; font: inherit; font-size: 12px; color: var(--dark); text-decoration: underline; cursor: pointer; }
.roof-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; color: var(--gray); font-size: 11px; margin: 12px 0 0; }
.roof-legend-panel { display: inline-flex; align-items: center; justify-content: center; width: 12px; height: 16px; border: 1.5px solid #397cb6; background: #dce8f2; }
.roof-legend-panel.excluded { margin-left: 10px; background: #fff2f2; border-color: #c23737; color: #c23737; line-height: 1; font-size: 15px; }
.roof-nav { justify-content: space-between; }
.roof-skip { display: block; width: 100%; padding: 14px 0 0; min-height: 44px; margin-top: 8px; border: 0; background: none; color: var(--gray); text-decoration: underline; text-underline-offset: 3px; font: inherit; font-size: 12px; cursor: pointer; }
.roof-skip:hover { color: var(--dark); }
#btn-confirm-yes:disabled { cursor: wait; opacity: .55; }
@media (max-width: 620px) {
  .roof-viewport { aspect-ratio: 1; }
  .roof-nav { gap: 8px; }
  .roof-nav .btn-primary { padding: 10px 16px; flex: 1; }
  .roof-nav .btn-ghost { padding: 10px 14px; }
  .roof-selection-summary { padding: 12px; }
  #roof-remaining { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .roof-panel polygon { transition: none; }
}

.persons-label { font-size: 14px; color: var(--dark); margin: 0 0 12px; }
.persons-grid  {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 24px;
}
.persons-btn {
  padding: 14px 8px; border: 1.5px solid var(--rule);
  border-radius: 12px;
  background: var(--white); cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 700;
  text-align: center; line-height: 1.4;
  transition: border-color 0.15s, background 0.15s;
}
.persons-btn span { font-weight: 400; color: var(--gray); font-size: 11px; }
.persons-btn.selected {
  border-color: var(--orange); background: var(--orange-light);
}
@media (hover: hover) {
  .persons-btn:hover { border-color: var(--orange); background: var(--orange-light); }
}

.mode-tabs {
  display: inline-flex; margin-bottom: 20px;
  border: 1px solid var(--rule); border-radius: 999px; overflow: hidden;
}
.mode-tab {
  padding: 9px 16px; border: 0; border-right: 1px solid var(--rule); line-height: 1.3;
  background: var(--white); font: inherit; font-size: 13px;
  cursor: pointer; color: var(--gray);
}
.mode-tab:last-child { border-right: 0; }
.mode-tab.active { background: var(--orange); color: var(--white); font-weight: 700; }

.kwh-row { display: flex; align-items: center; gap: 10px; }
.kwh-unit { font-size: 14px; color: var(--gray); }

.info-banner {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 24px; background: var(--orange-light);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius-sm);
}
.info-icon-wrap {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange); flex-shrink: 0; position: relative;
}
.info-icon-wrap::after {
  content: 'i';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 900; font-size: 15px;
}
.info-banner h3 { margin: 0 0 8px; font-size: 18px; color: var(--black); }
.info-banner p  { margin: 0; color: var(--dark); font-size: 14px; line-height: 1.5; }

.nav-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 24px; }
@media (max-width: 480px) {
  .nav-row:not(.roof-nav) { flex-direction: column-reverse; align-items: stretch; }
  .nav-row:not(.roof-nav) .btn-ghost:only-child { align-self: flex-start; }
}

.btn-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 28px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--orange) 88%, white), var(--orange));
  color: var(--white);
  font: inherit; font-size: 15px; font-weight: 700;
  border: 0; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--orange) 28%, transparent);
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  text-align: center; line-height: 1.25;
}
@media (hover: hover) {
  .btn-primary:hover { background: var(--orange-dark); transform: translateY(-1px); box-shadow: 0 8px 20px color-mix(in srgb, var(--orange) 34%, transparent); }
}
.btn-primary:disabled { opacity: 0.6; cursor: default; }
.btn-primary.loading  { cursor: wait; }
.btn-lg { min-height: 52px; font-size: 16px; }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 10px 20px;
  background: transparent; border: 1px solid var(--rule); border-radius: var(--radius-sm);
  color: var(--gray); font: inherit; font-size: 14px;
  cursor: pointer; transition: border-color 0.15s, color 0.15s;
}
@media (hover: hover) { .btn-ghost:hover { border-color: var(--dark); color: var(--dark); } }

.spinner {
  width: 48px; height: 48px; margin: 0 auto 28px;
  border: 3px solid var(--rule); border-top-color: var(--orange);
  border-radius: 50%;
  display: block;
  transform-origin: 50% 50%;
  animation: spin 0.85s linear infinite;
  -webkit-animation: spin 0.85s linear infinite;
  }
@keyframes spin { to { transform: rotate(360deg); } }
@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); } }

.gen-steps { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
.gen-step  { font-size: 15px; color: var(--rule); transition: color 0.4s; }
.gen-step.active { color: var(--dark); font-weight: 600; }
.gen-step.done   { color: var(--green); }
.gen-step.done::before { content: '\2713\00a0'; }

.result-head {
  display: flex; align-items: center; gap: 16px; margin-bottom: 24px;
}
.result-tick {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--green); flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.result-head h2 { margin: 0; font-size: 22px; }
.result-head p  { margin: 4px 0 0; color: var(--gray); font-size: 14px; }

.result-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.btn-download { flex: 1; min-width: 200px; }
.result-actions .btn-primary,
.result-actions .btn-ghost { gap: 9px; }   .btn-icon { flex-shrink: 0; }
.map-mode-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -8px 0 18px;
}
.mode-chip {
  appearance: none;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--dark);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  padding: 8px 11px;
  cursor: pointer;
}
.mode-chip.active {
  border-color: var(--orange);
  color: var(--orange);
  box-shadow: inset 0 -2px 0 var(--orange);
}
.mode-chip:disabled {
  cursor: wait;
  opacity: 0.65;
}

.pdf-preview {
  position: relative;
  width: 100%;
  background: var(--light);
  border: 1px solid var(--rule);
  margin-bottom: 28px;
  overflow: hidden;
}
.pdf-preview iframe {
  width: 100%;
  height: 820px;
  border: 0;
  display: block;
  background: var(--light);
}
@media (max-width: 700px) {
  .pdf-preview iframe { height: 600px; }
  .result-actions { flex-direction: column; gap: 12px; }
  .result-actions .btn-primary,
  .result-actions .btn-ghost {
    width: 100%;
    height: 54px;
    justify-content: center;
    font-size: 16px;
    border-radius: 12px;
  }
}

.pdf-mobile-note { display: none; }
@media (hover: none) and (pointer: coarse) {
  .pdf-preview { display: none; }
  .pdf-mobile-note {
    display: block;
    background: var(--orange-light);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 18px 16px;
    margin-bottom: 28px;
    color: var(--dark);
    font-size: 14px;
    line-height: 1.5;
  }
  #btn-fullscreen {
    order: -1;
    background: var(--orange);
    border-color: var(--orange);
    color: var(--white);
    font-weight: 700;
  }
  #btn-fullscreen:hover { border-color: var(--orange); color: var(--white); }
  .btn-download {
    background: var(--white);
    border: 1px solid var(--orange);
    color: var(--orange);
  }
  .btn-download:hover { background: var(--orange-light); }
}

/* Kontaktbereich: eine Karte mit klarer Reihenfolge — Kopf (Icon, Titel, ein
   Satz), Felder, Einwilligung, Button, Vertrauenszeile. Seit 17.09.2026 ohne
   die frühere Ablauf-Leiste und Zwischenüberschrift (wirkte unruhig). */
.contact-section { padding-top: 24px; }
.contact-card {
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 16px;
  padding: 22px 24px 20px;
  box-shadow: var(--shadow-sm);
}
.contact-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin: 0 0 18px;
}
.contact-head-icon {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--orange-light); color: var(--orange-dark);
}
.contact-head-text { min-width: 0; }
.contact-section h3 {
  margin: 0 0 4px;
  font-size: 19px;
  line-height: 1.25;
}
.contact-section .contact-head p {
  max-width: 640px;
  color: var(--gray);
  font-size: 14px;
  line-height: 1.5;
  margin: 0;
}
.contact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  margin-bottom: 14px;
}
.consent-block {
  margin: 4px 0 16px;
  padding: 14px 14px 12px;
  background: var(--light);
  border-radius: 12px;
}
.contact-submit { width: 100%; }
.contact-trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
  margin: 12px 0 0; font-size: 12.5px; color: var(--gray);
}
.contact-trust > span { display: inline-flex; align-items: center; gap: 6px; }
.contact-trust svg { color: var(--green); flex: 0 0 auto; }
.contact-comment {
  display: block;
  margin-bottom: 14px;
}
.contact-comment > span:first-child {
  display: block;
  margin-bottom: 6px;
}
.contact-comment small {
  color: var(--gray);
  font-weight: 400;
}
/* Der Rahmen sitzt auf der Huelle, nicht auf dem Textfeld — dadurch steht der
   Zaehler innerhalb des Rahmens, aber ausserhalb der Textflaeche. Text kann
   also nie dahinter verschwinden, auch nicht beim Scrollen. */
.comment-box,
.field > .comment-box {
  display: block;
  background: var(--white);
  border: 1px solid var(--rule);
  transition: border-color 0.15s;
  /* Die Huelle ist ein <span> direkt im .field-Label und faengt sich dadurch
     die Beschriftungs-Regel `.field > span` (fett, 13px, dunkel) ein — die
     Textarea erbt das per `font: inherit` und der Platzhalter wird fett.
     Hier zuruecksetzen, damit Kommentar und E-Mail/Telefon identisch aussehen. */
  margin-bottom: 0;
  font-size: inherit;
  font-weight: 400;
  color: inherit;
}
.comment-box:focus-within {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(239,115,0,0.13);
}
.comment-box textarea {
  min-height: 86px;
  resize: vertical;
  /* Rahmen und Fokusring liegen auf .comment-box, sonst doppelt. */
  border: 0;
  padding-bottom: 4px;
}
.comment-box textarea:focus { box-shadow: none; }
.comment-box .character-count {
  display: block;
  padding: 0 14px 8px;
  text-align: right;
  font-size: 11.5px;
  line-height: 1.4;
}
.status { font-size: 14px; color: var(--gray); margin: 10px 0 0; min-height: 20px; }
.status.error   { color: #c0392b; }
.status.success { color: var(--green); font-weight: 600; }

.privacy-note {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--gray);
  line-height: 1.5;
}
.privacy-note a { color: var(--gray); text-decoration: underline; }
.privacy-note a:hover { color: var(--dark); }

/* Einwilligung vor dem Absenden (Art. 6 Abs. 1 lit. a, Art. 7 DSGVO).
   Die Details (was wird übermittelt, Zweck, Rechtsgrundlage, Widerruf) sind
   seit 17.09.2026 eingeklappt hinter einem Button, damit der Block wenig Platz
   einnimmt; die Einwilligungserklärung am Haken bleibt dauerhaft sichtbar.
   Lesbar heißt: nicht kleiner als 12,5 px. */
.consent-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 0 0 10px; padding: 0;
  border: 0; background: none;
  font: inherit; font-size: 12.5px; font-weight: 700; line-height: 1.4;
  color: var(--dark); cursor: pointer;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}
.consent-toggle:hover { text-decoration-color: currentColor; }
.consent-toggle:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
.consent-toggle-icon { transition: transform .15s ease; color: var(--gray); }
.consent-toggle[aria-expanded="true"] .consent-toggle-icon { transform: rotate(180deg); }
.consent-info {
  margin: 0 0 12px;
  padding: 12px 14px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--dark);
}
.consent-info[hidden] { display: none; }
.consent-info p { margin: 6px 0 0; }
.consent-info a { color: var(--dark); text-decoration: underline; text-underline-offset: 2px; }
.consent-info a:hover { color: var(--black); }
.consent-info a:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
.consent-list {
  margin: 0;
  padding-left: 18px;
}
.consent-list li { margin-bottom: 3px; }

.consent-summary {
  margin: 0;
  font-size: 12px;
  line-height: 1.5;
  color: var(--gray);
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  background: var(--white);
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--dark);
  cursor: pointer;
}
.consent-check input {
  /* Nicht vorausgewählt (Art. 7 Abs. 2) — das steht im HTML, hier nur die Optik. */
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  accent-color: var(--orange);
  cursor: pointer;
}
.consent-check:hover { border-color: var(--gray); }
.consent-check input:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }
/* Nach einem Absendeversuch ohne Haken: Feld hervorheben, damit klar ist, was fehlt. */
.consent-check.consent-missing {
  border-color: #d33;
  background: #fdf3f3;
}
.page-footer {
  text-align: center;
  font-size: 12px;
  color: var(--gray);
  padding: 12px 16px calc(20px + env(safe-area-inset-bottom, 0px));
}
.page-footer a { color: var(--gray); text-decoration: underline; display: inline-block; padding: 10px 4px; }
.page-footer a:hover { color: var(--dark); }
.page-footer span { margin: 0 6px; }
@media (max-width: 620px) {
  .addr-grid { grid-template-columns: minmax(84px, 0.45fr) minmax(0, 1fr); }
  .addr-street, .addr-city { grid-column: 1 / -1; }
  .addr-grid .field > span { white-space: normal; overflow: visible; }
  .choice-grid.four { grid-template-columns: 1fr 1fr; }
  .choice-grid.two  { grid-template-columns: 1fr; }
  .persons-grid { grid-template-columns: 1fr 1fr; }
  .contact-row  { grid-template-columns: 1fr; gap: 10px; }
  .contact-card { padding: 18px 16px 16px; border-radius: 14px; }
  .contact-head { gap: 12px; }
  .consent-block { padding: 12px; }
  .contact-or {
    height: auto;
    justify-content: center;
  }
  .mode-tabs    { width: 100%; }
  .mode-tab     { flex: 1; text-align: center; padding: 9px 8px; min-height: 44px; }
}
@media (max-width: 420px) {
  .choice-grid.four { grid-template-columns: 1fr 1fr; }
  .persons-grid { grid-template-columns: 1fr 1fr; }
}


/* ── Sprachumschalter (Deutschland-Variante: DE / EN) ─────────────────────── */
/* Sitzt kompakt im Footer unter den Rechtslinks, damit oben Platz fuer den Hero bleibt. */
.lang-bar {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 6px 0 0;
}
.lang-bar[hidden] { display: none; }
.lang-label { font-size: 11px; color: var(--gray); font-weight: 600; margin: 0; }
/* Pillenform wie .mode-tabs: aussen rund, innen Trennlinien */
.lang-switch { display: inline-flex; border: 1px solid var(--rule); border-radius: 999px; overflow: hidden; }
.lang-switch button {
  appearance: none; border: 0; background: var(--white); color: var(--dark);
  font: inherit; font-size: 11px; font-weight: 700; letter-spacing: 0.02em;
  padding: 4px 10px; cursor: pointer; min-width: 36px; min-height: 28px;
}
.lang-switch button + button { border-left: 1px solid var(--rule); }
@media (hover: hover) { .lang-switch button:hover { background: var(--light); } }
.lang-switch button.active { background: var(--orange); color: var(--white); }
.lang-switch button:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; border-radius: 999px; }

/* ── Landingpage: Hero, Ablauf, USPs ───────────────────────────────────────── */
.intro-card { padding: clamp(24px, 4vw, 44px); }
/* Desktop: zwei Spalten — links Text (oben) und Adressfeld (unten), rechts das Bild
   mit der Rechnung über beide Zeilen. Mobil (s. u.) eine Spalte in DOM-Reihenfolge:
   Text → Bild+Rechnung → Adressfeld. */
.hero { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); grid-template-rows: auto auto; gap: 18px 32px; align-items: center; }
.hero-copy { grid-column: 1; grid-row: 1; align-self: end; }
.hero-visual { grid-column: 2; grid-row: 1 / 3; }
.hero-action { grid-column: 1; grid-row: 2; align-self: start; }
.hero-copy .hero-chips { margin-top: 4px; }
/* Direkteinstieg: Adressfeld mit eigener Vorschlagsliste + Button in einer
   Zeile; ein gewählter Vorschlag wird direkt geprüft (app.js), der Button geht
   auch mit leerem Feld (→ Adress-Schritt). */
.hero-start { display: flex; gap: 10px; align-items: stretch; margin: 0 0 10px; }
.hero-action { min-width: 0; }
.hero-start-field {
  flex: 1 1 auto; min-width: 0; position: relative;
  display: flex; align-items: center;
  color: var(--gray);
}
.hero-start-field svg { position: absolute; left: 14px; pointer-events: none; }
.hero-start-field input[type="text"] { height: 52px; width: 100%; padding-left: 42px; font-size: 16px; }
.hero-start-field input[type="text"]:disabled { color: var(--dark); background: var(--light); opacity: 1; }
.hero-start .btn-primary { flex: 0 0 auto; padding: 0 22px; }
.hero-start .btn-primary:disabled { opacity: .85; cursor: wait; }
/* Vorschlagsliste im Hero: über dem Bild/den Blöcken darunter, links am Feld */
.hero-ac { z-index: 60; text-align: left; min-width: min(460px, calc(100vw - 48px)); }
.hero-coverage {
  display: flex; align-items: flex-start; gap: 7px;
  margin: 0 0 8px; font-size: 12.5px; line-height: 1.45; font-weight: 600; color: var(--orange-dark);
}
.hero-coverage svg { flex: 0 0 auto; margin-top: 2px; }
.hero-coverage[hidden] { display: none; }
.hero-error { margin: 0 0 10px; font-size: 13px; min-height: 0; line-height: 1.45; }
.hero-error[hidden] { display: none; }
.hero-trust { margin: 0 0 18px; font-size: 12.5px; color: var(--gray); line-height: 1.5; }
.hero-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.hero-chips li { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--dark); }
.hero-chips li[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hero-visual { display: flex; justify-content: center; min-width: 0; }
.hero-solar {
  position: relative;
  isolation: isolate;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 22px;
  background: #d8e9ed;
  box-shadow: 0 18px 40px -18px rgba(17, 59, 64, .4), 0 0 0 1px rgba(17, 59, 64, .08);
}
.hero-solar-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  object-position: 54% center;
}
.hero-solar-location {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 16px;
  background: var(--white);
  color: #214b48;
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .09em;
  line-height: 1.4;
  text-transform: uppercase;
}
.hero-solar-location svg { flex: 0 0 auto; }
/* Rechenbeispiel unter dem Hero-Bild (Werte serverseitig berechnet, s. landing_example.py).
   Aufbau: Label → EINE große Zeile „Stromkosten/Jahr: vorher → nachher (−66 %)" →
   drei Kennzahlen mit Unterzeile → Amortisation → Disclaimer. */
.hero-example {
  margin: 0; padding: 14px 16px 12px;
  background: var(--white); border-top: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 10px;
  color: var(--black);
}
.hero-example[hidden] { display: none; }
.hero-example-label { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--gray); line-height: 1.35; }
.hero-example-bill { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--orange-light); }
.hero-example-kicker { font-size: 11px; font-weight: 700; color: var(--orange-dark); letter-spacing: .02em; }
.hero-example-bill-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 10px; }
.hero-example-bill-row s { font-size: 18px; font-weight: 700; color: var(--gray); text-decoration-thickness: 2px; }
.hero-example-arrow { font-size: 18px; color: var(--gray); }
.hero-example-bill-row strong { font-size: 28px; font-weight: 900; line-height: 1; color: var(--orange-dark); letter-spacing: -.01em; }
.hero-example-badge { font-style: normal; font-size: 12px; font-weight: 800; color: #fff; background: var(--orange-dark); border-radius: 999px; padding: 3px 9px; }
.hero-example-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.hero-example-grid div { display: flex; flex-direction: column; justify-content: flex-start; gap: 2px; min-width: 0; }
.hero-example-grid span { font-size: 10.5px; color: var(--gray); line-height: 1.3; }
.hero-example-grid strong { font-size: 17px; font-weight: 800; line-height: 1.15; color: var(--black); white-space: nowrap; }
.hero-example-grid small { font-size: 10.5px; font-weight: 600; color: var(--orange-dark); line-height: 1.3; }
.hero-example-grid div:first-child strong { color: var(--orange-dark); }
/* Preis-Kachel als Einstieg: Frage + Aufforderung, Klick startet den Rechner (app.js). */
.hero-example-cta {
  all: unset; box-sizing: border-box; cursor: pointer; position: relative;
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 9px 26px 9px 11px; border-radius: 12px;
  background: var(--orange-dark); color: #fff;
  transition: transform .15s, box-shadow .15s;
}
.hero-example-cta:hover, .hero-example-cta:focus-visible { transform: translateY(-1px); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, .45); outline: none; }
.hero-example-cta strong { font-size: 13px; font-weight: 800; line-height: 1.2; color: #fff; white-space: normal; }   /* Grid-strong ist nowrap — hier umbrechen */
.hero-example-cta small { font-size: 10.5px; font-weight: 500; line-height: 1.3; color: rgba(255, 255, 255, .88); }
.hero-example-cta-arrow { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 16px; font-weight: 700; }

/* „Warum jetzt?": farbiges Band mit drei Kacheln */
.why-now { margin-top: 32px; padding: 22px 22px 20px; border-radius: 16px; background: var(--orange-light); border: 1px solid color-mix(in srgb, var(--orange) 22%, transparent); }
.why-now h2 { margin: 0 0 14px; font-size: 20px; font-weight: 800; }
.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.why { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--white); border-radius: 14px; border: 1px solid color-mix(in srgb, var(--orange) 18%, var(--rule)); }
.why[hidden] { display: none; }
.why strong { font-size: 15px; color: var(--black); line-height: 1.3; }
.why span:not(.how-icon) { font-size: 13px; color: var(--dark); line-height: 1.5; }

/* Vertrauenszeile unter den Kacheln */
.trust-row { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.trust-row li { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--dark); }

/* FAQ: Button + Panel (kein details-Element, s. index.html) */
.faq { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule); }
.faq h2 { margin: 0 0 12px; font-size: 20px; font-weight: 800; }
.faq-item { border: 1px solid var(--rule); border-radius: 12px; background: var(--white); margin-bottom: 8px; }
.faq-q {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 14px 16px; border: 0; background: none; text-align: left;
  font: inherit; font-size: 15px; font-weight: 700; color: var(--black); cursor: pointer;
  border-radius: 12px;
}
.faq-q:focus-visible { outline: 2px solid var(--orange); outline-offset: -2px; }
.faq-icon { flex: 0 0 auto; color: var(--gray); transition: transform .15s ease; }
.faq-q[aria-expanded="true"] .faq-icon { transform: rotate(180deg); }
.faq-a { margin: 0; padding: 0 16px 14px; font-size: 14px; color: var(--dark); line-height: 1.55; }
.faq-a[hidden] { display: none; }

/* Sticky-Adressleiste (Mobil), s. app.js updateStickyCta */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96); border-top: 1px solid var(--rule);
  box-shadow: 0 -8px 24px rgba(20, 30, 40, .08);
  backdrop-filter: saturate(1.2) blur(6px);
}
.sticky-cta[hidden] { display: none; }
.sticky-cta input[type="text"] { flex: 1 1 auto; min-width: 0; height: 46px; font-size: 16px; padding: 0 14px; }
.sticky-cta .btn-primary { flex: 0 0 auto; height: 46px; padding: 0 18px; font-size: 15px; }
body.has-sticky-cta { padding-bottom: 76px; }
@media (min-width: 861px) { .sticky-cta { display: none; } body.has-sticky-cta { padding-bottom: 0; } }

/* Manuelle Dachprüfung (Fallback nach „keine Satellitendaten“), s. app.js showManualCheck */
.manual-check {
  margin: 4px 0 14px; padding: 16px;
  border: 1px solid var(--orange); border-radius: 12px;
  background: var(--orange-light, #fff4e8);
  text-align: left;
}
.manual-check[hidden] { display: none; }
.manual-check-title { margin: 0 0 6px; font-size: 17px; line-height: 1.3; color: var(--dark); }
.manual-check-lead { margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--dark); }
.manual-check .contact-row { margin-bottom: 10px; }
.manual-check .btn-primary { width: 100%; }
.manual-check .status { margin-top: 8px; }
.manual-check .status:empty { display: none; }
/* Adressfeld, dessen Prüfung fehlgeschlagen ist: rot markieren, bis neu getippt wird */
.hero-start-field.has-error input[type="text"] { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192, 57, 43, .12); }

.how { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--rule); }
.how h2, .usps h2 { margin: 0 0 18px; font-size: 20px; font-weight: 800; }
.how-steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.how-steps li { counter-increment: step; position: relative; min-width: 0; padding: 16px; background: var(--light); border: 1px solid transparent; border-radius: 14px; display: flex; flex-direction: column; gap: 8px; }
.how-steps li::before { content: counter(step); position: absolute; top: 14px; right: 14px; font-size: 14px; font-weight: 700; color: var(--dark); }
.how-steps li:not(:last-child)::after { content: ''; position: absolute; top: 33px; right: -13px; width: 7px; height: 7px; border-top: 1.5px solid var(--orange-dark); border-right: 1.5px solid var(--orange-dark); transform: rotate(45deg); }
.how-icon, .usp-icon { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; background: var(--orange-light); color: var(--orange-dark); }
.how-steps .how-icon { width: 44px; height: 44px; margin-bottom: 4px; }
.how-steps strong { font-size: 15px; color: var(--black); line-height: 1.35; }
.how-description { font-size: 14px; color: var(--dark); line-height: 1.5; }
.how-lead { margin: -8px 0 18px; max-width: 720px; font-size: 15px; color: var(--dark); line-height: 1.5; }
.how-trust { display: flex; align-items: flex-start; gap: 8px; margin: 14px 0 0; font-size: 13px; font-weight: 600; color: var(--orange-dark); line-height: 1.45; }
.how-trust svg { flex: 0 0 auto; margin-top: 1px; }
.how-steps .how-result { background: var(--orange-light); border-color: color-mix(in srgb, var(--orange) 24%, transparent); }
.how-result .how-icon { background: var(--white); }
.how-note { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 0; font-size: 14px; color: var(--dark); }
.how-note svg { flex: 0 0 auto; color: var(--orange-dark); }
.usps { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--rule); }
.usp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.usp-wide { grid-column: 1 / -1; }   /* 5. Kachel: Beratung auf Wunsch, über die volle Breite */
.usp { display: flex; flex-direction: column; gap: 8px; padding: 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--white); transition: transform .15s, box-shadow .15s, border-color .15s; }
@media (hover: hover) { .usp:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); border-color: color-mix(in srgb, var(--orange) 40%, var(--rule)); } }
.usp strong { font-size: 14px; color: var(--black); line-height: 1.3; }
.usp span:not(.usp-icon) { font-size: 13px; color: var(--gray); line-height: 1.45; }
.usp-cta { margin-top: 28px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.usp-cta .contact-line { margin-top: 10px; }
@media (max-width: 860px) {
  /* Mobil: eine Spalte in DOM-Reihenfolge — Headline und Nutzen, dann Bild mit
     der Rechnung (der „Wow"-Moment), erst dann das Adressfeld. Für Leser, die
     weiter scrollen, bleibt der Sticky-CTA (app.js). */
  .hero { grid-template-columns: 1fr; grid-template-rows: none; gap: 22px; }
  .hero-copy, .hero-visual, .hero-action { grid-column: auto; grid-row: auto; }
  .hero-action { max-width: 520px; width: 100%; justify-self: center; }
  .hero-solar { max-width: 520px; }
  .hero-solar-image { aspect-ratio: 4 / 3; }
  .why-grid { grid-template-columns: 1fr; }
  .usp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .how-steps { grid-template-columns: 1fr; gap: 10px; }
  .how-steps li { display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; row-gap: 4px; padding: 14px; }
  .how-steps .how-icon { grid-row: 1 / 3; margin: 0; }
  .how-steps strong { padding-right: 22px; align-self: end; }
  .how-description { grid-column: 2; }
  .how-steps li::before { top: 14px; right: 14px; }
  .how-steps li:not(:last-child)::after { top: auto; bottom: -9px; left: 32px; right: auto; transform: rotate(135deg); }
  .how-note { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .hero-solar { border-radius: 16px; }
  .intro-card h1 br { display: none; }
  .intro-card h1 { font-size: clamp(26px, 8vw, 30px); }
  .intro-card .lead { font-size: 15.5px; margin-bottom: 18px; }
  .hero-start { flex-direction: column; }
  .hero-start .btn-primary { width: 100%; }
  .hero-trust { text-align: center; }
  .hero-coverage { justify-content: center; }
  .hero-example-grid strong { font-size: 16px; }
  .hero-example-bill-row strong { font-size: 26px; }
  /* Schmale Handys: Preis-Kachel über die volle Breite, Pfeil rechts mittig */
  .hero-example-grid { grid-template-columns: 1fr; }
  .hero-example-cta { padding: 11px 34px 11px 13px; }
  .hero-example-cta strong { font-size: 14px; }
  .hero-example-cta small { font-size: 11.5px; }
  .usp-cta .btn-primary { width: 100%; }
  .how { margin-top: 32px; padding-top: 24px; }
  .usps { margin-top: 28px; padding-top: 24px; }
  .usp { padding: 14px; }
  .usp strong { font-size: 13.5px; }
  .usp span:not(.usp-icon) { font-size: 12.5px; }
  .why-now { padding: 16px; }
}

/* ── Ergebnisseite: Kennzahlen + Dachbild statt PDF-Vorschau ────────────────── */
.result-body { margin-bottom: 28px; }
.result-body[hidden] { display: none; }
/* Dacheignung: Karte mit Farbakzent links (Level 0-3), Kopfzeile aus
   Label + Pille, Erklärung darunter. Farbe je Level auf Karte und Pille. */
.result-suit {
  --suit: var(--green); --suit-bg: #e6f4ea; --suit-fg: #1b6e33;
  display: flex; flex-direction: column; gap: 6px; margin: -6px 0 18px; padding: 14px 16px 14px 18px;
  background: var(--white); border: 1px solid var(--rule); border-left: 4px solid var(--suit);
  border-radius: 14px; box-shadow: var(--shadow-sm);
}
.result-suit.level-2 { --suit: #5aa64a; --suit-bg: #ecf5e8; --suit-fg: #2f6b25; }
.result-suit.level-1 { --suit: #d98a00; --suit-bg: #fdf1dc; --suit-fg: #8a5600; }
.result-suit.level-0 { --suit: #b3261e; --suit-bg: #fbe9e7; --suit-fg: #8c1d17; }
.result-suit[hidden] { display: none; }
.result-suit-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.result-suit-label { font-size: 12px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: .04em; }
.result-suit-badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px 4px 10px; border-radius: 999px;
  background: var(--suit-bg); color: var(--suit-fg); font-size: 13px; font-weight: 800; line-height: 1.3;
}
.result-suit-badge::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--suit); }
.result-suit-desc { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--dark); }
.result-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 20px; align-items: start; }
.result-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.metric-card {
  position: relative; background: var(--white); border: 1px solid var(--rule); border-radius: 14px;
  padding: 16px 16px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0;
  box-shadow: var(--shadow-sm);
}
.metric-icon { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--orange-light); color: var(--orange-dark); margin-bottom: 6px; }
.metric-card.metric-hero { grid-column: 1 / -1; background: linear-gradient(135deg, var(--orange), var(--orange-dark)); border-color: transparent; color: var(--white); }
.metric-card.metric-hero .metric-icon { background: rgba(255,255,255,.18); color: var(--white); }
.metric-card.metric-hero .metric-label, .metric-card.metric-hero .metric-sub { color: rgba(255,255,255,.85); }
.metric-card.metric-hero .metric-value { color: var(--white); font-size: 34px; }
/* Preis-Kachel: Icon | Label über Wert | Hinweis rechts. Der Wert darf nicht
   umbrechen (sonst "17.4 / 30 / €"), der Hinweis rutscht bei Platzmangel
   unter den Wert. */
.metric-card.metric-price { grid-column: 1 / -1; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 6px 14px; }
.metric-card.metric-price .metric-icon { margin: 0; }
.metric-price-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.metric-card.metric-price .metric-value { font-size: 26px; white-space: nowrap; overflow-wrap: normal; }
.metric-card.metric-price .metric-sub { margin-left: auto; text-align: right; }
.metric-label { font-size: 12px; font-weight: 700; color: var(--gray); text-transform: uppercase; letter-spacing: 0.04em; }
.metric-value { font-size: 24px; font-weight: 800; line-height: 1.15; color: var(--black); overflow-wrap: anywhere; }
.metric-sub { font-size: 12px; color: var(--gray); }

/* Gesperrte Kacheln (Amortisation, Richtpreis): die Zahl ist nur als unscharfe
   Form zu sehen — die echten Werte stehen im PDF-Angebot. Der Server liefert
   hier ohnehin nur einen gleich langen Platzhalter (web/app.py
   mask_locked_summary), die Unschaerfe ist die sichtbare Haelfte davon. */
.metric-card.is-locked .metric-value {
  filter: blur(6px);
  opacity: 0.9;
  user-select: none; -webkit-user-select: none;
  pointer-events: none;
}
.metric-lock {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border: 1px solid var(--orange); border-radius: 999px;
  background: var(--orange-light); color: var(--orange-dark);
  font: inherit; font-size: 11.5px; font-weight: 800; letter-spacing: 0.02em;
  cursor: pointer; white-space: nowrap;
}
.metric-lock:hover { background: var(--orange); color: var(--white); }
.metric-lock:focus-visible { outline: 2px solid var(--orange-dark); outline-offset: 2px; }
.metric-card.is-locked .metric-lock { align-self: flex-start; margin-top: 8px; }
/* Preis-Kachel ist eine Zeile: Schloss rechts neben den Wert, der Hinweistext
   rutscht darunter (sonst kollidiert er mit dem Schloss). app.js haengt das
   Schloss ans Ende der Kachel — die Reihenfolge macht hier das order-Attribut,
   damit der Hinweistext trotzdem zuletzt steht. */
.metric-card.metric-price.is-locked .metric-lock {
  order: 1; margin: 0 0 0 auto; align-self: center;
}
.metric-card.metric-price.is-locked .metric-sub {
  order: 2; flex-basis: 100%; margin-left: 0; padding-left: 50px; text-align: left;
}
.result-side { display: flex; flex-direction: column; gap: 16px; }
.result-roof h3, .result-included h3 { margin: 0 0 10px; font-size: 15px; font-weight: 800; }
.result-roof-frame { border: 1px solid var(--rule); border-radius: 14px; background: var(--light); overflow: hidden; display: flex; justify-content: center; box-shadow: var(--shadow-sm); }
.result-roof-frame img { display: block; max-width: 100%; max-height: 420px; height: auto; }
.result-roof-credit { margin: 8px 0 0; font-size: 11px; color: var(--gray); }
.result-included { padding: 18px; border: 1px solid var(--rule); border-radius: 14px; background: var(--light); }
.result-included ul { list-style: none; margin: 0 0 16px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.result-included li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; color: var(--dark); }
.result-included li::before { content: ''; flex: 0 0 8px; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--orange); }
.result-included .btn-primary { width: 100%; }
@media (max-width: 860px) {
  .result-grid { grid-template-columns: 1fr; }
  .metric-card.metric-hero .metric-value { font-size: 30px; }
}
@media (max-width: 480px) {
  .result-metrics { grid-template-columns: 1fr; }
  .metric-value { font-size: 22px; }
  .metric-card.metric-price .metric-sub { flex-basis: 100%; margin-left: 50px; text-align: left; }
  .metric-card.metric-price.is-locked .metric-sub { margin-left: 0; padding-left: 50px; }
}

/* Quellen-Fußnote (Startseite und Ergebnis): eine Zeile, Links durch
   Trennpunkte getrennt — kein eigener Block mit Überschrift und Liste. */
.factual-sources { margin: 16px 0 0; font-size: 12px; line-height: 1.6; color: var(--gray); overflow-wrap: anywhere; }
.factual-sources-title { font-weight: 600; margin-right: 4px; }
.factual-sources-links a { color: var(--gray); text-decoration: underline; text-underline-offset: 2px; }
.factual-sources-links a:hover { color: var(--orange-dark); }
.factual-sources-links a + a::before { content: '·'; margin: 0 6px; color: var(--gray); text-decoration: none; display: inline-block; }

/* Ergebnis: Förderhinweis, Modellannahmen und Quellen eingeklappt hinter
   einer Zeile unter der Preis-Kachel (Button + hidden-Panel wie .consent-toggle). */
.result-facts { grid-column: 1 / -1; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12.5px; line-height: 1.5; color: var(--gray); }
.result-facts-toggle { margin: 0; font-size: inherit; color: var(--orange-dark); }
.result-facts-body { flex-basis: 100%; margin-top: 4px; padding: 12px 14px; border-radius: 10px; background: var(--light); border: 1px solid var(--rule); color: var(--dark); }
.result-facts-body[hidden] { display: none; }
.result-facts-body p { margin: 0; overflow-wrap: anywhere; }
.result-facts-body p + p { margin-top: 8px; }
.result-facts-body p[hidden] { display: none; }
.result-facts-body .factual-sources { margin-top: 10px; }

/* ── Cookie-Banner (web/static/consent.js, nur mit Tracking-IDs) ───────────
   Kompakte Leiste: ein Satz + „Mehr“, Buttons gleichwertig. Mobil ≈ 100 px hoch. */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid #e3e3e3; box-shadow: 0 -6px 24px rgba(0,0,0,.08);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner-inner { max-width: 960px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto; gap: 8px 20px; align-items: center; }
.cookie-copy { min-width: 0; }
.cookie-text { margin: 0; font-size: 13px; line-height: 1.4; color: #333; }
.cookie-full { margin: 6px 0 0; font-size: 13px; line-height: 1.4; color: #333; }
.cookie-full[hidden] { display: none; }
.cookie-full a { color: var(--orange-dark); }
.cookie-more { border: 0; background: none; padding: 0; font: inherit; font-size: 13px; color: var(--orange-dark); text-decoration: underline; cursor: pointer; white-space: nowrap; }
.cookie-actions { display: flex; gap: 8px; flex-wrap: nowrap; justify-content: flex-end; }
.cookie-actions button { min-width: 110px; height: 40px; padding: 0 14px; font-size: 14px; }
.cookie-banner .btn-secondary {
  border: 1px solid #c8c8c8; background: #fff; color: #222; border-radius: 10px; cursor: pointer; font: inherit;
}
.cookie-banner .btn-secondary:hover { border-color: #888; }
@media (max-width: 600px) {
  .cookie-banner-inner { grid-template-columns: 1fr; gap: 8px; }
  .cookie-actions button { flex: 1; min-width: 0; }
}
/* Solange der Banner steht, darf er nichts verdecken (z. B. den „Weiter“-Button im
   Adress-Schritt): Seite unten um die Bannerhöhe verlängern. Die Sticky-Adressleiste
   stapelt darüber (Variable setzt consent.js). */
body.has-cookie-banner { padding-bottom: var(--cookie-banner-h, 0px); }
.sticky-cta { bottom: var(--cookie-banner-h, 0px); }
body.has-sticky-cta.has-cookie-banner { padding-bottom: calc(76px + var(--cookie-banner-h, 0px)); }
