:root {
  /* Brand colors - vibrant originals */
  --color-primary: #032169;
  --color-primary-hover: #1A3876;
  --color-accent: #CB003E;
  --color-accent-hover: #DF0B53;

  /* Primary scale (blues) */
  --color-primary-50: #E6EAF3;
  --color-primary-100: #C2CCDF;
  --color-primary-200: #8699BC;
  --color-primary-300: #4D6899;
  --color-primary-400: #1A3876;
  --color-primary-500: #032169;
  --color-primary-600: #021A54;
  --color-primary-700: #01133F;

  /* Accent scale (reds) */
  --color-accent-50: #FCE6ED;
  --color-accent-100: #F7C2D4;
  --color-accent-200: #EF85A9;
  --color-accent-300: #E7487E;
  --color-accent-400: #DF0B53;
  --color-accent-500: #CB003E;
  --color-accent-600: #A20032;
  --color-accent-700: #7A0025;

  /* Neutrals - balanced */
  --color-neutral-50: #F7F8FA;
  --color-neutral-100: #EDF0F3;
  --color-neutral-200: #DFE3E8;
  --color-neutral-300: #C8CED6;
  --color-neutral-400: #9EA8B3;
  --color-neutral-500: #73808D;
  --color-neutral-600: #4A5568;
  --color-neutral-700: #2D3748;
  --color-neutral-800: #1A202C;
  --color-neutral-900: #0F1419;

  /* Semantic - balanced (not vibrant) */
  --color-success: #3B9B52;
  --color-success-bg: #EDF7ED;
  --color-success-border: #3B9B52;
  --color-warning: #E6A700;
  --color-warning-bg: #FFF9E6;
  --color-warning-border: #E6A700;
  --color-error: var(--color-accent-500);
  --color-error-bg: #FCE6ED;
  --color-error-border: #CB003E;
  --color-info: #1C9AB4;
  --color-info-bg: #E8F6F8;
  --color-info-border: #1C9AB4;

  /* Backgrounds */
  --color-bg: #FFFFFF;
  --color-bg-secondary: var(--color-neutral-50);
  --color-bg-tertiary: var(--color-neutral-100);

  /* Text */
  --color-text: var(--color-neutral-900);
  --color-text-secondary: var(--color-neutral-600);
  --color-text-muted: var(--color-neutral-500);

  /* Borders */
  --color-border: var(--color-neutral-300);
  --color-border-light: var(--color-neutral-200);

  --grid-gap: 1rem;
  --card-radius: 0.5rem;
  --button-radius: 0.375rem;

  /* Shadows - balanced */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);

  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-bg);
}

body {
  min-height: 100vh;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Grid system */
.grid {
  display: grid;
  gap: var(--grid-gap);
}

.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Flexbox utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }

/* Spacing */
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem; padding-bottom: 2rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.25;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.125rem; }

.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-mono { font-family: var(--font-mono); }
.text-secondary { color: var(--color-text-secondary); }
.text-muted { color: var(--color-text-muted); }

/* Cards */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: var(--shadow);
  transition: all 0.2s ease;
}

.card:hover {
  border-color: var(--color-primary-200);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card.selected {
  border-color: var(--color-primary-300);
  background: var(--color-neutral-50);
  box-shadow: 0 2px 8px rgba(3, 33, 105, 0.12);
}

.card-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.card-link:hover {
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-size: 0.938rem;
  font-weight: 500;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.btn-primary {
  background: var(--color-primary-500);
  color: white;
  border-color: var(--color-primary-600);
}

.btn-primary:hover {
  background: var(--color-primary-400);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.btn-primary:active {
  background: var(--color-primary-600);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-accent {
  background: var(--color-accent-500);
  color: white;
  border-color: var(--color-accent-600);
}

.btn-accent:hover {
  background: var(--color-accent-400);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.btn-secondary {
  background: var(--color-bg);
  color: var(--color-neutral-700);
  border-color: var(--color-neutral-300);
}

.btn-secondary:hover {
  background: var(--color-neutral-50);
  border-color: var(--color-neutral-400);
  text-decoration: none;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

.btn-icon {
  padding: 0.5rem;
  width: 2rem;
  height: 2rem;
}

/* Form elements */
.input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: var(--button-radius);
  background: var(--color-bg);
  color: var(--color-text);
}

.input:focus {
  outline: none;
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgba(3, 33, 105, 0.12);
}

.input::placeholder {
  color: var(--color-text-muted);
}

/* Badges/Pills */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 9999px;
  background: var(--color-bg-tertiary);
  color: var(--color-text-secondary);
}

.badge-primary {
  background: rgba(59, 130, 246, 0.1);
  color: var(--color-primary);
}

/* Asset type badges - balanced with vibrant brand for role/style */
.badge-role {
  background: #E6EAF3;
  color: #032169;
  border: 1px solid #4D6899;
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
}
.badge-workflow {
  background: #F0E8F5;
  color: #5A3D75;
  border: 1px solid #8B5BA8;
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
}
.badge-tool {
  background: #E0F3F6;
  color: #115E72;
  border: 1px solid #1C9AB4;
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
}
.badge-context {
  background: #E6F4E9;
  color: #236032;
  border: 1px solid #3B9B52;
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
}
.badge-style {
  background: #FCE6ED;
  color: #7A0025;
  border: 1px solid #CB003E;
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
}
.badge-task {
  background: #FCEEE5;
  color: #A65521;
  border: 1px solid #E67E22;
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
}
.badge-format {
  background: #EBE8F0;
  color: #453862;
  border: 1px solid #6B5B95;
  padding: 0.375rem 0.75rem;
  border-radius: 12px;
  font-weight: 600;
}

/* Navigation - vibrant brand */
.nav {
  background: var(--color-primary-500);
  color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-weight: 600;
  font-size: 1.25rem;
  color: white;
}

.nav-brand:hover {
  text-decoration: none;
  color: white;
}

.nav-links {
  display: flex;
  gap: 1rem;
  list-style: none;
}

.nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.nav-link:hover {
  color: white;
  background: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

.nav-link.active {
  color: white;
  background: rgba(255, 255, 255, 0.15);
  border-bottom: 2px solid var(--color-accent-500);
}

/* Content area */
.content-header {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg-secondary);
}

.main-content {
  padding: 1.5rem 0;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem;
  color: var(--color-text-secondary);
}

/* Code/Content display */
.content-preview {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 1rem;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
  max-height: 400px;
  overflow-y: auto;
}

/* Toast notifications */
.toast {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  padding: 0.75rem 1rem;
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: var(--card-radius);
  font-size: 0.875rem;
  box-shadow: var(--shadow-md);
  z-index: 1000;
  animation: slideIn 0.2s ease;
}

@keyframes slideIn {
  from {
    transform: translateY(1rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Filter pills */
.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.filter-pill {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 9999px;
  border: 1px solid var(--color-border);
  background: var(--color-bg);
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-pill.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: white;
}

/* Asset metadata */
.metadata-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.metadata-item {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.metadata-label {
  color: var(--color-text-secondary);
}

.metadata-value {
  color: var(--color-text);
  font-weight: 500;
}

/* Hidden utility */
.hidden { display: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
