:root {
  /* Nord (2026-07-20): the brand adopts the Nord system outright — the
     law app proved it daily, so brand and product now cite one palette
     (https://www.nordtheme.com). Snow Storm ground under Polar Night ink
     by day, the inverse by night, frost for links, aurora for accents.
     The warm night, the cream, and the golds are retired (git history).
     Values marked (interp) are interpolated steps Nord doesn't ship,
     borrowed from the law app's ramps. Documented at /colors. */

  /* Ground — Snow Storm */
  --paper: #eceff4;      /* nord6 */
  --card: #f5f7fa;       /* above nord6 (interp) */
  --field: #e5e9f0;      /* nord5 */
  --chip: #d8dee9;       /* nord4 */
  --rule: #d8dee9;       /* nord4 */

  /* Ink — Polar Night */
  --ink: #2e3440;        /* nord0 */
  --text: #434c5e;       /* nord2 */
  --ink-soft: #616e88;   /* nord3 lightened (interp) */

  /* Links — frost, at ink weight by day */
  --link: #4d6d94;       /* below nord10 (interp) */
  --link-hover: #5e81ac; /* nord10 */

  /* The sun — aurora yellow, pulled to ink weight by day. Accent fills,
     icons, focus; never body text. */
  --accent: #a5822e;     /* nord13 at ink weight (interp) */
  --accent-ink: #a5822e;
  --amber: #ebcb8b;      /* nord13 — the sun after dark */

  /* The brand gradient (2026-10-01, after the app): the gradient cuts of
     the mark and wordmark lead with the link ink and run out into an
     aurora hue — purple by day, the sun after dark. */
  --brand-grad-from: var(--link);
  --brand-grad-to: #ad2492; /* nord15 at ink weight (interp) */
}

/* The gradient follows the colour scheme the page is using, not only the
   reader's preference: Dark Reader darkens this light page and sets
   color-scheme: dark without the media query below ever matching, and the
   day pair is ink weight, lost on a dark ground. */
@supports (color: light-dark(red, red)) {
  :root {
    --brand-grad-from: light-dark(#4d6d94, #88c0d0); /* the two links */
    --brand-grad-to: light-dark(#ad2492, #ebcb8b);
  }
}

/* Dark: Polar Night ground, Snow Storm ink; frost brightens to the
   signature cyan. The mark's tile is nord0, so on the dark ground the
   badge sits nearly flush — the stars and kappa carry it. */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #2e3440;      /* nord0 */
    --card: #3b4252;       /* nord1 */
    --field: #3b4252;
    --chip: #434c5e;       /* nord2 */
    --rule: #434c5e;
    --ink: #eceff4;        /* nord6 */
    --text: #d8dee9;       /* nord4 */
    --ink-soft: #aab3c5;   /* dimmed snow (interp) */
    --link: #88c0d0;       /* nord8 — the signature frost cyan */
    --link-hover: #8fbcbb; /* nord7 */
    --accent: #ebcb8b;     /* nord13 */
    --accent-ink: #ebcb8b;
    --brand-grad-to: #ebcb8b; /* nord13 */
  }
}
