/* windCORES Colocation – Energie-Status und Widgets. CI wie www.windcores-colocation.de */
:root {
  --petrol: #005471; --petrol-800: #0b3644; --petrol-900: #0b2630; --petrol-950: #071a21;
  --blue: #0082ae; --green: #9fba00; --green-700: #6f8400; --green-light: #cad46e;
  --bg: #fff; --bg-soft: #f2f6f8; --text: #1d2a30; --muted: #566a73;
  --on-dark: #dce9ee; --on-dark-muted: #a9c3cc; --border: #dbe4e9; --line-dark: rgba(255,255,255,.12);
  --radius: 12px; --wrap: 1180px; --gutter: 20px;
}
*, *::before, *::after { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
body { margin: 0; font-family: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif; font-size: 17px; line-height: 1.6; color: var(--text); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; font-weight: 500; color: var(--petrol); text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.3rem); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.8vw, 2.4rem); font-weight: 400; }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1em; }
b, strong { font-weight: 500; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 max(var(--gutter), env(safe-area-inset-left)); }
.ico { width: 18px; height: 18px; flex: none; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 62ch; }
.small { font-size: .875rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 500; color: var(--green-700); margin: 0 0 .7em; }
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 10px 22px; border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 500; font-size: .95rem; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--green); color: var(--petrol-900); }
.btn-primary:hover { background: var(--green-light); color: var(--petrol-900); }
.btn-ghost { border-color: currentColor; color: var(--petrol); background: transparent; }
.btn-ghost:hover { background: var(--petrol); color: #fff; border-color: var(--petrol); }
.btn-light { border-color: rgba(255,255,255,.55); color: #fff; }
.btn-light:hover { background: #fff; color: var(--petrol); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.4em; }

/* Kopf wie Website */
.wwbar { background: var(--petrol-950); color: var(--on-dark-muted); font-size: .82rem; border-bottom: 1px solid var(--line-dark); }
.wwbar-in { display: flex; align-items: center; gap: 16px; min-height: 36px; }
.wwbar b { color: #fff; font-weight: 500; }
.wwbar a { color: #fff; text-decoration: none; margin-left: auto; white-space: nowrap; }
@media (max-width: 560px) { .wwbar-firma { display: none; } }
.header { background: var(--petrol-900); border-bottom: 1px solid var(--line-dark); }
.header-in { display: flex; align-items: center; gap: 16px; min-height: 72px; flex-wrap: wrap; }
.brand-link { text-decoration: none; }
.brand { display: inline-flex; align-items: flex-end; gap: 10px; }
.brand img { height: 40px; width: auto; }
.brand-suffix { font-weight: 300; font-size: 1.2rem; color: #fff; line-height: 1; padding: 0 0 3px 10px; border-left: 2px solid var(--green); }
.nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--on-dark); text-decoration: none; padding: 8px 11px; border-radius: 8px; font-size: .95rem; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a[aria-current] { color: #fff; box-shadow: inset 0 -2px 0 var(--green); border-radius: 0; }
@media (max-width: 640px) { .brand img { height: 32px; } .brand-suffix { font-size: 1rem; } .nav { margin-left: 0; width: 100%; padding-bottom: 8px; } .nav a { padding: 6px 8px; font-size: .9rem; } }

.phero { background: radial-gradient(120% 90% at 85% 10%, var(--petrol-800) 0%, var(--petrol-900) 55%, var(--petrol-950) 100%); color: var(--on-dark); padding: clamp(32px, 5vw, 64px) 0; }
.phero h1 { color: #fff; }
.phero h1 em { font-style: normal; font-weight: 300; color: var(--green-light); }
.phero .lead { color: var(--on-dark-muted); }
.phero .eyebrow { color: var(--green-light); }
.section { padding: clamp(48px, 6vw, 88px) 0; }
.section-soft { background: var(--bg-soft); }
.section-dark { background: var(--petrol-900); color: var(--on-dark); }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark .lead { color: var(--on-dark-muted); }
.section-head { max-width: 760px; margin-bottom: 32px; }

/* Live-Zusammenfassung im Kopf */
.e-live { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 22px; font-size: .95rem; color: var(--on-dark-muted); }
.e-live b { color: #fff; }

/* Drei Rechenzentren */
.e-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.e-rz { background: rgba(255,255,255,.03); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: 22px; display: flex; flex-direction: column; }
.e-rz h3 { margin: 0; }
.e-rz .e-kurz { color: var(--green-light); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 500; margin: 0 0 4px; }
.e-rz .e-svg { margin: 8px auto 6px; width: 100%; max-width: 260px; }
.e-rz p { color: var(--on-dark-muted); font-size: .95rem; }
.e-rz .e-streifen { margin-top: auto; }

/* Status-Zeile */
.e-status { display: flex; gap: 10px; align-items: flex-start; margin: 4px 0 12px; }
.e-status .e-sw { margin-top: 5px; }
.e-status b { display: block; font-size: 1.1rem; }
.e-status span.e-unter { font-size: .88rem; opacity: .85; }

/* ---------- Farben je Darstellung (auch Widget) ---------- */
/* hell = Standard; dunkel überschreibt danach (Reihenfolge wichtig, .section-dark hat auch .section) */
body, .section, .e-hell {
  --e-turm: #e3edf1; --e-turm-l: #8fb1bd; --e-ebene: #f7fafb; --e-rack: #d3e3e9; --e-rack-l: #7fa3b0; --e-led: #0082ae;
  --e-rotor: #6e8c97; --e-wind: #7f9800; --e-netz: #7a949d; --e-boden: #b6c8cf; --e-mast: #8aa3ab;
  --e-c-eigen: #9fba00; --e-c-mix: #0082ae; --e-c-netz: #a9bbc2; --e-leer: #e7eef1;
}
.section-dark, .phero, .e-dunkel {
  --e-turm: #14414f; --e-turm-l: #3f7d92; --e-ebene: #0c2a34; --e-rack: #1d4553; --e-rack-l: #4c8ea3; --e-led: #8fd0e6;
  --e-rotor: #eef6f8; --e-wind: #d4dc5a; --e-netz: #e6f1f4; --e-boden: #3d6b7a; --e-mast: #9fb3ba;
  --e-c-eigen: #b5cc2e; --e-c-mix: #3cc3ee; --e-c-netz: #7a949d; --e-leer: rgba(255,255,255,.08);
}
.e-svg { display: block; overflow: visible; }
.e-svg .e-boden { stroke: var(--e-boden); stroke-width: 1.4; }
.e-svg .e-turm { fill: var(--e-turm); stroke: var(--e-turm-l); stroke-width: 1; }
.e-svg .e-gondel { fill: var(--e-rotor); }
.e-svg .e-rotor { fill: var(--e-rotor); transform-box: view-box; }
.e-svg .e-rotor.dreht { animation: e-spin 6s linear infinite; }
.e-svg .e-ebene { fill: var(--e-ebene); stroke: var(--e-turm-l); stroke-width: .8; }
.e-svg .e-rack { fill: var(--e-rack); stroke: var(--e-rack-l); stroke-width: .6; }
.e-svg .e-led { fill: var(--e-led); }
.e-svg .e-cube { fill: var(--e-turm); stroke: var(--e-turm-l); stroke-width: 1; }
.e-svg .e-cube-l { stroke: var(--e-turm-l); stroke-width: .8; }
.e-svg .e-bat { fill: var(--e-c-eigen); }
.e-svg .e-solar path:first-child { fill: var(--e-rack); stroke: var(--e-led); stroke-width: .8; }
.e-svg .e-solar-l { fill: none; stroke: var(--e-led); stroke-width: .5; }
.e-svg .e-mast { fill: none; stroke: var(--e-mast); stroke-width: 1.2; stroke-linejoin: round; }
.e-svg .e-flow { fill: none; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 5; opacity: .18; }
.e-svg .e-flow.an { opacity: 1; animation: e-flow 1s linear infinite; }
.e-svg .e-wind { stroke: var(--e-wind); }
.e-svg .e-netz { stroke: var(--e-netz); }
@keyframes e-spin { to { transform: rotate(360deg); } }
@keyframes e-flow { to { stroke-dashoffset: -14; } }

/* Status-Farbfeld: Farbe + Füllhöhe (nicht nur Farbe) */
.e-sw { display: inline-block; width: 14px; height: 14px; border-radius: 3px; background: var(--e-leer); position: relative; overflow: hidden; flex: none; }
.e-sw i, .e-h i { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 2px; }
.e-eigen i { height: 100%; background: var(--e-c-eigen); }
.e-mix i { height: 60%; background: var(--e-c-mix); }
.e-netz i { height: 28%; background: var(--e-c-netz); }
.e-keine i { height: 0; }

/* Prognose-Streifen */
.e-streifen { display: flex; gap: 2px; align-items: stretch; height: 34px; padding-bottom: 18px; position: relative; box-sizing: content-box; }
.e-h { flex: 1; position: relative; background: var(--e-leer); border-radius: 3px; min-width: 2px; }
.e-h:first-child { outline: 2px solid currentColor; outline-offset: 1px; }
.e-tick { position: absolute; top: 100%; left: 0; margin-top: 3px; font-size: 10.5px; white-space: nowrap; opacity: .75; }
.e-legende { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .85rem; }
.e-legende li { display: flex; align-items: center; gap: 7px; }

/* Tooltip für Streifen und Diagramm */
.e-tip { position: fixed; z-index: 100; pointer-events: none; background: var(--petrol-950); color: #fff; font-size: .82rem; padding: 6px 10px; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.25); max-width: 260px; }

/* Wind-Diagramm */
.e-chart { position: relative; }
.e-chart svg { width: 100%; height: auto; display: block; }
.e-chart .c-grid { stroke: rgba(255,255,255,.1); stroke-width: 1; }
.e-chart .c-ax { fill: var(--on-dark-muted); font-size: 11px; }
.e-chart .c-line { fill: none; stroke: var(--e-c-mix); stroke-width: 2; stroke-linejoin: round; }
.e-chart .c-area { fill: var(--e-c-mix); opacity: .12; }
.e-chart .c-now { stroke: var(--green-light); stroke-width: 1; stroke-dasharray: 3 3; }
.e-chart .c-cross { stroke: #fff; stroke-width: 1; opacity: 0; }
.e-chart .c-dot { fill: var(--e-c-mix); stroke: var(--petrol-900); stroke-width: 2; opacity: 0; }
.e-chart.hover .c-cross, .e-chart.hover .c-dot { opacity: 1; }
.e-prog-rows { display: grid; gap: 14px; margin-top: 18px; }
.e-prog-row { display: grid; grid-template-columns: 140px 1fr; gap: 12px; align-items: start; }
.e-prog-row b { font-size: .95rem; color: #fff; padding-top: 6px; }
@media (max-width: 640px) { .e-prog-row { grid-template-columns: 1fr; gap: 4px; } }
.e-tabelle { margin-top: 18px; }
.e-tabelle summary { cursor: pointer; color: var(--on-dark-muted); }
.e-tabelle table { border-collapse: collapse; font-size: .85rem; margin-top: 10px; width: 100%; }
.e-tabelle th, .e-tabelle td { text-align: left; padding: 4px 8px; border-bottom: 1px solid var(--line-dark); }
.e-tabelle-wrap { max-height: 360px; overflow: auto; }

/* Erklärung / Karten hell */
.cards { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.card p:last-child { margin-bottom: 0; }
.card .nr { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--petrol); color: #fff; font-weight: 500; font-size: .9rem; margin-bottom: 10px; }
.hinweis { border-left: 3px solid var(--green); padding: 4px 0 4px 16px; color: var(--muted); max-width: 75ch; }

/* Generator */
.gen { display: grid; gap: 32px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 980px) { .gen { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.gen fieldset { border: 0; margin: 0 0 22px; padding: 0; }
.gen legend { font-weight: 500; color: var(--petrol); margin-bottom: 8px; font-size: 1.02rem; }
.gen .opts { display: grid; gap: 8px; }
.gen label.opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; cursor: pointer; background: #fff; }
.gen label.opt:has(input:checked) { border-color: var(--petrol); box-shadow: inset 0 0 0 1px var(--petrol); background: #f4f9fb; }
.gen label.opt input { margin-top: 5px; accent-color: var(--petrol); }
.gen label.opt span small { display: block; color: var(--muted); font-size: .85rem; }
.gen .opts-row { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.gen-vorschau { position: sticky; top: 16px; }
.gen-buehne { border: 1px dashed var(--border); border-radius: var(--radius); padding: 24px; display: grid; place-items: center; min-height: 200px; background-image: linear-gradient(45deg, #f6f9fa 25%, transparent 25%, transparent 75%, #f6f9fa 75%), linear-gradient(45deg, #f6f9fa 25%, transparent 25%, transparent 75%, #f6f9fa 75%); background-size: 20px 20px; background-position: 0 0, 10px 10px; }
.gen-buehne.dunkel { background: #2b3a40; border-color: #2b3a40; }
.gen-buehne iframe { border: 0; max-width: 100%; display: block; }
.gen textarea { width: 100%; min-height: 150px; font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; border: 1px solid var(--border); border-radius: 10px; padding: 12px; background: var(--bg-soft); color: var(--text); resize: vertical; }
.gen .kopiert { color: var(--green-700); font-weight: 500; margin-left: 10px; }

/* Footer wie Website */
.footer { background: var(--petrol-950); color: var(--on-dark-muted); padding: 48px 0 calc(24px + env(safe-area-inset-bottom)); font-size: .95rem; }
.footer a { color: var(--on-dark); text-decoration: none; }
.footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.footer-h { color: #fff; font-size: 1rem; font-weight: 500; margin-bottom: 10px; }
.footer-list { list-style: none; margin: 0; padding: 0; }
.footer-list li { margin-bottom: 6px; }
.footer-brand .brand img { height: 36px; }
.footer-brand p { margin-top: 16px; }
.footer-legal { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; border-top: 1px solid var(--line-dark); margin-top: 36px; padding-top: 18px; font-size: .85rem; }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
