/* 6.8.207: semantic states keep their meaning in both themes. */
:root { --gtir-state-error:#a51d2d; --gtir-state-success:#176b34; --gtir-state-warning:#795000; --gtir-readable-muted:#76564b; --gtir-state-surface:#fff; }
html[data-gtir-theme="dark"] { --gtir-state-error:#ffb4b4; --gtir-state-success:#a2dfb2; --gtir-state-warning:#f4d28a; --gtir-readable-muted:#d8baac; --gtir-state-surface:#241b17; }
/* Deliberately target messages; avoid generic .active/.pending layout states. */
html body :is(.error-message,.field-error,.notice.error,.alert-danger,.flash.error),
html body :is(.error-message,.field-error,.notice.error,.alert-danger,.flash.error) :is(p,span,strong,a,small,.gtir-icon) { color:var(--gtir-state-error)!important; }
html body :is(.success-message,.notice.success,.notice.ok,.alert-success,.flash.success),
html body :is(.success-message,.notice.success,.notice.ok,.alert-success,.flash.success) :is(p,span,strong,a,small,.gtir-icon) { color:var(--gtir-state-success)!important; }
html body :is(.warning-message,.notice.warning,.alert-warning),
html body :is(.warning-message,.notice.warning,.alert-warning) :is(p,span,strong,a,small,.gtir-icon) { color:var(--gtir-state-warning)!important; }
html body :is(.hint,.subtle,.notification-date,.bubble-date) { color:var(--gtir-readable-muted)!important; }
html body :is(input,textarea)::placeholder { color:var(--gtir-readable-muted)!important; opacity:1!important; }
html body :is(input,select,textarea)[aria-invalid="true"] { border-color:var(--gtir-state-error)!important; }
html body :is(a,button,input,select,textarea):focus-visible { outline:3px solid var(--gtir-readable-muted); outline-offset:3px; }

html body :is(.error-message,.field-error,.notice.error,.alert-danger,.flash.error,.success-message,.notice.success,.notice.ok,.alert-success,.flash.success,.warning-message,.notice.warning,.alert-warning) { background-color:var(--gtir-state-surface)!important; border-color:currentColor!important; }
