/* BCI Memory Read and Write System — design tokens (LIGHT) */
:root {
  /* Neutrals — warm paper */
  --bg-0: #ffffff;           /* page */
  --bg-1: #ffffff;           /* panels */
  --bg-2: #fbfaf6;           /* raised */
  --bg-3: #f0ede6;           /* hover */
  --line: #e5e2d9;           /* hairlines */
  --line-2: #d0cdc3;
  --fg-0: #0a0b0d;           /* deepest ink */
  --fg-1: #242528;
  --fg-2: #6a6a66;
  --fg-3: #9a968c;
  --fg-4: #c0bdb3;

  /* Accents — heatmap warm + cool prediction */
  --hot-0: #d64a0a;          /* activity peak — deeper for light bg */
  --hot-1: #b63c00;
  --hot-2: #8a2a00;
  --cool-0: #0e7c70;         /* predicted / synthetic */
  --cool-1: #0b5f56;
  --signal: #2a7a2a;
  --warn: #c4302b;

  /* Type */
  --f-display: 'Instrument Serif', 'Times New Roman', serif;
  --f-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  /* Scale */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* Radii — minimal */
  --r-1: 2px;
  --r-2: 4px;
  --r-3: 8px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-0);
  color: var(--fg-1);
  font-family: var(--f-sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

.mono { font-family: var(--f-mono); font-feature-settings: "ss01", "cv11"; }
.serif { font-family: var(--f-display); font-weight: 400; font-style: normal; }

.hairline { border-top: 1px solid var(--line); }
.vhairline { border-left: 1px solid var(--line); }

/* Placeholder (striped, monospace label) */
.ph {
  position: relative;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(0,0,0,0.03) 0 2px,
    transparent 2px 8px
  );
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--fg-3);
  text-transform: uppercase;
}

/* Dotted grid bg for diagrams */
.grid-bg {
  background-image: radial-gradient(circle, rgba(0,0,0,0.08) 1px, transparent 1px);
  background-size: 16px 16px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--fg-3); }

/* Heatmap gradient util */
.heat-bar {
  background: linear-gradient(to right, #2b1200, #7a2200, #cc5500, #ff8800, #ffcc33, #ffffcc);
}
