
/* SDY Smart Tools — readable in both light and dark site modes */
.sdytools,.sdy-mini-heatmap{margin:18px 0}
.sdytools h1,.sdytools h2,.sdy-mini-heatmap h2{color:inherit}
.sdytools h2{margin:25px 0 10px;font-size:1.2rem}
.sdy-controls{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin:15px 0;padding:12px;border:1px solid #fed7aa;border-radius:12px}
.sdy-controls input,.sdy-controls select{padding:10px 12px;border:1px solid #cbd5e1;border-radius:8px;background:#fff!important;color:#111827!important;min-height:42px;max-width:240px}
.sdy-controls button,.sdy-notify-btn{background:#ea580c;color:#fff!important;border:0;border-radius:8px;padding:11px 16px;cursor:pointer}
.sdy-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:15px 0}
.sdy-stats>div{background:#fff7ed;color:#7c2d12;border:1px solid #fed7aa;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:8px}
.sdy-stats small{color:#9a3412}.sdy-stats strong{color:#7c2d12;overflow-wrap:anywhere}
.sdy-tools-table,.sdy-heatmap{border-collapse:collapse;width:100%;text-align:center;min-width:500px}
.sdy-tools-table th,.sdy-tools-table td,.sdy-heatmap th,.sdy-heatmap td{border:1px solid #cbd5e1;padding:9px 6px}
.sdy-tools-table th,.sdy-heatmap th{background:#9a3412!important;color:#fff!important}
.sdy-tools-table td{background:#fff;color:#111827}
.sdy-heatmap td{color:#111827!important;font-weight:700;text-shadow:0 1px 1px rgba(255,255,255,.5)}
.sdy-pager{display:flex;gap:15px;align-items:center;justify-content:center;margin:15px 0}
.sdy-pager a,.sdy-mini-heatmap a{color:#ea580c}
.sdy-caption{font-size:.85rem;margin:12px 0}
@media(max-width:600px){.sdy-heatmap th,.sdy-heatmap td{padding:7px 4px;font-size:.78rem}}


/* Contrast accessibility fixes for SDY dark theme */
.sdytools,.sdy-mini-heatmap,.ana-panel{color:#f8fafc!important}
.sdytools h1,.sdytools h2,.sdytools h3,.sdy-mini-heatmap h2,.ana-panel h1,.ana-panel h2,.ana-panel h3{color:#ffffff!important}
.sdytools p,.sdy-mini-heatmap p,.ana-panel p,.sdytools label,.ana-panel label{color:#e2e8f0!important}
.sdytools .sectionhead p,.sdy-mini-heatmap .sectionhead p,.ana-panel .sectionhead p{color:#cbd5e1!important}
.sdytools a,.sdy-mini-heatmap a,.ana-panel a{color:#ffb56b!important;text-decoration:underline;text-underline-offset:3px}
.sdytools a:hover,.sdy-mini-heatmap a:hover,.ana-panel a:hover{color:#ffe1b8!important}
.sdytools .sdy-stats>div,.ana-panel .ana-stats>div{background:#fff7ed!important;color:#7c2d12!important}
.sdytools .sdy-stats small,.sdytools .sdy-stats strong,.ana-panel .ana-stats small,.ana-panel .ana-stats strong{color:#7c2d12!important}
.sdytools .sdy-controls input,.sdytools .sdy-controls select,.ana-panel .ana-filters select,.ana-panel .ana-search input{background:#fff!important;color:#111827!important;border:2px solid #64748b!important}
.sdytools .sdy-controls input::placeholder,.ana-panel .ana-search input::placeholder{color:#475569!important;opacity:1}
.sdytools .sdy-controls button,.sdytools .sdy-notify-btn,.ana-panel .ana-filters button,.ana-panel .ana-search button{background:#c2410c!important;color:#fff!important;font-weight:700}
.sdytools .sdy-tools-table th,.sdytools .sdy-heatmap th,.sdy-mini-heatmap .sdy-heatmap th{background:#7c2d12!important;color:#fff!important}
.sdytools .sdy-tools-table td{background:#ffffff!important;color:#111827!important}
.sdytools .sdy-heatmap td,.sdy-mini-heatmap .sdy-heatmap td{color:#111827!important;text-shadow:0 1px 1px #ffffffaa!important}
.ana-panel .ana-table th{background:#7c2d12!important;color:#fff!important}
.ana-panel .ana-table td{background:#fff!important;color:#111827!important}
.ana-panel .ana-table td small{color:#475569!important}
.ana-panel .ana-formula{background:#fff7ed!important;color:#7c2d12!important}
.ana-panel .ana-formula strong{color:#9a3412!important}
.sdytools .sdy-pager span,.sdytools #sdyNotifyStatus{color:#f8fafc!important}
.sdytools :focus-visible,.ana-panel :focus-visible{outline:3px solid #fbbf24!important;outline-offset:2px}

/* SDY readability patch v4: accessible contrast in both themes */
.result .balls span,
.light .result .balls span,
body.light .result .balls span {
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  text-shadow:0 1px 3px rgba(0,0,0,.75)!important;
}
.result .resultsub div,
.light .result .resultsub div {background:#172c43!important;color:#ffffff!important}
.result .resultsub strong,
.light .result .resultsub strong {color:#ffe082!important}
.result .sectionhead h2,.light .result .sectionhead h2 {color:var(--text)!important}
.light .result .sectionhead p {color:#334155!important}
.light .result .official {color:#ffffff!important;background:#056e3b!important}
.sdytools .sdy-heatmap td,.sdy-mini-heatmap .sdy-heatmap td,
.light .sdytools .sdy-heatmap td,.light .sdy-mini-heatmap .sdy-heatmap td {
  color:#431407!important;
  -webkit-text-fill-color:#431407!important;
  text-shadow:none!important;
  font-weight:800!important;
  border:1px solid #a16207!important;
  font-variant-numeric:tabular-nums;
}
.sdytools .sdy-heatmap th,.sdy-mini-heatmap .sdy-heatmap th,
.light .sdytools .sdy-heatmap th,.light .sdy-mini-heatmap .sdy-heatmap th {
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  background:#7c2d12!important;
  border:1px solid #c2410c!important;
}
.sdytools .sdy-heatmap,.sdy-mini-heatmap .sdy-heatmap{border:1px solid #9a3412}
.light .sdytools,.light .sdy-mini-heatmap{color:#172033!important}
.light .sdytools h1,.light .sdytools h2,.light .sdy-mini-heatmap h2{color:#172033!important}
.light .sdytools p,.light .sdy-mini-heatmap p,.light .sdytools label,
.light .sdytools #sdyNotifyStatus,.light .sdytools .sdy-pager span{color:#334155!important}
.light .sdytools a,.light .sdy-mini-heatmap a{color:#9a3412!important}
.light .sdytools .sdy-stats>div{background:#fff7ed!important;color:#7c2d12!important}
.light .sdytools .sdy-stats small,.light .sdytools .sdy-stats strong{color:#7c2d12!important}
.light .sdytools .sdy-controls input,.light .sdytools .sdy-controls select{background:#fff!important;color:#111827!important}
.light .sdytools .sdy-tools-table td{background:#fff!important;color:#111827!important}
.light .sdytools .sdy-tools-table th{background:#7c2d12!important;color:#fff!important}
