/* A copy of apps/web/src/styles/tokens.css without its Tailwind theme, because this static site is built into its own
   image and cannot reach the web app's files. The marketing site's test keeps the colour values equal to the original,
   so edit the original and copy it here. */

:root {
  /* The page behind the panes, the panes (and popups, menus), and the soft band for hover and header rows. */
  --page: #f8f9f8;
  --pane: #ffffff;
  --soft: #f1f3f2;
  /* Dividers and pane edges (decorative), and the edge of a control (3 to 1 on every surface). */
  --line: #e2e5e3;
  --edge: #6f7772;
  --ink: #0b0f0c;
  --muted: #4a524c;
  /* Links, the current place, the focus ring and the selected-row bar; its tint fills the selected row. */
  --accent: #135c2c;
  --accent-soft: #e3f4e8;
  /* The one solid action of a screen region, its label and its hover. */
  --go: #135c2c;
  --go-ink: #ffffff;
  --go-hover: #0f5226;
  /* Chart bars and progress. */
  --bar: #1f8a46;
  --destructive: #9b1515;
  --destructive-bg: #fef2f2;
  /* The logo mark's fill and the favicon. It is not text, so the 7 to 1 text rule does not apply. */
  --brand-mark: #135c2c;
  /* Status, drawn only on shapes, bars, a notice's edge and a problem field's edge. Never text. */
  --status-blocking: #b42318;
  --status-clock: #c26a00;
  --status-waiting: #1d5fd1;
  --status-info: #6b6b74;
  --status-working: #15803d;
  --status-finished: #6b6b74;
  /* Good-news and warning tints: the instruction diff's added and removed lines, the development strip and the
     popup's warning picture. They are not notices, which have no fill (spec 3.12). */
  --ok-fill: #e3f4e8;
  --ok-edge: #a7d7b5;
  --ok-text: #135c2c;
  --warn-fill: #fef3c7;
  --warn-edge: #fcd34d;
  --warn-bar: #d97706;
  --warn-text: #883b0d;
  --scrim: rgba(11, 15, 12, 0.5);
  /* Level 1 is a hairline lift, level 2 something that can be pressed, level 3 something that floats. */
  --elev-1: 0 1px 2px rgba(11, 15, 12, 0.08);
  --elev-2: 0 2px 6px rgba(11, 15, 12, 0.1);
  --elev-bar: inset 3px 0 0 var(--accent);
  --elev-3: 0 8px 24px rgba(11, 15, 12, 0.16);
  /* Raised buttons (Set 44, D-239): a light edge and a small shadow under every button; the main green and the
     solid red go-ahead fall from a lighter top to their own colour, with a faint shine along the top. */
  --btn-edge: #e2e5e3;
  --btn-raise: 0 1px 2px rgba(11, 15, 12, 0.12), inset 0 -1px 0 rgba(11, 15, 12, 0.06);
  --go-top: #1b7038;
  --go-edge: #0f4d24;
  --go-raise: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(11, 15, 12, 0.25);
  --danger-top: #b41d1d;
}

/* Layout sizes and motion. They do not change with the theme, so they sit apart from the colour blocks above and the
   test that keeps the three colour blocks equal. Four timings and nothing longer: a press, a hover or colour change,
   a fold or fade, a panel opening. */
:root {
  --header-height: 48px;
  /* The side menu: 112px with a word under each icon, 56px as icons alone. The first-paint script sets the attribute
     below before the first paint, so a member who chose icons alone sees no jump. */
  --rail-width: 7rem;
  --motion-press: 80ms;
  --motion-fast: 150ms;
  --motion-fold: 200ms;
  --motion-slow: 250ms;
  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #0a0d0b;
    --pane: #151a17;
    --soft: #222a25;
    --line: #28302b;
    --edge: #9aa49e;
    --ink: #f6f8f7;
    --muted: #d0d6d2;
    --accent: #86efac;
    --accent-soft: #173822;
    --go: #4ade80;
    --go-ink: #052e16;
    --go-hover: #6ee7a0;
    --bar: #4ade80;
    --destructive: #fca5a5;
    --destructive-bg: #3a1414;
    --brand-mark: #86efac;
    --status-blocking: #ff8a80;
    --status-clock: #f5c04a;
    --status-waiting: #7db3ff;
    --status-info: #a1a1aa;
    --status-working: #4ade80;
    --status-finished: #a1a1aa;
    --ok-fill: #173822;
    --ok-edge: #2f6b42;
    --ok-text: #86efac;
    --warn-fill: #3a2a08;
    --warn-edge: #8a6d1f;
    --warn-bar: #fcd34d;
    --warn-text: #fcd34d;
    --scrim: rgba(0, 0, 0, 0.6);
    --elev-1: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.5);
    --elev-2: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.5);
    --elev-bar: inset 3px 0 0 var(--accent);
    --elev-3: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 8px 24px rgba(0, 0, 0, 0.6);
    --btn-edge: #3a443e;
    --btn-raise: 0 1px 2px rgba(0, 0, 0, 0.6);
    --go-top: #6ee7a0;
    --go-edge: #4ade80;
    --go-raise: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(11, 15, 12, 0.25);
    --danger-top: #fca5a5;
  }
}

:root[data-theme="dark"] {
  --page: #0a0d0b;
  --pane: #151a17;
  --soft: #222a25;
  --line: #28302b;
  --edge: #9aa49e;
  --ink: #f6f8f7;
  --muted: #d0d6d2;
  --accent: #86efac;
  --accent-soft: #173822;
  --go: #4ade80;
  --go-ink: #052e16;
  --go-hover: #6ee7a0;
  --bar: #4ade80;
  --destructive: #fca5a5;
  --destructive-bg: #3a1414;
  --brand-mark: #86efac;
  --status-blocking: #ff8a80;
  --status-clock: #f5c04a;
  --status-waiting: #7db3ff;
  --status-info: #a1a1aa;
  --status-working: #4ade80;
  --status-finished: #a1a1aa;
  --ok-fill: #173822;
  --ok-edge: #2f6b42;
  --ok-text: #86efac;
  --warn-fill: #3a2a08;
  --warn-edge: #8a6d1f;
  --warn-bar: #fcd34d;
  --warn-text: #fcd34d;
  --scrim: rgba(0, 0, 0, 0.6);
  --elev-1: 0 0 0 1px rgba(255, 255, 255, 0.06), 0 1px 2px rgba(0, 0, 0, 0.5);
  --elev-2: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 2px 6px rgba(0, 0, 0, 0.5);
  --elev-bar: inset 3px 0 0 var(--accent);
  --elev-3: 0 0 0 1px rgba(255, 255, 255, 0.22), 0 8px 24px rgba(0, 0, 0, 0.6);
  --btn-edge: #3a443e;
  --btn-raise: 0 1px 2px rgba(0, 0, 0, 0.6);
  --go-top: #6ee7a0;
  --go-edge: #4ade80;
  --go-raise: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 1px 2px rgba(11, 15, 12, 0.25);
  --danger-top: #fca5a5;
}
