/* =============================================================================
   Brand palette
   Applied after the theme stylesheet, and only on sites that actually have
   colours of their own (body.cs-palette). A site without colours keeps its
   theme untouched - no near-miss copy of the theme's own palette.

   The three colours each own a job:
     --accent        primary    buttons, links, active tabs, phone pill, focus
     --cs-secondary  secondary  hero kicker, listing badges, footer link hover
     --cs-tertiary   tertiary   footer band, soft section wash, section rules

   Selectors carry body.cs-palette so they outrank the theme's own
   .cs--modern/.cs--classic rules, which are one class more specific than base.
   ============================================================================= */

body.cs-palette .cs-btn:not(.cs-btn--ghost) {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
}

body.cs-palette .cs-btn:not(.cs-btn--ghost):hover {
    background: var(--accent);
    color: var(--accent-ink);
}

body.cs-palette .cs-hero-kicker {
    color: var(--cs-secondary, var(--accent));
}

body.cs-palette .cs-hero-kicker::after {
    background: var(--cs-secondary, currentColor);
}

body.cs-palette .cs-card-badge {
    background: var(--cs-secondary, var(--ink));
    color: var(--cs-secondary-ink, #fff);
}

body.cs-palette .cs-card:hover .cs-card-badge {
    background: var(--cs-secondary, var(--ink));
    color: var(--cs-secondary-ink, #fff);
}

/* ---- tertiary ------------------------------------------------------------- */

/* The footer band: full strength, darkened first if the colour is too light to read on. */
body.cs-palette .cs-footer {
    background: var(--footer-bg);
    color: var(--footer-ink);
}

/* Soft sections carry a 10% wash of the tertiary, so it is visible on the page
   and not just hidden in the footer at the bottom. */
body.cs-palette .cs-section--soft {
    background: var(--cs-tertiary-soft, var(--soft));
}

/* The rule some themes draw above a section heading. */
body.cs-palette .cs-section-head {
    border-bottom-color: var(--cs-tertiary, var(--line));
}

/* ---- primary -------------------------------------------------------------- */

body.cs-palette .cs-footer a:hover {
    color: var(--cs-secondary, inherit);
    opacity: 1;
}

body.cs-palette .cs-eyebrow {
    background: transparent;
    color: var(--accent);
}

/* Bold paints the eyebrow as a filled chip - keep the chip, recolour it. */
body.cs-palette.cs--bold .cs-eyebrow {
    background: var(--accent);
    color: var(--accent-ink);
}

/* Themes that hardcode their own accent on tabs, the phone pill and section links. */
body.cs-palette .cs-tab.is-on {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
}

body.cs-palette .cs-call {
    background: var(--accent);
    color: var(--accent-ink);
    border-color: var(--accent);
}

body.cs-palette .cs-nav a:hover {
    color: var(--accent);
}

body.cs-palette .cs-pager .is-on {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--accent-ink);
}
