.crisis-graph { border: 1px solid #bfb5a7; background: #eae4d9; padding: 22px 26px 12px; }
.graph-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 15px; border-bottom: 1px solid #c5bbad; }
.graph-kicker { font: .62rem/1.5 var(--mono); color: #665a4d; }
.graph-controls { display: flex; flex-wrap: wrap; gap: 5px 12px; }
.graph-controls button { cursor: pointer; font: .72rem var(--mono); min-height: 44px; color: #7e171e; background: transparent; padding: 7px 6px; border: 0; text-decoration: underline; text-underline-offset: 4px; }
.graph-controls button[aria-disabled="true"] { opacity: .4; cursor: default; }
.graph-canvas { position: relative; display: grid; gap: 0; }
.graph-wires { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.graph-edge { fill: none; stroke: #bcb2a5; stroke-width: 1.5; }
.graph-edge.active { stroke: #bb2027; stroke-width: 2.5; }
.graph-node { z-index: 1; position: relative; }
.graph-source { justify-self: center; background: #211e1b; color: #fff8ee; padding: 13px 25px; text-align: center; margin-top: 18px; max-width: 100%; }
.graph-source > span { display: block; font: .57rem var(--mono); color: #f4b6a9; margin-bottom: 5px; }
.graph-source strong { display: block; font-size: 1rem; font-weight: 600; }
.graph-source small { display: block; color: #cbbfb0; font-size: .68rem; margin-top: 4px; }
.graph-role-row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 19px; margin-top: 45px; }
.graph-person { cursor: pointer; font: inherit; min-height: 110px; border: 1px solid #9c8f80; border-top: 3px solid #9c8f80; background: #fffcf7; padding: 16px 12px; display: grid; grid-template-columns: 30px 1fr; column-gap: 9px; align-content: center; text-align: left; color: #211e1b; border-radius: 2px; }
.graph-role-code { font: .7rem var(--mono); border: 1px solid #bbaa99; width: 29px; height: 29px; display: flex; align-items: center; justify-content: center; grid-row: span 2; }
.graph-person > strong { font-weight: 600; font-size: .91rem; overflow-wrap: anywhere; }
.graph-action { font-size: .73rem; color: #6c5c4c; line-height: 1.35; margin-top: 5px; }
.graph-person.is-sender { border-color: #bb2027; }
.graph-person.is-receiver { background: #bb2027; border-color: #bb2027; color: white; }
.graph-person.is-receiver .graph-action { color: #fff2e6; }
.graph-person.is-receiver .graph-role-code { border-color: #ed9d8e; }
.graph-person.is-selected { outline: 2px solid #211e1b; outline-offset: 3px; }
.graph-message { min-height: 66px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px; margin: 10px 0 0; padding: 8px 12px; text-align: center; color: #8c1c22; font-size: .95rem; font-weight: 600; background: #fffcf7; border-left: 3px solid #bb2027; }
.graph-message strong { color: #665a4d; font-size: .75em; }
.graph-decision { justify-self: center; text-align: center; border: 1px solid #aa9a88; background: #f4f1ea; margin-top: 36px; padding: 10px 18px; max-width: 100%; }
.graph-decision > span { display: block; font: .56rem var(--mono); color: #6c5c4c; }
.graph-decision > strong { display: block; font-size: .85rem; margin-top: 4px; font-weight: 600; }
.graph-outcomes { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 35px; }
.graph-outcome { cursor: pointer; color: #211e1b; background: #fffcf7; border: 1px solid #a99a88; border-top: 3px solid #7b8e72; border-radius: 2px; font: inherit; text-align: left; padding: 16px 20px 13px; min-height: 112px; }
.graph-outcome.risky { border-top-color: #bb2027; }
.branch-code { display: block; font: .59rem var(--mono); color: #615b50; margin-bottom: 8px; }
.graph-outcome strong { display: block; font-size: 1.02rem; font-weight: 600; line-height: 1.25; }
.graph-outcome small { display: block; color: #6c5c4c; font-size: .73rem; margin-top: 6px; }
.graph-picked { display: block; font: .6rem var(--mono); color: #256148; margin-top: 8px; visibility: hidden; }
.graph-outcome.is-picked { background: #eaf0e1; border-color: #446b42; }
.graph-outcome.is-picked .graph-picked { visibility: visible; }
.graph-outcome.risky.is-picked { background: #f5ded3; border-color: #bb2027; }
.graph-outcome.risky.is-picked .graph-picked { color: #982029; }
.graph-inspector { position: relative; z-index: 1; margin-top: 12px; border-left: 3px solid var(--accent); background: #fffcf7; padding: 12px 14px 0; scroll-margin-block: 12px; }
.graph-inspector p { margin: 0; font-size: .8rem; color: #5c5145; }
.graph-footnote { color: #6c5c4c; font-size: .64rem; margin-top: 11px; margin-bottom: 0; }
@media (max-width: 900px) { .graph-role-row { gap: 12px; } .graph-person { grid-template-columns: 1fr; gap: 6px; padding: 13px; } .graph-role-code { grid-row: auto; margin-bottom: 3px; } .graph-action { margin-top: 0; } }
@media (max-width: 620px) { .crisis-graph { padding: 15px 14px 12px; } .graph-toolbar { display: block; padding-bottom: 7px; } .graph-controls { margin-top: 4px; gap: 0 8px; } .graph-controls button { font-size: .65rem; } .graph-role-row { grid-template-columns: repeat(2,minmax(0,1fr)); row-gap: 30px; margin-top: 32px; } .graph-person { min-height: 110px; } .graph-person > strong { font-size: .85rem; } .graph-message { font-size: .85rem; } .graph-outcomes { gap: 10px; margin-top: 28px; } .graph-outcome { padding: 13px 11px 10px; } .graph-outcome strong { font-size: .88rem; } .graph-outcome small { font-size: .68rem; } .graph-outcome .branch-code { font-size: .54rem; } .graph-source { padding-inline: 15px; } .graph-source strong { font-size: .88rem; } .graph-decision > strong { font-size: .77rem; } }
@media (prefers-reduced-motion: reduce) { .graph-wires circle { display: none; } }

@media (max-width: 620px) {
  .graph-controls { justify-content: space-between; gap: 0; }
  .graph-controls button { padding-inline: 4px; }
  .graph-role-row { margin-top: 24px; row-gap: 18px; }
  .graph-person { min-height: 74px; padding: 10px; }
  .graph-role-code { display: none; }
}

.graph-role-link { color: var(--accent); display: inline-flex; align-items: center; min-height: 44px; font-size: .8rem; font-weight: 600; }
.graph-result-link:not([hidden]) { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; margin-top: 6px; color: var(--accent); font-size: .83rem; font-weight: 600; }

