/* The wholesale price pages (web/templates/price_hub.html, price_hubs.html; web/static/js/price_charts.js).
   Two chart hues, validated by the dataviz validator in light (on #eef1f5 and #fff) and dark (on #0e0f11 and
   #17181b): day-ahead is the brand's chart hue (`--chart-1`, docs/31-brand-identity.md §4), real-time a blue on
   the combustion family's hue, lifted onto the validator's lightness band. Each line is also labelled at its end
   and named in the legend, so color is never the only carrier. */
.price-page, .price-index { --price-da: #107656; --price-rt: #4a6fc4; --chart-ground: var(--bg); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.price-page, .price-index), :root:not([data-theme="light"]) .price-tip { --price-da: #34ad7e; --price-rt: #6890d6; }
}
:root[data-theme="dark"] :is(.price-page, .price-index), :root[data-theme="dark"] .price-tip { --price-da: #34ad7e; --price-rt: #6890d6; }
.price-tip { --price-da: #107656; --price-rt: #4a6fc4; }

/* The band: the trail, the name, one quiet line of kind, unit and date. */
.price-head .breadcrumbs { margin: 0 0 var(--space-2); font-size: var(--text-1); }
.price-head .breadcrumbs a { color: var(--text-muted); }
.price-head h1 { margin: 0; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.price-head__meta { margin: var(--space-2) 0 0; color: var(--text-muted); font-size: var(--text-2); }
.price-page .price-head { padding-block: var(--space-6) var(--space-5); margin-bottom: var(--space-5); }

/* The control row: the range on the left, the source tag, the (i) at the right. */
.price-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: 0 0 var(--space-5); }
.price-toolbar .ops-range { margin: 0; }
.price-toolbar .rc-tagline { margin: 0; }
.price-about { display: inline-flex; align-items: center; gap: 2px; margin: 0 0 0 auto; color: var(--text-muted); font-size: var(--text-1); }
.price-about .map-info { width: 1.75rem; height: 1.75rem; }
.price-about__line { display: block; margin: 0 0 var(--space-2); }

/* Cards: no box, a rule above (the ledger's quiet edge), the title and its window on one line. */
.price-card { margin: 0 0 var(--space-7); padding-top: var(--space-3); border-top: 1px solid var(--border); min-width: 0; }
.price-card__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: var(--space-1) var(--space-4); }
.price-card__title { margin: 0; font-size: var(--text-2); font-weight: 600; }
.price-card__window { color: var(--text-muted); font-size: var(--text-1); }

/* The legend is a small table that carries data: key, name, twelve-month average. */
.price-legend { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-7); margin: var(--space-3) 0 var(--space-3); padding: 0; list-style: none; }
.price-legend__item { display: grid; grid-template-columns: auto auto; grid-template-rows: auto auto; column-gap: var(--space-2); align-items: center; }
.price-legend__item .price-key { grid-row: 1; }
.price-legend__name { grid-row: 1; color: var(--text-muted); font-size: var(--text-1); }
.price-legend__value { grid-column: 1 / -1; font-size: 1.75rem; font-weight: 400; line-height: 1.2; font-variant-numeric: tabular-nums; }
.price-legend__unit { grid-column: 1 / -1; color: var(--text-muted); font-size: var(--text-1); }
.price-key { display: inline-block; width: 0.875rem; height: 3px; border-radius: 2px; background: var(--text-muted); }
.price-key--da, .chart-tip__key.price-key--da { background: var(--price-da); }
.price-key--rt, .chart-tip__key.price-key--rt { background: var(--price-rt); }

/* Plots */
.price-plot { position: relative; min-width: 0; }
.price-plot svg { display: block; overflow: visible; }
.price-plot--main { height: 18rem; }
.price-plot--mini { height: 9rem; margin-top: var(--space-2); }
.price-plot:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: 2px; }
.price-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.price-line--da { stroke: var(--price-da); }
.price-line--rt { stroke: var(--price-rt); stroke-width: 1.5; }
.price-bar--da, .price-bar--rt { fill: var(--price-da); }
.price-bar--rt { fill: var(--price-rt); }
.price-dot--da { fill: var(--price-da); }
.price-dot--rt { fill: var(--price-rt); }
.price-off--da { fill: var(--price-da); }
.price-off--rt { fill: var(--price-rt); }
.price-off-label { fill: var(--text-muted); font-size: 11px; font-family: var(--font-body); font-variant-numeric: tabular-nums; }
.price-end-label { fill: var(--text-muted); font-size: 12px; font-family: var(--font-body); }
.price-page .chart-hit { cursor: crosshair; touch-action: pan-y; }

/* The two small blocks: side by side from 720px, stacked on a phone. */
.price-minis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--space-8); }
@media (max-width: 719px) { .price-minis { grid-template-columns: minmax(0, 1fr); } }
.price-fig { margin: var(--space-2) 0 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); }
.price-fig__value { font-size: 1.5rem; line-height: 1.2; font-variant-numeric: tabular-nums; }
.price-fig__unit { color: var(--text-muted); font-size: var(--text-1); }

.price-table { margin: 0 0 var(--space-6); }
.price-table .record-table { max-width: 32rem; }
.price-credits { margin: var(--space-6) 0 var(--space-5); font-size: var(--text-1); color: var(--text-muted); }
.price-more { margin: var(--space-6) 0 var(--space-8); }
.price-more__title { margin: 0 0 var(--space-2); font-size: var(--text-1); font-weight: 600; color: var(--text-muted); }
.price-more__list { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-5); margin: 0; padding: 0; list-style: none; font-size: var(--text-1); }

/* The index: the strip (counts, the chart tags, the (i)), then one table. */
.price-strip { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin: 0 0 var(--space-3); }
.price-strip__count { margin: 0; font-weight: 600; }
.price-hubs th[scope="row"] { font-weight: 400; }
.price-hubs__kind { margin-left: var(--space-2); color: var(--text-muted); font-size: var(--text-1); }
.price-hubs__level { color: var(--text-muted); font-size: var(--text-1); }
.price-hubs__level--daily { color: var(--text); }
@media (max-width: 719px) {
  .record-table.price-hubs th[scope="row"] { display: block; padding: var(--space-1) var(--space-2) var(--space-2); border: none; }
  .record-table.price-hubs td.price-hubs__chart { display: none; }
}
.price-credits__all { margin-left: var(--space-3); }
.price-empty { color: var(--text-muted); }
.price-frame-empty { display: grid; place-items: center; min-height: 8rem; margin: 0; border-bottom: 1px solid var(--control); color: var(--text-muted); font-size: var(--text-1); }
.price-strip__unit { color: var(--text-muted); font-size: var(--text-1); }
.price-hubs th[scope="row"] { position: static; background: transparent; color: var(--text); font-size: var(--text-2); }

/* A state's page (web/templates/price_state.html). The three retail sectors: industrial takes the day-ahead hue
   (the brand's `--chart-1`), commercial the real-time blue, residential a third hue on the same lightness band.
   The dataviz validator's results for the three are in docs/29 §9.2; each line is also labelled at its end and
   named in the legend, so color is never the only carrier. Industrial is the heavier line: it is the one a
   large load reads. */
.price-state, .price-tip { --price-res: #a8508f; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) :is(.price-state, .price-tip) { --price-res: #c26aa8; }
}
:root[data-theme="dark"] :is(.price-state, .price-tip) { --price-res: #c26aa8; }
.price-key--industrial, .chart-tip__key.price-key--industrial { background: var(--price-da); }
.price-key--commercial, .chart-tip__key.price-key--commercial { background: var(--price-rt); }
.price-key--residential, .chart-tip__key.price-key--residential { background: var(--price-res); }
.price-line--industrial { stroke: var(--price-da); }
.price-line--commercial { stroke: var(--price-rt); stroke-width: 1.5; }
.price-line--residential { stroke: var(--price-res); stroke-width: 1.5; }
.price-dot--industrial { fill: var(--price-da); }
.price-dot--commercial { fill: var(--price-rt); }
.price-dot--residential { fill: var(--price-res); }
.price-state .price-head h1 { margin-bottom: var(--space-4); }
.price-state .price-table .record-table { max-width: 36rem; }
/* The state's hubs and zones: chips that are links, the one drawn marked. */
.price-hubpick { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0 0 var(--space-4); }
.price-hubpick__a { display: inline-flex; align-items: center; min-height: 2rem; padding: 0 var(--space-3); border: 1px solid var(--control); border-radius: 999px; font-size: var(--text-1); color: var(--text); text-decoration: none; }
.price-hubpick__a:hover { border-color: var(--text-muted); }
.price-hubpick__a[aria-current="true"] { background: var(--active); font-weight: 600; }
.record-table.price-states { max-width: 44rem; }
/* The state's utilities: one line each on every width, the name and how many counties it serves. */
.price-utilities { max-width: 44rem; margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--border); }
.price-utilities li { display: flex; justify-content: space-between; align-items: baseline; gap: var(--space-4); padding: var(--space-2) 0; border-bottom: 1px solid var(--border); }
.price-utilities__n { flex: none; color: var(--text-muted); font-size: var(--text-1); }
