.reroute-main {
 --reroute-old: #7b5378;
 --reroute-old-ink: #684364;
 --reroute-old-fill: #f2e5f1;
 --reroute-next: #a42467;
 --reroute-unassigned: #896482;
 --reroute-slip-bg: #fff9fc;
 --reroute-key-line: #dcc7da;
}
:root[data-theme=dark] .reroute-main {
 --reroute-old: #cba2c4;
 --reroute-old-ink: #eac1e4;
 --reroute-old-fill: #3d2b3d;
 --reroute-next: #ffa3d2;
 --reroute-unassigned: #ae83a4;
 --reroute-slip-bg: #342335;
 --reroute-key-line: #654a62;
}
.reroute-intro h1 span { color: var(--home-accent); }
.reroute-workbench { grid-template-columns: minmax(0, 1.28fr) minmax(0, 1fr); }
.reroute-scene { min-height: 350px; justify-content: space-between; padding: 15px 19px 13px; }
.reroute-scene svg { max-height: 273px; margin: 2px 0; }
.reroute-map-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 5px 12px; }
.reroute-map-head strong { color: var(--home-accent); font-size: 14px; letter-spacing: -.015em; }
.reroute-scene figcaption.reroute-map-key { border-top: 1px solid var(--reroute-key-line); padding: 8px 0 0; gap: 4px 12px; }
.reroute-map-key > span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.reroute-map-key i { width: 11px; height: 3px; background: var(--reroute-old); }
.reroute-map-key .reroute-key-new { background: transparent; border-top: 3px dashed var(--reroute-unassigned); }
.reroute-scene[data-dispatched=true] .reroute-key-new { background: var(--reroute-next); border: 0; }
.reroute-scene[data-new-receipt=true] .reroute-key-new { background: var(--mission-green); }
.reroute-track, .reroute-track-shadow { fill: none; stroke-width: 6; }
.reroute-track-shadow { stroke: var(--reroute-key-line); stroke-width: 12; }
.reroute-track-start, .reroute-track-old { stroke: var(--reroute-old); }
.reroute-track-old { stroke-dasharray: 10 6; }
.reroute-scene[data-target="07"] .reroute-track-start, .reroute-scene[data-target="07"] .reroute-track-old { stroke: var(--reroute-next); }
.reroute-scene[data-old-receipt=true] .reroute-track-old { stroke-dasharray: none; }
.reroute-track-new { stroke: var(--reroute-unassigned); stroke-dasharray: 3 9; }
.reroute-scene[data-dispatched=true] .reroute-track-new { stroke: var(--reroute-next); stroke-dasharray: 12 6; }
.reroute-scene[data-new-receipt=true] .reroute-track-new { stroke: var(--mission-green); stroke-dasharray: none; }
.reroute-junction { fill: var(--reroute-old); stroke: var(--mission-stage); stroke-width: 2; }
.reroute-target-halo { fill: none; stroke: var(--reroute-next); stroke-width: 3; visibility: hidden; }
.reroute-scene[data-target="07"] .reroute-station-old .reroute-target-halo,
.reroute-scene[data-target="08"] .reroute-station-new .reroute-target-halo { visibility: visible; }
.reroute-station-number { fill: var(--home-ink); font: 21px Silkscreen, monospace; text-anchor: middle; }
:root[data-theme=dark] .reroute-station-number { fill: #fff3fb; }
.reroute-slip { visibility: hidden; fill: var(--reroute-slip-bg); stroke: var(--reroute-old-ink); stroke-width: 2.5; }
.reroute-slip-new { stroke: var(--mission-green); }
.reroute-scene[data-old-receipt=true] .reroute-slip-old,
.reroute-scene[data-new-receipt=true] .reroute-slip-new { visibility: visible; }

.reroute-console { padding: 19px 20px; }
.reroute-console h2 { font-size: clamp(20px, 2.2vw, 24px); line-height: 1.25; letter-spacing: -.035em; }
.reroute-console h2[data-outcome=misattributed], .reroute-console h2[data-outcome=unverified] { color: var(--mission-amber); }
.reroute-console h2[data-outcome=verified] { color: var(--mission-green); }
.reroute-transcript { display: grid; gap: 3px; margin-top: 11px; border-left: 3px solid var(--home-accent); padding: 6px 11px; background: var(--home-bg); }
.reroute-transcript-label, .reroute-evidence dt { color: var(--home-muted); font-size: 12px; line-height: 1.4; }
.reroute-transcript-label { display: flex; align-items: center; gap: 7px; }
.reroute-transcript-label img { display: block; width: 24px; height: 24px; object-fit: cover; border-radius: 5px; }
.reroute-transcript p { font-size: 16px; font-weight: 680; line-height: 1.4; }
.reroute-evidence { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 12px 0 10px; }
.reroute-evidence > div { min-width: 0; border: 1px solid var(--home-line); border-radius: 8px; padding: 7px 9px; }
.reroute-evidence dd { margin: 4px 0 0; font-size: 13px; line-height: 1.35; font-weight: 680; overflow-wrap: anywhere; }
.reroute-evidence dd[data-tone=old] { color: var(--reroute-old-ink); }
.reroute-evidence dd[data-tone=success] { color: var(--mission-green); }
.reroute-evidence > div:has(dd[data-tone=old]) { background: var(--reroute-old-fill); border-color: var(--reroute-key-line); }
.reroute-evidence > div:has(dd[data-tone=success]) { background: var(--mission-green-fill); border-color: var(--mission-green); }
.reroute-feedback { margin-bottom: 10px; min-height: 0; font-size: 14px; }
.reroute-response { margin: 0 0 10px; padding: 8px 10px; border: 1px solid var(--reroute-key-line); border-inline-start: 3px solid var(--reroute-old); border-radius: 7px; background: var(--reroute-old-fill); }
.reroute-response span { color: var(--reroute-old-ink); font-size: 12px; font-weight: 650; }
.reroute-response p { margin: 3px 0 0; color: var(--home-ink); font-size: 14px; font-weight: 650; line-height: 1.55; }
#reroute-status { scroll-margin-top: 12px; }
.reroute-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.reroute-actions > button { flex: 1 1 115px; min-width: 0; }
.reroute-share:not([hidden]) { margin-top: 10px; }
.reroute-next-level { display: inline-flex; align-items: center; justify-content: center; margin-bottom: 8px; text-align: center; }
.reroute-share .mission-share-actions { gap: 7px; }
.reroute-share .mission-share-status:empty { display: none; }
.reroute-replay > p { color: var(--home-muted); font-size: 13px; margin: 0 0 6px; font-variant-numeric: tabular-nums; }
.reroute-export-record { margin-top: 10px; }
.reroute-export-record label { font-size: 13px; font-weight: 650; }
.reroute-export-record textarea { display: block; width: 100%; margin: 6px 0 8px; padding: 8px; border: 1px solid var(--home-line); border-radius: 8px; background: var(--home-bg); color: var(--home-ink); font: 13px ui-monospace, monospace; resize: vertical; }
.reroute-export-record textarea:focus-visible, .reroute-console button:focus-visible, .reroute-next-level:focus-visible { outline: 2px solid var(--home-accent); outline-offset: 2px; }

.reroute-review { margin-top: 27px; }
.reroute-review-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--home-line); padding-bottom: 8px; }
.reroute-review h2 { font-size: clamp(19px, 2.5vw, 25px); letter-spacing: -.035em; }
.reroute-timeline { counter-reset: route-step -1; margin: 0; }
.reroute-timeline li { counter-increment: route-step; justify-content: flex-start; gap: 8px; padding: 8px 4px; }
.reroute-timeline li::before { content: counter(route-step, decimal-leading-zero); color: var(--home-muted); font: 11px Silkscreen, monospace; flex: 0 0 23px; }
.reroute-timeline li[aria-current=step] { color: var(--home-accent); font-weight: 700; }

@media (max-width: 760px) {
 .reroute-main { padding-top: 20px; }
 .reroute-intro h1 { font-size: clamp(29px, 7.4vw, 49px); }
 .reroute-intro > p:last-child { line-height: 1.5; }
 .reroute-workbench { grid-template-columns: minmax(0, 1fr); }
 .reroute-scene { min-height: 0; padding: 9px 12px 8px; }
 .reroute-scene svg { max-height: 174px; margin: 0; }
 .reroute-scene figcaption.reroute-map-key { padding-top: 5px; }
 .reroute-console { padding: 12px 13px; }
 .reroute-transcript { margin-top: 8px; }
 .reroute-evidence { margin: 8px 0; }
 .reroute-evidence > div { padding: 6px 7px; }
 .reroute-review { margin-top: 20px; }
}
@media (max-height: 520px) and (min-width: 600px) {
 .reroute-workbench { grid-template-columns: repeat(2, minmax(0, 1fr)); }
 .reroute-scene { min-height: 0; }
 .reroute-scene svg { max-height: 166px; }
 .reroute-console { padding: 12px; }
}
@media (forced-colors: active) {
 .reroute-track-start, .reroute-track-old, .reroute-track-new, .reroute-target-halo { stroke: CanvasText; }
 .reroute-station-number { fill: CanvasText; }
}
