.chart-block { overflow: hidden; }
.chart-tabs { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; border-bottom: 1px solid #c6d2ca; background: transparent; }
.chart-tabs button { min-width: 0; min-height: 44px; padding: 9px 12px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: #58675f; font: inherit; font-size: 13px; font-weight: 700; line-height: 1.25; cursor: pointer; }
.chart-tabs button:hover { color: #12442f; }
.chart-tabs button[aria-selected="true"] { border-bottom-color: #1e5b43; color: #12442f; }
.chart-tabs button:focus-visible { position: relative; z-index: 1; outline: 3px solid rgba(30,91,67,.35); outline-offset: -3px; }
.chart-pane { padding: 18px; }
.chart-scroll { overflow: visible; }
.chart-inspector { display: grid; grid-template-columns: auto 1fr; gap: 4px 22px; align-items: center; min-height: 132px; padding: 18px 20px; background: #12442f; color: #fff; border-radius: 12px; }
.chart-inspector.is-pb { background: #bd3844; }
.chart-specimen { grid-row: 1 / span 2; display: grid; place-items: center; width: 82px; height: 82px; border-radius: 50%; background: #fff; color: #12442f; font-size: 36px; font-weight: 800; font-variant-numeric: tabular-nums; box-shadow: 0 4px 12px rgba(10,42,30,.2); }
.is-pb .chart-specimen { color: #bd3844; }
.chart-selection-label { font-size: 13px; font-weight: 700; }
.chart-metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 10px; }
.chart-metric { min-width: 0; }
.chart-metric small { display: block; color: #d8e8df; font-size: 12px; }
.chart-metric b { display: block; margin-top: 2px; font-size: clamp(18px,2vw,25px); font-variant-numeric: tabular-nums; }
.chart-inspector.is-pb .chart-metric small { color: #fbeaec; }
.chart-profile { color: #fff; font-size: 13px; font-weight: 700; text-underline-offset: 3px; }
.chart-profile:visited, .chart-profile:hover, .chart-profile:active { color: #fff; }
.chart-profile:hover { text-decoration-thickness: 2px; text-underline-offset: 5px; }
.chart-profile:focus-visible { color: #fff; outline: 2px solid #fff; outline-offset: 4px; border-radius: 2px; }
.chart-controls { display: grid; grid-template-columns: minmax(150px,1fr) minmax(100px,180px) auto auto; gap: 8px; align-items: end; margin: 14px 0; }
.chart-controls label { align-self: center; color: #58675f; font-size: 12px; font-weight: 700; }
.chart-controls select, .chart-controls button { min-height: 42px; border: 1px solid #c6d2ca; border-radius: 8px; background: #fff; color: #172c25; font: inherit; font-weight: 700; }
.chart-controls select { padding: 8px 34px 8px 10px; }
.chart-controls button { padding: 8px 14px; cursor: pointer; }
.chart-controls button:hover { border-color: #1e5b43; color: #12442f; }
.chart-controls :focus-visible, .chart-bar:focus-visible { outline: 3px solid rgba(30,91,67,.35); outline-offset: 3px; }
.chart.chart-groups { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); align-items: stretch; gap: 12px; width: 100%; min-width: 0; height: auto; padding: 0; border: 0; }
.chart.chart-groups.compact { grid-template-columns: repeat(2,minmax(0,1fr)); }
.chart.chart-groups.multiplier-chart { grid-template-columns: 1fr; }
.chart-range { min-width: 0; padding-inline: 5px; box-sizing: border-box; }
.chart-range-label { margin-bottom: 7px; color: #58675f; font-size: 12px; font-weight: 700; }
.chart-bars { display: grid; grid-template-columns: repeat(var(--range-size),minmax(0,1fr)); align-items: end; gap: 2px; height: 190px; border-bottom: 2px solid #c6d2ca; }
.chart-bar { position: relative; display: flex; align-items: end; justify-content: center; min-width: 0; height: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
.chart-bar-fill { width: min(100%,9px); min-height: 3px; background: #1e5b43; border-radius: 3px 3px 0 0; }
.chart-bar.hot .chart-bar-fill { background: #bd3844; }
.chart-bar.coldb .chart-bar-fill { background: #687dba; }
.chart-bar[aria-pressed="true"] .chart-bar-fill { outline: 3px solid #172c25; outline-offset: 2px; }
.chart-bar[aria-pressed="true"]::after { content: ""; position: absolute; bottom: -7px; width: 8px; height: 8px; border-radius: 50%; background: #172c25; }
.chart-bar-num { position: absolute; top: 100%; margin-top: 9px; color: #58675f; font-size: 12px; font-variant-numeric: tabular-nums; }
.multiplier-chart .chart-bars { height: 210px; }
.multiplier-chart .chart-bar-fill { width: min(54px,70%); background: #bd3844; }
.chart-bar-value { position: absolute; bottom: calc(var(--height) + 5px); color: #172c25; font-size: 12px; font-weight: 700; white-space: nowrap; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 28px 0 0; color: #58675f; font-size: 12px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; }
.legend-hot, .legend-pb { background: #bd3844; }.legend-mid { background: #1e5b43; }.legend-cold { background: #687dba; }
@media (max-width:700px) {
  .chart-tabs button { min-height: 48px; padding-inline: 6px; white-space: normal; }
  .chart-pane { padding: 14px 10px; }
  .chart-inspector { grid-template-columns: 68px 1fr; min-height: 0; padding: 14px; gap: 7px 14px; }
  .chart-specimen { width: 64px; height: 64px; font-size: 28px; }
  .chart-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px 12px; }
  .chart-metric b { font-size: 18px; }
  .chart-profile { grid-column: 2; }
  .chart-controls { grid-template-columns: 1fr 1fr; }
  .chart-controls label { grid-column: 1 / -1; }
  .chart-controls select { grid-column: 1 / -1; width: 100%; }
  .chart.chart-groups, .chart.chart-groups.compact { grid-template-columns: 1fr; gap: 32px; }
  .chart-bars { height: 156px; }
  .multiplier-chart .chart-bars { height: 190px; }
}
