/* Аналітика: плитки, графік, таблиці. Колір лінії перевірено scripts/validate_palette.js (skill dataviz) */
:root { --ch-1: #2a78d6; --ch-prev: #8a8a8f; }
.an { background: #fff; border-radius: var(--r); margin-bottom: 18px; overflow: hidden; }
.an-tiles { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.an-tile { display: grid; gap: 4px; align-content: start; text-align: left; min-width: 0; padding: 16px 18px 14px; background: transparent; border: 0; border-right: 1px solid var(--line); border-bottom: 3px solid transparent; font: inherit; color: inherit; cursor: pointer; transition: background .15s; }
.an-tile:last-child { border-right: 0; }
.an-tile:hover { background: var(--bg-3); }
.an-tile:focus-visible { outline: 2px solid var(--ch-1); outline-offset: -2px; }
.an-tile[aria-pressed="true"] { border-bottom-color: var(--ch-1); }
.an-tile > span { font-weight: 600; font-size: 13.5px; color: var(--fg-2); }
.an-tile > b { font: 700 26px/1.15 var(--head); letter-spacing: -.02em; overflow-wrap: anywhere; }
.an-tile > b small { font: 500 13px var(--font); color: var(--fg-2); }
.an-tile > em { font-style: normal; font-size: 12.5px; color: var(--fg-2); }
.an-tile > em.up { color: var(--ok-ink); }
.an-tile > em.down { color: #b42318; }
.an-plotbox { position: relative; padding: 14px 18px 12px; }
.ch-plot { position: relative; min-height: 220px; touch-action: pan-y; }
.ch-plot:focus-visible { outline: 2px solid var(--ch-1); outline-offset: 4px; border-radius: 4px; }
.ch-plot svg { display: block; max-width: 100%; }
.ch-grid { stroke: var(--line); stroke-width: 1; }
.ch-axis { fill: var(--fg-3); font: 11.5px var(--font); font-variant-numeric: tabular-nums; }
.ch-line { fill: none; stroke: var(--ch-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.ch-line--prev { stroke: var(--ch-prev); stroke-dasharray: 5 4; }
.ch-area { fill: var(--ch-1); opacity: .08; }
.ch-cross { stroke: var(--fg-3); stroke-width: 1; }
.ch-dot { fill: var(--ch-1); stroke: #fff; stroke-width: 2; }
.ch-dot--prev { fill: var(--ch-prev); }
.ch-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--fg-2); margin-bottom: 6px; }
.ch-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.ch-legend > span > span { display: inline; }
.ch-key { display: inline-block; flex: none; width: 16px; height: 0; border-top: 2px solid var(--ch-1); }
.ch-key--prev { border-top: 2px dashed var(--ch-prev); }
.ch-tip { position: absolute; top: 44px; z-index: 3; margin-left: 18px; padding: 8px 10px; border-radius: 8px; background: #fff; border: 1px solid var(--line-2); box-shadow: 0 6px 18px rgba(20, 20, 30, .12); pointer-events: none; font-size: 12.5px; white-space: nowrap; }
.ch-tip__row { display: flex; align-items: center; gap: 8px; }
.ch-tip__row + .ch-tip__row { margin-top: 4px; }
.ch-tip__row b { font-variant-numeric: tabular-nums; }
.ch-tip__row span { color: var(--fg-2); }
.ch-note { margin: 8px 0 0; }
.ch-tablewrap { margin-top: 8px; font-size: 13px; }
.ch-tablewrap summary { cursor: pointer; color: var(--fg-2); }
.ch-tablewrap table { margin-top: 8px; }
.an-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 14px; }
.an-filter label { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fg-2); }
.an-filter input, .an-filter select { font: inherit; font-size: 13px; color: var(--fg); padding: 6px 8px; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
.an-card { margin-bottom: 18px; }
.an-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.an-cols .an-card { margin-bottom: 0; }
.an-cols { margin-bottom: 18px; }
.an-big b { font: 700 28px var(--head); }
.an-more { display: block; padding: 0 18px 14px; font-size: 13px; }
@media (max-width: 900px) {
  .an-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-tile { border-bottom-width: 3px; padding: 12px 14px 10px; }
  .an-tile > b { font-size: 21px; }
  .an-tile:nth-child(2n) { border-right: 0; }
  .an-tile:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .an-plotbox { padding: 12px; }
  .an-cols { grid-template-columns: minmax(0, 1fr); }
  .an-filter .tabs { width: 100%; overflow-x: auto; }
  .ch-tip { margin-left: 12px; }
}
