@charset "UTF-8";

/**
 * colors.css 1.3.0
 * Author: hybrid.
 * Type: core
 *
 * Color palette, background color utilities, text color utilities.
 * RGB variables allow rgba() usage: rgba(var(--dark-rgb), .5)
 *
 * Context pair: --text-color / --background-color (and their --*-rgb twins).
 * Components read them where the color is used, so they follow the nearest
 * .has-* class (a dark block inside a light page flips text and background together).
 * Do not copy them into a token declared on :root: it would be resolved once and stay frozen.
 *
 * Dark mode
 * Not in this file: optional extension colors-dark.css (load after the core). Without it the
 * context pair stays light. Components already follow the pair, so nothing else changes.
 *
 * Sections
 * CONFIG      — palette tokens, applicators
 * CORE        — .has-* text and background color classes, selection
 *
 * Tokens defined here
 * --bright-rgb / --bright-color
 * --light-rgb / --light-color
 * --grey-rgb / --grey-color
 * --dark-rgb / --dark-color
 * --accent-rgb / --accent-color
 * --alert-rgb / --alert-color
 * --selection-rgb / --selection-color
 * --text-rgb / --text-color
 * --background-rgb / --background-color
 * --theme-rgb / --theme-color
 *
 * Classes
 * [class*="-text-color"]       — applies --text-color
 * [class*="-background-color"] — applies --text-color and --background-color
 * .has-*-text-color            — sets --text-color and --text-rgb
 * .has-*-background-color      — sets --background-color and --background-rgb;
 *                                dark fills also set a bright text, bright and light fills a dark text
 */



/* ================================================================================================== */
/* ============================================= CONFIG ============================================= */
/* ================================================================================================== */


/* ============================== COLORS ============================== */

:root {
	--bright-rgb: 255, 255, 255;
	--light-rgb: 245, 245, 240;
	--grey-rgb: 145, 145, 140;
	--dark-rgb: 0, 0, 0;

	--accent-rgb: 0, 0, 255;
	--alert-rgb: 255, 0, 0;
	--selection-rgb: 255, 255, 153;

	--bright-color: rgb(var(--bright-rgb));
	--light-color: rgb(var(--light-rgb));
	--grey-color: rgb(var(--grey-rgb));
	--dark-color: rgb(var(--dark-rgb));

	--accent-color: rgb(var(--accent-rgb));
	--alert-color: rgb(var(--alert-rgb));
	--selection-color: rgb(var(--selection-rgb));

	--text-rgb: var(--dark-rgb);
	--text-color: var(--dark-color);
	--background-rgb: var(--bright-rgb);
	--background-color: var(--bright-color);

	--theme-rgb: var(--bright-rgb);
	--theme-color: rgb(var(--theme-rgb));

	color-scheme: light;
}


/* ============================== VARIATIONS ============================== */

[class*='-text-color'] { color: var(--text-color); }
[class*='-background-color'] { color: var(--text-color); background-color: var(--background-color); }



/* ================================================================================================ */
/* ============================================= CORE ============================================= */
/* ================================================================================================ */


/* ============================== TEXT COLORS ============================== */

.has-bright-text-color { --text-color: var(--bright-color); --text-rgb: var(--bright-rgb); }
.has-light-text-color { --text-color: var(--light-color); --text-rgb: var(--light-rgb); }
.has-grey-text-color { --text-color: var(--grey-color); --text-rgb: var(--grey-rgb); }
.has-dark-text-color { --text-color: var(--dark-color); --text-rgb: var(--dark-rgb); }
.has-accent-text-color { --text-color: var(--accent-color); --text-rgb: var(--accent-rgb); }
.has-alert-text-color { --text-color: var(--alert-color); --text-rgb: var(--alert-rgb); }
.has-selection-text-color { --text-color: var(--selection-color); --text-rgb: var(--selection-rgb); }


/* ============================== BACKGROUND COLORS ============================== */

/* text follows the fill on fixed-tone fills (dark: bright text; bright, light: dark text); other fills keep the inherited text */

.has-bright-background-color { --background-color: var(--bright-color); --background-rgb: var(--bright-rgb); }
.has-light-background-color { --background-color: var(--light-color); --background-rgb: var(--light-rgb); }
.has-grey-background-color { --background-color: var(--grey-color); --background-rgb: var(--grey-rgb); }
.has-dark-background-color { --background-color: var(--dark-color); --background-rgb: var(--dark-rgb); }
.has-accent-background-color { --background-color: var(--accent-color); --background-rgb: var(--accent-rgb); }
.has-alert-background-color { --background-color: var(--alert-color); --background-rgb: var(--alert-rgb); }
.has-selection-background-color { --background-color: var(--selection-color); --background-rgb: var(--selection-rgb); }

.has-bright-background-color,
.has-light-background-color { --text-color: var(--dark-color); --text-rgb: var(--dark-rgb); }
.has-dark-background-color { --text-color: var(--bright-color); --text-rgb: var(--bright-rgb); }


/* ============================== SELECTION ============================== */

::-moz-selection { background: var(--selection-color); }
::selection { background: var(--selection-color); }