/* Public homepage only: no effect once the #hero page is unmounted. */
body:has(#root #hero) { background: #f8fafc; color-scheme: light; }

/* Map the homepage's existing inline palette without changing its React logic. */
body:has(#hero) #root :is([style*="#e8ecf4" i], :is([style*="rgb(232, 236, 244)"], [style*="rgb(232,236,244)"]), :is([style*="color: #fff;" i], [style*="color:#fff;" i]), :is([style*="color: rgb(255, 255, 255)"], [style*="color: rgb(255,255,255)"], [style*="color:rgb(255, 255, 255)"], [style*="color:rgb(255,255,255)"]), :is([style*="color: rgb(0, 0, 0)"], [style*="color: rgb(0,0,0)"], [style*="color:rgb(0, 0, 0)"], [style*="color:rgb(0,0,0)"])) { color: #172033 !important; }
body:has(#hero) #root :is([style*="#8899b4" i], :is([style*="rgb(136, 153, 180)"], [style*="rgb(136,153,180)"])) { color: #526176 !important; }
body:has(#hero) #root :is([style*="#5c7090" i], :is([style*="rgb(92, 112, 144)"], [style*="rgb(92,112,144)"])) { color: #5e6b7c !important; }
body:has(#hero) #root :is([style*="#00d4a8" i], :is([style*="rgb(0, 212, 168)"], [style*="rgb(0,212,168)"])) { color: #087f73 !important; }
body:has(#hero) #root :is([style*="#00c87a" i], :is([style*="rgb(0, 200, 122)"], [style*="rgb(0,200,122)"])) { color: #087f5b !important; }
body:has(#hero) #root :is([style*="#f5a623" i], :is([style*="rgb(245, 166, 35)"], [style*="rgb(245,166,35)"])) { color: #965a08 !important; }
body:has(#hero) #root :is([style*="#ff3b5c" i], :is([style*="rgb(255, 59, 92)"], [style*="rgb(255,59,92)"])) { color: #bd2847 !important; }

/* Preserve gradients and images while replacing their dark backing colors. */
body:has(#hero) #root [style*="background"]:is(:is([style*="background: #080e1c" i], [style*="background:#080e1c" i]), :is([style*="background: rgb(8, 14, 28)"], [style*="background: rgb(8,14,28)"], [style*="background:rgb(8, 14, 28)"], [style*="background:rgb(8,14,28)"]), :is([style*="background: #0b1322" i], [style*="background:#0b1322" i]), :is([style*="background: rgb(11, 19, 34)"], [style*="background: rgb(11,19,34)"], [style*="background:rgb(11, 19, 34)"], [style*="background:rgb(11,19,34)"])) { background-color: #f8fafc !important; }
body:has(#hero) #root [style*="background"]:is(:is([style*="background: #0d1525" i], [style*="background:#0d1525" i]), :is([style*="background: rgb(13, 21, 37)"], [style*="background: rgb(13,21,37)"], [style*="background:rgb(13, 21, 37)"], [style*="background:rgb(13,21,37)"])) { background-color: #fff !important; }
body:has(#hero) #root [style*="background"]:is(:is([style*="background: #111d30" i], [style*="background:#111d30" i]), :is([style*="background: rgb(17, 29, 48)"], [style*="background: rgb(17,29,48)"], [style*="background:rgb(17, 29, 48)"], [style*="background:rgb(17,29,48)"]), :is([style*="background: #060b14" i], [style*="background:#060b14" i]), :is([style*="background: rgb(6, 11, 20)"], [style*="background: rgb(6,11,20)"], [style*="background:rgb(6, 11, 20)"], [style*="background:rgb(6,11,20)"]), :is([style*="background: #090f1d" i], [style*="background:#090f1d" i]), :is([style*="background: rgb(9, 15, 29)"], [style*="background: rgb(9,15,29)"], [style*="background:rgb(9, 15, 29)"], [style*="background:rgb(9,15,29)"]), :is([style*="background: #070d1a" i], [style*="background:#070d1a" i]), :is([style*="background: rgb(7, 13, 26)"], [style*="background: rgb(7,13,26)"], [style*="background:rgb(7, 13, 26)"], [style*="background:rgb(7,13,26)"]), :is([style*="background: #5c7090" i], [style*="background:#5c7090" i]), :is([style*="background: rgb(92, 112, 144)"], [style*="background: rgb(92,112,144)"], [style*="background:rgb(92, 112, 144)"], [style*="background:rgb(92,112,144)"])) { background-color: #eef3f7 !important; }
body:has(#hero) #root [style*="background"]:is(:is([style*="background: #182135" i], [style*="background:#182135" i]), :is([style*="background: rgb(24, 33, 53)"], [style*="background: rgb(24,33,53)"], [style*="background:rgb(24, 33, 53)"], [style*="background:rgb(24,33,53)"]), :is([style*="background: #1f2d47" i], [style*="background:#1f2d47" i]), :is([style*="background: rgb(31, 45, 71)"], [style*="background: rgb(31,45,71)"], [style*="background:rgb(31, 45, 71)"], [style*="background:rgb(31,45,71)"])) { background-color: #e2e8f0 !important; }
body:has(#hero) #root nav { background-color: rgba(255,255,255,.97) !important; }

body:has(#hero) #root [style*="border"]:is([style*="#182135" i], :is([style*="rgb(24, 33, 53)"], [style*="rgb(24,33,53)"])) { border-color: #dce3eb !important; }
body:has(#hero) #root [style*="border"]:is([style*="#1f2d47" i], :is([style*="rgb(31, 45, 71)"], [style*="rgb(31,45,71)"])) { border-color: #b8c5d3 !important; }
body:has(#hero) #root [style*="box-shadow"] { box-shadow: 0 10px 30px rgba(23,32,51,.10), 0 0 0 1px #dce3eb !important; }

/* Solid accent controls retain white text; tinted status labels keep dark text. */
body:has(#hero) #root :is(:is([style*="background: #00d4a8" i], [style*="background:#00d4a8" i]), :is([style*="background: rgb(0, 212, 168)"], [style*="background: rgb(0,212,168)"], [style*="background:rgb(0, 212, 168)"], [style*="background:rgb(0,212,168)"]), :is([style*="background-color: rgb(0, 212, 168)"], [style*="background-color: rgb(0,212,168)"], [style*="background-color:rgb(0, 212, 168)"], [style*="background-color:rgb(0,212,168)"])) { background-color: #087f73 !important; color: #fff !important; }
body:has(#hero) #root :is(:is([style*="background: #00b891" i], [style*="background:#00b891" i]), :is([style*="background: rgb(0, 184, 145)"], [style*="background: rgb(0,184,145)"], [style*="background:rgb(0, 184, 145)"], [style*="background:rgb(0,184,145)"])) { background-color: #06685f !important; color: #fff !important; }
body:has(#hero) #root :is(:is([style*="background: #ff3b5c" i], [style*="background:#ff3b5c" i]), :is([style*="background: rgb(255, 59, 92)"], [style*="background: rgb(255,59,92)"], [style*="background:rgb(255, 59, 92)"], [style*="background:rgb(255,59,92)"])) { background-color: #bd2847 !important; color: #fff !important; }
body:has(#hero) #root :is(:is([style*="background: #00c87a" i], [style*="background:#00c87a" i]), :is([style*="background: rgb(0, 200, 122)"], [style*="background: rgb(0,200,122)"], [style*="background:rgb(0, 200, 122)"], [style*="background:rgb(0,200,122)"])) { background-color: #087f5b !important; color: #fff !important; }
body:has(#hero) #root :is(:is([style*="background: #f5a623" i], [style*="background:#f5a623" i]), :is([style*="background: rgb(245, 166, 35)"], [style*="background: rgb(245,166,35)"], [style*="background:rgb(245, 166, 35)"], [style*="background:rgb(245,166,35)"])) { background-color: #965a08 !important; color: #fff !important; }
body:has(#hero) #root :is(h1,h2,h3,h4) { color: #172033 !important; }
body:has(#hero) #root :is(a,button):focus-visible { outline: 3px solid #087f73; outline-offset: 4px; }
body:has(#hero) #root section { background-color: #f8fafc !important; }
body:has(#hero) #root :is([style*="background: rgba(8, 14, 28,"], [style*="background: rgba(8,14,28,"], [style*="background:rgba(8, 14, 28,"], [style*="background:rgba(8,14,28,"]) { background-color: rgba(255,255,255,.97) !important; }
body:has(#hero) #root :is([style*="#3d8bff" i], [style*="rgb(61, 139, 255)"], [style*="rgb(61,139,255)"]) { color: #1d4ed8 !important; }
