/* Wykresy wynikow – wspolne dla panelu i ankiet (kolory z --accent, --r-*) */
.results { display: grid; gap: 16px; }
.result-card { background: var(--r-card, #fff); border: 1px solid var(--r-line); border-radius: var(--r-radius, 14px); padding: clamp(16px, 3vw, 24px); min-width: 0; }
.result-card__head h3 { font-size: 1.05rem; margin: 0 0 2px; color: var(--r-text); line-height: 1.35; }
.result-card__num { color: var(--accent); }
.result-card__meta { font-size: .82rem; color: var(--r-muted); margin: 0 0 14px; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: minmax(0, 1fr) 90px; grid-template-areas: "label value" "track track"; gap: 4px 12px; font-size: .92rem; }
.bar__label { grid-area: label; color: var(--r-text); overflow-wrap: anywhere; }
.bar__value { grid-area: value; text-align: right; color: var(--r-muted); font-size: .85rem; white-space: nowrap; }
.bar__value strong { color: var(--r-text); font-size: .92rem; }
.bar__track { grid-area: track; height: 12px; border-radius: 99px; background: var(--r-track); overflow: hidden; }
.bar__fill { display: block; height: 100%; width: var(--pct); min-width: 2px; border-radius: inherit; background: color-mix(in srgb, var(--accent) 55%, transparent); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.bar--top .bar__fill { background: var(--accent); }
.histogram { display: flex; align-items: flex-end; gap: 6px; height: 170px; padding-top: 22px; }
.histogram__col { flex: 1; display: grid; grid-template-rows: auto 1fr auto; height: 100%; align-items: end; text-align: center; min-width: 0; }
.histogram__value { font-size: .78rem; color: var(--r-muted); }
.histogram__bar { display: block; height: max(var(--h), 2px); background: var(--accent); border-radius: 6px 6px 2px 2px; opacity: .85; align-self: end; }
.histogram__label { font-size: .85rem; font-weight: 600; color: var(--r-text); padding-top: 6px; border-top: 1px solid var(--r-line); }
.scale-ends { display: flex; justify-content: space-between; gap: 12px; font-size: .8rem; color: var(--r-muted); margin: 6px 0 0; }
.stat-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.stat-row div { background: var(--r-track); border-radius: 10px; padding: 8px 14px; min-width: 96px; }
.stat-row dt { font-size: .75rem; color: var(--r-muted); }
.stat-row dd { margin: 0; font-weight: 700; color: var(--r-text); font-size: 1.05rem; }
.matrix-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--r-muted); margin-bottom: 12px; }
.matrix-legend span { display: inline-flex; align-items: center; gap: 6px; }
.matrix-legend i { width: 12px; height: 12px; border-radius: 3px; background: color-mix(in srgb, var(--accent) var(--shade), #9aa0b8); }
.matrix-row { margin-bottom: 12px; }
.matrix-row__label { font-size: .9rem; margin: 0 0 4px; color: var(--r-text); }
.stacked { display: flex; height: 26px; border-radius: 8px; overflow: hidden; background: var(--r-track); }
.stacked__seg { width: var(--w); display: grid; place-items: center; font-size: .72rem; font-weight: 700; color: #fff; background: color-mix(in srgb, var(--accent) var(--shade), #9aa0b8); white-space: nowrap; overflow: hidden; border-right: 1px solid rgba(255, 255, 255, .5); }
.stacked__empty { font-size: .78rem; color: var(--r-muted); padding: 4px 10px; }
.matrix-table { margin-top: 12px; font-size: .9rem; }
.matrix-table summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.text-answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; max-height: 420px; overflow-y: auto; }
.text-answers li { background: var(--r-track); border-radius: 10px; padding: 10px 14px; font-size: .92rem; color: var(--r-text); overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .bar { grid-template-columns: minmax(0, 1fr) 76px; }
  .histogram { height: 140px; gap: 3px; }
  .histogram__label { font-size: .75rem; }
}
