/* ossmaniacs design tokens.
 *
 * Layering, and the rule that keeps it consistent:
 *
 *   vendor/open-props.min.css   raw scales — every value in the system
 *   tokens.css   (this file)    which of them are *ours*, named by role
 *   panel.css                   components, which may only read from here
 *
 * Components never reach past this file into Open Props, so dark mode and a
 * palette change reach every one of them.
 */

:root {
  color-scheme: light dark;

  /* --- brand ------------------------------------------------------------ */
  /* Teal rather than a generic blue: it reads as infrastructure without
     reading as a bank, and it stays legible on both grounds at the two ends
     of the Open Props ramp. */
  --brand-accent:      var(--teal-8);
  --brand-accent-soft: var(--teal-0);
  --brand-accent-ink:  var(--gray-0);

  /* Semantic, not decorative. Warning and danger are states a customer is in,
     never emphasis. */
  --brand-warn:        var(--orange-9);
  --brand-warn-soft:   var(--orange-0);
  --brand-danger:      var(--red-9);
  --brand-danger-soft: var(--red-0);

  /* --- surfaces --------------------------------------------------------- */
  --ground:      var(--gray-1);
  --surface:     #fff;
  --surface-alt: var(--gray-2);
  --rule:        var(--gray-4);

  /* --- text ------------------------------------------------------------- */
  --ink:      var(--gray-9);
  --ink-soft: var(--gray-7);
  --muted:    var(--gray-6);

  /* --- type ------------------------------------------------------------- */
  --font-body: var(--font-sans);
  --font-code: var(--font-mono);

  /* --- rhythm ----------------------------------------------------------- */
  /* Named by intent so a component says what it means, not how big it is. */
  --gap-tight:  var(--size-2);
  --gap:        var(--size-3);
  --gap-loose:  var(--size-5);
  --gap-block:  var(--size-7);

  --pad-tight:  var(--size-2);
  --pad:        var(--size-3);
  --pad-loose:  var(--size-4);

  --round:       var(--radius-2);
  --round-large: var(--radius-3);
  --round-pill:  var(--radius-round);

  --lift: var(--shadow-2);

  --measure: 62rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-accent:      var(--teal-4);
    --brand-accent-soft: var(--teal-12);
    --brand-accent-ink:  var(--gray-12);

    --brand-warn:        var(--orange-4);
    --brand-warn-soft:   var(--orange-12);
    --brand-danger:      var(--red-4);
    --brand-danger-soft: var(--red-12);

    --ground:      var(--gray-12);
    --surface:     var(--gray-11);
    --surface-alt: var(--gray-10);
    --rule:        var(--gray-9);

    --ink:      var(--gray-1);
    --ink-soft: var(--gray-4);
    --muted:    var(--gray-5);
  }
}
