/* Maniform Lattice: the twin of one operation, drawn with the Platform diagram materials. The
   panel, title row and loop dot are shared with the other feature diagrams (pillars.css). */
.migration-page .pillar-lattice .pillar-name .icon {
  color: var(--emphasis);
}
.migration-page .lattice-panel {
  position: relative;
}
.migration-page .lattice-panel .twin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 14px;
}
.migration-page .lattice-panel .twin-toggle {
  display: inline-flex;
  margin: 0;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--diagram-inset);
}
.migration-page .lattice-panel .twin-toggle label {
  position: relative;
  display: block;
  cursor: pointer;
}
.migration-page .lattice-panel .twin-toggle input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.migration-page .lattice-panel .twin-toggle span {
  display: flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: calc(var(--radius-control) - 3px);
  font-size: 12px;
  font-weight: 550;
  line-height: 1.2;
  color: var(--muted);
  transition: background-color .2s ease-out, color .2s ease-out;
}
.migration-page .lattice-panel .twin-toggle input:checked + span {
  background: var(--ink);
  color: var(--card);
}
.migration-page .lattice-panel .twin-toggle input:focus-visible + span {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
/* System labels: the diagram label type used across the Platform panels. */
.migration-page .lattice-panel .twin-stamp,
.migration-page .lattice-panel .twin-source {
  margin: 0;
  font: 400 10px/1.5 var(--font-mono);
  color: #40515a;
}
.migration-page .lattice-panel .twin-source {
  display: block;
  margin-top: 2px;
}
.migration-page .lattice-panel .twin-map {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px minmax(0, 1fr);
  grid-template-rows: 28px auto 28px auto 28px auto;
  margin: 0;
}
.migration-page .lattice-panel .twin-lane {
  grid-row: 1 / 7;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--diagram-inset);
}
.migration-page .lattice-panel .twin-lane > h4 {
  margin: 0;
  padding: 9px 12px 0;
  font: 550 12px/1.4 var(--font-body);
  color: var(--ink);
}
.migration-page .lattice-panel .twin-lane-a {
  grid-column: 1;
}
.migration-page .lattice-panel .twin-lane-b {
  grid-column: 3;
}
.migration-page .lattice-panel .twin-step {
  z-index: 1;
  margin: 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--diagram-surface);
  transition: border-color .2s ease-out, background-color .2s ease-out, box-shadow .2s ease-out;
}
.migration-page .lattice-panel .twin-step strong {
  display: block;
  font-size: 15px;
  font-weight: 550;
  line-height: 1.3;
  color: var(--ink);
}
.migration-page .lattice-panel .twin-step-1 {
  grid-column: 1;
  grid-row: 2;
}
.migration-page .lattice-panel .twin-step-2 {
  grid-column: 1;
  grid-row: 4;
}
.migration-page .lattice-panel .twin-step-3 {
  grid-column: 3;
  grid-row: 4;
}
.migration-page .lattice-panel .twin-step-4 {
  grid-column: 3;
  grid-row: 6;
  margin-bottom: 10px;
}
.migration-page .lattice-panel .twin-link {
  z-index: 1;
  justify-self: center;
  position: relative;
  width: 0;
  border-left: 1.5px solid var(--muted);
}
.migration-page .lattice-panel .twin-link::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: -5.25px;
  border: 4.5px solid transparent;
  border-bottom: 0;
  border-top: 6px solid var(--muted);
}
.migration-page .lattice-panel .twin-link-a {
  grid-column: 1;
  grid-row: 3;
}
.migration-page .lattice-panel .twin-link-b {
  grid-column: 3;
  grid-row: 5;
}
/* The handoff between the two teams is where the finding sits. */
.migration-page .lattice-panel .twin-handoff {
  grid-column: 1 / 4;
  grid-row: 4;
  z-index: 2;
  align-self: center;
  justify-self: center;
  position: relative;
  width: 60px;
  height: 0;
  border-top: 1.5px solid var(--signature);
}
.migration-page .lattice-panel .twin-handoff::after {
  content: "";
  position: absolute;
  top: -5.25px;
  right: -1px;
  border: 4.5px solid transparent;
  border-right: 0;
  border-left: 6px solid var(--signature);
}
.migration-page .lattice-panel .twin-chip {
  grid-column: 3;
  grid-row: 3;
  z-index: 2;
  align-self: end;
  justify-self: start;
  margin: 0 0 5px 10px;
  padding: 2px 7px;
  border: 1px solid var(--signature);
  border-radius: var(--radius-chip);
  background: color-mix(in srgb, var(--signature) 14%, var(--diagram-surface));
  font-size: 12px;
  font-weight: 550;
  line-height: 1.3;
  white-space: nowrap;
  color: var(--signature-text);
}
.migration-page .lattice-panel .twin-chip.when-earlier {
  border-color: var(--muted);
  background: var(--diagram-surface);
  color: var(--ink);
}
.migration-page .lattice-panel .twin-step-3 {
  border-color: var(--signature);
  background: color-mix(in srgb, var(--signature) 10%, var(--diagram-surface));
}
.migration-page .lattice-panel .twin-tiles {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0 0;
}
.migration-page .lattice-panel .twin-tile {
  display: grid;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #647d8826;
  border-radius: var(--radius-control);
  background: var(--diagram-inset);
  transition: box-shadow .2s ease-out;
}
.migration-page .lattice-panel .twin-tile dt {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);
}
.migration-page .lattice-panel .twin-tile dd {
  grid-area: 2 / 1;
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 0;
}
.migration-page .lattice-panel .twin-tile b {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.migration-page .lattice-panel .twin-tile small {
  font-size: 11px;
  line-height: 1.3;
  color: var(--muted);
}
.migration-page .lattice-panel .twin-note {
  font-size: 12px;
  line-height: 1.45;
  color: var(--muted);
}
/* Both views share one cell, so the panel keeps its height when the view changes. The visitor's
   choice, or the loop, picks the view. Without :has(), the current view stays. */
.migration-page .lattice-panel :is(.twin-stamps, .twin-notes) {
  display: grid;
}
.migration-page .lattice-panel .twin-notes {
  margin-top: 10px;
}
.migration-page .lattice-panel :is(.twin-stamps .twin-stamp, .twin-notes .twin-note) {
  grid-area: 1 / 1;
  margin: 0;
}
.migration-page .lattice-panel .twin-stamps .twin-stamp {
  justify-self: end;
}
.migration-page .lattice-panel:not(:has(#twin-earlier:checked)) .twin-chip.when-earlier,
.migration-page .lattice-panel:has(#twin-earlier:checked) .twin-chip.when-current {
  display: none;
}
.migration-page .lattice-panel:not(:has(#twin-earlier:checked)) :is(.twin-stamps, .twin-notes, .twin-tile) .when-earlier,
.migration-page .lattice-panel:has(#twin-earlier:checked) :is(.twin-stamps, .twin-notes, .twin-tile) .when-current {
  visibility: hidden;
}
.migration-page .lattice-panel:has(#twin-earlier:checked) .twin-handoff {
  border-top-style: dashed;
  border-top-color: var(--muted);
}
.migration-page .lattice-panel:has(#twin-earlier:checked) .twin-handoff::after {
  border-left-color: var(--muted);
}
.migration-page .lattice-panel:has(#twin-earlier:checked) .twin-step-3 {
  border-color: var(--line);
  background: var(--diagram-surface);
}
/* The loop: the step the dot rests on, then the readout. */
.migration-page .lattice-panel[data-loop-active="1"] .twin-step-1,
.migration-page .lattice-panel[data-loop-active="2"] .twin-step-2,
.migration-page .lattice-panel[data-loop-active="3"] .twin-step-3,
.migration-page .lattice-panel[data-loop-active="4"] .twin-step-4,
.migration-page .lattice-panel:has(#twin-earlier:checked)[data-loop-active="3"] .twin-step-3 {
  border-color: var(--signature);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--signature) 14%, transparent);
}
.migration-page .lattice-panel[data-loop-active="readout"] .twin-tile {
  box-shadow: inset 0 0 0 1px var(--signature), 0 0 0 4px color-mix(in srgb, var(--signature) 14%, transparent);
}
/* The standards' wordmarks, each scaled so its main mark (the BPMN plate, the XES and DMN letters)
   is 16px tall, the weight of the marks in the other sections' rows. XES and DMN carry a line of
   small text under the letters, so they sit a little lower and the letters rest on the row's
   centre line. */
.migration-page .pillar-lattice .eco-mark[aria-label="BPMN"] img {
  width: 59px;
  height: 27px;
}
.migration-page .pillar-lattice .eco-mark[aria-label="XES"] img {
  width: 56px;
  height: 22px;
  transform: translateY(3px);
}
.migration-page .pillar-lattice .eco-mark[aria-label="DMN"] img {
  width: 44px;
  height: 21px;
  transform: translateY(2.5px);
}
@media (max-width: 650px) {
  .migration-page .lattice-panel .twin-toggle span {
    min-height: 40px;
  }
  .migration-page .lattice-panel .twin-map {
    grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr);
  }
  .migration-page .lattice-panel .twin-step {
    margin-inline: 6px;
    padding: 7px 8px;
  }
  .migration-page .lattice-panel .twin-step strong {
    font-size: 13px;
  }
  .migration-page .lattice-panel .twin-handoff {
    width: 26px;
  }
  .migration-page .lattice-panel .twin-chip {
    margin-left: 6px;
    font-size: 10px;
  }
  .migration-page .lattice-panel .twin-tiles {
    grid-template-columns: 1fr;
  }
  .migration-page .lattice-panel .twin-stamps .twin-stamp {
    justify-self: start;
  }
}
