/* TheWhisperNumber.com - layout, theme and accessibility fixes (2026-11-27).
   Loaded after style.css. Kept separate because style.css has an unclosed block,
   which stops some of its own later rules (including the tablet layout) from applying. */

/* Dark theme: a border colour several inline styles expect, and more readable muted text */
:root:not([data-theme="light"]) {
    --border-color: #2a3444;
    --text-muted: #8b95a5;
}

/* Main column may shrink, so the sidebar is never pushed off the screen */
.content-grid > .main-content { min-width: 0; }

/* Tablets and small laptops: sidebar goes under the main column */
@media (max-width: 1024px) {
    .content-grid { display: block !important; }
    .content-grid > .main-content { width: 100% !important; max-width: 100% !important; }
    .content-grid > .sidebar { width: 100% !important; max-width: 100% !important; margin-top: 24px; }
}

/* Light theme: the price strip stays dark, so its text must stay light */
[data-theme="light"] .mkt-bar {
    --text-primary: #e5e7eb;
    --text-secondary: #b6bdc8;
    --text-muted: #b6bdc8;
    color: #e5e7eb;
}

/* Wide tables scroll sideways inside their own box on small screens */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.scroll-hint { display: none; }
@media (max-width: 600px) {
    .scroll-hint { display: block; font-size: 11px; color: var(--text-muted); padding: 0 4px 6px; }
}

/* Keyboard users: a visible focus ring and a way past the header */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
    outline: 2px solid #f59e0b !important;
    outline-offset: 2px;
}
.skip-link {
    position: absolute; left: -9999px; top: 8px; z-index: 10000;
    background: #f59e0b; color: #111 !important; padding: 8px 14px; border-radius: 6px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { left: 8px; }
#content-start { display: block; height: 0; outline: none !important; }

/* Light theme: greens, reds and ambers dark enough to read on a light background */
[data-theme="light"] {
    --green: #047857;
    --red: #b91c1c;
    --accent: #b45309;
    --accent-hover: #92400e;
    --positive: #047857;
    --negative: #b91c1c;
}
[data-theme="light"] .mkt-bar { --green: #10B981; --red: #f87171; --accent: #F59E0B; }
[data-theme="light"] .earnings-time-badge { filter: brightness(0.62) saturate(1.5); }
