/* Plugbase article: Winter range for every EV on sale in the UK. Builds on guide-home-charging.css + guide-range.css. */
.pbwr-answer { font-size: 17px; line-height: 1.6; margin: 0 0 4px !important; }
.pbwr-facts { margin-top: 18px; }

/* Bar chart: top models */
.pbwr-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--pbx-muted); margin: 16px 0 10px; }
.pbwr-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.pbwr-legend .is-w::before { background: #D5DEE3; }
.pbwr-legend .is-c::before { background: var(--pbx-primary); }
.pbwr-legend .is-m::before { background: #10202B; }
.pbwr-bars { list-style: none; margin: 0 !important; padding: 0 !important; display: flex; flex-direction: column; gap: 10px; }
.pbwr-bars li { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr) 8.5rem; gap: 12px; align-items: center; margin: 0 !important; }
.pbwr-bars__name { font-size: 14px; font-weight: 700; color: var(--pbx-ink); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbwr-bars__name:hover { color: var(--pbx-primary); }
.pbwr-bars__n { display: inline-block; min-width: 1.6em; color: var(--pbx-muted); font-weight: 800; }
.pbwr-bars__track { position: relative; height: 18px; }
.pbwr-bars__track span { position: absolute; left: 0; border-radius: 999px; }
.pbwr-bars__w { top: 0; bottom: 0; background: #D5DEE3; }
.pbwr-bars__c { top: 3px; bottom: 3px; background: var(--pbx-primary); }
.pbwr-bars__m { top: 6px; bottom: 6px; background: #10202B; }
.pbwr-bars__val { font-size: 13px; color: var(--pbx-muted); white-space: nowrap; text-align: right; }
.pbwr-bars__val b { color: var(--pbx-primary); font-size: 15px; }

/* Histogram */
.pbwr-figure { margin: 18px 0 20px; padding: 20px; border: 1px solid var(--pbx-line); border-radius: 18px; }
.pbwr-hist { width: 100%; height: auto; display: block; }
.pbwr-hist rect { fill: var(--pbx-primary); }
.pbwr-hist text { font-family: inherit; text-anchor: middle; }
.pbwr-hist__v { font-size: 13px; font-weight: 800; fill: #10202B; }
.pbwr-hist__l { font-size: 12px; fill: #5B6B75; }
.pbwr-figure figcaption { font-size: 13px; color: var(--pbx-muted); margin-top: 8px; }

/* Table */
.pbwr-controls { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 14px; margin-top: 14px; }
.pbwr-controls input.pbh-select { width: 100%; }
.pbwr-count { font-size: 13px; color: var(--pbx-muted); margin: 10px 0 0 !important; }
.pbwr-table { min-width: 680px; }
.pbwr-table thead th button { all: unset; cursor: pointer; }
.pbwr-table thead th[data-sort] button::after { content: " ↕"; opacity: .45; }
.pbwr-table thead th[aria-sort="descending"] button::after { content: " ↓"; opacity: 1; }
.pbwr-table thead th[aria-sort="ascending"] button::after { content: " ↑"; opacity: 1; }
.pbwr-table thead th button:focus-visible { outline: 2px solid var(--pbx-primary); outline-offset: 2px; }
.pbwr-table tbody th a { color: var(--pbx-ink); text-decoration: none; }
.pbwr-table tbody th a:hover { color: var(--pbx-primary); text-decoration: underline; }
.pbwr-table td b { color: var(--pbx-primary); }
.pbwr.is-js .pbwr-table tr.is-more:not(.is-shown), .pbwr-table tr.is-hidden { display: none; }
.pbwr-more { margin: 14px 0 0 !important; }
.pbwr:not(.is-js) .pbwr-more { display: none; }
a.pbwr-link { text-decoration: none; color: inherit; transition: border-color .15s; }
a.pbwr-link:hover h3 { color: var(--pbx-primary); }

@media (max-width: 760px) {
	.pbwr-bars li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
	.pbwr-bars__track { grid-column: 1 / -1; grid-row: 2; }
	.pbwr-controls { grid-template-columns: 1fr; }
	.pbwr-answer { font-size: 16px; }
	.pbwr-figure { padding: 12px; }
}
