.faq h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

.faq h4 {
  margin: 16px 0 6px;
  font-size: 17px;
}

.faq p {
  margin: 0 0 10px;
  color: var(--text);
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  min-width: 760px;
}

th, td {
  padding: 8px 4px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  vertical-align: top;
}

tr.row-good td { background: rgba(31, 211, 138, 0.12); }
tr.row-warn td { background: rgba(247, 193, 77, 0.12); }
tr.row-bad td { background: rgba(255, 95, 103, 0.12); }

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.chart-wrap {
  position: relative;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel-2);
  padding: 10px;
  margin-top: 10px;
}

#historyChart {
  width: 100%;
  height: 240px;
  display: block;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  display: none;
  background: var(--chart-tip-bg);
  color: var(--chart-tip-text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.35;
  max-width: 280px;
  transform: translate(10px, -10px);
  z-index: 5;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.debug-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

#debugCard { display: none; }

.debug-item {
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 8px;
  background: var(--panel-2);
}

.debug-item .label {
  font-size: 12px;
  color: var(--muted);
}

.debug-item .value {
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  #historyChart { height: 220px; }
}

@media (max-width: 640px) {
  .filters { flex-direction: column; align-items: stretch; }
  .filters button { width: 100%; }
  th, td { font-size: 13px; }
  table { min-width: 640px; }
}
