/* personalisation (2026-10-31; docs/personalisation_brief.md): the shading rules, the same in every theme. Loaded
   after the five theme files and every page stylesheet, so a card that sets `background: var(--c-hero)` (or one of
   its aliases) also gets the theme's gradient. Colours, gradients and shadows only -- no sizes or positions. */

/* highlight cards: the theme's radial gradient under a faint dotted overlay, with the highlight shadow */
.db-clock, .db-next, .db-tab[aria-selected="true"], .a2-navy, .ao-clock, .at-live, .mp-head, .al-head, .pv-summary,
.wm-cand, .lp-navy, .db-tiles > .db-tile:first-child {
    background-color: var(--c-hero);
    background-image: var(--c-hero-dots), var(--c-hero-grad);
    box-shadow: var(--c-hero-shadow);
}
/* the first KPI tile is filled; the others stay card-coloured with their 3px coloured top edge */
.db-tiles > .db-tile:first-child { color: var(--c-on-hero); border-top-color: transparent; }
.db-tiles > .db-tile:first-child:hover { color: var(--c-on-hero); }
.db-tiles > .db-tile:first-child .db-tile-label,
.db-tiles > .db-tile:first-child .db-tile-note { color: var(--c-hero-muted); }
.db-tiles > .db-tile:first-child .db-tile-value { color: var(--c-on-hero); }
.db-tile { border-top-color: var(--c-tile-edge); }
.db-tile--ok { border-top-color: var(--db-ok); } .db-tile--warn { border-top-color: var(--db-amber); }
.db-tile--bad { border-top-color: var(--db-accent); } .db-tile--empty { border-top-color: var(--db-border); }

/* ordinary cards: the theme's card shadow; hover lifts 1px (transform only -- nothing around it moves) */
.db-card, .card, .detail-card, .ao-card { box-shadow: var(--shadow); }
.db-card:hover, .ao-card:hover { transform: translateY(-1px); }

/* theme-shading (owner, 2026-11-08): the same rules on the Marketing list, the candidate workspace and Reports -- they
   used their own flat borders, so in the dark themes every card, header and tab bar ran together */
/* ordinary cards: the workspace's boxes, the Marketing grid's box, Reports' cards and panels */
.wm-card, .mk-grid-wrap, .rh-card, .rh-panel { box-shadow: var(--shadow); }
.rh-card:hover { transform: translateY(-1px); }          /* a report card opens the report, like a dashboard card */
@media (prefers-reduced-motion: reduce) { .rh-card:hover { transform: none; } }
/* inset strips: table headers, tab bars and search boxes take the inset token */
.data-table thead th, .mk-table thead th, .wm-table thead th, .rh-table-head,
.mk-tabs, .list-tabs, .tab-segment,
.topbar-search input, .mk-search { background-color: var(--c-surface-2); }
/* KPI tiles: Reports' tiles get the dashboard's 3px coloured top edge (the first one is not filled here: Reports has no
   "first tile" meaning -- each tile is one figure of the report) */
.rh-kpis .kpi-tile { border-top: 3px solid var(--c-tile-edge); }
@media (prefers-reduced-motion: reduce) { .db-card:hover, .ao-card:hover { transform: none; } }

/* switching theme: a 200 ms fade on colour properties only, while html.theme-switching is on (core/js/theme.js
   sets it for 260 ms). Never sizes, positions or transforms -- so nothing jumps. */
html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after {
    transition: color 200ms ease, background-color 200ms ease, border-color 200ms ease, outline-color 200ms ease,
        fill 200ms ease, stroke 200ms ease, box-shadow 200ms ease, text-decoration-color 200ms ease !important;
}
@media (prefers-reduced-motion: reduce) {
    html.theme-switching *, html.theme-switching *::before, html.theme-switching *::after { transition: none !important; }
}
