/* Nocket brand tokens. Single source of truth for the palette.
   Light is the base. Dark is an OS-driven override — no manual toggle and
   no stored preference, so the app simply follows the system. */

:root {
  /* Brand. Measured from the parrot logo (brand/png/parrot-logo-500.png):
     body red #B31931, wing wine #6D1224, mid #7E1428, white.
     --brand        primary buttons, highlights, accent badges
     --brand-deep   hover, pressed, deep accents
     --brand-2      accent drawn on the page itself (focus border, logo n);
                    same as --brand in light, a lighter tint in dark
     --brand-text   red text and links (AA on every surface)
     --brand-tint   light tint backgrounds (badges, row highlight) */
  --brand: #B31931;
  --brand-deep: #6D1224;
  --brand-mid: #7E1428;
  --brand-2: #B31931;
  --brand-text: #B31931;
  --brand-tint: #F7E8EA;

  /* Surfaces */
  --bg: #F7F5F2;
  --bg-2: #EFECE7;
  --panel: #FFFFFF;

  /* Lines */
  --line: #E2DED7;
  --line-ui: #8A857C;

  /* Type */
  --text: #1A1815;
  --muted: #6B665E;
  --on-brand: #FFFFFF;

  /* Logo. The mark themes with the page, so it needs its own two tokens
     rather than reusing --panel/--brand. */
  --logo-tile: #1A1815;
  --logo-stroke: #B31931;

  /* Status. Warm-tuned to sit on the neutral base rather than cut across
     it; --danger deliberately shares --brand's #A8382E so a destructive
     action reads as the same red the brand already owns. */
  --ok: #2F6B44;
  --ok-bg: #E7EFE6;
  --warn: #8A5A16;
  --warn-bg: #F6EBD8;
  --danger: #A8382E;
  --danger-bg: #F5E3E0;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* Red on dark surfaces needs a lighter tint of the same hue (351deg):
       #B31931 is only 2.6:1 on #1A1815. --brand-text #E5667A is >= 4.5:1
       on bg, bg-2, panel and --brand-tint; --brand-2 #E0485F is for
       non-text accents (>= 3:1). Buttons keep --brand with white text. */
    --brand-2: #E0485F;
    --brand-text: #E5667A;
    --brand-tint: #3B2121;

    --bg: #1A1815;
    --bg-2: #211E1A;
    --panel: #26221E;

    --line: #332F29;
    --line-ui: #7C776E;

    --text: #F7F5F2;
    --muted: #A8A299;

    --logo-tile: #26221E;
    --logo-stroke: #E0485F;

    /* Status. Backgrounds are near-neutral so a badge reads as a tint of
       the panel; --danger tracks --brand-text, same as in light. */
    --ok: #7FB68C;
    --ok-bg: #232A24;
    --warn: #D3A75A;
    --warn-bg: #2B261C;
    --danger: #E08A7C;
    --danger-bg: #2E211F;
  }
}
