/* abcm × AUTOOL Brand Pages 0.10.2 — light mode (research/audit-brand-pages.md).
 * Live palette is "home" only (root .abp.abp-pal-spacex.abp-pal-home; no page has _abp_palette), so the
 * layer is scoped to it: a page switched to tech / spacex / dji / autool keeps that palette in both modes.
 * Screen only: print has its own always-light block below, so "stay dark" never reaches paper.
 * Specificity: html[data-abcm] (0,1,1) + .abp.abp-pal-home (0,2,0) beats every home / spacex rule touched
 * here (max 0,5,0); no !important (the Fluent submit's !important is left alone: yellow fill, black text). */
@media screen {
	/* 1. Root: SpaceX white steps become ink steps; native controls, scrollbars and <option> lists go light. */
	html[data-abcm="light"] .abp.abp-pal-home {
		--sx-w: var(--abcm-text);
		--sx-w70: rgba(11, 11, 12, .74);
		--sx-w60: rgba(11, 11, 12, .64);
		--sx-w35: rgba(11, 11, 12, .36);
		--sx-w15: rgba(11, 11, 12, .14);
		--sx-w10: rgba(11, 11, 12, .08);
		--focus: var(--abcm-text);
		color-scheme: light;
		background: var(--abcm-l1);
		color: var(--abcm-text);
	}
	/* 2. Module schemes (all #000 in "home"): two whites — dark / white on L1 with L2 cards and fields,
	 *    ink / paper / brand on L2 with L1 cards and fields (the same split as palette/pages.css in dark). */
	html[data-abcm="light"] .abp.abp-pal-home :is(.abp-t-dark, .abp-t-white) {
		--bg: var(--abcm-l1);
		--card: var(--abcm-l2);
		--field: var(--abcm-l2);
	}
	html[data-abcm="light"] .abp.abp-pal-home :is(.abp-t-ink, .abp-t-paper, .abp-t-brand) {
		--bg: var(--abcm-l2);
		--card: var(--abcm-l1);
		--field: var(--abcm-l1);
	}

	/* 3. Dark islands: everything drawn on a photograph. Restoring --sx-w* on the scheme element re-resolves
	 *    --fg / --mu / --ln / --acc / --focus there (they are declared as var(--sx-w*) on that same element). */
	html[data-abcm="light"] .abp.abp-pal-home :is(.abp-m.abp-hero--image, .abp-m.abp-cta.has-media, .abp-cards--overlay .abp-card) {
		--sx-w: #F0F0FA;
		--sx-w70: rgba(240, 240, 250, .7);
		--sx-w60: rgba(240, 240, 250, .62);
		--sx-w35: rgba(240, 240, 250, .35);
		--sx-w15: rgba(240, 240, 250, .16);
		--sx-w10: rgba(240, 240, 250, .1);
		--bg: var(--abcm-d1);
		--card: var(--abcm-d2);
		--field: var(--abcm-d2);
		--focus: #F0F0FA;
		color-scheme: dark;
	}
	/* Overlay cards are not scheme elements: their --fg was computed on the (now light) section. */
	html[data-abcm="light"] .abp.abp-pal-home .abp-cards--overlay .abp-card { --fg: var(--sx-w); --ln: var(--sx-w15); --acc: var(--sx-w); }
	/* Video play badge sits on the thumbnail (front.css:864 resolves var(--sx-w) on the badge itself). */
	html[data-abcm="light"] .abp.abp-pal-home .abp-vcard__play { --sx-w: #F0F0FA; --sx-w70: rgba(240, 240, 250, .7); }

	/* 4. Literal light colours that would be white on white. */
	html[data-abcm="light"] .abp.abp-pal-home .abp-help { color: var(--fg); }                                   /* front.css:224 */
	html[data-abcm="light"] .abp.abp-pal-home .abp-help__text { color: var(--mu); }                             /* front.css:226 */
	html[data-abcm="light"] .abp.abp-pal-home .abp-pol__tab[aria-selected="true"] { --mu: var(--sx-w60); }     /* front.css:664 */
	@media (hover: hover) {
		html[data-abcm="light"] .abp.abp-pal-home .abp-posts .abp-feature:hover .abp-feature__more { border-color: var(--fg); background: var(--fg); color: var(--bg); } /* front.css:1104 */
	}

	/* 5. Literal #000 text on a --sx-w fill (black on black once --sx-w is ink). */
	html[data-abcm="light"] .abp.abp-pal-home .abp-chip[aria-pressed="true"] { color: var(--abcm-surface); }   /* front.css:858 */
	html[data-abcm="light"] .abp.abp-pal-home .abp-group[aria-pressed="true"]:not(.abp-library-filters .abp-group) .abp-group__n { color: var(--abcm-surface); } /* front.css:857 */
	html[data-abcm="light"] .abp.abp-pal-home :is(.abp-pol__results mark, mark.abp-hit) { background: var(--abp-brand); color: #0B0B0C; } /* front.css:872 → yellow marker */

	/* 6. Yellow carrying information as thin lines, line icons or rings on light grounds. */
	html[data-abcm="light"] .abp.abp-pal-home .abp-hero:not(.abp-hero--image) .abp-fact .abp-ico { color: var(--fg); } /* front.css:159 */
	html[data-abcm="light"] .abp.abp-pal-home .abp-tl__dot { border-color: var(--fg); background: var(--abp-brand); }  /* front.css:403 */
	html[data-abcm="light"] .abp.abp-pal-home .abp-progress span { background: var(--sx-w); }                           /* front.css:1162 */
	html[data-abcm="light"] .abp.abp-pal-home :is(.abp-form__form .ff-el-form-control:focus, .abp-library-open:focus-visible) { outline-color: var(--fg); } /* front.css:392, 1326 */
	html[data-abcm="light"] .abp.abp-pal-home :is(.abp-ccard__lines a, .abp-chatcard__note a, .abp-form__form .ff-el-tc a) { text-decoration-color: color-mix(in srgb, var(--fg) 35%, transparent); } /* front.css:367, 384, 742 */
	html[data-abcm="light"] .abp.abp-pal-home :is(.abp-ccard__lines a, .abp-chatcard__note a, .abp-form__form .ff-el-tc a):hover { text-decoration-color: currentColor; }
	html[data-abcm="light"] .abp.abp-pal-home .abp-comments .required { color: var(--fg); }                            /* front.css:1098 */
	html[data-abcm="light"] .abp.abp-pal-home .abp-form--brand .abp-form__form input[type="checkbox"] { accent-color: var(--fg); } /* front.css:1268: yellow tick box is 1.8:1 on white */
	/* Ghost button edges: 35% ink is 2.4:1; WCAG 1.4.11 wants 3:1 for control boundaries. */
	html[data-abcm="light"] .abp.abp-pal-home .abp-btn--ghost { border-color: color-mix(in srgb, var(--fg) 50%, transparent); background: transparent; }
	html[data-abcm="light"] .abp.abp-pal-home :is(.abp-m.abp-hero--image, .abp-m.abp-cta.has-media) .abp-btn--ghost { border-color: color-mix(in srgb, var(--fg) 35%, transparent); background: color-mix(in srgb, var(--bg) 50%, transparent); }

	/* 7. Filters tuned for black (Complianz cookie table chevron). */
	html[data-abcm="light"] .abp.abp-pal-home .abp-policy-document #cmplz-document #cmplz-cookies-overview summary div::after { filter: none; } /* front.css:1430 */
}

/* Print: always light, in either mode (front.css:723 sets --fg:#000 on .abp-m at 0,1,0, but the spacex / home
 * layers re-declare --fg / --mu / --ln from --sx-w at 0,2,0+, so prose printed near-white on white). */
@media print {
	html .abp.abp-pal-home {
		--sx-w: #000;
		--sx-w70: #333;
		--sx-w60: #444;
		--sx-w35: #888;
		--sx-w15: #ccc;
		--sx-w10: #ddd;
		--focus: #000;
		color-scheme: light;
		background: #fff !important;
	}
	html .abp.abp-pal-home :is(.abp-t-dark, .abp-t-white, .abp-t-ink, .abp-t-paper, .abp-t-brand) { --bg: #fff; --card: #fff; --field: #fff; }
	html .abp.abp-pal-home .abp-cards--overlay .abp-card { background: #fff; color: #000; --fg: #000; --mu: #333; }
	html .abp.abp-pal-home .abp-cards--overlay .abp-card__media::after { display: none; }
	html .abp.abp-pal-home .abp-cta__media { display: none; }
}
