/* ============================================================================
   Reference layer, copied from the Chenjio design system
   (`_ds/in-house-.../tokens/`, project "Lite app designs").

   Only layer 1 is vendored, and deliberately: a reference value names a
   position on a scale and carries no theme, so it transfers verbatim and a
   design-system update is a re-copy rather than a re-derivation. The system's
   semantic layer is scoped to `[data-theme="light"|"dark"]`, which is not how
   Material switches schemes - that mapping is ours and lives in theme.css.

   Do not edit values here. Change them in the design system and copy again.
   ========================================================================= */

:root {
  /* neutral - cool blue-grey, hue ~250 */
  --ref-neutral-0:    #ffffff;
  --ref-neutral-50:   #f6f7fa;
  --ref-neutral-75:   #eef0f5;
  --ref-neutral-100:  #e9e9ed;
  --ref-neutral-150:  #dee1ec;
  --ref-neutral-200:  #cfd3e5;
  --ref-neutral-300:  #b2b6ca;
  --ref-neutral-400:  #9397ab;
  --ref-neutral-500:  #8a8fa6;
  --ref-neutral-600:  #75798c;
  --ref-neutral-650:  #595d6c;
  --ref-neutral-700:  #4a4d5a;
  --ref-neutral-750:  #3f424d;
  --ref-neutral-800:  #2b2d3a;
  --ref-neutral-825:  #292b31;
  --ref-neutral-850:  #232532;
  --ref-neutral-900:  #1c1e2b;
  --ref-neutral-925:  #1a1c29;
  --ref-neutral-950:  #161826;
  --ref-neutral-975:  #0f1019;

  /* accent - blurple, hue ~276 */
  --ref-accent-50:    #f3f1ff;
  --ref-accent-100:   #ece9ff;
  --ref-accent-200:   #d2cefd;
  --ref-accent-300:   #b5abfc;
  --ref-accent-400:   #968ae0;
  --ref-accent-500:   #796cbf;
  --ref-accent-520:   #675ba7;
  --ref-accent-550:   #7972a9;
  --ref-accent-600:   #5d5294;
  --ref-accent-700:   #4b4470;
  --ref-accent-800:   #3a3358;
  --ref-accent-900:   #2b2741;
  --ref-accent-950:   #1f1d33;

  /* success - green, hue ~155 */
  --ref-green-100:    #dff3e9;
  --ref-green-200:    #8fd6b4;
  --ref-green-300:    #5fbf93;
  --ref-green-500:    #4a8f6b;
  --ref-green-600:    #2a6e4c;
  --ref-green-700:    #21563c;
  --ref-green-900:    #23382f;

  /* warning - warm peach, hue ~30 */
  --ref-warm-100:     #f8e6df;
  --ref-warm-200:     #e0a08f;
  --ref-warm-300:     #d18570;
  --ref-warm-500:     #a06b5f;
  --ref-warm-600:     #8a5136;
  --ref-warm-700:     #5c3a2c;
  --ref-warm-900:     #3a2b2b;

  /* danger - red, hue ~20 */
  --ref-red-100:      #fadedb;
  --ref-red-200:      #e78b80;
  --ref-red-300:      #d96658;
  --ref-red-500:      #b5453c;
  --ref-red-600:      #a3342b;
  --ref-red-700:      #6b2a25;
  --ref-red-900:      #3d2726;

  /* 4px grid */
  --space-0-5: 2px;
  --space-1:   4px;
  --space-1-5: 6px;
  --space-2:   8px;
  --space-2-5: 10px;
  --space-3:   12px;
  --space-4:   16px;
  --space-5:   20px;
  --space-6:   24px;
  --space-8:   32px;
  --space-10:  40px;
  --space-12:  48px;
  --space-16:  64px;
  --space-20:  80px;

  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-xl:   16px;
  --radius-full: 9999px;

  /*
    Type scale. The design system states it as integer px at a 16px root;
    Material's root is 125%, so 1rem here is 20px and these are the same sizes
    divided by 20. They stay in rem rather than becoming px so a reader who
    enlarges text still gets larger text - the px comment on each line is what
    it renders at default settings, not a value to paste back in.

    There are deliberately no `--typography-*` roles bundling these into a
    `font` shorthand. The shorthand needs a family, the only family to hand is
    Material's --md-text-font-family, and that is declared on `body`: a role
    declared here on :root would substitute it against `html`, where it does
    not exist, and the whole role would resolve to the guaranteed-invalid
    value. Every `font:` built on it would then be dropped and the element
    would silently fall back to its inherited size. Longhands in
    components.css, and family left to inherit, which it does anyway.
  */
  --font-size-100: 0.55rem; /* 11 */
  --font-size-200: 0.6rem;  /* 12 */
  --font-size-300: 0.65rem; /* 13 */
  --font-size-400: 0.7rem;  /* 14 - base */
  --font-size-500: 0.8rem;  /* 16 */
  --font-size-700: 1rem;    /* 20 */
  --font-size-800: 1.2rem;  /* 24 */
  --font-size-1000: 1.6rem; /* 32 */
  --font-size-1200: 2.2rem; /* 44 */
  --font-size-1300: 2.6rem; /* 52 */

  --font-weight-regular:  400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;

  --font-line-height-tight:   1;
  --font-line-height-snug:    1.2;
  --font-line-height-normal:  1.4;
  --font-line-height-relaxed: 1.5;

  --font-letter-spacing-tighter: -0.04em;
  --font-letter-spacing-tight:   -0.02em;
  --font-letter-spacing-wider:   0.08em;
}

/*
  The system steps the display sizes down below 360px and up above 1024px
  rather than scaling fluidly, which would produce fractional sizes.
*/
@media (max-width: 359px) {
  :root {
    --font-size-1300: 2rem;   /* 40 */
    --font-size-1000: 1.4rem; /* 28 */
    --font-size-800:  1rem;   /* 20 */
  }
}

@media (min-width: 1024px) {
  :root {
    --font-size-1200: 2.6rem; /* 52 */
    --font-size-1300: 3.2rem; /* 64 */
  }
}
