.history-main { max-width: 1208px; }
.history-intro { margin-bottom: 28px; }
.history-intro .feed-description { max-width: 720px; }
.history-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; margin-bottom: 26px; }
.history-periods { display: inline-flex; gap: 3px; padding: 4px; border: 1px solid var(--linea); border-radius: 4px; background: #fffdfa; }
.history-periods button { min-height: 34px; padding: 6px 15px; border: 0; border-radius: 3px; background: transparent; color: var(--senal); font: 400 12px/1.2 var(--mono); cursor: pointer; }
.history-periods button:hover { background: #f1edf5; }
.history-periods button[aria-pressed="true"] { background: var(--senal); color: white; }
.history-range { margin: 0; color: var(--muted); font: 400 11px/1.4 var(--mono); }
.history-section-head, .history-table-head { display: flex; align-items: end; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; margin: 0 0 14px; }
.history-section-head h2, .history-table-head h3 { margin: 0; font: 500 21px/1.25 Sora, sans-serif; letter-spacing: -.025em; }
.history-section-head > span, .history-table-head > span { color: var(--muted); font: 400 11px/1.4 var(--mono); }
.history-overview-wrap { border: 1px solid var(--linea); border-radius: 4px; background: #fffdfa; }
.history-overview-table { width: 100%; border-collapse: collapse; text-align: left; }
.history-overview-table th { padding: 13px 16px; background: #f4f1f5; color: var(--muted); font: 400 10px/1.4 var(--mono); }
.history-overview-table td { padding: 12px 16px; border-top: 1px solid #eeebf0; }
.history-overview-table tbody tr:hover { background: #faf7fd; }
.history-overview-identity-content { display: flex; align-items: center; gap: 11px; }
.history-source-logo { width: 36px; height: 36px; flex: none; object-fit: contain; }
.history-source-names { display: grid; min-width: 0; gap: 3px; }
.history-source-names strong { font: 500 13px/1.25 Inter, sans-serif; }
.history-source-names small { color: var(--muted); font: 400 10px/1.3 var(--mono); }
.history-overview-value strong { display: block; font: 400 19px/1.3 var(--mono); }
.history-overview-value small { display: block; margin-top: 2px; color: var(--muted); font: 400 10px/1.3 var(--mono); }
.history-overview-action a { color: var(--senal); font: 400 11px/1.4 var(--mono); text-decoration: none; white-space: nowrap; }
.history-overview-action a:hover { text-decoration: underline; text-underline-offset: 3px; }
.history-detail { margin-top: 44px; }
.history-page.is-operator .history-detail { margin-top: 0; }
.history-detail-head { align-items: center; margin-bottom: 18px; }
.history-selected { display: flex; align-items: center; gap: 12px; }
.history-selected img { display: block; width: 48px; height: 48px; object-fit: contain; }
.history-selected small { display: block; margin-bottom: 5px; color: var(--muted); font: 400 10px/1.3 var(--mono); }
.history-detail-head a { color: var(--senal); font-size: 12px; text-decoration: none; }
.history-detail-head a:hover { text-decoration: underline; }
.history-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.history-metric { display: grid; align-content: space-between; min-height: 115px; gap: 9px; padding: 15px; border: 1px solid var(--linea); border-radius: 4px; background: #fffdfa; }
.history-metric small { color: var(--muted); font: 400 10px/1.4 var(--mono); text-transform: uppercase; }
.history-metric strong { font: 400 27px/1.1 var(--mono); letter-spacing: -.05em; }
.history-metric span { color: var(--muted); font-size: 11px; }
.history-figure { margin-top: 12px; padding: 20px 20px 22px; border: 1px solid var(--linea); border-radius: 4px; background: #fffdfa; }
.history-figure-head, .history-band-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 18px; }
.history-figure h3, .history-table-head h3 { margin: 0; font: 500 14px/1.3 Sora, sans-serif; }
.history-figure-head span, .history-band-head span { color: var(--muted); font: 400 10px/1.4 var(--mono); }
.history-chart { height: 230px; margin-top: 18px; }
.history-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.history-gridline { stroke: #e8e3eb; stroke-width: 1; vector-effect: non-scaling-stroke; }
.history-line { fill: none; stroke: var(--senal); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.history-dot { fill: var(--senal); }
.history-axis { fill: var(--muted); font: 11px var(--mono); }
.history-chart-empty { display: grid; place-items: center; height: 100%; margin: 0; color: var(--muted); font-size: 13px; text-align: center; }
.history-band-head { margin-top: 22px; }
.history-band { display: grid; gap: 1px; height: 18px; margin-top: 12px; background: #e8e5e9; }
.history-band-block { min-width: 0; }
.history-band-block--ok, .history-key--ok { background: #357c68; }
.history-band-block--empty, .history-key--empty { background: #8b74a6; }
.history-band-block--error, .history-key--error { background: #bb4b4b; }
.history-band-block--capture_error, .history-key--capture_error { background: #cf8a36; }
.history-band-block--no_capture, .history-key--no_capture { background: #d9d6dc; }
.history-legend { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 12px; }
.history-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 10px; }
.history-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; }
.history-table-head { margin: 32px 0 12px; }
.history-table-wrap { overflow-x: auto; border: 1px solid var(--linea); border-radius: 4px; background: #fffdfa; }
.history-table { width: 100%; border-collapse: collapse; font: 400 11px/1.45 var(--mono); white-space: nowrap; }
.history-table th { padding: 12px 14px; background: #f4f1f5; color: var(--muted); text-align: left; font-weight: 400; }
.history-table td { padding: 11px 14px; border-top: 1px solid #eeebf0; }
.history-table tbody tr:hover { background: #faf7fd; }
.history-cell-status--ok { color: #276952; }
.history-cell-status--error { color: #a33a3a; }
.history-cell-status--empty { color: var(--senal); }
.history-more { display: block; min-height: 36px; margin: 15px auto 0; padding: 6px 15px; border: 1px solid var(--linea); border-radius: 3px; background: #fffdfa; color: var(--senal); font: 400 11px var(--mono); cursor: pointer; }
.history-more:hover { background: var(--via); }
.history-footnote { margin-top: 28px; }
@media (max-width: 760px) {
  .history-intro { margin-bottom: 22px; }
  .history-overview-wrap { border: 0; background: transparent; }
  .history-overview-table, .history-overview-table tbody { display: block; }
  .history-overview-table thead { display: none; }
  .history-overview-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; margin-bottom: 9px; padding: 14px; border: 1px solid var(--linea); border-radius: 4px; background: #fffdfa; }
  .history-overview-table td { display: block; min-width: 0; padding: 0; border: 0; }
  .history-overview-identity { grid-column: 1 / -1; }
  .history-overview-value::before { content: attr(data-label); display: block; margin-bottom: 5px; color: var(--muted); font: 400 9px/1.3 var(--mono); text-transform: uppercase; }
  .history-overview-action { align-self: end; }
  .history-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .history-detail { margin-top: 32px; }
  .history-figure { padding: 16px 12px 18px; }
  .history-chart { height: 200px; }
  .history-table { min-width: 720px; }
}
@media (max-width: 450px) {
  .history-periods { width: 100%; }
  .history-periods button { flex: 1; padding-inline: 6px; }
  .history-metric { min-height: 102px; padding: 12px; }
  .history-metric strong { font-size: 22px; }
  .history-legend { gap: 8px 10px; }
}
