/* Reports (reports.js, reportparts.js, charts.js) and the link to them on the workspace Home. Bars are SVG; their
   colors come from here, and only from brand.css. */

/* The link on Home. */
.go-card { display: flex; align-items: center; gap: 14px; min-height: 64px; padding-top: 16px; padding-bottom: 16px; font-weight: 800; color: var(--navy); text-decoration: none; }
.go-card > .ic:first-child { width: 26px; height: 26px; color: var(--blue); }
.go-card span { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.go-card:hover span, .go-card:focus-visible span { text-decoration: underline; }

/* The company picker and the headline numbers. */
.report-cos { margin-top: 18px; }
.report-cos .chip { text-align: left; overflow-wrap: anywhere; max-width: 100%; }
.report-tiles .tile-n { cursor: default; align-content: start; }
.report-tiles .tile-n:hover { border-color: transparent; }
.report-tiles .tile-n b { overflow-wrap: anywhere; }
.trend { display: flex; align-items: flex-start; gap: 4px; margin-top: 4px; color: var(--slate); font-size: 17px; text-wrap: pretty; }
.trend .ic { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.stack[aria-busy="true"] .report-grid, .stack[aria-busy="true"] .report-tiles { opacity: .55; transition: opacity .2s var(--ease); }

/* The cards. */
.report-grid { display: grid; gap: 14px; }
.chart-card { display: grid; gap: 14px; }
.chart-card .eyebrow { margin: 0; }
.chart-q { font-size: 24px; font-weight: 900; line-height: 1.2; text-wrap: balance; overflow-wrap: anywhere; }
.chart-answer { font-weight: 700; text-wrap: pretty; }

/* A row: its name and its number in words on one line (wrapping when long), its bar(s) under them. */
.chart-rows { list-style: none; padding: 0; display: grid; }
.chart-row { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 12px; padding: 10px 0; }
.chart-row + .chart-row { border-top: 1px solid var(--hair); }
.chart-name { flex: 1 1 14ch; display: flex; align-items: center; gap: 8px; font-weight: 800; overflow-wrap: anywhere; min-width: 0; }
.chart-said { flex: 0 1 auto; margin-left: auto; color: var(--slate); font-size: 17px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.chart-bars { flex: 1 0 100%; display: grid; gap: 4px; padding-top: 8px; }
.chart-row.is-most .chart-name, .chart-row.is-most .chart-said { color: var(--navy); }
.chart-row.is-over .chart-said { color: var(--late); font-weight: 800; }
.chart-row.one-off .chart-name { color: var(--slate); }

.bar-svg { display: block; overflow: visible; }
.cols-svg { display: block; max-width: 280px; }
.cat-dot { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: var(--on-color); }
.cat-dot .ic { width: 18px; height: 18px; }

/* The key. */
.chart-key { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--slate); font-size: 17px; }
.chart-key li { display: flex; align-items: center; gap: 6px; }
.chart-key .ic { width: 18px; height: 18px; }
.chart-key .swatch { flex: none; }

/* Fills. Status and category colors are the cards' own; "none" is an empty month. */
.bar-svg .track { fill: var(--ice); }
.fill.tone-ok { fill: var(--ok); }
.fill.tone-slip { fill: var(--slip); }
.fill.tone-late { fill: var(--late); }
.fill.tone-paused { fill: var(--paused); }
.fill.came, .fill.step, .fill.actual, .fill.spent { fill: var(--navy); }
.fill.gone, .fill.most, .fill.usual { fill: var(--blue); }
.fill.over { fill: var(--late); }
.fill.rush { fill: var(--slip); }
.fill.ahead { fill: var(--hair); }
.fill.none { fill: var(--ice); }
.bar-svg .mark, .fill.mark { fill: var(--navy); }
.fill.cat-social { fill: var(--c-social); }
.fill.cat-print { fill: var(--c-print); }
.fill.cat-swag { fill: var(--c-swag); }
.fill.cat-web { fill: var(--c-web); }
.fill.cat-events { fill: var(--c-events); }
.fill.cat-other { fill: var(--c-other); }

/* Why these charts. */
.why-charts summary {
  display: flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 800; cursor: pointer; list-style: none;
}
.why-charts summary::-webkit-details-marker { display: none; }
.why-charts summary .ic { color: var(--slate); transition: transform .2s var(--ease); }
.why-charts[open] summary .ic { transform: rotate(90deg); }
.why-charts dl { display: grid; gap: 14px; margin-top: 14px; }
.why-charts dt { font-weight: 800; }
.why-charts dd { color: var(--slate); text-wrap: pretty; }

@media (min-width: 900px) {
  /* Two columns that fill down, so a short card never leaves a hole beside a tall one. */
  .report-grid { display: block; columns: 2; column-gap: 20px; }
  .report-grid .chart-card { break-inside: avoid; margin-bottom: 20px; }
  .chart-q { font-size: 28px; }
  .why-charts dl { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 32px; }
}

@media (prefers-reduced-motion: reduce) {
  .stack[aria-busy="true"] .report-grid, .why-charts summary .ic { transition: none; }
}
