/* PV-Rentabilitätsrechner (baut auf ../style.css auf) */
.calc { padding-top: 70px; padding-bottom: 100px; }
.calc h1 { font: 300 clamp(2rem, 5.5vw, 3.6rem)/1.05 var(--display); text-transform: uppercase; color: var(--ink); margin-bottom: 22px; }
.calc h1 b { font-weight: 700; color: #fff; text-shadow: 0 0 26px rgba(159, 212, 255, .45); }
.calc-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 48px; align-items: start; }

.inputs fieldset { border: 0; border-top: 1px solid var(--rule); margin: 0 0 26px; padding: 0; min-width: 0; }
.inputs legend { padding: 0 12px 0 0; font: 500 13px/1 var(--display); letter-spacing: .24em; text-transform: uppercase; color: var(--hot); }
.inputs label { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0 0; color: var(--text); font-size: .95rem; line-height: 1.3; }
.inputs label small { display: block; color: var(--soft); font-size: .8rem; }
.inputs .in { flex: none; display: flex; align-items: center; width: 150px; border: 1px solid var(--rule); background: var(--panel); transition: border-color .2s, box-shadow .2s; }
.inputs .in:focus-within { border-color: var(--volt); box-shadow: 0 0 14px rgba(159, 212, 255, .3); }
.inputs input:not([type=checkbox]) { width: 100%; min-width: 0; background: none; border: 0; outline: 0; color: #fff; font: 500 1.05rem/1 var(--display); padding: 10px 6px 10px 12px; text-align: right; font-variant-numeric: tabular-nums; }
.inputs input:disabled { color: var(--soft); }
.inputs input.bad { color: #ff8f7a; }
.inputs .in i { flex: none; font-style: normal; color: var(--soft); font-size: .8rem; padding-right: 10px; min-width: 48px; }
.inputs .check { justify-content: flex-start; cursor: pointer; }
.inputs .check input { width: 18px; height: 18px; accent-color: var(--volt); }

.results { position: sticky; top: 76px; min-width: 0; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.kpis li { padding: 18px 20px; background: var(--panel); min-width: 0; }
.kpis .big { padding: 24px 20px; }
.kpis span { display: block; color: var(--soft); font-size: .85rem; line-height: 1.3; }
.kpis strong { display: block; margin-top: 6px; font: 400 1.4rem/1.15 var(--display); color: var(--ink); font-variant-numeric: tabular-nums; }
.kpis .big strong { font: 300 clamp(1.7rem, 2.6vw, 2.3rem)/1.1 var(--display); color: #fff; text-shadow: 0 0 26px rgba(159, 212, 255, .4); }

.chart { margin: 34px 0 0; }
.chart figcaption { color: var(--ink); font: 500 1rem/1.3 var(--display); letter-spacing: .04em; margin-bottom: 12px; }
.chart figcaption small { display: block; color: var(--soft); font: .85rem/1.4 "Segoe UI", system-ui, sans-serif; letter-spacing: 0; }
.chart-box { position: relative; }
#chart { display: block; width: 100%; height: auto; overflow: visible; }
#chart text { fill: var(--soft); font: 12px "Segoe UI", system-ui, sans-serif; }
#chart .grid { stroke: var(--rule); stroke-width: 1; }
#chart .zero { stroke: var(--soft); stroke-width: 1; }
#chart .band { fill: #9fd4ff; opacity: .18; }
#chart .line { fill: none; stroke: #9fd4ff; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
#chart .span { fill: #ffc24a; opacity: .1; }
#chart .line2 { fill: none; stroke: #8a97ab; stroke-width: 2; stroke-dasharray: 6 5; }
#chart .cross { stroke: var(--ink); stroke-width: 1; opacity: .5; }
#chart .dot { fill: #9fd4ff; stroke: var(--bg); stroke-width: 2; }
#chart .bk { fill: var(--ink); font-weight: 600; }
.tip { position: absolute; z-index: 3; pointer-events: none; background: #0d1322; border: 1px solid var(--volt); padding: 8px 12px; font-size: .85rem; line-height: 1.45; color: var(--text); white-space: nowrap; transform: translate(-50%, -100%); box-shadow: 0 8px 30px rgba(0, 0, 0, .6); }
.tip b { color: #fff; }
.legend { display: flex; gap: 20px; margin-top: 8px; color: var(--soft); font-size: .85rem; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 7px; }

.year1 { margin-top: 22px; color: var(--soft); font-size: .95rem; }
.year1 b { color: var(--ink); font-weight: 600; }
details { margin-top: 22px; border-top: 1px solid var(--rule); }
summary { cursor: pointer; padding: 14px 0; color: var(--ink); font: 500 .95rem/1 var(--display); letter-spacing: .08em; }
summary:hover, summary:focus-visible { color: var(--volt); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
th, td { text-align: right; padding: 7px 10px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
th { color: var(--soft); font-weight: 500; }
td:first-child, th:first-child { text-align: left; }

.note { margin-top: 60px; padding: 22px 26px; background: var(--panel); border: 1px solid var(--rule); border-left: 2px solid var(--hot); color: var(--soft); font-size: .92rem; }
.note p + p { margin-top: .8em; }

@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; gap: 30px; }
  .results { position: static; }
}
@media (max-width: 1150px) {
  .kpis .big { grid-column: span 2; }
}
@media (max-width: 520px) {
  .calc { padding-top: 44px; }
  .inputs .in { width: 132px; }
}

/* Dachflächen, Spanne */
.inputs .in.two input { text-align: center; padding: 10px 2px; }
.inputs .in.two em { font-style: normal; color: var(--soft); }
.roofs { padding-top: 12px; }
.roofs-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: .95rem; }
.roofs-head b { color: var(--ink); font-weight: 600; }
.add, .roof button { background: none; border: 1px solid var(--rule); color: var(--soft); font: 500 .8rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; padding: 9px 14px; cursor: pointer; white-space: nowrap; }
.add:hover, .add:focus-visible, .roof button:hover, .roof button:focus-visible { border-color: var(--volt); color: #fff; }
.roof { display: grid; grid-template-columns: 92px 1fr 78px 34px; gap: 6px; margin-top: 8px; }
.roof .in { width: auto; }
.roof .in i { min-width: 0; }
.roof select { min-width: 0; background: var(--panel); color: #fff; border: 1px solid var(--rule); font: inherit; font-size: .9rem; padding: 0 6px; }
.roof select:focus { outline: 0; border-color: var(--volt); }
.roof button { padding: 0; color: var(--soft); font-size: 1.1rem; }
.inputs label[hidden], .inputs fieldset[hidden] { display: none; }
.inputs select { width: 100%; background: none; border: 0; outline: 0; color: #fff; font: 500 .95rem/1 var(--display); padding: 10px 8px; }
.inputs select option { background: #0a0e18; color: #fff; }
.inputs .in.wide { width: 172px; }
.inputs .in.wide input { text-align: left; padding-right: 10px; font-size: .95rem; }
.more { margin: 4px 0 26px; border-block: 1px solid var(--rule); }
.more > summary { padding: 16px 0; font: 500 .95rem/1 var(--display); letter-spacing: .08em; color: var(--volt); cursor: pointer; }
.more[open] > summary { margin-bottom: 14px; }
.more fieldset:last-child { margin-bottom: 14px; }
.assume { color: var(--text); }
.x-add { margin-top: 16px; width: 100%; }
.legend i { width: 22px; height: 0; border-radius: 0; border-top: 2px solid #9fd4ff; vertical-align: middle; }
.legend i.lg2 { border-top: 2px dashed #8a97ab; }
.hint { margin-top: 12px; color: var(--soft); font-size: .85rem; line-height: 1.4; }
.hint b { color: var(--ink); font-weight: 600; }
.kpis li[hidden] { display: none; }
.kpis .wide { grid-column: span 2; }
#chart .today { stroke: #ffc24a; stroke-width: 1; stroke-dasharray: 4 4; }
.kpis small { display: block; margin-top: 8px; color: var(--soft); font-size: .85rem; }
.note .src { font-size: .8rem; }

/* PDF-Ausdruck */
.print-only { display: none; }
.pdf-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.pdf-row .hint { margin: 0; }
@media print {
  @page { margin: 14mm; }
  :root { --bg: #fff; --panel: #fff; --ink: #000; --text: #111; --soft: #444; --rule: #bbb; --volt: #1a5fb4; --hot: #8a4b00; color-scheme: light; }
  html, body { background: #fff !important; }
  body * { color: #111 !important; text-shadow: none !important; box-shadow: none !important; }
  .site-header, .site-footer, form.inputs, .pdf-row, .tip, .calc > .eyebrow, .calc > .section-lead, summary { display: none !important; }
  .print-only { display: block; }
  .print-head { font-size: 9pt; color: #444 !important; margin-bottom: 4mm; }
  .calc { padding: 0; max-width: none; font-size: 10pt; line-height: 1.45; }
  .calc h1 { font-size: 20pt; margin-bottom: 3mm; }
  .calc h1 b { color: #000 !important; }
  .print-only h2 { font: 600 12pt/1.2 var(--display); text-transform: none; margin: 5mm 0 2mm; }
  #print-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8mm; margin: 0; }
  #print-inputs div { display: flex; justify-content: space-between; gap: 4mm; border-bottom: .3pt solid #bbb; padding: 1mm 0; }
  #print-inputs dt { color: #444 !important; }
  #print-inputs dd { margin: 0; font-weight: 600; text-align: right; }
  .calc-grid { display: block; }
  .results { position: static; }
  .kpis { grid-template-columns: 1fr 1fr; background: #bbb; border-color: #bbb; break-inside: avoid; }
  .kpis li, .kpis .big { background: #fff; padding: 2.5mm 3mm; }
  .kpis .big strong { font-size: 15pt; }
  .kpis strong { font-size: 12pt; }
  .chart { break-inside: avoid; margin-top: 5mm; }
  #chart text { fill: #333; }
  #chart .grid { stroke: #ccc; }
  #chart .zero { stroke: #555; }
  #chart .line { stroke: #1a5fb4; }
  #chart .band { fill: #1a5fb4; opacity: .15; }
  #chart .line2 { stroke: #666; }
  #chart .today { stroke: #8a4b00; }
  #chart .span { fill: #c98a00; opacity: .12; }
  #hover { display: none; }
  .legend i { border-top-color: #1a5fb4; }
  .legend i.lg2 { border-top-color: #666; }
  details { border: 0; margin-top: 5mm; }
  .table-wrap { overflow: visible; }
  table { font-size: 8pt; }
  th, td { padding: 1mm 1.5mm; border-bottom: .3pt solid #bbb; }
  tr { break-inside: avoid; }
  .note { margin-top: 6mm; padding: 0; border: 0; background: #fff; font-size: 8.5pt; }
}

.legend[hidden] { display: none; }
