/* ==========================================================
   KzT Einfacher Planer (früher Rentnermodus) – große Schrift, große Knöpfe, hoher Kontrast
   ========================================================== */

/* ---------- Reiter oben: Einfacher Planer ▾ · Komplexer Planer ▾ (beide gleich) ---------- */
.planer-tabs { display: flex; gap: .5rem; margin-left: auto; margin-right: 1.2rem; }
.lupe { position: relative; }
.lupe__btn {
  display: inline-flex; align-items: center; gap: .4rem; cursor: pointer;
  font: inherit; font-weight: 600; font-size: .9rem; color: var(--blue-dark);
  background: var(--sand); border: 2px solid var(--sand-dark); border-radius: 999px; padding: .45rem .95rem;
}
.lupe__btn i { font-style: normal; font-size: .75rem; transition: transform .15s; }
.lupe__btn[aria-expanded="true"] i { transform: rotate(180deg); }
.lupe__kurz { display: none; }
.lupe__btn:hover, .lupe__btn[aria-expanded="true"] { border-color: var(--blue); }
/* beide Reiter sehen immer gleich aus – kein farbiger „aktiv“-Zustand */
.lupe__menu {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(380px, 92vw); z-index: 60;
  background: var(--white); border-radius: var(--radius); box-shadow: 0 20px 50px rgba(14, 39, 66, .25); padding: .8rem;
}
.lupe__title { font-size: .8rem; color: var(--muted); margin: .2rem .4rem .6rem; }
.lupe__item {
  width: 100%; display: flex; align-items: center; gap: .8rem; text-align: left; cursor: pointer; font: inherit; color: var(--ink);
  background: none; border: 2px solid transparent; border-radius: 14px; padding: .7rem .8rem;
}
.lupe__item:hover:not([disabled]) { background: var(--sand); }
.lupe__item.is-on { border-color: var(--blue); background: rgba(42, 109, 176, .06); }
.lupe__item[disabled] { opacity: .45; cursor: default; }
.lupe__item b { display: block; font-size: 1rem; }
.lupe__item small { color: var(--muted); font-size: .8rem; }
.lupe__icon { font-size: 1.7rem; width: 2.2rem; text-align: center; flex: none; }
.lupe__off { border-top: 1px solid var(--sand-dark); border-radius: 0 0 14px 14px; margin-top: .3rem; }

/* ---------- Rentner-Ansicht ---------- */
.rentner { background: var(--sand); min-height: calc(100vh - 68px); padding: 1.5rem 0 4rem; font-size: 1.3rem; line-height: 1.55; color: #0b1626; }
.r-wrap { max-width: 900px; margin: 0 auto; padding: 0 18px; }
.rentner h1 { font-size: clamp(2rem, 4.6vw, 2.8rem); line-height: 1.15; margin: .4rem 0 .8rem; color: var(--blue-deep); }
.r-h2 { font-size: 1.6rem; color: var(--blue-deep); margin: 2rem 0 .8rem; }
.r-lead { font-size: 1.35rem; color: #26364d; max-width: none; margin-bottom: 1.4rem; }
.r-small { font-size: 1rem; color: var(--muted); }
.r-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.r-badge { background: var(--blue-dark); color: var(--white); border-radius: 999px; padding: .35rem 1rem; font-size: 1rem; font-weight: 600; }
.r-exit { font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; background: var(--white); color: var(--red); border: 2px solid var(--red); border-radius: 999px; padding: .45rem 1.1rem; }
.r-top__btns { display: flex; gap: .6rem; flex-wrap: wrap; }
.r-reset { font: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; background: var(--white); color: var(--blue-dark); border: 2px solid var(--blue-dark); border-radius: 999px; padding: .45rem 1.1rem; }
.r-modal { position: fixed; inset: 0; z-index: 100; background: rgba(11, 22, 38, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.r-modal__box { background: var(--white); border-radius: 22px; max-width: 560px; width: 100%; padding: 1.6rem 1.6rem 1.4rem; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); font-size: 1.2rem; }
.r-modal__icon { font-size: 3.2rem; line-height: 1; }
.r-modal__box h2 { font-size: 1.8rem; color: var(--blue-deep); margin: .4rem 0 .6rem; }
.r-modal__box p { margin: .4rem 0; }
.r-modal__btns { display: flex; flex-direction: column; gap: .8rem; margin-top: 1.2rem; }
.r-modal__btns .r-btn { width: 100%; }
.r-btn.r-btn--danger { color: var(--red); border-color: var(--red); background: var(--white); }
.r-prog { height: 14px; background: var(--white); border-radius: 999px; overflow: hidden; border: 2px solid var(--sand-dark); }
.r-prog div { height: 100%; background: linear-gradient(90deg, var(--blue), var(--blue-dark)); border-radius: 999px; transition: width .3s; }
.r-stepper { display: flex; flex-wrap: wrap; gap: .45rem; margin: .7rem 0 1rem; }
.r-stepper__btn { width: 46px; height: 46px; border-radius: 50%; font: inherit; font-size: 1.1rem; font-weight: 700; cursor: pointer; border: 2px solid var(--sand-dark); background: var(--white); color: var(--muted); }
.r-stepper__btn.is-besucht { border-color: var(--blue); color: var(--blue-dark); }
.r-stepper__btn.is-aktuell { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); cursor: default; }
.r-stepper__btn:disabled:not(.is-aktuell) { opacity: .45; cursor: not-allowed; }
.r-stepper__btn:not(:disabled):hover { background: #eaf2fb; }
.r-stepper__btn:focus-visible { outline: 4px solid var(--yellow); outline-offset: 2px; }
.r-step { font-size: 1.05rem; font-weight: 600; color: var(--muted); margin: .4rem 0 0; }

/* Auswahl-Knöpfe */
.r-choices { display: grid; gap: 1rem; margin: 1rem 0 1.4rem; }
.r-choice {
  display: flex; align-items: center; gap: 1.1rem; text-align: left; cursor: pointer; font: inherit; font-size: 1.45rem; font-weight: 700; color: var(--ink);
  background: var(--white); border: 3px solid var(--sand-dark); border-radius: 20px; padding: 1.1rem 1.4rem; min-height: 88px;
}
.r-choice small { display: block; font-size: 1.05rem; font-weight: 500; color: var(--muted); }
.r-choice__icon { font-size: 2.2rem; flex: none; }
.r-choice:hover { border-color: var(--blue); }
.r-choice.is-sel { border-color: var(--blue-dark); background: #eaf2fb; box-shadow: 0 0 0 5px rgba(42, 109, 176, .2); }
.r-choice:focus-visible, .r-btn:focus-visible, .r-ger__ctl button:focus-visible { outline: 4px solid var(--yellow); outline-offset: 3px; }

/* Navigation */
.r-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.8rem; flex-wrap: wrap; }
.r-btn {
  font: inherit; font-size: 1.4rem; font-weight: 700; cursor: pointer; min-height: 70px; padding: .8rem 2rem;
  background: var(--red); color: var(--white); border: 3px solid var(--red); border-radius: 999px;
}
.r-btn--ghost { background: var(--white); color: var(--blue-dark); border-color: var(--blue-dark); }
.r-btn--print { background: var(--blue-dark); border-color: var(--blue-dark); }
.r-btn--small { font-size: 1.1rem; min-height: 54px; padding: .5rem 1.4rem; margin-top: .8rem; }

/* Hinweis-Kästen */
.r-box { border-radius: 18px; padding: 1.1rem 1.4rem; margin: 1rem 0; border: 3px solid; background: var(--white); }
.r-box h3 { font-size: 1.4rem; margin-bottom: .4rem; }
.r-box--info { border-color: var(--blue); }
.r-box--warn { border-color: #E0A100; background: #fff8e1; }
.r-box--ok { border-color: #1E7B3C; background: #edf8f0; }
.r-list { margin: .3rem 0 0; padding-left: 0; list-style: none; }
.r-list li { padding: .25rem 0; }
.r-stop { display: flex; gap: 1.2rem; align-items: flex-start; background: #fdeceb; border: 3px solid var(--red); border-radius: 20px; padding: 1.2rem 1.4rem; margin-bottom: 1.4rem; }
.r-stop > span { font-size: 3.4rem; line-height: 1; }
.r-stop h1 { margin-top: 0; color: var(--red); }

/* Formular */
.r-form { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.4rem; }
.r-field span { display: block; font-size: 1.1rem; font-weight: 700; margin-bottom: .3rem; }
.r-field input { width: 100%; font: inherit; font-size: 1.3rem; padding: .8rem 1rem; border: 3px solid var(--sand-dark); border-radius: 14px; background: var(--white); }
.r-field input:focus { outline: none; border-color: var(--blue); }

/* Brief (A4-Vorschau) */
.r-brief { background: var(--white); color: #000; font-size: 1.05rem; line-height: 1.5; padding: 2.4rem 2.6rem; border-radius: 6px; box-shadow: 0 10px 30px rgba(14, 39, 66, .15); position: relative; }
.r-brief h2 { font-size: 1.2rem; margin: 1.6rem 0 1rem; }
.r-brief ul { padding-left: 1.2rem; }
.r-brief li { margin-bottom: .35rem; }
.r-brief__abs { font-size: .95rem; }
.r-brief__an { margin-top: 1.6rem; }
.r-brief__datum { position: absolute; right: 2.6rem; top: 2.4rem; }
.r-blank { color: #999; border-bottom: 1px dotted #999; }
.r-sign { border-top: 1px solid #000; width: 260px; padding-top: .2rem; margin-top: 3rem; font-size: .85rem; }
.r-sign-row { display: flex; gap: 2rem; flex-wrap: wrap; }
.r-brief__vorstand { margin-top: 2rem; border: 2px dashed #555; padding: 1rem 1.2rem; border-radius: 6px; }

/* Gartenordnung hochladen + Prüfung */
.r-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; background: var(--white); border: 3px dashed var(--blue); border-radius: 20px; padding: 1.2rem 1.4rem; margin: 1rem 0 .4rem; }
.r-upload__txt { flex: 1 1 320px; }
.r-upload__txt b { display: block; font-size: 1.35rem; }
.r-upload__txt small b { display: inline; font-size: inherit; }
.r-upload__txt small { display: block; font-size: 1.05rem; color: var(--muted); margin-top: .2rem; }
.r-btn--upload { display: inline-flex; align-items: center; background: var(--blue-dark); border-color: var(--blue-dark); }
.r-upload__last { width: 100%; margin: 0; font-size: 1.05rem; }
.r-upload--gross { border-width: 4px; border-style: solid; background: #eaf2fb; padding: 1.5rem 1.6rem; }
.r-upload--gross .r-upload__txt > b { font-size: 1.6rem; }
.r-upload--gross .r-btn--upload { font-size: 1.5rem; min-height: 80px; padding: .9rem 2.2rem; }
.r-callhint { margin-top: 1.6rem; padding-top: 1rem; border-top: 2px solid var(--sand-dark); font-size: 1.1rem; color: #26364d; }
.r-callhint p { margin: 0 0 .4rem; }
.r-callhint .r-btn { text-decoration: none; display: inline-flex; align-items: center; margin-top: 0; }
.r-btn--call { display: inline-flex; align-items: center; text-decoration: none; background: #1E7B3C; border-color: #1E7B3C; color: var(--white); margin-top: .4rem; }
.r-nav .r-link { font-size: 1.1rem; align-self: center; }
.r-link { font: inherit; font-weight: 700; color: var(--blue-dark); background: none; border: none; text-decoration: underline; cursor: pointer; padding: 0; }
.r-wait { text-align: center; padding: 1.5rem 0; }
.r-wait .r-lead { margin-left: auto; margin-right: auto; max-width: 40em; }
.r-wait__spin { width: 84px; height: 84px; margin: 0 auto 1rem; border-radius: 50%; border: 10px solid var(--sand-dark); border-top-color: var(--blue-dark); animation: r-spin 1s linear infinite; }
@keyframes r-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .r-wait__spin { animation-duration: 4s; } }
.r-treffer { display: grid; gap: .8rem; }
.r-treffer__item { margin: 0; background: var(--white); border-left: 8px solid var(--blue); border-radius: 12px; padding: .9rem 1.1rem; font-size: 1.15rem; line-height: 1.5; }
.r-treffer__item--verbot { border-left-color: var(--red); background: #fdeceb; }
.r-treffer__item--bedingung { border-left-color: #E0A100; background: #fff8e1; }
.r-treffer__item--erlaubt { border-left-color: #1E7B3C; background: #edf8f0; }
.r-treffer__art { display: block; font-size: .95rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: .3rem; }
.r-treffer mark { background: var(--yellow); padding: 0 .15em; border-radius: 3px; }
.r-kw { color: var(--red); }

/* Geräte */
.r-geraete { display: grid; gap: .7rem; }
.r-ger { display: flex; align-items: center; gap: 1rem; background: var(--white); border: 3px solid var(--sand-dark); border-radius: 18px; padding: .7rem 1rem; }
.r-ger.is-on { border-color: var(--blue); }
.r-ger--verboten { background: #fdeceb; }
.r-ger--verboten.is-on { border-color: var(--red); }
.r-ger--verboten .r-ger__txt small { color: var(--red); font-weight: 600; }
.r-ger__icon { font-size: 2rem; flex: none; }
.r-ger__txt { flex: 1; }
.r-ger__txt b { display: block; font-size: 1.3rem; }
.r-ger__txt small { color: var(--muted); font-size: 1rem; }
.r-ger__ctl { display: inline-flex; align-items: center; gap: .6rem; }
.r-ger__ctl b { min-width: 2.2rem; text-align: center; font-size: 1.6rem; }
.r-ger__ctl button { width: 58px; height: 58px; border-radius: 50%; font: inherit; font-size: 2rem; font-weight: 700; line-height: 1; cursor: pointer; border: 3px solid var(--blue-dark); background: var(--white); color: var(--blue-dark); }
.r-ger__ctl button[data-d="1"] { background: var(--blue-dark); color: var(--white); }
.r-ger__ctl--big b { min-width: 4.5rem; }
.r-gruppe { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: 1.35rem; color: var(--blue-deep); margin: 1.6rem 0 .6rem; padding-bottom: .3rem; border-bottom: 3px solid var(--sand-dark); }
.r-gruppe span { font-size: 1.6rem; }
.r-gruppe small { margin-left: auto; font-size: .95rem; font-weight: 600; color: var(--white); background: var(--blue); border-radius: 999px; padding: .15rem .7rem; }
.r-tipps .r-list li { display: flex; gap: .8rem; align-items: flex-start; padding: .45rem 0; border-top: 1px solid var(--sand); }
.r-tipps .r-list li:first-child { border-top: none; }
.r-tipps .r-list li > span { font-size: 1.6rem; line-height: 1.2; flex: none; }
.r-tipps .r-list b { font-weight: 600; }
.r-tipps .r-list b b { font-weight: 800; }
.r-tipps small { display: block; color: #26364d; font-size: 1.05rem; }
.r-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 1.4rem 0; }
.r-sum div { background: var(--blue-dark); color: var(--white); border-radius: 18px; padding: 1rem 1.2rem; }
.r-sum span { display: block; font-size: 1rem; opacity: .8; }
.r-sum b { font-size: 2rem; color: var(--yellow); }

/* Kabel */
.r-dist { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; background: var(--white); border: 3px solid var(--sand-dark); border-radius: 18px; padding: 1rem 1.2rem; margin-bottom: 1rem; }
.r-dist b { font-size: 1.35rem; }
.r-dist small { display: block; color: var(--muted); font-size: 1rem; }
.r-modwahl { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin: 1rem 0; }
.r-modwahl > b { width: 100%; }
.r-pill { font: inherit; font-size: 1.1rem; font-weight: 600; cursor: pointer; border: 3px solid var(--sand-dark); background: var(--white); border-radius: 999px; padding: .5rem 1.1rem; }
.r-pill.is-sel { border-color: var(--blue-dark); background: var(--yellow); }

/* Ergebnis */
.r-results { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.r-res { display: flex; gap: 1rem; background: var(--white); border: 3px solid var(--blue); border-radius: 18px; padding: 1rem 1.2rem; }
.r-res__icon { font-size: 2.4rem; }
.r-res small { display: block; font-size: 1rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.r-res b { display: block; font-size: 1.4rem; color: var(--blue-deep); line-height: 1.25; }
.r-res p { margin: .3rem 0 0; font-size: 1rem; color: #26364d; }
.r-table { width: 100%; border-collapse: collapse; background: var(--white); border-radius: 18px; overflow: hidden; font-size: 1.2rem; }
.r-table th, .r-table td { padding: .8rem 1rem; text-align: left; border-bottom: 2px solid var(--sand); vertical-align: top; }
.r-table th { background: var(--blue-dark); color: var(--white); font-size: 1rem; }
.r-table td small { display: block; font-size: .95rem; color: var(--muted); }
.r-table td b { font-size: 1.5rem; color: var(--red); white-space: nowrap; }
.r-check { display: grid; gap: .6rem; }
.r-check__item { display: flex; gap: 1rem; align-items: flex-start; background: var(--white); border: 3px solid var(--sand-dark); border-radius: 16px; padding: .8rem 1rem; cursor: pointer; }
.r-check__item input { width: 30px; height: 30px; margin-top: .2rem; accent-color: #1E7B3C; flex: none; }
.r-check__item b { display: block; }
.r-check__item small { color: var(--muted); font-size: 1rem; }
.r-check__item.is-done { border-color: #1E7B3C; background: #edf8f0; }
.r-print-head { display: none; }
.r-print-only { display: none; }
.r-kosten td:last-child, .r-kosten th:last-child { text-align: right; white-space: nowrap; }
.r-kosten td:last-child { font-weight: 600; }
.r-kosten__summe td { background: #eaf2fb; border-top: 3px solid var(--blue-dark); }
.r-kosten__summe td b { font-size: 1.5rem; color: var(--blue-deep); }
.r-kosten__spanne { font-size: 1.15rem; margin: .7rem 0; }
.r-sum div span + b + span { font-size: .9rem; opacity: .75; margin-top: .1rem; }
.r-tech { margin: 1.6rem 0 1rem; background: var(--white); border: 2px solid var(--sand-dark); border-radius: 16px; padding: .8rem 1.1rem; }
.r-tech summary { cursor: pointer; font-size: 1.05rem; font-weight: 600; color: var(--muted); }
.r-tech[open] summary { margin-bottom: .6rem; }
.r-tech .r-table { font-size: 1rem; }
.r-tech .r-table td b { font-size: 1.15rem; }
.r-box .r-btn--small { margin-left: .4rem; }

@media (max-width: 720px) {
  .planer-tabs { margin-right: .3rem; gap: .3rem; order: 2; }
  .lupe__btn { font-size: .8rem; padding: .35rem .6rem; gap: .25rem; }
  .lupe__lang { display: none; }
  .lupe__kurz { display: inline; }
  .brand span { display: none; }
  .lupe .lupe__menu { position: fixed; left: 8px; right: 8px; top: 64px; width: auto; }
  .rentner { font-size: 1.15rem; }
  .r-form, .r-results { grid-template-columns: 1fr; }
  .r-ger { flex-wrap: wrap; }
  .r-ger__ctl { margin-left: auto; }
  .r-brief { padding: 1.4rem; }
  .r-brief__datum { position: static; margin-top: 1rem; }
  .r-btn { width: 100%; }
  .nav__toggle { order: 3; }
  .r-table { font-size: 1rem; }
  .r-table th, .r-table td { padding: .6rem .5rem; }
  .r-table td b { font-size: 1.2rem; }
  .r-table th:nth-child(2), .r-table td:nth-child(2) { white-space: nowrap; }
}

/* ---------- Druck: nur Brief oder nur Plan ---------- */
@media print {
  body[data-print] .nav, body[data-print] main, body[data-print] .footer, body[data-print] .no-print, body[data-print] .r-top,
  body[data-print] .r-prog, body[data-print] .r-step, body[data-print] .rentner h1, body[data-print] .r-lead { display: none !important; }
  body[data-print] .rentner { background: none; padding: 0; min-height: 0; font-size: 11pt; }
  body[data-print="brief"] #rPlan { display: none !important; }
  body[data-print="brief"] .r-brief { box-shadow: none; padding: 0; font-size: 11pt; }
  body[data-print="plan"] #rBrief { display: none !important; }
  body[data-print="plan"] .r-print-head { display: block; font-size: 12pt; border-bottom: 2px solid #000; padding-bottom: .3rem; margin-bottom: .8rem; }
  body[data-print="plan"] .r-res, body[data-print="plan"] .r-check__item { break-inside: avoid; border-width: 1.5px; }
  body[data-print] .r-print-only { display: inline; }
  @page { size: A4 portrait; margin: 15mm; }
}
