/*
 * The project's own ``--cd-*`` design tokens, defined on Unfold's.
 *
 * The block editor on the page change form (pages/static/pages/css/block_editor.css) is written
 * against a token set rather than literal colours; the live preview pane, when it arrives, reads
 * the same names. Those tokens used to be defined by the Grappelli skin, which this project no
 * longer loads, so every ``var(--cd-…)`` would resolve to its literal fallback — and the fallbacks
 * are not neutral: ``--cd-accent`` falls back to ``#1d4ed8``, a generic indigo that belongs to no
 * part of this brand.
 *
 * Same failure as django-filer's (see unfold_filer.css), same fix: define the names the stylesheets
 * read, mapped onto Unfold's tokens, so one theme change reaches all of them. No ``!important``
 * and no specificity games are needed — nothing else defines these names.
 *
 * Only the tokens those files actually consume are defined; carrying names nothing reads would
 * just be a second thing to keep in sync.
 */

:root {
    /* --------------------------------------------------------------------------- accent */

    /* The brand accent, straight off the primary ramp in UNFOLD["COLORS"] — anchored on the
       customer's logo colours, so the editor picks up a change to the brand blue without being
       touched. 600 rather than 500: it is used behind white label text, where 500 is short of AA. */
    --cd-accent: var(--color-primary-600);
    --cd-accent-strong: var(--color-primary-700);
    --cd-accent-soft: var(--color-primary-50);
    --cd-accent-border: var(--color-primary-200);

    /* ------------------------------------------------------------------------- surfaces */

    /* Cards and controls sit on the admin's white content area; ``muted`` is the recessed strip
       behind a block's header. */
    --cd-surface: #fff;
    --cd-surface-muted: var(--color-base-50);

    /* ----------------------------------------------------------------- text and borders */

    /* Mapped by role rather than by shade, onto the three font roles Unfold itself renders text
       with, so the editor's copy sits at the same weights as the admin around it. */
    --cd-text: var(--color-font-important-light);
    --cd-text-muted: var(--color-font-default-light);
    --cd-text-faint: var(--color-font-subtle-light);

    --cd-border: var(--color-base-200);
    --cd-border-strong: var(--color-base-300);

    /* ------------------------------------------------------------------------ semantic */

    /* Status colours stay literal: Unfold's palette exposes only ``base`` and ``primary``, so
       there is no green or red token to map onto. */
    --cd-success: #0f7b52;
    --cd-danger: #b42318;

    /* -------------------------------------------------------------------------- shape */

    /* Structural rather than brand. The smallest step matches the 6px Unfold gives its own
       buttons and inputs, so controls the editor draws line up with the ones the theme draws. */
    --cd-radius: 12px;
    --cd-radius-s: 8px;
    --cd-radius-xs: 6px;
}
