/* rainoff.com light / dark modes (1.5.55, Adam 2026-10-10). Two modes only: dark = B · Cinematic (default),
 * light = A · Gallery. Layout never changes per mode; only these tokens do. Brass (accent) and sage appear in both
 * modes so they read as one brand. data-theme on <html>: "b" = dark, "a" = light (set server-side from the cookie and
 * corrected before first paint by the inline head script). */
@font-face { font-family: "Jost"; font-style: normal; font-weight: 300 500; font-display: swap; src: url(fonts/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: 300 500; font-display: swap; src: url(fonts/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: "Source Sans 3"; font-style: normal; font-weight: 300 600; font-display: swap; src: url(fonts/source-sans-3-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: "Source Sans 3"; font-style: normal; font-weight: 300 600; font-display: swap; src: url(fonts/source-sans-3-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; }

/* Dark (default) */
:root, html[data-theme="b"] {
	--rainoff-head: "Jost", "Futura", "Century Gothic", sans-serif;
	--rainoff-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--bg: #0E0F0F; --bg-rgb: 14 15 15; --surface: #171818; --text: #ECEAE5; --text-rgb: 236 234 229;
	--muted: #A9A7A1; --dim: #6E6C68; --line: #2A2B2B; --nav-bg: #0E0F0F; --logo-frame: #2A2B2B;
	--accent: #C9A66B; --accent-ink: #1A1A1A; --link: #ECEAE5; --link-hover: #C9A66B; --sage: #8FAF78;
	--ring-track: #262727; --ring-value: #C9A66B;
	--chart-1: #C9A66B; --chart-2: #8A8780; --chart-3: #3A3B3B; --chart-4: #E0C48F; --chart-label: #ECEAE5; --chart-value: #A9A7A1;
	--btn-radius: 2px;
	color-scheme: dark;
}
/* Light */
html[data-theme="a"] {
	--rainoff-head: "Jost", "Futura", "Century Gothic", sans-serif;
	--rainoff-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--bg: #FFFFFF; --bg-rgb: 255 255 255; --surface: #F6F6F4; --text: #111111; --text-rgb: 17 17 17; /* 1.6.2: was #1A1A1A */
	--muted: #5E5E5E; --dim: #8C8C8C; --line: #E4E4E2; --nav-bg: #FFFFFF; --logo-frame: #1A1A1A;
	--accent: #C9A66B; --accent-ink: #1A1A1A; --link: #1A1A1A; --link-hover: #4F6B3A; --sage: #4F6B3A;
	--ring-track: #ECECEA; --ring-value: #A8844A;
	--chart-1: #A8844A; --chart-2: #8C8C8C; --chart-3: #D6D6D2; --chart-4: #4F6B3A; --chart-label: #1A1A1A; --chart-value: #5E5E5E;
	--btn-radius: 2px;
	color-scheme: light;
}
/* RPhoto's Customizer colours follow the mode (its inline :root values lose to html[data-theme]). */
html[data-theme] {
	--rphoto-background-color: var(--bg); --rphoto-light-background-color: var(--bg); --rphoto-menu-modal-background-color: var(--bg);
	--rphoto-primary-color: var(--text); --rphoto-secondary-color: var(--muted); --rphoto-border-color: var(--line); --rphoto-accent-color: var(--text);
}
html[data-theme], html[data-theme] body { background: var(--bg); color: var(--text); }
/* Logo bar keeps its black artwork; a hairline frame keeps it from vanishing / floating. */
.rainoff-logo img { outline: 1px solid var(--logo-frame); }

/* Charts (Mission, Conservation, home): the inline SVGs carry the old fixed colours as attributes; CSS wins. */
svg rect[fill="#ffffff"], svg rect[fill="#fff"] { fill: var(--chart-1); }
svg rect[fill="#cfcfcf"] { fill: var(--chart-4); }
svg rect[fill="#6b6b6b"], svg rect[fill="#8f8f8f"], svg rect[fill="#9a9a9a"] { fill: var(--chart-2); }
svg rect[fill="#3d3d3d"], svg rect[fill="#5a5a5a"], svg rect[fill="#5c6156"] { fill: var(--chart-3); }
svg rect[stroke="#9a9a9a"], svg rect[stroke="#bdbdbd"], svg [stroke="#2a2a2a"] { stroke: var(--dim); }
svg text[fill="#e9eae5"], svg text[fill="#ffffff"], svg text[fill="#fff"] { fill: var(--chart-label); }
svg text[fill="#c9cbc4"], svg text[fill="#9a9a9a"], svg text[fill="#6b6b6b"] { fill: var(--chart-value); }
.rm-svg text, .rm-svg { font-family: var(--rainoff-body); }
.rm-sw[style*="#ffffff"] { background: var(--chart-1) !important; }
.rm-sw[style*="#cfcfcf"] { background: var(--chart-4) !important; }
.rm-sw[style*="#8f8f8f"] { background: var(--chart-2) !important; }
.rm-sw[style*="#3d3d3d"], .rm-sw[style*="#5a5a5a"] { background: var(--chart-3) !important; }
.rm-sw[style*="#bdbdbd"] { border-color: var(--dim) !important; }
[style*="background:#ffffff"]:not(img), [style*="background: #ffffff"]:not(img) { background: var(--chart-1) !important; }

/* Light/dark toggle in the header: sun when dark (tap for light), moon when light (tap for dark). */
.rainoff-mode-toggle {
	display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
	width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 50%;
	background: transparent; color: var(--text); cursor: pointer; transition: border-color .15s, color .15s;
}
.rainoff-mode-toggle:hover, .rainoff-mode-toggle:focus-visible { border-color: var(--accent); color: var(--accent); }
.rainoff-mode-toggle svg { width: 20px; height: 20px; display: block; }
.rainoff-mode-toggle .mode-moon { display: none; }
html[data-theme="a"] .rainoff-mode-toggle .mode-sun { display: none; }
html[data-theme="a"] .rainoff-mode-toggle .mode-moon { display: block; }
.rainoff-header-tools { display: flex; align-items: center; gap: 10px; }
/* 1.5.60: toggle sits right after the logo (header layout in style.css). */
.rainoff-nav-toggle { white-space: nowrap; flex: 0 0 auto; }
@media (max-width: 379.98px) { .rainoff-header-tools { gap: 6px; } .rainoff-mode-toggle { width: 40px; height: 40px; } .rainoff-logo img { width: min(304px, 50vw) !important; } }

/* ---------- One separator, site-wide (1.5.60, Adam 2026-10-10). Reference: the rule above the home quote. ----------
 * Change the look here only. Used by: home section breaks (quote, featured story, rings, closing), Mission/Conservation
 * section blocks (.rm-block), the page-title rule (RPhoto hr.color-accent) and any element with class="rainoff-sep". */
:root { --sep-color: var(--accent); --sep-thick: 1px; --sep-width: 160px; --sep-space: 40px; }
@media (max-width: 479.98px) { :root { --sep-width: 120px; --sep-space: 28px; } }
.rainoff-sep,
hr.rainoff-sep,
.rainoff-home .rh-hero + .rh-mission::before,
.rainoff-home .rh-section + .rh-section::before,
.rm-block::before,
.entry-header hr.color-accent {
	content: ""; display: block; box-sizing: content-box; width: var(--sep-width); max-width: 100%; height: 0;
	margin: var(--sep-space) auto; padding: 0; border: 0; border-top: var(--sep-thick) solid var(--sep-color); background: none; color: var(--sep-color); opacity: 1;
}
.entry-header hr.color-accent::before, .entry-header hr.color-accent::after { content: none; display: none; }
/* The page-title rule sits above the title: no extra space above it at the very top of the page. */
.entry-header hr.color-accent { margin-top: 0; }

/* 1.5.62: the separator is drawn as a border so the 1px line snaps to whole pixels (a 1px background at a fractional
 * position anti-aliased into a pale grey double line). */
/* 5. Dark mode: the black logo block gets a thin brass frame so it doesn't disappear into the page. */
html[data-theme="b"] { --logo-frame: var(--accent); }
/* 4. Toggle: ink outline in light mode (brass on hover/focus). Phones/tablets: the circle matches the logo block's height
 * (--rainoff-logo-h, set by mode-toggle.js), with an invisible 44px tap area around it. */
html[data-theme="a"] .rainoff-mode-toggle { border-color: var(--text); }
html[data-theme="a"] .rainoff-mode-toggle:hover, html[data-theme="a"] .rainoff-mode-toggle:focus-visible { border-color: var(--accent); color: var(--accent); }
/* 1.6.2 (Branding, Adam 2026-10-11): the button itself is now the 44 x 44 px tap area; the visible circle (same size as
 * before, the logo block's height) is drawn by ::before and the icon keeps its size. Negative margins keep the header
 * layout exactly where it was. */
@media (max-width: 879.98px) {
	.rainoff-mode-toggle { --rmt: max(22px, var(--rainoff-logo-h, 22px)); position: relative; width: 44px; height: 44px; margin: calc((var(--rmt) - 44px) / 2); border-width: 0 !important; border-style: solid; }
	.rainoff-mode-toggle::before { content: ""; position: absolute; left: 50%; top: 50%; width: var(--rmt); height: var(--rmt); box-sizing: border-box; transform: translate(-50%, -50%); border: 1px solid; border-color: inherit; border-radius: 50%; pointer-events: none; }
	.rainoff-mode-toggle svg { position: relative; width: calc(var(--rmt) * .64); height: calc(var(--rmt) * .64); }
	.rainoff-mode-toggle::after { content: none; }
}

/* 1.5.63: Field Cards colours (bird-derived set from Branding; flame always means "declining"). */
:root, html[data-theme="b"] { --fc-teal: #3FA6A0; --fc-emerald: #8FAF72; --fc-flame: #E0714A; --fc-amber: #E2B54F; --fc-grey: #4A4B4A; }
html[data-theme="a"] { --fc-teal: #1F7A78; --fc-emerald: #4F6B3A; --fc-flame: #C4532F; --fc-amber: #C99A2E; --fc-grey: #B9B8B3; }

/* 1.5.64: brass outline on the toggle in dark mode too (light keeps ink). */
html[data-theme="b"] .rainoff-mode-toggle { border-color: var(--accent); }
