.flow-viewer { margin-top: 96px; scroll-margin-top: 84px; color: #000; font-size: var(--body-text-size); line-height: 1.5; }
.flow-viewer [hidden] { display: none !important; }
.flow-viewer h3 { margin: 0 0 4px; font-size: clamp(28px,3vw,40px); letter-spacing: -.035em; line-height: 1.15; font-weight: 550; }
.flow-viewer p { margin: 0; }
.flow-viewer button { font: inherit; color: #000; }
.flow-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-bottom: 24px; }
.flow-explorer { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(28px,5vw,72px); align-items: center; }
.flow-images-column,.flow-architecture-column { min-width: 0; }
.flow-image-pair { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: clamp(12px,1.5vw,24px); align-items: end; }
.flow-level-controls { display: flex; gap: 4px; width: fit-content; border: 1px solid #d8d8d8; border-radius: 30px; padding: 3px; margin: 0; }
.flow-level-controls button { padding: 7px 20px; border: 1px solid transparent; border-radius: 24px; background: #fff; cursor: pointer; }
.flow-level-controls button[aria-pressed=true] { border-color: #000; background: #f6f6f6; }
.flow-level-controls button:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.flow-image { margin: 0; min-width: 0; }
.flow-image figcaption { margin-bottom: 8px; }
.flow-image canvas { display: block; width: 100%; aspect-ratio: 1; border-radius: 5px; touch-action: pan-y; }
.flow-image canvas:focus-visible { outline: 2px solid #000; outline-offset: 5px; }
.flow-pair-status { margin: 14px 0 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 18px; }
.flow-selection,.flow-summary { min-height: 27px; }
.flow-legend { display: flex; align-items: center; justify-content: center; gap: 12px 24px; flex-wrap: wrap; margin: 10px 0 12px; }
.flow-legend span { display: inline-flex; align-items: center; gap: 8px; }
.flow-key { width: 14px; height: 14px; border: 2px solid #e8a446; background: #f9ead4; display: inline-block; }
.flow-key.patch { background: #e6f0e5; border-color: #489750; }
#flow-help { text-align: left; }
.flow-level-state { text-align: center; }
.flow-images-column .flow-legend { justify-content: flex-start; }
.flow-nested { margin: 0 auto 8px; }
.flow-level-state { min-height: 27px; }
.flow-loading { padding: 22px 0; }
@media (max-width:820px) {
  .flow-explorer { grid-template-columns: 1fr; gap: 36px; }
  .flow-images-column, .flow-architecture-column { width: min(100%, 620px); margin-inline: auto; }
  .flow-nested .nh-scene { height: clamp(550px, 85svh, 680px); }
}
@media (max-width:600px) {
  .flow-viewer { margin-top: 64px; }
  .flow-pair-status { margin-top: 12px; }
  .flow-legend { justify-content: flex-start; margin-block: 18px 10px; }
  #flow-help { text-align: left; }
  .flow-nested { margin-top: 0; }
}
.flow-path-key { margin: 4px 0 8px; }
.flow-key.routing { background: #eff7fd; border-color: #a5d3f2; }
.flow-path-key .flow-key:not(.routing) { background: #fbefde; }
.flow-architecture-note { max-width: 540px; margin: 0 auto 3px !important; text-align: center; }
