.insights {
  --insight-line: var(--line, #e2e8f1);
  --insight-muted: #52647c;
  --insight-ink: #142136;
  display: grid;
  gap: 12px;
  min-width: 0;
  color: var(--insight-ink);
}
.insight-toolbar, .insight-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.insight-heading { justify-content: space-between; }
.insight-choice { display: flex; flex-wrap: wrap; gap: 4px; }
.insight-toggle {
  color: #334c70;
  background: #f7f9fc;
  border: 1px solid var(--insight-line);
  border-radius: 7px;
  padding: 6px 9px;
  min-height: 34px;
  font-size: .75rem;
  font-weight: 650;
  white-space: nowrap;
}
.insight-toggle:hover { background: #eaf1ff; }
.insight-toggle[aria-pressed="true"] { color: #1d459e; background: #e8efff; border-color: #b6c8f4; }
.insight-toggle:focus-visible, .insight-details summary:focus-visible, .insight-snapshot summary:focus-visible { outline-offset: 2px; }
.insight-overview {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(min(345px, 100%), 1fr));
}
.insight-panel {
  min-width: 0;
  border: 1px solid var(--insight-line);
  border-radius: 11px;
  background: #fff;
  padding: 13px;
}
.insight-panel h3 { margin: 0; font-size: .99rem; }
.insight-panel h4 { margin: 0; color: var(--insight-muted); font-weight: 650; font-size: .76rem; }
.insight-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(137px, 100%), 1fr));
  gap: 12px;
  margin-top: 9px;
}
.insight-funnel, .insight-values, .insight-events, .insight-legend { padding: 0; margin: 0; list-style: none; }
.insight-funnel li, .insight-values > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: 2px 6px;
  padding: 6px 0;
  border-bottom: 1px solid var(--insight-line);
  font-size: .78rem;
}
.insight-funnel li:last-child, .insight-values > div:last-child { border-bottom: none; }
.insight-funnel li small { grid-column: 1 / -1; color: var(--insight-muted); font-size: .71rem; }
.insight-values dd { margin: 0; font-weight: 650; }
.insight-funnel li b, .insight-values dd, .insight-table td { font-variant-numeric: tabular-nums; }
.insight-empty, .insight-helper { color: var(--insight-muted); }
.insight-empty {
  background: #f5f8fc;
  border-radius: 8px;
  padding: 10px 12px;
  margin-top: 9px;
  font-size: .81rem;
}
.insight-helper { margin: 4px 0 0; font-size: .75rem; line-height: 1.4; }
.insight-figure { margin: 5px 0 0; }
.insight-detail-canvas { display: block; width: 100%; height: 236px; }
.insight-sparkline-canvas { display: block; width: 102px; height: 32px; }
.insight-sparkline-empty { display: inline-block; min-width: 32px; color: #52647c; }
.insight-legend { display: flex; flex-wrap: wrap; gap: 6px 13px; margin: 9px 0 0; }
.insight-legend li { display: inline-flex; gap: 5px; align-items: center; font-size: .73rem; color: var(--insight-muted); }
.insight-key { display: inline-block; width: 16px; height: 0; border-top: 2px solid #126f69; }
.insight-key.bid { border-top: 2px dashed #245cef; }
.insight-key.target { border-top: 2px dotted #657d9c; }
.insight-key.marker { width: 8px; height: 8px; border: 0; background: #9a551a; border-radius: 1px; }
.insight-key.missing { position: relative; width: 9px; height: 9px; border: 0; }
.insight-key.missing::before, .insight-key.missing::after { position: absolute; top: 4px; left: 0; width: 9px; height: 1.5px; content: ""; background: #126f69; transform: rotate(45deg); }
.insight-key.missing::after { transform: rotate(-45deg); }
.insight-details { margin-top: 10px; }
.insight-details.insight-panel { margin-top: 0; }
.insight-details summary, .insight-snapshot summary { cursor: pointer; color: #334c70; font-size: .8rem; font-weight: 650; }
.insight-details[open] .insight-scroll { margin-top: 9px; }
.insight-scroll { width: 100%; overflow-x: auto; }
.insight-table { width: 100%; min-width: 0; border-collapse: collapse; }
.insight-table th, .insight-table td { height: auto; min-height: 0; padding: 6px; border-bottom: 1px solid var(--insight-line); font-size: .74rem; vertical-align: top; }
.insight-table td:first-child, .insight-table th:first-child { padding-left: 6px; }
.insight-table td:last-child, .insight-table th:last-child { padding-right: 6px; }
.insight-table tbody th { background: #fff; }
.insight-table td small { display: block; margin-top: 2px; color: var(--insight-muted); font-size: .68rem; }
.insight-table td b, .insight-events li p, .insight-entries li b { overflow-wrap: anywhere; }
.insight-events { margin-top: 5px; }
.insight-events li { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 7px 13px; border-bottom: 1px solid var(--insight-line); padding: 7px 0; font-size: .79rem; }
.insight-events li:last-child { border-bottom: none; padding-bottom: 0; }
.insight-events li p { margin: 2px 0 0; white-space: pre-wrap; }
.insight-events time { color: var(--insight-muted); }
.insight-history { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(285px, 100%), 1fr)); gap: 13px; margin-top: 12px; }
.insight-toplist, .insight-snapshots { min-width: 0; }
.insight-toplist .insight-scroll, .insight-snapshots h4 { margin-top: 6px; }
.insight-snapshot { padding: 6px 0; border-bottom: 1px solid var(--insight-line); }
.insight-snapshot:last-child { border-bottom: none; padding-bottom: 0; }
.insight-snapshot summary span { color: var(--insight-muted); font-weight: normal; margin-inline-start: 7px; }
.insight-entries { margin: 5px 0 0; padding-left: 22px; max-height: 280px; overflow-y: auto; }
.insight-entries li { padding: 4px 3px; font-size: .78rem; }
.insight-entries li b { font-weight: 550; }
.insight-entries li small { display: block; margin-top: 2px; color: var(--insight-muted); font-size: .72rem; }
.insight-your-item { color: #195853; background: #dcefe9; border-radius: 4px; padding: 1px 5px; font-size: .68rem; }
@media (max-width: 520px) {
  .insight-panel { padding: 9px; }
  .insight-detail-canvas { height: 196px; }
  .insight-events li { grid-template-columns: 1fr; gap: 2px; }
  .insight-toggle { min-height: 42px; }
}
