.cq-insights-wrap {
  margin: 1.25rem 0 1.5rem;
}
.cq-insights-wrap .card-header,
#cq-replay .card-header {
  color: #fff !important;
}
.cq-insights-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.cq-insights-head h2,
.cq-insights-panel h3,
.cq-insights-panel h4,
.cq-person-footprint h3,
.cq-person-footprint h4 {
  margin: 0 0 .45rem;
}
.cq-insights-head p,
.cq-insights-muted,
.cq-insights-asof,
.cq-insights-stat span {
  color: var(--text-secondary) !important;
}
.cq-insights-asof,
.cq-insights-status,
.cq-replay-status {
  font-size: .88rem;
}
.cq-insights-status.is-stale {
  color: #f0b95b !important;
}
.cq-insights-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin-bottom: 1rem;
}
.cq-insights-stats.mini {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.cq-insights-stat {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .85rem;
  min-width: 0;
}
.cq-insights-stat small,
.cq-insights-stat span {
  display: block;
  font-size: .78rem;
}
.cq-insights-stat strong {
  display: block;
  font-size: 1.1rem;
  overflow-wrap: anywhere;
}
.cq-insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .9rem;
}
.cq-insights-panel {
  background: rgba(13, 17, 23, .35);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
  min-width: 0;
}
.cq-insights-panel.wide {
  grid-column: 1 / -1;
}
.cq-insights-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.cq-insights-list li {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
  padding-bottom: .35rem;
}
.cq-insights-list span {
  color: var(--text-secondary) !important;
  text-align: right;
}
.cq-insights-details summary {
  color: var(--accent) !important;
  cursor: pointer;
  margin-top: .5rem;
}
.cq-insights-bars {
  display: grid;
  gap: .45rem;
  margin-bottom: 1rem;
}
.cq-insights-bar {
  display: grid;
  grid-template-columns: 5rem 1fr 4rem;
  gap: .6rem;
  align-items: center;
}
.cq-insights-bar meter {
  width: 100%;
  height: 1rem;
}
.cq-replay-controls {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: end;
  margin-bottom: 1rem;
}
.cq-replay-controls label {
  display: grid;
  gap: .25rem;
  color: var(--text-secondary) !important;
  font-size: .85rem;
}
.cq-replay-controls input,
.cq-replay-controls select {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .55rem .65rem;
}
.cq-replay-controls button {
  border: 1px solid rgba(88,166,255,.55);
  background: rgba(88,166,255,.16);
  color: var(--text-primary);
  border-radius: 8px;
  padding: .58rem .9rem;
  font-weight: 700;
}
.cq-replay-player {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}
.cq-replay-event {
  display: grid;
  gap: .25rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem;
}
.cq-replay-event strong {
  font-size: 1.4rem;
}
#cq-replay-scrub {
  width: 100%;
  margin: .75rem 0;
}
#cq-replay-grid[hidden] {
  display: none;
}
#cq-replay-grid svg {
  width: 100%;
  min-height: 230px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: radial-gradient(circle at 40% 40%, rgba(88,166,255,.16), rgba(13,17,23,.75));
}
#cq-replay-grid circle {
  fill: rgba(88,166,255,.85);
  stroke: #fff;
  stroke-width: 1;
}
#cq-replay-grid text {
  fill: #fff;
  font-size: 12px;
}
.cq-person-footprint {
  margin-top: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}
.cq-person-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 860px) {
  .cq-insights-head,
  .cq-insights-list li {
    display: block;
  }
  .cq-insights-stats,
  .cq-insights-stats.mini,
  .cq-insights-grid,
  .cq-replay-player,
  .cq-person-columns {
    grid-template-columns: 1fr;
  }
  .cq-insights-list span {
    display: block;
    text-align: left;
    margin-top: .12rem;
  }
  .cq-insights-bar {
    grid-template-columns: 4.5rem 1fr 3rem;
  }
}
@media (max-width: 520px) {
  .cq-replay-controls {
    display: grid;
  }
  .cq-replay-controls button,
  .cq-replay-controls label,
  .cq-replay-controls input,
  .cq-replay-controls select {
    width: 100%;
  }
}

.cq-insights-wrap .cq-replay-duration { width:100%; height:1rem; }
.cq-insights-wrap .cq-replay-toggle { display:flex; align-items:center; gap:.4rem; }
.cq-insights-wrap .cq-replay-toggle input[type="checkbox"] { width:1.1rem; height:1.1rem; flex:0 0 auto; padding:0; margin:0; accent-color:#58a6ff; }
