/* Light mode tokens (default) */
:root {
  --silk-bg:              #f0f2f7;
  --silk-surface:         #ffffff;
  --silk-border:          #d8dce8;
  --silk-nav-bg:          #1e2235;
  --silk-nav-hover-bg:    #2d3250;
  --silk-nav-hover-text:  #e8eaf6;

  --silk-text-primary:    #111827;
  --silk-text-secondary:  #374151;
  --silk-text-muted:      #6b7280;
  --silk-text-nav:        #e8eaf6;

  --silk-card-shadow:     0 1px 3px rgba(0, 0, 0, 0.10), 0 1px 8px rgba(0,0,0,0.06);
  --silk-card-radius:     10px;

  --silk-row-hover-bg:    #eef1fb;
  --silk-row-hover-text:  #111827;

  /* Performance color scale — vivid, accessible */
  --silk-perf-very-good:  #16a34a;
  --silk-perf-good:       #65a30d;
  --silk-perf-ok:         #d97706;
  --silk-perf-bad:        #dc2626;
  --silk-perf-very-bad:   #9f1239;

  /* Method badge colors */
  --silk-method-get:      #166534;
  --silk-method-get-bg:   #dcfce7;
  --silk-method-post:     #1e40af;
  --silk-method-post-bg:  #dbeafe;
  --silk-method-put:      #92400e;
  --silk-method-put-bg:   #fef3c7;
  --silk-method-patch:    #5b21b6;
  --silk-method-patch-bg: #ede9fe;
  --silk-method-delete:   #991b1b;
  --silk-method-delete-bg:#fee2e2;

  /* Status code colors */
  --silk-status-2xx:      #166534;
  --silk-status-2xx-bg:   #dcfce7;
  --silk-status-3xx:      #1e40af;
  --silk-status-3xx-bg:   #dbeafe;
  --silk-status-4xx:      #92400e;
  --silk-status-4xx-bg:   #fef3c7;
  --silk-status-5xx:      #991b1b;
  --silk-status-5xx-bg:   #fee2e2;

  /* Input / form */
  --silk-input-bg:        #ffffff;
  --silk-input-border:    #c8ccd8;

  /* Filter bar */
  --silk-filter-bg:       #f5f7fb;
  --silk-filter-border:   #d8dce8;

  /* Interactive action color (buttons, active chips) — distinct from nav in dark mode */
  --silk-action-bg:       #1e2235;
  --silk-action-text:     #e8eaf6;

  /* Chart accent — visible on light background */
  --silk-chart-accent:    #4f46e5;

  /* Syntax highlighting — GitHub Light palette */
  --silk-code-bg:         #f6f8fa;
  --silk-code-text:       #24292f;
  --silk-code-comment:    #6e7781;
  --silk-code-keyword:    #cf222e;
  --silk-code-string:     #0a3069;
  --silk-code-number:     #0550ae;
  --silk-code-function:   #8250df;
  --silk-code-type:       #0550ae;
  --silk-code-builtin:    #953800;
  --silk-code-meta:       #6e7781;
  --silk-code-attr:       #116329;
  --silk-code-variable:   #953800;
  --silk-code-tag:        #116329;
  --silk-code-operator:   #24292f;
  --silk-code-regexp:     #116329;
  --silk-code-deletion:   #82071e;

  /* Active line highlight in code snippets */
  --silk-code-active-line:        rgba(207, 34, 46, 0.08);
  --silk-code-active-line-border: rgba(207, 34, 46, 0.30);
}

/* Dark mode tokens */
[data-theme="dark"] {
  --silk-bg:              #121220;
  --silk-surface:         #1e1e32;
  --silk-border:          #2e2e48;
  --silk-nav-bg:          #1a1a2e;
  --silk-nav-hover-bg:    #2e2e48;
  --silk-nav-hover-text:  #e0e0f0;

  --silk-text-primary:    #e0e0f0;
  --silk-text-secondary:  #9999bb;
  --silk-text-muted:      #6666aa;
  --silk-text-nav:        #e0e0f0;

  --silk-card-shadow:     0 1px 4px rgba(0, 0, 0, 0.4);

  --silk-row-hover-bg:    #2a2a44;
  --silk-row-hover-text:  #e0e0f0;

  /* Performance colors lighter for dark mode contrast */
  --silk-perf-very-good:  #8bc34a;
  --silk-perf-good:       #cddc39;
  --silk-perf-ok:         #ff9800;
  --silk-perf-bad:        #f44336;
  --silk-perf-very-bad:   #e91e63;

  /* Method badge colors – softer on dark */
  --silk-method-get:      #81c784;
  --silk-method-get-bg:   #1b3a1f;
  --silk-method-post:     #64b5f6;
  --silk-method-post-bg:  #152a40;
  --silk-method-put:      #ffb74d;
  --silk-method-put-bg:   #3d2a0a;
  --silk-method-patch:    #ce93d8;
  --silk-method-patch-bg: #2e1840;
  --silk-method-delete:   #ef9a9a;
  --silk-method-delete-bg:#401010;

  /* Status code colors */
  --silk-status-2xx:      #81c784;
  --silk-status-2xx-bg:   #1b3a1f;
  --silk-status-3xx:      #64b5f6;
  --silk-status-3xx-bg:   #152a40;
  --silk-status-4xx:      #ffb74d;
  --silk-status-4xx-bg:   #3d2a0a;
  --silk-status-5xx:      #ef9a9a;
  --silk-status-5xx-bg:   #401010;

  /* Input / form */
  --silk-input-bg:        #1e1e32;
  --silk-input-border:    #3a3a58;

  /* Filter bar */
  --silk-filter-bg:       #1a1a30;
  --silk-filter-border:   #2e2e48;

  /* Interactive action color — visible indigo on dark backgrounds */
  --silk-action-bg:       #5252c8;
  --silk-action-text:     #e8e8ff;

  /* Chart accent — bright on dark background */
  --silk-chart-accent:    #818cf8;

  /* Syntax highlighting — GitHub Dark palette */
  --silk-code-bg:         #161b22;
  --silk-code-text:       #c9d1d9;
  --silk-code-comment:    #8b949e;
  --silk-code-keyword:    #ff7b72;
  --silk-code-string:     #a5d6ff;
  --silk-code-number:     #79c0ff;
  --silk-code-function:   #d2a8ff;
  --silk-code-type:       #79c0ff;
  --silk-code-builtin:    #ffa657;
  --silk-code-meta:       #8b949e;
  --silk-code-attr:       #7ee787;
  --silk-code-variable:   #ffa657;
  --silk-code-tag:        #7ee787;
  --silk-code-operator:   #c9d1d9;
  --silk-code-regexp:     #7ee787;
  --silk-code-deletion:   #ffdcd7;

  /* Active line highlight in code snippets */
  --silk-code-active-line:        rgba(255, 123, 114, 0.12);
  --silk-code-active-line-border: rgba(255, 123, 114, 0.40);
}
