/* ==================================================================
   Mitmachbox — Color tokens
   A rationed monochrome palette + one chromatic signal.
   Direction: Swiss / Programa. Grayscale carries structure; the yellow
   is scarce and means "live / switched on".
   ================================================================== */
:root {
  /* --- Core palette : four neutrals + one signal ------------------ */
  --color-ink:        #1a1a1a;  /* primary text, borders, icon strokes, structure */
  --color-fog:        #f4f4f4;  /* sunken surface, quiet card fill, banners */
  --color-paper:      #ffffff;  /* page canvas, card surface, fills-on-dark */
  --color-accent:     #fbff2b;  /* Signal Yellow — the one chromatic accent */

  /* --- Accessibility-driven neutral refinements ------------------- */
  /* Civic products must meet BITV 2.0 / WCAG AA. Ash (#a3a3a3) is a
     2.5:1 fail on white, so it is reserved for placeholders/disabled
     only; readable secondary text uses ink-muted (5.7:1 on white). */
  --color-ink-muted:  #6b6b6b;  /* secondary & metadata text (AA on white) */
  --color-ash:        #a3a3a3;  /* placeholders, disabled, inactive glyphs ONLY */
  --color-line:       #e4e4e4;  /* light hairline for dense table dividers */

  /* --- Accent variants -------------------------------------------- */
  --color-accent-hover: #eef200; /* pressed/hover on the yellow action */
  --color-accent-ink:   #1a1a1a; /* text/icon sitting on the yellow */

  /* --- Functional signal (documented exception) ------------------- */
  /* One muted red for validation errors + destructive intent. Tuned to
     sit inside the austere palette rather than shout. Never decorative. */
  --color-danger:       #c0392b;
  --color-danger-fog:   #fbecea;

  /* ================================================================
     Semantic aliases — reference these in components, not raw hues.
     ================================================================ */
  --bg-canvas:          var(--color-paper);
  --bg-sunken:          var(--color-fog);
  --surface-card:       var(--color-paper);
  --surface-quiet:      var(--color-fog);

  --text-primary:       var(--color-ink);
  --text-secondary:     var(--color-ink-muted);
  --text-placeholder:   var(--color-ash);
  --text-disabled:      var(--color-ash);
  --text-on-accent:     var(--color-accent-ink);
  --text-danger:        var(--color-danger);

  --border-structural:  var(--color-ink);   /* buttons, inputs, cards, emphasis */
  --border-hairline:    var(--color-line);  /* dense internal dividers, rows */

  --action-primary-bg:      var(--color-accent);
  --action-primary-bg-hover:var(--color-accent-hover);
  --action-primary-border:  var(--color-ink);
  --action-primary-text:    var(--color-accent-ink);

  --focus-ring:         var(--color-ink);   /* focus is ink weight/ring, not hue */

  /* ================================================================
     Survey lifecycle status — mapped onto the monochrome + signal
     system.  "open" (collecting) = the switched-on yellow.
     ================================================================ */
  --status-open-fill:     var(--color-accent);   /* live / collecting */
  --status-open-ink:      var(--color-ink);
  --status-draft-fill:    var(--color-paper);     /* unpublished — hollow */
  --status-draft-ink:     var(--color-ink-muted);
  --status-closed-fill:   var(--color-ink);       /* finished — solid ink */
  --status-closed-ink:    var(--color-paper);
  --status-archived-fill: var(--color-fog);       /* retired — muted */
  --status-archived-ink:  var(--color-ash);
}
