/* ============================================================================
   MK ARENA - BRAND RIBBON LAYER                              MG-816, 27 Oct 2026
   ----------------------------------------------------------------------------
   Loaded AFTER theme/mk-arena-theme.css on every themed Arena page. The theme
   file is never edited; this sheet re-leads it.

   WHY THIS EXISTS
   Raj: "our brain boot color theme is not at all you are considering ... make it
   more fantastic." He then chose the lead himself: the brand ribbon,
   purple -> blue -> teal -> green, promoted from a 6px stripe to the thing that
   carries the screen. Ground cool, headings purple, accent teal, and gold
   reserved for the one primary button.

   WHAT WAS ACTUALLY YELLOW
   Counting gold across the Arena gave 180 uses, but they are not one decision.
   They are three, and only two of them are a fault:

     1. CONTENT. The coins, the gems, the lamp flame, the rocket and its fire,
        Factor Fort's top star band, the earned stars. Gold IS the subject here -
        a silver coin is not a coin, and a star that is not gold reads as "not
        earned". Every one of these is left alone, on purpose.
     2. SURFACE. --ca-ground (cream) and --ca-ground-2 (#FFF4CF, plainly yellow)
        paint the page ground, every stat box, every board dimple, the tabs, the
        board rows, the terms panel, the how-to list and the win card's stat
        tiles. This is the yellow Raj is looking at. Two tokens, most of the
        screen.
     3. DISPLAY TYPE. Gold used as the headline voice - Factor Fort's big 3D
        title, its eyebrows, the gold ink on cards. The brand voice is purple.

   So: cool the two surface tokens, hand the headline voice back to purple,
   lift the ribbon onto the cards and the ground - and do not touch the gold
   that means something.

   HOUSE RULE, carried from the theme file: never write a star next to a slash
   inside a comment. That closes the comment and the browser drops the next rule.
   ============================================================================ */


/* ------------------------------------------------------------ 1. THE GROUND
   Two token swaps that do most of the work, because the theme already routes
   every panel, dimple and row through them. Cool white with a blue bias rather
   than a flat grey: a neutral mid-grey next to the candy palette reads as
   unfinished, a blue-biased white reads as chosen. */
.ca{
  --ca-ground:#F6F9FF;      /* was #FFFDF6, cream */
  --ca-ground-2:#E8EEFC;    /* was #FFF4CF, yellow - the single biggest offender */
  --ca-tint-gold:#D9F3EC;   /* was #FFF1BF. The theme uses this as a NOTE surface
                               (hints, asks, "signed out" bands), so it becomes a
                               teal highlight. The few places where it genuinely
                               means treasure are restored in section 6. */

  /* the ribbon, as a vertical wash and as a 1px-tall edge, so it can be used as
     a band on a card without re-typing the stops every time */
  --ca-ribbon-edge:linear-gradient(90deg,#7139D3 0%,#3B7CFF 34%,#23C7A0 68%,#10C05D 100%);
}

/* The field itself. The theme laid three faint colour pools on cream; this lays
   four - one per ribbon colour, in ribbon order across the screen - and keeps
   the 22px dot grid on top. The ground now carries the brand instead of sitting
   under it. */
body.ca{
  background-color:var(--ca-ground);
  background-image:
    radial-gradient(rgba(18,38,111,.055) 1.2px, transparent 1.3px),
    radial-gradient(circle at 6% 2%,   rgba(113,57,211,.17), transparent 42%),
    radial-gradient(circle at 94% 16%, rgba(59,124,255,.15), transparent 40%),
    radial-gradient(circle at 10% 74%, rgba(35,199,160,.15), transparent 40%),
    radial-gradient(circle at 88% 96%, rgba(16,192,93,.13),  transparent 40%);
  background-size:22px 22px, auto, auto, auto, auto;
  background-attachment:scroll, fixed, fixed, fixed, fixed;
}

/* the frosted scrim over a board was cream; match the new ground */
.ca .ca-overlay{ background:rgba(246,249,255,.80); }

/* the board dimples hardcoded a cream highlight, so the token swap alone left
   them warm */
.ca .ca-cell{ background:radial-gradient(circle at 50% 40%, #FFFFFF, var(--ca-ground-2)); }


/* ------------------------------------------------------------ 2. THE RIBBON AS A BAND
   The promotion Raj asked for. Every sticker card, win card and sheet gets the
   four-colour ribbon along its top edge, clipped to the card's own radius. It is
   one line of brand on every surface, and it costs no layout.
   Cards that already draw their own ::before (the marquee) are excluded. */
.ca .ca-card::before,
.ca .ca-win::before,
.ca .ca-field::before,
.ca .board::before{
  content:""; position:absolute; left:0; right:0; top:0; height:5px;
  border-radius:var(--ca-r-lg) var(--ca-r-lg) 0 0;
  background:var(--ca-ribbon-edge);
  /* MG-817: a hairline of white under the band. Without it, the purple third of
     the ribbon lands on the win card's purple header and the band reads as a
     stray green stripe. The hairline separates it from whatever is below on
     every card, light or dark. */
  box-shadow:0 1px 0 rgba(255,255,255,.92);
  pointer-events:none; z-index:1;
}
/* the board page draws its own panel, so it needs the position the theme's
   cards already have */
.ca .board{ position:relative; }

/* MG-817: the win card's header is a purple-to-blue panel, so the band's purple
   and blue thirds land on their own colour and only the teal-green end reads -
   the band looks like a stray green cap. The white hairline above separates it,
   but it cannot create contrast. On this one card the band uses the LIT family
   of the same four colours, which reads as the same ribbon and stays visible on
   a dark header. */
.ca .ca-win::before{
  background:linear-gradient(90deg,#A077F5 0%,#86AEFF 34%,#7DF2D4 68%,#66E79A 100%);
}
/* No overflow:hidden here, deliberately. The theme hangs the win card's trophy
   ball 78px ABOVE the card (margin:-78px auto) and lets .ca-float and
   .ca-banner escape the field; clipping the card would cut all three off. The
   band carries the card's own top radius instead, which is enough. */

/* The win card was ringed in gold - the loudest gold on the happiest screen.
   It becomes a purple halo, and the ribbon band above does the celebrating. */
.ca .ca-win{ box-shadow:var(--ca-rim), var(--ca-shadow-float), 0 0 0 7px rgba(113,57,211,.16); }

/* The win stage's glow was a gold pool. Ribbon pools instead. */
.ca .ca-winwrap{
  background:
    radial-gradient(circle at 28% 22%, rgba(113,57,211,.20), transparent 46%),
    radial-gradient(circle at 76% 30%, rgba(35,199,160,.20), transparent 44%),
    linear-gradient(180deg, rgba(59,124,255,.10), rgba(16,192,93,.08));
}


/* ------------------------------------------------------------ 3. THE HEADER
   The theme already draws the ribbon along the top edge, 6px. Thicken it a
   little and let the brand word sit in purple. The star count pill keeps its
   gold - stars are content (section 6). */
.ca .ca-top::before{ height:7px; }
.ca .ca-brand .name small{ color:var(--ca-purple-deep); }


/* ------------------------------------------------------------ 4. THE HEADLINE VOICE
   Gold was doing the talking. Purple takes it back.
   .ca-grad-text stays what the theme says it is - one phrase per screen - so
   this does not spray the ribbon across every heading. */
.ca .ca-eyebrow{ color:var(--ca-purple-deep); }

/* the hub hero is a purple-to-blue panel; its accents were gold. Mint and teal
   carry the ribbon through to the end instead. */
.ca .ca-marquee .ca-eyebrow{ color:var(--ca-mint); }
.ca .ca-marquee .ca-eyebrow::before{ background:var(--ca-mint); box-shadow:0 0 0 4px rgba(155,255,228,.28); }
.ca .ca-marquee .ca-d em{ color:var(--ca-mint); }
.ca .ca-marquee::before{
  background:radial-gradient(circle at 85% 10%, rgba(155,255,228,.55), transparent 36%),
             radial-gradient(circle at 10% 100%, rgba(35,199,160,.40), transparent 40%);
}

/* the "beat this" stat read in dark gold; teal is the theme's accent */
.ca .ca-stat.beat .v{ color:var(--ca-teal-deep); }

/* the NEW / TODAY stickers were gold flags. Purple, so the one gold flag on a
   screen is the button the child is meant to press. */
.ca .ca-tile.new::after, .ca .ca-tile.today::after{
  background:var(--ca-purple); color:#fff;
  box-shadow:0 0 0 3px #fff, 0 3px 0 var(--ca-purple-deep);
}

/* the float label's loud variant */
.ca .ca-float.gold{ background:var(--ca-teal-deep); color:#fff; }

/* the shout banner's loud variant */
.ca .ca-banner.gold{ box-shadow:var(--ca-rim), 0 0 0 7px var(--ca-teal), 0 24px 40px -14px rgba(17,140,112,.55); }

/* today's streak dot was gold; the ring it sits beside is already green */
.ca .ca-days i.now{ background:var(--ca-purple); color:#fff; box-shadow:0 0 0 3px #fff, 0 0 0 5px var(--ca-purple-lit); }


/* ------------------------------------------------------------ 5. THE ONE GOLD BUTTON
   Raj's rule: gold is reserved for the single primary button on a screen -
   the one thing the child is meant to press next. The theme's .ca-btn.gold
   already is that button, so it is left exactly as it is, and this is only a
   note that its being the ONLY gold button is the point. A second gold button
   on the same card makes neither of them the answer. */


/* ------------------------------------------------------------ 6. GOLD THAT MEANS SOMETHING
   Section 1 re-pointed --ca-tint-gold to a teal highlight because the theme
   uses it as a note surface. These few call sites are not notes - they are
   coins, treasure and earned stars, where gold is the content. Restored by
   hand, with the original value, so a reader can see the choice. */
.ca .ca-chip.gold{ background:#FFF1BF; color:#6B4400; }   /* the purse chip */
.ca .ca-stars{ background:#FFF1BF; }                      /* the earned-star count */
