/*
 * Austria's palette. Loaded **after** tokens.css, and only when sjb_country_code() is AT.
 *
 * tokens.css remains the base palette and the only file that names a colour for Switzerland;
 * this file is the one-file answer to "what does Austria look like differently?", exactly as
 * inc/countries/at.php is the one-file answer to "what does Austria *do* differently?".
 * Switzerland loads nothing extra and its rendering is unchanged, byte for byte.
 *
 * ⚠️ **Client-directed departure from §B.15 (2026-08-19): Austria's accent is red, not green.**
 * Recorded in TASKS.md. Switzerland keeps the green accent §B.15 requires. Nothing else in the
 * theme reads the accent — there is no hardcoded green in any .js or .php file, which is the
 * only reason this can be a pure stylesheet.
 *
 * ## Why the selectors are duplicated
 *
 * They mirror tokens.css exactly, because the cascade is doing the work:
 *
 *   :root                                    0,1,0  — beats tokens.css's :root on source order
 *   @media (prefers-color-scheme: light)
 *     :root:not([data-theme="dark"])         0,2,0  — beats tokens.css's light block, and also
 *                                                     its :root[data-theme="light"] block, which
 *                                                     ties on specificity and loses on order
 *   :root[data-theme="light"]                0,2,0  — last, so the toggle still wins both ways
 *
 * ⚠️ **Every key overridden in `:root` that tokens.css *also* declares in its light blocks must
 * be overridden in all three blocks here.** Miss one and tokens.css's Swiss light value wins in
 * light mode while Austria's dark value stands in dark mode — a half-red theme that only shows
 * up when a reader flips the toggle. Keys tokens.css declares *only* on `:root` (the map and the
 * offer hero) are correctly listed once below.
 *
 * Deliberately NOT overridden, so both countries stay identical: the 21 profession-rail chip
 * colours (a trade must read the same in both countries), the cream map surface, lake, city and
 * label colours, the chip and box shadows, and every non-colour metric.
 *
 * ## Contrast
 *
 * Every text pair below was measured, not eyeballed. All clear WCAG AA 4.5:1 on the surface they
 * sit on; --sjb-border-strong and --sjb-focus-on-accent land near Switzerland's own ratios (1.88
 * vs 1.99, 2.95 vs 1.42) and are decorative, matching the house standard rather than raising it
 * for one country only.
 *
 * ⚠️ **--sjb-accent-hover is *darker* than --sjb-accent, which is the opposite of Switzerland.**
 * White text on a lightened red drops to 3.8:1. Lightening on hover is only safe when the accent
 * carries dark text, as the Swiss olive does.
 *
 * ⚠️ **--sjb-danger cannot stay the shipped red.** `.sjb-report__trigger` ("Report this offer")
 * is a danger-outlined button on the same offer page as the accent-filled Apply button, and
 * `[aria-invalid]` fields tint with danger on the public form. Austria's danger is therefore
 * moved ~25° of hue toward crimson-rose and separated hard in lightness, so "destructive" never
 * reads as "primary". --sjb-warning stays amber and is distinct from both.
 */

:root {
	/* --- Surfaces. Warm near-black with a red-brown cast, replacing the graphite. --- */
	--sjb-bg: #110f0f;
	--sjb-surface: #191515;
	--sjb-surface-2: #201a19;
	--sjb-surface-3: #261d1c;
	--sjb-header-bg: #0e0c0c;

	/* --- Lines. --- */
	--sjb-border: #3a2c2a;
	--sjb-border-strong: #55403c;
	--sjb-hover-line: rgba(200, 90, 70, 0.38);

	/* --- Text. All checked against --sjb-surface. --- */
	--sjb-text: #f3ebe7;
	--sjb-text-dim: #c6b3ad;
	--sjb-text-faint: #a3908a;
	--sjb-text-on-accent: #fff6f4;

	/* --- The accent. Brick red; see the hover note above. --- */
	--sjb-accent: #c8412f;
	--sjb-accent-hover: #b8382a;
	--sjb-accent-active: #9e2e1d;
	--sjb-accent-text: #f08a76;
	--sjb-accent-soft: rgba(200, 65, 47, 0.16);
	--sjb-accent-line: rgba(200, 65, 47, 0.5);

	/*
	 * --- The map's accent-derived lines only. The cream surface, the lake, the city and label
	 * colours all stay shared with Switzerland — this is still the same warm paper map.
	 * --sjb-map-point-text sits on --sjb-accent (the cluster bubble in jobs.css), so it flips
	 * from near-black to near-white with the accent.
	 */
	--sjb-map-canton-line: #c8563f;
	--sjb-map-active-line: #c8412f;
	--sjb-map-active-glow: rgba(200, 65, 47, 0.3);
	--sjb-map-point-text: #fff6f4;
	--sjb-map-overlay-bg: rgba(17, 15, 15, 0.9);
	--sjb-map-overlay-border: rgba(200, 90, 70, 0.4);

	/* --- The offer hero. Shared by both site themes, so declared once here. --- */
	--sjb-hero-accent-text: #ffb3a0;
	--sjb-hero-fallback-bg: linear-gradient(135deg, #23100c 0%, #3d1810 55%, #57201a 100%);

	/* --- Meaning. Danger moved off the accent's hue; see the note above. --- */
	--sjb-danger: #ff7a9c;
	--sjb-danger-soft: rgba(255, 122, 156, 0.14);
	--sjb-focus: #e8c46f;
}

/*
 * Light, for a reader whose system asks for it and who has not overridden it.
 */
@media (prefers-color-scheme: light) {
	:root:not([data-theme="dark"]) {
		--sjb-bg: #f6f1ee;
		--sjb-surface: #fffcfa;
		--sjb-surface-2: #efe7e3;
		--sjb-surface-3: #e6dbd6;
		--sjb-header-bg: #faf4f1;

		--sjb-border: #ddcac4;
		--sjb-border-strong: #c0a49c;
		--sjb-hover-line: rgba(160, 60, 42, 0.45);

		--sjb-text: #221b19;
		--sjb-text-dim: #5c4c47;
		--sjb-text-faint: #6b5852;
		--sjb-text-on-accent: #fff6f4;

		--sjb-accent: #b3301f;
		--sjb-accent-hover: #9c2818;
		--sjb-accent-active: #832012;
		--sjb-accent-text: #97281a;
		--sjb-accent-soft: rgba(179, 48, 31, 0.1);
		--sjb-accent-line: rgba(179, 48, 31, 0.45);

		--sjb-danger: #a3103f;
		--sjb-danger-soft: rgba(163, 16, 63, 0.09);

		/*
		 * ⚠️ Declared here as well as on :root, and not because the value differs from
		 * Switzerland's by much — because tokens.css declares --sjb-focus in *its* light
		 * blocks. Omitted, Austria's :root gold would stand in dark mode while Switzerland's
		 * won in light mode. This is the exact leak the header warns about; it was caught by
		 * diffing the computed value against the Swiss palette, not by looking at the page.
		 */
		--sjb-focus: #7a5a1f;
	}
}

/*
 * The toggle. ⚠️ These values duplicate the block above on purpose, for the same reason
 * tokens.css duplicates its own: the explicit choice has to beat the system preference in
 * *both* directions, and a media query cannot do that.
 */
:root[data-theme="light"] {
	--sjb-bg: #f6f1ee;
	--sjb-surface: #fffcfa;
	--sjb-surface-2: #efe7e3;
	--sjb-surface-3: #e6dbd6;
	--sjb-header-bg: #faf4f1;

	--sjb-border: #ddcac4;
	--sjb-border-strong: #c0a49c;
	--sjb-hover-line: rgba(160, 60, 42, 0.45);

	--sjb-text: #221b19;
	--sjb-text-dim: #5c4c47;
	--sjb-text-faint: #6b5852;
	--sjb-text-on-accent: #fff6f4;

	--sjb-accent: #b3301f;
	--sjb-accent-hover: #9c2818;
	--sjb-accent-active: #832012;
	--sjb-accent-text: #97281a;
	--sjb-accent-soft: rgba(179, 48, 31, 0.1);
	--sjb-accent-line: rgba(179, 48, 31, 0.45);

	--sjb-danger: #a3103f;
	--sjb-danger-soft: rgba(163, 16, 63, 0.09);

	/* See the note in the media query above — tokens.css declares this in its light blocks. */
	--sjb-focus: #7a5a1f;
}
