/* Rechner: links das grüne Feld mit der Frage groß und dem Fortschritt, rechts die Antworten.
   Gleiche Schrift, Farben und Ecken wie die Seiten; Formularfelder dürfen Rahmen haben. */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
body.calc-page { background: var(--paper) }
.calc-shell { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); min-height: 100svh }

.calc-side { grid-column: 1 / span 5; background: var(--green); color: #fff; position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column;
  padding: 28px max(var(--m), env(safe-area-inset-left, 0px)) 36px }
.calc-side .brand { color: #fff }
.side-body { margin-top: auto; margin-bottom: auto; padding-block: 48px }
.progress { display: flex; gap: 6px; margin: 0 0 14px; max-width: 520px }
.progress span { flex: 1; height: 6px; background: rgba(255,255,255,.28); transition: background-color .3s }
.progress span.on { background: var(--yellow) }
.stepinfo { font-size: var(--s-small); font-weight: 700; margin: 0 0 28px }
.side-q { font-size: clamp(2rem, 1rem + 2.6vw, 3.5rem); font-weight: 700; line-height: 0.98; letter-spacing: -0.035em; margin: 0; max-width: 16ch; text-wrap: balance }
.side-why { font-size: var(--s-lead); line-height: 1.35; margin: 28px 0 0; max-width: 32ch }
.side-foot { font-size: var(--s-small); margin: 0; max-width: 46ch; color: rgba(255,255,255,.9) }

.calc-main { grid-column: 6 / span 7; padding: clamp(40px, 7vw, 120px) max(var(--m), env(safe-area-inset-right, 0px)) clamp(48px, 7vw, 120px) clamp(28px, 4vw, 72px); display: flex; flex-direction: column; justify-content: center }
.calc-main form { max-width: 720px; width: 100% }
.step { animation: einblenden .45s cubic-bezier(.16,1,.3,1) }
@keyframes einblenden { from { opacity: 0; transform: translateY(14px) } to { opacity: 1; transform: none } }
@media (prefers-reduced-motion: reduce) { .step { animation: none } }

.grid { display: grid; gap: 26px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)) }
.grid3 { display: grid; gap: 10px 12px; grid-template-columns: minmax(120px, 1.4fr) repeat(3, minmax(0, 1fr)); align-items: center }
.grid3 .h { font-size: var(--s-small); font-weight: 700; text-align: right }
.grid3 .rl { font-size: 1rem; font-weight: 600 }
/* Beschriftung oben, Feld darunter, Hinweis unter dem Feld: so stehen alle Felder einer Zeile auf gleicher Höhe */
label.f { display: flex; flex-direction: column; gap: 8px; font-size: 1rem; font-weight: 700; min-width: 0 }
label.f > input, label.f > select { order: 2 }
label.f .hint { order: 3 }
.hint { font-weight: 400; font-size: 0.9375rem; line-height: 1.4; color: var(--ink-2) }
input[type=text], select { font: inherit; font-size: 1.125rem; font-weight: 600; color: var(--ink); background-color: var(--paper); border: 2px solid var(--ink); border-radius: 0; padding: 0 16px; height: 60px; width: 100%; min-width: 0 }
input[type=text]::placeholder { color: #6f7671; font-weight: 400 }
input[type=text]:focus, select:focus { outline: 4px solid var(--yellow); outline-offset: 0 }
select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1.5l6 6 6-6' fill='none' stroke='%230d0f0e' stroke-width='2.2' stroke-linecap='square'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 18px center }
select.empty { color: #6f7671; font-weight: 400 }
.grid3 input { text-align: right; font-variant-numeric: tabular-nums; padding: 0 12px; height: 54px }

/* Auswahl als große Flächen; die gewählte wird schwarz */
.opts { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)) }
.opts.four { grid-template-columns: repeat(4, minmax(0, 1fr)) }
.opt { position: relative; min-height: 112px; padding: 20px; cursor: pointer; background: var(--tile); display: flex; flex-direction: column; justify-content: flex-end; gap: 4px;
  transition: background-color .15s, color .15s }
.opts.four .opt, .opts.two .opt { min-height: 76px }
.opt input { position: absolute; opacity: 0; pointer-events: none }
.opt:hover { background: var(--concrete) }
.opt b { font-weight: 700; font-size: 1.25rem; letter-spacing: -0.015em; line-height: 1.1 }
.opts.four .opt b { font-size: 1rem }
.opt span { font-size: var(--s-small) }
.opt:has(input:checked) { background: var(--ink); color: #fff }
.opt:focus-within { outline: 4px solid var(--yellow); outline-offset: 0 }

.row { display: flex; gap: 14px; align-items: flex-start; font-size: 1rem; margin-top: 20px; max-width: 64ch }
.row input[type=checkbox] { margin-top: 2px; width: 22px; height: 22px; flex: none; accent-color: var(--ink) }
.gap { margin-top: 28px }
.legend { font-weight: 700; font-size: 1rem; margin-bottom: 12px }
.sub { margin-top: 22px; font-size: var(--s-small); max-width: 64ch }

.nav { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 36px; max-width: 720px }
.nav .right { display: flex; align-items: center; gap: 22px; margin-left: auto }
#b-next { min-width: 200px; font-size: 1.125rem; min-height: 60px }
.skip { font: inherit; font-size: 1rem; font-weight: 700; color: var(--ink); background: none; border: 0; padding: 8px 2px; cursor: pointer; text-decoration: underline; text-underline-offset: 0.22em }
.err { color: #9b1c1c; font-weight: 700; font-size: 1rem; min-height: 1.3em; margin-top: 18px }

/* Ergebnis: gelbe Fläche */
#ergebnis { background: var(--yellow); padding: clamp(24px, 4vw, 48px); max-width: 720px; animation: einblenden .5s cubic-bezier(.16,1,.3,1) }
#ergebnis .r-title { font-size: 1.25rem; letter-spacing: -0.01em; margin: 16px 0 0 }
#ergebnis .r-sub-title { font-size: 1.25rem; letter-spacing: -0.01em; margin: 36px 0 0 }
.result-range { font-size: clamp(2.75rem, 1.6rem + 4vw, 5rem); font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin: 12px 0 8px; line-height: 0.95 }
.tag { display: inline-block; font-size: var(--s-small); font-weight: 700; background: var(--ink); color: #fff; padding: 6px 11px }
.bar { position: relative; height: 12px; background: rgba(13,15,14,.18); margin: 28px 0 8px }
.bar i { position: absolute; top: 0; bottom: 0; background: var(--ink) }
.bar em { position: absolute; top: -6px; width: 3px; height: 24px; background: var(--ink) }
.scale { display: flex; justify-content: space-between; font-size: var(--s-small); font-variant-numeric: tabular-nums }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-top: 28px }
.kpi { background: rgba(255,255,255,.6); padding: 16px 18px }
.kpi div { font-size: var(--s-small); font-weight: 700 }
.kpi strong { font-size: 1.625rem; font-variant-numeric: tabular-nums; letter-spacing: -0.02em }
ul.lift { padding-left: 20px; margin: 12px 0 0 }
ul.lift li { margin: 8px 0 }
.notice { background: rgba(255,255,255,.65); padding: 14px 16px; font-size: 1rem; margin-top: 16px }
.ok { background: var(--green); color: #fff; padding: 14px 16px; font-size: 1rem; margin-top: 16px }
.tablewrap { overflow-x: auto }
@media (prefers-reduced-motion: no-preference) { .bar i { transition: left .4s, width .4s } }

/* Tablet und Telefon: Frage oben im grünen Band, Antworten darunter */
@media (max-width: 980px) {
  .calc-shell { display: block; min-height: 0 }
  .calc-side { position: static; height: auto; padding: 18px max(var(--m), env(safe-area-inset-right, 0px)) 24px max(var(--m), env(safe-area-inset-left, 0px)) }
  .side-body { padding-block: 20px 0 }
  .stepinfo { margin-bottom: 12px }
  .side-q { font-size: clamp(1.625rem, 6.4vw, 2.75rem) }
  .side-why { font-size: 1rem; margin-top: 10px }
  .calc-main { padding-top: 24px }
  .side-foot { display: none }
  .calc-main { padding: 36px max(var(--m), env(safe-area-inset-right, 0px)) 72px max(var(--m), env(safe-area-inset-left, 0px)) }
}
@media (max-width: 600px) {
  .grid, .grid.three, .opts, .opts.four { grid-template-columns: 1fr }
  .opt { min-height: 72px }
  .grid3 { grid-template-columns: minmax(84px, 1fr) repeat(3, minmax(0, 1fr)); gap: 8px }
  .nav { flex-wrap: wrap }
  .nav .right { width: 100%; justify-content: space-between; flex-direction: row-reverse }
  #b-next { min-width: 0; flex: 1 }
}

/* Mehr Jahre aufklappen, Schätzen-Knopf */
details.mehr { margin-top: 22px }
details.mehr summary { cursor: pointer; font-weight: 700; font-size: 1rem; text-decoration: underline; text-underline-offset: 0.2em; list-style: none }
details.mehr summary::-webkit-details-marker { display: none }
details.mehr[open] summary { margin-bottom: 18px }
.row.schaetzen { background: var(--tile); padding: 16px 18px; margin-top: 24px; max-width: none; cursor: pointer }
.row.schaetzen:has(input:checked) { background: var(--yellow) }
input[type=text]:disabled { background: var(--tile); color: #6f7671 }
#u-ergebnis, #e-ergebnis { font-weight: 700; font-size: 1rem; color: var(--ink) }
