/* Engineering artwork only. The presentation shell selects the current panel. */
#scene .fp-engineering {
  padding: 16px;
  font-size: 14px;
  line-height: 1.4;
}

#scene .fp-engineering :is(h3, p, ol, dl, dd) {
  margin: 0;
}

#scene .fp-engineering :is(section, div, li, h3, p, span, dl, dt, dd) {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}

#scene .fp-engineering .fp-eng-panel {
  display: grid;
  min-height: 280px;
  align-content: center;
  gap: 12px;
}

#scene .fp-engineering .foundry-step-panel[hidden] {
  display: none !important;
}

#scene .fp-engineering .fp-eng-title {
  color: var(--fw-ink);
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
  text-wrap: balance;
}

#scene .fp-engineering .fp-eng-copy {
  color: var(--fw-muted);
  font-size: 14px;
  line-height: 1.4;
  text-wrap: pretty;
}

#scene .fp-engineering .fp-eng-label {
  display: block;
  color: var(--fw-indigo);
  font-size: 14px;
  font-weight: 550;
  line-height: 1.4;
}

#scene .fp-engineering .fp-eng-panel > :is(.fp-eng-label, .fp-eng-copy) {
  text-align: center;
}

#scene .fp-engineering .fp-eng-object {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

#scene .fp-engineering .fp-eng-object > .fw-art {
  width: 80px;
  height: 60px;
}

#scene .fp-engineering .fp-eng-context {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#scene .fp-engineering .fp-eng-context > .fw-art {
  flex: 0 0 56px;
  width: 56px;
  height: 42px;
  margin: 0;
}

#scene .fp-engineering .fp-eng-foundation {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-top: 1px solid var(--muted);
  background: transparent;
}

#scene .fp-engineering .fp-eng-foundation > .fw-art {
  width: 48px;
  height: 42px;
  margin: 0;
}

#scene .fp-engineering .fp-eng-foundation > .fp-eng-responsibility {
  gap: 2px;
}

#scene .fp-engineering .fp-eng-arrow {
  display: block;
  align-self: center;
  color: var(--fw-teal);
  font-size: 23px;
  line-height: 1;
  text-align: center;
}

#scene .fp-engineering .fp-eng-joined-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

#scene .fp-engineering .fp-eng-joined-art > .fw-art {
  width: 48px;
  height: 48px;
  margin: 0;
}

#scene .fp-engineering .fp-eng-responsibility {
  display: grid;
  align-content: center;
  gap: 10px;
}

#scene .fp-engineering .fp-eng-review-workbench {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

#scene .fp-engineering .fp-eng-reviewer {
  display: grid;
  justify-items: center;
  gap: 8px;
}

#scene .fp-engineering .fp-eng-reviewer > .fw-art {
  width: 80px;
  height: 60px;
}

#scene .fp-engineering .fp-eng-review-items {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 8px;
}

#scene .fp-engineering .fp-eng-criterion {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 4px;
  text-align: center;
}

#scene .fp-engineering .fp-eng-criterion > .fw-art {
  width: 48px;
  height: 36px;
}

#scene .fp-engineering .fp-eng-tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

#scene .fp-engineering .fp-eng-tokens > .fw-pill {
  max-width: 100%;
  padding: 4px 8px;
  font-size: 14px;
  white-space: normal;
}

#scene .fp-engineering .fp-eng-broken-link {
  display: grid;
  align-content: center;
  gap: 8px;
  text-align: center;
}

#scene .fp-engineering .fp-eng-broken-link > .fp-eng-label {
  color: var(--ink);
}

#scene .fp-engineering .fp-eng-broken-line {
  position: relative;
  display: block;
  height: 8px;
}

/* A dashed line with a real gap in the middle (no painted patch, so it works on any panel colour). */
#scene .fp-engineering .fp-eng-broken-line::after {
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: transparent;
  -webkit-mask: linear-gradient(90deg, #000 calc(50% - 12px), transparent calc(50% - 12px) calc(50% + 12px), #000 calc(50% + 12px));
  mask: linear-gradient(90deg, #000 calc(50% - 12px), transparent calc(50% - 12px) calc(50% + 12px), #000 calc(50% + 12px));
  content: "";
}

#scene .fp-engineering .fp-eng-broken-line::before {
  position: absolute;
  top: -6px;
  left: calc(50% - 7px);
  width: 14px;
  height: 14px;
  border-inline: 1px solid var(--muted);
  transform: skew(-20deg);
  content: "";
}

#scene .fp-engineering .fp-eng-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 0;
  list-style: none;
}

#scene .fp-engineering .fp-eng-flow-stop {
  position: relative;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 4px;
  padding: 10px 4px 0;
  border-top: 1px solid var(--muted);
  text-align: center;
}

#scene .fp-engineering .fp-eng-flow-stop > .fw-art {
  width: 64px;
  height: 48px;
}

#scene .fp-engineering .fp-eng-flow-stop:not(:last-child)::after {
  position: absolute;
  top: 28px;
  right: -16px;
  color: var(--fw-teal);
  font-size: 21px;
  line-height: 1;
  content: "→";
}

/* Requirements: a living formal specification, shared deadlines, and a ready foundation. */
#scene .fp-requirements .fp-req-anchors {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 20px;
}

#scene .fp-requirements .fp-req-product {
  display: grid;
  gap: 10px;
  text-align: center;
}

#scene .fp-requirements .fp-req-signal {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1fr);
  align-items: center;
  gap: 4px;
}

#scene .fp-requirements .fp-req-product > .fw-art {
  justify-self: center;
  width: 108px;
  height: 80px;
  margin: 0;
}

#scene .fp-requirements .fp-req-sheet {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 16px 14px;
  border: 1px solid var(--muted);
  border-radius: 0 0 0 0;
  background: transparent;
}

#scene .fp-requirements .fp-req-sheet::after {
  position: absolute;
  top: 0;
  right: 0;
  width: 17px;
  height: 17px;
  border-bottom: 1px solid var(--muted);
  border-left: 1px solid var(--muted);
  border-radius: 0 0 0 0;
  background: transparent;
  content: "";
}

#scene .fp-requirements .fp-req-fields {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: 8px 10px;
  font-size: 14px;
}

#scene .fp-requirements .fp-req-fields > dt {
  color: var(--fw-teal);
  font-weight: 550;
}

#scene .fp-requirements .fp-req-fields > dd {
  color: var(--fw-muted);
}

#scene .fp-requirements .fp-req-pressure .fp-eng-context > .fp-eng-title,
#scene .fp-requirements .fp-req-pressure > .fp-eng-copy {
  color: var(--ink);
}

#scene .fp-requirements .fp-req-fragments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
  padding-top: 10px;
  border-top: 1px solid var(--muted);
}

#scene .fp-requirements .fp-req-fragment {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--muted);
  background: transparent;
  text-align: center;
}

#scene .fp-requirements .fp-req-fragment > .fw-art {
  width: 56px;
  height: 42px;
}

#scene .fp-requirements .fp-req-fragment > .fp-eng-tokens {
  justify-content: center;
}

#scene .fp-requirements .fp-req-judgement > .fp-eng-label {
  padding-top: 10px;
  border-top: 1px dashed var(--muted);
}

#scene .fp-requirements .fp-req-shared-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1.1fr) 18px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

#scene .fp-requirements .fp-req-basis {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

#scene .fp-requirements .fp-req-basis {
  padding: 10px 4px;
  border-block: 1px solid var(--muted);
  background: transparent;
}

#scene .fp-requirements .fp-req-basis .fw-art {
  width: 56px;
  height: 60px;
}

/* Library: company-owned methods meet known, tested platform modules. */
#scene .fp-test-library .fp-lib-source {
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: center;
}

#scene .fp-test-library .fp-lib-source .fp-eng-object > .fw-art {
  width: 96px;
  height: 72px;
}

#scene .fp-test-library .fp-lib-source .fp-eng-joined-art > .fw-art {
  width: 48px;
  height: 72px;
}

#scene .fp-test-library .fp-lib-copies .fp-eng-context > .fp-eng-title {
  color: var(--ink);
}

#scene .fp-test-library .fp-lib-copy-map {
  display: grid;
  grid-template-columns: minmax(0, .95fr) 18px minmax(0, 1.6fr);
  align-items: center;
  gap: 12px;
}

#scene .fp-test-library .fp-lib-copy-source {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

#scene .fp-test-library .fp-lib-copy-source > .fw-art {
  width: 60px;
  height: 60px;
}

#scene .fp-test-library .fp-lib-copy-source .fp-eng-tokens {
  flex-direction: column;
  align-items: start;
}

#scene .fp-test-library .fp-lib-copy-branches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--muted);
}

#scene .fp-test-library .fp-lib-copy-branches > .fp-eng-object {
  position: relative;
}

#scene .fp-test-library .fp-lib-copy-branches > .fp-eng-object::before {
  position: absolute;
  top: -10px;
  left: 50%;
  height: 10px;
  border-left: 1px solid var(--muted);
  content: "";
}

#scene .fp-test-library .fp-lib-copy-branches .fw-art {
  width: 64px;
  height: 48px;
}

#scene .fp-test-library .fp-lib-library-heading {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
}

#scene .fp-test-library .fp-lib-library-heading > .fw-art {
  width: 48px;
  height: 36px;
}

#scene .fp-test-library .fp-lib-lanes {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  align-items: stretch;
  gap: 8px;
}

#scene .fp-test-library .fp-lib-lane {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--muted);
  background: transparent;
}

#scene .fp-test-library .fp-lib-sequences {
  border-color: var(--muted);
  background: transparent;
}

#scene .fp-test-library .fp-lib-modules {
  border-color: var(--muted);
  background: transparent;
}

#scene .fp-test-library .fp-lib-lane-heading {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

#scene .fp-test-library .fp-lib-lane-heading > .fw-art {
  width: 40px;
  height: 36px;
}

#scene .fp-test-library .fp-lib-lane-heading .fp-eng-responsibility {
  gap: 2px;
}

#scene .fp-test-library .fp-lib-module-faces {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 20px minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--muted);
}

/* Each face is one compact row: small drawing beside its name and role. */
#scene .fp-test-library .fp-lib-module-faces .fp-eng-object {
  grid-template-columns: 40px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  column-gap: 8px;
  text-align: left;
}

#scene .fp-test-library .fp-lib-module-faces .fp-eng-object > .fw-art {
  grid-row: 1 / 3;
  width: 40px;
  height: 32px;
}

#scene .fp-test-library .fp-lib-blocks {
  display: grid;
  gap: 4px;
}

#scene .fp-test-library .fp-lib-blocks > .fp-eng-criterion {
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 8px;
  padding: 3px 6px;
  border: 1px solid var(--muted);
  border-radius: 0;
  background: transparent;
  text-align: left;
}

#scene .fp-test-library .fp-lib-blocks .fw-art {
  width: 36px;
  height: 27px;
}

#scene .fp-test-library .fp-lib-blocks .fp-eng-label {
  color: var(--fw-ink);
}

#scene .fp-test-library .fp-lib-selection > .fp-eng-label {
  padding-top: 10px;
  border-top: 1px dashed var(--muted);
}

#scene .fp-test-library .fp-lib-products {
  gap: 8px;
}

#scene .fp-test-library .fp-lib-products > .fp-eng-label {
  color: var(--fw-teal);
}

#scene .fp-test-library .fp-lib-products-map {
  display: grid;
  grid-template-columns: 64px 16px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

#scene .fp-test-library .fp-lib-products-map > .fw-art {
  width: 64px;
  height: 60px;
}

#scene .fp-test-library .fp-lib-variants {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#scene .fp-test-library .fp-lib-variants .fp-eng-object > .fw-art {
  width: 64px;
  height: 48px;
}

#scene .fp-test-library .fp-lib-selection-parts {
  display: grid;
  gap: 6px;
  width: 100%;
  margin-top: 4px;
  text-align: left;
}

#scene .fp-test-library .fp-lib-selection-parts > span {
  display: block;
  padding: 4px 7px;
  font-size: 14px;
}

#scene .fp-test-library .fp-lib-shared-part {
  border-left: 1px solid var(--fw-teal);
  background: transparent;
  color: var(--ink);
}

#scene .fp-test-library .fp-lib-specific-part {
  border-left: 1px solid var(--fw-indigo);
  background: transparent;
  color: var(--ink);
}

#scene .fp-test-library .fp-lib-variant .fw-svg-surface {
  fill: none;
  stroke: var(--ink);
}

#scene .fp-test-library .fp-lib-variant .fw-svg-teal {
  stroke: var(--ink);
}

#scene .fp-test-library .fp-lib-to-station {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--muted);
}

#scene .fp-test-library .fp-lib-to-station > .fw-art {
  width: 56px;
  height: 42px;
  margin: 0;
}

#scene .fp-test-library .fp-lib-to-station .fp-eng-joined-art > .fw-art {
  width: 36px;
  height: 36px;
}

/* Sequences: requirement revisions change readable steps on stable modules. */
#scene .fp-sequences .fp-seq-spine {
  gap: 12px;
}

#scene .fp-sequences .fp-seq-physical {
  display: flex;
  align-items: center;
  gap: 12px;
}

#scene .fp-sequences .fp-seq-physical > .fw-art {
  flex: 0 0 64px;
  width: 64px;
  height: 48px;
  margin: 0;
}

#scene .fp-sequences .fp-seq-physical .fp-eng-responsibility {
  gap: 4px;
}

#scene .fp-sequences .fp-seq-flow {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#scene .fp-sequences .fp-seq-unclear > .fp-eng-label {
  color: var(--ink);
}

#scene .fp-sequences .fp-seq-unclear-route {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(100px, .85fr) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
}

#scene .fp-sequences .fp-seq-unclear-end {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

#scene .fp-sequences .fp-seq-unclear-end .fw-art {
  width: 64px;
  height: 64px;
}

#scene .fp-sequences .fp-seq-port {
  display: block;
  padding: 6px 8px;
  border: 1px solid var(--muted);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  text-align: center;
}

#scene .fp-sequences .fp-seq-review {
  gap: 10px;
}

#scene .fp-sequences .fp-seq-data-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 16px minmax(0, 1.15fr) 16px minmax(0, 1.1fr);
  align-items: start;
  gap: 8px 10px;
}

#scene .fp-sequences .fp-seq-data-map > .fp-eng-arrow {
  margin-top: 44px;
  align-self: start;
}

#scene .fp-sequences .fp-seq-data-map > .fp-eng-object > .fw-art {
  width: 64px;
  height: 48px;
}

#scene .fp-sequences .fp-seq-parameter {
  padding: 6px;
  border: 1px dashed var(--muted);
}

#scene .fp-sequences :is(.fp-seq-measurement, .fp-seq-evaluation) {
  padding-top: 6px;
}

#scene .fp-sequences .fp-seq-measurement > .fp-seq-port {
  border-color: var(--muted);
  color: var(--ink);
}

#scene .fp-sequences .fp-seq-limits {
  display: grid;
  grid-column: 5;
  grid-row: 2;
  align-content: start;
  gap: 4px;
  padding: 6px;
  border: 1px solid var(--muted);
  background: transparent;
}

#scene .fp-sequences .fp-seq-limit-feed {
  display: flex;
  align-items: center;
  gap: 6px;
}

#scene .fp-sequences .fp-seq-limit-feed > .fp-eng-label {
  color: var(--fw-teal);
}

#scene .fp-sequences .fp-seq-limit-document {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
}

#scene .fp-sequences .fp-seq-limit-document > .fw-art {
  width: 28px;
  height: 32px;
}

#scene .fp-sequences .fp-seq-error {
  position: relative;
  display: grid;
  grid-column: 1 / 5;
  grid-row: 2;
  grid-template-columns: minmax(76px, .6fr) 16px minmax(0, 1.4fr);
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px dashed var(--muted);
}

#scene .fp-sequences .fp-seq-error::before {
  position: absolute;
  top: -9px;
  left: 70%;
  height: 9px;
  border-left: 1px dashed var(--muted);
  content: "";
}

#scene .fp-sequences .fp-seq-error > .fp-eng-label {
  color: var(--ink);
}

#scene .fp-sequences .fp-seq-error > .fp-eng-object {
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 4px 6px;
  text-align: left;
}

#scene .fp-sequences .fp-seq-error .fw-art {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 48px;
  height: 42px;
}

#scene .fp-sequences .fp-seq-error :is(.fp-eng-title, .fp-eng-copy) {
  grid-column: 2;
}

#scene .fp-sequences .fp-seq-review-boundary {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

#scene .fp-sequences .fp-seq-review-boundary > .fw-art {
  width: 64px;
  height: 60px;
}

#scene .fp-sequences .fp-seq-safety {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px dashed var(--muted);
}

#scene .fp-sequences .fp-seq-safety .fp-eng-title {
  color: var(--ink);
}

#scene .fp-sequences .fp-seq-safety .fw-art {
  width: 46px;
  height: 48px;
}

#scene .fp-sequences .fp-seq-together-map {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

#scene .fp-sequences .fp-seq-role {
  position: relative;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: 4px 8px;
  text-align: left;
}

#scene .fp-sequences .fp-seq-role:last-child {
  grid-column: 2;
  grid-row: 1;
}

#scene .fp-sequences .fp-seq-role > .fw-art {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 56px;
  height: 48px;
}

#scene .fp-sequences .fp-seq-role > :is(.fp-eng-title, .fp-eng-copy) {
  grid-column: 2;
}

#scene .fp-sequences .fp-seq-role::after {
  position: absolute;
  bottom: -18px;
  left: 50%;
  color: var(--fw-teal);
  font-size: 21px;
  line-height: 1;
  content: "↓";
}

#scene .fp-sequences .fp-seq-shared-review {
  display: grid;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  padding: 12px;
  border-block: 1px solid var(--muted);
  background: transparent;
  text-align: center;
}

#scene .fp-sequences .fp-seq-shared-review > .fp-eng-title {
  grid-column: 1 / -1;
}

#scene .fp-sequences :is(.fp-seq-change-map, .fp-seq-lab-production) {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

#scene .fp-sequences .fp-seq-change-map {
  grid-column: 1;
  grid-row: 2;
}

#scene .fp-sequences .fp-seq-change-map > .fw-art {
  width: 48px;
  height: 48px;
  margin: 0;
}

#scene .fp-sequences .fp-seq-change-map > .fp-eng-arrow {
  font-size: 18px;
}

#scene .fp-sequences .fp-seq-shared-review > .fp-eng-copy {
  grid-column: 1;
  grid-row: 3;
}

#scene .fp-sequences .fp-seq-lab-production {
  grid-column: 2;
  grid-row: 2;
}

#scene .fp-sequences .fp-seq-lab-production > .fw-art {
  width: 56px;
  height: 42px;
  margin: 0;
}

#scene .fp-sequences .fp-seq-shared-review > .fp-eng-label {
  grid-column: 2;
  grid-row: 3;
}

/* Only narrow artwork columns reflow; desktop panels stay one compact scene. */
@container foundry-visual (max-width: 520px) {
  #scene .fp-engineering {
    padding: 12px;
  }

  #scene .fp-engineering .fp-eng-panel {
    min-height: 250px;
  }

  #scene .fp-requirements .fp-req-anchors,
  #scene .fp-requirements .fp-req-signal,
  #scene .fp-requirements .fp-req-fragments,
  #scene .fp-requirements .fp-req-shared-route,
  #scene .fp-test-library .fp-lib-source,
  #scene .fp-test-library .fp-lib-copy-map,
  #scene .fp-test-library .fp-lib-lanes,
  #scene .fp-test-library .fp-lib-module-faces,
  #scene .fp-test-library .fp-lib-products-map,
  #scene .fp-sequences .fp-seq-unclear-route,
  #scene .fp-sequences .fp-seq-data-map {
    grid-template-columns: minmax(0, 1fr);
  }

  #scene .fp-requirements .fp-req-signal > .fp-eng-arrow,
  #scene .fp-requirements .fp-req-shared-route > .fp-eng-arrow,
  #scene .fp-test-library .fp-lib-source > .fp-eng-arrow,
  #scene .fp-test-library .fp-lib-copy-map > .fp-eng-arrow,
  #scene .fp-test-library .fp-lib-lanes > .fp-eng-arrow,
  #scene .fp-test-library .fp-lib-products-map > .fp-eng-arrow,
  #scene .fp-sequences .fp-seq-data-map > .fp-eng-arrow {
    margin: 0;
    transform: rotate(90deg);
  }

  #scene .fp-test-library .fp-lib-module-faces > .fp-eng-arrow {
    margin: 0;
    transform: rotate(90deg);
  }

  #scene .fp-engineering .fp-eng-broken-line {
    width: 2px;
    height: 36px;
    margin-inline: auto;
  }

  #scene .fp-engineering .fp-eng-broken-line::after {
    inset: 0;
    width: 2px;
    height: auto;
    background: transparent;
    -webkit-mask: linear-gradient(180deg, #000 calc(50% - 9px), transparent calc(50% - 9px) calc(50% + 9px), #000 calc(50% + 9px));
    mask: linear-gradient(180deg, #000 calc(50% - 9px), transparent calc(50% - 9px) calc(50% + 9px), #000 calc(50% + 9px));
  }

  #scene .fp-engineering .fp-eng-broken-line::before {
    top: calc(50% - 7px);
    left: -6px;
    width: 14px;
    height: 14px;
    border-inline: 0;
    border-block: 1px solid var(--muted);
    transform: skewY(-20deg);
  }

  #scene .fp-engineering .fp-eng-review-workbench {
    grid-template-columns: minmax(0, 1fr);
  }

  #scene .fp-engineering .fp-eng-reviewer {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  #scene .fp-engineering .fp-eng-reviewer > .fw-art {
    margin: 0;
  }

  #scene .fp-engineering .fp-eng-flow {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  #scene .fp-engineering .fp-eng-flow-stop {
    grid-template-columns: 64px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 4px 12px;
    text-align: left;
  }

  #scene .fp-engineering .fp-eng-flow-stop > .fw-art {
    grid-column: 1;
    grid-row: 1 / 3;
    margin: 0;
  }

  #scene .fp-engineering .fp-eng-flow-stop > :is(.fp-eng-title, .fp-eng-copy) {
    grid-column: 2;
  }

  #scene .fp-engineering .fp-eng-flow-stop:not(:last-child)::after {
    top: auto;
    right: auto;
    bottom: -19px;
    left: 26px;
    content: "↓";
  }

  #scene .fp-test-library .fp-lib-copy-source {
    max-width: 290px;
    margin-inline: auto;
  }

  #scene .fp-test-library .fp-lib-lane-heading {
    grid-template-columns: 48px minmax(0, 1fr);
  }

  #scene .fp-test-library .fp-lib-blocks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #scene .fp-test-library .fp-lib-blocks > .fp-eng-criterion {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    padding: 6px 4px;
    text-align: center;
  }

  #scene .fp-test-library .fp-lib-products-map > .fw-art {
    height: 42px;
  }

  #scene .fp-test-library .fp-lib-variants {
    grid-template-columns: minmax(0, 1fr);
  }

  #scene .fp-test-library .fp-lib-variants > .fp-eng-object {
    padding-block: 8px;
    border-top: 1px solid var(--muted);
  }

  #scene .fp-sequences .fp-seq-physical {
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
  }

  #scene .fp-sequences .fp-seq-physical > .fp-eng-responsibility {
    flex-basis: 100%;
  }

  #scene .fp-sequences :is(.fp-seq-error, .fp-seq-limits) {
    grid-column: 1;
    grid-row: auto;
  }

  #scene .fp-sequences .fp-seq-limits {
    grid-row: 5;
  }

  #scene .fp-sequences .fp-seq-limit-feed > .fp-eng-arrow {
    transform: rotate(180deg);
  }

  #scene .fp-sequences .fp-seq-error::before {
    display: none;
  }

  #scene .fp-sequences .fp-seq-together-map {
    grid-template-columns: minmax(0, 1fr);
  }

  #scene .fp-sequences .fp-seq-role:last-child {
    grid-column: 1;
    grid-row: 2;
  }

  #scene .fp-sequences .fp-seq-role:first-child::after {
    display: none;
  }

  #scene .fp-sequences .fp-seq-shared-review {
    grid-row: 3;
    grid-template-columns: minmax(0, 1fr);
  }

  #scene .fp-sequences .fp-seq-shared-review > :is(.fp-seq-change-map, .fp-eng-copy, .fp-seq-lab-production, .fp-eng-label) {
    grid-column: 1;
    grid-row: auto;
  }
}

@container foundry-visual (max-width: 380px) {
  #scene .fp-engineering .fp-eng-review-items {
    grid-template-columns: minmax(0, 1fr);
  }

  #scene .fp-engineering .fp-eng-review-items > .fp-eng-criterion {
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 8px;
    text-align: left;
  }

  #scene .fp-requirements .fp-req-fields {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  #scene .fp-requirements .fp-req-fields > dd:not(:last-child) {
    margin-bottom: 6px;
  }

  #scene .fp-test-library .fp-lib-blocks {
    grid-template-columns: minmax(0, 1fr);
  }

  #scene .fp-test-library .fp-lib-blocks > .fp-eng-criterion {
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 8px;
    text-align: left;
  }

  #scene .fp-sequences :is(.fp-seq-review-boundary, .fp-seq-safety) {
    grid-template-columns: minmax(0, 1fr);
  }

  #scene .fp-sequences .fp-seq-error {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 10 · One chain from requirements to documentation. */
#scene .fp-documentation .fp-doc-item {
  grid-template-columns: 36px minmax(0, 1fr);
  align-content: center;
  align-items: center;
  justify-items: start;
  column-gap: 10px;
  row-gap: 1px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--muted);
  border-radius: 0;
  background: transparent;
  text-align: left;
}

#scene .fp-documentation .fp-doc-item > .fw-art {
  grid-row: 1 / 3;
  width: 36px;
  height: 30px;
}

#scene .fp-documentation .fp-doc-item.fp-doc-key,
#scene .fp-documentation .fp-doc-item.fp-doc-output {
  border-color: var(--muted);
  background: transparent;
}

#scene .fp-documentation .fp-doc-handover {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px minmax(0, 1fr);
  align-items: start;
  gap: 8px;
}

#scene .fp-documentation .fp-doc-lane {
  display: grid;
  gap: 6px;
  min-width: 0;
}

#scene .fp-documentation .fp-doc-lane > .fp-eng-label,
#scene .fp-documentation :is(.fp-doc-crossing, .fp-doc-generates) > .fp-eng-label {
  text-align: center;
}

#scene .fp-documentation :is(.fp-doc-crossing, .fp-doc-generates) {
  display: grid;
  justify-items: center;
  align-self: center;
  gap: 2px;
}

#scene .fp-documentation .fp-doc-crossing > .fp-eng-label {
  color: var(--ink);
}

#scene .fp-documentation .fp-doc-risk-map {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

#scene .fp-documentation .fp-doc-risk-side {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

#scene .fp-documentation .fp-doc-risk-side > .fw-art {
  width: 56px;
  height: 44px;
}

#scene .fp-documentation .fp-doc-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 18px minmax(0, 1.15fr) 18px minmax(0, 1fr);
  align-items: stretch;
  gap: 6px;
}

#scene .fp-documentation .fp-doc-flow > .fp-eng-arrow {
  align-self: center;
  text-align: center;
}

/* In three-step flows each item stacks its drawing above the text, leaving the full width to the words. */
#scene .fp-documentation .fp-doc-flow > .fp-doc-item {
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  align-content: start;
  row-gap: 3px;
  text-align: center;
}

#scene .fp-documentation .fp-doc-flow > .fp-doc-item > .fw-art {
  grid-row: auto;
}

#scene .fp-documentation .fp-doc-ts {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px dashed var(--muted);
  border-radius: 0;
  text-align: left;
}

#scene .fp-documentation .fp-doc-ts > .fw-art {
  width: 36px;
  height: 30px;
}

#scene .fp-documentation .fp-doc-ts .fp-eng-title {
  color: var(--ink);
}

#scene .fp-documentation .fp-doc-generate {
  display: grid;
  gap: 4px;
}

#scene .fp-documentation .fp-doc-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

@container foundry-visual (max-width: 540px) {
  #scene .fp-documentation :is(.fp-doc-handover, .fp-doc-risk-map, .fp-doc-flow, .fp-doc-pair) {
    grid-template-columns: minmax(0, 1fr);
  }

  #scene .fp-documentation .fp-doc-flow > .fp-eng-arrow {
    transform: rotate(90deg);
  }

  #scene .fp-documentation .fp-doc-crossing > .fp-eng-arrow {
    transform: rotate(90deg);
  }

  #scene .fp-documentation .fp-doc-flow > .fp-doc-item {
    grid-template-columns: 36px minmax(0, 1fr);
    justify-items: start;
    text-align: left;
  }

  #scene .fp-documentation .fp-doc-flow > .fp-doc-item > .fw-art {
    grid-row: 1 / 3;
  }
}
