/* Curated host-scoped palettes. Customer input selects only a data attribute key.

   §4.2, applied at the Phase 4 flip: a curated theme overrides the D3
   interactive roles only -- action, action-hover, on-action, link, selected,
   selected-muted, focus-ring and accent. Canvas, surface, text and status stay
   Mosaic, so the neutral base that carries the hierarchy is the same on every
   company's screen and the brand shows through the elements an operator
   actually touches. `--ship-on-selected` rides along: it is the ink on the
   selected fill, and Mosaic's ink is chosen for Mosaic's own light violet fill
   -- on the themes' saturated fills it measures ~1.6:1. Each theme therefore
   states the ink its fill needs.

   The selectors used to read `body[data-company-theme="x"] .ship-mosaic` (and
   the shell's `:has()` half) so they could reach a converted screen past
   :root's classic values. The scope class is gone, and the flip folded the
   Mosaic values onto :root, so the attribute alone is the selector: a
   custom property comes from the nearest ancestor that declares it, and <body>
   is nearer than the <html> the appearance blocks declare on.

   Both appearances are held to the contrast floors by
   tests/test_token_contrast_matrix.py (the theme x mode appearances). */
body[data-company-theme="ocean"] {
    --ship-action: #075985;
    --ship-action-hover: #0c4a6e;
    --ship-on-action: #ffffff;
    --ship-link: #075985;
    --ship-selected: #075985;
    --ship-selected-muted: #e0f2fe;
    --ship-focus-ring: #075985;
    --ship-accent: #075985;
    --ship-on-selected: #ffffff;
}

body[data-company-theme="forest"] {
    --ship-action: #166534;
    --ship-action-hover: #14532d;
    --ship-on-action: #ffffff;
    --ship-link: #166534;
    --ship-selected: #166534;
    --ship-selected-muted: #dcfce7;
    --ship-focus-ring: #166534;
    --ship-accent: #166534;
    --ship-on-selected: #ffffff;
}

body[data-company-theme="plum"] {
    --ship-action: #6b21a8;
    --ship-action-hover: #581c87;
    --ship-on-action: #ffffff;
    --ship-link: #6b21a8;
    --ship-selected: #6b21a8;
    --ship-selected-muted: #f3e8ff;
    --ship-focus-ring: #6b21a8;
    --ship-accent: #6b21a8;
    --ship-on-selected: #ffffff;
}

/* Only theme blocks live here. The custom-domain recovery banner and the
   custom brand logo carry their styling as utilities on their one consumer,
   base.html. */

/* §4.2 dark derivation. The dark block in ship-tokens.css states its roles on
   :root[data-ship-appearance="dark"], so a screen in dark would otherwise keep
   the theme's light inks; dark names the appearance attribute too, which lifts
   these selectors above the light ones for the same element.

   The values are re-derived, not reused: the light inks measure ~1.5:1 on
   the dark surfaces, so each theme becomes a bright tint fill with deep
   ink, mirroring how the dark block inverts its own neutral pair. Screen
   only -- @media print repaints :root to the paper palette in
   ship-tokens.css, and the body-level selectors here would otherwise outrank
   it. (The print block addressed the old overlay exception by ID, which the
   flip deleted; screen-wrapping this half is what keeps print paper-white.) */
@media screen {
    :root[data-ship-appearance="dark"] body[data-company-theme="ocean"] {
        --ship-action: #7dd3fc;
        --ship-action-hover: #bae6fd;
        --ship-on-action: #082f49;
        --ship-link: #7dd3fc;
        --ship-selected: #38bdf8;
        --ship-selected-muted: #082f49;
        --ship-focus-ring: #7dd3fc;
        --ship-accent: #38bdf8;
        --ship-on-selected: #14181d;
    }
    :root[data-ship-appearance="dark"] body[data-company-theme="forest"] {
        --ship-action: #86efac;
        --ship-action-hover: #bbf7d0;
        --ship-on-action: #052e16;
        --ship-link: #86efac;
        --ship-selected: #4ade80;
        --ship-selected-muted: #052e16;
        --ship-focus-ring: #86efac;
        --ship-accent: #4ade80;
        --ship-on-selected: #14181d;
    }
    :root[data-ship-appearance="dark"] body[data-company-theme="plum"] {
        --ship-action: #d8b4fe;
        --ship-action-hover: #e9d5ff;
        --ship-on-action: #3b0764;
        --ship-link: #d8b4fe;
        --ship-selected: #c084fc;
        --ship-selected-muted: #3b0764;
        --ship-focus-ring: #d8b4fe;
        --ship-accent: #c084fc;
        --ship-on-selected: #14181d;
    }
}
