/* ============================================================
   ORCAPILOT · Auftragserfassung (orcapilot.de/auftragserfassung/)
   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. One running example carries
   the page: the call-off order 4500231877 of Kunde 20417.
   ============================================================ */

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;
}
.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, .inbox-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, .inbox-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 inbox: four e-mails, recognised one after the other */
.inbox {
  --row: 70px;
  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;
}
.inbox-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.3rem;
  border-bottom: 1px solid var(--ink-line);
}
.inbox-title { display: inline-flex; align-items: center; gap: 0.6rem; font-size: 0.98rem; font-weight: 600; }
.inbox-title svg { width: 20px; height: 20px; fill: none; stroke: var(--link-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.inbox-addr { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inbox-body { position: relative; }
.inbox-list { margin: 0; padding: 0; list-style: none; }
.inbox-row {
  position: relative;
  display: grid;
  grid-template-columns: 3.1rem minmax(0, 1fr) 3rem minmax(0, 11.9rem);
  align-items: center;
  height: var(--row);
  padding: 0 1.2rem 0 1.3rem;
  border-bottom: 1px solid var(--ink-line);
}
.inbox-row::before { /* lights up while the agent reads this e-mail; only ever faded */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(165, 216, 230, 0.26), rgba(165, 216, 230, 0.08));
  opacity: 0;
  pointer-events: none;
}
.fmt {
  position: relative;
  justify-self: start;
  padding: 3px 0;
  width: 2.45rem;
  text-align: center;
  border-radius: 5px;
  border: 1px solid rgba(2, 29, 46, 0.16);
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--ink-muted);
}
.mail { position: relative; display: flex; flex-direction: column; min-width: 0; }
.subj { font-size: 0.92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.from { margin-top: 2px; font-size: 0.8rem; color: var(--ink-muted); }
.kind { position: relative; grid-column: 4; display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.kind-chip {
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--agent);
  color: var(--ink-strong);
  font-size: 0.73rem;
  font-weight: 600;
  white-space: nowrap;
}
.kind-ok { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--link-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.inbox-agent { /* the agent travels the lane between e-mail and result; hidden in the still image */
  position: absolute;
  z-index: 2;
  top: calc((var(--row) - 40px) / 2);
  right: calc(1.2rem + 11.9rem + 1.5rem - 20px);
  width: 40px;
  height: 40px;
  opacity: 0;
  pointer-events: none;
}
.inbox .agent { background: #0B2738; border-color: #0B2738; box-shadow: 0 8px 18px rgba(6, 42, 63, 0.24); }
.inbox .agent svg { width: 25px; height: 25px; }
.inbox-foot {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0;
  padding: 0.95rem 1.3rem 1.05rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-strong);
  background: rgba(252, 97, 45, 0.05);
}
.inbox-foot-ic { width: 28px; height: 28px; }

/* Narrow inbox (phones, small hero columns): the result moves under the subject */
@container (max-width: 470px) {
  .inbox-row {
    grid-template-columns: 2.9rem minmax(0, 1fr) 1.4rem;
    grid-template-areas: "fmt mail ok" "fmt chip ok";
    row-gap: 6px;
    height: auto;
    min-height: var(--row);
    padding: 0.8rem 1rem;
  }
  .fmt { grid-area: fmt; align-self: start; margin-top: 2px; }
  .mail { grid-area: mail; }
  .kind { display: contents; }
  .kind-chip { grid-area: chip; justify-self: start; font-size: 0.72rem; }
  .kind-ok { grid-area: ok; align-self: center; }
  .inbox-agent { display: none; }
  .inbox-head { padding: 0.9rem 1rem; }
  .inbox-addr { display: none; }
  .inbox-foot { padding: 0.9rem 1rem; font-size: 0.88rem; }
}

@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; }
  .inbox { max-width: 600px; }
}
@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 { 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.8rem, 3.6vw, 2.6rem);
}
.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); }
.manual-track { position: relative; }
.manual-steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
}
.manual-steps::before { /* the path from check to check */
  content: '';
  position: absolute;
  top: 27px;
  left: calc(100% / 12);
  right: calc(100% / 12);
  height: 2px;
  background: rgba(2, 29, 46, 0.12);
  border-radius: 2px;
}
.manual-step { position: relative; display: flex; flex-direction: column; align-items: center; padding: 0 0.45rem; text-align: center; }
.manual-ic {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(2, 29, 46, 0.14);
  color: var(--ink-muted);
  box-shadow: 0 6px 16px rgba(6, 42, 63, 0.06);
}
.manual-ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.manual-label { margin-top: 0.95rem; font-size: 0.96rem; font-weight: 600; line-height: 1.3; color: var(--ink-strong); }
.manual-sub { margin-top: 0.3rem; font-size: 0.84rem; line-height: 1.4; color: var(--ink-muted); }
.manual-hand { /* the person doing it all by hand; hidden in the still image */
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  width: calc(100% / 6);
  height: 54px;
  display: flex;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
}
.hand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  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: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

@media (max-width: 860px) {
  .manual-steps { grid-template-columns: minmax(0, 1fr); grid-auto-rows: 78px; }
  .manual-steps::before { top: 39px; bottom: 39px; left: 26px; right: auto; width: 2px; height: auto; }
  .manual-step { flex-direction: row; align-items: center; gap: 1rem; padding: 0; text-align: left; }
  .manual-ic { width: 52px; height: 52px; }
  .manual-step > .manual-label, .manual-step > .manual-sub { margin: 0; }
  .manual-step { display: grid; grid-template-columns: 52px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 1rem; align-content: center; }
  .manual-ic { grid-row: 1 / 3; }
  .manual-label { align-self: end; }
  .manual-sub { align-self: start; margin-top: 2px; }
  .manual-hand { width: 52px; height: 78px; align-items: center; }
  .hand { width: 52px; height: 52px; }
  .manual-count { gap: 1rem; }
}

/* 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.75rem; 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; }
.mini .bad td:last-child, .mini td.bad { color: var(--human-ink); font-weight: 500; }
.mini .bad td:last-child { text-decoration: underline wavy rgba(252, 97, 45, 0.6); text-underline-offset: 4px; }
.mini td.bad { 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;
}
.stockbar { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 0.45rem 0.7rem; font-family: var(--mono); font-size: 0.72rem; color: var(--ink-muted); }
.sb-bar { display: flex; height: 22px; border-radius: 6px; border: 1px solid rgba(2, 29, 46, 0.2); overflow: hidden; }
.sb-res {
  flex: 0 0 90%;
  display: flex;
  align-items: center;
  padding-left: 7px;
  white-space: nowrap;
  font-size: 0.66rem;
  color: var(--ink-muted);
  background: repeating-linear-gradient(-45deg, rgba(2, 29, 46, 0.1) 0 4px, transparent 4px 8px);
}
.sb-free { flex: 1; background: var(--agent); }
.sb-need {
  width: 60%;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1.5px solid var(--human);
  color: var(--human-ink);
  font-weight: 500;
  white-space: nowrap;
}

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

/* Stage: what the agent looks at (left), the draft that builds up (right) */
.flow-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  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; }

/* The e-mail and its PDF */
.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; font-weight: 600; white-space: nowrap; }
.mailhead-file { display: inline-flex; align-items: center; gap: 0.4rem; min-width: 0; font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); }
.mailhead-file { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0.7rem 1rem;
  list-style: none;
  border: 1px solid var(--border);
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.015);
}
.kinds li {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.7rem;
  white-space: nowrap;
}
.kinds li.is-kind { background: var(--agent); border-color: var(--agent); color: var(--bg); font-weight: 600; }
.paper {
  padding: 1.35rem 1.45rem 1.5rem;
  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: 1rem; font-weight: 700; line-height: 1.35; color: var(--ink-strong); }
.paper-meta { margin-top: 0.35rem !important; font-size: 0.88rem; color: var(--ink-muted); }
.paper-pos {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.9rem 1.3rem;
  margin-top: 1.1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--ink-line);
}
.pp p { font-size: 0.88rem; line-height: 1.95; }
.pp .pp-head { margin-bottom: 0.1rem; font-size: 0.76rem; font-weight: 700; letter-spacing: 0.01em; color: var(--link-ink); }
.paper mark.src {
  padding: 0;
  margin: 0 0.12em;
  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;
}
@container (max-width: 430px) {
  .paper-pos { grid-template-columns: minmax(0, 1fr); }
  .mailhead-file { display: none; }
}

/* The checks */
.view-checks {
  padding: 1rem 1.15rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}
.view-title { margin: 0 0 0.6rem; font-family: var(--mono); font-size: 0.76rem; color: var(--agent); }
.tl { --lab: 6.3rem; position: relative; padding-top: 1.55rem; }
.tl-due { position: absolute; top: 0; bottom: 1.5rem; left: var(--lab); right: 0; pointer-events: none; }
.tl-due::before { content: ''; position: absolute; top: 1.35rem; bottom: 0; left: var(--x); border-left: 1.5px dashed rgba(255, 255, 255, 0.55); }
.tl-due span {
  position: absolute;
  top: 0;
  left: var(--x);
  transform: translateX(-50%);
  font-size: 0.72rem;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
}
.tl-row { display: grid; grid-template-columns: var(--lab) minmax(0, 1fr); align-items: center; height: 3.6rem; }
.tl-label { font-size: 0.82rem; font-weight: 600; line-height: 1.25; color: #ffffff; }
.tl-label small { display: block; margin-top: 2px; font-family: var(--mono); font-size: 0.68rem; font-weight: 400; color: var(--text-muted); }
.tl-track { position: relative; height: 100%; }
.tl-short, .tl-trans, .tl-ok {
  position: absolute;
  top: 50%;
  left: var(--a);
  width: calc(var(--b) - var(--a));
  height: 10px;
  margin-top: -5px;
  transform-origin: left center;
}
.tl-short { border: 1.5px dashed rgba(255, 255, 255, 0.35); border-radius: 3px 0 0 3px; }
.tl-short em { position: absolute; top: 100%; left: 0; margin-top: 6px; font-family: var(--mono); font-size: 0.66rem; font-style: normal; white-space: nowrap; color: var(--text-muted); }
.tl-trans { background: repeating-linear-gradient(-45deg, rgba(165, 216, 230, 0.7) 0 2px, transparent 2px 5px); }
.tl-ok { background: var(--agent); border-radius: 0 3px 3px 0; }
.tl-in { position: absolute; top: 50%; left: var(--x); width: 2px; height: 22px; margin: -11px 0 0 -1px; background: #ffffff; border-radius: 1px; }
.tl-in em {
  position: absolute;
  z-index: 1;
  bottom: 100%;
  left: 50%;
  margin-bottom: 3px;
  padding: 0 4px;
  border-radius: 3px;
  background: #113B53;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.66rem;
  font-style: normal;
  white-space: nowrap;
  color: #ffffff;
}
.tl-in--end em { left: auto; right: -1px; transform: none; }
.tl-mark {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: var(--x);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
}
.tl-mark svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.tl-mark--ok { background: var(--agent); color: var(--bg); }
.tl-mark--no { background: var(--human); color: #ffffff; }
.tl-prop {
  position: absolute;
  top: 50%;
  right: 0;
  margin-top: 9px;
  padding: 1px 7px;
  border-radius: 999px;
  border: 1px solid var(--human);
  background: rgba(252, 97, 45, 0.14);
  color: var(--human-text);
  font-size: 0.66rem;
  font-weight: 600;
  white-space: nowrap;
}
.tl-axis { position: relative; height: 1.5rem; margin-left: var(--lab); border-top: 1px solid rgba(255, 255, 255, 0.16); }
.tl-axis span { position: absolute; top: 0.35rem; left: var(--x); font-family: var(--mono); font-size: 0.66rem; color: var(--text-muted); }
.tl-axis span:last-child { transform: translateX(-100%); }
.tl-legend { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; margin: 0.35rem 0 0; font-size: 0.7rem; color: var(--text-muted); }
.lg { display: inline-flex; align-items: center; gap: 0.4rem; }
.lg::before { content: ''; width: 18px; height: 8px; border-radius: 2px; }
.lg-short::before { border: 1.5px dashed rgba(255, 255, 255, 0.4); }
.lg-trans::before { background: repeating-linear-gradient(-45deg, rgba(165, 216, 230, 0.7) 0 2px, transparent 2px 5px); }
.lg-ok::before { background: var(--agent); }
.ck-rows { margin-top: 0.9rem; border-top: 1px solid var(--border); }
.ck {
  display: grid;
  grid-template-columns: 7.6rem minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 0.7rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
}
.ck-k { font-weight: 600; color: #ffffff; }
.ck-bar { position: relative; height: 10px; border-radius: 3px; border: 1.5px solid rgba(165, 216, 230, 0.5); overflow: hidden; }
.ck-use { position: absolute; top: 0; bottom: 0; left: 0; width: var(--w); background: var(--agent); transform-origin: left center; }
.ck-v { font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.ck-v--wide { grid-column: 2 / 4; color: #ffffff; white-space: normal; }
.ck-ok { width: 18px; height: 18px; fill: none; stroke: var(--agent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ck-note { margin: 0.75rem 0 0; font-size: 0.78rem; line-height: 1.55; color: var(--text-muted); }
@container (max-width: 430px) {
  .tl { --lab: 4.9rem; }
  .tl-row--2 .tl-short em { display: none; } /* the legend says it; the proposal needs the room */
  .ck { grid-template-columns: minmax(0, 1fr) auto 18px; }
  .ck-bar { grid-column: 1 / -1; grid-row: 2; }
  .ck-v--wide { grid-column: 1 / 3; grid-row: 2; }
}

/* The order confirmation */
.paper-ab { position: relative; border-radius: 0.85rem; }
.paper-ab .paper-title { padding-right: 6.2rem; }
.ab-to { font-family: var(--mono); font-size: 0.72rem; color: var(--ink-muted); margin-bottom: 0.3rem !important; }
.ab-pos { width: 100%; margin-top: 0.9rem; border-collapse: collapse; font-size: 0.8rem; }
.ab-pos th, .ab-pos td { padding: 0.45rem 0.5rem 0.45rem 0; border-top: 1px solid var(--ink-line); text-align: left; vertical-align: top; }
.ab-pos th { font-weight: 600; white-space: nowrap; color: var(--ink-strong); }
.ab-pos td { color: var(--ink); }
.ab-pos td:nth-child(3), .ab-pos td:nth-child(4) { font-family: var(--mono); font-size: 0.74rem; white-space: nowrap; }
.ab-hint-title { margin-top: 1rem !important; font-size: 0.76rem; font-weight: 700; color: var(--link-ink); }
@container (max-width: 430px) {
  .ab-pos td:nth-child(2) { display: none; }
}
.ab-hints { margin: 0.35rem 0 0; padding-left: 1.3rem; }
.ab-hints li { margin: 0.35rem 0; padding-left: 0.2rem; font-size: 0.88rem; line-height: 1.55; }
.ab-hints li::marker { color: var(--link-ink); font-weight: 700; }
.ab-stamp {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  border: 1.5px solid var(--link-ink);
  color: var(--link-ink);
  font-size: 0.74rem;
  font-weight: 700;
  transform: rotate(-4deg);
}
.ab-stamp svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ab-rule { margin: 0.9rem 0 0; font-size: 0.82rem; line-height: 1.55; color: var(--text-muted); }

/* The draft */
.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; }
.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; }
.draft-rows > div { display: grid; grid-template-columns: 7.3rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; padding: 0.3rem 0; }
.draft-rows dt { font-size: 0.74rem; color: var(--text-muted); }
.draft-rows dd { margin: 0; min-width: 0; font-family: var(--mono); font-size: 0.76rem; line-height: 1.5; color: #ffffff; }
.draft-meta { padding: 0.55rem 0 0.6rem; border-bottom: 1px solid rgba(165, 216, 230, 0.12); }
.draft-pos { padding: 0.6rem 0 0.55rem; border-bottom: 1px solid rgba(165, 216, 230, 0.12); }
.pos-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin: 0 0 0.2rem; font-size: 0.8rem; font-weight: 700; color: var(--agent); }
.pos-checks { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.chk {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px 2px 5px;
  border-radius: 999px;
  background: rgba(165, 216, 230, 0.14);
  color: var(--agent);
  font-size: 0.68rem;
  font-weight: 600;
}
.chk svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.chk--team { background: rgba(252, 97, 45, 0.15); color: var(--human-text); }
.chk--team svg { stroke-width: 2; }
.val { display: inline-block; border-radius: 0.3em; }
.swap { display: inline-grid; }
.swap > .val { grid-area: 1 / 1; justify-self: start; }
.swap .v-from { visibility: hidden; } /* the still image shows the result */
.found { display: block; margin-top: 1px; font-family: 'Inter', sans-serif; font-size: 0.68rem; color: var(--agent); }
.date-tag {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid var(--human);
  color: var(--human-text);
  font-family: 'Inter', sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  line-height: 1.5;
}
.draft-ab { padding: 0.55rem 0 0.2rem; }
.flow-right { min-width: 0; container-type: inline-size; }
@container (max-width: 420px) {
  .draft { padding-left: 0.9rem; padding-right: 0.9rem; }
  .draft-rows > div { grid-template-columns: 5.9rem minmax(0, 1fr); gap: 0.5rem; }
  .draft-rows dt { font-size: 0.7rem; }
  .draft-rows dd { font-size: 0.72rem; }
  .pos-head { flex-wrap: wrap; }
}
/* An empty field waits as a faint bar, so the empty draft reads as a form to be filled */
.flow.is-armed .draft dd { position: relative; }
.flow.is-armed .draft dd::before {
  content: '';
  position: absolute;
  top: 0.4em;
  left: 0;
  width: min(8.5rem, 72%);
  height: 0.75em;
  border-radius: 4px;
  background: rgba(165, 216, 230, 0.09);
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.flow.is-armed .draft dd:has(.is-in)::before,
.flow.is-armed.s1 .draft dd:has(.val-s1)::before,
.flow.is-armed.s5 .draft dd:has(.val-s5)::before { opacity: 0; }
.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; }
.flow-note { margin: 1rem 0 0; font-size: 0.74rem; color: rgba(157, 174, 184, 0.75); text-align: right; }

/* A value on its way from the PDF into the draft */
.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.76rem;
  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 auftragserfassung.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"], [data-step="2"], [data-step="3"]) .view-order,
.flow.is-armed[data-step="4"] .view-checks,
.flow.is-armed:is([data-step="5"], [data-step="6"]) .view-ab { opacity: 1; visibility: visible; transition: opacity 0.4s ease 0.08s, visibility 0s; }

/* Step 1: the e-mail is read, its kind recognised, customer and kind enter the draft */
.flow.is-armed .mailhead { transition: box-shadow 0.4s ease; }
.flow.is-armed[data-step="1"] .mailhead { box-shadow: inset 0 0 0 1.5px rgba(165, 216, 230, 0.6); }
.flow.is-armed .kinds li.is-kind { background: transparent; border-color: rgba(255, 255, 255, 0.14); color: rgba(255, 255, 255, 0.42); font-weight: 400; transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease; }
.flow.is-armed.s1 .kinds li.is-kind { background: var(--agent); border-color: var(--agent); color: var(--bg); font-weight: 600; transition-delay: 0.7s; }
.flow.is-armed .val-s1 { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s1 .val-s1 { opacity: 1; transition-delay: 1.3s; }
.flow.is-armed .val-s1 + .val-s1 { transition-delay: 1.5s; }

/* Step 2: the marks light up one after the other; auftragserfassung.js flies the values over */
.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.s2 .paper mark.src { background: var(--agent); box-shadow: 0 0 0 0.18em var(--agent); color: var(--ink-strong); transition-delay: calc(var(--k) * 80ms); }
.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); }
}

/* Swaps: the customer's value 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.is-in { transition: opacity 0.35s ease, color 0.3s ease; }
.flow.is-armed.s3 .swap-art .v-from { opacity: 0; transition-delay: 0.6s; }
.flow.is-armed.s3 .swap-art .v-to { opacity: 1; transition-delay: 0.85s; }
.flow.is-armed.s3 .swap-art.swap-late .v-from { transition-delay: 1.5s; }
.flow.is-armed.s3 .swap-art.swap-late .v-to { transition-delay: 1.75s; }
.flow.is-armed .found { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s3 .found { opacity: 1; transition-delay: 1.15s; }

/* Step 3 also shows which rows the search is on */
.flow.is-armed .swap-art { position: relative; }
.flow.is-armed .swap-art::after {
  content: '';
  position: absolute;
  inset: -2px -6px;
  border-radius: 0.35em;
  box-shadow: inset 0 0 0 1.5px rgba(165, 216, 230, 0.7);
  opacity: 0;
  pointer-events: none;
}
.flow.is-armed[data-step="3"] .swap-art::after { animation: search-ring 1.6s ease-in-out 0.1s both; }
.flow.is-armed[data-step="3"] .swap-art.swap-late::after { animation-delay: 1s; }
@keyframes search-ring {
  0% { opacity: 0; }
  25%, 60% { opacity: 1; }
  100% { opacity: 0; }
}

/* Step 4: the checks are drawn, their results enter the draft */
.flow.is-armed .tl-due { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s4 .tl-due { opacity: 1; transition-delay: 0.25s; }
.flow.is-armed .tl-short, .flow.is-armed .tl-trans, .flow.is-armed .tl-ok, .flow.is-armed .ck-use { transform: scaleX(0); transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.flow.is-armed.s4 .tl-short, .flow.is-armed.s4 .tl-trans, .flow.is-armed.s4 .tl-ok, .flow.is-armed.s4 .ck-use { transform: scaleX(1); }
.flow.is-armed.s4 .tl-row--1 .tl-short { transition-delay: 0.35s; }
.flow.is-armed.s4 .tl-row--1 .tl-trans { transition-delay: 0.85s; }
.flow.is-armed.s4 .tl-row--1 .tl-ok { transition-delay: 1.05s; }
.flow.is-armed.s4 .tl-row--2 .tl-short { transition-delay: 1.4s; }
.flow.is-armed.s4 .tl-row--2 .tl-trans { transition-delay: 1.95s; }
.flow.is-armed.s4 .tl-row--2 .tl-ok { transition-delay: 2.15s; }
.flow.is-armed .tl-in, .flow.is-armed .tl-mark, .flow.is-armed .tl-prop, .flow.is-armed .tl-short em { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s4 .tl-in, .flow.is-armed.s4 .tl-mark, .flow.is-armed.s4 .tl-prop, .flow.is-armed.s4 .tl-short em { opacity: 1; }
.flow.is-armed.s4 .tl-row--1 .tl-short em { transition-delay: 0.6s; }
.flow.is-armed.s4 .tl-row--1 .tl-in { transition-delay: 0.85s; }
.flow.is-armed.s4 .tl-row--1 .tl-mark { transition-delay: 1.3s; }
.flow.is-armed.s4 .tl-row--2 .tl-short em { transition-delay: 1.65s; }
.flow.is-armed.s4 .tl-row--2 .tl-in { transition-delay: 1.95s; }
.flow.is-armed.s4 .tl-row--2 .tl-mark { transition-delay: 2.4s; }
.flow.is-armed.s4 .tl-row--2 .tl-prop { transition-delay: 2.7s; }
.flow.is-armed .ck, .flow.is-armed .ck-note { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s4 .ck, .flow.is-armed.s4 .ck-note { opacity: 1; }
.flow.is-armed.s4 .ck:nth-child(1) { transition-delay: 3s; }
.flow.is-armed.s4 .ck-use { transition-delay: 3.2s; }
.flow.is-armed.s4 .ck:nth-child(2) { transition-delay: 3.5s; }
.flow.is-armed.s4 .ck-note { transition-delay: 3.9s; }
.flow.is-armed .chk { opacity: 0; transform: translateY(3px); transition: opacity 0.35s ease, transform 0.35s ease; }
.flow.is-armed.s4 .chk { opacity: 1; transform: none; }
.flow.is-armed.s4 .draft-pos--1 .chk { transition-delay: calc(1.4s + var(--k) * 0.9s); }
.flow.is-armed.s4 .draft-pos--2 .chk { transition-delay: 2.5s; }
.flow.is-armed.s4 .swap-price .v-from { opacity: 0; transition-delay: 3.6s; }
.flow.is-armed.s4 .swap-price .v-to { opacity: 1; transition-delay: 3.85s; }
.flow.is-armed .swap-date .v-from { text-decoration: line-through; text-decoration-color: transparent; }
.flow.is-armed .swap-date .v-from.is-in { transition: opacity 0.35s ease, color 0.3s ease, text-decoration-color 0.3s ease; }
.flow.is-armed.s4 .swap-date .v-from { color: var(--human-text); text-decoration-color: rgba(252, 97, 45, 0.85); transition-delay: 0s, 2.5s, 2.5s; }

/* Step 5: the confirmation with two notes, the new date, ready for the team */
.flow.is-armed .ab-hints li { opacity: 0; transform: translateY(4px); transition: opacity 0.4s ease, transform 0.4s ease; }
.flow.is-armed.s5 .ab-hints li { opacity: 1; transform: none; transition-delay: calc(0.6s + var(--k) * 0.45s); }
.flow.is-armed.s5 .swap-date .v-from { opacity: 0; transition-delay: 0.3s; }
.flow.is-armed.s5 .swap-date .v-to { opacity: 1; transition-delay: 0.55s; }
.flow.is-armed .date-tag { opacity: 0; transition: opacity 0.35s ease; }
.flow.is-armed.s5 .date-tag { opacity: 1; transition-delay: 0.75s; }
.flow.is-armed .val-s5 { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s5 .val-s5 { opacity: 1; transition-delay: 1.25s; }
.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: 1.4s; }
.flow.is-armed.s5 .st-ready { opacity: 1; transition-delay: 1.55s; }
.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: 1.6s; }
.flow.is-armed.s5:not(.s6) .approve-btn::after { animation: approve-wait 2s ease-in-out 1.9s 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: released, created, confirmed */
.flow.is-armed.s6 .approve-btn { animation: approve-press 0.45s ease-out 0.6s 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: 0.95s; }
.flow.is-armed.s6 .ab-label--done { opacity: 1; transition-delay: 1.05s; }
.flow.is-armed.s6 .st-ready { opacity: 0; transition-delay: 1.35s; }
.flow.is-armed.s6 .st-done { opacity: 1; transition-delay: 1.5s; }
.flow.is-armed .draft-proof { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s6 .draft-proof { opacity: 1; transition-delay: 1.8s; }
.flow.is-armed .ab-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.s6 .ab-stamp { opacity: 1; transform: rotate(-4deg); transition-delay: 2.1s; }

/* 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; }
}
@media (max-width: 900px) {
  .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; }
}

/* Try it yourself, right after the example */
.try {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-top: 1.2rem;
  padding: 1.05rem 1.1rem 1.05rem 1.4rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.02);
}
.try p { margin: 0; font-size: 1rem; line-height: 1.5; color: rgba(255, 255, 255, 0.86); }
.try .btn-cta--outline, .try .btn-cta--outline:hover { background: transparent; color: #ffffff; border-color: rgba(255, 255, 255, 0.4); }

/* ============ 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.76rem; 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-ic { color: var(--human-text); }
.cv-split { padding-left: 0.6rem; border-left: 2px solid var(--agent); }
.cv-pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 0.7rem; }
.cv-pair > b { justify-self: start; }
.cv-eq { color: var(--text-muted); }
.frames { display: grid; gap: 0.45rem; }
.fr { display: grid; grid-template-columns: 5.6rem minmax(0, 1fr) 5.4rem; align-items: center; gap: 0.6rem; font-family: var(--mono); font-size: 0.72rem; color: #ffffff; }
.fr-bar { position: relative; height: 8px; border-radius: 3px; border: 1px solid rgba(165, 216, 230, 0.35); overflow: hidden; }
.fr-bar span { position: absolute; top: 0; bottom: 0; left: 0; width: var(--w); background: rgba(165, 216, 230, 0.45); }
.fr-v { color: var(--text-muted); }
.fr--closed { opacity: 0.45; }
.fr--pick .fr-k, .fr--pick .fr-v { color: var(--agent); }
.fr--pick .fr-bar span { background: var(--agent); }
.fr-tag { grid-column: 2 / -1; margin-top: -0.15rem; font-family: 'Inter', sans-serif; font-size: 0.68rem; font-weight: 600; color: var(--agent); }
.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); }
/* A link inside running text: as on the other use-case pages */
.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); }
@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 (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;
  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; }
.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.4rem 0 0; font-size: 0.74rem; 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 (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, ERP ============ */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(1.4rem, 3vw, 2.6rem); margin-top: clamp(1.8rem, 4vw, 2.6rem); }
.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);
}
.ramp { flex-direction: column; justify-content: center; gap: 0.5rem; }
.sw { display: flex; align-items: center; gap: 0.65rem; font-size: 0.84rem; color: rgba(255, 255, 255, 0.5); }
.sw i { position: relative; flex: none; width: 30px; height: 17px; border-radius: 999px; background: rgba(255, 255, 255, 0.16); }
.sw i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 13px; height: 13px; border-radius: 50%; background: #ffffff; }
.sw:first-child { color: #ffffff; } /* the still image: started with the call-offs */
.sw:first-child i { background: var(--agent); }
.sw:first-child i::after { transform: translateX(13px); }
.channels { flex-wrap: wrap; align-content: center; gap: 6px; }
.ch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 7px;
  border-radius: 999px;
  background: rgba(165, 216, 230, 0.13);
  color: var(--agent);
  font-size: 0.78rem;
  font-weight: 600;
}
.ch svg, .ch-erp svg { flex: none; width: 13px; height: 13px; 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); }
.ch-erp { display: flex; align-items: center; gap: 0.45rem; width: 100%; margin-top: 0.5rem; padding-top: 0.6rem; border-top: 1px solid var(--border); font-size: 0.8rem; color: #ffffff; }
.ch-erp svg { width: 16px; height: 16px; stroke: var(--agent); stroke-width: 1.6; }
.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: 1023px) {
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact { display: grid; grid-template-columns: minmax(0, 15rem) 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: 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 inbox */
  .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; }
  .inbox { animation: rise-in 0.8s var(--ease-out) 0.45s both; }

  /* The inbox, one run of 10 s: the agent reads e-mail after e-mail, each gets its
     kind and a check, then the drafts wait for the team; then it starts over. */
  .inbox.is-armed .inbox-agent { animation: ib-agent 10s linear infinite both; }
  .inbox.is-armed .inbox-row::before { animation: ib-h0 10s linear infinite both; }
  .inbox.is-armed .inbox-row:nth-child(2)::before { animation-name: ib-h1; }
  .inbox.is-armed .inbox-row:nth-child(3)::before { animation-name: ib-h2; }
  .inbox.is-armed .inbox-row:nth-child(4)::before { animation-name: ib-h3; }
  .inbox.is-armed .kind-chip, .inbox.is-armed .kind-ok { animation: ib-k0 10s linear infinite both; }
  .inbox.is-armed .inbox-row:nth-child(2) :is(.kind-chip, .kind-ok) { animation-name: ib-k1; }
  .inbox.is-armed .inbox-row:nth-child(3) :is(.kind-chip, .kind-ok) { animation-name: ib-k2; }
  .inbox.is-armed .inbox-row:nth-child(4) :is(.kind-chip, .kind-ok) { animation-name: ib-k3; }
  .inbox.is-armed .kind-ok { animation-delay: 0.25s; }
  .inbox.is-armed .inbox-foot { animation: ib-foot 10s linear infinite both; }
  .inbox.is-armed .inbox-agent,
  .inbox.is-armed .inbox-row::before,
  .inbox.is-armed .kind-chip,
  .inbox.is-armed .kind-ok,
  .inbox.is-armed .inbox-foot { animation-play-state: paused; }
  .inbox.is-running .inbox-agent,
  .inbox.is-running .inbox-row::before,
  .inbox.is-running .kind-chip,
  .inbox.is-running .kind-ok,
  .inbox.is-running .inbox-foot { animation-play-state: running; }

  /* The manual chain, one position per run of 8 s */
  .manual.is-armed .manual-hand { animation: man-x 8s linear infinite both; animation-play-state: paused; }
  .manual.is-armed .manual-ic { animation: man-v0 8s linear infinite both; animation-play-state: paused; }
  .manual.is-armed .manual-step:nth-child(2) .manual-ic { animation-name: man-v1; }
  .manual.is-armed .manual-step:nth-child(3) .manual-ic { animation-name: man-v2; }
  .manual.is-armed .manual-step:nth-child(4) .manual-ic { animation-name: man-v3; }
  .manual.is-armed .manual-step:nth-child(5) .manual-ic { animation-name: man-v4; }
  .manual.is-armed .manual-step:nth-child(6) .manual-ic { animation-name: man-v5; }
  .manual.is-running .manual-hand, .manual.is-running .manual-ic { animation-play-state: running; }

  /* Starting step by step: one more kind of order switched on every 1.6 s */
  .ramp.is-armed .sw:first-child { color: rgba(255, 255, 255, 0.5); }
  .ramp.is-armed .sw:first-child i { background: rgba(255, 255, 255, 0.16); }
  .ramp.is-armed .sw:first-child i::after { transform: none; }
  .ramp.is-armed .sw { animation: sw-text-0 9s linear infinite both; animation-play-state: paused; }
  .ramp.is-armed .sw i { animation: sw-track-0 9s linear infinite both; animation-play-state: paused; }
  .ramp.is-armed .sw i::after { animation: sw-knob-0 9s linear infinite both; animation-play-state: paused; }
  .ramp.is-armed .sw:nth-child(2) { animation-name: sw-text-1; }
  .ramp.is-armed .sw:nth-child(2) i { animation-name: sw-track-1; }
  .ramp.is-armed .sw:nth-child(2) i::after { animation-name: sw-knob-1; }
  .ramp.is-armed .sw:nth-child(3) { animation-name: sw-text-2; }
  .ramp.is-armed .sw:nth-child(3) i { animation-name: sw-track-2; }
  .ramp.is-armed .sw:nth-child(3) i::after { animation-name: sw-knob-2; }
  .ramp.is-armed .sw:nth-child(4) { animation-name: sw-text-3; }
  .ramp.is-armed .sw:nth-child(4) i { animation-name: sw-track-3; }
  .ramp.is-armed .sw:nth-child(4) i::after { animation-name: sw-knob-3; }
  .ramp.is-running .sw, .ramp.is-running .sw i, .ramp.is-running .sw i::after { animation-play-state: running; }

  .faq-item[open] p { animation: rise-in 0.35s var(--ease-out) both; }
}
@media (prefers-reduced-motion: no-preference) and (max-width: 860px) {
  .manual.is-armed .manual-hand { animation-name: man-y; }
}
@media (prefers-reduced-motion: reduce) {
  .flow *, .flow::after { transition: none !important; animation: none !important; }
}

/* Inbox keyframes (1 s = 10 %). Rows are --row apart. */
@keyframes ib-agent {
  0% { opacity: 0; transform: translateY(0); }
  5% { opacity: 1; transform: translateY(0); }
  13% { transform: translateY(0); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  18% { transform: translateY(calc(var(--row) * 1)); }
  26% { transform: translateY(calc(var(--row) * 1)); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  31% { transform: translateY(calc(var(--row) * 2)); }
  39% { transform: translateY(calc(var(--row) * 2)); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  44% { transform: translateY(calc(var(--row) * 3)); }
  52% { opacity: 1; transform: translateY(calc(var(--row) * 3)); }
  56%, 100% { opacity: 0; transform: translateY(calc(var(--row) * 3)); }
}
}
@keyframes ib-h0 { 0%, 4% { opacity: 0; } 6%, 13% { opacity: 1; } 16%, 100% { opacity: 0; } }
@keyframes ib-h1 { 0%, 17% { opacity: 0; } 19%, 26% { opacity: 1; } 29%, 100% { opacity: 0; } }
@keyframes ib-h2 { 0%, 30% { opacity: 0; } 32%, 39% { opacity: 1; } 42%, 100% { opacity: 0; } }
@keyframes ib-h3 { 0%, 43% { opacity: 0; } 45%, 52% { opacity: 1; } 55%, 100% { opacity: 0; } }
@keyframes ib-k0 { 0%, 9% { opacity: 0; transform: translateX(-6px); } 12.5%, 88% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; transform: none; } }
@keyframes ib-k1 { 0%, 22% { opacity: 0; transform: translateX(-6px); } 25.5%, 88% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; transform: none; } }
@keyframes ib-k2 { 0%, 35% { opacity: 0; transform: translateX(-6px); } 38.5%, 88% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; transform: none; } }
@keyframes ib-k3 { 0%, 48% { opacity: 0; transform: translateX(-6px); } 51.5%, 88% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; transform: none; } }
@keyframes ib-foot { 0%, 56% { opacity: 0; transform: translateY(6px); } 60%, 88% { opacity: 1; transform: none; } 93%, 100% { opacity: 0; transform: none; } }

/* Manual chain keyframes (1 s = 12.5 %): six stops, each 0.8 s, 0.45 s between */
@keyframes man-x {
  0% { opacity: 0; transform: translateX(0); }
  3.75% { opacity: 1; transform: translateX(0); }
  13.75% { transform: translateX(0); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  19.4% { transform: translateX(100%); }
  29.4% { transform: translateX(100%); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  35% { transform: translateX(200%); }
  45% { transform: translateX(200%); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  50.6% { transform: translateX(300%); }
  60.6% { transform: translateX(300%); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  66.25% { transform: translateX(400%); }
  76.25% { transform: translateX(400%); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  81.9% { transform: translateX(500%); }
  91.9% { opacity: 1; transform: translateX(500%); }
  96.2% { opacity: 0; transform: translateX(500%); }
  96.3%, 100% { opacity: 0; transform: translateX(0); }
}
@keyframes man-y {
  0% { opacity: 0; transform: translateY(0); }
  3.75% { opacity: 1; transform: translateY(0); }
  13.75% { transform: translateY(0); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  19.4% { transform: translateY(100%); }
  29.4% { transform: translateY(100%); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  35% { transform: translateY(200%); }
  45% { transform: translateY(200%); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  50.6% { transform: translateY(300%); }
  60.6% { transform: translateY(300%); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  66.25% { transform: translateY(400%); }
  76.25% { transform: translateY(400%); animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  81.9% { transform: translateY(500%); }
  91.9% { opacity: 1; transform: translateY(500%); }
  96.2% { opacity: 0; transform: translateY(500%); }
  96.3%, 100% { opacity: 0; transform: translateY(0); }
}
/* A check the hand has done turns orange and stays so until the run ends: this is the team's work today */
@keyframes man-v0 { 0%, 4% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } 6%, 92% { color: var(--human); border-color: var(--human); background-color: #FFF4EF; } 96%, 100% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } }
@keyframes man-v1 { 0%, 19.5% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } 21.5%, 92% { color: var(--human); border-color: var(--human); background-color: #FFF4EF; } 96%, 100% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } }
@keyframes man-v2 { 0%, 35% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } 37%, 92% { color: var(--human); border-color: var(--human); background-color: #FFF4EF; } 96%, 100% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } }
@keyframes man-v3 { 0%, 50.7% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } 52.7%, 92% { color: var(--human); border-color: var(--human); background-color: #FFF4EF; } 96%, 100% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } }
@keyframes man-v4 { 0%, 66.3% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } 68.3%, 92% { color: var(--human); border-color: var(--human); background-color: #FFF4EF; } 96%, 100% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } }
@keyframes man-v5 { 0%, 82% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } 84%, 92% { color: var(--human); border-color: var(--human); background-color: #FFF4EF; } 96%, 100% { color: var(--ink-muted); border-color: rgba(2, 29, 46, 0.14); background-color: #ffffff; } }


/* Ramp keyframes (1 s = 11.11 %): switches on at 0.6, 2.2, 3.8 and 5.4 s, all off at 8.2 s */
@keyframes sw-text-0 { 0%, 5% { color: rgba(255, 255, 255, 0.5); } 8%, 90% { color: #ffffff; } 94%, 100% { color: rgba(255, 255, 255, 0.5); } }
@keyframes sw-text-1 { 0%, 23% { color: rgba(255, 255, 255, 0.5); } 26%, 90% { color: #ffffff; } 94%, 100% { color: rgba(255, 255, 255, 0.5); } }
@keyframes sw-text-2 { 0%, 41% { color: rgba(255, 255, 255, 0.5); } 44%, 90% { color: #ffffff; } 94%, 100% { color: rgba(255, 255, 255, 0.5); } }
@keyframes sw-text-3 { 0%, 59% { color: rgba(255, 255, 255, 0.5); } 62%, 90% { color: #ffffff; } 94%, 100% { color: rgba(255, 255, 255, 0.5); } }
@keyframes sw-track-0 { 0%, 5% { background: rgba(255, 255, 255, 0.16); } 8%, 90% { background: var(--agent); } 94%, 100% { background: rgba(255, 255, 255, 0.16); } }
@keyframes sw-track-1 { 0%, 23% { background: rgba(255, 255, 255, 0.16); } 26%, 90% { background: var(--agent); } 94%, 100% { background: rgba(255, 255, 255, 0.16); } }
@keyframes sw-track-2 { 0%, 41% { background: rgba(255, 255, 255, 0.16); } 44%, 90% { background: var(--agent); } 94%, 100% { background: rgba(255, 255, 255, 0.16); } }
@keyframes sw-track-3 { 0%, 59% { background: rgba(255, 255, 255, 0.16); } 62%, 90% { background: var(--agent); } 94%, 100% { background: rgba(255, 255, 255, 0.16); } }
@keyframes sw-knob-0 { 0%, 5% { transform: none; } 8%, 90% { transform: translateX(13px); } 94%, 100% { transform: none; } }
@keyframes sw-knob-1 { 0%, 23% { transform: none; } 26%, 90% { transform: translateX(13px); } 94%, 100% { transform: none; } }
@keyframes sw-knob-2 { 0%, 41% { transform: none; } 44%, 90% { transform: translateX(13px); } 94%, 100% { transform: none; } }
@keyframes sw-knob-3 { 0%, 59% { transform: none; } 62%, 90% { transform: translateX(13px); } 94%, 100% { transform: none; } }
