/* Shared design system for all /tools/ pages.
   Canonical color tokens, typography, and button component -- the parts
   confirmed consistent (or reconcilable) across all 14 tool pages.
   Loaded on every tool page after main.css and before each page's own
   <style> block, so page-specific rules can still layer on top for
   genuinely tool-specific UI (result grids, visualizations, chat panes)
   that isn't part of the shared component set. */

:root {
  --primary: #6740cb;
  --primary-light: #8b5cf6;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --orange: #f97316;
  --orange-light: #ffedd5;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --text-dark: #222933;
  --text-secondary: #64748b;
  --border: #e2e8f0;
}

/* Buttons -- canonical version reconciles the two implementations found
   across the tool pages (gradient-primary vs flat-primary) into one. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(103, 64, 203, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(103, 64, 203, 0.35);
}

.btn-secondary {
  background: var(--bg-light);
  color: var(--text-dark);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Base typography, shared across tool pages */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
}
