/* HKG432D accessible contrast layer v3: follows the site's actual body.light toggle.
   This layer is last in the cascade. It does not alter data, layout or custom paito colors. */
body:not(.light){--hc-surface:#111f32;--hc-surface-alt:#1c3047;--hc-head:#29415a;--hc-text:#f8fafc;--hc-muted:#d2deeb;--hc-line:#64748b;--hc-link:#93c5fd;--hc-input:#15283e}
body.light{--hc-surface:#ffffff;--hc-surface-alt:#eef3f8;--hc-head:#dbe5ef;--hc-text:#14243a;--hc-muted:#34465c;--hc-line:#94a3b8;--hc-link:#174ea6;--hc-input:#ffffff}
/* Readability across all modules, including tables added later. */
body .panel,body .cmp,body .analysis,body .features,body .guides,body .guide-panel,body .mini-compare,body .mini-heatmap{color:var(--hc-text)}
body .panel p,body .cmp p,body .analysis p,body .features p,body .guides p,body .guide-panel p,body .mini-compare p,body .mini-heatmap p{color:var(--hc-muted)}
body table{color:var(--hc-text)!important;background:var(--hc-surface)!important;border-color:var(--hc-line)!important}
body table :is(thead,tbody,tfoot) :is(th,td){color:var(--hc-text)!important;background-color:var(--hc-surface)!important;border-color:var(--hc-line)!important;opacity:1}
body table thead :is(th,td),body table tr:first-child:has(th) th{background-color:var(--hc-head)!important;color:var(--hc-text)!important;font-weight:750}
body table tbody tr:nth-child(even) > :is(th,td){background-color:var(--hc-surface-alt)!important}
body table :is(th,td) :is(span,strong,b,small,time,code){color:inherit}
body table :is(th,td) a{color:var(--hc-link)!important;text-decoration:underline;text-underline-offset:2px}
body :is(input,select,textarea){background:var(--hc-input);color:var(--hc-text);border-color:var(--hc-line)}
body :is(input,textarea)::placeholder{color:var(--hc-muted);opacity:1}
body :is(.cmp,.analysis,.features,.guides,.mini-compare,.mini-heatmap) :is(label,small,caption){color:var(--hc-muted)}
body :is(.cmp,.analysis,.features,.guides,.mini-compare,.mini-heatmap) :is(h1,h2,h3,h4,strong){color:var(--hc-text)}
/* Prize blocks use a fixed dark background regardless of theme. */
body .resultsub div{color:#ffffff!important}
body .resultsub strong{color:#fff1a8!important}
/* Paito digits are white by default and black-lettered, even in dark mode. */
body #paitoBody .paitodigit:not(.manual-colored){background:#fff!important;color:#111827!important}
/* Do not overwrite a user's manual background; choose readable ink using CSS supported color contrast if provided by the painter. */
body #paitoBody .paitodigit.manual-colored{color:#111827!important;text-shadow:0 0 1px #ffffff99}
/* Fixed-color indicators and buttons keep their own backgrounds. */
body :is(.live-chip,.nav a.active,.badge,.status.good,.status.warn){background-color:revert-layer}
@media (max-width:640px){body table :is(td,th){line-height:1.5}body .tablewrap{overflow-x:auto;-webkit-overflow-scrolling:touch}}
