/* photovoltaik.css — „Sonnenbogen“ (nur diese Seite).
   Sehr hell, Sonnengelb und Orange als Hausfarben, Nachtblau als Gegenpol für Verbrauch, Netz und Nacht.
   Runde, weiche Karten. Überschriften Unbounded, Text DM Sans (beide OFL, lokal). Bewusst nur hell. */

@font-face { font-family: "Unbounded"; src: url("../../schrift/muster/unbounded-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Unbounded"; src: url("../../schrift/muster/unbounded-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../../schrift/muster/dm-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../../schrift/muster/dm-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("../../schrift/muster/dm-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root, :root[data-theme="light"] {
  color-scheme: light;
  --flaeche-0: #fffaf0;          /* Morgenlicht */
  --flaeche-1: #ffffff;
  --flaeche-2: #fff0c9;          /* Sonnengelb, ganz hell */
  --linie: #f3d48f;
  --raster: #f7e9c6;
  --text-1: #101a45;             /* fast Nachtblau */
  --text-2: #353f6e;
  --text-3: #555f8c;
  --akzent: #1a2a72;
  --akzent-text: #1a2a72;
  --sonne: #ffc21a;
  --orange: #f07d00;
  --glut: #b84a00;
  --nacht: #16245e;
  --nacht-2: #3346a3;
  --nachtflaeche: #eef0fb;
  /* Energieflüsse: Farbe gehört der Sache, überall gleich */
  --ev: #f07d00;                 /* selbst genutzt */
  --ueber: #ffcb2e;              /* übrig */
  --fehlt: #c9d0f2;              /* fehlt */
  --ver: #16245e;                /* Verbrauch */
  --soc: #7445c9;                /* Speicher */
  --modell: #5a6596;
  --s1: #f07d00; --s2: #16245e; --s3: #ffbf1f; --s4: #7445c9; --s5: #b84a00; --s6: #6f7aa8; --s7: #c2367a; --s8: #0c7d86;
  --q1: #fff3c4; --q2: #ffe08a; --q3: #ffc94d; --q4: #fca72a; --q5: #ef8410; --q6: #cf6100; --q7: #9a4400;
  --gut: #1e7a3c; --gut-text: #1b6634; --kritisch-text: #a3361a;
  --schatten: 0 1px 2px rgb(22 36 94 / .05), 0 18px 40px -24px rgb(22 36 94 / .35);
  --kopfschrift: "Unbounded", "DM Sans", system-ui, sans-serif;
  --rund: 28px;
}

html { overflow-x: clip; }
body { overflow-x: clip; font-family: "DM Sans", system-ui, sans-serif; font-size: 16px; }
:focus-visible { outline: 3px solid var(--nacht-2); outline-offset: 2px; border-radius: 6px; }
.knopf:has(input:focus-visible) { outline: 3px solid var(--nacht-2); outline-offset: 2px; }
.breite { width: min(100% - 32px, 1600px); }

/* ---------- Kopfleiste ---------- */
.a-kopf { background: var(--nacht); border-bottom: 0; }
.a-kopf .a-zurueck { color: #dfe4ff; }
.a-kopf .a-zurueck:hover { color: #fffdf5; }
.a-kopf .a-name { color: #fffdf5; font-family: var(--kopfschrift); font-weight: 500; font-size: 14px; letter-spacing: .01em; display: inline-flex; align-items: center; gap: 10px; }
.a-kopf .a-name::before { content: ""; width: 22px; height: 11px; border-radius: 22px 22px 0 0; background: var(--sonne); }
.a-kopf :focus-visible { outline-color: var(--sonne); }

/* ---------- Titel mit Sonnenscheibe ---------- */
.pv-titel { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 48px; align-items: end; padding: 44px 0 28px; }
.a-titel h1 { font-family: var(--kopfschrift); font-weight: 700; font-stretch: normal; font-size: clamp(30px, 4.2vw, 58px); line-height: 1.04; letter-spacing: -.02em; max-width: 15ch; margin-bottom: 16px; }
.a-titel p { font-size: 18px; max-width: 56ch; }
.a-schild { background: var(--flaeche-1); border: 1px solid var(--linie); }
.a-schild i { background: var(--orange); }
.a-schild.eigen i { background: var(--nacht-2); }
.pv-sonne {
  width: clamp(240px, 26vw, 380px); aspect-ratio: 2 / 1; border-radius: 999px 999px 0 0;
  background: var(--sonne); display: flex; flex-direction: column; justify-content: flex-end; align-items: center;
  padding: 0 18px 16px; text-align: center; position: relative;
}
.pv-sonne::after { content: ""; position: absolute; left: -14px; right: -14px; bottom: -6px; height: 6px; border-radius: 6px; background: var(--nacht); }
.a-titel .pv-sonne-wert { margin: 0; font: 700 clamp(26px, 3vw, 44px)/1.05 var(--kopfschrift); color: var(--text-1); letter-spacing: -.02em; }
.a-titel .pv-sonne-wert small { font-size: .45em; font-weight: 500; margin-left: 8px; }
.a-titel .pv-sonne-name { margin: 4px 0 0; font-size: 14px; color: var(--text-1); max-width: 26ch; }
@media (max-width: 820px) {
  .pv-titel { grid-template-columns: 1fr; padding-top: 32px; }
  .pv-sonne { width: min(100%, 320px); justify-self: start; }
}

/* ---------- Ablage ---------- */
.ablage { border-radius: var(--rund); border: 2px dashed var(--linie); background: var(--flaeche-1); padding: 20px 24px; }
.ablage svg { color: var(--orange); }
.ablage .vorlage-satz { display: block; margin-top: 6px; color: var(--text-1); }
.ablage .knoepfe { max-width: 360px; }
.knopf { border-radius: 999px; background: var(--nacht); }
.knopf.leise { background: var(--flaeche-2); border-color: var(--linie); color: var(--text-1); }
.pv-hinweis { margin: -12px 0 24px; padding: 14px 20px; border-radius: 20px; background: var(--nachtflaeche); color: var(--text-1); font-size: 14px; line-height: 1.55; }
.pv-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }
.knopf { white-space: nowrap; }
.a-titel h1, .abschnitt > h2, .karte-kopf h2, .pv-befunde h3 { text-wrap: balance; }

/* ---------- Karten: rund und weich ---------- */
.gitter { gap: 16px; }
.karte { border: 0; border-radius: var(--rund); box-shadow: var(--schatten); padding: 22px 24px 18px; }
.karte-kopf h2 { font-family: var(--kopfschrift); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.karte-kopf p { color: var(--text-2); font-size: 14px; }
.karte-kopf .tabelle-knopf { border-radius: 999px; min-height: 36px; padding: 0 14px; border-color: var(--linie); color: var(--text-1); font-size: 13px; }
.abschnitt { margin-top: 56px; }
.abschnitt > h2 { font-family: var(--kopfschrift); font-weight: 700; font-size: clamp(22px, 2.4vw, 30px); letter-spacing: -.02em; margin-bottom: 8px; }
.einsicht { border-top-color: var(--raster); font-size: 15px; color: var(--text-1); line-height: 1.55; }
.legende { color: var(--text-2); font-size: 13px; }
.legende i { border-radius: 50%; width: 11px; height: 11px; }
.legende i.strich { border-radius: 2px; height: 3px; width: 18px; }
.legende i.pv-strichel { background: repeating-linear-gradient(90deg, var(--modell) 0 5px, transparent 5px 9px); height: 2px; }
.dia .achse text, .dia text.achse { fill: var(--text-3); font-size: 11.5px; }
.tipp { border-radius: 14px; border-color: var(--linie); }
.tabelle-huelle { border-radius: 16px; }
table.daten th { background: var(--flaeche-2); color: var(--text-1); }
.status.warn { color: #8a5a00; }
.status.info { color: var(--nacht-2); }

/* ---------- Bühne: Tagesbogen ---------- */
.pv-buehne { display: grid; gap: 16px; }
.pv-bogen-karte { padding-top: 24px; }
.pv-tag { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 20px; margin: 4px 0 12px; }
.pv-datum { margin: 0; font: 700 clamp(20px, 2.4vw, 30px)/1.15 var(--kopfschrift); letter-spacing: -.02em; color: var(--text-1); }
.pv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pv-chips li { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--flaeche-0); border: 1px solid var(--raster); font-size: 13px; color: var(--text-2); }
.pv-chips li b { color: var(--text-1); font-weight: 700; font-size: 14px; }
.pv-chips li.marke { background: var(--nachtflaeche); border-color: transparent; color: var(--text-1); font-weight: 600; }
.pv-chips li.marke::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--nacht); align-self: center; }
.pv-chips li.marke.warn::before { background: var(--orange); }
.pv-leg { margin-bottom: 4px; }
#d-bogen .flaeche-nacht { fill: var(--nachtflaeche); }
#d-bogen .begrenzt { stroke: var(--glut); stroke-width: 2; }
#d-bogen .begrenzt-text { fill: var(--glut); font-size: 11.5px; font-weight: 700; }
#d-bogen .kein-wert { fill: var(--text-3); font-size: 12px; }
.pv-soc { margin-top: 6px; }
.pv-soc .soc-name { fill: var(--text-2); font-size: 11.5px; font-weight: 600; }

.pv-regler { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 10px; align-items: center; margin-top: 14px; }
.pv-pfeil { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--nacht); color: #fffdf5; font: 700 22px/1 var(--kopfschrift); cursor: pointer; }
.pv-pfeil:hover { background: var(--nacht-2); }
.pv-pfeil svg { width: 22px; height: 22px; display: block; margin: auto; }
.pv-pfeil:active, .pv-sprung button:active, .knopf:active { transform: translateY(1px); }
.pv-spur { position: relative; height: 64px; }
.pv-spur-bild { position: absolute; inset: 0 0 18px 0; }
.pv-spur-bild svg { display: block; width: 100%; height: 100%; overflow: visible; }
.pv-spur-bild .mon { fill: var(--text-3); font-size: 11px; }
.pv-spur input[type=range] { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 46px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.pv-spur input[type=range]::-webkit-slider-runnable-track { height: 46px; background: transparent; }
.pv-spur input[type=range]::-moz-range-track { height: 46px; background: transparent; }
.pv-spur input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 46px; border-radius: 999px; background: var(--nacht); border: 4px solid var(--sonne); box-shadow: 0 2px 6px rgb(22 36 94 / .35); }
.pv-spur input[type=range]::-moz-range-thumb { width: 12px; height: 40px; border-radius: 999px; background: var(--nacht); border: 4px solid var(--sonne); }
.pv-spur input[type=range]:focus-visible { outline: 3px solid var(--nacht-2); outline-offset: 4px; border-radius: 12px; }
.pv-sprung { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pv-sprung button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--linie); background: var(--flaeche-1); color: var(--text-1); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.pv-sprung button:hover { background: var(--flaeche-2); }
.pv-sprung button[aria-pressed="true"] { background: var(--nacht); border-color: var(--nacht); color: #fffdf5; }

/* ---------- Kalender ---------- */
#d-kalender rect.tag { cursor: pointer; }
#d-kalender rect.tag.gewaehlt { stroke: var(--nacht); stroke-width: 3; }
#d-kalender .kopfzahl { fill: var(--text-3); font-size: 10.5px; }
.pv-kleg { margin-top: 12px; gap: 6px 16px; }
.pv-kleg i { border-radius: 4px; width: 14px; height: 14px; }
.pv-kleg .rampe { display: inline-flex; gap: 2px; margin: 0 4px; }
.pv-kleg .rampe i { width: 12px; }
.pv-kleg svg { width: 14px; height: 14px; }
.pv-wahl { margin: 10px 0 0; font-size: 14px; color: var(--text-2); }
.pv-wahl b { color: var(--text-1); }

/* ---------- Stellschrauben und Kennzahlen ---------- */
.pv-stell { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 8px; }
.pv-stell label { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px 6px 16px; border-radius: 999px; background: var(--flaeche-1); box-shadow: var(--schatten); font-size: 14px; }
.pv-stell label span { color: var(--text-2); }
.pv-stell label small { color: var(--text-3); font-size: 12.5px; padding-right: 8px; }
.pv-stell input, .pv-stell select { min-height: 38px; border: 1px solid var(--linie); border-radius: 999px; background: var(--flaeche-0); color: var(--text-1); font: inherit; font-weight: 700; padding: 0 12px; }
.pv-stell input { width: 78px; text-align: right; }
.pv-stell select { padding-right: 28px; font-weight: 500; }
.pv-stell-neben { margin: 0 0 18px; font-size: 13px; color: var(--text-3); }
.pv-kz { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pv-kz .kz { border: 0; border-radius: 24px; box-shadow: var(--schatten); padding: 18px 20px; background: var(--flaeche-1); }
.pv-kz .kz.ring { grid-row: span 2; display: flex; flex-direction: column; }
.pv-kz .kz.ring svg { width: 100%; max-width: 260px; height: auto; display: block; margin: 6px auto 0; }
.pv-kz .kz.ring .ring-zahl { font: 700 34px var(--kopfschrift); fill: var(--text-1); }
.pv-kz .kz.ring .ring-grund { stroke: var(--flaeche-2); }
.pv-kz .kz-name { font-size: 14px; color: var(--text-2); font-weight: 500; }
.pv-kz .kz-wert { font: 700 clamp(22px, 2.1vw, 30px)/1.15 var(--kopfschrift); letter-spacing: -.02em; margin: 8px 0 4px; }
.pv-kz .kz-wert small { font: 500 13px "DM Sans", sans-serif; color: var(--text-2); }
.pv-kz .kz-neben { font-size: 13.5px; color: var(--text-2); line-height: 1.45; }
.pv-kz .kz.sonnig { background: var(--flaeche-2); box-shadow: none; }
.pv-kz-klein { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 16px; }
@media (max-width: 1100px) { .pv-kz { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pv-kz .kz.ring { grid-row: auto; } }
@media (max-width: 520px) {
  .pv-kz, .pv-kz-klein { grid-template-columns: 1fr 1fr; gap: 10px; }
  .pv-kz .kz.ring { grid-column: 1 / -1; }
  .pv-kz .kz { padding: 14px 16px; border-radius: 20px; }
  .pv-stell label { flex: 1 1 100%; justify-content: space-between; }
  .pv-stell label span { margin-right: auto; }
}

/* ---------- Befunde ---------- */
.pv-befunde { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.pv-befunde li { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 6px 28px; padding: 18px 0; border-top: 1px solid var(--raster); align-items: center; }
.pv-befunde li:first-child { border-top: 0; padding-top: 4px; }
.pv-befunde h3 { margin: 4px 0 4px; font: 700 16px/1.35 var(--kopfschrift); letter-spacing: -.01em; }
.pv-befunde p { margin: 0; color: var(--text-1); font-size: 15px; line-height: 1.55; max-width: 72ch; }
.pv-befunde .mini { width: 220px; }
.pv-befunde .mini svg { width: 100%; height: auto; display: block; background: var(--flaeche-0); border-radius: 16px; }
.pv-befunde .mini p { font-size: 12px; color: var(--text-3); margin-top: 4px; text-align: center; }
@media (max-width: 700px) { .pv-befunde li { grid-template-columns: 1fr; } .pv-befunde .mini { width: min(100%, 260px); } }

/* ---------- Tagesgang, Was wäre wenn, Qualität ---------- */
#d-gang .titel { fill: var(--text-1); font-size: 12.5px; font-weight: 700; }
#d-gang .neben { fill: var(--text-2); font-size: 11px; }
.pv-regelfeld { display: grid; gap: 4px; margin-top: 4px; }
.pv-regelfeld label { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 14px; color: var(--text-2); margin-top: 10px; }
.pv-regelfeld output { font: 700 16px var(--kopfschrift); color: var(--text-1); }
.pv-regelfeld input[type=range] { width: 100%; height: 36px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.pv-regelfeld input[type=range]::-webkit-slider-runnable-track { height: 10px; border-radius: 999px; background: var(--flaeche-2); }
.pv-regelfeld input[type=range]::-moz-range-track { height: 10px; border-radius: 999px; background: var(--flaeche-2); }
.pv-regelfeld input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -8px; border-radius: 50%; background: var(--orange); border: 4px solid var(--flaeche-1); box-shadow: 0 1px 4px rgb(22 36 94 / .4); }
.pv-regelfeld input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--orange); border: 4px solid var(--flaeche-1); }
.pv-ergebnis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.pv-ergebnis div { background: var(--flaeche-0); border-radius: 20px; padding: 12px 16px; }
.pv-ergebnis p { margin: 0; font-size: 13px; color: var(--text-2); }
.pv-ergebnis b { display: block; font: 700 18px/1.3 var(--kopfschrift); color: var(--text-1); margin-top: 4px; }
@media (max-width: 520px) { .pv-ergebnis b { font-size: 15px; } }
.pv-ergebnis div.breit { grid-column: 1 / -1; background: var(--flaeche-2); }
.pv-ergebnis div.breit b { font: 600 16px/1.5 "DM Sans", system-ui, sans-serif; }
.pv-qualitaet { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.pv-qualitaet li { padding: 12px 0; border-top: 1px solid var(--raster); font-size: 14.5px; line-height: 1.5; }
.pv-qualitaet li b { display: block; font-weight: 700; margin: 2px 0 2px; }
@media (max-width: 820px) { .pv-qualitaet { grid-template-columns: 1fr; } .pv-ergebnis { grid-template-columns: 1fr 1fr; } }

.a-fuss { border-top: 0; background: var(--nacht); color: #dfe4ff; margin-top: 72px; }
.a-fuss a { color: #fffdf5; }
.a-fuss .zeichen-link { color: #dfe4ff; }
.a-fuss .zeichen-link:hover { color: var(--nacht); background: var(--sonne); }
.a-fuss :focus-visible { outline-color: var(--sonne); }

/* Druck: Regler und Sprungknöpfe des Tagesbogens weg, der gewählte Tag steht im Berichtskopf und über dem Bogen */
@media print {
  html.druckt .pv-regler, html.druckt .pv-sprung { display: none !important; }
}

/* Verweis auf „Datei erkennen lassen“ */
.erkennen-satz { display: block; margin-top: 6px; font-size: 14px; color: var(--text-2); }
.erkennen-satz a { color: var(--akzent); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
