/* All At Once — design tokens & base styles */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap');

:root {
  /* ISD palette */
  --isd-crimson:   #C7074D;
  --isd-crimson-2: #A20640;
  --isd-slate:     #5C6771;
  --isd-indigo:    #4C4193;
  --isd-blue:      #0068B2;
  --isd-coral:     #E76863;
  --isd-warm:      #B4B2B1;

  /* light theme defaults */
  --bg:          #FAF8F4;
  --bg-2:        #F2EEE6;
  --surface:     #FFFFFF;
  --surface-2:   #F7F4EE;
  --ink:         #161618;
  --ink-2:       #2F3236;
  --muted:       #5C6771;
  --muted-2:     #8A8F95;
  --border:      #E5E1D8;
  --border-2:    #D4CFC3;
  --hover:       rgba(22,22,24,0.04);
  --selected:    rgba(199,7,77,0.06);

  --accent:      var(--isd-crimson);
  --accent-ink:  #FFFFFF;
  --accent-soft: rgba(199,7,77,0.10);

  --success:     #1F8A5B;
  --warn:        #C77D07;
  --danger:      #C7074D;

  --chart-1: #C7074D;
  --chart-2: #0068B2;
  --chart-3: #4C4193;
  --chart-4: #E76863;
  --chart-5: #5C6771;
  --chart-6: #1F8A5B;
  --chart-7: #C77D07;
  --chart-8: #8A8F95;

  /* density */
  --row-h: 36px;
  --pad:   16px;
  --pad-sm: 10px;
  --pad-xs: 6px;
  --font-size: 14px;
  --font-size-sm: 12.5px;
  --font-size-xs: 11.5px;

  --radius: 4px;
  --radius-lg: 8px;

  --shadow-1: 0 1px 2px rgba(20, 22, 26, 0.04), 0 1px 1px rgba(20, 22, 26, 0.03);
  --shadow-2: 0 8px 24px rgba(20, 22, 26, 0.08), 0 2px 6px rgba(20, 22, 26, 0.04);
  --shadow-3: 0 24px 60px rgba(20, 22, 26, 0.18), 0 4px 12px rgba(20, 22, 26, 0.08);

  --font-sans: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
}

[data-theme="dark"] {
  --bg:          #0E1013;
  --bg-2:        #15181D;
  --surface:     #181B20;
  --surface-2:   #1F232A;
  --ink:         #F1ECDF;
  --ink-2:       #D9D3C3;
  --muted:       #8A8F95;
  --muted-2:     #6A6F75;
  --border:      #2A2E35;
  --border-2:    #353A42;
  --hover:       rgba(255,255,255,0.04);
  --selected:    rgba(231,104,99,0.10);

  --accent:      #E76863;
  --accent-ink:  #0E1013;
  --accent-soft: rgba(231,104,99,0.16);

  --shadow-1: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-2: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-3: 0 24px 60px rgba(0,0,0,0.6);
}

[data-density="compact"] {
  --row-h: 28px;
  --pad: 12px;
  --pad-sm: 8px;
  --font-size: 13px;
  --font-size-sm: 11.5px;
}
[data-density="comfy"] {
  --row-h: 44px;
  --pad: 20px;
  --pad-sm: 14px;
  --font-size: 15px;
}

/* base */
* { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  font-family: var(--font-sans);
  font-size: var(--font-size);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
}
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }

/* utility helpers */
.mono { font-family: var(--font-mono); font-feature-settings: 'tnum'; }
.tabular { font-variant-numeric: tabular-nums; }
.hide-scrollbar::-webkit-scrollbar { display: none; }
.hide-scrollbar { scrollbar-width: none; }

/* keyboard chip */
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  background: var(--surface);
  color: var(--muted);
  line-height: 1;
}

/* focus ring */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

/* selection */
::selection { background: var(--accent-soft); color: var(--ink); }

/* skeleton */
@keyframes pulse-bg { 0%,100% { opacity: 1; } 50% { opacity: 0.55; } }
.skel { background: var(--bg-2); border-radius: 4px; animation: pulse-bg 1.4s ease-in-out infinite; }
