/*
 * The app's type roles and its hover, press and selection layers, on the site's tokens
 * (`structure/landing/landing.css`). The app loads this sheet after the site's tokens and before
 * `styles.css`; every guide and tool page links it after them too, so both draw alike.
 */

/*
 * The site's tertiary ink (`--lp-ink-3`) is the colour of every secondary label, and the copied
 * values fail WCAG AA for small text: 3.9:1 on the light canvas, 3.9:1 on the dark well. These
 * keep 4.5:1 on the canvas, the raised canvas and the well of each theme.
 */
:root,
[data-st-theme="light"] {
    --lp-ink-3: #6b6d70;
}

[data-st-theme="dark"] {
    --lp-ink-3: #7f8184;
}

:root {
    /*
     * The app's type roles on the site's fonts: its controls and copy a step under the site's
     * (`--lp-type-label`, 14 px) so a pane's bar holds its controls on one line, its data in mono.
     */
    --pv-type-ui: 400 13px/16px var(--lp-font-sans);
    --pv-type-body: 400 13px/20px var(--lp-font-sans);
    --pv-type-label: 500 13px/16px var(--lp-font-sans);
    --pv-type-label-small: 500 12px/14px var(--lp-font-sans);
    --pv-type-caption: 400 12px/14px var(--lp-font-sans);
    --pv-type-title: 500 14px/20px var(--lp-font-sans);
    --pv-type-code: 400 12px/16px var(--lp-font-mono);
    --pv-type-code-small: 400 11px/14px var(--lp-font-mono);
    /* A table's header row: the site's eyebrow, a size down to sit over 12 px data. */
    --pv-type-table-header: 500 10px/14px var(--lp-font-mono);
    --pv-tracking-table-header: 0.08em;
    /* Hover, press and selection: the ink laid over the canvas, as the site has no tokens for them. */
    --pv-hover: color-mix(in srgb, var(--lp-ink) 5%, transparent);
    --pv-pressed: color-mix(in srgb, var(--lp-ink) 9%, transparent);
    --pv-selected: color-mix(in srgb, var(--lp-ink) 10%, var(--lp-canvas));
    --pv-layer-hover: linear-gradient(var(--pv-hover), var(--pv-hover));
    --pv-layer-pressed: linear-gradient(var(--pv-pressed), var(--pv-pressed));
}
