/* themes-unlockable.css — bonus colourways gated by achievements.
 *
 * Each scope here mirrors the shape of [data-theme="…"] in tokens.css.
 * Inclusion in this file (rather than tokens.css) signals "perk theme,
 * gated by users/{uid}.unlocks.theme.<name>". The theme picker on
 * wushu_profile.html only shows an entry once the user has it unlocked.
 *
 * Two families live in this file:
 *
 *   1. Sunset — generic earned colourway (Regular achievement).
 *   2. Character colourways — six themed palettes (Warlord,
 *      Apprentice, Beacon, Aegis, Nomad, Hornet), each tied to a
 *      specific achievement in settings/achievements_catalog. The
 *      character blocks ship with hand-tuned status + role tokens
 *      so non-judging surfaces (dashboards, nav) read correctly.
 *      The CVD-safe judging-panel overlay (data-mode="judging" in
 *      tokens.css) is orthogonal and stacks on top of any of these.
 *
 * Keep colourways colour-blind-aware: at minimum, action/positive must
 * remain distinguishable from negative/danger; role accents stay in
 * their hue families.
 */

/* Sunset — warm dusk palette unlocked by the "Regular" achievement
 * (5th registration). Coral page, soft cream cards, teal accents.
 * Picks the Wong/IBM coral↔teal pair so positive (CTAs) and negative
 * (danger) stay distinct under the three common forms of CVD. */
[data-theme="sunset"] {
  --color-brand-red:           #D14C3E;
  --color-brand-red-hover:     #B73D31;
  --color-brand-gold:          #E8A24A;
  --color-brand-ink:           #2A1410;

  --color-surface-paper:       #FBE4D2;
  --color-surface-card:        #FFF3E4;
  --color-surface-sunken:      #F2C9A8;
  --color-surface-raised:      #FFE6CB;
  --color-surface-rule:        #E6B894;
  --color-surface-rule-strong: #BE825A;

  --color-text-primary:        #2A1410;
  --color-text-secondary:      #5C3422;
  --color-text-muted:          #7A5038;
  --color-text-on-accent:      #FFFFFF;
  --color-text-on-danger:      #FFFFFF;
  --color-text-link:           #006561;

  /* Teal positive, vermillion negative — the Wong CVD-safe pair.
   * Teal darkened #00807A→#006561 so it passes WCAG AA as small text
   * on the cream cards (score values, chips) where judges read it. */
  --color-positive-strong:       #006561;
  --color-positive-hover:        #006B66;
  --color-positive-soft-bg:      #CFE9E7;
  --color-positive-soft-border:  #6FB8B3;
  --color-positive-soft-text:    #00473F;

  --color-negative-strong:       #C0392B;
  --color-negative-hover:        #A8311F;
  --color-negative-soft-bg:      #F5C6BE;
  --color-negative-soft-border:  #C57F73;
  --color-negative-soft-text:    #5C1A12;

  --color-action-primary:        var(--color-positive-strong);
  --color-action-primary-hover:  var(--color-positive-hover);
  --color-action-subtle-bg:      var(--color-positive-soft-bg);
  --color-action-subtle-fg:      var(--color-positive-soft-text);
  --color-focus-ring:            rgba(0,128,122,0.45);

  --color-success-strong:      var(--color-positive-strong);
  --color-success-soft-bg:     var(--color-positive-soft-bg);
  --color-success-soft-border: var(--color-positive-soft-border);
  --color-success-soft-text:   var(--color-positive-soft-text);

  --color-warning-strong:      #854C13;
  --color-warning-soft-bg:     #F8DAB5;
  --color-warning-soft-border: #C99A55;
  --color-warning-soft-text:   #5C3A0F;

  --color-danger-strong:       var(--color-negative-strong);
  --color-danger-soft-bg:      var(--color-negative-soft-bg);
  --color-danger-soft-border:  var(--color-negative-soft-border);
  --color-danger-soft-text:    var(--color-negative-soft-text);

  --color-info-strong:         var(--color-positive-strong);
  --color-info-soft-bg:        var(--color-positive-soft-bg);
  --color-info-soft-border:    var(--color-positive-soft-border);
  --color-info-soft-text:      var(--color-positive-soft-text);

  --color-neutral-strong:      #8A5A3F;
  --color-neutral-soft-bg:     #F2C9A8;
  --color-neutral-soft-border: #BE825A;
  --color-neutral-soft-text:   #5C3422;

  --color-role-ahj:   #D14C3E;
  --color-role-dd:    #00807A;
  --color-role-op:    #E8A24A;
  --color-role-qom:   #8B5FBF;
  --color-role-hj:    #D14C3E;
  --color-role-quick: #8A5A3F;

  --color-mark-pop:   #E8A24A;
}


/* ═══════════════════════════════════════════════════════════════
 * Character colourways — achievement-gated stylised palettes.
 *
 * Each theme is a full token override of the same slots tokens.css
 * exposes. Surface + brand + text + action come from the design
 * pack (Brackets Colourways - Characters). Status + role tokens are
 * hand-tuned per character so dashboard chips and role pills read
 * cohesively even outside the judging-panel overlay.
 *
 * Two themes (apprentice, beacon) include a scoped svg circle
 * override for the bracket-mark dot — keep that selector when
 * copying.
 * ═══════════════════════════════════════════════════════════════ */


/* ── Warlord — onyx & crimson
 * Mood: glossy onyx, mechanical menace.
 * Achievement: 'warlord_panels_25' (25 panels judged). */
[data-theme="warlord"] {
  --color-brand-red:           #E10F25;
  --color-brand-red-hover:     #B30A1B;
  --color-brand-gold:          #E10F25;
  --color-brand-ink:           #0A0A0C;

  --color-surface-paper:       #0A0A0C;
  --color-surface-card:        #1A1A1F;
  --color-surface-sunken:      #25171A;
  --color-surface-raised:      #2B2B33;
  --color-surface-rule:        rgba(225,15,37,0.40);
  --color-surface-rule-strong: #5C0610;

  --color-text-primary:        #F5E9DE;
  --color-text-secondary:      #C8BDB3;
  --color-text-muted:          #999188;
  --color-text-on-accent:      #0A0A0C;
  --color-text-on-danger:      #0A0A0C;
  --color-text-link:           #FF6E7A;

  --color-positive-strong:       #2EB58A;
  --color-positive-hover:        #21916D;
  --color-positive-soft-bg:      #15302A;
  --color-positive-soft-border:  #2EB58A;
  --color-positive-soft-text:    #8CE0C2;

  /* Crimson #E10F25 fails as small text on the onyx card; the danger axis
   * (#err-msg, invalid states) uses the lighter signal-red so it clears AA on
   * dark. The vivid crimson is kept for action fills, borders and role-ahj. */
  --color-negative-strong:       #FF6E7A;
  --color-negative-hover:        #B30A1B;
  --color-negative-soft-bg:      #2A0E12;
  --color-negative-soft-border:  #E10F25;
  --color-negative-soft-text:    #FF6E7A;

  --color-action-primary:        #E10F25;
  --color-action-primary-hover:  #B30A1B;
  --color-action-subtle-bg:      #2A0E12;
  --color-action-subtle-fg:      #FF6E7A;
  --color-focus-ring:            rgba(225,15,37,0.60);

  --color-success-strong:      var(--color-positive-strong);
  --color-success-soft-bg:     var(--color-positive-soft-bg);
  --color-success-soft-border: var(--color-positive-soft-border);
  --color-success-soft-text:   var(--color-positive-soft-text);

  --color-warning-strong:      #E89A1F;
  --color-warning-soft-bg:     #3A2410;
  --color-warning-soft-border: #E89A1F;
  --color-warning-soft-text:   #F5C57A;

  --color-danger-strong:       var(--color-negative-strong);
  --color-danger-soft-bg:      var(--color-negative-soft-bg);
  --color-danger-soft-border:  var(--color-negative-soft-border);
  --color-danger-soft-text:    var(--color-negative-soft-text);

  --color-info-strong:         #9C75D9;
  --color-info-soft-bg:        #1F1530;
  --color-info-soft-border:    #9C75D9;
  --color-info-soft-text:      #C6AEEB;

  --color-neutral-strong:      #C8BDB3;
  --color-neutral-soft-bg:     #2B2B33;
  --color-neutral-soft-border: #8C8278;
  --color-neutral-soft-text:   #C8BDB3;

  --color-role-ahj:   #E10F25;
  --color-role-dd:    #FF6E7A;
  --color-role-op:    #2EB58A;
  --color-role-qom:   #9C75D9;
  --color-role-hj:    #5C0610;
  --color-role-quick: #8C8278;

  --color-mark-pop:   #F5E9DE;
}


/* ── Apprentice — sand & saber
 * Mood: sun-baked, optimistic; one cool saber moment.
 * Achievement: 'apprentice_journey_10' (10 events registered). */
[data-theme="apprentice"] {
  --color-brand-red:           #2FA6E8;
  --color-brand-red-hover:     #1B82BD;
  --color-brand-gold:          #2FA6E8;
  --color-brand-ink:           #2A1810;

  --color-surface-paper:       #E8D6AE;
  --color-surface-card:        #F4EAD0;
  --color-surface-sunken:      #D7E8F2;
  --color-surface-raised:      #DBC79A;
  --color-surface-rule:        rgba(42,24,16,0.5);
  --color-surface-rule-strong: #2A1810;

  --color-text-primary:        #2A1810;
  --color-text-secondary:      #4F3422;
  --color-text-muted:          #69503A;
  --color-text-on-accent:      #FFFFFF;
  --color-text-on-danger:      #FFFFFF;
  --color-text-link:           #15527A;

  /* Saber-blue #2FA6E8 reads fine as a fill but fails as small text on the
   * sand cards; deepened to #15527A (the link hue) for the score/value text
   * uses. The vivid saber-blue is retained for the role-dd accent. */
  --color-positive-strong:       #15527A;
  --color-positive-hover:        #15527A;
  --color-positive-soft-bg:      #D7E8F2;
  --color-positive-soft-border:  #1B82BD;
  --color-positive-soft-text:    #15527A;

  --color-negative-strong:       #B53915;
  --color-negative-hover:        #8E2B0E;
  --color-negative-soft-bg:      #F2CCB8;
  --color-negative-soft-border:  #B53915;
  --color-negative-soft-text:    #5A1E0A;

  --color-action-primary:        #15527A;
  --color-action-primary-hover:  #15527A;
  --color-action-subtle-bg:      #D7E8F2;
  --color-action-subtle-fg:      #15527A;
  --color-focus-ring:            rgba(47,166,232,0.55);

  --color-success-strong:      #0B613E;
  --color-success-soft-bg:     #CFE8D7;
  --color-success-soft-border: #0E7C4F;
  --color-success-soft-text:   #0A4A2E;

  --color-warning-strong:      #744D00;
  --color-warning-soft-bg:     #F2D88A;
  --color-warning-soft-border: #B87A00;
  --color-warning-soft-text:   #5C3E00;

  --color-danger-strong:       var(--color-negative-strong);
  --color-danger-soft-bg:      var(--color-negative-soft-bg);
  --color-danger-soft-border:  var(--color-negative-soft-border);
  --color-danger-soft-text:    var(--color-negative-soft-text);

  --color-info-strong:         var(--color-positive-strong);
  --color-info-soft-bg:        var(--color-positive-soft-bg);
  --color-info-soft-border:    var(--color-positive-soft-border);
  --color-info-soft-text:      var(--color-positive-soft-text);

  --color-neutral-strong:      #4F3422;
  --color-neutral-soft-bg:     #DBC79A;
  --color-neutral-soft-border: #7A5D44;
  --color-neutral-soft-text:   #4F3422;

  --color-role-ahj:   #B87A00;
  --color-role-dd:    #2FA6E8;
  --color-role-op:    #0E7C4F;
  --color-role-qom:   #785EF0;
  --color-role-hj:    #B53915;
  --color-role-quick: #7A5D44;

  --color-mark-pop:   #EFE4CC;
}
/* Bracket-mark dot override — saber blue dissolves into the warm
 * linen, so the dot renders in dusk-brown instead. */
[data-theme="apprentice"] svg circle { fill: var(--color-text-primary); }


/* ── Beacon — midnight & signal
 * Mood: heraldic gothic, signal-beacon yellow.
 * Achievement: 'beacon_panels_10' (10 panels judged). */
[data-theme="beacon"] {
  --color-brand-red:           #F5C518;
  --color-brand-red-hover:     #D9A800;
  --color-brand-gold:          #F5C518;
  --color-brand-ink:           #0C1426;

  --color-surface-paper:       #1E2A45;
  --color-surface-card:        #2A3754;
  --color-surface-sunken:      #2A3A5C;
  --color-surface-raised:      #2A3754;
  --color-surface-rule:        rgba(8,12,22,0.6);
  --color-surface-rule-strong: #0C1426;

  --color-text-primary:        #F2EFE6;
  --color-text-secondary:      #C7CEDD;
  --color-text-muted:          #A4ACBD;
  --color-text-on-accent:      #0C1426;
  --color-text-on-danger:      #0C1426;
  --color-text-link:           #F5C518;

  --color-positive-strong:       #F5C518;
  --color-positive-hover:        #D9A800;
  --color-positive-soft-bg:      #3A3208;
  --color-positive-soft-border:  #F5C518;
  --color-positive-soft-text:    #F5DC6E;

  --color-negative-strong:       #E98378;
  --color-negative-hover:        #B83E31;
  --color-negative-soft-bg:      #3A1410;
  --color-negative-soft-border:  #E15A4B;
  --color-negative-soft-text:    #F2A698;

  --color-action-primary:        #F5C518;
  --color-action-primary-hover:  #D9A800;
  --color-action-subtle-bg:      #3257A8;
  --color-action-subtle-fg:      #F2EFE6;
  --color-focus-ring:            rgba(245,197,24,0.65);

  --color-success-strong:      #2EB58A;
  --color-success-soft-bg:     #14302A;
  --color-success-soft-border: #2EB58A;
  --color-success-soft-text:   #8CE0C2;

  --color-warning-strong:      #F5C518;
  --color-warning-soft-bg:     #3A3208;
  --color-warning-soft-border: #F5C518;
  --color-warning-soft-text:   #F5DC6E;

  --color-danger-strong:       var(--color-negative-strong);
  --color-danger-soft-bg:      var(--color-negative-soft-bg);
  --color-danger-soft-border:  var(--color-negative-soft-border);
  --color-danger-soft-text:    var(--color-negative-soft-text);

  --color-info-strong:         #3257A8;
  --color-info-soft-bg:        #14213F;
  --color-info-soft-border:    #3257A8;
  --color-info-soft-text:      #9CB5E5;

  --color-neutral-strong:      #C7CEDD;
  --color-neutral-soft-bg:     #2A3754;
  --color-neutral-soft-border: #8E96A8;
  --color-neutral-soft-text:   #C7CEDD;

  --color-role-ahj:   #F5C518;
  --color-role-dd:    #3257A8;
  --color-role-op:    #2EB58A;
  --color-role-qom:   #9C75D9;
  --color-role-hj:    #E15A4B;
  --color-role-quick: #8E96A8;

  --color-mark-pop:   #F5C518;
}
/* Bracket-mark dot override — signal-yellow dot washes out on
 * the slate card AND vanishes on the yellow app-icon tile. Force ink. */
[data-theme="beacon"] svg circle { fill: var(--color-brand-ink); }


/* ── Aegis — scarlet & gold
 * Mood: regal armour; bold inversion (cards more saturated than page).
 * Achievement: 'aegis_five_wins' (5 first-place wins).
 *
 * NOTE: scarlet card on navy page is the boldest inversion in the
 * set. Verify text contrast on the red card carefully at small sizes
 * before using on dense data screens. */
[data-theme="aegis"] {
  --color-brand-red:           #E5B53A;
  --color-brand-red-hover:     #C49622;
  --color-brand-gold:          #E5B53A;
  --color-brand-ink:           #0E1A38;

  --color-surface-paper:       #0E1A38;
  --color-surface-card:        #B8202E;
  --color-surface-sunken:      #16264E;
  --color-surface-raised:      #1B2A50;
  --color-surface-rule:        rgba(229,181,58,0.65);
  --color-surface-rule-strong: #6A3408;

  --color-text-primary:        #FBF2D9;
  /* Secondary gold + muted lightened so they clear AA on the scarlet card
   * (#B8202E). Score-value / error text on that card is forced to the cream
   * primary via the [data-theme="aegis"] overrides at the foot of this file. */
  --color-text-secondary:      #F1D693;
  --color-text-muted:          #E0D8CA;
  --color-text-on-accent:      #0E1A38;
  --color-text-on-danger:      #FFFFFF;
  --color-text-link:           #E5B53A;

  --color-positive-strong:       #E5B53A;
  --color-positive-hover:        #C49622;
  --color-positive-soft-bg:      #16264E;
  --color-positive-soft-border:  #E5B53A;
  --color-positive-soft-text:    #FFE8A8;

  --color-negative-strong:       #B8202E;
  --color-negative-hover:        #8E1722;
  --color-negative-soft-bg:      #3A0D14;
  --color-negative-soft-border:  #B8202E;
  --color-negative-soft-text:    #F2A8B0;

  --color-action-primary:        #E5B53A;
  --color-action-primary-hover:  #C49622;
  --color-action-subtle-bg:      #16264E;
  --color-action-subtle-fg:      #E5B53A;
  --color-focus-ring:            rgba(229,181,58,0.60);

  --color-success-strong:      #2EB58A;
  --color-success-soft-bg:     #14302A;
  --color-success-soft-border: #2EB58A;
  --color-success-soft-text:   #8CE0C2;

  --color-warning-strong:      #E89A1F;
  --color-warning-soft-bg:     #3A2410;
  --color-warning-soft-border: #E89A1F;
  --color-warning-soft-text:   #F5C57A;

  --color-danger-strong:       var(--color-negative-strong);
  --color-danger-soft-bg:      var(--color-negative-soft-bg);
  --color-danger-soft-border:  var(--color-negative-soft-border);
  --color-danger-soft-text:    var(--color-negative-soft-text);

  --color-info-strong:         #3257A8;
  --color-info-soft-bg:        #14213F;
  --color-info-soft-border:    #3257A8;
  --color-info-soft-text:      #9CB5E5;

  --color-neutral-strong:      #A8916A;
  --color-neutral-soft-bg:     #1B2A50;
  --color-neutral-soft-border: #A8916A;
  --color-neutral-soft-text:   #FBF2D9;

  --color-role-ahj:   #E5B53A;
  --color-role-dd:    #3257A8;
  --color-role-op:    #2EB58A;
  --color-role-qom:   #9C75D9;
  --color-role-hj:    #B8202E;
  --color-role-quick: #A8916A;

  --color-mark-pop:   #FFE8A8;
}


/* ── Nomad — saffron & sky
 * Mood: warm earth meets sky; the quiet sibling to Persimmon Cel.
 * Achievement: 'nomad_routines_10' (10 routines recorded). */
[data-theme="nomad"] {
  --color-brand-red:           #4FA8D0;
  --color-brand-red-hover:     #2F87B0;
  --color-brand-gold:          #4FA8D0;
  --color-brand-ink:           #4A2D14;

  --color-surface-paper:       #E08A3A;
  --color-surface-card:        #F0BC5C;
  --color-surface-sunken:      #DCEDF6;
  --color-surface-raised:      #D17A28;
  --color-surface-rule:        rgba(74,45,20,0.55);
  --color-surface-rule-strong: #4A2D14;

  --color-text-primary:        #2C1A0A;
  --color-text-secondary:      #4A2D14;
  --color-text-muted:          #362615;
  --color-text-on-accent:      #FFFFFF;
  --color-text-on-danger:      #FFFFFF;
  --color-text-link:           #1F5774;

  /* Sky-blue #4FA8D0 reads as a fill but fails as small text on the saffron
   * cards; deepened to #1F5774 (the link hue) for score/value text. The vivid
   * sky is retained for the role-dd accent. */
  --color-positive-strong:       #1F5774;
  --color-positive-hover:        #1F5774;
  --color-positive-soft-bg:      #DCEDF6;
  --color-positive-soft-border:  #2F87B0;
  --color-positive-soft-text:    #1F5774;

  --color-negative-strong:       #641F0C;
  --color-negative-hover:        #8E2B0E;
  --color-negative-soft-bg:      #F2CCB8;
  --color-negative-soft-border:  #B53915;
  --color-negative-soft-text:    #5A1E0A;

  --color-action-primary:        #1F5774;
  --color-action-primary-hover:  #1F5774;
  --color-action-subtle-bg:      #DCEDF6;
  --color-action-subtle-fg:      #1F5774;
  --color-focus-ring:            rgba(79,168,208,0.60);

  --color-success-strong:      #05301F;
  --color-success-soft-bg:     #CFE8D7;
  --color-success-soft-border: #0E7C4F;
  --color-success-soft-text:   #0A4A2E;

  --color-warning-strong:      #382500;
  --color-warning-soft-bg:     #FBDC9A;
  --color-warning-soft-border: #B87A00;
  --color-warning-soft-text:   #5C3E00;

  --color-danger-strong:       var(--color-negative-strong);
  --color-danger-soft-bg:      var(--color-negative-soft-bg);
  --color-danger-soft-border:  var(--color-negative-soft-border);
  --color-danger-soft-text:    var(--color-negative-soft-text);

  --color-info-strong:         var(--color-positive-strong);
  --color-info-soft-bg:        var(--color-positive-soft-bg);
  --color-info-soft-border:    var(--color-positive-soft-border);
  --color-info-soft-text:      var(--color-positive-soft-text);

  --color-neutral-strong:      #4A2D14;
  --color-neutral-soft-bg:     #F2D7A8;
  --color-neutral-soft-border: #7A5530;
  --color-neutral-soft-text:   #4A2D14;

  --color-role-ahj:   #E08A3A;
  --color-role-dd:    #4FA8D0;
  --color-role-op:    #0E7C4F;
  --color-role-qom:   #785EF0;
  --color-role-hj:    #B53915;
  --color-role-quick: #7A5530;

  --color-mark-pop:   #DCEDF6;
}


/* ── Hornet — yellow & stripe
 * Mood: the most kinetic and martial of the set.
 * Achievement: 'hornet_first_win' (1st first-place finish).
 *
 * Brand slot is jet black — "Scoring" wordmark and primary buttons
 * render in stripe-black against tracksuit-yellow cards, dead-stop
 * graphic. The crimson mark-pop is reserved for the app-icon tile
 * dot, since black-on-black would vanish there. */
[data-theme="hornet"] {
  --color-brand-red:           #0A0A0A;
  --color-brand-red-hover:     #1A1A1A;
  --color-brand-gold:          #0A0A0A;
  --color-brand-ink:           #0A0A0A;

  --color-surface-paper:       #FFF1B8;
  --color-surface-card:        #F5C518;
  --color-surface-sunken:      #E5B100;
  --color-surface-raised:      #FFE680;
  --color-surface-rule:        rgba(10,10,10,0.7);
  --color-surface-rule-strong: #0A0A0A;

  --color-text-primary:        #0A0A0A;
  --color-text-secondary:      #1F1A05;
  --color-text-muted:          #59480A;
  --color-text-on-accent:      #F5C518;
  --color-text-on-danger:      #FFFFFF;
  --color-text-link:           #0A0A0A;

  --color-positive-strong:       #0A0A0A;
  --color-positive-hover:        #1A1A1A;
  --color-positive-soft-bg:      #FFE680;
  --color-positive-soft-border:  #0A0A0A;
  --color-positive-soft-text:    #0A0A0A;

  --color-negative-strong:       #960A19;
  --color-negative-hover:        #B30A1B;
  --color-negative-soft-bg:      #FFD0C8;
  --color-negative-soft-border:  #E10F25;
  --color-negative-soft-text:    #5C0610;

  --color-action-primary:        #0A0A0A;
  --color-action-primary-hover:  #1A1A1A;
  --color-action-subtle-bg:      #FFE680;
  --color-action-subtle-fg:      #0A0A0A;
  --color-focus-ring:            rgba(10,10,10,0.55);

  --color-success-strong:      #0A5436;
  --color-success-soft-bg:     #CFE8D7;
  --color-success-soft-border: #0E7C4F;
  --color-success-soft-text:   #0A4A2E;

  --color-warning-strong:      #654300;
  --color-warning-soft-bg:     #FFE680;
  --color-warning-soft-border: #B87A00;
  --color-warning-soft-text:   #5C3E00;

  --color-danger-strong:       var(--color-negative-strong);
  --color-danger-soft-bg:      var(--color-negative-soft-bg);
  --color-danger-soft-border:  var(--color-negative-soft-border);
  --color-danger-soft-text:    var(--color-negative-soft-text);

  --color-info-strong:         #1F5774;
  --color-info-soft-bg:        #DCEDF6;
  --color-info-soft-border:    #1F5774;
  --color-info-soft-text:      #1F5774;

  --color-neutral-strong:      #1F1A05;
  --color-neutral-soft-bg:     #FFE680;
  --color-neutral-soft-border: #5C4A0A;
  --color-neutral-soft-text:   #1F1A05;

  --color-role-ahj:   #E10F25;
  --color-role-dd:    #1F5774;
  --color-role-op:    #0E7C4F;
  --color-role-qom:   #785EF0;
  --color-role-hj:    #0A0A0A;
  --color-role-quick: #5C4A0A;

  --color-mark-pop:   #E10F25;
}


/* ═══════════════════════════════════════════════════════════════
 * Judging-screen contrast overrides for the saturated-card themes.
 *
 * Aegis (scarlet card #B8202E) and Warlord (onyx card #1A1A1F) keep
 * their bold card colours, but the judge pages render score values
 * and error text in the action / danger hues — which can't clear AA
 * as small text on those cards. Force those specific readouts to the
 * theme's primary text colour (cream on scarlet 5.73:1, cream on onyx
 * ~14:1). The attribute+class selector out-specifies the pages' plain
 * `.sw-val { color: … }` rules, so this reaches every judge page that
 * loads this stylesheet without per-page edits.
 * ═══════════════════════════════════════════════════════════════ */
[data-theme="aegis"] .sw-val,
[data-theme="aegis"] .sw-final,
[data-theme="aegis"] .sw-perf,
[data-theme="aegis"] .judge-id-name,
[data-theme="aegis"] .sc,
[data-theme="aegis"] .bracket-score,
[data-theme="aegis"] .bracket-result-val,
[data-theme="aegis"] #err-msg,
[data-theme="warlord"] .sw-val,
[data-theme="warlord"] .sw-final,
[data-theme="warlord"] .sw-perf,
[data-theme="warlord"] .judge-id-name,
[data-theme="warlord"] .sc,
[data-theme="warlord"] .bracket-score,
[data-theme="warlord"] .bracket-result-val {
  color: var(--color-text-primary);
}
