/* ==========================================================================
   Design tokens.

   This is the file to edit to change how the application looks. Nothing else
   should contain a colour, a font size, a spacing value or a radius — if you
   find one elsewhere, it is a bug in app.css, not a licence to add another.

   The values are measured from Harvest's own design system rather than chosen
   by eye, because Harvest serves its whole stylesheet publicly from its login
   page. Where we depart from it, app.css says so and why.

   The one rule that matters most, and the easiest to undo by accident:

     Orange marks identity and selection. The logo, the section you are in,
     today's date, a checked box. It is NOT the button colour.

     Green is the primary action. Blue is data. Red is destructive or over.

   Harvest reads calm despite a loud brand colour entirely because of that
   separation. Making the primary button orange is the change that would most
   cheapen this interface, and it will look tempting.
   ========================================================================== */

:root {
  /* --- Neutrals --------------------------------------------------------- */
  --white: #fff;
  --warm-white: #fff8f1;         /* page background */
  --charcoal: #1d1e1c;           /* body text; deliberately not black */
  --gray-100: #eee;              /* table header bands, meter tracks */
  --gray-150: #ddd;
  --gray-300: #bbb;
  --gray-500: #8d8e8d;
  --gray-700: #616261;
  --gray-900: #343533;

  /* Borders, muted text and hover states are built from these rather than
     from the solid greys, which is what lets the same tokens sit on white and
     on warm white without a second set. */
  --a-07: rgba(29, 30, 28, .07);
  --a-15: rgba(29, 30, 28, .15);
  --a-25: rgba(29, 30, 28, .25);
  --a-30: rgba(29, 30, 28, .3);
  --a-40: rgba(29, 30, 28, .4);
  --a-62: rgba(29, 30, 28, .62);
  --a-70: rgba(29, 30, 28, .7);
  --a-80: rgba(29, 30, 28, .8);

  /* --- Hues ------------------------------------------------------------- */
  --orange-100: #ffe7d9;
  --orange-200: #ffc5a3;
  --orange-400: #ff8036;
  --orange: #fa5d00;
  --orange-600: #df4b00;
  --orange-700: #bf3b00;

  --green-100: #daefdc;
  --green-200: #a8d6ad;
  --green-400: #46a159;
  --green: #188433;
  --green-600: #11742a;
  --green-700: #0b6221;

  --blue-100: #deedfd;
  --blue-200: #b1d0f8;
  --blue-300: #86b1f1;
  --blue: #376bdd;
  --blue-600: #2a59c1;
  --blue-700: #1e48a3;

  --red-100: #fde2dd;
  --red-200: #f7b7ae;
  --red-300: #ef8b81;
  --red: #d92f2f;
  --red-600: #be2923;
  --red-700: #a12318;

  --yellow-100: #fff1cd;
  --yellow-300: #ffda84;
  --yellow: #ffc33c;
  --yellow-600: #d99c22;
  --yellow-700: #b3730f;

  /* Team timeline on Business. Measured from the calendar the owner asked
     to match: time off is this pink, and weekends share one grey with UK
     public holidays. Neither is a status colour. */
  --leave: #a6447d;
  --day-closed: #e0dfe0;

  /* Text sits on a darker step than the fill it names, or it fails contrast.
     Never set text in --green or --yellow. */
  --text: var(--charcoal);
  --text-muted: var(--a-70);
  --text-green: var(--green-700);
  --text-yellow: var(--yellow-700);
  --text-red: var(--red-700);
  --text-blue: var(--blue-600);

  /* --- Spacing: a strict 4/8 scale. There is no 12 and no 48. ----------- */
  --s-xs: 4px;
  --s-sm: 8px;
  --s-md: 16px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-xxl: 64px;

  /* --- Radii: 8px is the default, 4px for small controls --------------- */
  --r-xs: 2px;
  --r-sm: 4px;
  --r: 8px;
  --r-lg: 16px;
  --r-pill: 32px;

  /* --- Elevation -------------------------------------------------------
     Three recipes, and only three. Hairlines carry structure; shadow is
     reserved for things that genuinely float above the page. A card with a
     shadow is a card that has stopped meaning anything. */
  --sh-control: 0 2px 2px #0000000a;          /* buttons and selects */
  --sh-well: inset 0 2px #0000000a;           /* inputs: the inverse */
  --sh-float: 0 1px 1px #00000004, 0 2px 4px #00000006, 0 3px 6px #0000000d,
              0 4px 8px #00000013, 0 5px 10px #0000001a;
  --sh-toast: 0 .5px 1px #00000004, 0 1px 2px #00000006,
              0 1.5px 3px #0000000d, 0 2px 4px #00000013;

  /* --- Type ------------------------------------------------------------
     Harvest ships a licensed variable face, Muoto. Rather than pull a font
     from a CDN — an external runtime dependency, and a request to a third
     party on every page load — this uses the system UI stack, which is a
     geometric-humanist sans on every platform we run on. Inter is the closest
     match if a webfont is ever wanted; self-host it, don't hotlink it.

     Five heading sizes, two body sizes, three weights. The short ramp is a
     density technique: emphasis comes from weight and colour, never from a
     size jump. Note bold is 550, not 700. */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --t-xxl: 32px;
  --t-xl: 28px;
  --t-lg: 24px;
  --t-md: 18px;
  --t-base: 15px;
  --t-sm: 13px;
  --t-xs: 12px;

  --w-normal: 400;
  --w-semi: 500;
  --w-bold: 550;

  --lh: 1.4;
  --lh-tight: 1.25;

  /* --- Control heights -------------------------------------------------
     Buttons, inputs and selects share these, so a toolbar lines up without
     per-page adjustment. Changing one without the others is what makes an
     interface look slightly wrong in a way nobody can name. */
  --h-lg: 40px;
  --h: 34px;
  --h-sm: 29px;
  --h-xs: 25px;

  /* --- Page ------------------------------------------------------------- */
  --page-max: 1216px;
  --nav-height: 56px;

  /* Narrow enough that the one button on the sign-in page is unmissable. */
  --signin-max: 26rem;

  --wiki-search: 16rem;

  /* Settings sections. Wide enough for "Time categories" on one line. */
  --settings-side: 13rem;
}
