/* Checklisten /checkliste-vor-den-feiertagen/ und /checkliste-vor-der-ferienzeit/ (Präfix ck-), nach style.css einbinden.
   Gruppen sind .karte im .raster--2 (style.css). Die Haken sind normale Kontrollkästchen ohne Formular: rein visuell,
   nichts wird gespeichert. Der Zähler unter der Liste zählt die Haken per CSS-Zähler (ohne JavaScript). */

.ck-kopf .klein { margin-top: .75rem; }
.ck-checkliste { counter-reset: ck-erledigt; }
/* Zwei Spalten erst ab 900 px: darunter werden die Sätze der Punkte zu schmal */
@media (min-width: 640px) and (max-width: 899.98px) { .ck-raster { grid-template-columns: minmax(0, 1fr); } }

/* Kopf einer Gruppe: Icon-Kachel neben dem Titel, darüber ggf. die Marke */
.ck-gruppe__kopf { display: flex; align-items: center; gap: 1rem; margin-bottom: .4rem; }
.ck-gruppe__kopf .karte-icon { margin-bottom: 0; }
/* Marke über dem Titel: bewusst ohne Versalien, „infra-struktur“ wird immer klein geschrieben */
.ck-gruppe .ck-gruppe__marke { margin-bottom: .1rem; color: var(--primary); font-size: .875rem; font-weight: 600; line-height: 1.4; }

/* Punkte: Kontrollkästchen im Akzentkreis wie .checklist__mark, abgehakt mit weißem Haken */
.ck-liste { font-size: 1rem; line-height: 1.55; }
.ck-liste > li + li { border-top: 1px solid var(--line); }
.ck-punkt { display: flex; align-items: flex-start; gap: .85rem; padding: .7rem 0; cursor: pointer; }
.ck-text { text-wrap: pretty; }
.ck-box {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  width: 26px;
  height: 26px;
  margin: 0;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-7.6' fill='none' stroke='%23dfe8f7' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 17px no-repeat;
  cursor: pointer;
}
@media (prefers-reduced-motion: no-preference) {
  .ck-text { transition: color .2s var(--ease); }
  .ck-box { transition: background-color .2s var(--ease), border-color .2s var(--ease); }
}
.ck-punkt:hover .ck-box { border-color: var(--primary); }
.ck-box:checked {
  counter-increment: ck-erledigt;
  border-color: var(--accent);
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.5 12.5l3.6 3.6 7.4-7.6' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
/* Der Fokusring aus style.css hat 6 px Radius; das Kästchen bleibt rund */
.ck-box:focus-visible { border-radius: 50%; }
.ck-box:checked + .ck-text { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: rgba(0, 73, 148, .4); }

/* Link zu einem Punkt (z. B. Anleitung), eingerückt unter dem Text */
.ck-link { display: inline-flex; align-items: center; gap: .45rem; margin: -.35rem 0 .7rem calc(26px + .85rem); font-size: .9375rem; font-weight: 600; text-decoration: none; }
.ck-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.ck-link .icon { width: 12px; height: 12px; }

/* Hinweis in der Gruppe */
.ck-gruppe .ck-hinweis { display: flex; align-items: flex-start; gap: .75rem; margin-top: .4rem; padding: .9rem 1.1rem; border-radius: var(--radius-s); background: var(--tile-hell); color: var(--text); font-size: .9375rem; line-height: 1.6; }
.ck-hinweis .icon { width: 18px; height: 18px; margin-top: .2em; color: var(--accent); }

/* Zähler unter der Liste */
.ck-stand { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem .9rem; margin-top: clamp(1.75rem, 4vw, 2.5rem); text-align: center; }
.ck-stand__zahl {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem 1.1rem .55rem .6rem;
  border-radius: 999px;
  background: var(--tile);
  box-shadow: var(--shadow-s);
  color: var(--ink);
  font-weight: 600;
}
.ck-stand__zahl .icon { width: 26px; height: 26px; padding: 6px; border-radius: 50%; background: var(--accent); color: var(--white); }
.ck-stand__zahl b { font-weight: 700; }
.ck-stand__zahl b::before { content: counter(ck-erledigt); }
.ck-stand__text { color: var(--muted); }

/* Feier, sobald alle Punkte abgehakt sind (Andrea Tissen, 2026-10-21: „zeige eine kleine Feier-animation sobald alle Punkte
   abgehakt sind“): ohne JavaScript über :has(), kein Kästchen mehr leer. Die Zähl-Pille wird zum Verlauf mit „Geschafft!“,
   Konfetti in den CD-Blautönen fliegt einmal aus der Pille. Entfernt man einen Haken, ist alles wie vorher; beim nächsten
   „alles abgehakt“ läuft die Feier erneut. Bei „Bewegung reduzieren“ nur Farbwechsel und Text. */
/* Konfetti liegt hinter der Pille (.ck-stand ist eigene Ebene, z-index -1) und fliegt von dort aus nach außen; die Pille
   selbst bewegt sich nicht (eine Skalierung würde sie zur eigenen Ebene machen und das Konfetti nach vorn holen) */
.ck-stand { isolation: isolate; }
.ck-stand__zahl { position: relative; }
.ck-stand__geschafft { display: none; }
.ck-konfetti { position: absolute; left: 50%; top: 50%; z-index: -1; width: 0; height: 0; pointer-events: none; }
.ck-konfetti i {
  --winkel: calc(var(--n) * 25.7deg + 6deg); --rx: 300px; --ry: 70px; --verzug: 0ms;
  position: absolute; left: -4px; top: -4px; width: 9px; height: 9px; border-radius: 2px;
  background: var(--accent); opacity: 0;
}
.ck-konfetti i:nth-child(3n + 1) { --rx: 360px; --ry: 92px; --verzug: 70ms; background: var(--primary); }
.ck-konfetti i:nth-child(3n + 2) { --rx: 250px; --ry: 104px; --verzug: 35ms; width: 7px; height: 12px; background: var(--hell); }
.ck-konfetti i:nth-child(4n) { border-radius: 50%; background: var(--secondary); }
@media (max-width: 639.98px) {
  .ck-konfetti i { --rx: 160px; --ry: 86px; }
  .ck-konfetti i:nth-child(3n + 1) { --rx: 185px; --ry: 104px; }
  .ck-konfetti i:nth-child(3n + 2) { --rx: 140px; --ry: 120px; }
}
.ck-checkliste:not(:has(.ck-box:not(:checked))) .ck-stand__zahl { background: var(--gradient); color: var(--white); box-shadow: 0 12px 26px -12px rgba(0, 158, 227, .9); }
.ck-checkliste:not(:has(.ck-box:not(:checked))) .ck-stand__zahl .icon { background: var(--white); color: var(--primary); }
.ck-checkliste:not(:has(.ck-box:not(:checked))) .ck-stand__geschafft { display: inline; font-weight: 700; }
@media (prefers-reduced-motion: no-preference) {
  .ck-checkliste:not(:has(.ck-box:not(:checked))) .ck-stand__zahl { animation: ck-jubel .9s var(--ease); }
  .ck-checkliste:not(:has(.ck-box:not(:checked))) .ck-stand__zahl .icon { animation: hg-haken .5s var(--ease) .1s both; }
  .ck-checkliste:not(:has(.ck-box:not(:checked))) .ck-konfetti i { animation: ck-konfetti 1.3s cubic-bezier(.12, .75, .3, 1) var(--verzug) both; }
}
@keyframes ck-jubel { 35% { box-shadow: 0 0 0 10px rgba(0, 158, 227, .18), 0 12px 26px -12px rgba(0, 158, 227, .9); } }
@keyframes ck-konfetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(.6); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(cos(var(--winkel)) * var(--rx)), calc(sin(var(--winkel)) * var(--ry) + 22px)) rotate(320deg) scale(1); }
}

@media print {
  .page-hero__visual, .page-hero__actions, .ck-stand { display: none !important; }
  .page-hero { margin-top: 0; padding-block: 0 16px; background: none; }
  .section--tint { background: none; }
  .ck-gruppe { break-inside: avoid; box-shadow: none; border: 1px solid var(--line); }
  .ck-box { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
