/* Page-specific layouts. */

/* Overview */
.overview-run-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  align-items: center;
  font-size: 12.5px;
  color: var(--text-2);
}

.overview-run-strip .run-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.overview-charts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--space-4);
}

.overview-bottom {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--space-4);
}

@media (max-width: 1100px) {
  .overview-charts,
  .overview-bottom {
    grid-template-columns: 1fr;
  }
}

.chart-box {
  width: 100%;
  height: 240px;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  font-size: 12px;
  color: var(--text-2);
  padding: 0 var(--space-4) var(--space-3);
}

.chart-legend .legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend .legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex: none;
}

/* Reason list (overview + validation) */
.reason-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reason-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 4px var(--space-3);
  align-items: center;
  padding: 6px 8px;
  border-radius: var(--radius-m);
  color: inherit;
}

a.reason-row:hover {
  background: var(--blue-050);
  text-decoration: none;
}

.reason-row .reason-text {
  font-size: 12.3px;
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reason-row .reason-count {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  font-size: 12.5px;
}

.reason-row .reason-bar {
  grid-column: 1 / -1;
  height: 5px;
  border-radius: 3px;
  background: var(--bg-2);
  overflow: hidden;
}

.reason-row .reason-bar > span {
  display: block;
  height: 100%;
  background: var(--amber-600);
  border-radius: 3px;
}

/* Two-column detail layout */
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: start;
}

@media (max-width: 1100px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}

/* Object detail header card */
.object-header-card .meta-grid {
  grid-template-columns: minmax(110px, max-content) minmax(0, 1fr);
}

/* Runs page */
.run-artifacts {
  padding: var(--space-3) var(--space-4);
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.run-artifacts ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.run-artifacts li {
  display: grid;
  grid-template-columns: minmax(120px, 200px) minmax(0, 1fr);
  gap: var(--space-3);
  font-size: 12px;
}

/* API page */
.endpoint-table td:first-child {
  font-family: var(--font-mono);
  font-size: 12px;
  white-space: nowrap;
}

.endpoint-table .method {
  display: inline-block;
  min-width: 42px;
  font-weight: 700;
  color: var(--blue-700);
}

.endpoint-table .method.post {
  color: var(--amber-700);
}

/* Search page */
.search-hero {
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.search-hero input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m);
  font-family: var(--font-mono);
  font-size: 13px;
}

.vrp-asn-filter {
  display: flex;
  gap: var(--space-2);
  align-items: center;
  font-size: 12px;
  color: var(--text-2);
}

.vrp-asn-filter input {
  width: 180px;
  padding: 5px 9px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-m);
  font-family: var(--font-mono);
  font-size: 12px;
}

/* Validation page */
.validation-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: var(--space-4);
}

@media (max-width: 1100px) {
  .validation-summary {
    grid-template-columns: 1fr;
  }
}

/* Not found */
.not-found {
  text-align: center;
  padding: var(--space-8) 0;
}

.not-found .not-found-code {
  font-size: 40px;
  font-weight: 700;
  color: var(--text-3);
}
