/* Tools page — P2. Reuses production tokens (--line, --panel, --text-soft,
   --text-faint, --accent) and .sec-* primitives. Only NEW components live
   here: the runtime state panel (.rt-*) and tool meta rows. Unknown /
   degraded states are NEVER styled as healthy. */

.rt-section .rt-asof {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-faint);
  white-space: nowrap;
}

.rt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4, 16px);
  margin-top: 24px;
}

.rt-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* State accents: left border only — subtle, unambiguous. */
.rt-state-live { border-left: 3px solid var(--accent); }
.rt-state-healthy { border-left: 3px solid var(--accent); }
.rt-state-degraded { border-left: 3px solid #d9a441; }
.rt-state-unavailable { border-left: 3px solid #b3564d; }
.rt-state-historical { border-left: 3px solid var(--line-strong); }

/* Unknown is neutral — deliberately NOT green/healthy. */
.rt-state-unknown { border-left: 3px solid var(--line-strong); }
.rt-unknown-value {
  color: var(--text-faint);
  font-style: italic;
}
/* Post-P4: historical ("Last known …") values are muted and explicitly
   labeled — never styled as current. */
.rt-historical {
  font-style: italic;
  color: var(--text-faint);
}
.rt-state-quarantined { border-left: 3px solid #b3564d; }

.rt-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  margin: 0;
}

.rt-value {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 0;
}

.rt-sub {
  font-size: 0.85rem;
  color: var(--text-soft);
  margin: 0;
}

.rt-model {
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.rt-note {
  font-size: 0.78rem;
  color: var(--text-faint);
  margin: 0;
}

.rt-repo-list {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  word-break: break-word;
}

.rt-footnote {
  margin-top: 20px;
  font-size: 0.8rem;
  color: var(--text-faint);
}

.rt-footnote a {
  color: var(--text-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Tool cards: descriptive metadata only. */
.rt-tool-card .rt-tool-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
}

.rt-tool-status {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--text-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px 10px;
}

.rt-tool-visibility {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--text-faint);
}

.rt-tool-card h3 a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 640px) {
  .rt-grid { grid-template-columns: 1fr; }
  .rt-section .rt-asof { display: none; }
}

/* Enriched installed-model inventory */
.rt-model-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.rt-model-row {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.rt-model-name {
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.rt-model-meta {
  color: var(--text-faint);
  font-size: 0.78rem;
}
