/**
 * Astryx Design Tokens — Conway-01 Autonomous Agent UI System
 * Inspired by Meta's Astryx Design System (@astryxdesign/core & StyleX principles)
 * 
 * DESIGN PRINCIPLES:
 * 1. Semantic tokens over raw values (No hardcoded hex or arbitrary pixels).
 * 2. WCAG AAA contrast compliance across all interactive states.
 * 3. Agent-ready deterministic component primitives.
 */

:root {
  /* Surface / Canvas Hierarchy */
  --astryx-surface-canvas: #070b16;
  --astryx-surface-base: #0c1222;
  --astryx-surface-panel: rgba(15, 23, 42, 0.94);
  --astryx-surface-elevated: #151f38;
  --astryx-surface-card: #131b32;
  --astryx-surface-hover: rgba(30, 41, 59, 0.85);
  --astryx-surface-interactive: #1a2542;

  /* Border / Divider Tokens */
  --astryx-border-subtle: rgba(148, 163, 184, 0.16);
  --astryx-border-standard: rgba(148, 163, 184, 0.28);
  --astryx-border-prominent: rgba(56, 189, 248, 0.45);
  --astryx-border-focus: #38bdf8;

  /* Typography / Text Tokens (Contrast Tested > 7.0:1) */
  --astryx-text-primary: #f8fafc;
  --astryx-text-secondary: #cbd5e1;
  --astryx-text-muted: #94a3b8;
  --astryx-text-inverse: #020617;

  /* Brand & Accents */
  --astryx-accent-solana: #14f195;
  --astryx-accent-conway: #a78bfa;
  --astryx-accent-cyan: #38bdf8;
  --astryx-accent-gold: #fbbf24;

  /* Semantic Status Tokens */
  --astryx-status-success-bg: rgba(74, 222, 128, 0.14);
  --astryx-status-success-text: #4ade80;
  --astryx-status-success-border: rgba(74, 222, 128, 0.35);

  --astryx-status-warning-bg: rgba(251, 191, 36, 0.14);
  --astryx-status-warning-text: #fbbf24;
  --astryx-status-warning-border: rgba(251, 191, 36, 0.35);

  --astryx-status-danger-bg: rgba(248, 113, 113, 0.14);
  --astryx-status-danger-text: #f87171;
  --astryx-status-danger-border: rgba(248, 113, 113, 0.35);

  --astryx-status-info-bg: rgba(56, 189, 248, 0.14);
  --astryx-status-info-text: #38bdf8;
  --astryx-status-info-border: rgba(56, 189, 248, 0.35);

  /* Spacing Scale */
  --astryx-space-3xs: 2px;
  --astryx-space-2xs: 4px;
  --astryx-space-xs: 6px;
  --astryx-space-sm: 8px;
  --astryx-space-md: 12px;
  --astryx-space-lg: 16px;
  --astryx-space-xl: 24px;
  --astryx-space-2xl: 32px;
  --astryx-space-3xl: 48px;

  /* Border Radii */
  --astryx-radius-sm: 4px;
  --astryx-radius-md: 8px;
  --astryx-radius-lg: 12px;
  --astryx-radius-xl: 16px;
  --astryx-radius-full: 9999px;

  /* Elevation & Shadows */
  --astryx-shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.25);
  --astryx-shadow-card: 0 16px 36px rgba(0, 0, 0, 0.35);
  --astryx-shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.55);

  /* Typography Stacks */
  --astryx-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --astryx-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Agent-Ready Layout Primitives */
.astryx-shell {
  width: 100%;
  max-width: 580px;
  background: var(--astryx-surface-card);
  border: 1px solid var(--astryx-border-standard);
  border-radius: var(--astryx-radius-xl);
  padding: var(--astryx-space-xl);
  box-shadow: var(--astryx-shadow-modal);
  backdrop-filter: blur(16px);
}

.astryx-card {
  background: var(--astryx-surface-elevated);
  border: 1px solid var(--astryx-border-subtle);
  border-radius: var(--astryx-radius-lg);
  padding: var(--astryx-space-lg);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.astryx-card:hover {
  border-color: var(--astryx-border-prominent);
  background: var(--astryx-surface-hover);
}

.astryx-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--astryx-space-xs);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: var(--astryx-radius-full);
}

.astryx-badge-success {
  background: var(--astryx-status-success-bg);
  color: var(--astryx-status-success-text);
  border: 1px solid var(--astryx-status-success-border);
}

.astryx-badge-warning {
  background: var(--astryx-status-warning-bg);
  color: var(--astryx-status-warning-text);
  border: 1px solid var(--astryx-status-warning-border);
}

.astryx-badge-info {
  background: var(--astryx-status-info-bg);
  color: var(--astryx-status-info-text);
  border: 1px solid var(--astryx-status-info-border);
}

.astryx-badge-danger {
  background: var(--astryx-status-danger-bg);
  color: var(--astryx-status-danger-text);
  border: 1px solid var(--astryx-status-danger-border);
}

.astryx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--astryx-font-sans);
  font-size: 0.88rem;
  font-weight: 600;
  padding: var(--astryx-space-md) var(--astryx-space-xl);
  border-radius: var(--astryx-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}

.astryx-btn-primary {
  background: var(--astryx-accent-cyan);
  color: var(--astryx-text-inverse);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.3);
}

.astryx-btn-primary:hover {
  background: #7dd3fc;
  transform: translateY(-1px);
}

.astryx-btn-secondary {
  background: var(--astryx-surface-interactive);
  color: var(--astryx-text-primary);
  border-color: var(--astryx-border-standard);
}

.astryx-btn-secondary:hover {
  background: var(--astryx-surface-hover);
  border-color: var(--astryx-border-prominent);
}

