@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=JetBrains+Mono:wght@400&family=Space+Grotesk:wght@700&display=swap');

/* Foundational components. Dark values are the root baseline; there is no
   light variant. Every colour, space, radius and type value resolves to a
   token in tokens.css; the only literals are the 1px border, the 2px focus
   ring and the 120ms hover transition.
   The two font shorthands carry a fallback equal to the body-base and
   code-terminal styles, because the design system's preview frames define
   the --font-* families but not the --text-* shorthands.
   The @import above must stay the first rule: link this file, or keep the
   import first if you inline it. */

/* Terminal family. Mirrors type.families in tokens.json, so the monospace
   fallback holds even where a tokens.css compiled before that change is
   still being served. Keep the two in step. */
:root {
  --font-jet-brains-mono-variable-font-wght: 'Jet Brains Mono Variable Font wght', 'JetBrains Mono', monospace;
}

/* ---------- Buttons: shared geometry ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: var(--space-sm);
  border: 1px solid var(--brand-neural-cyan);
  border-radius: var(--radius-base);
  font: var(--text-body-base, 400 16px/1.5 var(--font-inter));
  letter-spacing: 0;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow 120ms ease-out, color 120ms ease-out;
}
.btn:focus-visible {
  outline: 2px solid var(--text-primary-light);
  outline-offset: 2px;
}

/* Primary CTA */
.btn-primary {
  background: var(--brand-neural-cyan);
  color: var(--surface-obsidian);
}
.btn-primary:hover {
  box-shadow: var(--shadow-glow-cyan);
}

/* Secondary */
.btn-secondary {
  background: transparent;
  color: var(--text-primary-light);
}
.btn-secondary:hover {
  color: var(--brand-neural-cyan);
}

/* ---------- Hardware Stat Card ----------
   Elevation is the surface colour and the border. No box-shadow. */
.stat-card {
  box-sizing: border-box;
  padding: var(--space-md);
  background: var(--surface-obsidian);
  border: 1px solid var(--text-secondary-muted);
  border-radius: var(--radius-base);
  color: var(--text-primary-light);
}
.stat-card__title {
  margin: 0 0 var(--space-sm);
  font: var(--text-body-base, 400 16px/1.5 var(--font-inter));
  letter-spacing: 0;
  color: var(--text-primary-light);
}
.stat-card__readout {
  margin: 0;
  padding: var(--space-sm);
  background: var(--background-deep-space);
  border-radius: var(--radius-none);
  font: var(--text-code-terminal, 400 14px/1.4 var(--font-jet-brains-mono-variable-font-wght));
  letter-spacing: 0;
  color: var(--text-primary-light);
  overflow-x: auto;
}
.stat-card__prompt {
  margin: 0 0 var(--space-xs);
  color: var(--text-secondary-muted);
  white-space: nowrap;
}
.stat-card__rows {
  display: grid;
  grid-template-columns: max-content 1fr;
  column-gap: var(--space-md);
  margin: 0;
}
.stat-card__rows dt {
  color: var(--text-secondary-muted);
  white-space: nowrap;
}
.stat-card__rows dd {
  margin: 0;
  white-space: nowrap;
}
.stat-card__value--ok {
  color: var(--brand-neural-cyan);
}
.stat-card__value--alert {
  color: var(--brand-forge-amber);
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
