/* A003-A1. Dominant diagram, shared outcome row, subordinate ruled notes.
   Geometry provenance: .foreman/ports/a003-composition/COMPOSITION-NOTES.md.
   Load after tokens.css and all V3 styles. No stage-specific height rules. */
.mechanic-a002 {
  --row: 184px;
  --mechanic-gap: 32px;
  padding-block: 32px;
  background: var(--ground, #F4FAED);
  color: var(--ink, #18280E);
  font-family: var(--font-body, "Manrope", sans-serif);
}
.mechanic-a002 *, .mechanic-a002 *::before, .mechanic-a002 *::after { box-sizing: border-box; }
.mechanic-a002 [id] { scroll-margin-top: 96px; }
.mechanic-a002 .mechanic-a002__intro { max-width: 80ch; }
.mechanic-a002 h2 { margin: 8px 0; font-size: var(--fs-h2, 30px); }
.mechanic-a002 h3 { margin: 0 0 8px; font-size: var(--fs-h3, 24px); }
.mechanic-a002 p { margin: 0 0 12px; }
.mechanic-a002 .mechanic-a002__label {
  display: block;
  font: 400 11px/1.5 var(--font-mono, "DM Mono", monospace);
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--ink-soft, #5C6555);
}
.mechanic-a002 #mechanic-a002-disclaimer { margin: 0; font-size: 13.5px; line-height: 1.5; }
.mechanic-a002 .mechanic-a002__figure { margin: 16px 0 0; }
.mechanic-a002 .mechanic-a002__help { margin-bottom: 8px; font-size: 12px; color: var(--ink-soft, #5C6555); }
.mechanic-a002 .mechanic-a002__diagram { position: relative; isolation: isolate; }
.mechanic-a002 .mechanic-a002__stages {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: minmax(var(--row), auto);
  align-items: stretch;
  gap: var(--mechanic-gap);
  list-style: none;
  margin: 0;
  padding: 0;
}
.mechanic-a002 .mechanic-a002__node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border-block: 1px solid var(--hairline, #DFE7D4);
  background: var(--glass, rgba(255, 255, 255, .86));
  overflow-wrap: anywhere;
}
.mechanic-a002 .mechanic-a002__node p { margin: auto 0 0; padding-top: 8px; font-size: 15px; line-height: 1.5; color: var(--ink-soft, #5C6555); }
.mechanic-a002 .mechanic-a002__select {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  min-height: max(var(--touch, 44px), 44px);
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--forest, #18280E);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.mechanic-a002 .mechanic-a002__select .pg,
.mechanic-a002 .mechanic-a002__receipt > .pg,
.mechanic-a002 .mechanic-a002__wait > .pg {
  margin: 4px 0;
  color: var(--forest, #18280E);
}
.mechanic-a002.is-paused .pg--live {
  --pg-play: paused;
}
.mechanic-a002 .mechanic-a002__select:disabled { opacity: 1; cursor: default; }
.mechanic-a002 .mechanic-a002__select:focus-visible { outline: 2px solid var(--forest, #18280E); outline-offset: 4px; }
.mechanic-a002 .mechanic-a002__select[aria-current="step"] > span:last-child {
  text-decoration: underline;
  text-decoration-color: var(--lime, #B2EB76);
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}
.mechanic-a002 .mechanic-a002__outcomes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: var(--mechanic-gap);
  margin-top: 64px;
}
.mechanic-a002 .mechanic-a002__receipt,
.mechanic-a002 .mechanic-a002__wait { position: relative; min-width: 0; margin: 0; padding: 24px; overflow-wrap: anywhere; }
.mechanic-a002 .mechanic-a002__receipt { isolation: isolate; grid-column: 2; grid-row: 1; }
.mechanic-a002 .mechanic-a002__receipt::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--paper, #FFFFFF);
  border: 1px solid var(--hairline, #DFE7D4);
  clip-path: polygon(0 0, calc(100% - var(--notch, 14px)) 0, 100% var(--notch, 14px), 100% 100%, 0 100%);
}
.mechanic-a002 .mechanic-a002__receipt-fields {
  padding-block: 16px;
  margin: 16px 0;
  border-block: 1px dashed var(--ink-soft, #5C6555);
  font: 400 12px/1.6 var(--font-mono, "DM Mono", monospace);
  font-variant-numeric: tabular-nums;
}
.mechanic-a002 .mechanic-a002__receipt-fields div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 16px; margin-bottom: 8px; }
.mechanic-a002 .mechanic-a002__receipt-fields div:last-child { margin-bottom: 0; }
.mechanic-a002 dt { color: var(--ink-soft, #5C6555); }
.mechanic-a002 dd { margin: 0; text-align: right; }
.mechanic-a002 .mechanic-a002__wait { grid-column: 1; grid-row: 1; border-top: 1px solid var(--hairline, #DFE7D4); }
.mechanic-a002 .mechanic-a002__outcomes p { font-size: 13.5px; line-height: 1.6; }
.mechanic-a002 .mechanic-a002__outcomes .mechanic-a002__label { font-size: 11px; }
.mechanic-a002 .mechanic-a002__outcomes a { text-decoration: underline; text-underline-offset: 3px; }
.mechanic-a002 .mechanic-a002__beams {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: -1;
}
.mechanic-a002.has-beams .mechanic-a002__beams { display: block; }
.mechanic-a002 .mechanic-a002__node + .mechanic-a002__node::after {
  content: "";
  position: absolute;
  width: var(--mechanic-gap);
  height: 1px;
  left: calc(-1 * var(--mechanic-gap));
  top: 50%;
  background: var(--hairline, #DFE7D4);
  pointer-events: none;
}
.mechanic-a002.has-beams .mechanic-a002__node + .mechanic-a002__node::after { display: none; }
.mechanic-a002 .mechanic-a002__track,
.mechanic-a002 .mechanic-a002__highlight { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.mechanic-a002 .mechanic-a002__track { stroke: var(--hairline, #DFE7D4); }
.mechanic-a002 .mechanic-a002__track--branch { stroke-dasharray: 4 6; }
.mechanic-a002 .mechanic-a002__highlight { stroke: var(--lime, #B2EB76); stroke-dasharray: 18 182; stroke-dashoffset: 18; opacity: 0; }
.mechanic-a002 .mechanic-a002__highlight.is-traced { opacity: 1; stroke-dasharray: none; stroke-dashoffset: 0; }
.mechanic-a002 .mechanic-a002__highlight.is-replaying { animation: mechanic-a002-trace var(--fx-reveal, 600ms) var(--ease, cubic-bezier(.22, 1, .36, 1)) 1 both; }
.mechanic-a002.is-paused .mechanic-a002__highlight.is-replaying { animation-play-state: paused; }
@keyframes mechanic-a002-trace {
  0% { stroke-dashoffset: 18; opacity: 0; }
  1%, 99% { opacity: 1; }
  100% { stroke-dashoffset: -100; opacity: 0; }
}
.mechanic-a002 figcaption { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--hairline, #DFE7D4); font-size: 13.5px; line-height: 1.6; color: var(--ink-soft, #5C6555); }
.mechanic-a002 .mechanic-a002__status { margin: 16px 0; font-size: 12px; line-height: 1.5; }
.mechanic-a002 .mechanic-a002__detail {
  margin: 0;
  padding: 16px 24px;
  background: var(--band, #E9F3DE);
}
.mechanic-a002 .mechanic-a002__detail summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  min-height: 44px;
  font: 600 15px/1.4 var(--font-body, "Manrope", sans-serif);
  color: var(--forest, #18280E);
}
.mechanic-a002 .mechanic-a002__detail summary::-webkit-details-marker { display: none; }
.mechanic-a002 .mechanic-a002__detail[open] summary { margin-bottom: 12px; }
.mechanic-a002 .mechanic-a002__detail h3 {
  font: 600 15px/1.4 var(--font-body, "Manrope", sans-serif);
  letter-spacing: 0;
  margin: 16px 0 8px;
}
.mechanic-a002 .mechanic-a002__detail h3:first-child { margin-top: 0; }
.mechanic-a002 .mechanic-a002__detail p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-soft, #5C6555);
  margin: 0 0 12px;
}
.mechanic-a002 .mechanic-a002__detail p:last-child { margin-bottom: 0; }
@media (max-width: 1024px) {
  .mechanic-a002 { --mechanic-gap: 24px; }
  .mechanic-a002 .mechanic-a002__detail { padding: 16px; }
}
@media (max-width: 768px) {
  .mechanic-a002 { --row: 144px; padding-block: 16px 32px; }
  .mechanic-a002 .mechanic-a002__diagram { padding-inline: 16px; }
  .mechanic-a002 .mechanic-a002__stages,
  .mechanic-a002 .mechanic-a002__outcomes { grid-template-columns: minmax(0, 1fr); }
  .mechanic-a002 .mechanic-a002__stages { grid-auto-rows: minmax(var(--row), auto); }
  .mechanic-a002 .mechanic-a002__outcomes { margin-top: 32px; gap: 32px; }
  .mechanic-a002 .mechanic-a002__receipt,
  .mechanic-a002 .mechanic-a002__wait { padding: 16px; grid-column: auto; grid-row: auto; }
  .mechanic-a002 .mechanic-a002__node + .mechanic-a002__node::after { width: 1px; height: var(--mechanic-gap); left: 50%; top: calc(-1 * var(--mechanic-gap) - 1px); }
}
@media (prefers-reduced-motion: reduce) {
  .mechanic-a002 .mechanic-a002__highlight,
  .mechanic-a002 .mechanic-a002__highlight.is-replaying { animation: none; opacity: 1; stroke-dasharray: none; stroke-dashoffset: 0; }
}
