/* Test „Abfrage als Kacheln“ (13.11.2026, Jonas: „so intuitiv, einfach und
   sexy wie es geht“, Symbole je Option). Nur mit html[data-abfrage="kacheln"]
   (?abfrage=kacheln, Standard im Shopify-Stil, seit 13.11.2026 die finale
   Fassung und im Theme fest; ?abfrage=liste zeigt die Liste). Markup aus
   stepper() und startTiles() in assistant.js; assets.py kopiert die Datei.

   - Optionen als Kacheln mit Symbol (.ic-tile), kurzer Überschrift und beim
     Vorhaben einer Zeile darunter. Raster nach Breite der Karte
     (Container-Abfrage bk): Vorhaben 2 Spalten, Branche 3, drei Optionen 3,
     vier 2; schmal Zeilen bzw. 2 Spalten. Eine übrige letzte Kachel
     („Weiß ich noch nicht“, „Etwas anderes“) liegt quer über die volle Breite.
   - Auswahl: dunkle Kante und ein Haken in Lime (Fläche, kein Text).
   - Bisherige Antworten als Chips über der Frage (.bk-trail).
   - Termin: Tage als Kalender, eine Spalte je Wochentag (.bk-cal).
   Bewegung nur transform und opacity, reduziert ohne Versatz. */

html[data-abfrage="kacheln"] :is(.bk-step, .bk-start) {
  container: bk / inline-size;
}

/* ---------- Kacheln ---------- */
.bk-opts--tiles {
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.bk-opts--tiles > li {
  display: flex;
  min-width: 0;
}
/* Grundform: Zeile, Symbol links, Text rechts */
.bk-opt.bk-tile {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 14px;
  width: 100%;
  min-height: 72px;
  padding: 14px;
  border-radius: 16px;
}
.bk-tile .bk-ic {
  --ic: 48px;
  position: relative;
  transition: transform var(--dur-hover) var(--ease-out);
}
.bk-tt {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.bk-tl {
  font: 500 15px/1.3 var(--sans);
  letter-spacing: -0.01em;
}
.bk-th {
  font: 400 13px/1.4 var(--sans);
  letter-spacing: 0;
  color: var(--grey-1);
}
.bk-card--light .bk-th {
  color: var(--ink-2);
}
/* Haken der Auswahl: Abzeichen oben rechts an der Symbol-Kachel */
.bk-ok {
  position: absolute;
  top: -7px;
  right: -7px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--lime);
  opacity: 0;
  transform: scale(0.9);
  transition:
    opacity var(--dur-hover) ease,
    transform var(--dur-hover) var(--ease-out);
}
.bk-ok svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bk-tile[aria-pressed="true"] .bk-ok {
  opacity: 1;
  transform: none;
}
@media (hover: hover) and (pointer: fine) {
  html[data-abfrage="kacheln"] .bk-tile:hover .bk-ic {
    transform: translateY(-2px);
  }
  html[data-abfrage="kacheln"] .bk-card--light .bk-tile:not([aria-pressed="true"]):hover {
    background: #e9e9e6;
  }
}
/* Symbol-Kachel auf der grauen Option: weiß statt Papier-Verlauf */
html[data-abfrage="kacheln"] .bk-card--light .bk-ic {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--ink-hair);
}
html[data-karten="schlicht"][data-abfrage="kacheln"] .bk-card--light .bk-ic {
  box-shadow: none;
}

/* hochkant: Symbol oben, Text unten (wie ein Widget) */
@container bk (min-width: 480px) {
  .bk-opts--vorhaben,
  .bk-opts--n4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bk-opts--branche,
  .bk-opts--n3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  :is(.bk-opts--vorhaben, .bk-opts--branche, .bk-opts--n3) .bk-tile {
    grid-template-columns: minmax(0, 1fr);
    align-content: space-between;
    align-items: start;
    gap: 18px;
    padding: 16px 16px 18px;
  }
  .bk-opts--vorhaben .bk-tile {
    min-height: 140px;
  }
  .bk-opts--vorhaben .bk-tile .bk-ic {
    --ic: 52px;
  }
  :is(.bk-opts--branche, .bk-opts--n3) .bk-tile {
    min-height: 128px;
  }
  .bk-opts--n4 .bk-tile {
    min-height: 80px;
  }
}
@container bk (max-width: 479.98px) {
  .bk-opts--branche,
  .bk-opts--n4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  :is(.bk-opts--branche, .bk-opts--n4) .bk-tile {
    grid-template-columns: minmax(0, 1fr);
    align-content: space-between;
    align-items: start;
    gap: 14px;
    min-height: 112px;
    padding: 14px 12px 14px 14px;
  }
  .bk-opt.bk-tile {
    gap: 12px;
    padding: 12px;
  }
  .bk-tile .bk-ic {
    --ic: 44px;
  }
  .bk-tl {
    font-size: 14.5px;
  }
}
/* übrige letzte Kachel quer über die volle Breite (Vorhaben 5, Branche 7;
   drei Optionen stehen in drei Spalten bzw. als Zeilen, nie quer) */
.bk-opts--tiles:not(.bk-opts--n3) > li:last-child:nth-child(odd):not(:only-child) {
  grid-column: 1 / -1;
}
.bk-opts--tiles:not(.bk-opts--n3) > li:last-child:nth-child(odd):not(:only-child) .bk-tile {
  grid-template-columns: auto minmax(0, 1fr);
  align-content: center;
  align-items: center;
  gap: 14px;
  min-height: 72px;
}

/* ---------- Antworten als Chips ---------- */
.bk-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 22px;
}
.bk-trail + .bk-q {
  margin-top: 18px;
}
.bk-crumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 4px 12px 4px 7px;
  border: 0;
  border-radius: 999px;
  background: var(--sl-ton, rgba(255, 255, 255, 0.07));
  color: inherit;
  font: 500 13px/1.2 var(--sans);
  cursor: pointer;
  transition:
    transform var(--dur-press) var(--ease-out),
    background-color var(--dur-hover) ease;
  -webkit-tap-highlight-color: transparent;
}
.bk-crumb svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}
.bk-card--light .bk-crumb {
  background: var(--paper);
  color: var(--ink);
}
@media (hover: hover) and (pointer: fine) {
  .bk-card--light .bk-crumb:hover {
    background: #e9e9e6;
  }
}
.bk-crumb:active {
  transform: scale(0.97);
}
.bk-card--light .bk-crumb:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

/* ---------- Termin: Kalender ---------- */
.bk-month {
  margin: 0 0 10px;
}
.bk-cal {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.bk-cal--7 {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.bk-dt {
  grid-column: var(--c, auto);
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-height: 62px;
  padding: 8px 4px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition:
    transform var(--dur-press) var(--ease-out),
    background-color var(--dur-hover) ease;
  -webkit-tap-highlight-color: transparent;
}
.bk-dt-w {
  font: 400 12px/1.2 var(--sans);
  color: var(--grey-1);
}
.bk-dt-n {
  font: 500 20px/1.1 var(--sans);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.bk-card--light .bk-dt {
  background: var(--paper);
  color: var(--ink);
}
.bk-card--light .bk-dt-w {
  color: var(--ink-2);
}
@media (hover: hover) and (pointer: fine) {
  .bk-card--light .bk-dt:not([aria-pressed="true"]):hover {
    background: #e9e9e6;
  }
}
.bk-dt:active {
  transform: scale(0.97);
}
.bk-dt[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.bk-dt[aria-pressed="true"] .bk-dt-w {
  color: rgba(255, 255, 255, 0.72);
}
.bk-card--light .bk-dt:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
.bk-cal-foot {
  margin-top: 10px;
}
.bk-daylong {
  margin: 22px 0 0;
  font: 500 15px/1.3 var(--sans);
}
.bk-daylong + .bk-times {
  margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .bk-ok {
    transform: none;
  }
  html[data-abfrage="kacheln"] .bk-tile:hover .bk-ic,
  .bk-crumb:active,
  .bk-dt:active {
    transform: none;
  }
}

/* Tage ohne freie Zeit: an ihrem Platz, ausgegraut, nicht wählbar */
.bk-dt--off {
  background: transparent;
  cursor: default;
  opacity: 0.38;
}
.bk-card--light .bk-dt--off {
  background: transparent;
}

/* ---------- Ablauf „Lage zuerst“ (13.11.2026) ---------- */
/* „Welche Plattform?“ erscheint unter den Kacheln, wenn „Auf einer anderen
   Plattform“ gewählt ist */
.bk-sub {
  margin-top: 18px;
}
.bk-sub[hidden] {
  display: none;
}
.bk-sub-q {
  margin: 0 0 10px;
  font: 500 15px/1.3 var(--sans);
}
.bk-subopts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bk-subopt {
  min-height: 40px;
  padding: 6px 16px 6px 9px;
  font-size: 14px;
}
.bk-subopt svg {
  width: 20px;
  height: 20px;
}
.bk-crumb.bk-subopt[aria-pressed="true"] {
  background: var(--ink);
  color: #fff;
}
.bk-card:not(.bk-card--light) .bk-crumb.bk-subopt[aria-pressed="true"] {
  background: #fff;
  color: var(--ink);
}
/* Ziel: eine passende Lösung über die volle Breite, darunter klein „Weiß
   ich noch nicht“ und „Etwas anderes“ */
.bk-opts--eins .bk-tile {
  min-height: 88px;
}
.bk-opts--klein {
  margin-top: 10px;
}
@container bk (min-width: 480px) {
  .bk-opts--n2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.bk-opts--klein .bk-tile {
  min-height: 64px;
}
.bk-opts--klein .bk-ic {
  --ic: 40px;
}
.bk-notiz {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}
.bk-notiz[hidden] {
  display: none;
}
.bk-notiz .bk-next {
  justify-self: start;
  margin-top: 0;
}
/* Umsatz: ruhige Zeile unter der Frage, „lieber im Gespräch“ als Textknopf */
.bk-q + .bk-meta {
  margin-top: -8px;
}
.bk-skip-row {
  margin: 14px 0 0;
}
