/* SPDX-License-Identifier: MIT
 *
 * Copied from hire4real/static/css/components/aggregate-chart.css (MIT, same author), 2026-10-04,
 * 131 lines. Colour tokens replaced per doctrine 8.
 *
 * Here it is the aggregate chart's frame, bands, legend and caption.
 * Their class names, geometry, transitions and breakpoints are kept as they are; their header and
 * notes follow this one unchanged, except that a colour value a note quotes is elided as [colour]
 * (doctrine 8 reaches comments too).
 *
 * DIVERGES FROM hire4real/static/css/components/aggregate-chart.css: the coverage band's amber is
 *   the band-hatch token here: amber is never used on this site, and a band is not a series.
 */
/* aggregate-chart.css (Night 32)
   Visual container + legend + attribution for page-level TradingView
   Lightweight Charts. Works with the standard dark terminal palette.
*/

.chart-section,
.tv-chart-container,
.tradingview-widget-container,
.chart-wrapper {
  padding: 20px 0 8px;
  margin: 8px auto 24px;
  width: 100%;
  max-width: 1120px;
}

.chart-section__title {
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  margin: 0 0 10px;
  padding: 0 4px;
}

[data-aggregate-chart],
[data-chart] {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 1120px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--shadow-float);
  min-height: 220px;
}

[data-aggregate-chart] canvas,
[data-aggregate-chart] table {
  display: block;
}

.agg-chart__legend {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 2;
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 11px;
  color: var(--ink-2);
  pointer-events: none;
  padding: 4px 8px;
  background: var(--shadow-float);
  border-radius: 4px;
  backdrop-filter: blur(2px);
}

.agg-chart__legend span {
  font-size: 10px;
  margin-right: 2px;
}

.agg-chart__attribution {
  position: absolute;
  bottom: 4px;
  right: 10px;
  z-index: 2;
  font-size: 10px;
  color: var(--ink-2);
  pointer-events: auto;
}
.agg-chart__attribution a {
  color: var(--ink-2);
  text-decoration: none;
}
.agg-chart__attribution a:hover {
  color: var(--ink-2);
  text-decoration: underline;
}

.agg-chart__error {
  color: var(--ink-2);
  font-family: var(--font-mono, "JetBrains Mono", ui-monospace, monospace);
  font-size: 12px;
  text-align: center;
  padding: 48px 16px;
}

@media (max-width: 640px) {
  .chart-section {
    padding: 16px 0 4px;
    margin: 4px 0 16px;
  }
  .chart-section__title {
    font-size: 10px;
    letter-spacing: 0.1em;
  }
  [data-aggregate-chart] {
    border-radius: 6px;
    min-height: 180px;
  }
}

/* A2 (LABOR-DAY-4): coverage-limited months on the WARN chart. A positioned
   overlay above the canvas; hatched so it reads as "not measured here", never
   as a data series. Pointer events pass through to the chart. */
[data-aggregate-chart] { position: relative; }
.agg-chart__bands { position: absolute; inset: 0; pointer-events: none; }
/* NIGHT_175 T9 — THE BAND IS NOT THE SERIES.
 *
 * T1b's comment read "the band is the WARN series at low alpha, never an amber
 * of its own", and that is now reversed by the brief. The reason it is
 * reversed: the band's whole job is to say "this dip is OUR COVERAGE, not
 * fewer layoffs". A caveat drawn in the same hue as the data it qualifies
 * reads as part of the data. Amber is the caution hue on this site and the
 * series is teal; the hatch and the dashed edges keep working in greyscale, so
 * the distinction does not rest on colour alone. */
.agg-chart__band {
  position: absolute; top: 0; bottom: 0;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--band-hatch) 22%, transparent) 0 6px, transparent 6px 12px);
  border-left: 1px dashed color-mix(in srgb, var(--band-hatch) 60%, transparent);
  border-right: 1px dashed color-mix(in srgb, var(--band-hatch) 60%, transparent);
}
.agg-chart__band-swatch {
  display: inline-block; width: 0.9em; height: 0.9em; vertical-align: -0.1em;
  background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--band-hatch) 55%, transparent) 0 2px, transparent 2px 4px);
  border: 1px dashed color-mix(in srgb, var(--band-hatch) 75%, transparent);
}
.agg-chart__caption { margin-top: 0.35rem; font-size: 0.75rem; color: var(--ink-2); }
