:root{ --bg:#ffffff; --fg:#0b1f14; --muted:#5c6b62; --brand:#2e7d32; --brand-600:#1b5e20; --surface:#f5f7f6; --ring:#a5d6a7;}
:root.dark{ --bg:#0b1f14; --fg:#f1f7f3; --muted:#b9c7be; --brand:#66bb6a; --brand-600:#43a047; --surface:#0f2619; --ring:#66bb6a;}
*{box-sizing:border-box} html{scroll-behavior:smooth}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Helvetica,Arial; background:var(--bg);color:var(--fg);line-height:1.6}
a{color:var(--brand);text-decoration:none}
a:focus,button:focus,input:focus,textarea:focus,select:focus{outline:3px solid var(--ring);outline-offset:2px}
header{position:sticky;top:0;z-index:50;background:color-mix(in srgb, var(--bg) 90%, transparent);backdrop-filter:saturate(140%) blur(6px);border-bottom:1px solid color-mix(in srgb, var(--fg) 8%, transparent)}
.container{max-width:1100px;margin:0 auto;padding:0 16px}
.nav{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 0;flex-wrap:wrap}
.logo{display:inline-flex;align-items:center;gap:10px;font-weight:700;color:inherit}
.logo span{letter-spacing:.2px}
nav ul{display:flex;gap:10px;flex-wrap:wrap;list-style:none;margin:0;padding:0;align-items:center}
nav li{display:inline-flex}
nav a{padding:8px 12px;border-radius:999px;white-space:nowrap;font-size:15px}
nav a:hover,nav a:focus{background:color-mix(in srgb, var(--brand) 12%, transparent)}
nav a.active{background:color-mix(in srgb, var(--brand) 20%, transparent);color:var(--brand-600);font-weight:600}
.cta{display:inline-flex;align-items:center;gap:10px;background:var(--brand);color:#fff;padding:10px 14px;border:none;border-radius:999px;font-weight:600;cursor:pointer}
.cta:hover{background:var(--brand-600)}
.btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 14px;border-radius:12px;border:1px solid color-mix(in srgb, var(--brand) 40%, transparent);background:color-mix(in srgb, var(--brand) 18%, var(--bg));color:var(--brand-600);font-weight:600;cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}
.btn:hover{transform:translateY(-1px);box-shadow:0 6px 18px rgba(0,0,0,0.08)}
.btn:active{transform:translateY(0)}
.dark .btn{background:color-mix(in srgb, var(--brand) 38%, var(--surface));color:#fff;border-color:color-mix(in srgb, var(--brand) 52%, transparent);box-shadow:0 4px 16px rgba(0,0,0,0.4)}
.toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:transparent;border:1px solid color-mix(in srgb, var(--fg) 12%, transparent);padding:9px 14px;border-radius:999px;cursor:pointer;font-weight:600;line-height:1}
.toggle .theme-icon{font-size:18px}
.toggle .theme-label{font-size:14px}
.dark .toggle{background:color-mix(in srgb, var(--fg) 16%, var(--surface));color:var(--fg);border-color:color-mix(in srgb, var(--fg) 32%, transparent)}
.toggle[aria-pressed="true"]{border-color:var(--ring);}
.theme-toggle[aria-pressed="true"]{background:color-mix(in srgb, var(--brand) 18%, transparent);color:var(--brand-600)}
.dark .theme-toggle[aria-pressed="true"]{background:color-mix(in srgb, var(--brand) 32%, transparent);color:#fff}
.theme-toggle--desktop{display:none}
.theme-toggle-item{width:100%}
nav{display:flex;align-items:center;gap:10px}
.skip-link{position:absolute;left:-9999px;top:auto;width:1px;height:1px;overflow:hidden}
.skip-link:focus{left:10px;top:10px;width:auto;height:auto;background:var(--brand);color:white;padding:8px 12px;border-radius:8px;z-index:100}
.hero{padding:40px 0 24px;background: radial-gradient(1200px 500px at 10% -10%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 60%)}
.hero h1{font-size:clamp(28px, 4vw, 46px); line-height:1.15; margin:8px 0 12px 0;text-wrap:balance}
.hero p{font-size:clamp(16px, 2.2vw, 20px);color:var(--muted);max-width:900px;margin:0 auto}
.hero .actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:18px;justify-content:center}
.grid{display:grid; gap:16px}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
@media (max-width:900px){ .grid-3{grid-template-columns:1fr} .grid-2{grid-template-columns:1fr} }
.card{background:var(--surface);border:1px solid color-mix(in srgb, var(--fg) 8%, transparent);padding:18px;border-radius:16px}
.card h3{margin:0 0 8px 0}
.badge{display:inline-block;padding:4px 10px;border-radius:999px;background:color-mix(in srgb, var(--brand) 16%, transparent);color:var(--brand);font-weight:600;font-size:12px}
.section{padding:48px 0}
.section.compact{padding:32px 0}
.section.tight{padding-top:20px;padding-bottom:32px}
.section h2{font-size:28px;margin:0 0 12px 0}
.lead{color:var(--muted);max-width:800px}
.list{padding-left:18px}
.list li{margin:6px 0}
.kontaktbar{position:fixed; bottom:16px; right:16px; z-index:60; display:flex; gap:8px; flex-wrap:wrap;}
.kontaktbar a{background:var(--brand); color:#fff; padding:10px 12px; border-radius:999px; font-weight:700}
footer{border-top:1px solid color-mix(in srgb, var(--fg) 8%, transparent); padding:24px 0; margin-top:40px}
footer .logo{font-size:18px}
.small{font-size:14px;color:var(--muted)}
footer .list{list-style:none;padding-left:0}
footer .list li{margin:6px 0}
.footer-grid{display:grid;gap:24px;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));align-items:flex-start}
.footer-grid .logo{margin-bottom:8px}
.footer-grid p{margin:0}
.footer-meta{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px;font-size:13px;color:var(--muted)}
.footer-meta a{color:inherit;text-decoration:underline}
.footer-heading{margin:0 0 6px 0;font-size:16px}
.footer-note{margin-top:12px;font-size:13px;color:var(--muted)}
.footer-cta{margin-top:10px;display:inline-flex}
table{width:100%;border-collapse:collapse}
td,th{padding:8px;border-bottom:1px solid color-mix(in srgb, var(--fg) 10%, transparent)}
form{display:grid;gap:10px;max-width:640px}
input,textarea,select{padding:10px;border-radius:10px;border:1px solid color-mix(in srgb, var(--fg) 18%, transparent);background:var(--bg);color:var(--fg)}
label{font-weight:600}
.icon{display:inline-flex;align-items:center;justify-content:center;vertical-align:middle;margin-right:8px;width:32px;height:32px;border-radius:999px;background:color-mix(in srgb, var(--brand) 88%, var(--brand-600) 12%);color:#fff;box-sizing:border-box;flex-shrink:0;box-shadow:0 0 0 1px color-mix(in srgb, var(--fg) 6%, transparent)}
.icon svg,.icon use{fill:currentColor;stroke:currentColor}
svg.icon{color:#fff;fill:currentColor;stroke:currentColor;padding:6px}
img.icon{padding:6px;filter:brightness(0) invert(1);object-fit:contain}
.h-with-icon{display:flex;align-items:center;gap:12px}
.h-with-icon .icon{margin-right:0}
/* Mobile Burger */
@media (max-width: 768px){
  nav ul{display:none; position:fixed; inset:0 0 auto 0; top:56px; background:var(--bg); padding:16px; gap:6px; flex-direction:column; border-bottom:1px solid color-mix(in srgb, var(--fg) 8%, transparent); box-shadow:0 8px 30px rgba(0,0,0,.08)}
  nav ul.is-open{display:flex;}
  .burger{display:inline-flex; align-items:center; justify-content:center; width:40px; height:40px; border:1px solid color-mix(in srgb, var(--fg) 12%, transparent); border-radius:10px; background:transparent}
  .burger span{display:block; width:20px; height:2px; background:var(--fg); position:relative}
  .burger span::before,.burger span::after{content:""; position:absolute; left:0; width:20px; height:2px; background:var(--fg)}
  .burger span::before{top:-6px}
  .burger span::after{top:6px}
  .nav > .cta{display:none}
  nav ul li.theme-toggle-item{display:block;margin-top:12px}
  nav ul li.theme-toggle-item .theme-toggle{width:100%; justify-content:center; font-size:16px; padding:12px 16px}
}
@media (min-width: 769px){ .burger{display:none} }
@media (min-width: 769px){
  nav ul li.theme-toggle-item{display:none}
  .theme-toggle--desktop{display:inline-flex}
}
/* Wizard */
.wizard{background:var(--surface); border:1px solid color-mix(in srgb, var(--fg) 8%, transparent); border-radius:16px; padding:18px}
.wizard .steps{display:flex; gap:8px; margin-bottom:12px; flex-wrap:wrap}
.wizard .step{padding:6px 10px; border-radius:999px; background:color-mix(in srgb, var(--brand) 10%, transparent); color:var(--brand); font-weight:600; font-size:13px}
.wizard .controls{display:grid; gap:10px; margin-top:10px}
.wizard fieldset{border:0; padding:0; margin:0}
.wizard .row{display:grid; grid-template-columns:repeat(3,1fr); gap:10px; align-items:stretch}
@media (max-width:900px){ .wizard .row{grid-template-columns:1fr} }
.wizard label{display:flex;flex-direction:column;align-items:flex-start;gap:6px;border:1px solid color-mix(in srgb, var(--fg) 12%, transparent);padding:10px;border-radius:12px;cursor:pointer;background:var(--bg)}
.wizard label input,
.wizard label select{width:100%}
.wizard input[type="radio"], .wizard input[type="checkbox"]{accent-color: var(--brand)}
.wizard .navbtns{display:flex; gap:10px; margin-top:12px; margin-bottom:18px; justify-content:center}
.badge-outline{display:inline-block;border:1px solid var(--brand); color:var(--brand); padding:2px 8px; border-radius:999px; font-size:12px}
.summary{background:var(--bg); border:1px dashed color-mix(in srgb, var(--fg) 18%, transparent); padding:12px; border-radius:12px; margin-top:18px}
.faq{border-top:1px solid color-mix(in srgb, var(--fg) 8%, transparent); padding-top:12px; margin-top:24px}
.faq details{margin:8px 0}
.faq summary{cursor:pointer; font-weight:600}
.hint{background:var(--bg);border-left:3px solid var(--brand);padding:10px;border-radius:8px;margin-top:10px}
.isfp-inline-cta{display:flex; justify-content:center; align-items:center; gap:10px; margin-top:8px; flex-wrap:wrap}
.isfp-inline-cta .pill{border:1px solid var(--brand); border-radius:999px; padding:4px 10px; font-weight:600; color:var(--brand)}
/* Fix Button Zentrierung */
.cta {
  line-height: 1;
  justify-content: center;
}

.cta svg,
.cta img {
  display: block;
}


/* === Additions for 2025-10 UX refresh === */

/* Typography polish */
h1,h2,h3{ letter-spacing:.2px }
.lead-strong{ color:var(--fg); font-weight:700 }
/* Card rows that look less 'tabelarisch' */
.row-cards{ display:grid; grid-template-columns:repeat(3,1fr); gap:16px }
@media (max-width:900px){ .row-cards{ grid-template-columns:1fr } }
.row-cards .card{ display:flex; gap:12px; align-items:flex-start }
.row-cards .card .emoji{ font-size:26px; line-height:1 }
/* Teaser band */
.band{ background:linear-gradient(90deg, color-mix(in srgb, var(--brand) 16%, transparent), transparent 70%); border-radius:16px; padding:16px; display:flex; gap:16px; align-items:center; justify-content:space-between }
/* Soft separators to avoid table look */
.hr{ height:1px; background:color-mix(in srgb, var(--fg) 8%, transparent); margin:20px 0 }
/* Breadcrumbs */
.breadcrumbs{ font-size:14px; color:var(--muted) }
.breadcrumbs a{ color:inherit; text-decoration:underline }
/* Icon pills */
.pill{ display:inline-flex; align-items:center; gap:8px; padding:6px 10px; border-radius:999px; background:color-mix(in srgb, var(--brand) 14%, transparent); color:var(--brand); font-weight:700 }
.pill svg{ width:16px; height:16px }
.hero .badges{ display:flex; gap:8px; justify-content:center; margin-top:10px; flex-wrap:wrap }
.sr-only{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); border:0 }

/* Themenschnellzugriff */
.topics-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px}
.topics-grid .card{height:100%;display:flex;flex-direction:column;gap:10px}
.topics-grid .card p{margin:0;color:var(--muted);font-size:15px;line-height:1.5}
.topics-grid .card .cta-link{margin-top:auto;font-weight:600;color:var(--brand)}

/* PV-Planer */
.pv-wrap{display:flex;gap:24px;align-items:flex-start}
.pv-sidebar{flex:0 0 360px;display:flex;flex-direction:column;gap:18px}
.pv-controls{display:flex;flex-direction:column;gap:18px}
.pv-controls .card{background:var(--bg);border:1px solid color-mix(in srgb, var(--fg) 10%, transparent);border-radius:16px;box-shadow:0 4px 16px rgba(0,0,0,0.04)}
.dark .pv-controls .card{background:color-mix(in srgb, var(--surface) 70%, transparent);border-color:color-mix(in srgb, var(--fg) 18%, transparent);box-shadow:0 4px 16px rgba(0,0,0,0.25)}
.pv-controls label{font-weight:600;font-size:14px}
.pv-controls .grid-2,.pv-controls .grid-3{gap:10px}
.pv-controls .compact{max-width:120px;width:100%}
.pv-controls .toolbar{display:flex;gap:10px;flex-wrap:wrap}
.pv-controls .toolbar .btn{flex:1 1 calc(50% - 5px);text-align:center}
.pv-controls .btn{width:100%}
.pv-controls .draw-hint{display:flex;gap:12px;align-items:flex-start;margin-top:10px;padding:12px 14px;border-radius:14px;background:color-mix(in srgb, var(--brand) 10%, var(--surface));border:1px dashed color-mix(in srgb, var(--brand) 36%, transparent)}
.dark .pv-controls .draw-hint{background:color-mix(in srgb, var(--brand) 26%, transparent);border-color:color-mix(in srgb, var(--brand) 48%, transparent)}
.pv-controls .draw-hint-icon{flex:0 0 auto;width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:color-mix(in srgb, var(--bg) 85%, transparent);color:var(--brand-600)}
.dark .pv-controls .draw-hint-icon{background:color-mix(in srgb, var(--surface) 72%, transparent);color:#fff}
.pv-controls .draw-hint strong{display:block;margin-bottom:4px;font-size:14px;color:var(--fg)}
.pv-controls .draw-hint ol{margin:0;padding-left:18px;font-size:13px;color:var(--muted);display:grid;gap:4px}
.pv-map{flex:1 1 auto;position:relative}
.pv-map #map{width:100%;height:70vh;min-height:420px;border-radius:20px;overflow:hidden;border:1px solid color-mix(in srgb, var(--fg) 8%, transparent);background:color-mix(in srgb, var(--muted) 6%, transparent);touch-action:pan-x pan-y pinch-zoom}
.pv-map .leaflet-top{top:88px}
.pv-map .leaflet-top.leaflet-left,.pv-map .leaflet-top.leaflet-right{margin-top:0}
.pv-map .leaflet-control{border-radius:12px!important;overflow:hidden;box-shadow:0 8px 24px rgba(0,0,0,0.12)}
.pv-map .leaflet-control-layers-toggle{width:36px!important;height:36px!important}
.pv-map .leaflet-draw{z-index:400}
.pv-map .leaflet-bar a{background:var(--bg);color:inherit}
.pv-map .leaflet-bar a:hover{background:color-mix(in srgb, var(--brand) 16%, transparent)}
.pv-sidebar .muted{font-size:13px}
.pv-metrics{display:grid;gap:6px}
.pv-metrics .metric{font-size:18px;font-variant-numeric:tabular-nums;font-weight:700}
.pv-controls .bom table{font-size:14px;width:100%;border-collapse:collapse}
.pv-controls .bom table th,.pv-controls .bom table td{padding:6px 8px;border-bottom:1px solid color-mix(in srgb, var(--fg) 12%, transparent);vertical-align:top;background:var(--bg)}
.pv-controls .bom table td:nth-child(1){white-space:nowrap}
.dark .pv-controls .bom table th,.dark .pv-controls .bom table td{background:color-mix(in srgb, var(--surface) 85%, transparent)}
@media (max-width: 1024px){
  .pv-wrap{flex-direction:column}
  .pv-sidebar{flex:0 0 auto}
  .pv-map #map{height:60vh;min-height:360px}
  .pv-controls .toolbar .btn{flex:1 1 calc(50% - 5px)}
  .pv-map .leaflet-top{top:112px}
}
@media (max-width: 640px){
  .pv-wrap{gap:18px}
  .pv-controls .toolbar .btn{flex:1 1 100%}
  .pv-controls .draw-hint{flex-direction:column}
  .pv-controls .draw-hint-icon{width:48px;height:48px}
  .pv-map #map{height:55vh;min-height:320px}
  .pv-map .leaflet-top{top:128px}
}

.pv-info{padding:40px 0;background:linear-gradient(180deg, color-mix(in srgb, var(--surface) 60%, transparent) 0%, transparent 60%)}
.pv-info p{max-width:860px;margin:0 0 14px 0}
.pv-info h2{margin-top:0}
.pv-info h3{margin:24px 0 8px 0}
.pv-info .card{max-width:520px;margin-top:12px}
.pv-info .card .btn{margin-top:8px;max-width:220px}
.pv-info .battery-grid{gap:10px}
.pv-info .battery-grid input{width:100%}
.pv-info .battery-result{margin-top:8px;font-weight:600;color:var(--fg)}
.pv-info .pv-3d{display:flex;gap:20px;align-items:center;flex-wrap:wrap;margin-top:18px}
.pv-info .pv-3d img{width:100%;height:auto;max-width:931px;border-radius:12px;box-shadow:0 2px 10px rgba(0,0,0,0.1)}
.dark .pv-info .pv-3d img{box-shadow:0 2px 16px rgba(0,0,0,0.5)}
.pv-info ul{margin:0 0 14px 20px;padding:0}
.pv-info li{margin:6px 0}
.hr-spaced{margin:30px 0}

/* Utility */
.chips{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}
.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;background:color-mix(in srgb, var(--brand) 14%, transparent);color:var(--brand);font-size:13px;font-weight:600}

@media (max-width:600px){
  .footer-grid{grid-template-columns:1fr}
  .topics-grid{gap:24px}
}

/* === Mobile Map Visibility Hard Fix (final) === */
.pv-map { position: relative; z-index: 1; }
.pv-map #map {
  width: 100%;
  height: 68vh;          /* härtere Höhe für Mobile */
  min-height: 360px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--fg) 8%, transparent);
  background: color-mix(in srgb, var(--muted) 6%, transparent);
  touch-action: auto !important; /* iOS Safari: Leaflet darf Gesten handeln */
}
.leaflet-control-layers { z-index: 10000 !important; pointer-events: auto !important; }
@media (max-width: 768px) { .pv-map .leaflet-top { top: 12px !important; } }


/* === Fix: 3D-PV-Bild skalieren auf Mobilgeräten === */
@media (max-width: 960px) {
  .pv-info .pv-3d img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }
}
