/* HK432D — high contrast red identity, works in light/dark modes */
.hk-tools,.hk-mini-heatmap{margin:18px 0}
.hk-tools h1,.hk-tools h2,.hk-mini-heatmap h2{color:var(--text)!important}
.hk-tools h2{font-size:1.2rem;margin:25px 0 12px}
.hk-tools p,.hk-mini-heatmap p,.hk-tools label{color:var(--muted)!important;line-height:1.6}
.hk-tools a,.hk-mini-heatmap a{color:#fda4af!important;text-decoration:underline;text-underline-offset:3px}
.light .hk-tools a,.light .hk-mini-heatmap a{color:#9f1239!important}
.hk-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:15px 0;padding:12px;border:1px solid #be123c;border-radius:12px}
.hk-controls input,.hk-controls select{padding:10px 12px;border:2px solid #64748b;border-radius:8px;background:#fff!important;color:#111827!important;min-height:42px;max-width:250px}
.hk-controls input::placeholder{color:#475569!important;opacity:1}
.hk-controls button,.hk-action{background:#be123c!important;color:#fff!important;border:0;border-radius:8px;padding:11px 16px;font-weight:700;cursor:pointer}
.hk-integrity-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:15px 0}
.hk-integrity-grid>div{background:#fff1f2!important;color:#881337!important;border:1px solid #fda4af;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:8px}
.hk-integrity-grid small,.hk-integrity-grid strong{color:#881337!important;overflow-wrap:anywhere}
.hk-search-table,.hk-heatmap{width:100%;border-collapse:collapse;text-align:center;min-width:500px}
.hk-search-table th,.hk-search-table td,.hk-heatmap th,.hk-heatmap td{border:1px solid #94a3b8;padding:9px 6px}
.hk-search-table th,.hk-heatmap th{background:#881337!important;color:#fff!important}
.hk-search-table td{background:#fff!important;color:#111827!important}
.hk-heatmap td{background-color:#fff1f2;color:#4c0519!important;font-weight:800;text-shadow:none!important}
.hk-pager{display:flex;align-items:center;justify-content:center;gap:14px;margin:14px 0}
.hk-pager a{color:#fda4af!important}.light .hk-pager a{color:#9f1239!important}
.hk-tools .hk-hint,.hk-mini-heatmap .hk-hint{font-size:.85rem;color:var(--muted)!important;margin:12px 0}
.hk-tools :focus-visible,.hk-mini-heatmap :focus-visible{outline:3px solid #fbbf24;outline-offset:2px}
/* Preserve legibility of existing latest-result boxes in light mode */
.light .resultsub div,.light .resultsub strong,.light .digits b,.light .balls span{color:#fff!important}
@media(max-width:600px){.hk-heatmap th,.hk-heatmap td{padding:7px 4px;font-size:.8rem}}

/* Heatmap readability v2: opaque cells, strong numeric contrast, both themes */
.hk-heatmap{border-collapse:separate!important;border-spacing:2px!important;background:#fff!important;border-radius:10px;overflow:hidden}
.hk-heatmap th{background:#881337!important;color:#fff!important;font-weight:800!important;text-shadow:none!important;border:1px solid #9f1239!important}
.hk-heatmap td{font-weight:900!important;font-size:1rem!important;line-height:1.35!important;text-shadow:none!important;border:1px solid #9f1239!important;min-width:36px!important;text-align:center!important;font-variant-numeric:tabular-nums!important;background-image:none!important}
.hk-tools .hk-heatmap td,.hk-mini-heatmap .hk-heatmap td{color:inherit!important}
.hk-heatmap td[style*="color:#ffffff"]{color:#ffffff!important}
.hk-heatmap td[style*="color:#4c0519"]{color:#4c0519!important}
.light .hk-heatmap td,.dark .hk-heatmap td{opacity:1!important}
@media(max-width:600px){.hk-heatmap td{font-size:.88rem!important;min-width:32px!important;padding:8px 5px!important}}
