/* WARN notices dashboard. Builds on embed.css + chart.css (title, toggle,
   plot, source line); this adds the county picker, year stats and year
   pills, in the WWA port's white-card style. Same pieces as
   lmi-esd-state's claims.css. */

:root {
  /* Year series, oldest to newest. The newest year takes Steady Blue, the
     chart lead; earlier years step back to a darkened Renewal Green (the brand
     green is too light for a line on white), then grays. */
  --year-lead: var(--dv-lead);
  --year-3: #5e8f22;
  --year-2: #8a8a8d;
  --year-1: #c4c4c7;
  --border: rgba(64, 64, 66, 0.16);
}

/* ── Filters ── */
.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 4px 24px;
  margin: 10px 0 8px;
}

.control__label {
  display: block;
  margin-top: 8px;
  font: 600 0.78rem/1.3 var(--font-head);
  color: var(--wwa-navy);
}

.control .views { margin: 6px 0; }

.select {
  min-width: 240px;
  max-width: 100%;
  margin: 6px 0;
  padding: 8px 36px 8px 14px;
  border: 1px solid rgba(64, 64, 66, 0.22);
  border-radius: 999px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231c3a64' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--wi-ink);
  font: 600 0.9rem var(--font-head);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.select:focus-visible { outline: 3px solid var(--wwa-lime); outline-offset: 2px; }

/* Year pills double as the chart legend. A navy fill would hide the swatch,
   so on/off is the outline and a solid vs. faded swatch instead. */
.swatch {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  background: var(--swatch);
  vertical-align: -1px;
}

.views--years .view.is-active {
  background: #ffffff;
  border-color: var(--wwa-navy);
  color: var(--wwa-navy);
  box-shadow: inset 0 0 0 1px var(--wwa-navy), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.views--years .view:not(.is-active) { color: var(--wi-ink-faint); }
.views--years .view:not(.is-active) .swatch { opacity: 0.3; }

/* ── Year stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin: 14px 0 4px;
}

.stat {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-top: 4px solid var(--swatch);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.stat__label {
  margin: 0;
  font: 600 0.78rem/1.3 var(--font-head);
  color: var(--wwa-navy);
}

.stat__value {
  margin: 4px 0 0;
  font: 700 1.55rem/1.15 var(--font-head);
  color: var(--wi-ink);
  font-variant-numeric: tabular-nums;
}

.stat__hint { margin: 2px 0 0; font-size: 0.8rem; line-height: 1.4; color: var(--wi-ink-soft); }

.arrow { display: inline-block; width: 1em; }

/* ── Chart ── */
.warn__hint { margin: 10px 0 4px; font-size: 0.88rem; color: var(--wi-ink-soft); }

.warn__plot { height: clamp(300px, 48vw, 420px); }
