/* ==========================================================================
   Butterfly OS — Hero-Visual „Das liefert Butterfly OS“
   Fünf Ergebnisse auf einer Datenbasis. Ersetzt das Toolchain-Bild im Hero.
   Kräftige Fassung: blaue Fläche als Blickfang, weiße Ergebniskarten,
   farbige Ziffern in den Phasenfarben der Seite.
   User Journeys und Scope Item Mapping öffnen eine Vorschau (Overlay unter dem Header).
   ========================================================================== */
.lf {
  --lf-surface: var(--surface, #FFFFFF);
  --lf-text: var(--text, #0F1B24);
  --lf-text-3: var(--text-3, #4C5C67);
  --lf-text-4: var(--text-4, #5B6B76);
  --lf-accent: var(--accent, #2A83B0);
  --lf-accent-strong: var(--accent-strong, #1F6E96);
  --lf-ink: var(--ink, #0F1B24);
  --lf-ok-bg: var(--gate-ok-bg, #E8F5EE);
  --lf-ok-line: var(--gate-ok-line, #BFE3CE);
  --lf-ok-text: var(--gate-ok-text, #155C3B);
  --lf-c1: var(--p1, #1F6E96);
  --lf-c2: var(--p2, #1E8E5A);
  --lf-c3: var(--p3, #6A4BD1);
  --lf-c4: var(--p4, #C2681C);
  --lf-mono: var(--font-mono, "IBM Plex Mono", ui-monospace, Menlo, monospace);
  --lf-display: var(--font-display, "Schibsted Grotesk", "Helvetica Neue", sans-serif);
  --lf-body: var(--font-body, "IBM Plex Sans", system-ui, sans-serif);

  margin: 0; width: 100%; max-width: 35rem; margin-inline: auto;
  font-family: var(--lf-body); color: var(--lf-text);
  display: flex; flex-direction: column;
}

/* die blaue Fläche */
.lf__panel {
  background: var(--lf-accent);
  border-radius: 20px;
  padding: 18px 16px 16px;
  box-shadow: 0 28px 56px -28px rgba(31, 110, 150, 0.75), 0 2px 6px rgba(15, 27, 36, 0.08);
  display: flex; flex-direction: column;
}
.lf__head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; padding: 0 6px 14px; }
.lf__title { font-family: var(--lf-display); font-weight: 800; font-size: 21px; letter-spacing: -0.015em; color: #FFFFFF; }
.lf__kicker { font-family: var(--lf-mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #D5ECF7; }

/* Ergebnisse 1–4: weiße Karten */
.lf__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lf__item {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 1px 14px; align-items: center;
  padding: 11px 14px; border-radius: 12px; background: var(--lf-surface);
  width: 100%; border: 0; margin: 0; text-align: left; font: inherit; color: inherit;
  cursor: default; appearance: none; -webkit-appearance: none;
  box-shadow: none;
}
.lf__item[data-lf-preview] { cursor: pointer; }
.lf__item[data-lf-preview]:hover, .lf__item[data-lf-preview]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.85), 0 8px 20px rgba(15, 27, 36, 0.18);
}
.lf__hint {
  grid-column: 3; grid-row: 1 / span 2; align-self: center;
  font-size: 10.5px; font-weight: 600; color: var(--lf-accent-strong); white-space: nowrap;
  opacity: 0; transform: translateX(4px); transition: opacity 0.15s ease, transform 0.15s ease;
}
.lf__item[data-lf-preview]:hover .lf__hint, .lf__item[data-lf-preview]:focus-visible .lf__hint { opacity: 1; transform: none; }
.lf__num {
  grid-row: span 2; align-self: center;
  width: 40px; height: 40px; border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--lf-display); font-weight: 800; font-size: 21px; line-height: 1; color: #FFFFFF;
  background: var(--lf-c1);
}
.lf__list > li:nth-child(2) .lf__num { background: var(--lf-c2); }
.lf__list > li:nth-child(3) .lf__num { background: var(--lf-c3); }
.lf__list > li:nth-child(4) .lf__num { background: var(--lf-c4); }
.lf__name {
  grid-column: 2; grid-row: 1;
  font-family: var(--lf-display); font-weight: 700; font-size: 16px; line-height: 1.25; align-self: end;
  min-width: 0;
}
.lf__desc {
  grid-column: 2; grid-row: 2;
  font-size: 12.5px; line-height: 1.4; color: var(--lf-text-3); align-self: start;
  min-width: 0;
}
.lf__item--chips .lf__num { grid-row: span 3; }
.lf__item--chips .lf__hint { grid-row: 1 / span 3; }
.lf__chips {
  grid-column: 2; grid-row: 3;
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px;
}
.lf__chip { display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.2; border: 1px solid #F0D9A8; background: #FDF4E3; color: #7A4A06; }
.lf__chip--ok { background: var(--lf-ok-bg); border-color: var(--lf-ok-line); color: var(--lf-ok-text); }

/* Freigabe durch den Architekten zwischen 4 und 5 */
.lf__gate-wrap { position: relative; height: 36px; display: flex; align-items: center; justify-content: center; }
.lf__gate-wrap::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-1px); background: repeating-linear-gradient(to bottom, rgba(255,255,255,0.7) 0 4px, transparent 4px 8px); }
.lf__gate { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--lf-ok-bg); border: 1px solid var(--lf-ok-line); color: var(--lf-ok-text); font-size: 11.5px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 8px rgba(15, 27, 36, 0.18); }

/* Ergebnis 5: dunkel, weil es an die Agenten geht */
.lf__agents {
  display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 1px 14px; align-items: center;
  padding: 12px 14px; border-radius: 12px; background: var(--lf-ink); color: #FFFFFF;
  width: 100%; border: 0; margin: 0; text-align: left; font: inherit;
  cursor: default; appearance: none; -webkit-appearance: none;
}
.lf__agents[data-lf-preview] { cursor: pointer; }
.lf__agents[data-lf-preview]:hover, .lf__agents[data-lf-preview]:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(140, 195, 221, 0.7);
}
.lf__agents .lf__num { background: #8CC3DD; color: var(--lf-ink); }
.lf__agents .lf__name { color: #FFFFFF; }
.lf__agents .lf__desc { color: #C9D6DD; grid-column: 2 / -1; }
.lf__tag { font-family: var(--lf-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--lf-ink); background: #8CC3DD; border-radius: 999px; padding: 3px 8px; white-space: nowrap; align-self: end; }
.lf__agents .lf__hint { color: #8CC3DD; grid-row: 1; grid-column: 3; opacity: 0; }
.lf__agents:hover .lf__hint, .lf__agents:focus-visible .lf__hint { opacity: 1; transform: none; }

.lf__foot { margin-top: 12px; display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; font-family: var(--lf-mono); font-size: 11px; letter-spacing: 0.04em; color: var(--lf-text-4); }
.lf__foot strong { color: var(--lf-text); font-weight: 500; }

/* Einstieg: die Karten kommen nacheinander herein; ohne Bewegung steht alles sofort */
@media (prefers-reduced-motion: no-preference) {
  .lf__item, .lf__agents { animation: lf-in 0.5s cubic-bezier(0.2, 1.2, 0.3, 1) both; }
  .lf__list > li:nth-child(1) .lf__item { animation-delay: 0.10s; }
  .lf__list > li:nth-child(2) .lf__item { animation-delay: 0.25s; }
  .lf__list > li:nth-child(3) .lf__item { animation-delay: 0.40s; }
  .lf__list > li:nth-child(4) .lf__item { animation-delay: 0.55s; }
  .lf__agents { animation-delay: 0.80s; }
  @keyframes lf-in { from { opacity: 0.3; transform: translateX(14px) scale(0.98); } to { opacity: 1; transform: none; } }
}

@media (max-width: 420px) {
  .lf__panel { padding: 16px 10px 10px; border-radius: 16px; }
  .lf__title { font-size: 19px; }
  .lf__item, .lf__agents { grid-template-columns: 34px minmax(0, 1fr); gap: 1px 10px; padding-inline: 10px; }
  .lf__num { width: 34px; height: 34px; font-size: 18px; }
  .lf__tag { grid-column: 2; justify-self: start; margin-top: 4px; order: 3; }
  .lf__hint { display: none; }
}
/* Preview overlay: grey stage like the commissioned panels, under the sticky header. */
.lf-preview {
  position: fixed;
  top: var(--header-h, 5.75rem);
  left: 0; right: 0; bottom: 0;
  z-index: 45;
  display: grid;
  place-items: start center;
  padding: 0.6rem 1.1rem 1.4rem;
  overflow: auto;
  background: #7E8C95;
}
.lf-preview__box {
  width: min(88rem, 100%);
  max-height: calc(100vh - var(--header-h, 5.75rem) - 1.4rem);
  overflow: auto;
  background: transparent;
  color: #FFFFFF;
  display: flex;
  flex-direction: column;
}
.lf-preview__head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  padding: 4px 4px 14px;
  background: transparent;
}
.lf-preview__kicker {
  margin: 0 0 4px;
  font-family: var(--lf-mono, ui-monospace, monospace);
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.72);
}
.lf-preview__head h2 { margin: 0; font-size: 1.7rem; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.lf-preview__close {
  width: 2.25rem; height: 2.25rem; border: 0; border-radius: 8px;
  background: transparent; color: #fff; font-size: 1.5rem; line-height: 1;
  cursor: pointer; flex-shrink: 0;
}
.lf-preview__close:hover, .lf-preview__close:focus-visible { background: rgba(255,255,255,0.12); outline: none; }
.lf-preview__body { padding: 0 0 8px; }

body.lf-preview-open .assist {
  visibility: hidden !important;
  pointer-events: none !important;
}

.lf-split {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(16.5rem, 0.72fr);
  gap: 16px;
  align-items: stretch;
}
.lf-card {
  background: #FFFFFF;
  color: #0F1B24;
  border-radius: 22px;
  padding: 22px 24px 18px;
  min-width: 0;
}
.lf-card h3 {
  margin: 0 0 8px;
  font-family: var(--lf-display, "Schibsted Grotesk", sans-serif);
  font-size: 1.45rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2;
}
.lf-card__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.lf-card__head h3 { margin-bottom: 0; }
.lf-ex {
  margin: 0 0 8px;
  font-family: var(--lf-mono, ui-monospace, monospace);
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #6B7B86;
}
.lf-lead { margin: 8px 0 16px; font-size: 15px; line-height: 1.45; color: #3E4E58; }
.lf-note { margin: 14px 0 0; font-size: 12.5px; color: #6B7B86; }
.lf-legend { display: flex; gap: 12px; margin: 0; font-size: 12px; color: #5B6B76; }
.lf-card--story { padding: 10px; overflow: auto; }
.lf-card--story .storymap { margin: 0; }

.lf-aside {
  background: #0F1B24;
  color: #F4F7F9;
  border-radius: 22px;
  padding: 22px 22px 18px;
  display: flex; flex-direction: column; min-width: 0;
}
.lf-aside__kicker {
  margin: 0 0 8px;
  font-family: var(--lf-mono, ui-monospace, monospace);
  font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #8CC3DD;
}
.lf-aside__title {
  margin: 0 0 16px;
  font-family: var(--lf-display, "Schibsted Grotesk", sans-serif);
  font-size: 1.55rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em;
}
.lf-aside__label {
  margin: 12px 0 4px;
  font-size: 11.5px; color: #8A9AA4; text-transform: none;
}
.lf-aside__plain { margin: 0; font-size: 14.5px; line-height: 1.4; }
.lf-aside__quote {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #1A2831;
  border: 1px solid #2A3B45;
  font-size: 14px; line-height: 1.45;
}
.lf-aside__two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 8px; }
.lf-aside__gate {
  margin-top: auto;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13.5px; font-weight: 650; text-align: center;
}
.lf-aside__gate--approved { background: #E8F5EE; color: #155C3B; }
.lf-aside__gate--open { background: #F6E7C7; color: #7A4A06; }
.lf-aside__foot { margin-top: auto; padding-top: 16px; font-size: 13px; line-height: 1.45; color: #9AABB4; }

.lf-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.lf-pill--bd { background: #E4F0F8; color: #1F6E96; min-width: 3.2rem; }
.lf-pill--none { background: #EFE8FA; color: #5B3BB5; }
.lf-pill--ok { background: #E8F5EE; color: #155C3B; }
.lf-pill--open { background: #F6E7C7; color: #7A4A06; }
.lf-pill--gap { background: #F6E7C7; color: #7A4A06; }
.lf-fitdot { font-size: 12.5px; white-space: nowrap; }
.lf-fitdot::before { content: ""; display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 6px; vertical-align: 0.05em; }
.lf-fitdot--Standard::before { background: #1E8E5A; }
.lf-fitdot--Configuration::before { background: #2A6FD6; }
.lf-fitdot--Extensibility::before { background: #6A4BD1; }

.lf-maphead, .lf-maprow {
  display: grid;
  grid-template-columns: minmax(8.5rem, 1.4fr) minmax(5.5rem, 0.7fr) 5.2rem minmax(6.5rem, 0.8fr) 4.4rem;
  gap: 8px; align-items: center;
}
.lf-maphead {
  font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: #6B7B86;
  padding: 0 12px 8px;
}
.lf-maprows { border: 1px solid #E6EDF1; border-radius: 14px; overflow: hidden; }
.lf-maprow {
  width: 100%; border: 0; border-top: 1px solid #E6EDF1; background: #fff;
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  padding: 11px 12px; appearance: none;
}
.lf-maprow:first-child { border-top: 0; }
.lf-maprow.is-on { background: #F3F8FB; box-shadow: inset 3px 0 0 #2A83B0; }
.lf-maprow__act {
  display: block; font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: #6B7B86;
}
.lf-maprow strong { display: block; font-size: 13.5px; font-weight: 700; line-height: 1.25; }
.lf-maprow__role { font-size: 13px; color: #3E4E58; }
.lf-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.lf-chip {
  display: inline-flex; padding: 4px 10px; border-radius: 999px; font-size: 12px;
  background: #F3F6F8; color: #3E4E58; border: 1px solid #E0E6EA;
}
.lf-chip--ok { background: #E8F5EE; color: #155C3B; border-color: #BFE3CE; }
.lf-chip--open { background: #F6E7C7; color: #7A4A06; border-color: #E8D09A; }

.lf-roles {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.lf-role {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border: 1px solid #E6EDF1; border-radius: 14px;
}
.lf-role h4 { margin: 0 0 4px; font-size: 15px; }
.lf-role p { margin: 0; font-size: 13px; color: #5B6B76; }
.lf-role__n { display: block; margin-top: 6px; font-size: 13px; color: #0F1B24; }
.lf-role--wide { grid-column: 1 / -1; }
.lf-type {
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 8px; border-radius: 999px; white-space: nowrap;
}
.lf-type--Operational { background: #E8F5EE; color: #155C3B; }
.lf-type--FINBase { background: #E4EEFB; color: #1D4F9E; }
.lf-type--none { background: #F3F6F8; color: #5B6B76; }
.lf-stat { margin: 0 0 16px; font-size: 16px; }
.lf-stat strong { font-size: 2.6rem; font-weight: 800; letter-spacing: -0.04em; display: block; line-height: 1; color: #8CC3DD; }
.lf-bar { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) 2rem; gap: 8px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.lf-bar__track { display: block; height: 8px; border-radius: 999px; background: #1A2831; overflow: hidden; }
.lf-bar__track > i { display: block; height: 100%; background: #3DDC97; border-radius: inherit; }
.lf-bar--fin .lf-bar__track > i { background: #6B8CFF; width: 23%; }
.lf-bar em { font-style: normal; text-align: right; }
.lf-warn {
  margin: 0;
  padding: 10px 12px; border-radius: 10px;
  background: #F6E7C7; color: #7A4A06; font-size: 13.5px; font-weight: 650;
}

.lf-anchor {
  margin: 0 0 14px; padding: 10px 14px; border-radius: 999px; background: #F3F7FA;
  font-size: 13px; color: #3E4E58;
}
.lf-rqs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lf-rq {
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: #fff; border: 1px solid #E6EDF1; border-radius: 16px; padding: 14px 14px 12px;
  display: flex; flex-direction: column; gap: 8px; appearance: none;
}
.lf-rq.is-on { border-color: #8CC3DD; box-shadow: inset 0 0 0 1px #8CC3DD; }
.lf-rq__id { font-size: 11px; color: #6B7B86; letter-spacing: 0.04em; }
.lf-rq strong { font-size: 15px; line-height: 1.3; }
.lf-rq p { margin: 0; font-size: 13px; color: #5B6B76; line-height: 1.4; }

.lf-spec { margin: 0; border: 1px solid #E6EDF1; border-radius: 16px; overflow: hidden; }
.lf-spec > div {
  display: grid; grid-template-columns: 9.5rem minmax(0, 1fr);
  gap: 12px; padding: 12px 14px; border-top: 1px solid #E6EDF1; align-items: start;
}
.lf-spec > div:first-child { border-top: 0; }
.lf-spec dt {
  margin: 0; font-size: 10.5px; letter-spacing: 0.06em; text-transform: uppercase; color: #6B7B86; padding-top: 4px;
}
.lf-spec dd { margin: 0; font-size: 14.5px; line-height: 1.4; }
.lf-spec dd span { display: block; font-size: 13px; color: #5B6B76; margin-top: 2px; }
.lf-spec ul { margin: 0; padding-left: 1.1rem; }
.lf-spec li { margin: 0 0 4px; }
.lf-ticks { margin: 0 0 16px; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.lf-ticks li { padding-left: 1.3rem; position: relative; font-size: 14.5px; line-height: 1.4; }
.lf-ticks li::before { content: "✓"; position: absolute; left: 0; color: #3DDC97; font-weight: 700; }
.lf-ticks-inline { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.lf-ticks-inline span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; border-radius: 999px; border: 1px solid #2A3B45; font-size: 12.5px;
}
.lf-ticks-inline span::before { content: ""; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: #3DDC97; }

@media (max-width: 900px) {
  .lf-split, .lf-roles, .lf-rqs, .lf-aside__two { grid-template-columns: minmax(0, 1fr); }
  .lf-maphead { display: none; }
  .lf-maprow { grid-template-columns: minmax(0, 1fr) auto; }
  .lf-maprow__role { display: none; }
}
