/* Ekron tokens, v2. Generated from the Figma file Rvq44i3wy3zcR88UaN4oW6.
   Load once, before any component CSS. Works with or without Tailwind. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/SpaceGrotesk-Variable.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Palette. Screens never use these directly; use the semantic names below. */
  --green-25: #EEF4F0;
  --green-50: #E3ECE6;
  --green-75: #DDE8E0;
  --green-100: #DFE6E1;
  --green-150: #D5E3D9;
  --green-200: #BFD3C6;
  --green-300: #8DB49B;
  --green-500: #4A7A5B;
  --green-700: #2E5E3F;
  --green-900: #1F4530;
  --ink: #1C1F1D;
  --gray-700: #555B57;
  --gray-600: #5A605C;
  --gray-500: #6B716D;
  --gray-400: #A3ADA6;
  --paper: #FDFDFB;
  --white: #FFFFFF;
  --night-700: #3A3D3B;
  --night-800: #2B2E2C;
  --night-900: #1F2120;
  --amber: #8F5A00;
  --amber-soft: #F6E7C8;
  --red: #A4321F;
  --red-soft: #F7DCD5;
  --amber-300: #E8B04A;
  --amber-900: #3D3220;
  --red-300: #F08A7A;
  --red-900: #45231E;

  /* Semantic colors, light */
  --surface: var(--paper);
  --surface-raised: var(--white);
  --surface-tint: var(--green-25);
  --surface-tint-strong: var(--green-100);
  --surface-brand: var(--green-700);
  --surface-rail: var(--green-700);
  --surface-rail-tile: var(--green-500);
  --text: var(--ink);
  --text-secondary: var(--gray-700);
  --text-muted: var(--gray-500);
  --text-on-brand: var(--white);
  --text-on-brand-secondary: var(--green-50);
  --label-on-brand: var(--green-200);
  --brand: var(--green-700);
  --action: var(--green-700);
  --action-hover: var(--green-900);
  --on-action: var(--white);
  --focus-ring: var(--green-700);
  --focus-ring-on-brand: var(--white);
  --line: var(--green-100);
  --line-strong: var(--gray-500);
  --line-on-brand: var(--green-500);
  --positive: var(--green-700);
  --positive-soft: var(--green-25);
  --attention: var(--amber);
  --attention-soft: var(--amber-soft);
  --critical: var(--red);
  --critical-soft: var(--red-soft);
  --on-critical: var(--white);
  --chart-1: var(--green-900);
  --chart-2: var(--green-700);
  --chart-3: var(--green-500);
  --chart-4: var(--green-300);

  /* Space */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;

  /* Sizes */
  --control-height: 32px;
  --control-height-touch: 48px;
  --row-height: 40px;
  --row-height-2: 56px;
  --row-height-2-touch: 64px;
  --header-height: 48px;
  --column-header-height: 32px;
  --footer-height: 40px;
  --topbar-height: 64px;
  --ask-height: 40px;
  --tag-height: 20px;
  --tag-marker: 6px;
  --icon-tile: 32px;
  --icon-tile-touch: 40px;
  --icon-tile-lg: 56px;
  --week: 10px;
  --week-lg: 16px;
  --sidebar-width: 240px;
  --queue-list-width: 464px;
  --record-side-width: 368px;
  --content-width: 1136px;

  --font-sans: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
  --shadow-overlay: 0 12px 32px rgba(28, 31, 29, 0.16);
  --motion: 120ms ease-out;
  color-scheme: light;
}

/* Dark is provisional: the Figma file only draws light. Set data-theme="dark" or the .dark class on <html>. */
[data-theme="dark"], .dark {
  --surface: var(--night-800);
  --surface-raised: var(--night-700);
  --surface-tint: var(--green-900);
  --surface-tint-strong: var(--night-900);
  --surface-rail: var(--night-900);
  --surface-rail-tile: var(--night-700);
  --text: var(--paper);
  --text-secondary: var(--green-100);
  --text-muted: var(--gray-400);
  --brand: var(--green-300);
  --action: var(--green-300);
  --action-hover: var(--green-200);
  --on-action: var(--ink);
  --focus-ring: var(--green-300);
  --line: var(--gray-700);
  --line-strong: var(--gray-400);
  --line-on-brand: var(--night-700);
  --positive: var(--green-300);
  --positive-soft: var(--green-900);
  --attention: var(--amber-300);
  --attention-soft: var(--amber-900);
  --critical: var(--red-300);
  --critical-soft: var(--red-900);
  --on-critical: var(--ink);
  --chart-1: var(--green-25);
  --chart-2: var(--green-200);
  --chart-3: var(--green-300);
  --chart-4: var(--green-500);
  --shadow-overlay: 0 12px 32px rgba(0, 0, 0, 0.48);
  color-scheme: dark;
}

@layer base {
  html { font-family: var(--font-sans); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
  body { background: var(--surface); color: var(--text); }
}

/* Type. Use these classes, not text-sm or text-lg: they carry size, line height and weight together. */
@layer components {
  .type-figure { font: 700 28px/32px var(--font-sans); }
  .type-title { font: 700 24px/32px var(--font-sans); letter-spacing: -0.2px; }
  .type-heading { font: 700 16px/24px var(--font-sans); }
  .type-body { font: 400 14px/20px var(--font-sans); }
  .type-body-strong { font: 500 14px/20px var(--font-sans); }
  .type-small { font: 400 12px/16px var(--font-sans); }
  .type-small-strong { font: 500 12px/16px var(--font-sans); }
  .type-m-title { font: 700 24px/32px var(--font-sans); letter-spacing: -0.2px; }
  .type-m-heading { font: 700 18px/24px var(--font-sans); }
  .type-m-body { font: 400 16px/24px var(--font-sans); }
  .type-m-body-strong { font: 500 16px/24px var(--font-sans); }
  .type-m-small { font: 400 14px/20px var(--font-sans); }
  .type-m-small-strong { font: 500 14px/20px var(--font-sans); }

  /* Focus: a solid 2px ring with a 2px gap. Inset where the element sits flush in a panel or on the rail. */
  .ek-focus:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; }
  .ek-focus-inset:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: -2px; }
  .ek-focus-within:focus-within { outline: 2px solid var(--focus-ring); outline-offset: 2px; }

  /* Brand glyphs on a 64 grid: ink in currentColor, cut-outs in the tile's color. */
  .ek-glyph .ek-i { fill: var(--ek-ink, currentColor); }
  .ek-glyph .ek-c { fill: var(--ek-cut, var(--surface-tint)); }
  .ek-glyph .ek-is { stroke: var(--ek-ink, currentColor); }
  .ek-glyph .ek-cs { stroke: var(--ek-cut, var(--surface-tint)); }
}

/* A tag with a mist ground on a selected (mist) row takes a white ground, so it stays visible. */
@layer utilities {
  [data-selected] .ek-tag-mist, .ek-on-tint .ek-tag-mist { background-color: var(--surface-raised); }
}
