/* Data Editor marketing design tokens.

   Seeded from the product's own design tokens (summaintool.client/src/css/site.css): the
   action blue #2563eb, the inverted navy surface #0a1322, the slate ink scale, and the grid's
   row-state colours — wheat for a changed cell, light green for an inserted row, salmon for a
   deleted one. Type, the type scale and the header height follow Summain's Model One site
   (model.summain.com), so the two product sites read as one family: IBM Plex Sans for
   everything, headings included, and IBM Plex Mono only for data and code. The fonts are
   self-hosted (see ASSETS.fonts in src/config.ts). */

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-sans-latin-wght-normal.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-latin-400-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url(/assets/fonts/ibm-plex-mono-latin-500-normal.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Action blue: the product's --action ramp */
  --action-50: #eff6ff;
  --action-100: #dbeafe;
  --action-200: #bfdbfe;
  --action-300: #93c5fd;
  --action-400: #60a5fa;
  --action-500: #2563eb;
  --action-600: #1d4ed8;
  --action-700: #1e40af;
  --action-800: #1e3a8a;

  /* Navy: the product's inverted and dark-theme surfaces */
  --navy-950: #0a1322;
  --navy-900: #101c30;
  --navy-800: #16243a;
  --navy-700: #1f3358;
  --navy-600: #2a4a7a;
  --navy-300: #9bbada;

  /* Slate ink */
  --ink-900: #0f1b2d;
  --ink-800: #1e293b;
  --ink-700: #334155;
  --ink-600: #475569;
  --ink-500: #586679; /* 5.6:1 on white, 4.8:1 on the tinted surface (WCAG AA body text) */
  --ink-400: #94a3b8;
  --ink-300: #cbd5e1;
  --ink-200: #e2e8f0;
  --ink-100: #f1f5f9;
  --ink-050: #f8fafc;

  /* Grid row states, exactly as the product's data grid paints them (DataGridContent.tsx) */
  --cell-changed: #f5deb3; /* CSS wheat: a cell with a pending change */
  --row-inserted: #90ee90; /* CSS lightgreen: a pending new row */
  --row-deleted: #ffa394; /* a row marked for deletion */
  --cell-error: #ffc0cb; /* CSS pink: the Error column of a rejected row */
  --changed-ink: #6b4300; /* text set on wheat */
  --changed-edge: #d4b06f;

  /* Feedback, from the product's semantic tokens. Never the sole signal. */
  --positive-500: #117344;
  --positive-100: #e2f3e9;
  --negative-500: #b3261e;
  --negative-100: #fce8e6;
  --warning-500: #a35b00;
  --warning-100: #fdecd0;

  /* The product's MUI tooltip, used for the "Previously:" tag */
  --tooltip-bg: rgba(97, 97, 97, 0.92);

  /* Surfaces */
  --surface: #ffffff;
  --surface-muted: var(--ink-050);
  --surface-tinted: var(--action-50);
  --surface-inverse: var(--navy-950);
  --border: var(--ink-200);
  --border-strong: var(--ink-300);
  --gridline: rgba(15, 27, 45, 0.055);
  --gridline-inverse: rgba(155, 186, 218, 0.08);

  /* Text */
  --text-strong: var(--ink-900);
  --text-body: var(--ink-700);
  --text-subtle: var(--ink-500);
  --text-on-accent: #ffffff;
  --text-on-inverse: #e6edf6;
  --text-on-inverse-subtle: var(--navy-300);

  /* Radii: the product's scale */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-pill: 999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(11, 18, 32, 0.06), 0 1px 3px rgba(11, 18, 32, 0.04);
  --shadow-md: 0 4px 10px -2px rgba(11, 18, 32, 0.08), 0 2px 4px rgba(11, 18, 32, 0.04);
  --shadow-lg: 0 14px 28px -8px rgba(11, 18, 32, 0.16), 0 6px 12px rgba(11, 18, 32, 0.06);
  --shadow-window: 0 32px 64px -24px rgba(10, 19, 34, 0.32), 0 14px 28px -14px rgba(10, 19, 34, 0.2);
  --shadow-accent: 0 10px 22px -10px rgba(37, 99, 235, 0.65);
  --shadow-ring: 0 0 0 3px rgba(37, 99, 235, 0.24);

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
  --space-10: 128px;

  /* Layout */
  --container: 1200px;
  --container-narrow: 780px;
  /* Model One's header: 72px, 60px on phones and 77px from 1,024px (the media queries below). */
  --header-height: 72px;

  /* Type: Model One's scale */
  --font-sans: 'IBM Plex Sans', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', 'Cascadia Mono', Consolas, 'Liberation Mono', monospace;
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-md: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: clamp(1.35rem, 1.15rem + 0.9vw, 1.65rem);
  --text-2xl: clamp(1.65rem, 1.3rem + 1.6vw, 2.2rem);
  --text-3xl: clamp(2rem, 1.5rem + 2.4vw, 3rem);
  --text-4xl: clamp(2.4rem, 1.6rem + 3.6vw, 3.9rem);

  --leading-tight: 1.12;
  --leading-snug: 1.28;
  --leading-normal: 1.65;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --transition: 160ms var(--ease);
}

@media (max-width: 479px) {
  :root { --header-height: 60px; }
}

@media (min-width: 1024px) {
  :root { --header-height: 77px; }
}
