/* Kostenrechner */

.kosten-hero { min-height: min(68dvh, 720px); }
.kosten-hero h1 { font-size: clamp(40px, 5.4vw, 80px); max-width: 15ch; }
@media (prefers-reduced-motion: no-preference) {
  .kosten-hero img { animation: k-settle 2.4s var(--ease) both; }
  .kosten-hero h1, .kosten-hero .lead, .kosten-hero .actions { animation: k-rise 1s var(--ease) both; }
  .kosten-hero .lead { animation-delay: .12s; }
  .kosten-hero .actions { animation-delay: .22s; }
}
@keyframes k-settle { from { transform: scale(1.08); } }
@keyframes k-rise { from { opacity: 0; transform: translateY(28px); } }

/* calculator */
.kosten { padding-top: clamp(48px, 6vw, 88px); }
.k-title { margin-bottom: clamp(28px, 4vw, 48px); }
.years-word { color: var(--rot); white-space: nowrap; }
.k-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(28px, 4vw, 72px); align-items: start; }
.k-controls { display: grid; gap: 26px; position: sticky; top: calc(var(--head-h) + 24px); }
.k-controls .label { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 8px; }
.k-set { border: 0; margin: 0; padding: 0; min-width: 0; gap: 12px; }
.k-scale { display: flex; justify-content: space-between; color: var(--granit); margin-top: -4px; }
.switch { display: flex; align-items: center; gap: 12px; font-weight: 600; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 46px; height: 26px; border-radius: 13px; background: var(--linie); position: relative; flex: none; transition: background .25s; }
.switch .track::after { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .3s var(--ease); }
.switch input:checked + .track { background: var(--rot); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--rot); outline-offset: 3px; }
.k-controls .chip { min-height: 40px; padding: 0 14px; font-size: 14.5px; }

/* the striking part: one big total and the gap to the most expensive */
.k-verdict { background: var(--nacht); color: #fff; border-radius: var(--r); padding: clamp(24px, 3vw, 40px); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 24px clamp(24px, 3vw, 48px); align-items: end; }
.k-big { display: block; font-size: clamp(64px, 8.4vw, 136px); line-height: .82; color: var(--rot); letter-spacing: -.035em; white-space: nowrap; }
.k-who { margin: 16px 0 0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.4; color: #fff; max-width: 34ch; }
.k-verdict a { color: #fff; font-weight: 700; text-decoration-color: var(--rot); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.k-verdict a:hover { color: var(--rot); }
.k-diff { border-left: 2px solid rgba(255, 255, 255, .18); padding-left: clamp(18px, 2vw, 32px); }
.k-diff[hidden] { display: none; }
.k-diff-n { display: block; font-size: clamp(40px, 4.4vw, 68px); line-height: .9; letter-spacing: -.02em; white-space: nowrap; }
.k-diff-t { margin: 10px 0 0; color: var(--nebel); font-size: 15px; line-height: 1.45; }
.k-none { font-weight: 800; font-stretch: 108%; font-size: clamp(22px, 2.2vw, 30px); margin: 0 0 8px; }
.k-verdict:has(.k-none) { display: block; }
.k-count { color: var(--granit); margin: 22px 0 10px; }

.k-list { list-style: none; margin: 0 0 32px; padding: 0; }
.k-row { display: grid; grid-template-columns: 30px 48px minmax(0, 1fr) auto auto; gap: 6px 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--linie); }
.k-row:first-child { border-top: 2px solid var(--tinte); }
.k-rank { font-size: 20px; color: var(--granit); text-align: right; }
.k-row .who { min-width: 0; }
.k-row .who a { font-weight: 800; font-stretch: 108%; font-size: 19px; text-decoration: none; }
.k-row .who a:hover { color: var(--rot); }
.k-plan { font-size: 14px; color: var(--granit); }
.k-dom { display: inline-flex; align-items: center; gap: 4px; margin-left: 6px; white-space: nowrap; font-weight: 600; }
.k-dom.yes { color: var(--gruen); }
.k-dom .ph { font-size: 15px; }
.k-total { text-align: right; font-size: clamp(28px, 3vw, 40px); line-height: 1; white-space: nowrap; }
.k-total small { display: block; font-size: 13px; font-stretch: 100%; font-weight: 500; color: var(--granit); margin: 4px 0 0; }
.k-row .bar { grid-column: 3 / 5; height: 6px; background: var(--tinte); border-radius: 1px; width: var(--w); transition: width .7s var(--ease); }
.k-row.first .bar { background: var(--rot); }
.k-row.first .k-rank { color: var(--rot); }
.k-cmp { grid-column: 5; grid-row: 1; }
.k-cmp .cmp-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* closing band */
.k-more-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 88px); align-items: start; }
.k-more .lead { margin-top: 18px; }
.k-more-actions { margin-top: 28px; }
.k-more .prose { font-size: 16px; color: var(--nebel); }
.k-more .prose a { color: #fff; }
.k-more .prose strong { color: #fff; }

@media (max-width: 900px) {
  .k-grid, .k-more-grid { grid-template-columns: minmax(0, 1fr); }
  .k-controls { position: static; }
  .k-verdict { grid-template-columns: minmax(0, 1fr); }
  .k-diff { border-left: 0; border-top: 2px solid rgba(255, 255, 255, .18); padding: 18px 0 0; }
}
@media (max-width: 560px) {
  .k-row { grid-template-columns: 22px 40px minmax(0, 1fr) auto; gap: 4px 10px; }
  .k-row .logo-tile { width: 40px; height: 40px; }
  .k-rank { font-size: 17px; }
  .k-total { grid-column: 4; grid-row: 1; font-size: 26px; }
  .k-row .bar { grid-column: 3 / 5; grid-row: 2; }
  .k-cmp { grid-column: 3; grid-row: 3; justify-self: start; margin-left: -6px; }
  .k-dom { display: flex; margin: 2px 0 0; }
}
