.anomaly-figure { padding: 1.1rem; }
.anomaly-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .8rem 0; }
.anomaly-controls button { font: inherit; color: #234c40; border: 1px solid #a8b7a6; border-radius: .6rem; background: #fffdf7; padding: .5rem .8rem; cursor: pointer; line-height: 1.4; }
.anomaly-controls button[aria-pressed="true"] { color: #fffdf7; background: #245642; border-color: #245642; }
.anomaly-controls button:focus-visible { outline: 3px solid #ae741a; outline-offset: 3px; }
.anomaly-controls button:disabled { opacity: .5; cursor: default; }
.anomaly-svg { display: block; width: 100%; height: auto; max-width: 620px; margin: .7rem auto; font-family: Manrope, sans-serif; }
.anomaly-svg text { fill: #21483c; }
.anomaly-svg .branch { stroke: #bdc9bc; stroke-width: 2; }
.anomaly-svg .branch.active { stroke: #247456; stroke-width: 4; }
.anomaly-svg .node { fill: #fffdf7; stroke: #9eafa1; stroke-width: 1.5; }
.anomaly-svg .node.active { fill: #e5f0dd; stroke: #287456; stroke-width: 3; }
.anomaly-svg .node.leaf.active { fill: #faeac5; stroke: #a47123; }
.anomaly-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,185px),1fr)); gap: .8rem; margin: 1rem 0; }
.anomaly-card { border: 1px solid #c6d1c1; padding: 1rem; border-radius: .7rem; background: #fffdf7; min-width: 0; }
.anomaly-card strong,.anomaly-card small { display: block; }
.anomaly-card small { font-size: .9rem; color: #4c6054; line-height: 1.55; margin-top: .4rem; }
.anomaly-number { display: block; font-size: 1.55rem; font-weight: 800; line-height: 1.5; color: #285a44; }
.anomaly-result { padding: .9rem 1rem; border-left: 3px solid #3d815d; background: #eef3e7; line-height: 1.65; margin: 1rem 0; }
.anomaly-label { display: block; font-weight: 700; margin-top: .8rem; }
.anomaly-facts { display: grid; gap: .75rem; margin: 1rem 0; }
.anomaly-fact { border: 1px solid #c6d1c1; border-radius: .6rem; padding: .85rem; }
.anomaly-fact[data-selected="true"] { border-left: 5px solid #3d815d; background: #eef3e7; }
.anomaly-fact strong,.anomaly-fact small { display: block; }
.anomaly-fact small { font-size: .9rem; margin-top: .35rem; }
.anomaly-plot { display: block; width: 100%; height: auto; max-width: 720px; margin: .8rem auto; }
@media(max-width:480px) { .anomaly-figure { padding: .85rem; } .anomaly-controls button { padding: .5rem .65rem; } }
