/* Coli · Landkarte: Coli in der Mitte, Bereiche als Kacheln, Betrieb als Fundament. Kompakt, ruhig, ausklappbar. */

.landkarte { container-type: inline-size; gap: 22px; }
.landkarte [data-farbe="tuerkis"] { --farbe: var(--tuerkis); }
.landkarte [data-farbe="gruen"] { --farbe: var(--gruen); }
.landkarte [data-farbe="hellgruen"] { --farbe: var(--hellgruen); }
.landkarte [data-farbe="blau"] { --farbe: var(--blau); }
.landkarte [data-farbe="gelb"] { --farbe: #e2bd1c; }
.landkarte [data-farbe="orange"] { --farbe: var(--orange); }
.landkarte [data-farbe="pink"] { --farbe: var(--pink); }
.landkarte [data-farbe="navy"] { --farbe: var(--navy); }
.landkarte [data-farbe="beere"] { --farbe: var(--beere); }

/* ── Kopf ─────────────────────────────────────────────── */
.lk-kopf { display: flex; flex-direction: column; gap: 10px; }
.lk-kopf .a-kurz { max-width: 70ch; }
.lk-werkzeuge { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 4px; }
.lk-kopf .etikett { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.lk-kopf .etikett::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: var(--tuerkis); transform: rotate(45deg); }
.lk-kopf h1 { margin: 0; font: 500 clamp(34px, 4.6vw, 46px)/.95 var(--titel); color: var(--navy); letter-spacing: .01em; }
.lk-stand { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13px; color: var(--text-3); }
.lk-stand .an { color: var(--gruen); font-weight: 700; }
.lk-live { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--gruen); }
.lk-live i { width: 8px; height: 8px; border-radius: 50%; background: var(--gruen); animation: lk-puls 2.4s ease-in-out infinite; }
@keyframes lk-puls { 50% { box-shadow: 0 0 0 5px rgba(87, 165, 124, .18); } }
.lk-aktionen { margin: 0; }

.lk-schirme { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 14px; color: var(--text-2); }
.lk-schirme .chip { font-size: 14px; padding: 6px 12px; }
.lk-schirme .chip.verbunden { border-color: var(--gruen); }

.lk-dreissig { display: grid; gap: 10px; padding: 18px 20px; border-radius: var(--rund); background: color-mix(in srgb, var(--tuerkis) 12%, #fff); }
.lk-dreissig p { margin: 0; font-size: clamp(17px, 2.1vw, 20px); line-height: 1.45; color: var(--navy); animation: auftauchen .6s var(--weich) both; animation-delay: calc(var(--i, 0) * 1.4s); }

.lk-filter { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 14px; background: rgba(18, 33, 74, .045); }
.lk-filter-knopf { border: 0; background: none; padding: 7px 12px; border-radius: 10px; font: inherit; font-size: 14px; color: var(--text-2); cursor: pointer; transition: background .25s, color .25s, box-shadow .25s; }
.lk-filter-knopf:hover { color: var(--navy); }
.lk-filter-knopf.an { background: #fff; color: var(--navy); font-weight: 700; box-shadow: var(--schatten-1); }

/* ── Führung ──────────────────────────────────────────── */
.lk-fuehrung {
  position: sticky; top: 56px; z-index: 4; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 8px 8px 16px; border-radius: 16px; background: var(--navy); color: #fff;
}
.lk-fuehrung-text { flex: 1; font-weight: 700; }
.lk-fuehrung .aktion { background: rgba(255, 255, 255, .12); color: #fff; border-color: transparent; }

/* ── Fortschrittsring und Stand-Punkte ────────────────── */
.lk-ring { width: 28px; height: 28px; flex: 0 0 auto; }
.lk-ring circle { fill: none; stroke-width: 5; }
.lk-ring .grund { stroke: rgba(18, 33, 74, .09); }
.lk-ring .bereit { stroke: var(--farbe, var(--gruen)); stroke-linecap: round; transition: stroke-dasharray .8s var(--weich); }
.lk-ring .erprobung { stroke: color-mix(in srgb, var(--farbe, var(--blau)) 40%, #fff); }
.lk-ring.gross circle { stroke-width: 2.6; }

.lk-punkt { width: 11px; height: 11px; border-radius: 50%; flex: 0 0 auto; box-sizing: border-box; }
.lk-punkt[data-stand="laeuft"] { background: var(--gruen); }
.lk-punkt[data-stand="demo"] { background: var(--gelb); }
.lk-punkt[data-stand="erprobung"] { background: linear-gradient(90deg, var(--blau) 50%, transparent 50%); border: 2px solid var(--blau); }
.lk-punkt[data-stand="aus"] { border: 2.5px solid var(--gruen); }
.lk-punkt[data-stand="stoerung"] { background: var(--rot); }
.lk-punkt[data-stand="geplant"] { border: 2px dashed rgba(18, 33, 74, .3); }
.lk-punkt[data-stand="offen"] { border: 2.5px solid var(--beere); }

/* ── Ebene 0: Mindmap ─────────────────────────────────── */
.lk-karte { display: flex; flex-direction: column; gap: 14px; }
.lk-karte, .lk-bereich { scroll-margin-top: calc(var(--kopf-hoehe, 58px) + 64px); }
.lk-netz { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
/* Äste von Coli zu den acht Bereichen: waagrecht, senkrecht, beide Diagonalen (sichtbar nur in den Lücken) */
.lk-netz.rund::before {
  content: ''; position: absolute; inset: 12% 14%; z-index: 0; pointer-events: none;
  background:
    linear-gradient(to top right, transparent calc(50% - 1px), var(--linie-2) calc(50% - 1px), var(--linie-2) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(to bottom right, transparent calc(50% - 1px), var(--linie-2) calc(50% - 1px), var(--linie-2) calc(50% + 1px), transparent calc(50% + 1px)),
    linear-gradient(var(--linie-2), var(--linie-2)) center / 2px 100% no-repeat,
    linear-gradient(var(--linie-2), var(--linie-2)) center / 100% 2px no-repeat;
}
.lk-netz > * { position: relative; z-index: 1; }

.lk-mitte { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 8px; }
.lk-coli { position: relative; width: 104px; height: 104px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: var(--schatten-1), 0 0 0 8px var(--grund); --farbe: var(--gruen); }
.lk-coli .lk-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.lk-coli img { width: 56px; height: auto; }
.lk-mitte b { font: 500 28px/1 var(--titel); color: var(--navy); margin-top: 6px; }
.lk-mitte small { font-size: 12.5px; color: var(--text-3); max-width: 16ch; }

.lk-ast {
  display: flex; flex-direction: column; gap: 8px; min-height: 148px; text-align: left; cursor: pointer; font: inherit; color: inherit;
  padding: 14px 16px 12px; border-radius: 18px; border: 1px solid var(--linie); background: #fff;
  box-shadow: inset 0 3px 0 var(--farbe);
  transition: transform .35s var(--feder), box-shadow .35s, opacity .35s, outline-color .35s;
  animation: auftauchen .55s var(--weich) both; animation-delay: calc(var(--i, 0) * 45ms);
  outline: 3px solid transparent; outline-offset: 2px;
}
.lk-ast:hover { transform: translateY(-3px); box-shadow: inset 0 3px 0 var(--farbe), var(--schatten-1); }
.lk-ast:focus-visible { outline-color: var(--farbe); }
.lk-ast-kopf { display: flex; align-items: center; gap: 8px; }
.lk-farbe { width: 10px; height: 10px; border-radius: 3px; background: var(--farbe); transform: rotate(45deg); flex: 0 0 auto; }
.lk-ast-kopf b { font-size: 16px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.lk-satz { font-size: 14px; line-height: 1.4; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.lk-satz.leise, .landkarte .leise { color: var(--text-3); }
.lk-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 13.5px; color: var(--text-2); }
.lk-mini li { display: flex; align-items: flex-start; gap: 7px; line-height: 1.3; }
.lk-mini .lk-punkt { margin-top: 3px; width: 9px; height: 9px; }
.lk-mini .mehr { color: var(--text-3); padding-left: 16px; }
.lk-ast-fuss { margin-top: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-3); }
.lk-wichtig { display: inline-block; margin-right: 8px; padding: 1px 8px; border-radius: 99px; background: var(--beere); color: #fff; font-weight: 800; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; vertical-align: 2px; }
.lk-entscheidungen .lk-titel b { color: var(--navy); }
.lk-fragen { margin-left: auto; white-space: nowrap; padding: 2px 8px; border-radius: 99px; background: color-mix(in srgb, var(--beere) 10%, #fff); color: var(--beere); font-weight: 800; font-size: 12px; }

.lk-fundament { display: grid; }
.lk-fundament .lk-ast { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px 18px; box-shadow: inset 0 -3px 0 var(--farbe); background: color-mix(in srgb, var(--navy) 3%, #fff); }
.lk-fundament .lk-ast:hover { box-shadow: inset 0 -3px 0 var(--farbe), var(--schatten-1); }
.lk-fundament .lk-satz, .lk-fundament .lk-mini { flex: 1 1 260px; }
.lk-fundament .lk-ast-fuss { margin-top: 0; }

/* Führung: ein Bereich im Licht, die anderen treten zurück */
.landkarte.fuehrt .lk-ast:not(.im-licht) { opacity: .38; }
.lk-ast.im-licht { transform: scale(1.035); outline-color: var(--farbe); box-shadow: inset 0 3px 0 var(--farbe), var(--schatten-2, var(--schatten-1)); }

/* ── Ebene 1/2: ein Bereich ───────────────────────────── */
.lk-bereich { display: flex; flex-direction: column; gap: 18px; }
.lk-leiste { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 6px; }
.lk-leiste::-webkit-scrollbar { display: none; }
.lk-leiste .chip { white-space: nowrap; font-size: 13.5px; padding: 6px 12px; }
.lk-leiste .chip.an { background: var(--navy); color: #fff; border-color: var(--navy); }
.lk-zurueck { border: 0; background: none; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer; padding: 6px 8px 6px 0; white-space: nowrap; }
.lk-bereich-kopf { display: flex; align-items: center; gap: 18px; }
.lk-bereich-ring { position: relative; width: 84px; height: 84px; flex: 0 0 auto; display: grid; place-items: center; }
.lk-bereich-ring .lk-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.lk-bereich-ring b { font: 500 26px/1 var(--titel); color: var(--navy); }
.lk-bereich-kopf h2 { margin: 0; font: 500 clamp(30px, 4vw, 40px)/1 var(--titel); color: var(--navy); }
.lk-bereich-kopf p { margin: 4px 0 0; color: var(--text-2); font-size: 16px; }

.lk-gruppe { display: flex; flex-direction: column; gap: 2px; }
.lk-gruppe h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 12.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.lk-zeilen { list-style: none; margin: 0; padding: 0; }
.lk-zeile { border-bottom: 1px solid var(--linie); }
.lk-zeile:last-child { border-bottom: 0; }
.lk-zeile-knopf { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 4px; border: 0; background: none; font: inherit; text-align: left; color: var(--text); cursor: pointer; border-radius: 10px; }
button.lk-zeile-knopf:hover { background: rgba(18, 33, 74, .035); }
span.lk-zeile-knopf { cursor: default; }
.lk-titel { flex: 1; font-size: 16px; line-height: 1.35; }
.lk-zeile[data-stand="geplant"] .lk-titel { color: var(--text-2); }
.lk-zeile-knopf small { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.lk-zeile.offen .lk-zeile-knopf { font-weight: 700; }
.lk-detail { display: flex; flex-direction: column; gap: 10px; padding: 0 4px 16px 27px; animation: auftauchen .4s var(--weich) both; }
.lk-detail p { margin: 0; font-size: 15.5px; color: var(--text-2); max-width: 62ch; }
.lk-belege { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lk-belege li { font-size: 12.5px; padding: 3px 10px; border-radius: 99px; background: rgba(18, 33, 74, .05); color: var(--text-2); }
.lk-belege li.an { background: color-mix(in srgb, var(--gruen) 14%, #fff); color: #2f6e4c; }
.lk-belege li.aus { background: color-mix(in srgb, var(--orange) 14%, #fff); color: #8a4a12; }
.lk-detail .aktionen { margin: 0; }

/* ── Schmal (Handy, schmale Bühne): zwei Spalten, Coli oben ── */
@container (max-width: 640px) {
  .lk-kopf h1 { font-size: 32px; }
  .lk-kopf .a-kurz { font-size: 15px; }
  .lk-stand { font-size: 12px; gap: 2px 10px; }
  .lk-werkzeuge .aktion { font-size: 14px; padding: 8px 13px; }
  .lk-filter-knopf { font-size: 13px; padding: 6px 9px; }
  .lk-ast { min-height: 0; }
  .lk-netz { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: auto; gap: 10px; }
  .lk-netz.rund::before { display: none; }
  .lk-mitte { grid-column: 1 / -1; order: -1; flex-direction: row; gap: 14px; justify-content: flex-start; text-align: left; padding: 4px 0 8px; }
  .lk-coli { width: 84px; height: 84px; }
  .lk-coli img { width: 46px; }
  .lk-mitte b { margin: 0; }
  .lk-ast { padding: 12px 13px 10px; }
  .lk-satz { -webkit-line-clamp: 2; font-size: 13.5px; }
  .lk-bereich-ring { width: 64px; height: 64px; }
}
@container (max-width: 380px) {
  .lk-netz { grid-template-columns: 1fr; }
}

/* Wandbildschirm: größer, ruhiger */
body[data-modus="raum"] .lk-ast-kopf b { font-size: 21px; }
body[data-modus="raum"] .lk-satz { font-size: 17px; }
body[data-modus="raum"] .lk-titel { font-size: 20px; }

@media (prefers-reduced-motion: reduce) {
  .lk-ast, .lk-dreissig p, .lk-detail { animation: none; }
  .lk-live i { animation: none; }
}
