/* ============================================================
   ORCAPILOT · Artikelanlage (orcapilot.de/artikelanlage/)
   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 order of Kunde 2207, its position 3 (the new holding
   plate 52-10418, drawn as a customer drawing) and position 7 (a known
   part with a new drawing index).
   ============================================================ */

body.uc {
  --ink-strong: #062A3F;
  --link-ink: #16688A;
  --human-text: #FFB59A;     /* orange as text on the deep: readable, same hue */
  --human-ink: #B9400F;      /* orange as text on the ice */
  --mono: 'JetBrains Mono', monospace;
  /* The customer drawing: outlines, thin lines (dimensions, centre and hidden lines), dimension text, paper */
  --dwg-o: #1E4C66;
  --dwg-d: #6E91A4;
  --dwg-t: #2F5D77;
  --paper: #ffffff;
}

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

/* ============ THE CUSTOMER DRAWING (hero, printout, step 2) ============ */
/* The geometry is one SVG symbol; its lines take their colours from the sheet they sit on */
.g-o { fill: none; stroke: var(--dwg-o); stroke-width: 1.35; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.g-c { fill: none; stroke: var(--dwg-d); stroke-width: 0.7; stroke-dasharray: 10 2.5 1.6 2.5; vector-effect: non-scaling-stroke; }
.g-h { fill: none; stroke: var(--dwg-d); stroke-width: 0.8; stroke-dasharray: 3 2; vector-effect: non-scaling-stroke; }
.g-d { fill: none; stroke: var(--dwg-d); stroke-width: 0.7; vector-effect: non-scaling-stroke; }
.g-a { fill: var(--dwg-d); }
.g-t { fill: var(--dwg-t); font-family: 'JetBrains Mono', monospace; font-size: 6px; }

.sheet {
  position: relative;
  background: var(--paper);
  border: 1px solid rgba(2, 29, 46, 0.1);
  border-radius: 0.9rem;
  color: var(--ink);
  overflow: hidden;
}
.sheet-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--ink-line);
  font-size: 0.8rem;
}
.sheet-file { min-width: 0; font-weight: 600; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-from { flex: none; margin-left: auto; font-family: var(--mono); font-size: 0.68rem; color: var(--ink-muted); white-space: nowrap; }
.fmt {
  flex: none;
  padding: 2px 0;
  width: 2.3rem;
  text-align: center;
  border-radius: 5px;
  border: 1px solid rgba(2, 29, 46, 0.16);
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--ink-muted);
}
/* The drawing frame and, at its foot, the title block */
.sheet-frame { position: relative; margin: 0.55rem; border: 1.4px solid var(--dwg-o); overflow: hidden; }
.sheet-geo { padding: 0.35rem 0.55rem 0.15rem; }
.sheet-geo svg { display: block; width: 100%; height: auto; aspect-ratio: 205 / 122; }
.tb {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  border-top: 1.4px solid var(--dwg-o);
  background: rgba(30, 76, 102, 0.32); /* shows through the gaps as the title block's rules */
}
.tb-c { min-width: 0; padding: 0.28rem 0.5rem 0.32rem; background: var(--paper); }
.tb dt { font-size: 0.56rem; line-height: 1.3; letter-spacing: 0.01em; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb dd {
  position: relative;
  z-index: 0;
  width: fit-content;
  max-width: 100%;
  min-width: 1.6em;
  min-height: 1.25em;
  margin: 0.06rem 0 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.25;
  color: var(--ink-strong);
  white-space: nowrap;
}

/* ============ 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, .art-foot-ic {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: var(--human);
  background: rgba(252, 97, 45, 0.12);
  border: 1px solid rgba(252, 97, 45, 0.5);
}
.uc-release-ic svg, .art-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 drawing becomes an article: the sheet left, the draft right, the agent between */
.hdw { position: relative; z-index: 1; margin: 0; container-type: inline-size; }
.hdw-stage {
  position: relative;
  display: grid;
  grid-template-columns: 53% minmax(0, 1fr);
  column-gap: 4.6%;
  align-items: center;
}
.hdw .sheet, .hdw-art { box-shadow: 0 30px 70px rgba(6, 42, 63, 0.13), 0 2px 4px rgba(6, 42, 63, 0.05); }
.tb-read dd::before { /* what the agent has read: the agent colour behind the value */
  content: '';
  position: absolute;
  z-index: -1;
  inset: -1px -4px;
  border-radius: 4px;
  background: var(--agent);
}
.tb-scan { /* the agent reading the sheet; hidden in the still image */
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 28%;
  background: linear-gradient(90deg, rgba(165, 216, 230, 0), rgba(165, 216, 230, 0.42) 55%, rgba(165, 216, 230, 0));
  opacity: 0;
  pointer-events: none;
}
.hdw-agent {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 55.3%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
}
.hdw .agent { background: #0B2738; border-color: #0B2738; box-shadow: 0 8px 18px rgba(6, 42, 63, 0.24); }
.hdw .agent svg { width: 27px; height: 27px; }
.hdw .agent::before {
  inset: 0;
  background: radial-gradient(circle, rgba(165, 216, 230, 0.42) 0%, rgba(165, 216, 230, 0.16) 55%, rgba(165, 216, 230, 0) 78%);
  box-shadow: 0 0 0 5px rgba(165, 216, 230, 0.5), 0 0 26px 6px rgba(22, 104, 138, 0.32);
}
.hdw-art {
  position: relative;
  min-width: 0;
  background: #ffffff;
  border: 1px solid rgba(2, 29, 46, 0.1);
  border-radius: 0.9rem;
  color: var(--ink);
  overflow: hidden;
}
.art-head { padding: 0.75rem 0.95rem; border-bottom: 1px solid var(--ink-line); }
.art-title { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.88rem; font-weight: 600; color: var(--ink-strong); }
.art-title svg { width: 17px; height: 17px; fill: none; stroke: var(--link-ink); stroke-width: 1.6; }
.art-rows { margin: 0; padding: 0.3rem 0.95rem 0.4rem; }
.art-rows > div {
  position: relative;
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: 0.5rem;
  align-items: baseline;
  padding: 0.38rem 0;
  border-bottom: 1px dashed rgba(2, 29, 46, 0.11);
}
.art-rows > div:last-child { border-bottom: 0; }
.art-rows > div::after { /* an empty field waits as a faint bar; hidden in the still image */
  content: '';
  position: absolute;
  top: 50%;
  left: calc(5.4rem + 0.5rem);
  width: min(6.5rem, 55%);
  height: 0.62rem;
  margin-top: -0.31rem;
  border-radius: 4px;
  background: rgba(22, 104, 138, 0.1);
  opacity: 0;
  pointer-events: none;
}
.art-rows dt { font-size: 0.7rem; color: var(--ink-muted); }
.art-rows dd { margin: 0; min-width: 0; font-family: var(--mono); font-size: 0.74rem; color: var(--ink-strong); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.art-rows small { margin-left: 0.45rem; font-family: 'Inter', sans-serif; font-size: 0.64rem; font-weight: 600; color: var(--link-ink); }
.art-foot {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding: 0.7rem 0.95rem 0.8rem;
  border-top: 1px solid var(--ink-line);
  background: rgba(252, 97, 45, 0.05);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-strong);
}
.art-foot-ic { width: 26px; height: 26px; }
.art-foot-ic svg { width: 15px; height: 15px; }
.art-foot-ic::after { /* waiting for the team: a soft ring, only ever faded */
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(252, 97, 45, 0.5);
  opacity: 0;
}

/* A tighter stage (laptops up to 1280px): side by side still, a little smaller */
@container (max-width: 600px) {
  .hdw-stage { grid-template-columns: 51% minmax(0, 1fr); column-gap: 3%; }
  .hdw-agent { left: 52.5%; width: 40px; height: 40px; margin: -20px 0 0 -20px; }
  .hdw .agent svg { width: 25px; height: 25px; }
  .hdw .sheet-head { gap: 0.45rem; padding: 0.6rem 0.75rem; font-size: 0.76rem; }
  .hdw .sheet-from { display: none; }
  .hdw .sheet-frame { margin: 0.45rem; }
  .hdw .tb-c { padding: 0.24rem 0.42rem 0.28rem; }
  .hdw .tb dd { font-size: 0.66rem; }
  .art-head { padding: 0.65rem 0.8rem; }
  .art-title { font-size: 0.84rem; }
  .art-rows { padding: 0.25rem 0.8rem 0.35rem; }
  .art-rows > div { grid-template-columns: 4.9rem minmax(0, 1fr); gap: 0.45rem; }
  .art-rows > div::after { left: calc(4.9rem + 0.45rem); }
  .art-rows dt { font-size: 0.66rem; }
  .art-rows dd { font-size: 0.7rem; }
  .art-rows small { display: block; margin: 0.05rem 0 0; }
  .art-foot { padding: 0.6rem 0.8rem 0.7rem; font-size: 0.76rem; }
}
/* A narrow stage (phones, tablets upright): the sheet on top, the draft below it */
@container (max-width: 459px) {
  .hdw-stage { grid-template-columns: minmax(0, 1fr); row-gap: 0.7rem; }
  .hdw-agent { position: relative; top: auto; left: auto; width: 44px; height: 44px; margin: 0; justify-self: center; }
  .hdw .agent svg { width: 27px; height: 27px; }
  .hdw-art { width: min(100%, 22rem); justify-self: end; }
  .hdw .sheet-from { display: inline; }
  .hdw .tb dd { font-size: 0.72rem; }
  .art-rows > div { grid-template-columns: 5.6rem minmax(0, 1fr); }
  .art-rows > div::after { left: calc(5.6rem + 0.45rem); }
  .art-rows dd { font-size: 0.74rem; }
  .art-rows small { display: inline; margin: 0 0 0 0.45rem; }
}

/* Small laptops: the drawing gets a little more of the width */
@media (min-width: 1024px) and (max-width: 1279px) {
  body.uc .hero-card.uc-hero { grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); column-gap: 2.4rem; }
}
@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; }
  .hdw { max-width: 660px; }
}
@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.4rem, 3vw, 2.1rem);
}
.manual-title { font-size: 1.05rem; font-weight: 600; color: var(--ink-strong); }
.manual-count { font-family: var(--mono); font-size: 0.78rem; color: var(--ink-muted); }
.manual-count b { font-weight: 500; color: var(--human-ink); }

/* The desk: the printed drawing, and the copy of a template being overwritten */
.desk { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.4rem, 3.4vw, 2.8rem); align-items: start; }
.printout { min-width: 0; padding-top: 0.15rem; }
.printout-label, .cf-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 0.8rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-strong);
}
.printout-label svg, .cf-head svg { flex: none; width: 18px; height: 18px; fill: none; stroke: var(--link-ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sheet--print {
  --dwg-o: #4F5F69;
  --dwg-d: #8B999F;
  --dwg-t: #66757D;
  --paper: #FCFCF9;
  border-radius: 0.35rem;
  transform: rotate(-1.4deg);
  box-shadow: 0 18px 36px rgba(6, 42, 63, 0.11), 0 1px 2px rgba(6, 42, 63, 0.08);
}
.sheet--print .tb dd { color: #2E3B42; }
.sheet--print .tb-c[data-hl] dd::before { /* the clerk's highlighter, one stroke per value read */
  content: '';
  position: absolute;
  z-index: -1;
  left: -3px;
  right: -3px;
  top: 0.18em;
  bottom: 0;
  border-radius: 2px 5px 3px 4px;
  background: rgba(252, 97, 45, 0.3);
  transform-origin: left center;
}

.copyform {
  min-width: 0;
  background: #ffffff;
  border: 1px solid rgba(2, 29, 46, 0.1);
  border-radius: 0.9rem;
  box-shadow: 0 14px 34px rgba(6, 42, 63, 0.08), 0 1px 2px rgba(6, 42, 63, 0.06);
  overflow: hidden;
}
.cf-head { margin: 0; padding: 0.8rem 1.1rem; border-bottom: 1px solid var(--ink-line); }
.cf-rows { margin: 0; padding: 0.35rem 0 0.45rem; list-style: none; }
.cf-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 10rem) minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.31rem 1.1rem;
}
.cf-row::before { /* the row being typed in, by hand: hidden in the still image */
  content: '';
  position: absolute;
  inset: 0 0.45rem;
  border-radius: 0.45rem;
  background: rgba(252, 97, 45, 0.08);
  box-shadow: inset 2px 0 0 var(--human);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}
.cf-k { position: relative; font-size: 0.8rem; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cf-v { position: relative; display: flex; align-items: center; gap: 0.65rem; min-width: 0; font-family: var(--mono); font-size: 0.76rem; line-height: 1.5; white-space: nowrap; }
.cf-old { color: var(--ink-muted); text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: rgba(185, 64, 15, 0.75); }
.cf-new, .cf-same { color: var(--ink-strong); font-weight: 500; }
.cf-new { display: inline-block; max-width: calc(var(--n, 8) * 1ch + 2px); overflow: hidden; white-space: nowrap; } /* typed in: it grows a character at a time */
.cf-ok { display: inline-flex; align-items: center; gap: 0.25rem; font-family: 'Inter', sans-serif; font-size: 0.7rem; font-weight: 600; color: var(--human-ink); }
.cf-ok svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

/* Armed (artikelanlage.js): the copy starts as the template, the clerk types in row after row */
.manual.is-armed .cf-row:not(.is-cur):not(.is-done) .cf-old { color: var(--ink-strong); text-decoration-color: transparent; }
.manual.is-armed .cf-row:not(.is-cur):not(.is-done) .cf-new { max-width: 0; }
.manual.is-armed .cf-row:not(.is-cur):not(.is-done) .cf-ok { opacity: 0; }
.manual.is-armed .cf-row.is-cur::before { opacity: 1; }
.manual.is-armed .cf-row.is-cur .cf-old { transition: color 0.25s ease 0.1s, text-decoration-color 0.25s ease 0.1s; }
.manual.is-armed .cf-row.is-cur .cf-new { transition: max-width 0.5s steps(var(--n, 8), end) 0.32s; }
.manual.is-armed .cf-row.is-cur .cf-ok { transition: opacity 0.3s ease 0.3s; }
.manual.is-armed .cf-row.is-cur:not(.cf-row--keep) .cf-v::after { /* the caret, right behind what has been typed */
  content: '';
  flex: none;
  width: 1.5px;
  height: 1.05em;
  margin-left: -0.55rem;
  background: var(--human);
  animation: caret 0.9s steps(1, end) infinite;
}
@keyframes caret { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
.manual.is-armed .tb-c[data-hl] dd::before { transform: scaleX(0); }
.manual.is-armed .tb-c[data-hl].is-hl dd::before { transform: scaleX(1); transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1); }
.manual.no-anim, .manual.no-anim *, .manual.no-anim *::before, .manual.no-anim *::after { transition: none !important; }

@media (max-width: 860px) {
  .desk { grid-template-columns: minmax(0, 1fr); }
  .printout { width: min(100%, 26rem); }
  .cf-row { grid-template-columns: minmax(0, 9.6rem) minmax(0, 1fr); gap: 0.6rem; padding: 0.3rem 0.85rem; }
  .cf-head { padding: 0.75rem 0.85rem; }
}
@media (max-width: 420px) {
  .cf-row { grid-template-columns: minmax(0, 7.6rem) minmax(0, 1fr); }
  .cf-k { font-size: 0.74rem; line-height: 1.3; white-space: normal; }
  .cf-v { flex-wrap: wrap; gap: 0 0.45rem; font-size: 0.7rem; }
  .cf-ok { font-size: 0.64rem; }
}

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

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

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

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

.flow.is-armed .flow-steps {
  display: grid;
  grid-template-columns: repeat(5, 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, 1.04fr) minmax(0, 0.96fr);
  gap: clamp(1rem, 2.4vw, 1.8rem);
  align-items: center;
  margin-top: 1.5rem;
}
.flow:not(.is-armed) .flow-stage { align-items: start; } /* without JavaScript: everything at once, top to bottom */
.flow-left { display: grid; gap: 1.2rem; min-width: 0; container-type: inline-size; }
.flow-view { min-width: 0; }
.flow.is-armed .flow-left > .flow-view { grid-area: 1 / 1; align-self: center; }
.view-title { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.75rem; 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-template, .view-copy, .erp {
  padding: 1rem 1.15rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.03);
}

/* The e-mail head above the order and the drawing */
.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; }
.fmt--deep { border-color: rgba(255, 255, 255, 0.3); color: rgba(255, 255, 255, 0.75); }
.paper {
  padding: 1.1rem 1.2rem 1.15rem;
  border-radius: 0 0 0.85rem 0.85rem;
  background: #F7FAFB;
  color: var(--ink);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34);
}
.paper p { margin: 0; }
.paper-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.2rem 0.7rem; font-size: 0.98rem; font-weight: 700; line-height: 1.35; color: var(--ink-strong); }
.paper-sub { font-size: 0.74rem; font-weight: 500; color: var(--ink-muted); }
.paper mark.src {
  padding: 0;
  margin: 0 0.1em;
  border-radius: 0.2em;
  box-shadow: 0 0 0 0.18em var(--agent);
  background: var(--agent);
  color: var(--ink-strong);
  font-weight: 500;
  white-space: nowrap;
}

/* Step 1: the order, matched against the article master */
.op { width: 100%; margin-top: 0.65rem; border-collapse: collapse; }
.op th {
  padding: 0 0.45rem 0.4rem 0;
  font-size: 0.64rem;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--ink-line);
}
.op td {
  padding: 0.19rem 0.45rem 0.19rem 0;
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.45;
  white-space: nowrap;
  color: var(--ink);
  border-bottom: 1px solid rgba(2, 29, 46, 0.05);
}
.op tr { position: relative; }
.op td.op-name { font-family: 'Inter', sans-serif; font-size: 0.72rem; overflow: hidden; text-overflow: ellipsis; max-width: 8rem; }
.op .op-pos { width: 3.4rem; color: var(--ink-muted); }
.op .op-idx { width: 2.6rem; }
.op .op-price { text-align: right; padding-right: 0.9rem; }
.op .op-st { width: 4.9rem; padding-right: 0; text-align: right; }
.op-ok { width: 15px; height: 15px; vertical-align: -3px; fill: none; stroke: var(--link-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.op-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--agent);
  color: var(--ink-strong);
  font-family: 'Inter', sans-serif;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.5;
}
.op-new td, .op-chg td { background: rgba(165, 216, 230, 0.2); }
.op-known td { color: rgba(6, 42, 63, 0.66); }
.op-note { margin-top: 0.6rem !important; font-size: 0.74rem; color: var(--ink-muted); }
@container (max-width: 470px) {
  .op .op-name { display: none; }
  .mailhead-file { display: none; }
}

/* Step 2: the drawing in its e-mail, the title block read */
.paper-dwg { --paper: #F7FAFB; padding: 0.1rem 0.15rem 0.2rem; }
.paper-dwg .sheet-frame { margin: 0.65rem; }
@container (min-width: 431px) {
  .tb--wide { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.tb .tb-empty { display: block; width: 2.4em; height: 1.15em; border-radius: 3px; }
.view-drawing .tb-empty { outline: 1.5px dashed var(--link-ink); outline-offset: 1px; }
.tb mark.src { margin: 0; }

/* Step 3: the customer's articles, the one with the same surface becomes the template */
.tpl-query { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 0.9rem; }
.q-chip { padding: 3px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.22); font-size: 0.72rem; color: rgba(255, 255, 255, 0.82); white-space: nowrap; }
.q-chip--key { background: rgba(165, 216, 230, 0.14); border-color: rgba(165, 216, 230, 0.5); color: var(--agent); font-weight: 600; }
.tpl-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.tpl {
  position: relative;
  display: grid;
  grid-template-columns: 5.2rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.8rem;
  border-radius: 0.6rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.8rem;
}
.tpl-no { font-family: var(--mono); font-size: 0.74rem; color: #ffffff; }
.tpl-name { min-width: 0; color: rgba(255, 255, 255, 0.86); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tpl-surf { font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }
.tpl-tag {
  position: absolute;
  top: -0.6rem;
  right: 0.7rem;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--agent);
  color: var(--bg);
  font-size: 0.64rem;
  font-weight: 700;
}
.tpl:not(.tpl--pick) { opacity: 0.42; }
.tpl--pick { border-color: rgba(165, 216, 230, 0.6); background: rgba(165, 216, 230, 0.09); box-shadow: 0 0 0 1px rgba(165, 216, 230, 0.22), 0 10px 26px rgba(0, 0, 0, 0.22); }
.tpl--pick .tpl-surf { color: var(--agent); }
.tpl-note { margin: 0.85rem 0 0; font-size: 0.78rem; line-height: 1.5; color: var(--text-muted); }
@container (max-width: 400px) {
  .tpl { grid-template-columns: 4.6rem minmax(0, 1fr); row-gap: 0.15rem; }
  .tpl-surf { grid-column: 2; }
}

/* Step 4: the copy, overwritten, prices to zero, the drawing linked */
.cp-group { display: grid; grid-template-columns: 7.6rem minmax(0, 1fr); gap: 0.4rem 0.8rem; padding: 0.7rem 0; border-top: 1px solid var(--border); }
.view-title + .cp-group { border-top: 0; padding-top: 0.2rem; }
.cp-group:last-child { padding-bottom: 0; }
.cp-k { margin: 0; padding-top: 0.12rem; font-size: 0.74rem; color: var(--text-muted); }
.cp-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 0; }
.cp-chips span { padding: 2px 9px; border-radius: 999px; background: rgba(165, 216, 230, 0.14); color: var(--agent); font-size: 0.72rem; font-weight: 600; }
.cp-prices { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.cp-prices li { display: grid; grid-template-columns: minmax(0, 1fr) auto 4.4em; align-items: baseline; gap: 0.7rem; font-size: 0.76rem; }
.cp-what { min-width: 0; color: rgba(255, 255, 255, 0.84); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-prices s { font-family: var(--mono); font-size: 0.7rem; color: var(--text-muted); text-decoration-thickness: 1.5px; text-decoration-color: rgba(255, 255, 255, 0.6); }
.cp-prices b { font-family: var(--mono); font-size: 0.72rem; font-weight: 500; color: var(--agent); text-align: right; }
.cp-file { display: flex; flex-wrap: wrap; align-items: center; gap: 0.45rem; margin: 0; font-size: 0.78rem; color: #ffffff; }
.cp-file svg { flex: none; width: 16px; height: 16px; fill: none; stroke: var(--agent); stroke-width: 1.6; stroke-linejoin: round; }
.cp-path { padding: 1px 7px; border-radius: 5px; background: rgba(165, 216, 230, 0.14); font-family: var(--mono); font-size: 0.7rem; color: var(--agent); }
@container (max-width: 400px) {
  .cp-group { grid-template-columns: minmax(0, 1fr); }
}

/* Step 5: the ERP waits for the release, then holds the article */
.erp { display: grid; }
.erp-head { display: flex; align-items: center; gap: 0.5rem; margin: 0 0 0.85rem; font-family: var(--mono); font-size: 0.76rem; color: var(--agent); }
.erp-head svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.erp-wait, .erp-done { grid-row: 2; grid-column: 1; }
.erp-wait {
  display: flex;
  align-items: center;
  align-self: start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.85rem 1rem;
  border-radius: 0.7rem;
  border: 1px dashed rgba(252, 97, 45, 0.55);
  color: var(--human-text);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0; /* the still image shows the finished state */
}
.erp-wait-ic { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(252, 97, 45, 0.14); border: 1px solid rgba(252, 97, 45, 0.5); color: var(--human); }
.erp-wait-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.erp-art {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem 0.8rem;
  margin: 0 0 0.6rem;
  padding: 0.8rem 0.9rem;
  border-radius: 0.7rem;
  border: 1px solid rgba(165, 216, 230, 0.32);
  background: rgba(165, 216, 230, 0.08);
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}
.erp-stamp { display: inline-flex; align-items: center; gap: 0.3rem; padding: 3px 10px 3px 8px; border-radius: 999px; background: var(--agent); color: var(--bg); font-size: 0.72rem; font-weight: 700; }
.erp-stamp svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.erp-line { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0 0; padding-left: 0.2rem; font-size: 0.82rem; line-height: 1.4; }
.erp-line svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.erp-ok { color: var(--agent); }
.erp-ok svg { stroke-width: 2.6; }
.erp-open { color: var(--human-text); }

/* The draft */
.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; }
.draft-status { display: grid; justify-items: end; }
.st { grid-area: 1 / 1; padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.st-work { border: 1px solid rgba(255, 255, 255, 0.22); color: rgba(255, 255, 255, 0.7); }
.st-ready { border: 1px solid var(--human); background: rgba(252, 97, 45, 0.12); color: var(--human-text); }
.st-done { background: var(--agent); color: var(--bg); }
.st-work, .st-ready { opacity: 0; } /* the still image shows the finished state */
.draft-rows { margin: 0; padding: 0.45rem 0 0.5rem; border-bottom: 1px solid rgba(165, 216, 230, 0.12); }
.draft-rows > div { display: grid; grid-template-columns: 7.7rem minmax(0, 1fr); gap: 0.6rem; align-items: baseline; padding: 0.26rem 0; }
.draft-rows dt { font-size: 0.74rem; color: var(--text-muted); }
.draft-rows dd { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.6rem; margin: 0; min-width: 0; font-family: var(--mono); font-size: 0.76rem; line-height: 1.5; color: #ffffff; }
.src-tag { font-family: 'Inter', sans-serif; font-size: 0.66rem; line-height: 1.5; color: rgba(165, 216, 230, 0.86); }
.src-tag--team, .val-open { color: var(--human-text); }
.val { display: inline-block; border-radius: 0.3em; }
@container (max-width: 420px) {
  .draft { padding-left: 0.9rem; padding-right: 0.9rem; }
  .draft-rows > div { grid-template-columns: 6.2rem minmax(0, 1fr); gap: 0.5rem; }
  .draft-rows dt { font-size: 0.7rem; }
  .draft-rows dd { font-size: 0.72rem; }
}
/* An empty field waits as a faint bar, so the empty draft reads as a form to be filled */
.flow.is-armed .draft dd::before {
  content: '';
  position: absolute;
  top: 0.4em;
  left: 0;
  width: min(8rem, 70%);
  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.s2 .draft dd:has(.val-s2)::before,
.flow.is-armed.s3 .draft dd:has(.val-s3)::before,
.flow.is-armed.s4 .draft dd:has(.val-s4)::before { opacity: 0; }
/* each bar gives way only when its value arrives */
.flow.is-armed.s1 .draft dd:has(.val-s1)::before { transition-delay: 2.3s; }
.flow.is-armed.s2 .draft dd:has(.val-s2)::before { transition-delay: 3.4s; }
.flow.is-armed.s3 .draft dd:has(.val-s3)::before { transition-delay: 2.5s; }
.flow.is-armed.s4 .draft dd:has(.val-s4)::before { transition-delay: 2.9s; }
.draft-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; padding-top: 0.85rem; }
.draft-proof { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.74rem; color: var(--text-muted); }
.draft-proof svg { flex: none; width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.approve-btn {
  position: relative;
  flex: none;
  display: inline-grid;
  padding: 0.55rem 1.25rem;
  border-radius: 999px;
  background: var(--human);
  color: var(--bg);
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(252, 97, 45, 0.28);
}
.approve-btn::after { /* waiting for the team: a soft ring, only ever faded */
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: inherit;
  border: 2px solid rgba(252, 97, 45, 0.55);
  opacity: 0;
  pointer-events: none;
}
.ab-label { grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 0.35rem; white-space: nowrap; }
.ab-label svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ab-label--todo { opacity: 0; }
.flow-note { margin: 1rem 0 0; font-size: 0.74rem; color: rgba(157, 174, 184, 0.75); text-align: right; }

/* A value on its way from the drawing 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 (artikelanlage.js): the stage tells the steps in order ---- */
.flow.is-armed .flow-view { opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0s linear 0.3s; }
.flow.is-armed:is([data-step="0"], [data-step="1"]) .view-order,
.flow.is-armed[data-step="2"] .view-drawing,
.flow.is-armed[data-step="3"] .view-template,
.flow.is-armed[data-step="4"] .view-copy,
.flow.is-armed[data-step="5"] .view-erp { opacity: 1; visibility: visible; transition: opacity 0.4s ease 0.08s, visibility 0s; }

/* Step 1: the order is matched row by row; two positions stand out */
.flow.is-armed .view-order .mailhead { transition: box-shadow 0.4s ease; }
.flow.is-armed[data-step="1"] .view-order .mailhead { box-shadow: inset 0 0 0 1.5px rgba(165, 216, 230, 0.6); }
.flow.is-armed .op-ok { opacity: 0; transition: opacity 0.25s ease; }
.flow.is-armed.s1 .op-ok { opacity: 1; transition-delay: calc(0.45s + var(--r) * 0.11s); }
.flow.is-armed .op-new td, .flow.is-armed .op-chg td { background-color: transparent; transition: background-color 0.35s ease; }
.flow.is-armed.s1 .op-new td { background-color: rgba(165, 216, 230, 0.2); transition-delay: 0.75s; }
.flow.is-armed.s1 .op-chg td { background-color: rgba(165, 216, 230, 0.2); transition-delay: 1.15s; }
.flow.is-armed .op-chip { opacity: 0; transform: translateX(-5px); transition: opacity 0.3s ease, transform 0.3s ease; }
.flow.is-armed.s1 .op-new .op-chip { opacity: 1; transform: none; transition-delay: 1s; }
.flow.is-armed.s1 .op-chg .op-chip { opacity: 1; transform: none; transition-delay: 1.4s; }
.flow.is-armed .view-order mark.src { background: transparent; box-shadow: 0 0 0 0.18em transparent; color: inherit; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.flow.is-armed.s1 .op-new mark.src { background: var(--agent); box-shadow: 0 0 0 0.18em var(--agent); color: var(--ink-strong); transition-delay: 0.85s; }
.flow.is-armed.s1 .op-chg mark.src { background: var(--agent); box-shadow: 0 0 0 0.18em var(--agent); color: var(--ink-strong); transition-delay: 1.25s; }
.flow.is-armed .op-note { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s1 .op-note { opacity: 1; transition-delay: 1.9s; }
.flow.is-armed .val-s1 { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s1 .val-s1 { opacity: 1; transition-delay: 2.3s; }
.flow.is-armed .draft-meta > div + div .val-s1 { transition-delay: 2.5s; }

/* Step 2: the marks light up one after the other; artikelanlage.js flies the values over */
.flow.is-armed .view-drawing 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 .view-drawing mark.src { background: var(--agent); box-shadow: 0 0 0 0.18em var(--agent); color: var(--ink-strong); transition-delay: calc(0.35s + var(--k) * 90ms); }
.flow.is-armed .view-drawing .tb-empty { outline-color: transparent; transition: outline-color 0.3s ease; }
.flow.is-armed.s2 .view-drawing .tb-empty { outline-color: var(--link-ink); transition-delay: 0.9s; }
.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 .val-s2 { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s2 .val-s2 { opacity: 1; transition-delay: 3.4s; }

/* Step 3: the customer's articles are searched; the one with the same surface is picked */
.flow.is-armed .q-chip { opacity: 0; transition: opacity 0.3s ease; }
.flow.is-armed.s3 .q-chip { opacity: 1; transition-delay: 0.25s; }
.flow.is-armed.s3 .q-chip--key { transition-delay: 0.5s; }
/* Each row comes in; the ones with another surface step back once the search has run */
.flow.is-armed .tpl { opacity: 0; }
.flow.is-armed.s3 .tpl { animation: tpl-in 0.35s ease both; animation-delay: calc(0.7s + var(--r) * 0.14s); }
.flow.is-armed.s3 .tpl:not(.tpl--pick) { animation: tpl-dim 1.7s ease both; animation-delay: calc(0.7s + var(--r) * 0.14s); }
@keyframes tpl-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@keyframes tpl-dim {
  0% { opacity: 0; transform: translateY(4px); }
  21% { opacity: 1; transform: none; }
  70% { opacity: 1; transform: none; }
  100% { opacity: 0.42; transform: none; }
}
.flow.is-armed .tpl--pick { border-color: var(--border); background-color: rgba(255, 255, 255, 0.025); box-shadow: none; transition: border-color 0.35s ease, background-color 0.35s ease, box-shadow 0.35s ease; }
.flow.is-armed .tpl--pick .tpl-surf { color: var(--text-muted); transition: color 0.35s ease; }
.flow.is-armed.s3 .tpl--pick { border-color: rgba(165, 216, 230, 0.6); background-color: rgba(165, 216, 230, 0.09); box-shadow: 0 0 0 1px rgba(165, 216, 230, 0.22), 0 10px 26px rgba(0, 0, 0, 0.22); transition-delay: 1.95s; }
.flow.is-armed.s3 .tpl--pick .tpl-surf { color: var(--agent); transition-delay: 1.95s; }
.flow.is-armed .tpl-tag { opacity: 0; transform: translateY(3px); transition: opacity 0.3s ease, transform 0.3s ease; }
.flow.is-armed.s3 .tpl-tag { opacity: 1; transform: none; transition-delay: 2.2s; }
.flow.is-armed .tpl-note { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s3 .tpl-note { opacity: 1; transition-delay: 2.7s; }
.flow.is-armed .val-s3 { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s3 .val-s3 { opacity: 1; transition-delay: 2.5s; }

/* Step 4: what was overwritten, the prices set to zero one by one, the drawing linked */
.flow.is-armed .cp-chips span { opacity: 0; transform: translateY(3px); transition: opacity 0.3s ease, transform 0.3s ease; }
.flow.is-armed.s4 .cp-chips span { opacity: 1; transform: none; transition-delay: calc(0.3s + var(--k) * 0.14s); }
.flow.is-armed .cp-prices li { opacity: 0; transition: opacity 0.3s ease; }
.flow.is-armed.s4 .cp-prices li { opacity: 1; transition-delay: calc(0.9s + var(--k) * 0.1s); }
.flow.is-armed .cp-prices s { text-decoration-color: transparent; color: rgba(255, 255, 255, 0.86); transition: text-decoration-color 0.3s ease, color 0.3s ease; }
.flow.is-armed.s4 .cp-prices s { text-decoration-color: rgba(255, 255, 255, 0.6); color: var(--text-muted); transition-delay: calc(1.5s + var(--k) * 0.32s); }
.flow.is-armed .cp-prices b { opacity: 0; transform: translateX(-4px); transition: opacity 0.3s ease, transform 0.3s ease; }
.flow.is-armed.s4 .cp-prices b { opacity: 1; transform: none; transition-delay: calc(1.7s + var(--k) * 0.32s); }
.flow.is-armed .cp-file { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s4 .cp-file { opacity: 1; transition-delay: 3.2s; }
.flow.is-armed .val-s4 { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s4 .draft-more > div:nth-child(2) .val-s4 { opacity: 1; transition-delay: 2.9s; }
.flow.is-armed.s4 .draft-more > div:nth-child(3) .val-s4 { opacity: 1; transition-delay: 3.15s; }
.flow.is-armed.s4 .draft-more > div:nth-child(4) .val-s4 { opacity: 1; transition-delay: 3.5s; }

/* Step 5: the sources show, the team releases, the article is in the ERP */
.flow.is-armed .src-tag, .flow.is-armed .draft-proof { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s5 .src-tag, .flow.is-armed.s5 .draft-proof { opacity: 1; }
.flow.is-armed.s5 .draft-meta .src-tag { transition-delay: 0.25s; }
.flow.is-armed.s5 .draft-main .src-tag { transition-delay: 0.45s; }
.flow.is-armed.s5 .draft-more .src-tag { transition-delay: 0.65s; }
.flow.is-armed.s5 .draft-proof { transition-delay: 0.85s; }
.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: 1s; }
/* "bereit zur Freigabe" from 1.15 s until the release at 3.65 s */
.flow.is-armed.s5 .st-ready { animation: st-ready 3.95s linear both; }
@keyframes st-ready {
  0%, 29% { opacity: 0; }
  33%, 92% { opacity: 1; }
  100% { opacity: 0; }
}
.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.2s; }
.flow.is-armed.s5 .approve-btn::after { animation: approve-wait 1.6s ease-in-out 1.4s 1 both; }
@keyframes approve-wait {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}
.flow.is-armed.s5 .approve-btn { animation: approve-press 0.45s ease-out 3s both; }
@keyframes approve-press {
  0% { transform: scale(1); }
  40% { transform: scale(0.92); }
  100% { transform: scale(1); }
}
.flow.is-armed .ab-label--todo { opacity: 1; transition: opacity 0.25s ease; }
.flow.is-armed .ab-label--done { opacity: 0; transition: opacity 0.25s ease; }
.flow.is-armed.s5 .ab-label--todo { opacity: 0; transition-delay: 3.3s; }
.flow.is-armed.s5 .ab-label--done { opacity: 1; transition-delay: 3.4s; }
.flow.is-armed.s5 .st-done { opacity: 1; transition-delay: 3.8s; }
.flow.is-armed .erp-wait { transition: opacity 0.35s ease; }
.flow.is-armed .erp-done { opacity: 0; transition: opacity 0.4s ease; }
.flow.is-armed.s5 .erp-wait { animation: erp-wait 3.9s linear 0.35s both; }
@keyframes erp-wait { 0% { opacity: 0; } 10%, 88% { opacity: 1; } 100% { opacity: 0; } }
.flow.is-armed.s5 .erp-done { opacity: 1; transition-delay: 4.25s; }
.flow.is-armed .erp-stamp, .flow.is-armed .erp-line { opacity: 0; transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.flow.is-armed .erp-stamp { transform: scale(1.15); }
.flow.is-armed.s5 .erp-stamp { opacity: 1; transform: none; transition-delay: 4.55s; }
.flow.is-armed.s5 .erp-line { opacity: 1; transition-delay: calc(4.9s + var(--k) * 0.35s); }

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

@media (max-width: 1100px) {
  .flow.is-armed .flow-name { font-size: 0.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; }
}

/* Position 7: old and new drawing side by side */
.cmp {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: clamp(1.4rem, 4vw, 3.4rem);
  align-items: center;
  margin-top: clamp(1.2rem, 2.4vw, 1.6rem);
}
.cmp-text .cmp-kicker { margin: 0 0 0.55rem; font-family: var(--mono); font-size: 0.74rem; line-height: 1.5; color: var(--agent); }
.cmp h3 { margin: 0 0 0.6rem; font-size: clamp(1.15rem, 1rem + 0.45vw, 1.35rem); font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; color: #ffffff; }
.cmp-text p { margin: 0; font-size: 0.95rem; line-height: 1.6; color: var(--text-muted); }
.cmp-text .cmp-team { display: flex; align-items: center; gap: 0.65rem; margin-top: 1.05rem; color: var(--human-text); font-weight: 600; line-height: 1.45; }
.cmp-team-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); }
.cmp-team-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.cmp-board { min-width: 0; padding: 1rem 1.15rem 0.6rem; border-radius: 0.9rem; background: #F7FAFB; color: var(--ink); box-shadow: 0 20px 44px rgba(0, 0, 0, 0.34); overflow-x: auto; }
.cmp-table { width: 100%; border-collapse: collapse; }
.cmp-table thead th { padding: 0 0.6rem 0.55rem 0; text-align: left; vertical-align: bottom; font-size: 0.74rem; font-weight: 600; line-height: 1.3; color: var(--ink-strong); border-bottom: 1.4px solid var(--dwg-o); }
.cmp-table thead small { display: block; margin-top: 2px; font-family: var(--mono); font-size: 0.66rem; font-weight: 400; color: var(--ink-muted); }
.cmp-table tbody th, .cmp-table td { padding: 0.5rem 0.6rem 0.5rem 0; border-bottom: 1px solid var(--ink-line); }
.cmp-table tbody tr:last-child th, .cmp-table tbody tr:last-child td { border-bottom: 0; }
.cmp-table tbody th { text-align: left; font-size: 0.72rem; font-weight: 400; color: var(--ink-muted); white-space: nowrap; }
.cmp-table td { font-family: var(--mono); font-size: 0.74rem; color: var(--ink-strong); white-space: nowrap; }
.cmp-same { width: 14px; height: 14px; margin-left: 0.4rem; vertical-align: -2px; fill: none; stroke: var(--link-ink); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.cmp-diff th, .cmp-diff td { background: rgba(165, 216, 230, 0.32); }
.cmp-diff th:first-child { padding-left: 0.4rem; border-radius: 0.4rem 0 0 0.4rem; }
.cmp-diff td:last-child { border-radius: 0 0.4rem 0.4rem 0; }
.cmp-diff .cmp-v { font-weight: 500; }
.cmp-tag { display: inline-block; margin-left: 0.45rem; padding: 0 7px; border-radius: 999px; background: var(--link-ink); color: #ffffff; font-family: 'Inter', sans-serif; font-size: 0.64rem; font-weight: 700; line-height: 1.55; vertical-align: 1px; }
/* Armed (artikelanlage.js): built once in view, field by field, the difference last */
.cmp.is-armed .cmp-same, .cmp.is-armed .cmp-tag { opacity: 0; transition: opacity 0.3s ease; }
.cmp.is-armed .cmp-diff th, .cmp.is-armed .cmp-diff td { background-color: transparent; transition: background-color 0.4s ease; }
.cmp.is-armed .cmp-team { opacity: 0; transform: translateY(4px); transition: opacity 0.45s ease, transform 0.45s ease; }
.cmp.is-on .cmp-same { opacity: 1; transition-delay: calc(0.3s + var(--r) * 0.35s); }
.cmp.is-on .cmp-diff th, .cmp.is-on .cmp-diff td { background-color: rgba(165, 216, 230, 0.32); transition-delay: 1.45s; }
.cmp.is-on .cmp-tag { opacity: 1; transition-delay: 1.75s; }
.cmp.is-on .cmp-team { opacity: 1; transform: none; transition-delay: 2.3s; }
@media (max-width: 900px) {
  .cmp { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .cmp-board { padding: 0.9rem 0.85rem 0.6rem; }
  .cmp-table, .cmp-table thead, .cmp-table tbody { display: block; }
  .cmp-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 0.7rem; border-bottom: 1px solid var(--ink-line); }
  .cmp-table thead tr { border-bottom: 1.4px solid var(--dwg-o); }
  .cmp-table tbody tr:last-child { border-bottom: 0; }
  .cmp-table thead th:first-child { display: none; }
  .cmp-table thead th { border-bottom: 0; }
  .cmp-table tbody th { grid-column: 1 / -1; padding: 0.55rem 0 0; border-bottom: 0; }
  .cmp-table td { padding: 0.1rem 0 0.5rem; border-bottom: 0; font-size: 0.7rem; }
  .cmp-diff { border-radius: 0.4rem; background: rgba(165, 216, 230, 0.32); }
  .cmp-diff th, .cmp-diff td { background: none !important; }
  .cmp-diff th:first-child { padding-left: 0.4rem; }
  .cmp-diff td:first-of-type { padding-left: 0.4rem; }
  .cmp.is-armed .cmp-diff { background-color: transparent; transition: background-color 0.4s ease; }
  .cmp.is-on .cmp-diff { background-color: rgba(165, 216, 230, 0.32); transition-delay: 1.45s; }
  .cmp-tag { display: block; width: fit-content; margin: 3px 0 0; }
}

/* ============ 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-ic { color: var(--agent); }
.cv-ic, .cv-ic--muted { stroke-width: 1.7 !important; }
.cv-ic--muted { color: var(--text-muted); }
.cv-x { color: var(--text-muted); }
.case h3 { margin: 1.15rem 0 0.45rem; font-size: 1.05rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.01em; color: #ffffff; }
.case > p, .case-body > p { margin: 0; font-size: 0.92rem; line-height: 1.6; color: var(--text-muted); }
/* The first case, the one every other case starts from: the full width, data left, text right */
.case--wide {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.2rem clamp(1.4rem, 3vw, 2.6rem);
  align-items: center;
  padding-bottom: 2rem;
}
.case--wide .case-viz { height: auto; padding: 0.7rem 1rem 0.55rem; }
.case--wide h3 { margin-top: 0; font-size: 1.15rem; }
.case--wide .case-body > p { font-size: 0.96rem; }
.sig { width: 100%; border-collapse: collapse; }
.sig th, .sig td { padding: 0.42rem 0.5rem; text-align: center; border-bottom: 1px solid var(--border); }
.sig tbody tr:last-child th, .sig tbody tr:last-child td { border-bottom: 0; }
.sig thead th { font-size: 0.7rem; font-weight: 500; line-height: 1.3; color: var(--text-muted); }
.sig tbody th { padding-left: 0; text-align: left; font-family: var(--mono); font-size: 0.74rem; font-weight: 400; color: #ffffff; white-space: nowrap; }
.sig td svg { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; fill: none; stroke: var(--agent); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
@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; }
  .case--wide { grid-template-columns: minmax(0, 1fr); }
  .case--wide h3 { font-size: 1.05rem; }
  .case--wide .case-body > p { font-size: 0.92rem; }
}

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

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

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

/* ============ 9 · DEMO ============ */
.closing-text { margin: 1.2rem 0 0; max-width: 34rem; font-size: 1.02rem; line-height: 1.65; color: var(--text-muted); }
body.uc .closing h2 { max-width: 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 drawing */
  .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; }
  .hdw { animation: rise-in 0.8s var(--ease-out) 0.45s both; }

  /* The drawing becomes an article, one run of 12 s: the agent reads the sheet, four
     values in the title block light up, the empty draft fills field by field and
     waits for the team; then it empties and starts over. */
  .hdw.is-armed .tb-scan { animation: hd-scan 12s linear infinite both; }
  .hdw.is-armed .hdw-agent::before { animation: hd-glow 12s linear infinite both; }
  .hdw.is-armed .tb-read dd::before { animation: hd-mark 12s linear infinite both; animation-delay: calc(var(--k) * 0.32s); }
  .hdw.is-armed .art-rows dd { animation: hd-val 12s linear infinite both; animation-delay: calc(var(--k) * 0.42s); }
  .hdw.is-armed .art-rows > div::after { animation: hd-bar 12s linear infinite both; animation-delay: calc(var(--k) * 0.42s); }
  .hdw.is-armed .art-foot { animation: hd-foot 12s linear infinite both; }
  .hdw.is-armed .art-foot-ic::after { animation: hd-ring 12s linear infinite both; }
  .hdw.is-armed .tb-scan,
  .hdw.is-armed .hdw-agent::before,
  .hdw.is-armed .tb-read dd::before,
  .hdw.is-armed .art-rows dd,
  .hdw.is-armed .art-rows > div::after,
  .hdw.is-armed .art-foot,
  .hdw.is-armed .art-foot-ic::after { animation-play-state: paused; }
  .hdw.is-running .tb-scan,
  .hdw.is-running .hdw-agent::before,
  .hdw.is-running .tb-read dd::before,
  .hdw.is-running .art-rows dd,
  .hdw.is-running .art-rows > div::after,
  .hdw.is-running .art-foot,
  .hdw.is-running .art-foot-ic::after { 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, .cmp *, .manual * { transition: none !important; animation: none !important; }
}

/* Hero keyframes (1 s = 8.33 %) */
@keyframes hd-scan {
  0%, 8% { opacity: 0; transform: translateX(-100%); }
  9.5% { opacity: 1; transform: translateX(-60%); }
  21% { opacity: 1; transform: translateX(330%); }
  23%, 100% { opacity: 0; transform: translateX(360%); }
}
@keyframes hd-glow {
  0%, 7% { opacity: 0; }
  10%, 24% { opacity: 1; }
  30%, 100% { opacity: 0; }
}
@keyframes hd-mark {
  0%, 12% { opacity: 0; }
  14.5%, 86% { opacity: 1; }
  90%, 100% { opacity: 0; }
}
@keyframes hd-val {
  0%, 28.5% { opacity: 0; }
  31.5%, 88% { opacity: 1; }
  92%, 100% { opacity: 0; }
}
@keyframes hd-bar {
  0%, 28.5% { opacity: 1; }
  30.5%, 100% { opacity: 0; }
}
@keyframes hd-foot {
  0%, 46% { opacity: 0; transform: translateY(4px); }
  50%, 88% { opacity: 1; transform: none; }
  92%, 100% { opacity: 0; transform: none; }
}
@keyframes hd-ring {
  0%, 51% { opacity: 0; }
  57% { opacity: 1; }
  64% { opacity: 0.15; }
  71% { opacity: 1; }
  78% { opacity: 0.15; }
  84%, 100% { opacity: 0; }
}
