/* aular PV-Konfigurator: eigene Seite, eine Frage pro Card, Live-Panel rechts. */

:root {
  --bg: #ffffff;
  --surface: #f2f3f5;
  --surface-2: #e6e8ec;
  --ink: #1c1937;
  --muted: #4e5163;
  --accent: #f18700;
  --accent-strong: #d97600;
  --accent-ink: #1c1937;
  --inverse-muted: #c4c3d3;
  --warm: #fff1df;
  --stage: #eef0f3;

  --font-display: 'Open Sans', 'Arial Narrow', sans-serif;
  --font-text: 'Roboto', system-ui, sans-serif;

  --step-small: 0.9375rem;
  --step-body: 1.125rem;
  --step-lead: 1.375rem;
  --step-head: clamp(2.25rem, 1.3rem + 2.4vw, 3.75rem);
  --step-display: clamp(3.5rem, 2rem + 3.6vw, 6rem);

  --pad: clamp(1rem, 4vw, 3.5rem);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font-text); font-size: var(--step-body); line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, figure, dl, dd, ul, fieldset { margin: 0; }
fieldset { border: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
img { display: block; max-width: 100%; }
button, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }

/* primary button: colour wipes in from the left, arrow runs through */
.button { position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 0.7rem; min-height: 3.5rem; padding: 0 1.6rem 0 2rem; background: var(--accent); color: var(--accent-ink); font-weight: 700; text-decoration: none; white-space: nowrap; transition: transform 160ms var(--ease-out); }
.button::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleX(0); transform-origin: right center; transition: transform 520ms var(--ease-expo); }
.button .btn-label { transition: color 260ms ease; }
.btn-arrow { position: relative; display: inline-block; width: 1.15rem; height: 1.15rem; overflow: hidden; }
.btn-arrow svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform 420ms var(--ease-expo), color 260ms ease; }
.btn-arrow svg + svg { transform: translateX(-130%); }
.button:active { transform: scale(0.96); }
.button:disabled { opacity: 0.6; cursor: wait; }
@media (hover: hover) and (pointer: fine) {
  .button:hover { color: #fff; }
  .button:hover::before { transform: scaleX(1); transform-origin: left center; }
  .button:hover .btn-arrow svg:first-child { transform: translateX(130%); }
  .button:hover .btn-arrow svg + svg { transform: none; }
}
.button.nudge { animation: nudge 620ms var(--ease-out); }
@keyframes nudge { 0% { transform: none; } 30% { transform: translateX(6px); } 55% { transform: translateX(-2px); } 100% { transform: none; } }

/* ---------- frame ---------- */
.k { display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 37vw, 600px); min-height: 100dvh; }
.k-main { display: flex; flex-direction: column; min-height: 100dvh; min-width: 0; }
.k-top { display: flex; align-items: center; gap: clamp(1rem, 2.5vw, 2rem); padding: 1.25rem var(--pad); }
.k-logo img { width: 92px; height: auto; }
.k-progress { flex: 1; height: 6px; background: var(--surface); overflow: hidden; border-radius: 999px; }
.k-progress-fill { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 500ms var(--ease-out); }
.k-section { font-size: var(--step-small); font-weight: 700; min-width: 6.5rem; }
.k-close { font-size: var(--step-small); font-weight: 500; text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 0.2em; transition: text-decoration-color 180ms ease; }
@media (hover: hover) and (pointer: fine) { .k-close:hover { text-decoration-color: currentColor; } }

.k-stage { flex: 1; display: flex; align-items: center; justify-content: center; padding: 2rem var(--pad) 4rem; }
.k-card { width: 100%; max-width: 46rem; }

/* ---------- card ---------- */
.k-inner { animation: card-in 480ms var(--ease-out) both; }
.k-inner.is-leaving { opacity: 0; transform: translateX(-28px); filter: blur(4px); transition: opacity 180ms ease, transform 180ms ease, filter 180ms ease; }
.k-inner.is-leaving-back { opacity: 0; transform: translateX(28px); transition: opacity 180ms ease, transform 180ms ease; }
@keyframes card-in { from { opacity: 0; transform: translateX(calc(var(--dir, 1) * 36px)); filter: blur(6px); } to { opacity: 1; transform: none; filter: none; } }

.k-q { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; text-transform: uppercase; font-size: var(--step-head); line-height: 0.98; letter-spacing: -0.02em; max-width: 22ch; outline: none; }
.k-hint { margin-top: 1rem; color: var(--muted); max-width: 54ch; }
.k-fields { margin-top: clamp(2rem, 4vh, 3rem); }
.k-fields-2 { display: grid; gap: 2rem; }
.k-note { margin-top: 1.5rem; padding: 0.9rem 1.1rem; background: var(--warm); font-size: var(--step-small); max-width: 60ch; }
.k-error { margin-top: 1.25rem; padding: 0.9rem 1.1rem; background: #fde4e2; color: #7a1712; font-size: var(--step-small); }
.k-nav { display: flex; align-items: center; gap: 1.5rem; margin-top: clamp(2.5rem, 5vh, 3.5rem); }
.k-nav .button { margin-left: auto; }
.k-back, .k-skip { font-weight: 500; color: var(--muted); padding: 0.75rem 0; transition: color 180ms ease; }
.k-back:disabled { visibility: hidden; }
@media (hover: hover) and (pointer: fine) { .k-back:hover, .k-skip:hover { color: var(--ink); } }

/* tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.tiles-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tiles-store { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.tile { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.35rem; min-height: 11rem; padding: 1.5rem; background: var(--surface); cursor: pointer; transition: background-color 180ms ease, color 180ms ease, transform 220ms var(--ease-out); }
.tile input, .size input, .seg input { position: absolute; opacity: 0; pointer-events: none; }
.tile .pic { width: 4.75rem; height: auto; margin-bottom: auto; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; transition: stroke 180ms ease, transform 300ms var(--ease-out); }
.tiles-5 .tile { min-height: 9.5rem; padding: 1.1rem; }
.tiles-5 .pic { width: 3.75rem; }
.tile-name { font-weight: 700; font-size: 1.125rem; line-height: 1.25; }
.tile-meta { font-size: var(--step-small); color: var(--muted); }
.tile-big { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 2.5rem; line-height: 1; text-transform: uppercase; margin-bottom: auto; }
.tile-price { font-weight: 700; margin-top: 0.4rem; font-variant-numeric: tabular-nums; }
.tile:active { transform: scale(0.98); }
.tile:has(input:checked) { background: var(--ink); color: #fff; }
.tile:has(input:checked) .tile-meta { color: var(--inverse-muted); }
.tile:has(input:checked) .pic { stroke: var(--accent); }
.tile:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .tile:hover { background: var(--surface-2); transform: translateY(-3px); }
  .tile:hover .pic { transform: translateY(-2px); }
  .tile:has(input:checked):hover { background: var(--ink); }
}

/* segmented pairs */
.pair-label { font-weight: 700; margin-bottom: 0.75rem; font-size: var(--step-lead); }
.seg { position: relative; display: inline-flex; flex-wrap: wrap; gap: 0.25rem; padding: 0.3rem; background: var(--surface); }
.seg label { position: relative; z-index: 1; }
.seg-ind { position: absolute; left: 0; top: 0; z-index: 0; background: var(--ink); transition: transform 520ms var(--ease-expo), width 520ms var(--ease-expo), height 520ms var(--ease-expo), opacity 200ms ease; pointer-events: none; }
.seg-ind.no-anim { transition: none; }
.seg label > span { display: inline-flex; align-items: center; min-height: 3rem; padding: 0 1.2rem; background: transparent; cursor: pointer; font-weight: 500; transition: background-color 180ms ease, color 300ms ease, transform 140ms var(--ease-out); }
.seg label:active span { transform: scale(0.97); }
.seg input:checked + span { color: #fff; }
.seg:not(:has(.seg-ind)) input:checked + span { background: var(--ink); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .seg label > span:hover { background: rgba(28, 25, 55, 0.06); } .seg input:checked + span:hover { background: transparent; } }

/* big range */
.big-num { display: block; font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: var(--step-display); line-height: 1; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.big-num small { font-size: 0.4em; margin-left: 0.25em; letter-spacing: 0; color: var(--muted); }
.range-wrap { position: relative; height: 2.75rem; margin-top: 1.5rem; --p: 20%; }
.range-track, .range-fill { position: absolute; left: 0; top: 50%; height: 10px; margin-top: -5px; border-radius: 999px; pointer-events: none; }
.range-track { right: 0; background: var(--surface); }
.range-fill { width: var(--p); background: var(--accent); }
.range-wrap input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
.range-wrap input::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.range-wrap input::-moz-range-track { background: transparent; }
.range-wrap input::-webkit-slider-thumb { -webkit-appearance: none; width: 32px; height: 32px; margin-top: 6px; border-radius: 50%; background: #fff; border: 8px solid var(--accent); transition: transform 260ms var(--ease-expo), border-width 260ms var(--ease-expo); }
.range-wrap input::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 8px solid var(--accent); transition: transform 260ms var(--ease-expo); }
.range-wrap input:hover::-webkit-slider-thumb { transform: scale(1.12); }
.range-wrap input:active::-webkit-slider-thumb { transform: scale(1.25); border-width: 10px; }
.range-wrap input:active::-moz-range-thumb { transform: scale(1.25); }
.range-wrap input:focus-visible { outline: none; }
.range-wrap input:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(241, 135, 0, 0.35); } /* taste-skill-ignore: keyboard focus ring */
.range-scale { display: flex; justify-content: space-between; font-size: var(--step-small); color: var(--muted); }

/* inputs */
.field { width: 100%; padding: 0.8rem 1rem; background: var(--surface); border: 0; border-bottom: 2px solid var(--surface-2); border-radius: 0; font-size: 1.0625rem; transition: border-color 180ms ease; }
.field-big { min-height: 3.75rem; font-size: 1.25rem; }
.field:focus { outline: none; border-bottom-color: var(--accent); }
.field.is-invalid { border-bottom-color: #c4302b; }
textarea.field { resize: vertical; min-height: 6.5rem; }
.unit-field { display: flex; align-items: center; gap: 0.75rem; max-width: 16rem; font-size: var(--step-lead); font-weight: 700; }
.f { display: flex; flex-direction: column; gap: 0.5rem; font-weight: 500; }
.f-place { display: grid; grid-template-columns: 11rem 1fr; gap: 0.75rem; }
.f-street { display: grid; grid-template-columns: 1fr 9rem; gap: 0.75rem; }
.opt { font-weight: 400; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; } /* taste-skill-ignore: honeypot, unsichtbar */
.drop { position: relative; display: flex; flex-direction: column; gap: 0.25rem; padding: 1.25rem; background: var(--surface); cursor: pointer; transition: background-color 180ms ease; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-name { font-weight: 700; }
.drop-name::before { content: '+ '; color: var(--accent-strong); }
.drop-meta { font-size: var(--step-small); color: var(--muted); }
@media (hover: hover) and (pointer: fine) { .drop:hover { background: var(--surface-2); } }
.consent { display: flex; gap: 0.75rem; align-items: flex-start; font-size: var(--step-small); }
.consent input { width: 1.3rem; height: 1.3rem; margin-top: 0.1rem; flex: none; accent-color: var(--accent); }

/* sizes */
.rec { font-size: var(--step-lead); margin-bottom: 1.25rem; }
.sizes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.75rem; }
.size { position: relative; display: flex; flex-direction: column; gap: 0.15rem; padding: 1.1rem 1.2rem 1.2rem; background: var(--surface); cursor: pointer; transition: background-color 180ms ease, color 180ms ease, transform 220ms var(--ease-out); }
.size:active { transform: scale(0.98); }
.size-kwp { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 3rem; line-height: 1; }
.size-kwp small { font-size: 0.42em; margin-left: 0.15em; text-transform: uppercase; }
.size-meta { font-size: var(--step-small); color: var(--muted); }
.size-price { margin-top: 0.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.size-tag { position: absolute; top: 0.9rem; right: 0.9rem; background: var(--accent); color: var(--accent-ink); font-size: 0.875rem; font-weight: 700; padding: 0.1rem 0.5rem; }
.size-warn { font-size: 0.875rem; color: #9a3a00; }
.size:has(input:checked) { background: var(--ink); color: #fff; }
.size:has(input:checked) .size-meta { color: var(--inverse-muted); }
.size:has(input:checked) .size-warn { color: #ffc27a; }
.size:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .size:hover { background: var(--surface-2); transform: translateY(-3px); } .size:has(input:checked):hover { background: var(--ink); } }

/* option rows */
.opt-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.4rem 1.5rem; background: var(--surface); cursor: pointer; }
.opt-row > span, .opt-row > div:first-child { display: flex; flex-direction: column; gap: 0.25rem; }
.opt-name { font-weight: 700; font-size: var(--step-lead); }
.opt-meta { font-size: var(--step-small); color: var(--muted); max-width: 44ch; }
.opt-row.is-off .opt-name { color: var(--muted); }
.toggle { appearance: none; flex: none; width: 3.5rem; height: 2rem; border-radius: 999px; background: var(--surface-2); position: relative; cursor: pointer; transition: background-color 240ms var(--ease-out); }
.toggle::after { content: ''; position: absolute; top: 0.25rem; left: 0.25rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; transition: transform 240ms var(--ease-out); }
.toggle:checked { background: var(--accent); }
.toggle:checked::after { transform: translateX(1.5rem); }
.stepper { display: flex; align-items: center; gap: 0.25rem; flex: none; }
.stepper button { width: 3rem; height: 3rem; background: var(--bg); font-size: 1.5rem; font-weight: 700; transition: transform 140ms var(--ease-out), background-color 180ms ease; }
.stepper button:active { transform: scale(0.92); }
.stepper button:disabled { opacity: 0.35; cursor: not-allowed; }
.stepper output { min-width: 4.5rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

/* summary */
.sum-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.sum-facts dt { font-size: var(--step-small); color: var(--muted); }
.sum-facts dd { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 2rem; line-height: 1.05; text-transform: uppercase; }
.sum-extras { margin-top: 1rem; color: var(--muted); }
.sum-lines { list-style: none; padding: 0; margin-top: 1.75rem; display: grid; gap: 0.25rem; }
.sum-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.7rem 1rem; background: var(--surface); font-size: var(--step-small); }
.sum-label { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.75rem; }
.sum-remove { font-size: 0.8125rem; font-weight: 500; color: var(--muted); text-decoration: underline; text-underline-offset: 0.2em; padding: 0.35rem 0; margin: -0.35rem 0; cursor: pointer; }
.sum-remove:hover { color: var(--ink); text-decoration-color: var(--accent); }
.sum-lines li.is-removed { background: transparent; outline: 1px dashed var(--surface-2); outline-offset: -1px; color: var(--muted); } /* taste-skill-ignore: entfernter Posten */
.sum-lines li.is-removed span:last-child { font-weight: 500; }
.sum-lines li span:last-child { white-space: nowrap; font-weight: 700; font-variant-numeric: tabular-nums; }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-top: 0.75rem; padding: 1.1rem 1.25rem; background: var(--ink); color: #fff; }
.sum-total strong { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 2.75rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.sum-note { margin-top: 1rem; padding: 0.9rem 1.1rem; background: var(--warm); font-size: var(--step-small); }
.sum-incl { margin-top: 1rem; font-size: var(--step-small); }
.sum-incl summary { cursor: pointer; font-weight: 700; padding: 0.5rem 0; }
.sum-incl h3 { margin: 0.9rem 0 0.3rem; font-size: 1rem; }
.sum-incl ul { padding-left: 1.1rem; }

.k-done .k-nav .button { margin-left: 0; }

/* ---------- live panel ---------- */
.k-live { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--ink); color: #fff; animation: live-in 700ms var(--ease-out) both; }
@keyframes live-in { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.k-stagebox { position: relative; flex: 1 1 auto; min-height: 0; display: flex; align-items: flex-end; justify-content: center; padding: 1.5rem 0.5rem 0.25rem; background: var(--stage); overflow: hidden; }
.k-stagebox .scene { max-height: 100%; width: 100%; }
.k-live-body { flex: 0 0 auto; display: flex; flex-direction: column; padding: clamp(1.25rem, 2.4vw, 2.25rem) clamp(1.5rem, 3vw, 2.75rem) clamp(1.5rem, 3vw, 2.5rem); }
.k-live-label { color: var(--inverse-muted); font-size: var(--step-small); }
.k-live-kwp { margin-top: 0.25rem; font-family: var(--font-display); font-stretch: 75%; font-weight: 800; text-transform: uppercase; font-size: var(--step-head); line-height: 0.95; }
.k-live-spec { margin-top: 0.75rem; color: var(--inverse-muted); font-size: var(--step-small); }
.k-live-price { margin-top: 1rem; font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: var(--step-display); line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.k-live-price span { display: inline-block; }
.k-live-price.is-text { font-size: var(--step-head); }
.k-live-price span.is-bump { animation: bump 380ms var(--ease-out); }
@keyframes bump { from { transform: translateY(8px); opacity: 0.3; } to { transform: none; opacity: 1; } }
.k-live-note { margin-top: 0.5rem; color: var(--inverse-muted); font-size: var(--step-small); }

.k-bar { display: none; }

/* ---------- smaller screens ---------- */
@media (max-width: 68em) {
  .tiles-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 56em) {
  .k { grid-template-columns: 1fr; }
  .k-live { display: none; }
  .k-stage { align-items: flex-start; padding: 1rem var(--pad) 10rem; }
  .k-section { display: none; }
  .k-logo img { width: 76px; }
  .k-bar { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 7.25rem 1fr auto; align-items: center; gap: 0.75rem; padding: 0.85rem var(--pad) calc(0.85rem + env(safe-area-inset-bottom)); background: var(--ink); color: #fff; font-size: var(--step-small); }
  .k-bar-scene { position: relative; height: 6.75rem; margin: -3.4rem 0 -0.85rem -0.4rem; }
  /* leichter Schein, damit die dunklen Produkte vor dem dunklen Balken lesbar bleiben */
  .k-bar-scene::before { content: ''; position: absolute; inset: 8% -12% 4%; z-index: 0; border-radius: 50%; background: radial-gradient(closest-side, rgb(255 255 255 / 0.42), rgb(255 255 255 / 0.14) 60%, rgb(255 255 255 / 0)); pointer-events: none; } /* taste-skill-ignore: Schein hinter Produktgrafik */
  .k-bar-scene .scene { position: relative; z-index: 1; height: 100%; width: auto; filter: drop-shadow(0 0 4px rgb(255 255 255 / 0.35)); } /* taste-skill-ignore: Schein um die Produktgrafik */
  .k-bar-scene .sc-chips, .k-bar-scene .sc-shadow { display: none; }
  .k-bar strong { font-family: var(--font-display); font-stretch: 75%; font-weight: 800; font-size: 1.75rem; line-height: 1; color: var(--accent); }
}
@media (max-width: 36em) {
  .tiles, .tiles-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tile { min-height: 8rem; padding: 1rem; }
  .sizes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .size-kwp { font-size: 2.5rem; }
  .tile-big { font-size: 1.75rem; }
  .tiles-store { grid-template-columns: 1fr; }
  .tile-store { min-height: 0; display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 1rem; }
  .tile-store .tile-big { margin-bottom: 0.25rem; }
  .tile-store .tile-price { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  .tile-store .tile-meta { grid-column: 1; }
  .sum-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .f-place { grid-template-columns: 7rem 1fr; }
  .f-street { grid-template-columns: 1fr 6.5rem; }
  .opt-row { padding: 1.1rem; flex-wrap: wrap; }
  .opt-row > div:first-child { flex: 1 1 100%; }
  .k-nav { position: sticky; bottom: 8rem; z-index: 5; background: var(--bg); padding-block: 0.75rem; margin-top: 2rem; }
}


/* ---------- motion layer ---------- */
/* question: words rise out of a mask */
.k-q .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; margin-bottom: -0.08em; }
.k-q .w > span { display: inline-block; animation: word-up 820ms var(--ease-expo) both; animation-delay: calc(var(--i) * 55ms + 60ms); }
@keyframes word-up { from { transform: translateY(108%); } to { transform: none; } }
.k-inner > .k-hint { animation: fade-up 700ms var(--ease-out) 260ms both; }
.k-nav { animation: fade-up 700ms var(--ease-out) 420ms both; }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* parts of a card arrive one after another, only when the card changes */
.is-entering .anim { animation: rise-in 640ms var(--ease-expo) both; animation-delay: calc(var(--i, 0) * 60ms + 220ms); }
@keyframes rise-in { from { opacity: 0; transform: translateY(22px) scale(0.97); } to { opacity: 1; transform: none; } }
.k-inner.is-leaving .anim, .k-inner.is-leaving-back .anim { animation: none; }

/* pictograms draw themselves on entry and when chosen */
.tile .pic path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.is-entering .tile .pic path { animation: draw 1100ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 60ms + 360ms); }
.tile.pop .pic path { animation: draw 800ms var(--ease-out) both; }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@media (hover: hover) and (pointer: fine) { .tile:hover .pic { transform: translateY(-4px) rotate(-2deg); } }

/* tick badge on the chosen tile */
.tick { position: absolute; top: 0.9rem; right: 0.9rem; z-index: 2; display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--accent); opacity: 0; transform: scale(0.5) rotate(-45deg); transition: transform 420ms var(--ease-expo), opacity 200ms ease; }
.tick svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tick path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 380ms var(--ease-out) 140ms; }
:checked ~ .tick, .tile:has(input:checked) .tick, .size:has(input:checked) .tick { transform: none; opacity: 1; }
.tile:has(input:checked) .tick path, .size:has(input:checked) .tick path { stroke-dashoffset: 0; }
.size .tick { top: auto; bottom: 0.9rem; }

/* the choice just made gives under the hand */
.pop { animation: pop 460ms var(--ease-out); }
@keyframes pop { 0% { transform: scale(0.95); } 55% { transform: scale(1.02); } 100% { transform: none; } }
.seg label.pop { animation: none; }
.seg label.pop span { animation: pop 420ms var(--ease-out); }
.stepper output.pop { animation: pop 420ms var(--ease-out); color: var(--accent-strong); }
.tile, .size { transition: background-color 260ms ease, color 260ms ease, transform 320ms var(--ease-expo); }
.tile:has(input:checked) .tile-big, .size:has(input:checked) .size-kwp { animation: none; }

/* toggle knob stretches while pressed */
.toggle:active::after { width: 1.9rem; }
.toggle:checked:active::after { transform: translateX(1.1rem); }

/* range thumb */
.big-range input { transition: transform 200ms var(--ease-out); }
.big-range:active .big-num { color: var(--accent-strong); }
.big-num { transition: color 200ms ease; }

/* invalid field shakes once */
.shake { animation: shake 420ms var(--ease-out); }
@keyframes shake { 0%, 100% { transform: none; } 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

/* section label and live figures swap upwards */
.swap { animation: swap-up 460ms var(--ease-expo); }
@keyframes swap-up { from { opacity: 0; transform: translateY(0.45em); } to { opacity: 1; transform: none; } }
.k-live-kwp { display: inline-block; }
.k-progress-fill { transition: transform 700ms var(--ease-expo); }

/* drop zone and option rows answer the pointer */
.drop, .opt-row { transition: background-color 220ms ease, transform 320ms var(--ease-expo); }
@media (hover: hover) and (pointer: fine) {
  .drop:hover, label.opt-row:hover { transform: translateY(-2px); }
  .k-back:hover, .k-skip:hover { transform: translateX(-3px); }
}
.k-back, .k-skip { transition: color 180ms ease, transform 260ms var(--ease-expo); }

/* done: the tick draws itself */
.done-mark { width: 5.5rem; height: 5.5rem; margin-bottom: 1.75rem; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.done-mark circle { stroke: var(--accent); stroke-width: 5; stroke-dasharray: 1; animation: draw 900ms var(--ease-out) both; }
.done-mark path { stroke: var(--ink); stroke-width: 6; stroke-dasharray: 1; animation: draw 600ms var(--ease-out) 650ms both; }

/* ---------- interaction layer ---------- */
/* tiles lean towards the pointer, a light follows it */
.tile, .size { isolation: isolate; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift, 0px)); transition: background-color 260ms ease, color 260ms ease, transform 420ms var(--ease-expo); }
.tile::before, .size::before { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0; transition: opacity 300ms ease;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, 0.85), transparent 70%); } /* taste-skill-ignore: pointer light */
.tile:has(input:checked)::before, .size:has(input:checked)::before { background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(241, 135, 0, 0.28), transparent 70%); } /* taste-skill-ignore: pointer light */
@media (hover: hover) and (pointer: fine) {
  .tile:hover, .size:hover { --lift: -4px; transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) translateY(var(--lift)); }
  .tile:hover::before, .size:hover::before { opacity: 1; }
}
.tile:active, .size:active { transform: perspective(900px) scale(0.97); }

/* buttons drift towards the pointer */
.button { transform: translate(var(--tx, 0px), var(--ty, 0px)); transition: transform 380ms var(--ease-expo), color 260ms ease; }
.button:active { transform: translate(var(--tx, 0px), var(--ty, 0px)) scale(0.96); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}

/* Danke-Ansicht nach einer Beratungsanfrage von der Startseite: ohne Preis-Spalte */
.k.k-thanks { grid-template-columns: minmax(0, 1fr); }
.k-thanks .k-live, .k-thanks .k-bar { display: none !important; }
