/**
 * The palette, and the few things every page of the journal takes from it.
 *
 * Every colour in this theme comes from a custom property written into the
 * page by HT_Presets. Nothing below names a colour of its own, so a journal
 * that changes one property — here, in Elementor, in VYBE Hello Pro or in
 * VYBE Color Pro — changes it everywhere at once.
 *
 * The fallbacks are the Ink & Paper look, for the moment before the inline
 * properties arrive and for anything that strips them.
 */

:root {
	--ht-main: #8c1c13;
	--ht-pointed: #6d150e;
	--ht-heading: #15120f;
	--ht-text: #33302c;
	--ht-soft: #f7f3ec;
	--ht-page: #fffdf8;
	--ht-line: #e0d8c9;
	--ht-dark: #1b1714;
	--ht-mark: #8c1c13;
	--ht-serif: "Source Serif 4", Georgia, "Noto Serif Tamil", serif;
	--ht-sans: "Inter", system-ui, "Noto Sans Tamil", sans-serif;
	--ht-measure: 38rem;

	/* Worked out from the palette, so a journal sets eight colours and no more. */
	--ht-shade: color-mix(in srgb, var(--ht-main) 8%, transparent);
	--ht-shade-strong: color-mix(in srgb, var(--ht-main) 16%, transparent);
	--ht-quiet: color-mix(in srgb, var(--ht-text) 62%, var(--ht-page));
	--ht-on-dark: color-mix(in srgb, var(--ht-page) 88%, var(--ht-main));
	--ht-radius: 10px;
	--ht-gap: clamp(1rem, 2.5vw, 2rem);
}

/* A browser without color-mix still gets a journal, just a plainer one. */
@supports not (color: color-mix(in srgb, red 50%, blue)) {
	:root {
		--ht-shade: rgba(0, 0, 0, .05);
		--ht-shade-strong: rgba(0, 0, 0, .1);
		--ht-quiet: #6b6560;
		--ht-on-dark: #f3efe8;
	}
}

.ht {
	background: var(--ht-page);
	color: var(--ht-text);
	font-family: var(--ht-sans);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

.ht h1,
.ht h2,
.ht h3,
.ht h4 {
	font-family: var(--ht-serif);
	color: var(--ht-heading);
	line-height: 1.22;
	text-wrap: balance;
}

.ht a {
	color: var(--ht-main);
	text-underline-offset: .18em;
	text-decoration-thickness: from-font;
}

.ht a:hover,
.ht a:focus-visible {
	color: var(--ht-pointed);
}

.ht :focus-visible {
	outline: 2px solid var(--ht-mark);
	outline-offset: 2px;
}

/* Tamil sets a little larger than Latin at the same point size. */
.ht :lang(ta) {
	font-size: 1.06em;
	line-height: 1.7;
}

@media (prefers-reduced-motion: reduce) {
	.ht *,
	.ht *::before,
	.ht *::after {
		animation-duration: .01ms !important;
		transition-duration: .01ms !important;
		scroll-behavior: auto !important;
	}
}
