/**
 * ChaoEnglish Brand V2 — site-wide design layer.
 *
 * Palette aligns with the ChaoAcademy brand family:
 * Ink #0F172A · Gold #C39D52 (graphic) / #8A6A2F (text) · Cream #FBF9F4.
 *
 * Loaded on every front-end request. Scoped enough not to fight the theme,
 * but authoritative for brand surfaces (header lockup, nav, footer, links).
 */

:root {
	--ce-ink: #0F172A;
	--ce-ink-soft: #475569;
	--ce-ink-subtle: #64748B;
	--ce-line: #E7E3DA;
	--ce-paper: #FFFFFF;
	--ce-cream: #FBF9F4;
	--ce-gold: #8A6A2F;
	--ce-gold-bright: #C39D52;
	--ce-gold-soft: #D8B45A;
	--ce-best: #0F5132;
	--ce-best-bg: #E7F2EC;
	--ce-miss: #7A2E2E;
	--ce-danger-bg: #FBECEB;

	--ce-serif: "Songti SC", "Noto Serif SC", Georgia, "Times New Roman", serif;
	--ce-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
	--ce-radius: 14px;
	--ce-shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
	--ce-shadow-md: 0 12px 32px rgba(15, 23, 42, .07);
	--ce-focus: 0 0 0 3px rgba(195, 157, 82, .28);
	--ce-gold-wash: #FBF6EA;
}

html {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

body {
	color: var(--ce-ink);
	background: var(--ce-paper);

	/* Map GeneratePress global tokens onto the ChaoEnglish palette. */
	--accent: #8A6A2F;
	--accent-2: #C39D52;
	--contrast: #0F172A;
	--contrast-2: #475569;
	--contrast-3: #94A3B8;
	--base: #FBF9F4;
	--base-2: #FFFFFF;
	--base-3: #FFFFFF;
}

::selection {
	background: rgba(195, 157, 82, .28);
	color: var(--ce-ink);
}

a {
	transition: color .18s ease, border-color .18s ease;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
	background: rgba(255, 255, 255, .94);
	border-bottom: 1px solid var(--ce-line);
	backdrop-filter: saturate(140%) blur(8px);
	-webkit-backdrop-filter: saturate(140%) blur(8px);
}

.cer-site-logo {
	margin: 0;
	line-height: 0;
}

.cer-site-logo a {
	display: inline-flex;
	align-items: center;
	line-height: 0;
	text-decoration: none;
}

.cer-site-logo svg {
	display: block;
	height: 46px;
	width: auto;
}

@media (max-width: 768px) {
	.cer-site-logo svg { height: 38px; }
}

.main-navigation a {
	letter-spacing: .015em;
}

/* ── Typography ─────────────────────────────────────────────────────────── */

h1, h2, h3, .entry-title, .main-title {
	font-family: var(--ce-serif);
	letter-spacing: -.012em;
}

/* ── Content links ──────────────────────────────────────────────────────── */

.entry-content a:not(.button):not(.wp-block-button__link),
.cer-app a:not(.cer-btn):not(.cer-card) {
	color: var(--ce-gold);
	text-decoration-color: rgba(195, 157, 82, .45);
	text-underline-offset: 3px;
}

.entry-content a:not(.button):not(.wp-block-button__link):hover,
.cer-app a:not(.cer-btn):not(.cer-card):hover {
	color: var(--ce-ink);
}

/* ── Footer ─────────────────────────────────────────────────────────────── */

.site-footer {
	background: var(--ce-cream);
	border-top: 1px solid var(--ce-line);
	color: var(--ce-ink-soft);
}

.site-footer a,
.site-info a {
	color: var(--ce-ink);
}

.site-footer a:hover,
.site-info a:hover {
	color: var(--ce-gold);
}

.site-info {
	font-size: 13px;
	letter-spacing: .01em;
}

/* ── Focus ──────────────────────────────────────────────────────────────── */

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
	outline: none;
	box-shadow: var(--ce-focus);
}

/* ── Brand hairline utility ─────────────────────────────────────────────── */

.ce-rule {
	height: 1px;
	border: 0;
	background: var(--ce-line);
}

.ce-gold-rule {
	height: 2px;
	width: 88px;
	border: 0;
	background: var(--ce-gold-bright);
}
