/* Copyboy report — chart, insights and filter chrome on top of app.css.
   Data marks use one accent (--rep-accent, validated 3.3:1 on white) plus a
   de-emphasis gray for "wasted"; status colors are reserved for the insights list. */

:root {
  --rep-accent: #c6720f;
  --rep-accent-track: #f0dbc3;
  --rep-gray: #b9b9b8;
  --rep-good: #0ca30c;
  --rep-warning: #fab219;
  --rep-critical: #d03b3b;
}

/* ---------- filter row ---------- */
.filters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.filters .tabs { margin: 0; }
.filters .tab { flex: 0 0 auto; }

/* ---------- the one-paragraph answer ---------- */
.summary { max-width: 900px; margin: 0 0 24px; padding: 20px 24px; font-size: 17px; line-height: 26px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--rep-accent); border-radius: 0 16px 16px 0; }

/* ---------- chart ---------- */
.chart-wrap { position: relative; }
.chart svg { display: block; max-width: 100%; height: auto; }
.chart__grid { stroke: var(--pneumatic-color-black8); stroke-width: 1; }
.chart__axis { stroke: var(--pneumatic-color-black16); stroke-width: 1; }
.chart__tick { font-family: var(--pneumatic-font-sans); font-size: 11px; font-variant-numeric: tabular-nums; fill: var(--pneumatic-color-black48); }
.chart__label { font-family: var(--pneumatic-font-sans); font-size: 12px; font-weight: 700; fill: var(--pneumatic-color-black100); }
.chart__bar-useful { fill: var(--rep-accent); }
.chart__bar-wasted { fill: var(--rep-gray); }
.chart__col { outline: none; cursor: default; }
.chart__col:hover rect, .chart__col:focus rect { filter: brightness(1.12); }
.legend { display: flex; gap: 20px; margin: 12px 0 0; padding: 0; font-size: 13px; color: var(--pneumatic-color-black72); list-style: none; }
.legend__swatch { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 3px; }
.legend__swatch_accent { background: var(--rep-accent); }
.legend__swatch_gray { background: var(--rep-gray); }

.tip {
  position: absolute; z-index: 5; width: 180px; padding: 10px 12px;
  font-size: 13px; line-height: 18px; color: #fff;
  background: var(--pneumatic-color-black100); border-radius: 10px;
  pointer-events: none; transform: translateY(-100%);
}
.tip__title { margin-bottom: 4px; font-weight: 700; }
.tip__row { display: flex; align-items: center; gap: 6px; }
.tip__row strong { font-variant-numeric: tabular-nums; }
.tip__label { margin-left: auto; color: var(--pneumatic-color-black32); }
.tip__key { display: inline-block; width: 10px; height: 3px; border-radius: 2px; }
.tip__key_accent { background: var(--rep-accent); }
.tip__key_gray { background: var(--rep-gray); }

/* ---------- insights ---------- */
.insights { padding: 0; margin: 0; list-style: none; }
.insight { display: flex; gap: 16px; padding: 14px 0; border-top: 1px solid var(--pneumatic-color-black8); }
.insight:last-child { border-bottom: 1px solid var(--pneumatic-color-black8); }
.insight__badge { flex: 0 0 88px; padding: 3px 10px; font-size: 12px; font-weight: 800; line-height: 16px; text-align: center; color: #fff; border-radius: 12px; align-self: flex-start; }
.insight_critical .insight__badge { background: var(--rep-critical); }
.insight_warning .insight__badge { color: var(--pneumatic-color-black100); background: var(--rep-warning); }
.insight_good .insight__badge { background: var(--rep-good); }
.insight__text { font-weight: 700; }
.insight__action { margin-top: 2px; font-size: 13px; line-height: 16px; color: var(--pneumatic-color-black72); }
.insight__links { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

@media (max-width: 640px) {
  .insight { flex-direction: column; gap: 8px; }
}
