/* ============================================================
   Die Rechner – Gestaltung
   Nutzt die Markenvariablen aus index.html
   ============================================================ */

.rechner { background: var(--paper, #fff); }

/* ---------- Reiter ---------- */
.r-tabs {
  display: flex; flex-wrap: wrap; gap: .4rem;
  margin-bottom: 1.6rem;
}
.r-tabs button {
  border: 1px solid var(--line, #DCEAE1); background: #fff;
  color: var(--muted, #3E6B70);
  padding: .55rem 1.1rem; border-radius: 999px;
  font-size: .9rem; font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
}
.r-tabs button:hover { border-color: var(--green-100, #B4DAC3); background: var(--cream, #F4FAF6); }
.r-tabs button.on {
  background: var(--green-900, #00555C); color: #fff;
  border-color: var(--green-900, #00555C);
}

/* ---------- Panel ---------- */
.r-panel {
  background: var(--cream, #F4FAF6);
  border: 1px solid var(--line, #DCEAE1);
  border-radius: var(--radius, 14px);
  padding: 1.8rem;
}
.r-kopf h3 {
  font-size: 1.35rem; color: var(--green-950, #003E44);
  letter-spacing: -.01em; margin-bottom: .35rem;
}
.r-lead { color: var(--muted, #3E6B70); max-width: 44rem; margin-bottom: 1.5rem; }

/* ---------- Regler ---------- */
.r-ctrls {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.1rem 1.6rem; margin-bottom: 1.6rem;
}
.r-ctrl label {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: .6rem; margin-bottom: .35rem;
  font-size: .82rem; color: var(--muted, #3E6B70);
}
.r-ctrl label b {
  font-size: .95rem; font-weight: 800; color: var(--green-900, #00555C);
  white-space: nowrap;
}
.r-ctrl input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 5px; border-radius: 999px;
  background: var(--green-100, #B4DAC3); outline: none; cursor: pointer;
}
.r-ctrl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 999px;
  background: var(--green-900, #00555C); border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(20, 40, 30, .3); cursor: grab;
}
.r-ctrl input[type="range"]::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 999px;
  background: var(--green-900, #00555C); border: 3px solid #fff;
  box-shadow: 0 1px 5px rgba(20, 40, 30, .3); cursor: grab;
}
.r-ctrl input[type="range"]:focus-visible { outline: 2px solid var(--green-600, #0F6B73); outline-offset: 4px; }

/* ---------- Ergebnisse ---------- */
.r-res {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: .7rem; margin-bottom: 1.5rem;
}
.r-res-box {
  background: #fff; border: 1px solid var(--line, #DCEAE1);
  border-radius: 11px; padding: .85rem 1rem;
}
.r-res-box .lbl {
  display: block; font-size: .7rem; letter-spacing: .04em;
  text-transform: uppercase; color: var(--muted, #3E6B70); margin-bottom: .25rem;
}
.r-res-box b {
  font-size: 1.25rem; font-weight: 800; color: var(--ink, #204A4F);
  letter-spacing: -.01em; white-space: nowrap;
}
.r-res-box.stark { background: var(--green-900, #00555C); border-color: var(--green-900, #00555C); }
.r-res-box.stark .lbl { color: rgba(255,255,255,.7); }
.r-res-box.stark b { color: #fff; }
.r-res-box.gold { border-color: var(--gold, #C7A500); }
.r-res-box.gold b { color: #8A7200; }
.r-res-box.warn { border-color: #E8C4BB; background: #FDF6F4; }
.r-res-box.warn b { color: #A8412F; }

/* ---------- Grafik ---------- */
.r-chart { margin-bottom: .5rem; }
.r-chart svg { width: 100%; height: auto; display: block; }
.r-achse {
  display: flex; justify-content: space-between;
  font-size: .7rem; color: var(--muted, #3E6B70); padding: .3rem .2rem 0;
}
.r-achse.breit span { flex: 1; text-align: center; }

.r-legende {
  display: flex; flex-wrap: wrap; gap: 1.1rem;
  font-size: .78rem; color: var(--muted, #3E6B70); margin-bottom: 1.2rem;
}
.r-legende span { display: inline-flex; align-items: center; gap: .4rem; }
.r-legende i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }

/* ---------- Einordnung ---------- */
.r-bild {
  background: #fff; border-left: 3px solid var(--green-100, #B4DAC3);
  padding: .75rem 1rem; border-radius: 0 9px 9px 0;
  font-size: .9rem; color: var(--ink, #204A4F); margin-bottom: .8rem;
}
.r-note {
  font-size: .8rem; color: var(--muted, #3E6B70);
  line-height: 1.55; margin: 0;
}

@media (max-width: 600px) {
  .r-panel { padding: 1.2rem 1rem; }
  .r-res-box b { font-size: 1.1rem; }
}
