/* ============================================================
   ORCAPILOT · Materialeinkauf im Bau (orcapilot.de/materialeinkauf-bauwesen/)
   Loaded after styles.css. Same world as the other use case pages: 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. One running example
   carries the page: the inquiry for Bauvorhaben 2417 with four positions
   and the offers of Lieferant A, B and C. Every value in it is invented.
   ============================================================ */

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;
}

/* ============ 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); }

/* ============ 1 · HERO (ice world, split) ============ */
body.uc .hero-card.uc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.04fr);
  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;
}
/* One headline, two tones: the field quiet above, the promise strong below */
.uc-title-ctx {
  display: block;
  margin-bottom: 0.42em;
  font-size: 0.46em;
  font-weight: 600;
  letter-spacing: -0.012em;
  line-height: 1.2;
  color: #3F5D72;
  -webkit-text-fill-color: #3F5D72;
}
.uc-lead {
  margin: 1.35rem 0 0;
  max-width: 34rem;
  font-size: clamp(1.02rem, 0.97rem + 0.28vw, 1.18rem);
  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, .ps-foot-ic {
  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, .ps-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); }

/* Format of a document: Excel, PDF. Light on the ice, light on the deep */
.fmt {
  display: inline-block;
  flex: none;
  padding: 2px 0;
  width: 2.65rem;
  text-align: center;
  border-radius: 5px;
  border: 1px solid rgba(2, 29, 46, 0.16);
  font-family: var(--mono);
  font-size: 0.62rem;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-muted);
}

/* The Preisspiegel: three offers, read one after the other, side by side per position */
.ps {
  position: relative;
  z-index: 1;
  margin: 0;
  container-type: inline-size;
  background: #ffffff;
  border: 1px solid rgba(2, 29, 46, 0.1);
  border-radius: 1.1rem;
  box-shadow: 0 30px 70px rgba(6, 42, 63, 0.13), 0 2px 4px rgba(6, 42, 63, 0.05);
  color: var(--ink);
  overflow: hidden;
}
.ps-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--ink-line);
}
.ps-title { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.98rem; font-weight: 600; }
.ps-title svg { width: 20px; height: 20px; fill: none; stroke: var(--link-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ps-bv { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-muted); white-space: nowrap; }
.ps-body { position: relative; }
.ps-t { position: relative; z-index: 1; width: 100%; table-layout: fixed; border-collapse: collapse; }
.ps-c0 { width: 37%; }
.ps-t tr { border-bottom: 1px solid var(--ink-line); }
.ps-t tbody tr:last-child { border-bottom: 0; }
.ps-t th, .ps-t td { padding: 0.78rem 0.65rem; text-align: right; vertical-align: middle; }
.ps-t th:first-child { padding-left: 1.3rem; text-align: left; }
.ps-t th:last-child, .ps-t td:last-child { padding-right: 1.3rem; }
.ps-t thead th { padding-top: 0.85rem; padding-bottom: 0.7rem; vertical-align: bottom; }
.ps-h0 { font-size: 0.7rem; font-weight: 500; color: var(--ink-muted); }
.ps-sup { display: block; margin-bottom: 5px; font-size: 0.8rem; font-weight: 600; color: var(--ink-strong); white-space: nowrap; }
.ps-t tbody th { font-size: 0.84rem; font-weight: 600; line-height: 1.3; color: var(--ink-strong); }
.ps-mat { display: block; }
.ps-spec { font-weight: 500; color: #3F5D72; }
.ps-qty { display: block; margin-top: 3px; font-family: var(--mono); font-size: 0.7rem; font-weight: 400; color: var(--ink-muted); }
.ps-v { font-family: var(--mono); font-size: 0.78rem; color: var(--ink); white-space: nowrap; }
.ps-none { font-family: 'Inter', sans-serif; font-size: 0.72rem; line-height: 1.35; color: var(--ink-muted); white-space: normal; }
.ps-num { display: block; color: var(--ink-muted); text-decoration: line-through; text-decoration-color: rgba(2, 29, 46, 0.35); }
.ps-flag {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(252, 97, 45, 0.12);
  border: 1px solid rgba(252, 97, 45, 0.5);
  color: var(--human-ink);
  font-family: 'Inter', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
}
.ps-reader { /* the agent reads one offer at a time; hidden in the still image */
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 37%;
  width: 21%;
  pointer-events: none;
  opacity: 0;
}
.ps-band {
  position: absolute;
  inset: 0.35rem 0.15rem 0.35rem;
  border-radius: 0.7rem;
  background: linear-gradient(180deg, rgba(165, 216, 230, 0.36), rgba(165, 216, 230, 0.12));
}
.ps .agent {
  position: absolute;
  bottom: -20px;
  left: 50%;
  width: 40px;
  height: 40px;
  margin-left: -20px;
  background: #0B2738;
  border-color: #0B2738;
  box-shadow: 0 8px 18px rgba(6, 42, 63, 0.24);
}
.ps .agent svg { width: 25px; height: 25px; }
.ps-foot {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0.95rem 1.3rem 1.05rem;
  border-top: 1px solid var(--ink-line);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-strong);
  background: rgba(252, 97, 45, 0.05);
}
.ps-foot-ic { width: 28px; height: 28px; }

/* Narrow card (phones, small hero columns): shorter names, tighter cells */
@container (max-width: 480px) {
  .ps-head { padding: 0.9rem 1rem; }
  .ps-c0 { width: 35%; }
  .ps .sup-pre { display: block; }
  .ps-spec { display: none; }
  .ps-t th, .ps-t td { padding: 0.7rem 0.35rem; }
  .ps-t th:first-child { padding-left: 1rem; }
  .ps-t th:last-child, .ps-t td:last-child { padding-right: 1rem; }
  .ps-sup { font-size: 0.72rem; }
  .ps-t tbody th { font-size: 0.74rem; }
  .ps-v { font-size: 0.7rem; }
  .ps-none { font-size: 0.66rem; }
  .ps-flag { padding: 0 6px; font-size: 0.62rem; }
  .ps-foot { padding: 0.9rem 1rem; font-size: 0.86rem; }
}
@container (max-width: 360px) {
  .ps-v { font-size: 0.64rem; }
}

@media (max-width: 1023px) {
  body.uc .hero-card.uc-hero { grid-template-columns: minmax(0, 1fr); row-gap: 2.8rem; min-height: 0; }
  .uc-hero-text { max-width: 40rem; }
  .ps { max-width: 620px; }
}
@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: 22px; padding-right: 22px; }
  .uc-checks li { font-size: 0.82rem; }
}

/* ============ 2 · DAS PROBLEM (ice world) ============ */
.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, 2rem);
}
.manual-title { font-size: 1.05rem; font-weight: 600; color: var(--ink-strong); }
.manual-count { display: flex; gap: 1.4rem; font-family: var(--mono); font-size: 0.78rem; color: var(--ink-muted); }
.manual-count b { font-weight: 500; color: var(--human-ink); }

/* The same position in three offers, each written its own way, made comparable by hand */
.mx { color: var(--ink); }
.mx-need {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1rem;
  margin: 0 0 clamp(1.8rem, 3.6vw, 2.3rem);
  padding: 0.85rem 1.1rem;
  border-radius: 0.85rem;
  background: #ffffff;
  border: 1px solid var(--ink-line);
  box-shadow: 0 10px 24px rgba(6, 42, 63, 0.05);
}
.mx-need-k { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 600; color: var(--link-ink); }
.mx-need-k svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.mx-need-v { font-size: 0.98rem; font-weight: 600; color: var(--ink-strong); }
.mx-need-q { margin-left: auto; padding: 2px 9px; border-radius: 6px; background: rgba(165, 216, 230, 0.42); font-family: var(--mono); font-size: 0.82rem; color: var(--ink-strong); }
.mx-board { position: relative; }
.mx-offers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.mx-offer {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1rem 1.05rem 0;
  border-radius: 0.85rem;
  background: #ffffff;
  border: 1px solid var(--ink-line);
  box-shadow: 0 12px 28px rgba(6, 42, 63, 0.06);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.mx-of-head { display: flex; align-items: center; gap: 0.55rem; margin: 0 0 0.8rem; font-size: 0.92rem; font-weight: 600; color: var(--ink-strong); }
.mx-xl {
  display: grid;
  grid-template-columns: auto minmax(5.4rem, 1fr) auto auto;
  margin-bottom: 1rem;
  border-top: 1px solid rgba(2, 29, 46, 0.14);
  border-left: 1px solid rgba(2, 29, 46, 0.14);
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.35;
  color: var(--ink);
}
.mx-xl > span { padding: 0.32rem 0.4rem; border-right: 1px solid rgba(2, 29, 46, 0.14); border-bottom: 1px solid rgba(2, 29, 46, 0.14); white-space: nowrap; }
.mx-xl > span:nth-child(4n + 2) { white-space: normal; }
.mx-xl-h { background: #EEF5F8; color: var(--ink-muted); }
.mx-txt { margin: 0 0 1rem; font-size: 0.86rem; line-height: 1.6; color: var(--ink); }
.mx-hot { /* the place your team has to find: an orange underline, as if marked by hand */
  background: linear-gradient(rgba(252, 97, 45, 0.6), rgba(252, 97, 45, 0.6)) 0 100% / 100% 2px no-repeat;
  padding-bottom: 1px;
}
.mx-res {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.25rem 0.8rem;
  margin: auto 0 0;
  padding: 0.7rem 0 0.85rem;
  border-top: 1px dashed rgba(252, 97, 45, 0.45);
}
.mx-res-k { font-family: var(--mono); font-size: 0.68rem; color: var(--ink-muted); }
.mx-res b { font-family: var(--mono); font-size: 0.92rem; font-weight: 500; color: var(--human-ink); white-space: nowrap; }
.mx-hand { /* your team, going from offer to offer; hidden in the still image */
  position: absolute;
  z-index: 2;
  top: -21px;
  left: 0;
  width: calc((100% - 2.2rem) / 3);
  display: flex;
  justify-content: flex-end;
  padding-right: 0.85rem;
  pointer-events: none;
  opacity: 0;
}
.hand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: var(--human);
  background: #FFF4EF;
  border: 1.5px solid var(--human);
  box-shadow: 0 10px 24px rgba(252, 97, 45, 0.24);
}
.hand svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.mx-note { display: flex; align-items: center; gap: 0.5rem; margin: 1.15rem 0 0; font-size: 0.86rem; color: var(--ink-muted); }
.mx-note svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--human); stroke-width: 1.8; stroke-linecap: round; }

/* Armed (materialeinkauf-bauwesen.js): the hand goes from offer to offer and writes each price down */
.mx.is-armed .mx-hand { transition: transform 0.75s cubic-bezier(0.45, 0, 0.55, 1), opacity 0.3s ease; }
.mx.is-armed:is([data-at="a"], [data-at="b"], [data-at="c"]) .mx-hand { opacity: 1; }
.mx.is-armed[data-at="b"] .mx-hand { transform: translateX(calc(100% + 1.1rem)); }
.mx.is-armed:is([data-at="c"], [data-at="end"]) .mx-hand { transform: translateX(calc(200% + 2.2rem)); }
.mx.is-armed[data-at="a"] [data-of="a"],
.mx.is-armed[data-at="b"] [data-of="b"],
.mx.is-armed[data-at="c"] [data-of="c"] {
  border-color: rgba(252, 97, 45, 0.7);
  box-shadow: 0 0 0 3px rgba(252, 97, 45, 0.1), 0 16px 32px rgba(6, 42, 63, 0.08);
}
.mx.is-armed .mx-hot { background-size: 0 2px; transition: background-size 0.6s var(--ease-out) 0.55s; }
.mx.is-armed.h-b [data-of="b"] .mx-hot,
.mx.is-armed.h-c [data-of="c"] .mx-hot { background-size: 100% 2px; }
.mx.is-armed .mx-res > * { opacity: 0; transform: translateY(3px); transition: opacity 0.35s ease, transform 0.35s ease; }
.mx.is-armed.d-a [data-of="a"] .mx-res > *,
.mx.is-armed.d-b [data-of="b"] .mx-res > *,
.mx.is-armed.d-c [data-of="c"] .mx-res > * { opacity: 1; transform: none; }
.mx.is-armed .mx-res b { transition-delay: 0.25s; }
.mx.no-anim, .mx.no-anim * { transition: none !important; }

@media (max-width: 860px) {
  .mx-offers { grid-template-columns: minmax(0, 1fr); }
  .mx-hand { display: none; }
  .mx-need-q { margin-left: 0; }
}

/* Four 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(4, minmax(0, 1fr)); gap: 1.6rem clamp(1rem, 2.2vw, 1.8rem); }
.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.72rem; 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); white-space: nowrap; }
.mini td { padding: 0.45rem 0.4rem 0 0; white-space: nowrap; }
.mini .num { text-align: right; padding-right: 0; }
.mini .bad td:last-child { color: var(--human-ink); font-weight: 500; text-decoration: underline wavy rgba(252, 97, 45, 0.6); text-underline-offset: 4px; }
.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;
}
.slots { display: flex; gap: 6px; }
.slot {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 4px;
  border-radius: 6px;
  border: 1px dashed rgba(2, 29, 46, 0.25);
  font-size: 0.64rem;
  line-height: 1.2;
  text-align: center;
  color: var(--ink-muted);
}
.slot--in { flex: 1.35; border: 1px solid rgba(22, 104, 138, 0.3); background: rgba(165, 216, 230, 0.4); color: var(--ink-strong); font-weight: 600; }

@media (max-width: 1100px) {
  .slips-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .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; }
.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; }
.flow-play { display: none; }

.flow.is-armed .flow-steps {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  column-gap: 0.5rem;
}
.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.9rem; }
.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; }

/* "Vereinfachtes Beispiel": said once, above the example, as the draft asks */
.flow-kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 1.2rem 0 0;
  font-family: var(--mono);
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.72);
}
.flow.is-armed .flow-kicker { margin-top: 1.4rem; }

/* Stage: what the agent works on (left), the Preisspiegel that builds up (right) */
.flow-stage {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: clamp(1rem, 2.4vw, 1.8rem);
  align-items: center;
  margin-top: 0.9rem;
}
.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-match, .view-pick, .po {
  padding: 1rem 1.15rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}

/* A document: its header bar, then the paper */
.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 { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; overflow: hidden; font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; text-overflow: ellipsis; }
.mailhead-file svg { width: 15px; height: 15px; }
.paper {
  position: relative;
  padding: 1.2rem 1.3rem 1.3rem;
  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 { font-size: 0.98rem; font-weight: 700; line-height: 1.35; color: var(--ink-strong); }
.paper-meta { margin-top: 0.3rem !important; font-size: 0.86rem; line-height: 1.45; 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;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Step 1: the material list, an extract with four positions */
.ml { width: 100%; margin-top: 0.85rem; border-collapse: collapse; }
.ml th { padding: 0 0.6rem 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); }
.ml td { padding: 0.55rem 0.6rem 0.5rem 0; font-size: 0.8rem; line-height: 1.45; vertical-align: top; color: var(--ink); border-bottom: 1px solid var(--ink-line); }
.ml tbody tr:last-child td { border-bottom: 0; }
.ml .num { padding-right: 0; text-align: right; white-space: nowrap; }
.ml td.num { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-strong); }
.ml .ml-pos { width: 4.4rem; }
.ml td.ml-pos { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-muted); }
.ml tbody td:first-child { padding-left: 0.35rem; }
.ml thead th:first-child { padding-left: 0.35rem; }

/* Step 2: the inquiry to the suppliers you chose */
.rfq-to { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 0.85rem !important; }
.rfq-k { margin-right: 0.2rem; font-size: 0.72rem; color: var(--ink-muted); }
.rfq-chip { padding: 2px 9px; border-radius: 999px; background: rgba(165, 216, 230, 0.55); color: var(--ink-strong); font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.rfq-rows { margin: 0.75rem 0 0; }
.rfq-rows > div { display: grid; grid-template-columns: 7.4rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; padding: 0.42rem 0; border-top: 1px solid var(--ink-line); }
.rfq-rows dt { font-size: 0.74rem; color: var(--ink-muted); }
.rfq-rows dd { margin: 0; font-family: var(--mono); font-size: 0.76rem; color: var(--ink-strong); }
.rfq-rule {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.85rem !important;
  padding: 0.5rem 0.7rem;
  border-radius: 0.55rem;
  background: rgba(252, 97, 45, 0.07);
  border: 1px solid rgba(252, 97, 45, 0.35);
  color: var(--human-ink);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.4;
}
.rfq-rule svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.rfq-stamp {
  display: flex;
  width: fit-content;
  margin: 0.85rem 0.2rem 0 auto;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--human);
  color: var(--human-ink);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  transform: rotate(-4deg);
}
.rfq-stamp svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Step 3: the offer of Lieferant B, its marked values travel into the Preisspiegel */
.offer-match {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border);
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.015);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--agent);
}
.offer-match svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.of-pos { display: grid; gap: 0.55rem; margin-top: 0.9rem; padding-top: 0.85rem; border-top: 1px solid var(--ink-line); }
.of-pos p, .of-terms { font-size: 0.84rem; line-height: 1.9; }
.of-pos b { font-weight: 700; color: var(--link-ink); }
.of-terms { margin-top: 0.75rem !important; padding-top: 0.7rem; border-top: 1px dashed rgba(2, 29, 46, 0.16); }

/* Step 4: offer positions to the positions of your list */
.mt { display: grid; gap: 0.85rem; margin: 0; padding: 0; list-style: none; }
.mt-row { display: grid; grid-template-columns: auto minmax(1.4rem, 1fr) auto; align-items: center; gap: 0.35rem 0.5rem; }
.mt-from {
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--mono);
  font-size: 0.7rem;
  color: #ffffff;
  white-space: nowrap;
}
.mt-line { height: 2px; border-radius: 2px; background: var(--agent); transform-origin: left center; }
.mt-to { padding: 3px 10px; border-radius: 999px; background: rgba(165, 216, 230, 0.14); color: var(--agent); font-size: 0.74rem; font-weight: 600; white-space: nowrap; }
.mt-note { grid-column: 1 / -1; display: flex; align-items: center; gap: 0.4rem; font-size: 0.76rem; line-height: 1.4; color: rgba(255, 255, 255, 0.82); }
.mt-note svg { flex: none; width: 14px; height: 14px; fill: none; stroke: var(--agent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.mt-row--dev .mt-line { background: repeating-linear-gradient(90deg, var(--human) 0 6px, transparent 6px 10px); }
.mt-row--dev .mt-note { color: var(--human-text); font-weight: 600; }
.mt-row--dev .mt-note svg { stroke: currentColor; stroke-width: 1.8; }
.mt-row--none .mt-from { border-style: dashed; background: transparent; font-family: 'Inter', sans-serif; color: var(--text-muted); }
.mt-row--none .mt-line { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.28) 0 4px, transparent 4px 8px); }
.mt-row--none .mt-note { color: var(--text-muted); }
.mt-foot { margin: 0.95rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--border); font-size: 0.76rem; line-height: 1.55; color: var(--text-muted); }

/* Step 5: the proposal, with the Einstandspreis it saves */
.pk-gap { display: flex; align-items: center; gap: 0.45rem; margin: 0 0 0.85rem; font-size: 0.8rem; font-weight: 600; color: var(--agent); }
.pk-gap svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pk-alloc { display: grid; gap: 0.45rem; margin: 0 0 0.85rem; padding: 0; list-style: none; }
.pk-alloc li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.8rem;
  padding: 0.55rem 0.8rem;
  border-radius: 0.6rem;
  background: rgba(165, 216, 230, 0.08);
  border: 1px solid rgba(165, 216, 230, 0.26);
}
.pk-sup { font-size: 0.86rem; font-weight: 600; color: #ffffff; }
.pk-pos { font-family: var(--mono); font-size: 0.74rem; color: var(--agent); white-space: nowrap; }
.pk-cmp { margin: 0; }
.pk-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.8rem; padding: 0.42rem 0; border-bottom: 1px solid var(--border); }
.pk-row dt { font-size: 0.78rem; color: var(--text-muted); }
.pk-row dd { margin: 0; font-family: var(--mono); font-size: 0.78rem; color: rgba(255, 255, 255, 0.8); white-space: nowrap; }
.pk-row--pick dt { color: #ffffff; font-weight: 600; }
.pk-row--pick dd { color: var(--agent); font-size: 0.86rem; font-weight: 500; }
.pk-note { margin: 0.8rem 0 0; font-size: 0.76rem; line-height: 1.55; color: var(--text-muted); }

/* Step 6: the orders wait for your release */
.po { display: grid; }
.po-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); }
.po-head svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.po-wait, .po-done { grid-row: 2; grid-column: 1; }
.po-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 */
}
.po-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); }
.po-wait-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.po-line { display: flex; align-items: flex-start; gap: 0.55rem; margin: 0 0 0.6rem; font-size: 0.86rem; line-height: 1.45; color: #ffffff; }
.po-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; }
.po-note { margin: 0.8rem 0 0; padding-top: 0.75rem; border-top: 1px solid var(--border); font-size: 0.76rem; line-height: 1.5; color: var(--text-muted); }

/* The Preisspiegel that builds up */
.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 */
.pt-cap { margin: 0.65rem 0 0.15rem; font-size: 0.7rem; color: var(--text-muted); }
.pt { width: 100%; table-layout: fixed; border-collapse: collapse; }
.pt-c0 { width: 7.5rem; }
.pt tr { border-bottom: 1px solid rgba(165, 216, 230, 0.12); }
.pt th, .pt td { padding: 0.5rem 0.3rem; text-align: right; vertical-align: top; }
.pt th:first-child { padding-left: 0; text-align: left; }
.pt th:last-child, .pt td:last-child { padding-right: 0; }
.pt thead th { padding-top: 0.55rem; padding-bottom: 0.5rem; vertical-align: top; }
.pt thead th.pt-h0 { vertical-align: bottom; }
.pt-h0 { font-size: 0.68rem; font-weight: 500; color: var(--text-muted); }
.pt-sup { display: block; font-size: 0.78rem; font-weight: 600; color: #ffffff; white-space: nowrap; }
.pt-meta { margin-top: 4px; }
.pt-meta .v-to { display: inline-grid; justify-items: end; gap: 3px; }
.pt .fmt { width: 2.4rem; border-color: rgba(255, 255, 255, 0.25); color: rgba(255, 255, 255, 0.72); font-size: 0.58rem; }
.pt-asked { font-size: 0.64rem; font-weight: 400; color: var(--text-muted); }
.pt-bis { font-family: var(--mono); font-size: 0.6rem; font-weight: 400; color: #ffffff; white-space: nowrap; }
.pt tbody th { font-size: 0.78rem; font-weight: 600; line-height: 1.3; color: #ffffff; }
.pt-name { display: block; }
.pt-qty { display: block; margin-top: 2px; font-family: var(--mono); font-size: 0.64rem; font-weight: 400; color: var(--text-muted); }
.pt td { font-family: var(--mono); font-size: 0.74rem; line-height: 1.45; color: #ffffff; white-space: nowrap; }
.pt .pt-raw { display: grid; justify-items: end; font-size: 0.66rem; line-height: 1.55; }
.pt-raw > span { white-space: nowrap; }
.pt-raw > span:last-child:not([data-field]) { color: var(--text-muted); }
.pt-v { display: block; }
.pt-ok { display: block; margin-top: 1px; font-family: 'Inter', sans-serif; font-size: 0.62rem; color: var(--agent); white-space: nowrap; }
.pt-sn { display: inline-block; padding: 0 4px; border-radius: 4px; background: rgba(252, 97, 45, 0.2); color: var(--human-text); }
.pt-dev .pt-v { color: var(--text-muted); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.45); }
.pt-flag {
  display: inline-block;
  margin-top: 3px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid var(--human);
  background: rgba(252, 97, 45, 0.12);
  color: var(--human-text);
  font-family: 'Inter', sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  line-height: 1.5;
  white-space: nowrap;
}
.pt td.pt-none { font-family: 'Inter', sans-serif; font-size: 0.68rem; line-height: 1.35; color: var(--text-muted); white-space: normal; }
.pt td.pt-pick { position: relative; }
.pt td.pt-pick::after { /* the agent's proposal: who gets this position */
  content: '';
  position: absolute;
  inset: 3px 0 3px -3px;
  border-radius: 0.45rem;
  box-shadow: inset 0 0 0 1.5px var(--agent);
  background: rgba(165, 216, 230, 0.09);
  pointer-events: none;
}
.pt td.pt-pick:last-child::after { right: -3px; }
.pt-r--extra th { font-weight: 500; color: rgba(255, 255, 255, 0.86); }
.pt-r--extra td { font-size: 0.7rem; color: rgba(255, 255, 255, 0.86); }
.pt-sum { margin: 0; padding: 0.55rem 0 0.15rem; }
.pt-sum > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; padding: 0.28rem 0; }
.pt-sum dt { font-size: 0.72rem; color: var(--text-muted); }
.pt-sum dd { margin: 0; font-size: 0.78rem; line-height: 1.45; color: #ffffff; }
.pt-sum-total dd { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.15rem 0.6rem; }
.pt-sum-total b { font-family: var(--mono); font-size: 1rem; font-weight: 500; color: var(--agent); }
.pt-sum-total span { font-size: 0.7rem; color: var(--text-muted); }
.val { display: inline-block; border-radius: 0.3em; }
.swap { display: inline-grid; }
.swap > .val { grid-area: 1 / 1; justify-self: start; }
.pt .swap > .val { justify-self: end; }
.swap .v-from { visibility: hidden; } /* the still image shows the result */
.draft-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding-top: 0.75rem; }
.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; }

/* Narrow Preisspiegel (tablets in portrait, phones): tighter, raw values may wrap */
@container (max-width: 470px) {
  .draft { padding-left: 0.85rem; padding-right: 0.85rem; }
  .pt-c0 { width: 5.6rem; }
  .pt th, .pt td { padding-left: 0.18rem; padding-right: 0.18rem; }
  .pt-sup { font-size: 0.7rem; line-height: 1.25; }
  .pt .sup-pre { display: block; font-weight: 500; color: rgba(255, 255, 255, 0.7); }
  .pt .pt-raw { display: none; }
  .flow.is-armed.s3 .pt-b .swap .v-to { opacity: 1; transition-delay: calc(0.9s + var(--r) * 0.2s); }
  .flow.is-armed.s3 .pt-b .pt-flag { opacity: 1; transition-delay: 1.7s; }
  .pt .fmt { width: 2.1rem; }
  .pt-bis { white-space: normal; }
  .pt tbody th { font-size: 0.7rem; }
  .pt-qty { font-size: 0.6rem; }
  .pt td { font-size: 0.64rem; }
  .pt-raw { font-size: 0.6rem; }
  .pt-raw > span { white-space: normal; text-align: right; }
  .pt-ok, .pt-flag { white-space: normal; }
  .pt-flag { font-size: 0.56rem; border-radius: 0.4rem; }
  .pt-sum > div { grid-template-columns: 5.6rem minmax(0, 1fr); }
  .draft-foot { flex-wrap: wrap; }
}

/* A value on its way from the offer into the Preisspiegel */
.flyer { position: absolute; z-index: 5; top: 0; left: 0; pointer-events: none; will-change: transform; }
.flyer > span {
  display: inline-block;
  padding: 0 0.32em;
  border-radius: 0.3em;
  background: var(--agent);
  color: var(--ink-strong);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

/* ---- Armed (app logic in materialeinkauf-bauwesen.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-list,
.flow.is-armed[data-step="2"] .view-rfq,
.flow.is-armed[data-step="3"] .view-offer,
.flow.is-armed[data-step="4"] .view-match,
.flow.is-armed[data-step="5"] .view-pick,
.flow.is-armed[data-step="6"] .view-po { opacity: 1; visibility: visible; transition: opacity 0.4s ease 0.08s, visibility 0s; }

/* An empty cell waits as a faint bar, so the empty Preisspiegel reads as a table to be filled */
.flow.is-armed .pt td, .flow.is-armed .pt tbody th { position: relative; }
.flow.is-armed .pt td::before, .flow.is-armed .pt tbody th::before {
  content: '';
  position: absolute;
  top: 0.78rem;
  right: 0.3rem;
  width: min(3.6rem, 70%);
  height: 0.62rem;
  border-radius: 4px;
  background: rgba(165, 216, 230, 0.09);
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.flow.is-armed .pt tbody th::before { right: auto; left: 0; width: min(5.6rem, 80%); }
.flow.is-armed .pt td:last-child::before { right: 0; }

/* Step 1: the list is read row by row, the rows of the Preisspiegel appear */
.flow.is-armed[data-step="1"] .ml tbody tr { animation: ml-read 1.2s ease both; animation-delay: calc(0.3s + var(--k) * 0.16s); }
@keyframes ml-read {
  0% { background-color: rgba(165, 216, 230, 0); }
  30% { background-color: rgba(165, 216, 230, 0.4); }
  100% { background-color: rgba(165, 216, 230, 0); }
}
.flow.is-armed .pt tbody th > span { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s1 .pt tbody th > span { opacity: 1; transition-delay: calc(0.4s + var(--r) * 0.16s); }
.flow.is-armed.s1 .pt tbody th::before { opacity: 0; transition-delay: calc(0.4s + var(--r) * 0.16s); }

/* Step 2: the inquiry is put together, the three suppliers enter as columns, your team releases */
.pt-h--a { --c: 0; }
.pt-h--b { --c: 1; }
.pt-h--c { --c: 2; }
.flow.is-armed .pt-h > span { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s2 .pt-h > span { opacity: 1; transition-delay: calc(0.45s + var(--c) * 0.22s); }
.flow.is-armed .rfq-chip, .flow.is-armed .rfq-rows > div, .flow.is-armed .rfq-rule { opacity: 0; transform: translateY(3px); transition: opacity 0.35s ease, transform 0.35s ease; }
.flow.is-armed.s2 .rfq-chip { opacity: 1; transform: none; transition-delay: calc(0.45s + var(--k) * 0.22s); }
.flow.is-armed.s2 .rfq-rows > div { opacity: 1; transform: none; transition-delay: calc(1.1s + var(--k) * 0.14s); }
.flow.is-armed.s2 .rfq-rule { opacity: 1; transform: none; transition-delay: 1.85s; }
.flow.is-armed .rfq-stamp { opacity: 0; transform: rotate(-4deg) scale(1.15); transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.flow.is-armed.s2 .rfq-stamp { opacity: 1; transform: rotate(-4deg); transition-delay: 3.3s; }

/* Swaps: the value as offered gives way to the result */
.flow.is-armed .swap .v-from { visibility: visible; }
.flow.is-armed .swap .v-to { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed .swap .v-from { transition: opacity 0.35s ease; }

/* Step 3: the offer is assigned to the inquiry, the marks light up, the values fly over */
.flow.is-armed .offer-match { color: rgba(255, 255, 255, 0.42); transition: color 0.35s ease; }
.flow.is-armed.s3 .offer-match { color: var(--agent); transition-delay: 0.35s; }
.flow.is-armed .paper 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.s3 .paper mark.src { background: var(--agent); box-shadow: 0 0 0 0.18em var(--agent); color: var(--ink-strong); transition-delay: calc(0.6s + var(--k) * 70ms); }
.flow.is-armed.s3 .pt-h--b .v-from { opacity: 0; transition-delay: 0.45s; }
.flow.is-armed.s3 .pt-h--b .v-to { opacity: 1; transition-delay: 0.7s; }
.flow.is-armed .draft [data-field] { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed .draft [data-field].is-in { opacity: 1; }
.flow.is-armed .draft [data-field].flash { transition: none; animation: val-flash 1.4s ease-out both; }
@keyframes val-flash {
  from { background-color: rgba(165, 216, 230, 0.42); box-shadow: 0 0 0 3px rgba(165, 216, 230, 0.42); }
  to { background-color: rgba(165, 216, 230, 0); box-shadow: 0 0 0 3px rgba(165, 216, 230, 0); }
}
.flow.is-armed .pt-raw > span:not([data-field]):not(.pt-raw-1) { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed .pt-raw:has(.is-in) > span:not([data-field]):not(.pt-raw-1) { opacity: 1; transition-delay: 0.2s; }
.flow.is-armed .pt-b:has(.is-in)::before { opacity: 0; }

/* Step 4: each offer position finds its position; units converted, the deviation marked */
.flow.is-armed .mt-line { transform: scaleX(0); transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1); }
.flow.is-armed.s4 .mt-line { transform: scaleX(1); transition-delay: calc(0.35s + var(--k) * 0.42s); }
.flow.is-armed .mt-note, .flow.is-armed .mt-foot { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s4 .mt-note { opacity: 1; transition-delay: calc(0.75s + var(--k) * 0.42s); }
.flow.is-armed.s4 .mt-foot { opacity: 1; transition-delay: 2.5s; }
.flow.is-armed.s4 .pt-b .swap .v-from { opacity: 0; transition-delay: calc(0.6s + var(--r) * 0.42s); }
.flow.is-armed.s4 .pt-b .swap .v-to { opacity: 1; transition-delay: calc(0.85s + var(--r) * 0.42s); }
.flow.is-armed .pt-b .pt-flag { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s4 .pt-b .pt-flag { opacity: 1; transition-delay: 1.5s; }
.flow.is-armed .pt-late .pv { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s4 .pt-late .pv { opacity: 1; transition-delay: 2.1s; }
.flow.is-armed.s4 .pt-late::before { opacity: 0; transition-delay: 2.1s; }

/* Step 5: the other offers fill in, every position has one, the proposal and its Einstandspreis */
.flow.is-armed.s5 .pt-h--a .v-from { opacity: 0; transition-delay: 0.3s; }
.flow.is-armed.s5 .pt-h--a .v-to { opacity: 1; transition-delay: 0.5s; }
.flow.is-armed.s5 .pt-h--c .v-from { opacity: 0; transition-delay: 1.2s; }
.flow.is-armed.s5 .pt-h--c .v-to { opacity: 1; transition-delay: 1.4s; }
.flow.is-armed :is(.pt-a, .pt-c) .pv { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s5 .pt-a .pv { opacity: 1; transition-delay: calc(0.55s + var(--r) * 0.12s); }
.flow.is-armed.s5 .pt-c .pv { opacity: 1; transition-delay: calc(1.45s + var(--r) * 0.12s); }
.flow.is-armed.s5 .pt-a::before { opacity: 0; transition-delay: calc(0.55s + var(--r) * 0.12s); }
.flow.is-armed.s5 .pt-c::before { opacity: 0; transition-delay: calc(1.45s + var(--r) * 0.12s); }
.flow.is-armed .pt td.pt-pick::after { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s5 .pt td.pt-pick::after { opacity: 1; transition-delay: calc(2.5s + var(--r) * 0.14s); }
.flow.is-armed .pt-sum > div { opacity: 0; transform: translateY(3px); transition: opacity 0.4s ease, transform 0.4s ease; }
.flow.is-armed.s5 .pt-sum > div { opacity: 1; transform: none; transition-delay: 3s; }
.flow.is-armed.s5 .pt-sum > div + div { transition-delay: 3.25s; }
.flow.is-armed .pk-gap, .flow.is-armed .pk-alloc li, .flow.is-armed .pk-row, .flow.is-armed .pk-note { opacity: 0; transform: translateY(4px); transition: opacity 0.4s ease, transform 0.4s ease; }
.flow.is-armed.s5 .pk-gap { opacity: 1; transform: none; transition-delay: 2s; }
.flow.is-armed.s5 .pk-alloc li { opacity: 1; transform: none; transition-delay: calc(2.5s + var(--k) * 0.25s); }
.flow.is-armed.s5 .pk-row { opacity: 1; transform: none; transition-delay: 3s; }
.flow.is-armed.s5 .pk-row + .pk-row { transition-delay: 3.25s; }
.flow.is-armed.s5 .pk-note { opacity: 1; transform: none; transition-delay: 3.6s; }
.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.5s; }
.flow.is-armed.s5 .st-ready { opacity: 1; transition-delay: 3.65s; }
.flow.is-armed .draft-proof { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s5 .draft-proof { opacity: 1; transition-delay: 3.4s; }
.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.7s; }
.flow.is-armed.s5:not(.s6) .approve-btn::after { animation: approve-wait 2s ease-in-out 4s infinite both; }
@keyframes approve-wait {
  0%, 100% { opacity: 0; }
  50% { opacity: 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; }

/* Step 6: your team releases, the orders are prepared */
.flow.is-armed.s6 .approve-btn { animation: approve-press 0.45s ease-out 1.1s both; }
@keyframes approve-press {
  0% { transform: scale(1); }
  40% { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.flow.is-armed.s6 .ab-label--todo { opacity: 0; transition-delay: 1.45s; }
.flow.is-armed.s6 .ab-label--done { opacity: 1; transition-delay: 1.55s; }
.flow.is-armed.s6 .st-ready { opacity: 0; transition-delay: 1.8s; }
.flow.is-armed.s6 .st-done { opacity: 1; transition-delay: 1.95s; }
.flow.is-armed .po-wait { transition: opacity 0.35s ease; }
.flow.is-armed .po-done { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s6 .po-wait { animation: po-wait 2.3s linear 0.3s both; }
@keyframes po-wait { 0% { opacity: 0; } 12%, 85% { opacity: 1; } 100% { opacity: 0; } }
.flow.is-armed.s6 .po-done { opacity: 1; transition-delay: 2.55s; }
.flow.is-armed .po-line, .flow.is-armed .po-note { opacity: 0; transform: translateX(-4px); transition: opacity 0.35s ease, transform 0.35s ease; }
.flow.is-armed.s6 .po-line, .flow.is-armed.s6 .po-note { opacity: 1; transform: none; transition-delay: calc(2.7s + var(--k) * 0.35s); }

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

@media (max-width: 1100px) {
  .flow.is-armed .flow-name { font-size: 0.82rem; }
  .flow-stage { grid-template-columns: minmax(0, 1fr); }
  .flow.is-armed .flow-left > .flow-view { align-self: start; }
}
/* Phones: numbers only in the row, the active step's name above its text */
@media (max-width: 720px) {
  .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; }
}
@container (max-width: 430px) {
  .mailhead-file { display: none; }
  .paper { padding: 1rem 1rem 1.1rem; }
  .paper mark.src { white-space: normal; }
  .ml .ml-pos { width: 3.6rem; }
  .ml td { font-size: 0.76rem; }
  .rfq-rows > div { grid-template-columns: 6.4rem minmax(0, 1fr); }
  .mt-row { grid-template-columns: minmax(0, 1fr) 1.2rem minmax(0, 1fr); }
  .mt-from, .mt-to { white-space: normal; }
}

/* ============ 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 s { color: var(--text-muted); text-decoration-color: rgba(255, 255, 255, 0.55); }
.cv-line b { font-weight: 500; color: var(--agent); }
.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-team { color: var(--human-text); }
.cv-team svg { stroke-width: 1.8; }
.cv-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.6rem; }
.cv-pair > b, .cv-pair > span:last-child { justify-self: start; }
.cv-eq { color: var(--text-muted); }
.cv-line b.cv-dev { color: var(--human-text); }
.cv-ok.cv-pair > svg { align-self: center; }
.cv-extra { justify-content: space-between; gap: 0.6rem; padding: 0.28rem 0.55rem; border: 1px dashed rgba(255, 255, 255, 0.3); border-radius: 0.45rem; }
.cv-extra-tag { flex: none; font-family: 'Inter', sans-serif; font-size: 0.64rem; color: var(--text-muted); }
.cov { display: grid; gap: 0.45rem; }
.cov-row { display: grid; grid-template-columns: 4.7rem auto minmax(0, 1fr); align-items: center; gap: 0.6rem; margin: 0; font-family: var(--mono); font-size: 0.72rem; color: #ffffff; }
.cov-dots { display: inline-flex; gap: 4px; }
.cov-dots i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid rgba(165, 216, 230, 0.45); }
.cov-dots i.on { background: var(--agent); border-color: var(--agent); }
.cov-v { font-family: 'Inter', sans-serif; font-size: 0.7rem; color: var(--text-muted); }
.cov-row--open .cov-dots i { border-style: dashed; border-color: rgba(255, 255, 255, 0.35); }
.cov-row--open .cov-v { color: var(--agent); font-weight: 600; }
.wf { display: grid; gap: 0.28rem; }
.wf-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; margin: 0; font-family: var(--mono); font-size: 0.72rem; color: rgba(255, 255, 255, 0.86); }
.wf-row span:first-child { font-family: 'Inter', sans-serif; font-size: 0.72rem; color: var(--text-muted); }
.wf-row--sum { margin-top: 0.15rem; padding-top: 0.32rem; border-top: 1px solid rgba(165, 216, 230, 0.3); color: var(--agent); }
.wf-row--sum span:first-child { display: inline-flex; align-items: center; gap: 0.35rem; color: #ffffff; font-weight: 600; }
.wf-row svg { flex: none; width: 13px; height: 13px; fill: none; stroke: var(--agent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.wf-row--note span:first-child { font-size: 0.68rem; }
.tlx { display: grid; gap: 0.4rem; }
.tlx-top { position: relative; height: 1.25rem; margin: 0; }
.tlx-bell { position: absolute; right: calc(100% - var(--x) - 7px); bottom: 0; display: inline-flex; align-items: center; gap: 0.3rem; font-family: var(--mono); font-size: 0.68rem; color: var(--agent); white-space: nowrap; }
.tlx-bell svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tlx-track { position: relative; height: 12px; margin: 0 6px; }
.tlx-span { position: absolute; top: 5px; left: 0; right: 0; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.22); }
.tlx-dot { position: absolute; top: 1px; left: var(--x); width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: #0A2F42; border: 1.5px solid rgba(255, 255, 255, 0.6); }
.tlx-dot--bell { background: var(--agent); border-color: var(--agent); }
.tlx-dot--end { background: var(--human); border-color: var(--human); }
.tlx-labels { display: flex; justify-content: space-between; gap: 0.6rem; margin: 0; font-family: var(--mono); font-size: 0.66rem; color: var(--text-muted); }
.tlx-labels span:last-child { color: var(--human-text); }
.case h3, .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; }
.case > p, .fact > p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--text-muted); }
@media (max-width: 1023px) {
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .cases { grid-template-columns: minmax(0, 1fr); }
  .case { padding-bottom: 1.8rem; }
}

/* ============ 5 · ZAHLEN (two worked examples, until measured values exist) ============ */
.calcs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2.4vw, 1.6rem); margin-top: clamp(2.2rem, 5vw, 3.2rem); }
.calcs > .viz { margin: 0; }
.calc { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.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; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.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; font-size: clamp(1.02rem, 0.97rem + 0.3vw, 1.18rem); line-height: 1.6; color: rgba(255, 255, 255, 0.86); }
.calc-text b { font-weight: 600; color: #ffffff; white-space: nowrap; }
.calc-legend { margin: -0.4rem 0 0; font-size: 0.74rem; color: var(--text-muted); }
/* Time: one bar per working day of eight hours, filled in the team's colour */
.wdays { display: flex; flex-wrap: wrap; gap: 6px; }
.wday { position: relative; width: 6.4rem; height: 14px; border-radius: 4px; border: 1px solid rgba(255, 255, 255, 0.32); overflow: hidden; }
.wday-fill { position: absolute; top: 0; bottom: 0; left: 0; width: var(--f); background: var(--human); transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
/* Money: a hundred fields for a year's purchasing, one of them lit */
.pct { display: flex; align-items: center; gap: 1.2rem; }
.pct-grid {
  --cell: 11px;
  flex: none;
  display: grid;
  grid-template-columns: repeat(10, var(--cell));
  grid-auto-rows: var(--cell);
  gap: 3px;
  width: calc(var(--cell) * 10 + 27px);
  height: calc(var(--cell) * 10 + 27px);
  background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.15) var(--cell), transparent 0), linear-gradient(rgba(255, 255, 255, 0.15) var(--cell), transparent 0);
  background-size: calc(var(--cell) + 3px) calc(var(--cell) + 3px);
  -webkit-mask-image: linear-gradient(90deg, #000 var(--cell), transparent 0), linear-gradient(#000 var(--cell), transparent 0);
  -webkit-mask-size: calc(var(--cell) + 3px) calc(var(--cell) + 3px);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, #000 var(--cell), transparent 0), linear-gradient(#000 var(--cell), transparent 0);
  mask-size: calc(var(--cell) + 3px) calc(var(--cell) + 3px);
  mask-composite: intersect;
}
.pct-one { grid-column: 1; grid-row: 1; border-radius: 2px; background: #ffffff; box-shadow: 0 0 12px rgba(255, 255, 255, 0.6); }
.pct-label { display: grid; gap: 0.15rem; font-size: 0.78rem; line-height: 1.4; color: var(--text-muted); }
.pct-label b { font-size: 1rem; font-weight: 600; color: #ffffff; }
@media (max-width: 860px) {
  .calcs { grid-template-columns: minmax(0, 1fr); }
}

/* ============ 6 · KONTROLLE (reuses 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(3, minmax(0, 1fr)); gap: 0.9rem 2rem; }
@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: 26rem; }
body.uc .release-notes q { color: #ffffff; }
body.uc .release-notes svg { margin-top: 1px; }

/* ============ 7 · AUFWAND, KOSTEN, SOFTWARE ============ */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.4rem, 3vw, 2.6rem); margin-top: clamp(1.8rem, 4vw, 2.6rem); }
.fact { padding: 1.5rem 0 1.9rem; 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);
}
/* Starting step by step: one material group or one site, then the next ones */
.sx { flex-direction: column; justify-content: center; gap: 0.45rem; }
.sx-row { display: grid; grid-template-columns: 7.4rem minmax(0, 1fr); align-items: center; gap: 0.6rem; }
.sx-k { font-size: 0.76rem; color: var(--text-muted); }
.sx-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.sx-chip { padding: 3px 10px; border-radius: 999px; border: 1px dashed rgba(255, 255, 255, 0.28); color: rgba(255, 255, 255, 0.5); font-size: 0.74rem; white-space: nowrap; }
.sx-chip--on { border: 1px solid var(--agent); background: rgba(165, 216, 230, 0.16); color: var(--agent); font-weight: 600; }
.sx-or { padding-left: 8rem; font-size: 0.68rem; color: var(--text-muted); }
/* More offers per inquiry, the same team */
.more { flex-direction: column; justify-content: center; gap: 0.7rem; }
.more-k { font-size: 0.76rem; color: var(--text-muted); }
.more-slots { display: flex; gap: 8px; }
.more-slots i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid rgba(165, 216, 230, 0.4);
  background: rgba(165, 216, 230, 0.13);
  color: var(--agent);
  font-family: var(--mono);
  font-size: 0.76rem;
  font-style: normal;
}
.more-team { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; color: rgba(255, 255, 255, 0.82); }
.more-team svg { width: 16px; height: 16px; fill: none; stroke: var(--human); stroke-width: 1.8; stroke-linecap: round; }
/* What comes in and what goes out, nothing new for the suppliers */
.io { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; align-content: center; gap: 0.5rem 0.9rem; }
.io-col { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.io-k { flex-basis: 100%; font-size: 0.68rem; color: var(--text-muted); }
.io .agent { width: 38px; height: 38px; }
.io .agent svg { width: 24px; height: 24px; }
.io-not { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 5px; padding-top: 0.55rem; border-top: 1px solid var(--border); }
.ch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px 3px 6px;
  border-radius: 999px;
  background: rgba(165, 216, 230, 0.13);
  color: var(--agent);
  font-size: 0.74rem;
  font-weight: 600;
  white-space: nowrap;
}
.ch svg { flex: none; width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ch--no { background: transparent; border: 1px dashed rgba(255, 255, 255, 0.28); color: rgba(255, 255, 255, 0.5); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, 0.4); }
/* Purchasing 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.74rem;
  line-height: 1.35;
  color: #ffffff;
}
.rules .agent { width: 42px; height: 42px; }
.rules .agent svg { width: 26px; height: 26px; }
@media (max-width: 860px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .sx-row { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .sx-or { padding-left: 0; }
  .sx { gap: 0.3rem; }
}

/* ============ 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: 34rem; }

/* ============ MOTION ============ */
/* Only position, size 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 Preisspiegel */
  .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; }
  .ps { animation: rise-in 0.8s var(--ease-out) 0.45s both; }

  /* The Preisspiegel, one run of 10 s: the agent reads offer A, then B, then C,
     each column fills row by row; then the proposal waits for the team; then it starts over. */
  .ps.is-armed .ps-reader { animation: ps-reader 10s linear infinite both; }
  .ps.is-armed .ps-v { animation: ps-col-a 10s linear infinite both; animation-delay: calc(var(--r) * 0.18s); }
  .ps.is-armed .ps-v:nth-child(3) { animation-name: ps-col-b; }
  .ps.is-armed .ps-v:nth-child(4) { animation-name: ps-col-c; }
  .ps.is-armed .ps-h .fmt { animation: ps-fmt-a 10s linear infinite both; }
  .ps.is-armed .ps-h:nth-child(3) .fmt { animation-name: ps-fmt-b; }
  .ps.is-armed .ps-h:nth-child(4) .fmt { animation-name: ps-fmt-c; }
  .ps.is-armed .ps-foot { animation: ps-foot 10s linear infinite both; }
  .ps.is-armed .ps-reader,
  .ps.is-armed .ps-v,
  .ps.is-armed .ps-h .fmt,
  .ps.is-armed .ps-foot { animation-play-state: paused; }
  .ps.is-running .ps-reader,
  .ps.is-running .ps-v,
  .ps.is-running .ps-h .fmt,
  .ps.is-running .ps-foot { animation-play-state: running; }

  /* Starting step by step: the next groups and sites join one after another */
  .sx.is-armed .sx-chip:not(.sx-chip--on) { animation: sx-on 9s linear infinite both; animation-play-state: paused; animation-delay: calc(var(--k) * 1.3s); }
  .sx.is-running .sx-chip:not(.sx-chip--on) { animation-play-state: running; }
  /* More offers: the third and the fourth join, the team stays the same */
  .more.is-armed .more-slots .add { animation: more-add 8s linear infinite both; animation-play-state: paused; animation-delay: calc(var(--k) * 1.1s); }
  .more.is-running .more-slots .add { animation-play-state: running; }

  .faq-item[open] p { animation: rise-in 0.35s var(--ease-out) both; }
}
@media (prefers-reduced-motion: reduce) {
  .flow *, .flow::after, .mx * { transition: none !important; animation: none !important; }
}

/* Preisspiegel keyframes (1 s = 10 %). The reader stands on column A, B, C in turn. */
@keyframes ps-reader {
  0%, 3% { opacity: 0; left: 37%; }
  7% { opacity: 1; left: 37%; }
  21% { left: 37%; animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  26% { left: 58%; }
  41% { left: 58%; animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  46% { left: 79%; }
  60% { opacity: 1; left: 79%; }
  64%, 100% { opacity: 0; left: 79%; }
}
@keyframes ps-col-a { 0%, 9% { opacity: 0; } 12%, 88% { opacity: 1; } 93%, 100% { opacity: 0; } }
@keyframes ps-col-b { 0%, 29% { opacity: 0; } 32%, 88% { opacity: 1; } 93%, 100% { opacity: 0; } }
@keyframes ps-col-c { 0%, 49% { opacity: 0; } 52%, 88% { opacity: 1; } 93%, 100% { opacity: 0; } }
@keyframes ps-fmt-a { 0%, 6% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.16); background-color: transparent; } 8%, 90% { color: var(--ink-strong); border-color: rgba(22, 104, 138, 0.35); background-color: rgba(165, 216, 230, 0.45); } 95%, 100% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.16); background-color: transparent; } }
@keyframes ps-fmt-b { 0%, 26% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.16); background-color: transparent; } 28%, 90% { color: var(--ink-strong); border-color: rgba(22, 104, 138, 0.35); background-color: rgba(165, 216, 230, 0.45); } 95%, 100% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.16); background-color: transparent; } }
@keyframes ps-fmt-c { 0%, 46% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.16); background-color: transparent; } 48%, 90% { color: var(--ink-strong); border-color: rgba(22, 104, 138, 0.35); background-color: rgba(165, 216, 230, 0.45); } 95%, 100% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.16); background-color: transparent; } }
@keyframes ps-foot { 0%, 64% { opacity: 0; transform: translateY(6px); } 68%, 88% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; transform: none; } }

/* Step-by-step keyframes: a chip joins and stays until the run ends */
@keyframes sx-on {
  0%, 8% { border-style: dashed; border-color: rgba(255, 255, 255, 0.28); background-color: transparent; color: rgba(255, 255, 255, 0.5); }
  11%, 82% { border-style: solid; border-color: var(--agent); background-color: rgba(165, 216, 230, 0.16); color: var(--agent); }
  88%, 100% { border-style: dashed; border-color: rgba(255, 255, 255, 0.28); background-color: transparent; color: rgba(255, 255, 255, 0.5); }
}
@keyframes more-add {
  0%, 10% { opacity: 0; transform: scale(0.85); }
  15%, 80% { opacity: 1; transform: none; }
  88%, 100% { opacity: 0; transform: scale(0.85); }
}
