/*
 * Practitioner theme preset for Roxy UI. GENERATED by scripts/sync-themes.ts
 * from src/styles/palettes.ts. Do not edit; change the palette data and
 * rerun the codegen.
 *
 * It only reassigns --roxy-* tokens, so it composes with the core token
 * contract instead of replacing it: link it AFTER the base tokens (or the
 * CDN bundle that injects them) and every component on the page adopts the
 * look. Light and dark blocks mirror the trigger structure of tokens.css
 * exactly (OS preference, [data-theme] / .dark opt-in, and the explicit-
 * light opt-out), all at :where() zero specificity and inside the
 * roxy.theme cascade layer, so a per-page override still wins and the
 * preset still outranks the token defaults whichever file loads first.
 *
 * Fonts are self-hosted: both families are OFL, bundled under
 * dist/styles/fonts and served from jsDelivr pinned to this package
 * version, so linking this file makes no request to a third-party font
 * host. The OFL license text for each font family ships beside its files.
 *
 * To use the whole preset with one line instead of copying tokens, link
 * the file:
 *
 *   <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@roxyapi/ui@latest/dist/styles/themes/practitioner.css">
 */
@font-face {
	font-family: "Fraunces";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.53.3/dist/styles/fonts/fraunces/fraunces-latin.woff2")
		format("woff2");
	unicode-range:
		U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Fraunces";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.53.3/dist/styles/fonts/fraunces/fraunces-latin-ext.woff2")
		format("woff2");
	unicode-range:
		U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Jost";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.53.3/dist/styles/fonts/jost/jost-latin.woff2")
		format("woff2");
	unicode-range:
		U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Jost";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.53.3/dist/styles/fonts/jost/jost-latin-ext.woff2")
		format("woff2");
	unicode-range:
		U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Jost";
	font-style: normal;
	font-weight: 400 600;
	font-display: swap;
	src: url("https://cdn.jsdelivr.net/npm/@roxyapi/ui@0.53.3/dist/styles/fonts/jost/jost-cyrillic.woff2")
		format("woff2");
	unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@layer roxy.tokens, roxy.theme;

@layer roxy.theme {
	/* Light defaults. Fonts, radius, and shadow do not vary by theme, so they are
	 * set once here and inherited by the dark blocks unchanged. */
	:where(:root, :host) {
		--roxy-font-sans:
			"Jost", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
			sans-serif;
		--roxy-font-display:
			"Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;

		--roxy-radius-sm: 0.4375rem;
		--roxy-radius-md: 0.875rem;
		--roxy-radius-lg: 1.575rem;

		--roxy-shadow-sm: none;
		--roxy-shadow-md: none;
		--roxy-shadow-lg: none;

		--roxy-accent: #914955;
		--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
		--roxy-ring: var(--roxy-accent);
		/* Secondary ink (form labels, generic-renderer text, chart strokes): a warm tone between fg and muted so it stays stronger than help text. Without this override the stock slate leaks through and reads bluish on the warm palette. */
		--roxy-secondary: #503a3a;
		--roxy-danger: #b23a38;

		--roxy-bg: #fbf6f3;
		--roxy-surface: #f5e8e0;
		--roxy-fg: #3e2a2c;
		--roxy-muted: #7e625f;
		--roxy-border: #ead9d2;
	}

	/* Dark theme via system preference. Mirrors tokens.css: only the theme-varying
	 * tokens are reassigned; accent-ink follows the accent (already legible on the
	 * dark surface) rather than mixing toward black. */
	@media (prefers-color-scheme: dark) {
		:where(:root, :host) {
			--roxy-accent: #d9a2a6;
			--roxy-accent-ink: var(--roxy-accent);
			--roxy-secondary: #e0cecb;
			--roxy-danger: #e4736b;

			--roxy-bg: #231619;
			--roxy-surface: #37272b;
			--roxy-fg: #f2e4df;
			--roxy-muted: #b39698;
			--roxy-border: #49353a;
		}
	}

	/* Light opt-out: beats the OS-dark block when the host explicitly chooses light. */
	:where(
		:root[data-theme="light"],
		[data-theme="light"],
		:root.light,
		.light,
		:host([data-theme="light"])
	) {
		--roxy-accent: #914955;
		--roxy-accent-ink: color-mix(in oklab, var(--roxy-accent) 70%, black);
		--roxy-secondary: #503a3a;
		--roxy-danger: #b23a38;

		--roxy-bg: #fbf6f3;
		--roxy-surface: #f5e8e0;
		--roxy-fg: #3e2a2c;
		--roxy-muted: #7e625f;
		--roxy-border: #ead9d2;
	}

	/* Dark theme via explicit opt-in ([data-theme=dark] or .dark on any ancestor). */
	:where(
		:root[data-theme="dark"],
		[data-theme="dark"],
		:root.dark,
		.dark,
		:host([data-theme="dark"])
	) {
		--roxy-accent: #d9a2a6;
		--roxy-accent-ink: var(--roxy-accent);
		--roxy-secondary: #e0cecb;
		--roxy-danger: #e4736b;

		--roxy-bg: #231619;
		--roxy-surface: #37272b;
		--roxy-fg: #f2e4df;
		--roxy-muted: #b39698;
		--roxy-border: #49353a;
	}
}
