/* ============================================================
   ORCAPILOT · Materialdisposition (orcapilot.de/materialdisposition/)
   Loaded after styles.css. Same world as the home page: the ice-white
   surface shows today's manual work, the dive, then the deep where the
   agent works. One colour code throughout: ice blue is what the agent
   does, orange is what your team decides. On top, one light per part of
   the bill of materials, as dispatchers know it from their ERP: green
   covered, yellow something to do, red a shortage. One running example
   carries the page: order 261187 for 400 fan modules LM 40, a bill of
   materials over two levels, and the axial fan that is short in between.
   ============================================================ */

body.uc {
  --ink-strong: #062A3F;
  --link-ink: #16688A;
  --human-text: #FFB59A;     /* orange as text on the deep: readable, same hue */
  --human-ink: #B9400F;      /* orange as text on the ice */
  --mono: 'JetBrains Mono', monospace;
  /* The lights, on the deep */
  --ok: #5CC995;
  --todo: #F2C14E;
  --short: #F2555A;
  --short-text: #FFA3A6;
  --tree: rgba(165, 216, 230, 0.28);
}

/* ============ DEPTH LADDER (seven sections in the deep) ============ */
body.uc .section.s1 { background: linear-gradient(180deg, #0C3A52, #0A3348); }
body.uc .section.s2 { background: linear-gradient(180deg, #0A3348, #092C3F); }
body.uc .section.s3 { background: linear-gradient(180deg, #092C3F, #072535); }
body.uc .section.s4 { background: linear-gradient(180deg, #072535, #061E2B); }
body.uc .section.s5 { background: linear-gradient(180deg, #061E2B, #041721); }
body.uc .section.s6 { background: linear-gradient(180deg, #041721, #031018); }
body.uc .section.s7 { background: linear-gradient(180deg, #031018, #01090E); }
body.uc .section.s1::before { display: none; }
body.uc .section.s1 .section-inner { padding-top: clamp(48px, 6.67vh, 85px); }
body.uc .section.l1 .section-inner { padding-bottom: clamp(56px, 8vh, 96px); }

/* ============ THE LIGHTS ============ */
.lamp { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.74rem; font-weight: 600; line-height: 1.45; white-space: nowrap; }
.lamp i {
  flex: none;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lc);
  box-shadow: 0 0 0 3px var(--lh);
}
.lamp[data-s="ok"] { --lc: var(--ok); --lh: rgba(92, 201, 149, 0.2); }
.lamp[data-s="todo"] { --lc: var(--todo); --lh: rgba(242, 193, 78, 0.2); }
.lamp[data-s="short"] { --lc: var(--short); --lh: rgba(242, 85, 90, 0.22); color: var(--short-text); }
/* On paper the same lights, a shade deeper so they hold against white */
.hd .lamp[data-s="ok"], .detail-board .lamp[data-s="ok"] { --lc: #22A063; --lh: rgba(34, 160, 99, 0.15); }
.hd .lamp[data-s="todo"], .detail-board .lamp[data-s="todo"] { --lc: #E3A21C; --lh: rgba(227, 162, 28, 0.18); }
.hd .lamp[data-s="short"], .detail-board .lamp[data-s="short"] { --lc: #DC3A42; --lh: rgba(220, 58, 66, 0.15); color: #B4262E; }

/* ============ THE BILL OF MATERIALS AS A TREE (hero, step 4) ============ */
.bom { margin: 0; padding: 0; list-style: none; }
.bom-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.34rem 0;
}
.bom-row[data-lvl="1"] { --ind: 1.15rem; }
.bom-row[data-lvl="2"] { --ind: 2.3rem; }
.bom-name { min-width: 0; padding-left: var(--ind, 0); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bom-row[data-lvl="0"] .bom-name { font-weight: 600; }
/* The branch into each part; .more carries its level's line on to a later sibling,
   .thru carries the first level's line past a second-level part */
.bom-row:not([data-lvl="0"])::before {
  content: '';
  position: absolute;
  top: 0;
  height: 50%;
  left: calc(var(--ind) - 0.85rem);
  width: 0.55rem;
  border-left: 1.5px solid var(--tree);
  border-bottom: 1.5px solid var(--tree);
  border-bottom-left-radius: 4px;
}
.bom-row.more::after { content: ''; position: absolute; top: 50%; bottom: 0; left: calc(var(--ind) - 0.85rem); border-left: 1.5px solid var(--tree); }
.bom-row.thru .bom-name::before { content: ''; position: absolute; top: 0; bottom: 0; left: 0.3rem; border-left: 1.5px solid var(--tree); }

/* ============ 1 · HERO (ice world, split) ============ */
body.uc .hero-card.uc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(2rem, 4.5vw, 4.75rem);
  text-align: left;
  padding: clamp(64px, 8vh, 104px) clamp(24px, 4.6vw, 76px);
  min-height: clamp(560px, calc(100vh - 140px), 780px);
  min-height: clamp(560px, calc(100svh - 140px), 780px);
}
.uc-hero-text { position: relative; z-index: 1; max-width: 36rem; }
.uc-title {
  margin: 0;
  font-size: clamp(2.3rem, 1.25rem + 2.8vw, 3.85rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.037em;
  text-wrap: balance;
  background: linear-gradient(to right, #062A3F 0%, #0C3A52 45%, #1D7FA8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #0C3A52;
}
.uc-lead {
  margin: 1.35rem 0 0;
  max-width: 33rem;
  font-size: clamp(1.05rem, 0.98rem + 0.32vw, 1.22rem);
  line-height: 1.55;
  color: #3F5D72;
}
.uc-checks { display: flex; flex-wrap: wrap; gap: 8px; margin: 1.25rem 0 0; padding: 0; }
.uc-checks li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 13px 5px 8px;
  border-radius: 999px;
  background: rgba(165, 216, 230, 0.42);
  border: 1px solid rgba(22, 104, 138, 0.16);
  color: var(--ink-strong);
  font-size: 0.86rem;
  font-weight: 600;
}
.uc-checks svg { width: 15px; height: 15px; fill: none; stroke: var(--link-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.uc-release { display: flex; align-items: center; gap: 0.7rem; margin: 1.15rem 0 0; color: var(--ink-strong); font-size: 0.98rem; font-weight: 500; line-height: 1.45; }
.uc-release-ic, .hd-foot-ic {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--human);
  background: rgba(252, 97, 45, 0.12);
  border: 1px solid rgba(252, 97, 45, 0.5);
}
.uc-release-ic svg, .hd-foot-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
body.uc .uc-hero .hero-cta { justify-content: flex-start; margin-top: clamp(1.8rem, 3.2vw, 2.4rem); }

/* The new order, checked part by part down to the raw material */
.hd { position: relative; z-index: 1; margin: 0; container-type: inline-size; }
.hd-card {
  --tree: rgba(30, 76, 102, 0.28);
  --scan: rgba(165, 216, 230, 0.36);
  position: relative;
  max-width: 33rem;
  margin-left: auto;
  background: #ffffff;
  border: 1px solid rgba(2, 29, 46, 0.1);
  border-radius: 0.95rem;
  color: var(--ink);
  box-shadow: 0 30px 70px rgba(6, 42, 63, 0.13), 0 2px 4px rgba(6, 42, 63, 0.05);
}
.hd-agent { position: absolute; z-index: 2; top: -22px; left: -22px; width: 44px; height: 44px; }
.hd .agent { background: #0B2738; border-color: #0B2738; box-shadow: 0 8px 18px rgba(6, 42, 63, 0.24); }
.hd .agent svg { width: 27px; height: 27px; }
.hd .agent::before {
  inset: 0;
  background: radial-gradient(circle, rgba(165, 216, 230, 0.42) 0%, rgba(165, 216, 230, 0.16) 55%, rgba(165, 216, 230, 0) 78%);
  box-shadow: 0 0 0 5px rgba(165, 216, 230, 0.5), 0 0 26px 6px rgba(22, 104, 138, 0.32);
  transition: opacity 0.4s ease;
}
.hd-head { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 0.8rem 1.1rem 0.8rem 1.6rem; border-bottom: 1px solid var(--ink-line); }
.hd-title { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; font-size: 0.9rem; font-weight: 600; color: var(--ink-strong); white-space: nowrap; }
.hd-title svg { flex: none; width: 17px; height: 17px; fill: none; stroke: var(--link-ink); stroke-width: 1.6; }
.hd-from { flex: none; font-family: var(--mono); font-size: 0.68rem; color: var(--ink-muted); white-space: nowrap; }
.hd-pos { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.95rem; margin: 0; padding: 0.75rem 1.1rem 0; font-size: 0.86rem; color: var(--ink-strong); }
.hd-pos b { font-weight: 600; }
.hd-pos span { font-family: var(--mono); font-size: 0.74rem; color: var(--ink); }
.hd-cols { display: flex; justify-content: space-between; margin: 0.75rem 1.1rem 0; padding-bottom: 0.4rem; border-bottom: 1px solid var(--ink-line); font-size: 0.66rem; color: var(--ink-muted); }
.hd .bom { padding: 0.35rem 1.1rem 0.55rem; }
.hd .bom-row { font-size: 0.8rem; color: var(--ink-strong); border-radius: 0.3rem; transition: background-color 0.25s ease, box-shadow 0.25s ease; }
.hd .bom-row:not([data-lvl="0"]) .bom-name { color: #20435A; }
.hd .lamp { font-size: 0.72rem; color: var(--ink-strong); border-radius: 4px; transition: color 0.3s ease, background-color 0.3s ease; }
.hd .lamp i { transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.hd-foot {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.7rem 1.1rem 0.8rem;
  border-top: 1px solid var(--ink-line);
  border-radius: 0 0 0.95rem 0.95rem;
  background: rgba(252, 97, 45, 0.05);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-strong);
}
.hd-foot-ic { width: 26px; height: 26px; }
.hd-foot-ic svg { width: 15px; height: 15px; }
.hd-foot-ic::after { /* waiting for the team: a soft ring, only ever faded */
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(252, 97, 45, 0.5);
  opacity: 0;
}

/* Armed (materialdisposition.js): the agent goes down the tree; each part gets its light */
.hd.is-busy .agent::before { opacity: 1; }
.hd.is-armed .bom-row:not(.is-set) .lamp { color: transparent; background-color: rgba(22, 104, 138, 0.1); }
.hd.is-armed .bom-row:not(.is-set) .lamp i { opacity: 0; transform: scale(0.4); }
.hd.is-armed .bom-row.is-scan { background-color: var(--scan); box-shadow: -0.5rem 0 0 var(--scan), 0.5rem 0 0 var(--scan); }
.hd.is-armed .hd-foot { opacity: 0; transform: translateY(4px); transition: opacity 0.4s ease, transform 0.4s ease; }
.hd.is-armed.is-wait .hd-foot { opacity: 1; transform: none; }
.hd.is-wait .hd-foot-ic::after { animation: hd-ring 2.6s ease-in-out 0.4s 1 both; }
.hd.is-fade .lamp, .hd.is-fade .hd-foot { opacity: 0; transition: opacity 0.5s ease; }
.hd.no-anim, .hd.no-anim *, .hd.no-anim *::before, .hd.no-anim *::after { transition: none !important; animation: none !important; }
@keyframes hd-ring { 0%, 100% { opacity: 0; } 25%, 75% { opacity: 1; } 50% { opacity: 0.15; } }

@container (max-width: 430px) {
  .hd-head { padding-left: 1.4rem; }
  .hd-from { display: none; }
  .hd .bom-row { font-size: 0.76rem; gap: 0.6rem; }
  .hd .lamp { font-size: 0.68rem; }
  .hd .bom, .hd-pos { padding-left: 0.9rem; padding-right: 0.9rem; }
  .hd-cols { margin-left: 0.9rem; margin-right: 0.9rem; }
}

@media (min-width: 1024px) and (max-width: 1279px) {
  body.uc .hero-card.uc-hero { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); column-gap: 2.6rem; }
}
@media (max-width: 1023px) {
  body.uc .hero-card.uc-hero { grid-template-columns: minmax(0, 1fr); row-gap: 3rem; min-height: 0; }
  .uc-hero-text { max-width: 40rem; }
  .hd { max-width: 560px; padding-left: 22px; }
  .hd-card { margin-left: 0; }
}
@media (max-width: 480px) {
  body.uc .hero-card.uc-hero { padding: 56px 18px 22px; }
  body.uc .uc-hero .hero-cta { flex-direction: row; flex-wrap: wrap; }
  body.uc .uc-hero .hero-cta .btn-cta { width: auto; padding-left: 26px; padding-right: 26px; }
  .uc-checks li { font-size: 0.82rem; }
  .hd { padding-left: 12px; }
  .hd-agent { top: -18px; left: -12px; width: 38px; height: 38px; }
  .hd .agent svg { width: 23px; height: 23px; }
}

/* ============ 2 · DAS PROBLEM (ice world) ============ */
.manual { color: var(--ink); }
.manual-cap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem 1.5rem;
  margin-bottom: clamp(1.4rem, 3vw, 2.1rem);
}
.manual-title { font-size: 1.05rem; font-weight: 600; color: var(--ink-strong); }
.manual-count { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-muted); }
.manual-count b { font-weight: 500; color: var(--human-ink); }

/* The desk: the bill of materials, and the stock movements of one part after another */
.desk { display: grid; grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr); gap: clamp(1.4rem, 3.4vw, 2.8rem); align-items: start; }
.bl, .mw {
  min-width: 0;
  background: #ffffff;
  border: 1px solid rgba(2, 29, 46, 0.1);
  border-radius: 0.9rem;
  box-shadow: 0 14px 34px rgba(6, 42, 63, 0.08), 0 1px 2px rgba(6, 42, 63, 0.06);
}
.bl-head, .mw-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.8rem 1.05rem;
  border-bottom: 1px solid var(--ink-line);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-strong);
}
.bl-head svg, .mw-head svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--link-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bl-rows { margin: 0; padding: 0.35rem 0 0.4rem; list-style: none; }
.bl-row {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.6rem;
  padding: 0.38rem 1.05rem;
}
.bl-row::before { /* the part being checked, by hand: hidden in the still image */
  content: '';
  position: absolute;
  inset: 0 0.45rem;
  border-radius: 0.45rem;
  background: rgba(252, 97, 45, 0.08);
  box-shadow: inset 2px 0 0 var(--human);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.bl-mark {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid rgba(2, 29, 46, 0.18);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}
.bl-mark svg { width: 12px; height: 12px; fill: none; stroke: #ffffff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; opacity: 0; transition: opacity 0.2s ease; }
.bl-name { position: relative; min-width: 0; font-size: 0.82rem; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bl-row[data-lvl="2"] .bl-name { padding-left: 1.05rem; }
.bl-row[data-lvl="2"] .bl-name::before { /* one level deeper */
  content: '';
  position: absolute;
  left: 0.2rem;
  top: 0.05em;
  width: 0.5rem;
  height: 0.55em;
  border-left: 1.5px solid rgba(30, 76, 102, 0.32);
  border-bottom: 1.5px solid rgba(30, 76, 102, 0.32);
  border-bottom-left-radius: 3px;
}
.bl-type { position: relative; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--ink-line); font-size: 0.66rem; color: var(--ink-muted); white-space: nowrap; }
.bl-note { margin: 0; padding: 0.65rem 1.05rem 0.8rem; border-top: 1px solid var(--ink-line); font-size: 0.74rem; color: var(--ink-muted); }
.bl-row.is-cur::before { opacity: 1; }
.bl-row.is-done .bl-mark { background: var(--human); border-color: var(--human); }
.bl-row.is-done .bl-mark svg { opacity: 1; }
/* The still image: the third part on the desk, the two before it done */
.manual:not(.is-armed) .bl-row[data-still]::before { opacity: 1; }
.manual:not(.is-armed) .bl-row:has(~ .bl-row[data-still]) .bl-mark { background: var(--human); border-color: var(--human); }
.manual:not(.is-armed) .bl-row:has(~ .bl-row[data-still]) .bl-mark svg { opacity: 1; }

/* The windows of stock movements, one opened after the other; the pile behind */
.mws { position: relative; display: grid; min-width: 0; }
.mws::before, .mws::after { /* the windows opened before, piled up behind */
  content: '';
  grid-area: 1 / 1;
  border-radius: 0.9rem;
  border: 1px solid rgba(2, 29, 46, 0.08);
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(6, 42, 63, 0.05);
}
.mws::before { transform: translate(14px, -14px); opacity: 0.5; }
.mws::after { transform: translate(7px, -7px); opacity: 0.8; }
.mw { grid-area: 1 / 1; position: relative; z-index: 1; overflow: hidden; }
.mw:not([data-still]) { display: none; }
.manual.is-armed .mw { display: block; opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0s linear 0.25s; }
.manual.is-armed .mw.is-cur { opacity: 1; visibility: visible; transition: opacity 0.25s ease, visibility 0s; }
.mw-title { font-family: var(--mono); font-size: 0.7rem; font-weight: 400; color: var(--ink-muted); }
.mw-part { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mw-t { width: 100%; border-collapse: collapse; margin: 0.35rem 0 0.5rem; }
.mw-t th { padding: 0.35rem 0.5rem 0.4rem; font-size: 0.66rem; font-weight: 500; text-align: left; color: var(--ink-muted); border-bottom: 1px solid var(--ink-line); white-space: nowrap; }
.mw-t th:first-child, .mw-t td:first-child { padding-left: 1.05rem; }
.mw-t th:last-child, .mw-t td:last-child { padding-right: 1.05rem; }
.mw-t td { position: relative; padding: 0.42rem 0.5rem; font-size: 0.78rem; color: var(--ink); border-bottom: 1px solid rgba(2, 29, 46, 0.05); white-space: nowrap; }
.mw-t tr:last-child td { border-bottom: 0; }
.mw-t td:first-child, .mw-t .num { font-family: var(--mono); font-size: 0.74rem; }
.mw-t .num { text-align: right; }
.mw-bal span { position: relative; z-index: 0; display: inline-block; font-weight: 500; color: var(--ink-strong); }
.mw-bal span::before { /* the value the clerk worked out, marked by hand */
  content: '';
  position: absolute;
  z-index: -1;
  left: -4px;
  right: -4px;
  top: 0.2em;
  bottom: 0;
  border-radius: 2px 5px 3px 4px;
  background: rgba(252, 97, 45, 0.24);
}
.mw-t tr { transition: background-color 0.2s ease; }
.manual.is-armed .mw-t tr.is-cur td { background: rgba(252, 97, 45, 0.07); }
.manual.is-armed .mw-bal span { clip-path: inset(0 100% 0 0); }
.manual.is-armed .mw-bal span::before { transform: scaleX(0); transform-origin: left center; }
.manual.is-armed .mw-bal.is-in span { clip-path: inset(0 0 0 0); transition: clip-path 0.42s steps(var(--n, 3), end) 0.15s; }
.manual.is-armed .mw-bal.is-in span::before { transform: scaleX(1); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.55s; }
.mw-note { grid-area: 2 / 1; display: flex; align-items: center; gap: 0.45rem; margin: 0.9rem 0 0; font-size: 0.78rem; font-weight: 500; color: var(--human-ink); }
.mw-note svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.manual.no-anim, .manual.no-anim *, .manual.no-anim *::before, .manual.no-anim *::after { transition: none !important; }

@media (max-width: 860px) {
  .desk { grid-template-columns: minmax(0, 1fr); row-gap: 2.2rem; }
  .bl { width: min(100%, 28rem); }
  .mws { margin-right: 14px; }
}
@media (max-width: 420px) {
  .mw-t th, .mw-t td { padding-left: 0.35rem; padding-right: 0.35rem; }
  .mw-t th:first-child, .mw-t td:first-child { padding-left: 0.8rem; }
  .mw-t th:last-child, .mw-t td:last-child { padding-right: 0.8rem; }
  .mw-t td { font-size: 0.72rem; white-space: normal; }
  .mw-t td:first-child, .mw-t .num { font-size: 0.68rem; }
  .bl-type { display: none; }
}

/* Three mistakes, each with the data it shows up in */
.slips { margin-top: clamp(2.4rem, 5vw, 3.6rem); }
.slips-lead { margin: 0 0 1.3rem; font-size: 1.05rem; font-weight: 600; color: var(--ink-strong); }
.slips-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.6rem clamp(1.2rem, 2.6vw, 2.2rem); }
.slip h3 { margin: 1.05rem 0 0.35rem; font-size: 1.02rem; font-weight: 600; line-height: 1.3; color: var(--ink-strong); }
.slip p { margin: 0; font-size: 0.94rem; line-height: 1.6; color: var(--ink-muted); }
.slip-viz {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 132px;
  padding: 0.95rem 1.05rem;
  border-radius: 0.85rem;
  background: #ffffff;
  border: 1px solid var(--ink-line);
  box-shadow: 0 12px 28px rgba(6, 42, 63, 0.06);
}
.mini { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.74rem; color: var(--ink); }
.mini th { padding: 0 0.4rem 0.45rem 0; font-weight: 400; text-align: left; color: var(--ink-muted); border-bottom: 1px solid var(--ink-line); }
.mini td { padding: 0.45rem 0.4rem 0 0; white-space: nowrap; }
.mini .num { text-align: right; }
.mini td.bad { color: var(--human-ink); font-weight: 500; background: rgba(252, 97, 45, 0.09); }
.slip-tag {
  align-self: flex-start;
  margin-top: 0.75rem;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(252, 97, 45, 0.1);
  color: var(--human-ink);
  font-size: 0.74rem;
  font-weight: 600;
}
@media (max-width: 860px) {
  .slips-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ============ 3 · SO ARBEITET DER AGENT ============ */
/* The colour legend, once, where the deep begins */
body.uc .v2-text p.legend { display: flex; flex-wrap: wrap; gap: 0.6rem 1.6rem; }
.legend span { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.94rem; color: rgba(255, 255, 255, 0.88); }
.legend span::before { content: ''; flex: none; width: 12px; height: 12px; border-radius: 50%; }
.legend-agent::before { background: var(--agent); }
.legend-team::before { background: var(--human); }

.flow { padding: clamp(1.1rem, 2.6vw, 2rem); }

/* Step list. Without JavaScript a numbered list; armed, a row of tabs with the
   active step's text below them. */
.flow-bar { display: flex; align-items: flex-start; gap: 1rem; }
.flow-steps { flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; }
.flow-step { margin: 0 0 1.1rem; }
.flow-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  color: #ffffff;
  font: inherit;
  text-align: left;
}
.flow-num {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid rgba(165, 216, 230, 0.45);
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--agent);
}
.flow-step--team .flow-num { border-color: rgba(252, 97, 45, 0.6); color: var(--human-text); }
.flow-name { font-size: 0.95rem; font-weight: 600; line-height: 1.3; hyphens: manual; }
.flow-prog { display: none; }
.flow-cap { margin: 0.35rem 0 0 calc(30px + 0.75rem); }
.flow-cap-title { display: none; }
.flow-text { margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--text-muted); max-width: 60rem; }
.inline-link {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: rgba(165, 216, 230, 0.45);
  text-underline-offset: 3px;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1), text-decoration-color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.inline-link:hover { color: #ffffff; text-decoration-color: rgba(255, 255, 255, 0.8); }
.flow-play { display: none; }

.flow.is-armed .flow-steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  column-gap: 0.45rem;
}
.flow.is-armed .flow-step { display: contents; }
.flow.is-armed .flow-tab {
  grid-row: 1;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.3rem 0.2rem 0.95rem;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.flow.is-armed .flow-tab:hover { color: rgba(255, 255, 255, 0.85); }
.flow.is-armed .flow-num { transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.15s cubic-bezier(0.4, 0, 0.2, 1); }
.flow.is-armed .flow-tab:hover .flow-num { transform: scale(1.06); }
.flow.is-armed .flow-tab:active .flow-num { transform: scale(0.96); }
.flow.is-armed .flow-name { font-size: 0.84rem; }
.flow.is-armed .flow-prog {
  display: block;
  position: absolute;
  left: 0;
  right: 0.3rem;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: rgba(165, 216, 230, 0.14);
  overflow: hidden;
}
.flow.is-armed .flow-prog::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--agent);
  transform: scaleX(0);
  transform-origin: left center;
}
.flow.is-armed .flow-step--team .flow-prog::after { background: var(--human); }
.flow.is-armed .flow-step.is-active .flow-tab { color: #ffffff; }
.flow.is-armed .flow-step.is-active .flow-num { background: var(--agent); border-color: var(--agent); color: var(--bg); }
.flow.is-armed .flow-step--team.is-active .flow-num { background: var(--human); border-color: var(--human); color: #ffffff; }
.flow.is-armed .flow-step.is-done .flow-num { background: rgba(165, 216, 230, 0.16); border-color: rgba(165, 216, 230, 0.3); }
.flow.is-armed .flow-step.is-done .flow-prog::after,
.flow.is-armed .flow-step.is-active .flow-prog::after { transform: scaleX(1); }
.flow.is-armed.is-playing .flow-step.is-active .flow-prog::after { animation: flow-prog var(--dur, 5s) linear both; }
.flow.is-armed.is-playing.is-held .flow-step.is-active .flow-prog::after { animation-play-state: paused; }
@keyframes flow-prog { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.flow.is-armed .flow-cap {
  grid-row: 2;
  grid-column: 1 / -1;
  margin: 0;
  padding: 1.05rem 0 0;
  border-top: 1px solid var(--border);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.flow.is-armed .flow-step.is-active .flow-cap { opacity: 1; visibility: visible; transition: opacity 0.35s ease 0.05s, visibility 0s; }
.flow.is-armed[data-step="0"] .flow-step:first-child .flow-cap { opacity: 1; visibility: visible; }

.flow.is-armed .flow-play {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-top: 0.1rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.15s cubic-bezier(0.4, 0, 0.2, 1), transform 0.12s ease;
}
.flow.is-armed .flow-play:hover { background: rgba(255, 255, 255, 0.1); }
.flow.is-armed .flow-play:active { transform: scale(0.95); }
.flow-play svg { width: 15px; height: 15px; fill: currentColor; }
.flow-play[aria-pressed="true"] .ic-play, .flow-play[aria-pressed="false"] .ic-pause { display: none; }

/* Stage: what the agent looks at (left), the disposition that builds up (right) */
.flow-stage {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: clamp(1rem, 2.4vw, 1.8rem);
  align-items: center;
  margin-top: 1.5rem;
}
.flow:not(.is-armed) .flow-stage { align-items: start; } /* without JavaScript: everything at once, top to bottom */
.flow-left { display: grid; gap: 1.2rem; min-width: 0; container-type: inline-size; }
.flow-view { min-width: 0; }
.flow.is-armed .flow-left > .flow-view { grid-area: 1 / 1; align-self: center; }
.view-title { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.85rem; font-family: var(--mono); font-size: 0.76rem; color: var(--agent); }
.view-title svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.view-stock, .view-fa, .view-chart, .view-buy, .view-follow, .erp {
  padding: 1rem 1.15rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}

/* Step 1: the new order in your ERP */
.mailhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-bottom: 0;
  border-radius: 0.85rem 0.85rem 0 0;
  background: rgba(255, 255, 255, 0.035);
  color: #ffffff;
  font-size: 0.9rem;
}
.mailhead svg { flex: none; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.mailhead-from { display: inline-flex; align-items: center; gap: 0.55rem; min-width: 0; font-weight: 600; white-space: nowrap; }
.mailhead-file { min-width: 0; overflow: hidden; font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; text-overflow: ellipsis; }
.paper {
  padding: 1.1rem 1.2rem 1.15rem;
  border-radius: 0 0 0.85rem 0.85rem;
  background: #F7FAFB;
  color: var(--ink);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}
.paper p { margin: 0; }
.paper-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.7rem; font-size: 0.98rem; font-weight: 700; line-height: 1.35; color: var(--ink-strong); }
.paper-sub { font-size: 0.74rem; font-weight: 500; color: var(--ink-muted); }
.paper mark.src {
  padding: 0;
  margin: 0 0.1em;
  border-radius: 0.2em;
  box-shadow: 0 0 0 0.18em var(--agent);
  background: var(--agent);
  color: var(--ink-strong);
  font-weight: 500;
  white-space: nowrap;
}
.op { width: 100%; margin-top: 0.85rem; border-collapse: collapse; }
.op th { padding: 0 0.5rem 0.4rem 0; font-size: 0.64rem; font-weight: 500; text-align: left; white-space: nowrap; color: var(--ink-muted); border-bottom: 1px solid var(--ink-line); }
.op td { padding: 0.55rem 0.5rem 0.45rem 0; font-family: var(--mono); font-size: 0.74rem; line-height: 1.45; white-space: nowrap; color: var(--ink); }
.op .num { text-align: right; }
.op th:last-child, .op td:last-child { padding-right: 0.15rem; }
.op td.op-name { font-family: 'Inter', sans-serif; font-size: 0.76rem; }
.op .op-pos { width: 3.6rem; color: var(--ink-muted); }
.op-note { display: flex; align-items: center; gap: 0.45rem; margin-top: 0.8rem !important; padding-top: 0.7rem; border-top: 1px solid var(--ink-line); font-size: 0.74rem; color: var(--ink-muted); }
.op-note svg { flex: none; width: 15px; height: 15px; fill: none; stroke: var(--link-ink); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@container (max-width: 470px) {
  .op .op-name, .op .op-pos { display: none; }
  .mailhead-file { display: none; }
}

/* Step 2: free stock, reserved, and what is left for production */
.sb { display: grid; gap: 0.85rem; }
.sb-row { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: 0.8rem; align-items: center; }
.sb-k { display: flex; flex-direction: column; margin: 0; font-size: 0.72rem; line-height: 1.35; color: var(--text-muted); }
.sb-k b { font-family: var(--mono); font-size: 0.95rem; font-weight: 500; color: #ffffff; }
.sb-track { min-width: 0; }
.sb-bar { display: flex; gap: 2px; width: var(--w); height: 2.15rem; }
.sb-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--f);
  min-width: 0;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  transform-origin: left center;
}
.sb-seg:first-child { border-radius: 0.45rem 0 0 0.45rem; }
.sb-seg:last-child { border-radius: 0 0.45rem 0.45rem 0; }
.sb-other, .k-other::before { background: repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0 3px, rgba(255, 255, 255, 0.06) 3px 7px); color: rgba(255, 255, 255, 0.82); }
.sb-free, .sb-res, .k-res::before { background: var(--agent); color: var(--bg); }
.sb-gap, .k-gap::before { border: 1.5px dashed rgba(165, 216, 230, 0.65); color: var(--agent); }
.sb-key { display: flex; flex-wrap: wrap; gap: 0.35rem 1.1rem; margin: 1rem 0 0; padding: 0.85rem 0 0; border-top: 1px solid var(--border); }
.sb-key li { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; color: var(--text-muted); }
.sb-key li::before { content: ''; flex: none; width: 14px; height: 10px; border-radius: 3px; }

/* Step 3: lots of 100, the last one partly rounded up; the dates with the buffer */
.lots-k { margin: 0 0 0.6rem; font-size: 0.74rem; color: var(--text-muted); }
.lots-row { display: flex; align-items: center; gap: 0.45rem; }
.lot {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 4.4rem;
  height: 2.35rem;
  border-radius: 0.45rem;
  border: 1.5px solid rgba(165, 216, 230, 0.5);
  overflow: hidden;
}
.lot-fill { position: absolute; inset: 0; background: var(--agent); transform-origin: left center; }
.lot--part .lot-fill { right: 20%; }
.lot-up, .ln-up::before { background: repeating-linear-gradient(135deg, rgba(165, 216, 230, 0.75) 0 3px, rgba(165, 216, 230, 0.3) 3px 6px); }
.lot-up { position: absolute; top: 0; bottom: 0; right: 0; width: 20%; }
.lot-n { position: relative; z-index: 1; font-family: var(--mono); font-size: 0.74rem; font-weight: 600; color: var(--bg); }
.lots-sum { margin-left: 0.6rem; font-size: 0.86rem; color: rgba(255, 255, 255, 0.8); white-space: nowrap; }
.lots-sum b { font-family: var(--mono); font-size: 1.15rem; font-weight: 500; color: var(--agent); }
.lots-note { display: flex; flex-wrap: wrap; gap: 0.3rem 1.1rem; margin: 0.75rem 0 0; }
.lots-note span { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.72rem; color: var(--text-muted); }
.lots-note span::before { content: ''; flex: none; width: 14px; height: 10px; border-radius: 3px; }
.ln-fill::before { background: var(--agent); }
.tl { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.tl-line { position: relative; height: 3.6rem; margin: 0 0.4rem; }
.tl-line::before { content: ''; position: absolute; left: 0; right: 0; top: 1.55rem; height: 2px; border-radius: 2px; background: rgba(165, 216, 230, 0.22); }
.tl-buf { position: absolute; left: 36.4%; right: 0; top: calc(1.55rem - 3px); height: 8px; border-radius: 4px; background: repeating-linear-gradient(135deg, rgba(165, 216, 230, 0.55) 0 3px, rgba(165, 216, 230, 0.18) 3px 6px); transform-origin: left center; }
.tl-buf span { position: absolute; top: 0.95rem; left: 50%; transform: translateX(-50%); font-size: 0.7rem; font-weight: 600; color: var(--agent); white-space: nowrap; }
.tl-pt { position: absolute; top: 0; left: var(--x); width: 0; }
.tl-pt::before { content: ''; position: absolute; top: calc(1.55rem - 4px); left: -5px; width: 10px; height: 10px; border-radius: 50%; background: var(--agent); box-shadow: 0 0 0 3px rgba(165, 216, 230, 0.2); }
.tl-pt b, .tl-pt span { position: absolute; left: 0; transform: translateX(-50%); white-space: nowrap; }
.tl-pt b { top: 0; font-family: var(--mono); font-size: 0.76rem; font-weight: 500; color: #ffffff; }
.tl-pt span { top: 2.15rem; font-size: 0.7rem; color: var(--text-muted); }
.tl-pt--start b, .tl-pt--start span { transform: none; left: -5px; }
.tl-pt--end b, .tl-pt--end span { transform: translateX(-100%); left: 5px; }
@container (max-width: 420px) {
  .sb-row { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .sb-k { flex-direction: row; align-items: baseline; gap: 0.5rem; }
  .tl-line { height: 4.5rem; }
  .tl-buf span { top: 1.95rem; }
}

/* Step 4: stock over time; the line, the zero, and the stretch below it */
.chart { position: relative; padding: 0 0.2rem; }
.chart-plot { position: relative; height: 10.5rem; margin-top: 1.3rem; }
.chart-zero { position: absolute; left: 0; right: 0; top: 50%; border-top: 1px dashed rgba(255, 255, 255, 0.3); }
.chart-zero span { position: absolute; right: 0; top: -1.15rem; font-family: var(--mono); font-size: 0.64rem; color: var(--text-muted); }
.chart-gap {
  position: absolute;
  left: 54%;
  width: 26%;
  top: 50%;
  height: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(135deg, rgba(242, 85, 90, 0.26) 0 3px, rgba(242, 85, 90, 0.1) 3px 7px);
  border-radius: 0 0 0.35rem 0.35rem;
}
.chart-gap span { font-family: var(--mono); font-size: 0.68rem; font-weight: 500; color: var(--short-text); white-space: nowrap; }
.chart-line { position: absolute; inset: 0; }
.chart-line svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart-line path { fill: none; stroke: var(--agent); stroke-width: 2.25; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.chart-line path.chart-neg { stroke: var(--short); stroke-width: 2.5; }
.chart-lv { position: absolute; left: calc(var(--x) + 4px); top: var(--y); transform: translateY(calc(-100% - 3px)); font-family: var(--mono); font-size: 0.7rem; font-weight: 500; color: var(--agent); }
.chart-axis { position: relative; height: 2.4rem; margin-top: 0.55rem; border-top: 1px solid var(--border); }
.chart-axis span { position: absolute; top: 0.45rem; left: var(--x); display: flex; flex-direction: column; font-size: 0.66rem; line-height: 1.35; color: var(--text-muted); white-space: nowrap; }
.chart-axis b { font-family: var(--mono); font-size: 0.7rem; font-weight: 500; color: #ffffff; }
.chart-verdict { display: flex; flex-wrap: wrap; gap: 0.45rem 1.2rem; margin: 0.95rem 0 0; padding-top: 0.85rem; border-top: 1px solid var(--border); font-size: 0.78rem; }
.chart-verdict span { display: inline-flex; align-items: center; gap: 0.45rem; }
.cv-sum { color: var(--text-muted); }
.cv-sum svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cv-short { font-weight: 600; color: var(--short-text); }
.cv-short i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--short); box-shadow: 0 0 0 3px rgba(242, 85, 90, 0.22); }

/* Step 5: a call-off, an order and a request, each with the rule that decided it */
.buy { display: grid; grid-template-columns: 7.3rem minmax(0, 1fr); gap: 0.15rem 0.85rem; align-items: start; padding: 0.75rem 0; border-top: 1px solid var(--border); }
.view-title + .buy { border-top: 0; padding-top: 0.1rem; }
.buy:last-child { padding-bottom: 0; }
.buy p { margin: 0; grid-column: 2; }
.buy-kind {
  grid-row: 1 / span 3;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 3px 10px 3px 7px;
  border-radius: 999px;
  background: rgba(165, 216, 230, 0.14);
  color: var(--agent);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.buy-kind svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.buy-what { font-size: 0.82rem; line-height: 1.45; color: #ffffff; }
.buy-what b { font-family: var(--mono); font-size: 0.78rem; font-weight: 500; color: var(--agent); white-space: nowrap; }
.buy-why { margin-top: 0.15rem !important; font-size: 0.72rem; line-height: 1.45; color: var(--text-muted); }
.buy-mail { margin: 0.45rem 0 0.1rem !important; padding: 0.5rem 0.7rem; border-left: 2px solid var(--agent); border-radius: 0 0.4rem 0.4rem 0; background: rgba(165, 216, 230, 0.07); font-size: 0.78rem; line-height: 1.5; color: rgba(255, 255, 255, 0.9); }
@container (max-width: 420px) {
  .buy { grid-template-columns: minmax(0, 1fr); }
  .buy p { grid-column: 1; }
  .buy-kind { grid-row: auto; margin-bottom: 0.35rem; }
}

/* Step 6: the ERP waits for the release, then reserves, creates and orders */
.erp { display: grid; }
.erp-head { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.85rem; font-family: var(--mono); font-size: 0.76rem; color: var(--agent); }
.erp-head svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.erp-wait, .erp-done { grid-row: 2; grid-column: 1; }
.erp-wait {
  display: flex;
  align-items: center;
  align-self: start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 0.7rem;
  border: 1px dashed rgba(252, 97, 45, 0.55);
  color: var(--human-text);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0; /* the still image shows the finished state */
}
.erp-wait-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(252, 97, 45, 0.14); border: 1px solid rgba(252, 97, 45, 0.5); color: var(--human); }
.erp-wait-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.erp-line { display: flex; align-items: flex-start; gap: 0.55rem; margin: 0 0 0.55rem; font-size: 0.84rem; line-height: 1.45; color: #ffffff; }
.erp-line svg { flex: none; width: 15px; height: 15px; margin-top: 0.15rem; fill: none; stroke: var(--agent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.erp-line--mail svg { stroke-width: 1.7; }
.erp-note { margin: 0.8rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--border); font-size: 0.74rem; line-height: 1.5; color: var(--text-muted); }

/* Step 7: following up until the supplier answers */
.fu { position: relative; margin: 0; padding: 0; list-style: none; }
.fu::before { content: ''; position: absolute; left: 4px; top: 0.7rem; bottom: 0.7rem; border-left: 1.5px solid rgba(165, 216, 230, 0.25); }
.fu-item { position: relative; display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: 0.6rem; padding: 0.4rem 0 0.4rem 1.3rem; font-size: 0.82rem; line-height: 1.45; }
.fu-item::before { content: ''; position: absolute; left: 0; top: 0.78rem; width: 9px; height: 9px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--agent); }
.fu-item--ok::before { background: var(--ok); border-color: var(--ok); box-shadow: 0 0 0 3px rgba(92, 201, 149, 0.2); }
.fu-date { padding-top: 0.08rem; font-family: var(--mono); font-size: 0.72rem; color: var(--text-muted); }
.fu-text { color: #ffffff; }
.fu-item--ok .fu-text { font-weight: 600; }
.fu-result { margin: 0.9rem 0 0; padding: 0.75rem 0.9rem; border-radius: 0.65rem; border: 1px solid rgba(165, 216, 230, 0.3); background: rgba(165, 216, 230, 0.07); }
.fu-k { margin: 0; font-size: 0.72rem; color: var(--text-muted); }
.fu-v { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.7rem; margin: 0.2rem 0 0; font-family: var(--mono); font-size: 1.02rem; font-weight: 500; color: var(--agent); }
.fu-v span { font-family: 'Inter', sans-serif; font-size: 0.74rem; font-weight: 500; color: rgba(255, 255, 255, 0.8); }
.fu-team, .detail-team { display: flex; align-items: center; gap: 0.65rem; margin: 0.9rem 0 0; font-size: 0.84rem; font-weight: 600; line-height: 1.45; color: var(--human-text); }
.fu-team-ic, .detail-team-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: rgba(252, 97, 45, 0.14); border: 1px solid rgba(252, 97, 45, 0.5); color: var(--human); }
.fu-team-ic svg, .detail-team-ic svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* The disposition: every part with its light and its proposal */
.flow-right { min-width: 0; container-type: inline-size; }
.draft {
  padding: 0.35rem 1.15rem 1.05rem;
  border: 1px solid rgba(165, 216, 230, 0.22);
  border-radius: 0.95rem;
  background: linear-gradient(180deg, rgba(165, 216, 230, 0.07), rgba(165, 216, 230, 0.02));
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.draft-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(165, 216, 230, 0.16);
}
.draft-title { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.95rem; font-weight: 600; color: #ffffff; }
.draft-title svg { width: 18px; height: 18px; fill: none; stroke: var(--agent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.draft-status { display: grid; justify-items: end; }
.st { grid-area: 1 / 1; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.st-work { border: 1px solid rgba(255, 255, 255, 0.22); color: rgba(255, 255, 255, 0.7); }
.st-ready { border: 1px solid var(--human); background: rgba(252, 97, 45, 0.12); color: var(--human-text); }
.st-done { background: var(--agent); color: var(--bg); }
.st-work, .st-ready { opacity: 0; } /* the still image shows the finished state */
.draft-rows { margin: 0; padding: 0.45rem 0 0.5rem; border-bottom: 1px solid rgba(165, 216, 230, 0.12); }
.draft-rows > div { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; padding: 0.22rem 0; }
.draft-rows dt { font-size: 0.74rem; color: var(--text-muted); }
.draft-rows dd { position: relative; margin: 0; min-width: 0; font-family: var(--mono); font-size: 0.76rem; line-height: 1.5; color: #ffffff; }
.val { display: inline-block; }
.dbom { padding: 0.5rem 0 0.55rem; border-bottom: 1px solid rgba(165, 216, 230, 0.12); }
.dbom .bom-row { padding: 0.29rem 0; font-size: 0.8rem; color: #ffffff; }
.dbom .bom-row:not([data-lvl="0"]) .bom-name { color: rgba(255, 255, 255, 0.86); }
.acts { position: relative; display: grid; justify-items: end; }
.acts > * { grid-area: 1 / 1; }
.act { color: rgba(255, 255, 255, 0.92); }
.act[class*="act-to"] { opacity: 0; } /* the still image shows each part's last proposal */
.act.lamp[data-s="short"] { color: var(--short-text); }
.draft-date { display: grid; grid-template-columns: 6.6rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; margin: 0; padding: 0.6rem 0; border-bottom: 1px solid rgba(165, 216, 230, 0.12); }
.draft-date span { grid-area: 1 / 1; font-size: 0.74rem; color: var(--text-muted); }
.draft-date b { grid-area: 1 / 2; font-family: var(--mono); font-size: 0.76rem; font-weight: 500; color: var(--agent); }
.draft-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding-top: 0.85rem; }
.draft-proof { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; color: var(--text-muted); }
.draft-proof svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.approve-btn {
  position: relative;
  flex: none;
  display: inline-grid;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  background: var(--human);
  color: var(--bg);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(252, 97, 45, 0.28);
}
.approve-btn::after { /* waiting for the team: a soft ring, only ever faded */
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  border: 2px solid rgba(252, 97, 45, 0.55);
  opacity: 0;
  pointer-events: none;
}
.ab-label { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; white-space: nowrap; }
.ab-label svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ab-label--todo { opacity: 0; }
.flow-note { margin: 1rem 0 0; font-size: 0.74rem; color: rgba(157, 174, 184, 0.75); text-align: right; }
@container (max-width: 420px) {
  .draft { padding-left: 0.9rem; padding-right: 0.9rem; }
  .draft-rows > div, .draft-date { grid-template-columns: 5.6rem minmax(0, 1fr); gap: 0.5rem; }
  .dbom .bom-row { grid-template-columns: minmax(0, 1fr) fit-content(48%); font-size: 0.74rem; gap: 0.5rem; }
  .dbom .bom-name { white-space: normal; }
  .dbom .lamp { font-size: 0.68rem; white-space: normal; text-align: right; }
  .draft-proof { font-size: 0.7rem; }
}

/* ---- Armed (materialdisposition.js): the stage tells the steps in order ---- */
.flow.is-armed .flow-view { opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s; }
.flow.is-armed:is([data-step="0"], [data-step="1"]) .view-order,
.flow.is-armed[data-step="2"] .view-stock,
.flow.is-armed[data-step="3"] .view-fa,
.flow.is-armed[data-step="4"] .view-chart,
.flow.is-armed[data-step="5"] .view-buy,
.flow.is-armed[data-step="6"] .view-erp,
.flow.is-armed[data-step="7"] .view-follow { opacity: 1; visibility: visible; transition: opacity 0.4s ease 0.08s, visibility 0s; }

/* The disposition before the agent has filled it: faint bars where the values go */
.flow.is-armed .val-s1 { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed .draft-meta dd::before,
.flow.is-armed .acts::before,
.flow.is-armed .draft-date::after {
  content: '';
  grid-area: 1 / 1;
  justify-self: end;
  align-self: center;
  width: 5.6rem;
  height: 0.7em;
  border-radius: 4px;
  background: rgba(165, 216, 230, 0.09);
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.flow.is-armed .draft-meta dd::before { position: absolute; top: 0.4em; left: 0; width: min(9rem, 80%); }
.flow.is-armed .draft-date::after { grid-area: 1 / 2; justify-self: start; width: 9rem; }
.flow.is-armed .act { opacity: 0; transform: translateX(-4px); transition: opacity 0.35s ease, transform 0.35s ease; }
.flow.is-armed .r-sub .bom-name { opacity: 0.38; transition: opacity 0.4s ease; }
.flow.is-armed .draft-date b { opacity: 0; transition: opacity 0.4s ease; }

/* Step 1: article, quantity and date are marked and taken over */
.flow.is-armed .view-order mark.src { background: transparent; box-shadow: 0 0 0 0.18em transparent; color: inherit; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.flow.is-armed.s1 .view-order mark.src { background: var(--agent); box-shadow: 0 0 0 0.18em var(--agent); color: var(--ink-strong); transition-delay: calc(0.45s + var(--k) * 0.28s); }
.flow.is-armed .op-note { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s1 .op-note { opacity: 1; transition-delay: 1.5s; }
.flow.is-armed.s1 .val-s1 { opacity: 1; transition-delay: 1.9s; }
.flow.is-armed.s1 .draft-meta > div + div .val-s1 { transition-delay: 2.1s; }
.flow.is-armed.s1 .draft-meta > div + div + div .val-s1 { transition-delay: 2.3s; }
.flow.is-armed.s1 .draft-meta dd::before { opacity: 0; transition-delay: 1.9s; }

/* Step 2: the stock bar, then the order's bar, then what each part means */
.flow.is-armed .sb-seg { transform: scaleX(0); transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1); }
.flow.is-armed .sb-seg, .flow.is-armed .sb-key { color: transparent; }
.flow.is-armed.s2 .sb-seg { transform: none; }
.flow.is-armed.s2 .sb-other { transition-delay: 0.3s; color: rgba(255, 255, 255, 0.82); }
.flow.is-armed.s2 .sb-free { transition-delay: 0.55s; color: var(--bg); }
.flow.is-armed.s2 .sb-res { transition-delay: 1.25s; color: var(--bg); }
.flow.is-armed.s2 .sb-gap { transition-delay: 1.65s; color: var(--agent); }
.flow.is-armed .sb-key { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s2 .sb-key { opacity: 1; color: inherit; transition-delay: 2.1s; }
.flow.is-armed.s2 .r-top .act-s2 { opacity: 1; transform: none; transition-delay: var(--d); }
.flow.is-armed.s2 .r-top .acts::before { opacity: 0; transition-delay: 2.4s; }

/* Step 3: three lots fill, the last one rounded up; then the dates and the buffer */
.flow.is-armed .lot-fill { transform: scaleX(0); transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.flow.is-armed .lot-up, .flow.is-armed .lot-n, .flow.is-armed .lots-sum, .flow.is-armed .lots-note { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s3 .lot-fill { transform: none; transition-delay: calc(0.35s + var(--k) * 0.32s); }
.flow.is-armed.s3 .lot-n { opacity: 1; transition-delay: calc(0.55s + var(--k) * 0.32s); }
.flow.is-armed.s3 .lot-up { opacity: 1; transition-delay: 1.45s; }
.flow.is-armed.s3 .lots-sum { opacity: 1; transition-delay: 1.75s; }
.flow.is-armed.s3 .lots-note { opacity: 1; transition-delay: 2s; }
.flow.is-armed .tl-pt { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s3 .tl-pt { opacity: 1; transition-delay: calc(2.3s + var(--k) * 0.3s); }
.flow.is-armed .tl-buf { transform: scaleX(0); transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1); }
.flow.is-armed .tl-buf span { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s3 .tl-buf { transform: none; transition-delay: 2.95s; }
.flow.is-armed.s3 .tl-buf span { opacity: 1; transition-delay: 3.25s; }
.flow.is-armed.s3 .r-top .act-s3 { opacity: 1; transform: none; transition-delay: var(--d); }
.flow.is-armed.s3 .r-top .act-to3 { opacity: 0; transition-delay: var(--o); }

/* Step 4: the line runs through time and dips below zero; then the tree lights up */
.flow.is-armed .chart-line { clip-path: inset(0 100% 0 0); }
.flow.is-armed.s4 .chart-line { clip-path: inset(0 0 0 0); transition: clip-path 2s linear 0.3s; }
.flow.is-armed .chart-gap, .flow.is-armed .chart-lv, .flow.is-armed .chart-axis span, .flow.is-armed .chart-verdict { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s4 .chart-lv, .flow.is-armed.s4 .chart-axis span { opacity: 1; }
.flow.is-armed.s4 .chart-lv:nth-of-type(1), .flow.is-armed.s4 .chart-axis span:nth-child(1) { transition-delay: 0.3s; }
.flow.is-armed.s4 .chart-lv:nth-of-type(2), .flow.is-armed.s4 .chart-axis span:nth-child(2) { transition-delay: 0.86s; }
.flow.is-armed.s4 .chart-axis span:nth-child(3) { transition-delay: 1.38s; }
.flow.is-armed.s4 .chart-lv:nth-of-type(3), .flow.is-armed.s4 .chart-axis span:nth-child(4) { transition-delay: 1.9s; }
.flow.is-armed.s4 .chart-gap { opacity: 1; transition-delay: 1.5s; }
.flow.is-armed.s4 .chart-verdict { opacity: 1; transition-delay: 2.4s; }
.flow.is-armed.s4 .r-sub .bom-name { opacity: 1; transition-delay: calc(2.75s + var(--k) * 0.35s); }
.flow.is-armed.s4 .r-sub .act-s4 { opacity: 1; transform: none; transition-delay: var(--d); }
.flow.is-armed.s4 .r-sub .acts::before { opacity: 0; transition-delay: calc(2.8s + var(--k) * 0.35s); }

/* Step 5: one way per part; the proposals on the right change with it */
.flow.is-armed .buy { opacity: 0; transform: translateY(4px); transition: opacity 0.4s ease, transform 0.4s ease; }
.flow.is-armed.s5 .buy { opacity: 1; transform: none; transition-delay: calc(0.3s + var(--k) * 0.6s); }
.flow.is-armed.s5 .acts .act-s5 { opacity: 1; transform: none; transition-delay: var(--d); }
.flow.is-armed.s5 .acts .act-to5 { opacity: 0; transition-delay: var(--o); }
.flow.is-armed .st { transition: opacity 0.3s ease; }
.flow.is-armed .st-work { opacity: 1; }
.flow.is-armed .st-done { opacity: 0; }
.flow.is-armed.s5 .st-work { opacity: 0; transition-delay: 3.3s; }
.flow.is-armed.s5 .st-ready { opacity: 1; transition-delay: 3.4s; }

/* Step 6: the team releases; only then does the ERP act */
.flow.is-armed .approve-btn { opacity: 0.32; box-shadow: none; transition: opacity 0.4s ease, box-shadow 0.4s ease; }
.flow.is-armed.s5 .approve-btn { opacity: 1; box-shadow: 0 10px 24px rgba(252, 97, 45, 0.28); transition-delay: 3.4s; }
.flow.is-armed.s6 .approve-btn { opacity: 1; box-shadow: 0 10px 24px rgba(252, 97, 45, 0.28); transition-delay: 0s; animation: approve-press 0.45s ease-out 2.6s both; }
.flow.is-armed.s6 .approve-btn::after { animation: approve-wait 1.6s ease-in-out 0.6s 1 both; }
@keyframes approve-wait { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
@keyframes approve-press { 0% { transform: scale(1); } 40% { transform: scale(0.92); } 100% { transform: scale(1); } }
.flow.is-armed .ab-label--todo { opacity: 1; transition: opacity 0.25s ease; }
.flow.is-armed .ab-label--done { opacity: 0; transition: opacity 0.25s ease; }
.flow.is-armed.s6 .ab-label--todo { opacity: 0; transition-delay: 2.9s; }
.flow.is-armed.s6 .ab-label--done { opacity: 1; transition-delay: 3s; }
.flow.is-armed.s6 .st-ready { opacity: 0; transition-delay: 3.2s; }
.flow.is-armed.s6 .st-done { opacity: 1; transition-delay: 3.3s; }
.flow.is-armed .erp-wait { transition: opacity 0.35s ease; }
.flow.is-armed .erp-done { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s6 .erp-wait { animation: erp-wait 3.1s linear 0.35s both; }
@keyframes erp-wait { 0% { opacity: 0; } 10%, 88% { opacity: 1; } 100% { opacity: 0; } }
.flow.is-armed.s6 .erp-done { opacity: 1; transition-delay: 3.5s; }
.flow.is-armed .erp-line, .flow.is-armed .erp-note { opacity: 0; transform: translateX(-4px); transition: opacity 0.35s ease, transform 0.35s ease; }
.flow.is-armed.s6 .erp-line, .flow.is-armed.s6 .erp-note { opacity: 1; transform: none; transition-delay: calc(3.7s + var(--k) * 0.35s); }

/* Step 7: the reminder, the answer, the earliest date; the red light turns green */
.flow.is-armed .fu-item, .flow.is-armed .fu-result, .flow.is-armed .fu-team { opacity: 0; transform: translateY(4px); transition: opacity 0.4s ease, transform 0.4s ease; }
.flow.is-armed.s7 .fu-item { opacity: 1; transform: none; transition-delay: calc(0.4s + var(--k) * 0.7s); }
.flow.is-armed.s7 .fu-result { opacity: 1; transform: none; transition-delay: 2.8s; }
.flow.is-armed.s7 .fu-team { opacity: 1; transform: none; transition-delay: 3.5s; }
.flow.is-armed.s7 .acts .act-s7 { opacity: 1; transform: none; transition-delay: var(--d); }
.flow.is-armed.s7 .acts .act-to7 { opacity: 0; transition-delay: var(--o); }
.flow.is-armed.s7 .draft-date b { opacity: 1; transition-delay: 3s; }
.flow.is-armed.s7 .draft-date::after { opacity: 0; transition-delay: 3s; }

/* Jumping back (or starting over) sets the new state at once */
.flow.no-anim, .flow.no-anim *, .flow.no-anim *::before, .flow.no-anim *::after { transition: none !important; animation: none !important; }

@media (max-width: 1100px) {
  .flow.is-armed .flow-name { font-size: 0.8rem; }
}
@media (max-width: 960px) {
  .flow-stage { grid-template-columns: minmax(0, 1fr); }
  .flow.is-armed .flow-left > .flow-view { align-self: start; }
}
/* Below 960px: numbers only in the row, the active step's name above its text */
@media (max-width: 960px) {
  .flow.is-armed .flow-steps { column-gap: 0.2rem; }
  .flow.is-armed .flow-tab { align-items: center; padding-bottom: 0.8rem; }
  .flow.is-armed .flow-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .flow.is-armed .flow-cap-title { display: block; margin: 0 0 0.35rem; font-size: 1rem; font-weight: 600; color: #ffffff; }
  .flow.is-armed .flow-prog { right: 0.1rem; }
  .flow-cap { margin-left: 0; }
}
@media (max-width: 420px) {
  .flow.is-armed .flow-num { width: 28px; height: 28px; font-size: 0.74rem; }
}

/* The release in detail: each proposal with its derivation, on paper */
.detail { margin-top: clamp(1.2rem, 2.4vw, 1.6rem); }
.detail-cap { display: block; margin: 0 0 1.2rem; }
.cmp-kicker { margin: 0 0 0.5rem; font-family: var(--mono); font-size: 0.74rem; line-height: 1.5; color: var(--agent); }
.detail h3 { margin: 0; max-width: 40rem; font-size: clamp(1.15rem, 1rem + 0.45vw, 1.35rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; color: #ffffff; }
.detail-board { padding: 0.4rem 1.2rem 0.5rem; border-radius: 0.9rem; background: #F7FAFB; color: var(--ink); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34); }
.dt { width: 100%; border-collapse: collapse; }
.dt thead th { padding: 0.65rem 1rem 0.55rem 0; text-align: left; font-size: 0.68rem; font-weight: 500; color: var(--ink-muted); border-bottom: 1.4px solid rgba(30, 76, 102, 0.5); }
.dt tbody th, .dt td { padding: 0.75rem 1rem 0.75rem 0; vertical-align: top; text-align: left; border-bottom: 1px solid var(--ink-line); }
.dt tbody tr:last-child th, .dt tbody tr:last-child td { border-bottom: 0; }
.dt tbody th { width: 11.5rem; font-size: 0.86rem; font-weight: 600; line-height: 1.35; color: var(--ink-strong); }
.dt tbody th small { display: block; margin-top: 0.15rem; font-size: 0.7rem; font-weight: 400; color: var(--ink-muted); }
.dt td:nth-child(2) { width: 12rem; padding-top: 0.82rem; }
.dt td:last-child { padding-right: 0; font-size: 0.86rem; line-height: 1.55; color: #24465C; }
.dt .lamp { font-size: 0.76rem; color: var(--ink-strong); }
.dt-short th, .dt-short td { background: rgba(220, 58, 66, 0.06); }
.dt-short th { box-shadow: inset 3px 0 0 #DC3A42; padding-left: 0.7rem; }
.dt-date th { font-weight: 600; }
.dt-date td:last-child { font-weight: 500; color: var(--ink-strong); }
.detail-team { margin-top: 1.15rem; max-width: 46rem; font-size: 0.92rem; font-weight: 500; }
@media (max-width: 760px) {
  .detail-board { padding: 0.2rem 0.95rem 0.4rem; }
  .dt, .dt tbody, .dt tr { display: block; }
  .dt thead { display: none; }
  .dt tr { padding: 0.8rem 0; border-bottom: 1px solid var(--ink-line); }
  .dt tbody tr:last-child { border-bottom: 0; }
  .dt tbody th, .dt td { display: block; width: auto !important; padding: 0; border-bottom: 0; }
  .dt td:nth-child(2) { padding: 0.35rem 0 0.25rem; }
  .dt td:nth-child(2):empty { display: none; }
  .dt td:last-child { font-size: 0.84rem; }
  .dt-short { margin: 0 -0.95rem; padding-left: 0.95rem !important; padding-right: 0.95rem !important; background: rgba(220, 58, 66, 0.06); box-shadow: inset 3px 0 0 #DC3A42; }
  .dt-short th, .dt-short td { background: none; box-shadow: none; padding-left: 0; }
  .detail-team { align-items: flex-start; }
}

/* ============ 4 · SONDERFÄLLE ============ */
.cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(1.4rem, 3vw, 2.6rem);
  margin-top: clamp(2rem, 4vw, 2.8rem);
}
.case { padding: 1.5rem 0 2.3rem; border-top: 1px solid var(--border); }
.case-viz {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.4rem;
  height: 124px;
  padding: 0.9rem 1rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(165, 216, 230, 0.13);
}
.cv-line { display: flex; align-items: center; gap: 0.45rem; margin: 0; font-family: var(--mono); font-size: 0.74rem; line-height: 1.45; color: #ffffff; }
.cv-line svg { flex: none; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.cv-muted { color: var(--text-muted); }
.cv-ok { color: var(--agent); }
.cv-bad { color: var(--short-text); }
.cv-team { color: var(--human-text); }
.cv-team svg { stroke-width: 1.8; }
.cv-ic { color: var(--agent); stroke-width: 1.7 !important; }
.cv-x { color: var(--text-muted); }
.case h3 { margin: 1.15rem 0 0.45rem; font-size: 1.05rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: #ffffff; }
.case > p, .case-body > p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--text-muted); }
/* The two cases with more to show: the full width, data left, text right */
.case--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.2rem clamp(1.4rem, 3vw, 2.6rem);
  align-items: center;
  padding-bottom: 2rem;
}
.case--wide .case-viz { height: auto; padding: 0.7rem 1rem 0.6rem; overflow-x: auto; }
.case--wide h3 { margin-top: 0; font-size: 1.15rem; }
.case--wide .case-body > p { font-size: 0.96rem; }
.case--last { padding-bottom: 0.4rem; }
.sig { width: 100%; border-collapse: collapse; }
.sig th, .sig td { padding: 0.42rem 0.6rem 0.42rem 0; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
.sig .num { text-align: right; }
.sig th:last-child, .sig td:last-child { padding-right: 0; }
.sig tbody tr:last-child th, .sig tbody tr:last-child td { border-bottom: 0; }
.sig thead th { font-size: 0.7rem; font-weight: 500; color: var(--text-muted); }
.sig tbody th { font-size: 0.8rem; font-weight: 500; color: #ffffff; }
.sig td { font-family: var(--mono); font-size: 0.74rem; color: rgba(255, 255, 255, 0.8); }
.sig td b { font-weight: 500; color: var(--agent); }
/* Six months ordered, six weeks planned */
.hz { display: flex; gap: 2px; margin: 0.15rem 0; }
.hz i { flex: 1; height: 10px; border-radius: 2px; background: rgba(255, 255, 255, 0.1); }
.hz i.on { background: var(--agent); }
/* The credit limit: what the material would cost, against what is insured */
.case-viz--credit { gap: 0.7rem; padding: 1rem 1.1rem 0.9rem; }
.cr { position: relative; display: grid; gap: 0.65rem; padding-bottom: 1.35rem; }
.cr-row { display: grid; gap: 0.3rem; }
.cr-k { display: flex; justify-content: space-between; gap: 1rem; margin: 0; font-size: 0.74rem; color: var(--text-muted); }
.cr-k b { font-family: var(--mono); font-size: 0.74rem; font-weight: 500; color: #ffffff; white-space: nowrap; }
.cr-bar { display: block; width: var(--w); height: 0.75rem; border-radius: 3px; background: rgba(165, 216, 230, 0.55); }
.cr-bar--over { background: linear-gradient(90deg, rgba(165, 216, 230, 0.55) 0 83.3%, var(--short) 83.3%); }
.cr-limit { position: absolute; top: 1.05rem; bottom: 0; left: var(--x); border-left: 1.5px dashed rgba(255, 255, 255, 0.6); }
.cr-limit span { position: absolute; bottom: -0.1rem; right: 0.4rem; font-size: 0.68rem; color: rgba(255, 255, 255, 0.8); white-space: nowrap; }
.cr-out { white-space: normal; }
@media (max-width: 1023px) {
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .case--wide { grid-template-columns: minmax(0, 1fr); }
  .case--wide .case-viz { max-width: 36rem; }
}
@media (max-width: 640px) {
  .cases { grid-template-columns: minmax(0, 1fr); }
  .case { padding-bottom: 1.8rem; }
  .case--wide { grid-template-columns: minmax(0, 1fr); }
  .case--wide h3 { font-size: 1.05rem; }
  .case--wide .case-body > p { font-size: 0.92rem; }
  .sig th, .sig td { padding-right: 0.4rem; }
  .sig tbody th { font-size: 0.74rem; white-space: normal; }
  .sig td { font-size: 0.68rem; }
  .sig td:nth-child(3) { white-space: normal; }
}

/* ============ 5 · ZAHLEN (the worked example, until measured values exist) ============ */
.calc { display: flex; flex-direction: column; gap: 1.1rem; }
.calc-side { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
/* With the sliders (JavaScript): sliders left, the result right */
.calc.is-armed { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1.6rem clamp(2rem, 5vw, 4.5rem); align-items: center; }
.calc.is-armed .calc-result { padding-left: clamp(1.6rem, 4vw, 3.2rem); border-left: 1px solid var(--border); }
.calc-tag {
  align-self: flex-start;
  margin: 0;
  padding: 4px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  font-size: 0.76rem;
  font-weight: 600;
  color: #ffffff;
}
.calc-inputs { display: grid; gap: 1rem; }
.calc-inputs[hidden] { display: none; }
.calc-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0.45rem 1rem; }
.calc-k { font-size: 0.88rem; color: rgba(255, 255, 255, 0.86); }
.calc-out { font-family: var(--mono); font-size: 1.05rem; color: var(--agent); }
.calc-in input { grid-column: 1 / -1; width: 100%; margin: 0; accent-color: var(--agent); cursor: pointer; }
.calc-in input:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.calc-text { margin: 0; max-width: 34rem; font-size: clamp(1.05rem, 0.98rem + 0.35vw, 1.25rem); line-height: 1.6; color: rgba(255, 255, 255, 0.86); }
.calc-text b { font-weight: 600; color: #ffffff; white-space: nowrap; }
/* One figure per full-time position, the share of the last one in orange (by area, see the script) */
.calc-people { display: flex; flex-wrap: wrap; gap: 6px; }
.calc-person { position: relative; display: inline-block; width: 52px; height: 52px; }
.calc-person svg { position: absolute; top: 0; left: 0; width: 52px; height: 52px; stroke-linecap: round; }
.cp-line { fill: none; stroke: rgba(255, 255, 255, 0.35); stroke-width: 1.4; }
.cp-fill { position: absolute; top: 0; left: 0; bottom: 0; width: var(--f); overflow: hidden; transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
.cp-fill svg { fill: var(--human); stroke: var(--human); stroke-width: 1.4; }
.calc-legend { margin: -0.3rem 0 0; font-size: 0.74rem; line-height: 1.5; color: var(--text-muted); }
@media (max-width: 760px) {
  .calc.is-armed { grid-template-columns: minmax(0, 1fr); }
  .calc.is-armed .calc-result { padding: 1.4rem 0 0; border-left: 0; border-top: 1px solid var(--border); }
}

/* ============ 6 · KONTROLLE (the release illustration of the home page) ============ */
body.uc .viz-release .station--neutral .station-text { max-width: 14rem; }
body.uc .release-notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2.4rem; }
@media (max-width: 860px) { body.uc .release-notes { grid-template-columns: minmax(0, 1fr); } }
body.uc .release-notes li { align-items: flex-start; line-height: 1.5; }
body.uc .release-notes li > span { max-width: 30rem; }
body.uc .release-notes q { color: #ffffff; }
body.uc .release-notes svg { margin-top: 1px; }

/* ============ 7 · AUFWAND, KOSTEN, ERP ============ */
/* Step by step: three stages, each a little higher */
.stages {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 2.25fr);
  gap: 1.4rem clamp(1.6rem, 4vw, 3rem);
  align-items: end;
  margin-top: clamp(2.2rem, 5vw, 3.2rem);
}
.stages-head { align-self: start; }
.stages-head h3 { margin: 0 0 0.5rem; font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; color: #ffffff; }
.stages-head p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--text-muted); }
.stages-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.9rem; align-items: end; margin: 0; padding: 0; list-style: none; }
.stage {
  position: relative;
  margin-top: calc((2 - var(--k)) * 1.1rem);
  padding: 1rem 1.05rem 1.15rem;
  border-radius: 0.8rem;
  border: 1px solid rgba(165, 216, 230, 0.13);
  background: rgba(255, 255, 255, 0.03);
}
.stage-num { display: block; font-family: var(--mono); font-size: 0.7rem; color: var(--agent); }
.stage-ic { position: absolute; top: 0.85rem; right: 0.9rem; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(165, 216, 230, 0.3); background: rgba(165, 216, 230, 0.07); color: var(--agent); }
.stage-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.stage h4 { margin: 0.9rem 0 0.35rem; font-size: 0.98rem; font-weight: 600; line-height: 1.3; color: #ffffff; }
.stage p { margin: 0; font-size: 0.86rem; line-height: 1.55; color: var(--text-muted); }
@media (max-width: 960px) {
  .stages { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .stages-list { grid-template-columns: minmax(0, 1fr); }
  .stage { margin-top: 0; }
}

.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(1.4rem, 3vw, 2.6rem); margin-top: clamp(2rem, 4vw, 2.8rem); }
.fact { padding: 1.5rem 0 0.4rem; border-top: 1px solid var(--border); }
.fact-viz {
  display: flex;
  height: 148px;
  padding: 0.95rem 1.05rem;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(165, 216, 230, 0.13);
}
.fact h3 { margin: 1.15rem 0 0.45rem; font-size: 1.05rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: #ffffff; }
.fact > p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--text-muted); }
/* Your ERP stays: the agent connects to it, nothing new to buy or build */
.fv-erp { flex-direction: column; justify-content: center; gap: 0.9rem; }
.fv-erp-row { display: flex; align-items: center; gap: 0.5rem; }
.fv-erp .agent { width: 40px; height: 40px; }
.fv-erp .agent svg { width: 25px; height: 25px; }
.fv-link { flex: 1; min-width: 1.5rem; height: 0; border-top: 2px dashed rgba(165, 216, 230, 0.45); }
.fv-erp-box { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.45rem 0.8rem; border-radius: 0.6rem; border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.04); font-size: 0.82rem; font-weight: 600; color: #ffffff; }
.fv-erp-box svg { width: 17px; height: 17px; fill: none; stroke: var(--agent); stroke-width: 1.6; }
.fv-nots { display: flex; flex-wrap: wrap; gap: 6px; }
.fv-not {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px 3px 7px;
  border-radius: 999px;
  border: 1px dashed rgba(255, 255, 255, 0.28);
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.55);
  text-decoration: line-through;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}
.fv-not svg { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
/* The rules move from one head to the agent */
.rules { align-items: center; gap: 0.7rem; }
.rules-who {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px dashed rgba(252, 97, 45, 0.6);
  color: var(--human-text);
  opacity: 0.75;
}
.rules-who svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.rules-list { flex: 1; min-width: 0; display: grid; gap: 5px; }
.rule { padding: 4px 9px; border-radius: 6px; background: rgba(165, 216, 230, 0.1); border: 1px solid rgba(165, 216, 230, 0.22); font-size: 0.72rem; line-height: 1.35; color: #ffffff; }
.rules .agent { width: 42px; height: 42px; }
.rules .agent svg { width: 26px; height: 26px; }
/* Master data with gaps: the agent asks, the answers stay */
.fv-stamm { flex-direction: column; justify-content: center; gap: 5px; }
.fv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.6rem; padding: 4px 9px; border-radius: 6px; background: rgba(255, 255, 255, 0.04); font-family: var(--mono); font-size: 0.72rem; color: rgba(255, 255, 255, 0.82); }
.fv-row > span:first-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv-row > span:last-child { display: inline-flex; align-items: center; gap: 0.3rem; }
.fv-row--ask > span:last-child { color: var(--agent); }
.fv-row svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fv-row--ok { display: flex; align-items: center; gap: 0.4rem; margin-top: 3px; background: none; padding-left: 2px; font-family: 'Inter', sans-serif; font-size: 0.76rem; font-weight: 600; color: var(--agent); }
.fv-row--ok svg { stroke-width: 2.6; }
@media (max-width: 1023px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact { display: grid; grid-template-columns: minmax(0, 16rem) minmax(0, 1fr); column-gap: 1.6rem; align-items: start; }
  .fact-viz { grid-row: 1 / 3; }
  .fact h3 { margin-top: 0.1rem; }
  .fact { padding-bottom: 1.6rem; }
}
@media (max-width: 640px) {
  .fact { display: block; }
  .fact h3 { margin-top: 1.15rem; }
}

/* ============ 8 · FRAGEN ============ */
.faq { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  padding: 1.15rem 0;
  list-style: none;
  cursor: pointer;
  font-size: 1.04rem;
  font-weight: 600;
  line-height: 1.4;
  color: #ffffff;
  transition: color 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--agent); }
.faq-item summary svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--agent); stroke-width: 2; stroke-linecap: round; transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.faq-item[open] summary svg { transform: rotate(45deg); }
.faq-item p { margin: 0 0 1.3rem; max-width: 44rem; font-size: 0.97rem; line-height: 1.65; color: var(--text-muted); }

/* ============ 9 · DEMO ============ */
.closing-text { margin: 1.2rem 0 0; max-width: 34rem; font-size: 1.02rem; line-height: 1.65; color: var(--text-muted); }
body.uc .closing h2 { max-width: 36rem; }

/* ============ MOTION ============ */
/* Only position, size, colour and transparency move; nothing moves under reduced
   motion, and without JavaScript every illustration shows its complete still image. */
@media (prefers-reduced-motion: no-preference) {
  /* Entrance: text first, then the order */
  .uc-title { animation: rise-in 0.7s var(--ease-out) 0.08s both; }
  .uc-lead { animation: rise-in 0.7s var(--ease-out) 0.2s both; }
  .uc-checks { animation: rise-in 0.7s var(--ease-out) 0.3s both; }
  .uc-release { animation: rise-in 0.7s var(--ease-out) 0.38s both; }
  .hd { animation: rise-in 0.8s var(--ease-out) 0.45s both; }
  .faq-item[open] p { animation: rise-in 0.35s var(--ease-out) both; }
}
@media (prefers-reduced-motion: reduce) {
  .flow *, .flow *::before, .flow *::after, .manual *, .hd * { transition: none !important; animation: none !important; }
}
