/*
 * Till face tokens.
 * Provisional bases, pending the chair ruling. See NOTES_FOR_R2.md.
 * Each custom property carries its role in the comment above it.
 * The only motion in this file is the 200 ms colour transition on .till-state.
 */

:root {
  /* Page ground. Warm cream. Provisional. */
  --paper: #f4ead7;

  /* Body text. Dark warm ink. Provisional. */
  --ink: #231910;

  /* Plate used on a photograph. Provisional. */
  --lift: #fbf6ec;

  /* Dark band. Replay ink sits on this. Provisional. */
  --dusk: #241c16;

  /* Waiting. Neutral ink at 70%, mixed onto paper. */
  --till-open: color-mix(in srgb, var(--ink) 70%, var(--paper));

  /* Seen. Amber. */
  --till-detected: #6b3e00;

  /* Confirmed. Green. Final keeps this colour and adds a check glyph. */
  --till-paid: #0b5328;

  /* Mismatch and rolled back. Red. Always show a word with it. */
  --till-problem: #8a1c1c;

  /*
   * Expired. The schema role is ink at 45%. On this paper that mix is below
   * the 4.5:1 floor, so the shipped mix is ink at 64%. Amounts in this colour
   * are struck through. See NOTES_FOR_R2.md.
   */
  --till-expired: color-mix(in srgb, var(--ink) 64%, var(--paper));

  /* Present-mode amount. Must clear 7:1 on paper. */
  --till-amount-present: #1a120c;

  /* Replay ink. High contrast on dusk. */
  --till-replay: #f7f1e3;
}

.till-state {
  transition: color 200ms, background-color 200ms;
}

.till-amount-expired {
  color: var(--till-expired);
  text-decoration: line-through;
}

@media (prefers-reduced-motion: reduce) {
  .till-state {
    transition: none;
  }
}
