/* ==========================================================================
   Connecfy — design tokens
   Shared by the website, the customer dashboard, the staff console and the
   documentation site. docs/css/tokens.css must stay byte-identical to this
   file (apps/tests/test_design_assets.py enforces it), so edit here and copy.

   Foundations:  ink + paper, one accent ("signal"), hairline borders.
   Type:         Manrope (interface), Newsreader (editorial headings),
                 DM Mono (identifiers, numbers, code). All self-hosted, OFL.
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("../fonts/newsreader-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("../fonts/dm-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;

  /* ---- Colour: neutrals (cool slate, derived from the navy) ------------- */
  --slate-950: #0A1520;
  --slate-900: #0F1D2A;   /* ink */
  --slate-800: #142B40;   /* navy — primary surfaces & buttons */
  --slate-700: #24425E;   /* navy, lifted */
  --slate-600: #3D5266;
  --slate-500: #5F6F7C;   /* muted text — 5.2:1 on white */
  --slate-400: #8494A1;   /* graphics / disabled only */
  --slate-300: #C6D0D6;   /* strong rule */
  --slate-200: #DDE3E7;   /* default rule */
  --slate-150: #E7ECEF;
  --slate-100: #EEF2F3;
  --slate-50:  #F3F5F5;   /* paper */
  --white:     #FFFFFF;

  /* ---- Colour: accent — "signal" (cyan-teal) ---------------------------- */
  --signal-50:  #EAF7F8;
  --signal-100: #D2EEF1;
  --signal-200: #A6DDE3;
  --signal-400: #3CC6D2;  /* on dark surfaces */
  --signal-500: #0E9AA7;  /* graphics, fills */
  --signal-600: #0C8794;
  --signal-700: #0A7482;  /* text & links on light — 5.5:1 */
  --signal-800: #085A66;

  /* ---- Colour: status --------------------------------------------------- */
  --green-50:  #E8F5EE;  --green-100: #CDE9D9;  --green-600: #1F7A4D;  --green-700: #18633E;
  --amber-50:  #FDF4E1;  --amber-100: #F8E4B8;  --amber-500: #E2A446;  --amber-700: #8A5A0B;
  --red-50:    #FCECEA;  --red-100:   #F7D3CE;  --red-600:   #B3382C;  --red-700:   #962D23;

  /* ---- Colour: semantic aliases (use these in components) --------------- */
  --bg:            var(--slate-50);
  --surface:       var(--white);
  --surface-2:     #F8FAFA;              /* table headers, sunken areas */
  --text:          var(--slate-900);
  --text-2:        #3A4D5E;              /* secondary text */
  --text-muted:    var(--slate-500);
  --border:        var(--slate-200);
  --border-strong: var(--slate-300);
  --accent:        var(--signal-500);
  --accent-text:   var(--signal-700);
  --accent-soft:   var(--signal-50);
  --primary:       var(--slate-800);
  --primary-hover: var(--slate-700);
  --focus:         var(--signal-500);

  /* ---- Typography ------------------------------------------------------- */
  --font-sans:  "Manrope", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --font-mono:  "DM Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --fs-100: 0.75rem;     /* 12 */
  --fs-200: 0.8125rem;   /* 13 */
  --fs-300: 0.875rem;    /* 14 */
  --fs-400: 0.9375rem;   /* 15 — app body */
  --fs-500: 1rem;        /* 16 — site body */
  --fs-600: 1.125rem;    /* 18 */
  --fs-700: 1.25rem;     /* 20 */
  --fs-800: 1.5rem;      /* 24 */
  --fs-900: 1.875rem;    /* 30 */
  --fs-1000: 2.375rem;   /* 38 */
  --fs-1100: 3rem;       /* 48 */
  --fs-display: clamp(2.5rem, 1.35rem + 4.4vw, 4.375rem);
  --fs-title:   clamp(1.875rem, 1.3rem + 2.2vw, 2.875rem);

  --lh-tight: 1.1;
  --lh-snug: 1.3;
  --lh-body: 1.55;

  /* ---- Space (4px grid) ------------------------------------------------- */
  --sp-1: 0.25rem;  --sp-2: 0.5rem;   --sp-3: 0.75rem;  --sp-4: 1rem;
  --sp-5: 1.25rem;  --sp-6: 1.5rem;   --sp-8: 2rem;     --sp-10: 2.5rem;
  --sp-12: 3rem;    --sp-16: 4rem;    --sp-20: 5rem;    --sp-24: 6rem;

  /* ---- Shape ------------------------------------------------------------ */
  --r-1: 3px;
  --r-2: 6px;
  --r-3: 10px;
  --r-pill: 999px;

  /* ---- Elevation: borders do the work; shadows only float above content - */
  --shadow-pop: 0 14px 36px -10px rgba(10, 21, 32, 0.28), 0 2px 6px rgba(10, 21, 32, 0.08);
  --shadow-focus: 0 0 0 3px rgba(14, 154, 167, 0.28);

  /* ---- Motion ----------------------------------------------------------- */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur-1: 120ms;
  --dur-2: 220ms;

  /* ---- Layout ----------------------------------------------------------- */
  --sidebar-w: 15.5rem;
  --page-max: 77.5rem;
  --site-max: 75rem;
  --page-pad: clamp(1rem, 3vw, 2.5rem);

  /* ---- Layering --------------------------------------------------------- */
  --z-sticky: 20;
  --z-drawer: 40;
  --z-dialog: 60;
  --z-toast: 80;
}
