.incident-review { display: grid; gap: 14px; }
.safe-text-paths { display: grid; grid-template-columns: minmax(9rem, .9fr) minmax(0, 4fr); align-items: center; }
.safe-text-source, .safe-text-result { display: grid; justify-items: center; gap: .3rem; text-align: center; }
.safe-text-source img, .safe-text-result img { width: 5.25rem; height: auto; }
.safe-text-source { margin-right: .1rem; }
.safe-text-lane { display: grid; grid-template-columns: minmax(4.6rem, .75fr) minmax(0, 1.55fr) minmax(4.6rem, .85fr) minmax(0, 1.3fr); align-items: center; gap: .45rem; padding: .65rem .1rem; }
.safe-text-lane + .safe-text-lane { border-top: 1px dashed var(--line, #cdbb9a); }
.safe-text-lane .incident-arrow { font-size: .93em; }
.safe-text-token, .safe-text-page code, .safe-text-command { display: inline-block; padding: .14rem .55rem; border-radius: .3rem; max-width: 100%; overflow-wrap: anywhere; }
.safe-text-token { background: #ffefaa; color: var(--ink); font-weight: 700; }
.safe-text-page { display: grid; justify-items: center; gap: .3rem; padding: .65rem .45rem; border: 2px solid var(--ink); border-radius: .65rem; background: #f8f5e9; text-align: center; }
.safe-text-page code, .safe-text-command { background: #cce8e4; color: var(--ink); font-weight: 700; }
.safe-text-command { overflow-wrap: normal; word-break: keep-all; }
.safe-text-search .safe-text-page { border-style: dashed; }
.safe-text-review .incident-key { margin-top: .7rem; }
@media (min-width: 44.01rem) {
  .safe-text-paths.is-branched .safe-text-lanes { position: relative; margin-left: .8rem; }
  .safe-text-paths.is-branched .safe-text-lanes::before { content: ""; position: absolute; inset: 25% auto 25% -.8rem; width: .86rem; border: solid var(--teal, #005752); border-width: 3px 0 3px 3px; border-radius: .65rem 0 0 .65rem; }
  .safe-text-paths.is-branched .safe-text-lanes::after { content: ""; position: absolute; inset: 50% auto auto -1.65rem; width: .95rem; border-top: 3px solid var(--teal, #005752); }
}
@media (max-width: 44rem) {
  .safe-text-paths { grid-template-columns: 1fr; gap: .55rem; }
  .safe-text-lane { grid-template-columns: 1fr; gap: .3rem; }
  .safe-text-lane .incident-arrow i { transform: rotate(90deg); width: 1.5rem; }
}
.incident-scene { margin: 0; padding-block-end: 9px; border-block-end: 1px solid var(--line); }
.incident-route, .incident-lane, .incident-merge { display: grid; gap: 12px; align-items: center; }
.incident-route { grid-template-columns: minmax(0, 1fr) 6rem minmax(0, 1fr) 6rem minmax(0, 1fr); align-items: start; }
.incident-route > .incident-arrow { margin-block-start: 58px; }
.incident-lanes, .incident-inputs { display: grid; gap: 8px; }
.incident-lane { grid-template-columns: minmax(0, 1fr) 8rem minmax(0, 1.15fr); padding: 7px 12px; background: var(--paper); }
.incident-lane + .incident-lane { border-block-start: 2px solid var(--line); }
.incident-lane .incident-station, .incident-inputs .incident-station { text-align: start; grid-template-columns: 70px minmax(0, 1fr); column-gap: 9px; }
.incident-lane .incident-station > :first-child, .incident-inputs .incident-station > :first-child { grid-column: 1; grid-row: 1 / span 3; }
.incident-lane .incident-station > :not(:first-child), .incident-inputs .incident-station > :not(:first-child) { grid-column: 2; }
.incident-lane-links { display: grid; gap: 6px; }
.incident-lane-links:has([data-diagram-arrow="left"], .incident-no-passage) i { width: 100%; }
.incident-lane-links .incident-no-passage { justify-content: center; color: var(--ink); }
.incident-lane-links .incident-no-passage::before { content: "×"; font-style: normal; font-weight: 700; line-height: 1; }
.incident-lane-links .incident-no-passage::after { flex: none; width: 60%; margin-inline-end: 7px; background: none; border-top: 2px dashed currentColor; }
.incident-merge { grid-template-columns: minmax(0, 1.1fr) 8rem minmax(0, 1fr); }
.incident-inputs { padding: 7px 12px; border-inline-end: 3px solid var(--green); border-block: 2px solid var(--green); border-radius: 0 9px 9px 0; }
.incident-join { margin-inline-start: -12px; }
.incident-inputs .incident-station + .incident-station { border-block-start: 1px solid var(--line); padding-block-start: 6px; }
.incident-station { display: grid; justify-items: center; gap: 3px; text-align: center; align-items: center; color: var(--ink); }
.incident-lane .incident-station, .incident-inputs .incident-station { justify-items: start; }
.incident-station img { width: min(95px, 100%); height: auto; }
.incident-station small { color: var(--green); font-weight: 700; }
.incident-station b { text-wrap: balance; }
.incident-station > span:not(.ip-question-art), .incident-arrow > span { text-wrap: pretty; }
.incident-arrow { display: grid; justify-items: center; gap: 5px; color: var(--green); font-weight: 700; text-align: center; font-size: .88rem; }
.incident-arrow i { display: flex; align-items: center; justify-content: end; width: min(66px, 100%); font-size: 1.35rem; }
.incident-arrow i::after { content: ""; order: -1; flex: 1; height: 3px; margin-inline-end: -4px; border-radius: 8px; background: currentColor; }
.incident-arrow i[data-diagram-arrow="left"]::after { order: 1; margin-inline: -4px 0; }
.incident-join i { width: 100%; }
.incident-fork { display: grid; grid-template-columns: minmax(8rem, .75fr) minmax(0, 2fr); align-items: center; }
.incident-branches { position: relative; display: grid; padding-inline-start: 15px; }
.incident-branches::after { content: ""; position: absolute; inset: 50% auto auto -20px; width: 20px; border-top: 3px solid var(--green); }
.incident-branch { position: relative; display: grid; grid-template-columns: minmax(7.5rem, .8fr) minmax(0, 1.2fr); gap: 10px; align-items: center; padding: 6px 8px 6px 0; }
.incident-branch::before { content: ""; position: absolute; inset: calc(50% - 1.5px) auto 0 -15px; width: 15px; border: 3px solid var(--green); border-inline-end: 0; border-block-end: 0; border-start-start-radius: 8px; }
.incident-branch + .incident-branch::before { inset-block: 0 calc(50% - 1.5px); border-block-start: 0; border-block-end: 3px solid var(--green); border-radius: 0 0 0 8px; }
.incident-branch .incident-arrow { position: relative; display: flex; align-items: center; min-height: 44px; }
.incident-branch .incident-arrow > span { position: absolute; inset: auto 0 calc(50% + 7px); }
.incident-branch .incident-station { grid-template-columns: 62px minmax(0, 1fr); justify-items: start; text-align: start; column-gap: 9px; min-height: 72px; }
.incident-branch .incident-station img { grid-column: 1; grid-row: 1 / span 3; }
.incident-branch .incident-station > :not(img) { grid-column: 2; }
.incident-branch .incident-arrow i { width: 100%; }
.incident-branch + .incident-branch { border-block-start: 1px dashed var(--line); }
.incident-key { margin: 0; padding: 8px 10px; border-inline-start: 4px solid var(--green); background: var(--mint); }
@media (max-width: 640px) {
  .incident-route, .incident-lane, .incident-merge { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .incident-route .incident-station, .incident-merge > .incident-station { padding-block: 6px; }
  .incident-route > .incident-arrow { margin-block-start: 0; }
  .incident-inputs { border-inline-end: 0; border-radius: 0; }
  .incident-join { margin-inline-start: 0; }
  .incident-arrow i { width: 26px; rotate: 90deg; }
  .incident-lane-links:has([data-diagram-arrow="left"], .incident-no-passage) i { width: 26px; }
  .incident-fork { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .incident-branches { padding-inline-start: 8px; }
  .incident-branches::after { display: none; }
  .incident-branch { grid-template-columns: minmax(0, 1fr); }
  .incident-branch::before, .incident-branch + .incident-branch::before { inset: 0 auto 0 -7px; width: 0; border-block: 0; border-radius: 0; }
  .incident-branch .incident-arrow { display: grid; }
  .incident-branch .incident-arrow > span { position: static; }
  .incident-branch .incident-arrow i { width: 26px; }
}
