:root {
  --pico-font-family: 'Fira Sans', system-ui, sans-serif;
  --pico-font-size: 17px;
  --green: #23754b; --orange: #b85d0d; --blue: #1769aa; --purple: #783ca6;
}
body { background: white; color: #293d32; }
main.container { max-width: 1200px; padding-block: 28px; }
h1 { margin-bottom: 8px; font-size: 1.7rem; }
header p, .setup p { color: #67746e; font-size: .9rem; }
.setup { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.setup p { margin: 0; }
.controls { margin: 22px 0 14px; }
.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.buttons button { width: auto; margin: 0; padding: 8px 16px; font-size: .85rem; }
#counter { margin-left: 8px; font-size: .96rem; color: #67746e; font-family: 'Fira Code', monospace; }
#message { min-height: 2.7em; margin: 24px 0 0; padding-left: 24px; font-size: 1.1rem; }
.legend { display: flex; flex-wrap: wrap; gap: 10px 20px; font-size: .75rem; margin-bottom: 16px; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }
.key, .ring-key { display: inline-block; width: 14px; height: 14px; border-radius: 50%; border: 2px solid; }
.key.final { background: #dcefe2; border-color: var(--green); }
.key.estimate { background: #fff0da; border-color: var(--orange); }
.key.neutral { background: #f1f3f4; border-color: #98a5aa; }
.ring-key { border-color: var(--blue); outline: 1px solid var(--blue); outline-offset: 2px; }
.line-key { width: 24px; border-top: 3px solid; }
.line-key.pending { border-color: var(--blue); border-top-style: dashed; }
.line-key.active { border-color: var(--purple); }
.stage { border: 1px solid #dce3e1; border-radius: 8px; overflow-x: auto; }
#graph { display: block; width: 100%; min-width: 740px; }
svg text { font-family: 'Fira Code', monospace; }
.edge-line { stroke: #c3cccf; stroke-width: 2; fill: none; }
.edge.final .edge-line { stroke: var(--green); stroke-width: 4; }
.edge.estimate .edge-line { stroke: var(--orange); stroke-width: 4; }
.edge .edge-line.pending-mark { stroke: var(--blue); stroke-width: 3; stroke-dasharray: 6 5; }
.edge .edge-line.active-mark { stroke: var(--purple); stroke-width: 4; }
.weight { font-size: 19.2px; fill: #52616a; text-anchor: middle; paint-order: stroke; stroke: white; stroke-width: 8; stroke-linejoin: round; }
.edge.final .weight { fill: var(--green); }
.edge.estimate .weight { fill: var(--orange); }
.node { cursor: pointer; outline: none; }
.node .face { fill: #f1f3f4; stroke: #98a5aa; stroke-width: 2; }
.node.final .face { fill: #dcefe2; stroke: var(--green); stroke-width: 3; }
.node.estimate .face { fill: #fff0da; stroke: var(--orange); stroke-width: 3; }
.node .distance { text-anchor: middle; dominant-baseline: central; font-size: 25.2px; fill: #293d32; }
.processing-ring { fill: none; stroke: var(--blue); stroke-width: 3; }
.node:focus-visible .face, .node:hover .face { stroke-width: 5; }
.source-label { font-family: 'Fira Sans', sans-serif; fill: #67746e; font-size: 13px; text-anchor: middle; }
.comparison rect { fill: white; stroke: #cdbadb; rx: 6; }
.comparison text { font-size: 18px; fill: #43235c; text-anchor: middle; }
.comparison .comparison-old, .comparison .comparison-base, .comparison .comparison-weight { font-weight: 700; }
.comparison .winner-box { fill: none; stroke: var(--green); stroke-width: 2; rx: 4; }
.comparison-value { font-weight: 700; }
#graph .comparison-old { fill: #c12b68; }
#graph .comparison-base { fill: var(--blue); }
#graph .comparison-weight { fill: var(--purple); }
@media (max-width: 640px) { main.container { padding-block: 18px; } .buttons button { padding-inline: 12px; } #counter { margin-left: 0; } }
