.monthly-difference { grid-column: 1 / -1; min-width: 0; }
.difference-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.difference-heading h3 { font-size: 1rem; line-height: 1.4; }
.difference-heading p { margin: 5px 0 0; color: var(--muted); font-size: .8rem; }
.difference-heading label { display: grid; gap: 4px; font-size: .75rem; color: var(--muted); flex-shrink: 0; }
.difference-heading select { border: 1px solid var(--line); border-radius: 5px; padding: 8px 5px; background: white; color: var(--ink); min-height: 40px; }
.difference-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 16px 0 6px; font-size: .73rem; color: var(--muted); }
.difference-legend span { display: inline-flex; align-items: center; gap: 5px; }
.difference-legend i { width: 11px; height: 11px; background: #8496a8; border-radius: 2px; }
.difference-legend span:last-child i { background: #0f766e; }
.difference-series { padding: 16px 0; border-bottom: 1px solid var(--line); }
.difference-series-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.difference-series h4 { margin: 0; font-size: .95rem; }
.difference-change { display: grid; gap: 4px; text-align: right; min-width: 0; }
.difference-change strong { font-size: .95rem; overflow-wrap: anywhere; }
.difference-change span { font-size: .75rem; }
.difference-change.favorable { color: #166534; }
.difference-change.unfavorable { color: #b91c1c; }
.difference-change.neutral { color: var(--muted); }
.difference-bar-row { margin-top: 14px; }
.difference-bar-label { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: .78rem; margin-bottom: 6px; }
.difference-bar-label span { color: var(--muted); }
.difference-bar-label strong { font-weight: 650; overflow-wrap: anywhere; }
.difference-bar-track { height: 14px; background: #eef2f1; border-radius: 3px; overflow: hidden; }
.difference-bar { height: 100%; background: #8496a8; }
.difference-bar.current { background: #0f766e; }
.difference-note { font-size: .76rem; line-height: 1.5; color: var(--muted); margin: 12px 0 0; }
.difference-ranking-heading h4 { margin: 20px 0 12px; font-size: .95rem; }
.difference-totals { margin-top: 16px; }
.difference-totals > summary { color: var(--blue); font-size: .82rem; cursor: pointer; padding: 6px 0; }
.difference-ranking-filters { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.difference-ranking-filters label { display: grid; gap: 5px; font-size: .75rem; color: var(--muted); min-width: 0; }
.difference-ranking-filters select { min-width: 0; width: 100%; padding: 8px 5px; min-height: 42px; border: 1px solid var(--line); border-radius: 5px; background: white; }
.difference-ranking-row { padding: 16px 0; border-bottom: 1px solid var(--line); }
.difference-ranking-title { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.difference-ranking-title > strong { font-size: .83rem; overflow-wrap: anywhere; min-width: 0; }
.difference-ranking-title > span { flex-shrink: 0; text-align: right; font-size: .85rem; font-weight: 650; }
.difference-ranking-title small { display: block; margin-top: 4px; font-size: .72rem; font-weight: 400; }
.difference-ranking-values { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 10px; font-size: .72rem; color: var(--muted); margin-top: 7px; }
.difference-ranking .favorable { color: #166534; }
.difference-ranking .unfavorable { color: #b91c1c; }
.difference-bar.ranking-good { background: #16846a; }
.difference-bar.ranking-bad { background: #c23b32; }
