.vk-history { min-width: 0; margin-block: 24px; padding: var(--panel-padding,24px); border: 1px solid var(--border); border-radius: var(--surface-radius,28px); background: var(--panel); }
.vk-history :is(h2,h3,p,figure) { margin: 0; }
.vk-history-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.vk-history-heading h2 { margin-top: 6px; font-size: 26px; line-height: 1.2; letter-spacing: -.025em; font-weight: 600; }
.vk-history-heading > div > p:last-child { margin-top: 8px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.vk-history-periods { display: flex; flex-wrap: wrap; gap: 8px; }
.vk-history-periods > a { min-height: 44px; }
.vk-history-periods .is-active { background: var(--soft); color: var(--accent-text); border-color: var(--accent-text); }
.vk-history-note { margin-top: 20px !important; color: var(--muted); font-size: 13px; line-height: 1.7; max-width: 90ch; }
.vk-history-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; margin-top: 24px; }
.vk-history-chart { min-width: 0; padding: 20px; border: 1px solid var(--border); border-radius: 20px; }
.vk-history-chart:first-child { grid-column: 1 / -1; }
.vk-history-chart-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.vk-history-chart h3 { font-size: 18px; line-height: 1.5; font-weight: 550; }
.vk-history-selector { display: grid; gap: 6px; min-width: 0; max-width: 100%; flex: 1 1 200px; color: var(--muted); font-size: 12px; }
.vk-history-selector select { width: 100%; max-width: 100%; min-height: 44px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft); color: var(--text); padding: 10px 32px 10px 12px; font: inherit; font-size: 14px; }
.vk-history-figure { position: relative; margin-top: 24px !important; }
.vk-history-figure svg { display: block; width: 100%; height: 240px; overflow: visible; touch-action: pan-y; }
.vk-history-figure figcaption { margin-top: 8px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.vk-history-axis { stroke: var(--border); stroke-width: 1; vector-effect: non-scaling-stroke; }
.vk-history-axis-label { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.vk-history-bar { fill: var(--accent-text); }
.vk-history-line { stroke: var(--accent-text); stroke-width: 2; fill: none; vector-effect: non-scaling-stroke; }
.vk-history-dot { fill: var(--accent-text); stroke: var(--panel); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.vk-history-partial { stroke: var(--warning); stroke-width: 2; fill: var(--panel); stroke-dasharray: 4 3; vector-effect: non-scaling-stroke; }
.vk-history-dot.vk-history-partial { stroke-dasharray: none; }
.vk-history-cursor { stroke: var(--secondary); stroke-width: 1; stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.vk-history-empty { margin-block: 12px !important; color: var(--muted); font-size: 13px; line-height: 1.6; }
.vk-history-day-control { display: grid; margin-top: 12px; }
.vk-history-day-control > label { color: var(--muted); font-size: 12px; }
.vk-history-day-control input { width: 100%; min-width: 0; min-height: 44px; margin: 0; accent-color: var(--accent-text); cursor: pointer; }
.vk-history-day-control input:disabled { cursor: default; opacity: .5; }
.vk-history-readout { display: grid; gap: 6px; min-height: 118px; padding: 16px; border-radius: 14px; background: var(--soft); }
.vk-history-readout > div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.vk-history-readout time { color: var(--secondary); font-size: 13px; }
.vk-history-readout strong { color: var(--text); font-size: 26px; line-height: 1.2; font-weight: 550; font-variant-numeric: tabular-nums; }
.vk-history-readout > p { color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.vk-history-readout[data-status=partial] > p:first-of-type { color: var(--warning); }
.vk-history-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 16px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.vk-history-key { display: inline-flex; align-items: center; gap: 6px; }
.vk-history-key::before { content: ""; display: block; width: 8px; height: 8px; background: var(--accent-text); border-radius: 50%; }
.vk-history-key.is-partial::before { background: transparent; border: 2px solid var(--warning); border-radius: 0; transform: rotate(45deg); }
.vk-history-table { margin-top: 12px; border-top: 1px solid var(--border); }
.vk-history-table summary { display: flex; align-items: center; gap: 8px; min-height: 44px; color: var(--secondary); font-size: 13px; cursor: pointer; }
.vk-history-table summary::before { content: "▸"; }.vk-history-table[open] summary::before { content: "▾"; }
.vk-history-table-scroll { max-height: 360px; overflow: auto; overscroll-behavior: contain; }
.vk-history-table table { width: 100%; border-collapse: collapse; color: var(--secondary); font-size: 12px; line-height: 1.6; }
.vk-history-table caption { padding-block: 8px 12px; text-align: left; color: var(--muted); }
.vk-history-table :is(th,td) { padding: 12px 8px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.vk-history-table tbody th { white-space: nowrap; font-weight: 500; font-variant-numeric: tabular-nums; }
.vk-history-table td { overflow-wrap: anywhere; }.vk-history-table td:nth-child(2) { font-variant-numeric: tabular-nums; }
.vk-history-table td p { margin-top: 4px; color: var(--muted); }
.vk-history-readout [hidden],.vk-history [hidden] { display: none; }
@media (max-width: 1000px) { .vk-history-grid { grid-template-columns: minmax(0,1fr); } }
@media (max-width: 600px) {
  .vk-history-heading h2 { font-size: 24px; }
  .vk-history-periods { width: 100%; }.vk-history-periods a { flex: 1; }
  .vk-history-chart { padding: 16px; }
  .vk-history-table :is(th,td) { padding-inline: 4px; }
}
