/* TraumStil Mehrwert-Rechner – Farben laut CI */
.tsr {
  --tsr-gg: #c5d6d1; --tsr-ggl: #e8f0ed; --tsr-an: #364446; --tsr-ans: #5f6d6f;
  --tsr-ro: #c38aa3; --tsr-rol: #f3e7ec; --tsr-w: #ffffff;
  font-family: inherit; color: var(--tsr-an); line-height: 1.45; max-width: 1080px; margin: 0 auto;
  box-sizing: border-box;
}
.tsr *, .tsr *::before, .tsr *::after { box-sizing: border-box; }
.tsr h2, .tsr h3 { color: var(--tsr-an); margin: 0; font-weight: 500; letter-spacing: 0; }
.tsr p { margin: 0; }
.tsr a { color: var(--tsr-an); text-decoration: underline; text-decoration-color: var(--tsr-ro); text-underline-offset: 3px; }

/* Kopf */
.tsr-head { background: var(--tsr-gg); padding: 28px 32px; border-bottom: 3px solid var(--tsr-ro); }
.tsr-head h2 { font-size: 28px; line-height: 1.2; }
.tsr-head p { margin-top: 6px; font-size: 16px; }

/* Eingabefelder */
.tsr input[type=text] {
  width: 100%; font: inherit; font-size: 16px; color: var(--tsr-an); background: var(--tsr-w);
  border: 1px solid var(--tsr-ro); border-radius: 2px; padding: 10px 12px; min-height: 44px;
}
.tsr input:focus, .tsr a:focus-visible, .tsr button:focus-visible { outline: 2px solid var(--tsr-an); outline-offset: 2px; }
.tsr-btn {
  display: inline-block; font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
  background: var(--tsr-an); color: var(--tsr-w); border: 0; border-radius: 2px; padding: 12px 24px; min-height: 46px;
}
.tsr-btn:hover { background: #26302f; }
.tsr-btn:disabled { opacity: .6; cursor: wait; }
.tsr-btn-quiet { background: var(--tsr-w); color: var(--tsr-an); border: 1px solid var(--tsr-an); }
.tsr-btn-quiet:hover { background: var(--tsr-ggl); }

/* Rechner */
.tsr-app { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 28px; padding: 28px 0; align-items: start; }
.tsr-step { margin-bottom: 28px; }
.tsr-step-h { display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--tsr-ro); padding-bottom: 8px; margin-bottom: 8px; }
.tsr-num { width: 28px; height: 28px; border: 1.5px solid var(--tsr-ro); border-radius: 50%; display: grid; place-items: center; font-size: 14px; font-weight: 500; flex: 0 0 auto; }
.tsr-step-h h3 { font-size: 19px; }
.tsr-step-h small { margin-left: auto; font-size: 13px; color: var(--tsr-ans); font-style: italic; }
.tsr-row { display: grid; grid-template-columns: minmax(0, 1fr) 170px; gap: 12px; align-items: center; padding: 9px 0; }
.tsr-row .tsr-l { font-size: 15px; }
.tsr-row .tsr-h { display: block; font-size: 12.5px; color: var(--tsr-ans); font-weight: 300; }
.tsr-in { position: relative; }
.tsr .tsr-in input { text-align: right; padding-right: 50px; }
.tsr-in span { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; color: var(--tsr-ans); pointer-events: none; }
.tsr-calc { background: var(--tsr-ggl); border-radius: 2px; padding: 10px 12px; text-align: right; min-height: 44px; font-weight: 500; }

/* Ergebnis */
.tsr-res { position: sticky; top: 24px; }
.tsr-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tsr-kpi { border-radius: 6px; padding: 14px 12px; text-align: center; background: var(--tsr-gg); }
.tsr-kpi small { display: block; font-size: 13px; }
.tsr-kpi b { display: block; font-size: 24px; font-weight: 700; margin-top: 4px; white-space: nowrap; }
.tsr-kpi i { display: block; font-size: 11.5px; font-style: normal; margin-top: 2px; }
.tsr-kpi.dark { background: var(--tsr-an); color: var(--tsr-w); }
.tsr-kpi.rose { background: var(--tsr-rol); border: 1px solid var(--tsr-ro); }
.tsr-bar { background: var(--tsr-ggl); border-radius: 6px; padding: 12px 14px; margin-top: 10px; font-size: 15px; }
.tsr-bar b { white-space: nowrap; }
.tsr-card { border: 1px solid var(--tsr-ggl); border-radius: 6px; padding: 14px 16px; margin-top: 14px; }
.tsr-card h3 { font-size: 16px; margin-bottom: 6px; display: flex; justify-content: space-between; align-items: baseline; }
.tsr-card h3 small { font-size: 12px; color: var(--tsr-ans); font-weight: 300; font-style: italic; }
.tsr-line { display: grid; grid-template-columns: 16px 1fr auto; gap: 6px; font-size: 14px; padding: 4px 0; }
.tsr-line .s { font-weight: 700; }
.tsr-line .v { text-align: right; white-space: nowrap; }
.tsr-line.total { background: var(--tsr-rol); margin: 6px -8px 0; padding: 8px; border-radius: 2px; font-weight: 500; }
.tsr-cmp { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tsr-cmp th { font-weight: 500; color: var(--tsr-ans); font-size: 12px; text-align: right; padding: 2px 0 6px; }
.tsr-cmp th:first-child, .tsr-cmp td:first-child { text-align: left; }
.tsr-cmp td { text-align: right; padding: 4px 0; border-top: 1px solid var(--tsr-ggl); white-space: nowrap; }
.tsr-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.tsr-note { font-size: 12px; color: var(--tsr-ans); margin-top: 14px; }

@media (max-width: 900px) {
  .tsr-app { grid-template-columns: 1fr; }
  .tsr-res { position: static; }
}
@media (max-width: 600px) {
  .tsr-head { padding: 20px 16px; }
  .tsr-row { grid-template-columns: 1fr; gap: 6px; }
  .tsr-step-h small { display: none; }
}
.tsr-cmp td + td, .tsr-cmp th + th { padding-left: 8px; }
.tsr-line.tsr-sub { font-size: 12.5px; color: var(--tsr-ans); padding-top: 0; }
.tsr-cta { background: var(--tsr-gg); border-radius: 6px; padding: 18px 16px; margin-top: 16px; }
.tsr-cta h3 { font-size: 18px; margin-bottom: 6px; }
.tsr-cta p { font-size: 14px; margin-bottom: 12px; }
.tsr-cta .tsr-btn { text-decoration: none; display: inline-block; }
.tsr-cta small { display: block; font-size: 12px; margin-top: 10px; color: var(--tsr-an); }
.tsr a.tsr-btn { color: var(--tsr-w); text-decoration: none; }
.tsr a.tsr-btn:hover { color: var(--tsr-w); }

/* Mobile Feinschliff (übernommen von der Testseite) */
.tsr-app, .tsr-inputs, .tsr-res, .tsr-card { min-width: 0; max-width: 100%; }
.tsr-actions .tsr-btn { display: block; width: 100%; white-space: normal; text-align: center; }
@media (max-width: 600px) {
  .tsr-kpi { min-width: 0; }
  .tsr-kpi b { white-space: normal; overflow-wrap: anywhere; font-size: clamp(17px, 5vw, 24px); }
  .tsr-line { grid-template-columns: 14px minmax(0, 1fr) auto; gap: 4px; font-size: 13px; }
  .tsr-bar b { white-space: normal; }
  .tsr-cmp, .tsr-cmp tbody { display: block; width: 100%; font-size: 14px; }
  .tsr-cmp tr:first-child { display: none; }
  .tsr-cmp tr:not(:first-child) { display: block; padding: 8px 0; border-top: 1px solid var(--tsr-ggl); }
  .tsr-cmp td { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%; padding: 4px 0 !important; border: 0; white-space: normal; text-align: right; font-size: 13px; }
  .tsr-cmp td:first-child { display: block; font-weight: 600; text-align: left; padding-bottom: 6px; }
  .tsr-cmp td:nth-child(2)::before { content: "Ohne Home Staging"; color: var(--tsr-ans); }
  .tsr-cmp td:nth-child(3)::before { content: "Mit Home Staging"; color: var(--tsr-ans); }
  .tsr-cmp td:nth-child(4)::before { content: "Differenz"; color: var(--tsr-ans); }
  .tsr-actions .tsr-btn { font-size: 15px; padding: 12px 14px; }
}

/* Ergebnis-Leiste auf dem Handy */
.tsr-mbar { display: none; }
@media (max-width: 900px) {
  .tsr-mbar.on {
    display: flex; position: fixed; left: 72px; right: 12px; bottom: 16px; z-index: 50; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--tsr-an); color: var(--tsr-w); border: 0; border-radius: 6px; padding: 12px 16px; font: inherit; font-size: 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,.18); cursor: pointer; text-align: left;
  }
  .tsr-mbar b { font-size: 16px; }
  .tsr-mbar span { font-size: 13px; white-space: nowrap; text-decoration: underline; text-decoration-color: var(--tsr-ro); }
}

/* ---------- Druckbericht ---------- */
.tsr-report { display: none; }
@media print {
  @page { size: A4; margin: 12mm 13mm 10mm; }
  /* alles außer dem Bericht (und seinen umgebenden Containern) ausblenden */
  body *:not(:has(.tsr-report)):not(.tsr-report):not(.tsr-report *) { display: none !important; }
  html, body, body *:has(.tsr-report) {
    display: block !important; margin: 0 !important; padding: 0 !important; border: 0 !important; background: none !important;
    box-shadow: none !important; width: auto !important; max-width: none !important; min-width: 0 !important;
    height: auto !important; min-height: 0 !important; position: static !important; transform: none !important;
    overflow: visible !important; float: none !important; grid-template-columns: none !important;
  }
  .tsr-mbar { display: none !important; }
  .tsr-report { display: block !important; color: #364446; font-size: 9pt; line-height: 1.35; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tsr-rp { width: 100%; border-collapse: collapse; }
  .tsr-rp > tbody > tr > td, .tsr-rp > tfoot > tr > td { padding: 0; border: 0; }
  .tsr-rp-footspace { height: 13mm; }
  .tsr-rp-foot {
    position: fixed; left: 0; right: 0; bottom: 0; height: 9mm; border-top: 0.6pt solid #c38aa3; padding-top: 2mm;
    display: flex !important; justify-content: space-between; align-items: center; font-size: 7.5pt; color: #5f6d6f; background: #fff;
  }
  .tsr-rp-foot b { color: #364446; font-weight: 600; }
  .tsr-rp-contacts { display: inline-flex; align-items: center; gap: 4px; }
  .tsr-rp-contacts svg { width: 10px; height: 10px; display: inline-block; vertical-align: middle; }
  .tsr-rp-contacts .tsr-house { width: 5px; height: 8px; margin: 0 3px; }
  .tsr-rp-head { display: flex; align-items: center; justify-content: space-between; background: #c5d6d1; border-bottom: 1.5pt solid #c38aa3; padding: 4mm 5mm; margin-bottom: 5mm; }
  .tsr-rp-head img { height: 15mm; width: auto; display: block; }
  .tsr-rp-head h1 { font-size: 15pt; font-weight: 500; margin: 0; text-align: right; color: #364446; }
  .tsr-rp-head p { font-size: 8.5pt; margin: 1mm 0 0; text-align: right; }
  .tsr-rp-kpis { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 3mm; }
  .tsr-rp-kpis div { background: #c5d6d1; border-radius: 2mm; padding: 3mm 2mm; text-align: center; }
  .tsr-rp-kpis div.dark { background: #364446; color: #fff; }
  .tsr-rp-kpis div.rose { background: #f3e7ec; border: 0.8pt solid #c38aa3; }
  .tsr-rp-kpis small { display: block; font-size: 8pt; }
  .tsr-rp-kpis b { display: block; font-size: 14pt; margin-top: 1mm; white-space: nowrap; }
  .tsr-rp-kpis i { display: block; font-size: 7pt; font-style: normal; }
  .tsr-rp-bar { background: #e8f0ed; border-radius: 2mm; padding: 2.5mm 4mm; margin: 3mm 0 4mm; font-size: 9.5pt; text-align: center; }
  .tsr-rp-cols { display: grid !important; grid-template-columns: 1fr 1.15fr; gap: 6mm; }
  .tsr-rp h2 { font-size: 10.5pt; font-weight: 600; margin: 0 0 1.5mm; padding-bottom: 1mm; border-bottom: 0.6pt solid #c38aa3; display: flex; justify-content: space-between; align-items: baseline; }
  .tsr-rp h2 small { font-size: 7.5pt; font-weight: 300; font-style: italic; color: #5f6d6f; }
  .tsr-rp-cols > div > h2 ~ h2 { margin-top: 4mm; }
  .tsr-rp-in, .tsr-rp-cmp, .tsr-rp-ln { width: 100%; border-collapse: collapse; font-size: 8.5pt; }
  .tsr-rp-in td { padding: 0.8mm 0; border-bottom: 0.4pt solid #e8f0ed; vertical-align: top; }
  .tsr-rp-in td + td { text-align: right; white-space: nowrap; padding-left: 2mm; }
  .tsr-rp-in tr.grp td { font-weight: 600; padding-top: 2mm; border-bottom: 0; }
  .tsr-rp-cmp th { font-weight: 500; color: #5f6d6f; font-size: 7.5pt; text-align: right; padding: 0 0 1mm; }
  .tsr-rp-cmp td { text-align: right; padding: 0.8mm 0 0.8mm 2mm; border-top: 0.4pt solid #e8f0ed; white-space: nowrap; }
  .tsr-rp-cmp td:first-child { text-align: left; padding-left: 0; }
  .tsr-rp-ln td { padding: 0.8mm 0; }
  .tsr-rp-ln td.s { width: 4mm; font-weight: 700; }
  .tsr-rp-ln td:last-child { text-align: right; white-space: nowrap; }
  .tsr-rp-ln tr.tot td { background: #f3e7ec; font-weight: 600; padding: 1.5mm 1mm; }
  .tsr-rp-ln tr.sub td { font-size: 7.5pt; color: #5f6d6f; }
  .tsr-rp-note { font-size: 7pt; color: #5f6d6f; margin-top: 5mm; }
  .tsr-rp-cols, .tsr-rp-kpis, .tsr-rp-head { break-inside: avoid; }
}
