/* ═══════════════════════════════════════════════════════════
   StormerSite — Shared Stylesheet
   /css/stormersite.css
   
   Used by: hailreportrecent.cfm, showreport.cfm, and future pages.
   Header (mHeader.cfm) and footer (mFooter.cfm) have their own
   embedded <style> blocks — this file covers page content only.
   ═══════════════════════════════════════════════════════════ */

/* ── Reset ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── Design Tokens ────────────────────────────────────── */
:root {
    --bg-primary: #0b0e13;
    --bg-surface: #0f1218;
    --bg-card: #141920;
    --bg-elevated: #1a2030;
    --border-subtle: rgba(0, 180, 220, 0.08);
    --border-accent: rgba(0, 180, 220, 0.20);
    --cyan: #00d4ff;
    --cyan-dim: rgba(0, 212, 255, 0.10);
    --cyan-glow: rgba(0, 212, 255, 0.25);
    --orange: #ff6b35;
    --purple: #a855f7;
    --red: #ef4444;
    --amber: #f59e0b;
    --emerald: #10b981;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-faint: #475569;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;
    --font-display: 'JetBrains Mono', 'IBM Plex Mono', monospace;
    --max-w: 1200px;
    --radius: 8px;

    /* Storm type colors (dark default) */
    --hail-color: #ed3500;
    --hail-bg: rgba(237, 53, 0, 0.06);
    --wind-color: #0875d1;
    --wind-bg: rgba(8, 117, 209, 0.06);
    --tornado-color: #fc0505;
    --tornado-bg: rgba(252, 5, 5, 0.06);

    /* Link hover */
    --link-hover: #fff;

    /* Header / Footer (used by mHeader.cfm, mFooter.cfm) */
    --header-bg: rgba(15, 18, 24, 0.92);
    --header-border: rgba(0, 180, 220, 0.10);
    --header-shadow: 0 1px 30px rgba(0, 0, 0, 0.35);
    --nav-text: #94a3b8;
    --nav-hover-text: #e2e8f0;
    --nav-hover-bg: rgba(0, 180, 220, 0.06);
    --nav-active-text: #00b8db;
    --nav-active-bg: rgba(0, 180, 220, 0.08);
    --cta-text: #00b8db;
    --cta-border: rgba(0, 180, 220, 0.25);
    --cta-bg: rgba(0, 180, 220, 0.06);
    --cta-hover-text: #fff;
    --cta-hover-bg: rgba(0, 180, 220, 0.14);
    --search-bg: rgba(255, 255, 255, 0.04);
    --search-border: rgba(0, 180, 220, 0.15);
    --search-text: #e2e8f0;
    --search-placeholder: #4a5568;
    --search-btn-bg: rgba(0, 180, 220, 0.12);
    --search-btn-border: rgba(0, 180, 220, 0.25);
    --search-btn-text: #00b8db;
    --hamburger-border: rgba(0, 180, 220, 0.15);
    --hamburger-bar: #94a3b8;
    --mobile-nav-bg: rgba(15, 18, 24, 0.97);
    --mobile-search-bg: rgba(15, 18, 24, 0.95);
    --overlay-bg: rgba(0, 0, 0, 0.6);

    /* Footer */
    --footer-bg: #0f1218;
    --footer-text: #94a3b8;
    --footer-border: rgba(0, 180, 220, 0.10);
    --footer-label: #64748b;
    --footer-link: #94a3b8;
    --footer-link-hover: #00b8db;
    --footer-link-dot: rgba(0, 180, 220, 0.3);
    --footer-cta-bg: #171c24;
    --footer-cta-border: rgba(0, 180, 220, 0.12);
    --footer-cta-heading: #e2e8f0;
    --footer-cta-para: #64748b;
    --footer-cta-btn-bg: linear-gradient(135deg, #00b8db 0%, #0891b2 100%);
    --footer-cta-btn-text: #0f1218;
    --footer-cta-stat: #475569;
    --footer-cta-stat-num: #00b8db;
    --footer-bottom-border: rgba(255, 255, 255, 0.04);
    --footer-tagline: #334155;
    --footer-copy: #334155;
    --footer-trend-border: rgba(255, 255, 255, 0.04);
    --footer-trend-pop: #475569;
    --footer-cta-glow: rgba(0, 180, 220, 0.08);
    --footer-cta-badge-bg: rgba(0, 180, 220, 0.08);
    --footer-cta-badge-border: rgba(0, 180, 220, 0.15);
    --footer-cta-badge-text: #00b8db;
}

/* ════════════════════════════════════════════════════════════
   SEARCH — ss-search-*
   Add this block to sts.css. All colors use CSS vars for
   automatic dark/light theme support.
   ════════════════════════════════════════════════════════════ */

/* ── Search container ─────────────────────────────────────── */
.ss-search {
    position: relative;
    flex-shrink: 0;
}

/* ── Input row ────────────────────────────────────────────── */
.ss-search-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.ss-search-icon {
    position: absolute;
    left: 10px;
    width: 15px;
    height: 15px;
    color: var(--text-faint);
    pointer-events: none;
    transition: color 0.2s;
}

.ss-search-input {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 400;
    color: var(--search-text);
    background: var(--search-bg);
    border: 1px solid var(--search-border);
    border-radius: 6px;
    padding: 7px 30px 7px 32px;
    width: 200px;
    outline: none;
    transition: all 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
/* Remove browser-default search cancel button (we have our own) */
.ss-search-input::-webkit-search-cancel-button,
.ss-search-input::-webkit-search-decoration {
    -webkit-appearance: none;
    appearance: none;
    display: none;
}

.ss-search-input::placeholder {
    color: var(--search-placeholder);
}

.ss-search-input:focus {
    border-color: var(--border-accent);
    background: var(--cyan-dim);
    box-shadow: 0 0 0 2px var(--cyan-dim);
    width: 260px;
}
.ss-search-input:focus ~ .ss-search-icon,
.ss-search-input:not(:placeholder-shown) ~ .ss-search-icon {
    color: var(--cyan);
}

/* ── Clear button ─────────────────────────────────────────── */
.ss-search-clear {
    position: absolute;
    right: 6px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    border-radius: 3px;
    color: var(--text-faint);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: all 0.15s;
}
.ss-search-clear:hover {
    color: var(--text-primary);
    background: var(--nav-hover-bg);
}

/* ── Dropdown ─────────────────────────────────────────────── */
.ss-search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 340px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(0, 212, 255, 0.08);
    z-index: 9500;
    padding: 6px 0;
    overscroll-behavior: contain;
}

/* ── Group labels ─────────────────────────────────────────── */
.ss-search-group-label {
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 10px 14px 4px;
}
.ss-search-group-label:first-child {
    padding-top: 6px;
}

/* ── Result item ──────────────────────────────────────────── */
.ss-search-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 8px 14px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: background 0.1s, color 0.1s;
    cursor: pointer;
}
.ss-search-item:hover,
.ss-search-item--active {
    background: var(--cyan-dim);
    color: var(--text-primary);
}

.ss-search-item-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 1px;
    color: var(--text-faint);
    transition: color 0.1s;
}
.ss-search-item-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
.ss-search-item:hover .ss-search-item-icon,
.ss-search-item--active .ss-search-item-icon {
    color: var(--cyan);
}

.ss-search-item-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.ss-search-item-title {
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ss-search-item-title mark {
    background: transparent;
    color: var(--cyan);
    font-weight: 600;
}

.ss-search-item-sub {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--text-faint);
    line-height: 1.3;
}

/* ── Product-type item accent ─────────────────────────────── */
.ss-search-item[href*="hail-history-reports"] .ss-search-item-icon {
    color: var(--cta-border);
}
.ss-search-item[href*="hail-history-reports"]:hover .ss-search-item-icon,
.ss-search-item[href*="hail-history-reports"].ss-search-item--active .ss-search-item-icon {
    color: var(--cta-hover-text);
}

/* ── Empty state ──────────────────────────────────────────── */
.ss-search-empty {
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-faint);
    padding: 20px 14px;
    text-align: center;
}

/* ── Scrollbar ────────────────────────────────────────────── */
.ss-search-dropdown::-webkit-scrollbar {
    width: 5px;
}
.ss-search-dropdown::-webkit-scrollbar-track {
    background: transparent;
}
.ss-search-dropdown::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}
.ss-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: var(--text-faint);
}

/* ── Mobile: search below header ──────────────────────────── */
.ss-mobile-search .ss-search {
    width: 100%;
}
.ss-mobile-search .ss-search-input {
    width: 100%;
    font-size: 13px;
    padding: 10px 34px 10px 36px;
}
.ss-mobile-search .ss-search-icon {
    left: 12px;
    width: 16px;
    height: 16px;
}
.ss-mobile-search .ss-search-clear {
    right: 8px;
}
.ss-mobile-search .ss-search-input:focus {
    width: 100%;
}
.ss-mobile-search .ss-search-dropdown {
    width: calc(100vw - 48px);
    right: auto;
    left: 0;
}
@media (max-width: 480px) {
    .ss-mobile-search .ss-search-dropdown {
        width: calc(100vw - 32px);
    }
}

/* ── Desktop search within header ─────────────────────────── */
.ss-search-wrap .ss-search-input {
    width: 180px;
}
.ss-search-wrap .ss-search-input:focus {
    width: 260px;
}

/* ════════════════════════════════════════════════════════════
   SEARCH — Additional Styles (append after existing ss-search block)
   These were missing from the first round.
   ════════════════════════════════════════════════════════════ */

/* ── Static items (errors, not-found — not clickable) ─────── */
.ss-search-item--static {
    cursor: default;
    opacity: 0.7;
}
.ss-search-item--static:hover {
    background: transparent;
}

/* ── "View all results" footer ────────────────────────────── */
.ss-search-more {
    display: block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    padding: 10px 14px;
    border-top: 1px solid var(--border-subtle);
    color: var(--cyan);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.ss-search-more:hover,
.ss-search-more.ss-search-item--active {
    background: var(--cyan-dim);
    color: var(--link-hover);
}


/* ════════════════════════════════════════════════════════════
   SEARCH — Light Mode Overrides
   Place after the main [data-theme="light"] block or at EOF.
   ════════════════════════════════════════════════════════════ */

/* Dropdown shadow: softer for light backgrounds */
[data-theme="light"] .ss-search-dropdown {
    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(14, 116, 144, 0.12);
}

/* Match highlight: subtle teal background chip instead of just color */
[data-theme="light"] .ss-search-item-title mark {
    color: #0e7490;
    background: rgba(14, 116, 144, 0.10);
    border-radius: 2px;
    padding: 0 2px;
}

/* Hover/active row: warm teal tint */
[data-theme="light"] .ss-search-item:hover,
[data-theme="light"] .ss-search-item--active {
    background: rgba(14, 116, 144, 0.05);
}

/* Active icon inherits light-mode cyan */
[data-theme="light"] .ss-search-item:hover .ss-search-item-icon,
[data-theme="light"] .ss-search-item--active .ss-search-item-icon {
    color: #0e7490;
}

/* "View all" link */
[data-theme="light"] .ss-search-more {
    color: #0e7490;
    border-top-color: #d5d0c8;
}
[data-theme="light"] .ss-search-more:hover,
[data-theme="light"] .ss-search-more.ss-search-item--active {
    background: rgba(14, 116, 144, 0.06);
    color: #0c4a6e;
}

/* Group labels: use light-mode muted tone */
[data-theme="light"] .ss-search-group-label {
    color: #a8a29e;
}

/* Empty state text */
[data-theme="light"] .ss-search-empty {
    color: #78716c;
}

/* Subtitles */
[data-theme="light"] .ss-search-item-sub {
    color: #78716c;
}

/* Scrollbar */
[data-theme="light"] .ss-search-dropdown::-webkit-scrollbar-thumb {
    background: #d5d0c8;
}
[data-theme="light"] .ss-search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a29e;
}


/* ── Light Theme — Hybrid "Field Report" ─────────────── */
[data-theme="light"] {
    --bg-primary: #f5f3ef;
    --bg-surface: #faf8f5;
    --bg-card: #ffffff;
    --bg-elevated: #ebe8e2;
    --border-subtle: #d5d0c8;
    --border-accent: rgba(14, 116, 144, 0.25);
    --cyan: #0e7490;
    --cyan-dim: rgba(14, 116, 144, 0.08);
    --cyan-glow: rgba(14, 116, 144, 0.15);
    --orange: #c2410c;
    --purple: #7c3aed;
    --red: #dc2626;
    --amber: #b45309;
    --emerald: #047857;
    --text-primary: #1c1917;
    --text-secondary: #44403c;
    --text-muted: #78716c;
    --text-faint: #a8a29e;

    --hail-color: #c22d00;
    --hail-bg: #fef2ee;
    --wind-color: #0369a1;
    --wind-bg: #eff6ff;
    --tornado-color: #dc2626;
    --tornado-bg: #fef2f2;
    --link-hover: #0c4a6e;

    /* Header / Footer light overrides */
    --header-bg: rgba(245, 243, 239, 0.95);
    --header-border: #d5d0c8;
    --header-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    --nav-text: #57534e;
    --nav-hover-text: #1c1917;
    --nav-hover-bg: rgba(14, 116, 144, 0.06);
    --nav-active-text: #0e7490;
    --nav-active-bg: rgba(14, 116, 144, 0.08);
    --cta-text: #0e7490;
    --cta-border: rgba(14, 116, 144, 0.30);
    --cta-bg: rgba(14, 116, 144, 0.06);
    --cta-hover-text: #0c4a6e;
    --cta-hover-bg: rgba(14, 116, 144, 0.12);
    --search-bg: rgba(0, 0, 0, 0.03);
    --search-border: #d5d0c8;
    --search-text: #1c1917;
    --search-placeholder: #a8a29e;
    --search-btn-bg: rgba(14, 116, 144, 0.08);
    --search-btn-border: rgba(14, 116, 144, 0.25);
    --search-btn-text: #0e7490;
    --hamburger-border: #d5d0c8;
    --hamburger-bar: #78716c;
    --mobile-nav-bg: rgba(245, 243, 239, 0.98);
    --mobile-search-bg: rgba(245, 243, 239, 0.98);
    --overlay-bg: rgba(0, 0, 0, 0.3);

    --footer-bg: #ebe8e2;
    --footer-text: #57534e;
    --footer-border: #d5d0c8;
    --footer-label: #78716c;
    --footer-link: #57534e;
    --footer-link-hover: #0e7490;
    --footer-link-dot: rgba(14, 116, 144, 0.3);
    --footer-cta-bg: #ffffff;
    --footer-cta-border: rgba(14, 116, 144, 0.15);
    --footer-cta-heading: #1c1917;
    --footer-cta-para: #78716c;
    --footer-cta-btn-bg: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
    --footer-cta-btn-text: #ffffff;
    --footer-cta-stat: #78716c;
    --footer-cta-stat-num: #0e7490;
    --footer-bottom-border: #d5d0c8;
    --footer-tagline: #78716c;
    --footer-copy: #78716c;
    --footer-trend-border: #ebe8e2;
    --footer-trend-pop: #a8a29e;
    --footer-cta-glow: rgba(14, 116, 144, 0.05);
    --footer-cta-badge-bg: rgba(14, 116, 144, 0.08);
    --footer-cta-badge-border: rgba(14, 116, 144, 0.15);
    --footer-cta-badge-text: #0e7490;
}

/* ── Base ─────────────────────────────────────────────── */
html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-mono);
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    min-width: 0;
}

a { color: var(--cyan); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--link-hover); }

img { max-width: 100%; height: auto; display: block; }

/* ── Layout ───────────────────────────────────────────── */
.page-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 16px;
    width: 100%;
    min-width: 0;
}
@media (min-width: 601px) {
    .page-wrap { padding: 0 24px; }
}

/* ── Breadcrumb ───────────────────────────────────────── */
.breadcrumb {
    padding: 12px 0 0;
    font-size: 11px;
    color: var(--text-faint);
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--cyan); }
.breadcrumb .sep { margin: 0 4px; opacity: 0.4; }

/* ── Page Title ───────────────────────────────────────── */
.page-title-block { padding: 16px 0 20px; }
.page-title-block h1 {
    font-family: var(--font-display);
    font-size: clamp(18px, 5vw, 32px);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.5px;
    word-break: break-word;
}
.page-title-block h1 .accent { color: var(--cyan); }

.page-subtitle {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.coord-badge {
    background: var(--cyan-dim);
    border: 1px solid var(--border-accent);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 10px;
    color: var(--cyan);
    letter-spacing: 0.3px;
}

/* ── Info Box (The DNA) ───────────────────────────────── */
.info-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1px;
    background: var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 24px;
    border: 1px solid var(--border-subtle);
    position: relative;
}
@media (min-width: 480px) {
    .info-box { grid-template-columns: repeat(3, 1fr); }
}

.info-panel {
    background: var(--bg-card);
    padding: 18px 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
@media (min-width: 601px) {
    .info-panel { padding: 24px 20px; }
}

.info-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 2px;
    border-radius: 0 0 2px 2px;
}
.info-panel:nth-child(1)::before { background: var(--cyan); }
.info-panel:nth-child(2)::before { background: var(--amber); }
.info-panel:nth-child(3)::before { background: var(--red); }

.info-number {
    font-family: var(--font-display);
    font-size: clamp(28px, 8vw, 48px);
    font-weight: 800;
    line-height: 1;
    margin-bottom: 6px;
    letter-spacing: -1px;
}
.info-panel:nth-child(1) .info-number { color: var(--cyan); }
.info-panel:nth-child(2) .info-number { color: var(--amber); }
.info-panel:nth-child(3) .info-number { color: var(--red); }

.info-number .unit {
    font-size: 0.45em; font-weight: 600;
    letter-spacing: 0; vertical-align: super; opacity: 0.7;
}
.info-label {
    font-size: 9px; font-weight: 600;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: var(--text-muted); line-height: 1.4;
}
.info-sublabel { font-size: 10px; color: var(--text-faint); margin-top: 4px; }
.info-number.loading { color: var(--text-faint); opacity: 0.3; }

.risk-bar { display: flex; gap: 3px; justify-content: center; margin-top: 10px; }
.risk-bar .pip {
    width: 18px; height: 4px; border-radius: 2px;
    background: var(--border-subtle); transition: background 0.3s;
}
.risk-bar .pip.active { background: var(--red); }

/* Scan line animation */
.info-box::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--cyan), transparent);
    opacity: 0;
    animation: scanLine 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes scanLine {
    0%, 100% { opacity: 0; top: 0; }
    30% { opacity: 0.5; } 50% { opacity: 0.5; } 70% { opacity: 0; }
    100% { top: 100%; }
}

/* ── Content Grid ─────────────────────────────────────── */
.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 40px;
}
@media (min-width: 960px) {
    .content-grid {
        grid-template-columns: 1fr 320px;
        gap: 28px;
    }
}
@media (min-width: 1100px) {
    .content-grid { grid-template-columns: 1fr 340px; }
}

/* ── Cards ────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    overflow: hidden;
    min-width: 0;
}
.card + .card { margin-top: 20px; }
@media (min-width: 601px) {
    .card + .card { margin-top: 24px; }
}

.card-header {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
@media (min-width: 601px) {
    .card-header { padding: 16px 20px; gap: 10px; }
}

.card-header h2, .card-header h3 {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.3px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (min-width: 601px) {
    .card-header h2, .card-header h3 {
        font-size: 13px;
        white-space: normal;
    }
}

.card-icon {
    width: 28px; height: 28px; min-width: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.card-icon svg { width: 14px; height: 14px; }
.icon-cyan { background: var(--cyan-dim); color: var(--cyan); }
.icon-green { background: rgba(16,185,129,0.1); color: var(--emerald); }
.icon-amber { background: rgba(245,158,11,0.1); color: var(--amber); }
.icon-purple { background: rgba(139,92,246,0.1); color: var(--purple); }
.icon-orange { background: rgba(255,107,53,0.1); color: var(--orange); }
.icon-red { background: rgba(239,68,68,0.1); color: var(--red); }

.card-body { padding: 14px; }
@media (min-width: 601px) {
    .card-body { padding: 20px; }
}
.card-body p { line-height: 1.8; }

.summary-text { font-size: 12px; color: var(--text-secondary); line-height: 1.8; }
@media (min-width: 601px) {
    .summary-text { font-size: 13px; }
}
.summary-text strong { color: var(--text-primary); font-weight: 600; }

/* ── Last Hail ────────────────────────────────────────── */
.last-hail-highlight {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 14px;
    background: var(--bg-elevated);
    border-radius: 6px;
    border: 1px solid var(--border-subtle);
}
@media (min-width: 601px) {
    .last-hail-highlight {
        flex-direction: row;
        align-items: center;
        gap: 16px;
        padding: 16px;
    }
}
.last-hail-date {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--cyan);
    white-space: nowrap;
}
@media (min-width: 601px) {
    .last-hail-date { font-size: 22px; }
}
.last-hail-detail { font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.last-hail-detail strong { color: var(--text-primary); }

/* ── Time Navigation ──────────────────────────────────── */
.time-nav-section { margin-bottom: 16px; }
.time-nav-section:last-child { margin-bottom: 0; }
.time-nav-label {
    font-size: 9px; font-weight: 600;
    letter-spacing: 1.2px; text-transform: uppercase;
    color: var(--text-faint); margin-bottom: 8px;
}
.time-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.time-pill {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 5px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
    /* Touch-friendly tap targets on mobile */
    min-height: 36px;
    display: inline-flex;
    align-items: center;
}
@media (min-width: 601px) {
    .time-pill { padding: 6px 12px; min-height: auto; }
}
.time-pill:hover { background: var(--cyan-dim); border-color: var(--border-accent); color: var(--cyan); }
.time-pill.active { background: var(--cyan-dim); border-color: var(--cyan); color: var(--cyan); font-weight: 700; }

/* ── Map Wrap (shared by stormday, hailreportrecent, etc.) ── */

/* Prevent horizontal overscroll / swipe-to-blank on mobile */
html, body { overflow-x: hidden; max-width: 100vw; }

/* Map touch: require two fingers to pan on mobile */
.leaflet-touch .leaflet-container { touch-action: pan-x pan-y; }

.storm-map-wrap {
    position: relative;
    height: 300px;
    overflow: hidden;
    /* No border-radius here — inherits from parent .card overflow */
}
@media (min-width: 480px) {
    .storm-map-wrap { height: 380px; }
}
@media (min-width: 768px) {
    .storm-map-wrap { height: 460px; }
}

/* #hail-map, #storm-map, #report-map all fill their wrapper */
#hail-map, #storm-map, #report-map { width: 100%; height: 100%; background: var(--bg-surface); }

/* Fullscreen state — !important on height/width to beat any scoped overrides */
.storm-map-wrap.fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 9500;
    border-radius: 0 !important;
    overflow: hidden;
}
.storm-map-wrap.fullscreen .map-toolbar { top: 10px; right: 10px; }
.storm-map-wrap.fullscreen .fs-close-btn { display: flex; }

/* Close button (only visible in fullscreen) — sits below toolbar on the right */
.fs-close-btn {
    display: none;
    position: absolute;
    top: 94px; right: 10px;
    z-index: 1001;
    width: 34px; height: 34px;
    border-radius: 6px;
    border: 1px solid rgba(239,68,68,.4);
    background: rgba(15,18,24,.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--red);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    padding: 0;
    line-height: 1;
    transition: background .2s, border-color .2s;
}
.fs-close-btn:hover {
    background: rgba(239,68,68,.15);
    border-color: var(--red);
}

/* Touch hint overlay */
.map-touch-hint {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 999;
    background: rgba(15,18,24,.7);
    align-items: center;
    justify-content: center;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--text-secondary);
    text-align: center;
    pointer-events: none;
    padding: 20px;
}
.map-touch-hint.visible { display: flex; }

/* Toolbar */
.map-toolbar {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.map-tool-btn {
    width: 34px; height: 34px;
    border-radius: 6px;
    border: 1px solid var(--border-accent);
    background: rgba(15,18,24,.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    color: var(--cyan);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
    font-size: 14px;
    padding: 0;
}
.map-tool-btn:hover {
    background: rgba(0,212,255,.12);
    border-color: var(--cyan);
    color: #fff;
}
.map-tool-btn.active {
    background: rgba(0,212,255,.18);
    color: #fff;
}
.map-tool-btn svg { width: 16px; height: 16px; }

/* GPS pulse marker */
.gps-marker {
    width: 14px; height: 14px;
    background: #3b82f6;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(59,130,246,.4);
    animation: gpsPulse 2s ease-in-out infinite;
}
@keyframes gpsPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(59,130,246,.4); }
    50%      { box-shadow: 0 0 0 12px rgba(59,130,246,0); }
}

/* Legend bar (bottom of map, inside the wrap) */
.map-legend-bar {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 800;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 8px 14px;
    background: rgba(15,18,24,.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--border-subtle);
    font-size: 10px;
    color: var(--text-muted);
}
.map-legend-bar .legend-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 4px;
    vertical-align: middle;
}

/* Leaflet theming — shared across all map pages */
.leaflet-popup-content-wrapper {
    background: rgba(15,18,24,.92) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid var(--border-accent) !important;
    border-radius: var(--radius) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.5) !important;
}
.leaflet-popup-tip {
    background: rgba(15,18,24,.92) !important;
    border: 1px solid var(--border-accent) !important;
}
.leaflet-popup-close-button { color: var(--text-muted) !important; font-size: 18px !important; }
.leaflet-popup-close-button:hover { color: var(--cyan) !important; }
.leaflet-control-zoom a {
    background: rgba(15,18,24,.88) !important;
    color: var(--cyan) !important;
    border-color: var(--border-accent) !important;
    font-family: var(--font-mono) !important;
}
.leaflet-control-zoom a:hover {
    background: rgba(0,212,255,.12) !important;
    color: #fff !important;
}
.leaflet-control-zoom {
    border: 1px solid var(--border-accent) !important;
    border-radius: 6px !important;
    overflow: hidden;
}
.leaflet-control-attribution {
    font-family: var(--font-mono) !important;
    font-size: 9px !important;
    background: rgba(15,18,24,.75) !important;
    color: var(--text-faint) !important;
}
.leaflet-control-attribution a { color: var(--cyan) !important; }
.leaflet-popup-content { max-width: 260px; word-wrap: break-word; }
@media (max-width: 480px) {
    .leaflet-popup-content { max-width: 200px; font-size: 11px; }
}

/* Light-mode Leaflet overrides */
[data-theme="light"] .leaflet-popup-content-wrapper {
    background: rgba(255,255,255,.96) !important;
    color: var(--text-primary) !important;
}
[data-theme="light"] .leaflet-popup-tip {
    background: rgba(255,255,255,.96) !important;
}
[data-theme="light"] .leaflet-control-zoom a {
    background: #ffffff !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-subtle) !important;
}
[data-theme="light"] .leaflet-control-zoom a:hover {
    background: var(--bg-elevated) !important;
    color: var(--cyan) !important;
}
[data-theme="light"] .leaflet-control-attribution {
    background: rgba(245,243,239,.9) !important;
    color: var(--text-muted) !important;
}
[data-theme="light"] .map-tool-btn {
    background: rgba(255,255,255,.92);
    color: var(--cyan);
}
[data-theme="light"] .fs-close-btn {
    background: rgba(255,255,255,.92);
}
[data-theme="light"] .map-legend-bar {
    background: rgba(245,243,239,.88);
}

/* Old .map-legend (card-external legend) — kept for back compat */
.map-legend {
    padding: 10px 14px;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 10px;
    color: var(--text-muted);
}
@media (min-width: 601px) {
    .map-legend { padding: 12px 20px; gap: 16px; font-size: 11px; }
}
.legend-item { display: flex; align-items: center; gap: 5px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; }



/* ── Report Tabs ──────────────────────────────────────── */
.report-tab-bar {
    display: flex;
    border-bottom: 1px solid var(--border-subtle);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.report-tab-bar::-webkit-scrollbar { display: none; }

.report-tab {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    padding: 10px 14px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    min-height: 44px; /* touch target */
}
@media (min-width: 601px) {
    .report-tab { padding: 12px 18px; gap: 6px; }
}
.report-tab:hover { color: var(--text-secondary); }
.report-tab.active { color: var(--cyan); }
.report-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px; left: 14px; right: 14px;
    height: 2px;
    background: var(--cyan);
    border-radius: 2px 2px 0 0;
}
@media (min-width: 601px) {
    .report-tab.active::after { left: 18px; right: 18px; }
}

.tab-count {
    font-size: 10px;
    padding: 1px 6px;
    border-radius: 8px;
    background: var(--bg-elevated);
}
.report-tab.active .tab-count { background: var(--cyan-dim); color: var(--cyan); }

/* ── Report Tables ────────────────────────────────────── */
.report-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    min-width: 400px; /* ensures horizontal scroll on very small screens rather than squishing */
}
@media (min-width: 601px) {
    .report-table { font-size: 12px; min-width: 0; }
}

.report-table thead th {
    font-size: 9px; font-weight: 600;
    letter-spacing: 1px; text-transform: uppercase;
    color: var(--text-faint);
    padding: 8px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-accent);
    position: sticky; top: 0;
    background: var(--bg-card); z-index: 1;
    white-space: nowrap;
}
@media (min-width: 601px) {
    .report-table thead th { padding: 10px 12px; }
}

.report-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s;
    cursor: pointer;
}
.report-table tbody tr:hover { background: var(--cyan-dim); }

.report-table td {
    padding: 8px 10px;
    vertical-align: top;
    color: var(--text-secondary);
}
@media (min-width: 601px) {
    .report-table td { padding: 10px 12px; }
}

.size-cell { font-family: var(--font-display); font-weight: 700; font-size: 13px; }
@media (min-width: 601px) {
    .size-cell { font-size: 14px; }
}
.size-cell.hail { color: var(--cyan); }
.size-cell.wind { color: var(--orange); }
.size-cell.tornado { color: var(--purple); }

.date-cell { white-space: nowrap; color: var(--text-muted); }
.remarks-cell {
    font-size: 10px;
    color: var(--text-faint);
    max-width: 220px;
    line-height: 1.5;
}
@media (min-width: 601px) {
    .remarks-cell { font-size: 11px; max-width: 320px; }
}
.distance-cell { white-space: nowrap; font-size: 11px; }
.table-footer { padding: 12px 16px; font-size: 11px; color: var(--text-faint); border-top: 1px solid var(--border-subtle); }
.empty-tab { padding: 40px 20px; text-align: center; color: var(--text-faint); font-size: 12px; }

/* ── Date Group Headers ──────────────────────────────── */
.date-group-header {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: var(--cyan);
    padding: 10px 10px 6px;
    border-top: 1px solid var(--border-subtle);
    background: rgba(0, 212, 255, 0.02);
}
@media (min-width: 601px) {
    .date-group-header { padding: 12px 12px 6px; }
}
.date-group-header:first-child { border-top: none; }

/* ── Pagination ──────────────────────────────────────── */
.pagination {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px;
    border-top: 1px solid var(--border-subtle);
    gap: 10px;
}
@media (min-width: 601px) {
    .pagination {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 14px 16px;
    }
}
.pagination-info {
    font-size: 11px;
    color: var(--text-faint);
    text-align: center;
}
@media (min-width: 601px) {
    .pagination-info { text-align: left; }
}
.pagination-btns {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
}
.pagination-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
    min-height: 36px; /* touch target */
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.pagination-btn:hover {
    background: var(--cyan-dim);
    border-color: var(--border-accent);
    color: var(--cyan);
}
.pagination-btn.active {
    background: var(--cyan-dim);
    border-color: var(--cyan);
    color: var(--cyan);
    font-weight: 700;
}

/* ── Sidebar ──────────────────────────────────────────── */
.nearby-grid { display: grid; grid-template-columns: 1fr; gap: 6px; }
@media (min-width: 480px) and (max-width: 959px) {
    /* On medium screens when sidebar is full width, show 2 columns */
    .nearby-grid { grid-template-columns: 1fr 1fr; }
}

.nearby-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s;
    min-height: 44px; /* touch target */
}
.nearby-link:hover { background: var(--cyan-dim); border-color: var(--border-accent); color: var(--cyan); }
.nearby-link .dist { font-size: 10px; color: var(--text-faint); white-space: nowrap; margin-left: 8px; }

/* ── CTA Box ──────────────────────────────────────────── */
.cta-box {
    margin-top: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 20px;
    position: relative;
    overflow: hidden;
}
@media (min-width: 601px) {
    .cta-box { margin-top: 24px; padding: 24px; }
}
.cta-box:first-child { margin-top: 0; }
.cta-box::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 100px; height: 100px;
    background: radial-gradient(circle, rgba(0,212,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}
.cta-box h4 { font-size: 13px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.cta-box p { font-size: 11px; color: var(--text-muted); line-height: 1.7; margin-bottom: 16px; }

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    padding: 10px 18px;
    border-radius: 6px;
    background: linear-gradient(135deg, #00d4ff, #0891b2);
    color: var(--bg-surface);
    text-decoration: none;
    box-shadow: 0 2px 12px rgba(0,212,255,0.2);
    transition: all 0.2s;
    min-height: 44px; /* touch target */
}
.cta-btn:hover {
    box-shadow: 0 4px 24px rgba(0,212,255,0.35);
    transform: translateY(-1px);
    color: var(--bg-surface);
}

/* ── Loading Shimmer ──────────────────────────────────── */
.loading-shimmer {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, rgba(0,212,255,0.04) 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    height: 20px;
    margin-bottom: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Animations ───────────────────────────────────────── */
@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in { animation: fadeSlideUp 0.4s ease forwards; opacity: 0; }
.animate-in:nth-child(2) { animation-delay: 0.06s; }
.animate-in:nth-child(3) { animation-delay: 0.12s; }

/* ══════════════════════════════════════════════════════════
   SHOWREPORT PAGE — Report detail styles
   Used by showreport.cfm (the individual hail report page)
   ══════════════════════════════════════════════════════════ */
.report-detail-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
@media (min-width: 601px) {
    .report-detail-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}
@media (min-width: 768px) {
    .report-detail-grid { grid-template-columns: repeat(4, 1fr); }
}

.report-detail-item {
    background: var(--bg-elevated);
    border-radius: 6px;
    padding: 12px 14px;
    border: 1px solid var(--border-subtle);
}
.report-detail-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 4px;
}
.report-detail-value {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ══════════════════════════════════════════════════════════
   UTILITY — Safe overflow everywhere
   ══════════════════════════════════════════════════════════ */
.main-col, .sidebar { min-width: 0; }

/* ══════════════════════════════════════════════════════════
   REPORT CARDS — Replaces flat table rows with distinct cards
   Used by: stormday.cfm, hailreportrecent.cfm
   Add this block to the END of /css/sts.css
   ══════════════════════════════════════════════════════════ */

/* ── Report Card Layout ──────────────────────────────── */
.report-card-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 8px;
}
@media (min-width: 601px) {
    .report-card-list { padding: 10px; gap: 8px; }
}

.report-card {
    display: grid;
    grid-template-columns: 54px 1fr;
    gap: 0;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    overflow: hidden;
    transition: border-color 0.15s, background 0.15s;
    cursor: pointer;
    text-decoration: none;
    color: var(--text-secondary);
}
@media (min-width: 601px) {
    .report-card { grid-template-columns: 64px 1fr; }
}
.report-card:hover {
    border-color: var(--border-accent);
    background: var(--cyan-dim);
    color: var(--text-secondary);
}

/* Size badge — the left column that POPS */
.rc-size-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 4px;
    text-align: center;
    border-right: 1px solid var(--border-subtle);
}
.rc-size-num {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.5px;
}
@media (min-width: 601px) {
    .rc-size-num { font-size: 20px; }
}
.rc-size-unit {
    font-size: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 2px;
    opacity: 0.7;
}

/* Hail card colors */
.report-card.type-hail .rc-size-badge {
    background: var(--hail-bg);
}
.report-card.type-hail .rc-size-num {
    color: var(--hail-color);
}
.report-card.type-hail {
    border-left: 3px solid var(--hail-color);
}

/* Wind card colors */
.report-card.type-wind .rc-size-badge {
    background: var(--wind-bg);
}
.report-card.type-wind .rc-size-num {
    color: var(--wind-color);
}
.report-card.type-wind {
    border-left: 3px solid var(--wind-color);
}

/* Tornado card colors */
.report-card.type-tornado .rc-size-badge {
    background: var(--tornado-bg);
}
.report-card.type-tornado .rc-size-num {
    color: var(--tornado-color);
}
.report-card.type-tornado {
    border-left: 3px solid var(--tornado-color);
}

/* Card body — right column */
.rc-body {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
@media (min-width: 601px) {
    .rc-body { padding: 10px 14px; gap: 3px; }
}

.rc-top-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.rc-location {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
@media (min-width: 601px) {
    .rc-location { font-size: 13px; }
}

/* Clickable city link variant of rc-location */
a.rc-city-link {
    color: var(--text-primary);
    text-decoration: none;
}
a.rc-city-link:hover { color: var(--cyan); }

.rc-time {
    font-size: 10px;
    color: var(--text-faint);
    white-space: nowrap;
    flex-shrink: 0;
}

.rc-meta {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}
@media (min-width: 601px) {
    .rc-meta { font-size: 11px; }
}
.rc-meta .sep { opacity: 0.3; }

.rc-remarks {
    font-size: 10px;
    color: var(--text-faint);
    line-height: 1.4;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (min-width: 601px) {
    .rc-remarks { font-size: 11px; }
}

.rc-detail-link {
    font-size: 10px;
    font-weight: 500;
    color: var(--cyan);
    text-decoration: none;
    margin-top: 2px;
    display: inline-block;
}
.rc-detail-link:hover { color: var(--link-hover); }

/* ── Sort Controls ───────────────────────────────────── */
.sort-bar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 10px;
    color: var(--text-faint);
    flex-wrap: wrap;
}
@media (min-width: 601px) {
    .sort-bar { padding: 8px 14px; }
}

.sort-bar-label {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-right: 4px;
}

.sort-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.sort-btn:hover {
    background: var(--cyan-dim);
    color: var(--text-secondary);
}
.sort-btn.active {
    background: var(--cyan-dim);
    border-color: var(--cyan);
    color: var(--cyan);
}
.sort-arrow {
    font-size: 8px;
    opacity: 0.6;
}

/* ── County/Zip Pills (state mode) ───────────────────── */
.county-section {
    margin-bottom: 12px;
}
.county-label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    padding: 8px 0 6px;
    letter-spacing: 0.3px;
}
.zip-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    padding-left: 8px;
}
.zip-pill {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 500;
    padding: 3px 8px;
    border-radius: 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.15s;
}
.zip-pill:hover {
    background: var(--cyan-dim);
    border-color: var(--border-accent);
    color: var(--cyan);
}
.zip-pill .zip-count {
    font-size: 8px;
    opacity: 0.6;
    margin-left: 3px;
}

/* ══════════════════════════════════════════════════════════
   LIGHT MODE — Element-level overrides
   Covers things that can't be solved with token swaps alone
   ══════════════════════════════════════════════════════════ */

/* Suppress scan-line and glow effects */
[data-theme="light"] .info-box::after { display: none; }
[data-theme="light"] .cta-box::before { display: none; }



/* CTA button — light mode gets white text on teal gradient */
[data-theme="light"] .cta-btn {
    background: linear-gradient(135deg, #0e7490, #0891b2);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(14, 116, 144, 0.2);
}
[data-theme="light"] .cta-btn:hover {
    box-shadow: 0 4px 16px rgba(14, 116, 144, 0.3);
    color: #ffffff;
}

/* Date group header background */
[data-theme="light"] .date-group-header {
    background: var(--cyan-dim);
}

/* Loading shimmer */
[data-theme="light"] .loading-shimmer {
    background: linear-gradient(90deg, var(--bg-elevated) 25%, #ffffff 50%, var(--bg-elevated) 75%);
    background-size: 200% 100%;
}

/* Theme toggle button */
.ss-theme-toggle {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    border-radius: 6px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    margin-left: 8px;
    flex-shrink: 0;
}
.ss-theme-btn {
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    transition: all 0.2s;
}
.ss-theme-btn.active {
    background: var(--bg-card);
    color: var(--cyan);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.ss-theme-btn svg {
    width: 14px;
    height: 14px;
}

/* On mobile, put toggle in the slide-out nav */
@media (max-width: 900px) {
    .ss-theme-toggle.desktop-only { display: none; }
    .ss-theme-toggle.mobile-only {
        display: flex;
        margin: 16px 16px 0;
        justify-content: center;
    }
}
@media (min-width: 901px) {
    .ss-theme-toggle.mobile-only { display: none; }
}
/* ══════════════════════════════════════════════════════════
   MAP FILTER BUTTONS — Toggle hail/wind/tornado visibility
   Used by: stormday (index.cfm), hailreportrecent.cfm
   Append this to the END of /css/sts.css
   ══════════════════════════════════════════════════════════ */

/* Override legend bar gap/padding for filter buttons (tighter than static legend) */
.map-legend-bar {
    gap: 6px;
    padding: 6px 10px;
    min-height: 36px;
    flex-wrap: wrap;
}
@media (min-width: 601px) {
    .map-legend-bar { padding: 6px 14px; gap: 8px; }
}

/* Filter toggle buttons */
.map-filter-btn {
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
}
.map-filter-btn:hover {
    background: rgba(255,255,255,0.03);
    color: var(--text-secondary);
}
.map-filter-btn.active {
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.04);
}
.map-filter-btn.active .mf-dot { opacity: 1; }
.map-filter-btn .mf-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.35;
    transition: opacity 0.15s;
}
/* Chevron for hail sub-filter */
.map-filter-btn .mf-chevron {
    font-size: 7px;
    margin-left: 1px;
    opacity: 0.5;
    transition: transform 0.2s;
}
.map-filter-btn.mf-open .mf-chevron { transform: rotate(180deg); }

/* Hail size popover */
.mf-hail-popover {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    z-index: 1300;
    min-width: 180px;
    background: rgba(15, 18, 24, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius);
    padding: 8px 0;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    display: none;
}
.mf-hail-popover.open { display: block; }

.mf-hail-popover-title {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-faint);
    padding: 4px 12px 6px;
}

.mf-hail-size-btn {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 500;
    width: 100%;
    padding: 6px 12px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s, color 0.1s;
}
.mf-hail-size-btn:hover {
    background: rgba(0, 212, 255, 0.04);
}
.mf-hail-size-btn.active {
    color: var(--text-primary);
}
.mf-hail-size-btn .mf-check {
    width: 14px; height: 14px;
    border-radius: 3px;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
    color: transparent;
    transition: all 0.15s;
}
.mf-hail-size-btn.active .mf-check {
    background: rgba(237, 53, 0, 0.2);
    border-color: #ed3500;
    color: #ed3500;
}
.mf-hail-size-btn .mf-size-count {
    font-size: 9px;
    color: var(--text-faint);
    margin-left: auto;
}
.mf-hail-size-btn.mf-all-btn {
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 2px;
    padding-bottom: 8px;
    font-weight: 600;
}

/* Fullscreen map: popover needs to work above the map */
.fullscreen .map-legend-bar { z-index: 1100; }
.fullscreen .mf-hail-popover { z-index: 1400; }

/* Non-live items in the legend bar (report count, dashed ring note) */
.mf-info {
    margin-left: auto;
    font-size: 9px;
    color: var(--text-faint);
}

/* Light mode overrides for filter buttons */
[data-theme="light"] .map-filter-btn.active {
    border-color: rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.04);
}
[data-theme="light"] .map-filter-btn:hover {
    background: rgba(0,0,0,0.03);
}
[data-theme="light"] .mf-hail-popover {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
}
[data-theme="light"] .mf-hail-size-btn:hover {
    background: rgba(14, 116, 144, 0.04);
}
[data-theme="light"] .mf-hail-size-btn.active .mf-check {
    background: rgba(194, 45, 0, 0.1);
    border-color: var(--hail-color);
    color: var(--hail-color);
}


/* ══════════════════════════════════════════════════════════
   PYTHON MIGRATION PATCH — Calendar + pills + fullscreen
   These polish the Stormday/homepage replacement without changing
   the shared token system.
   ══════════════════════════════════════════════════════════ */
.state-chip,
.zip-pill,
.time-pill,
.cal-month-btn,
.cal-jump-btn {
    border-radius: 6px !important;
    background: var(--bg-elevated) !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    box-shadow: 0 1px 0 rgba(255,255,255,.02) inset;
}
.state-chip:hover,
.zip-pill:hover,
.time-pill:hover,
.cal-month-btn:hover,
.cal-jump-btn:hover {
    background: var(--cyan-dim) !important;
    border-color: var(--border-accent) !important;
    color: var(--cyan) !important;
}
.state-chip.active,
.zip-pill.active,
.time-pill.active {
    background: var(--cyan-dim) !important;
    border-color: var(--cyan) !important;
    color: var(--cyan) !important;
    box-shadow: 0 0 0 1px var(--cyan-dim) inset !important;
}

.storm-map-wrap.fullscreen {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    z-index: 999999 !important;
    border-radius: 0 !important;
}
.storm-map-wrap.fullscreen #storm-map,
.storm-map-wrap.fullscreen .leaflet-container {
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
}
body.map-fullscreen-active .ss-header,
body.map-fullscreen-active .ss-mobile-search,
body.map-fullscreen-active footer {
    display: none !important;
}

/* ═══════════════════════════════════════════════════════════
   MAP CONTROL POSITION FIX
   Keep Leaflet zoom top-left. Put StormerSite controls right.
   ═══════════════════════════════════════════════════════════ */

.storm-map-wrap .map-toolbar {
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    z-index: 1100 !important;
}

.storm-map-wrap .fs-close-btn {
    top: auto !important;
    right: 10px !important;
    bottom: 54px !important;
    left: auto !important;
    z-index: 1200 !important;
}

/* LIVE badge belongs under the Leaflet zoom control, not under our toolbar */
.storm-map-wrap .live-badge {
    top: 78px !important;
    left: 10px !important;
    right: auto !important;
    z-index: 1000 !important;
}

/* In fullscreen, keep the right rail in the same place */
.storm-map-wrap.fullscreen .map-toolbar {
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
}

.storm-map-wrap.fullscreen .fs-close-btn {
    right: 10px !important;
    bottom: 54px !important;
}

.storm-map-wrap.fullscreen .live-badge {
    top: 78px !important;
    left: 10px !important;
}

/* Give the bottom filter/legend bar breathing room if the close button overlaps */
.storm-map-wrap.fullscreen .map-legend-bar {
    padding-right: 58px;
}



/* Location page year/month/day count bubbles */
.time-pill .year-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    margin-left: 5px;
    border-radius: 999px;
    background: var(--hail-color);
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.08);
}
[data-theme="light"] .time-pill .year-count-badge {
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════
   MAP INTERACTION MODE
   Desktop: full mouse control.
   Mobile: scroll-safe by default, tap to interact.
   ═══════════════════════════════════════════════════════════ */

.storm-map-wrap.ss-desktop-map .leaflet-container {
    cursor: grab;
}

.storm-map-wrap.ss-desktop-map .leaflet-container:active {
    cursor: grabbing;
}

.storm-map-wrap.ss-mobile-safe-map .leaflet-container {
    touch-action: pan-y !important;
}

.storm-map-wrap.fullscreen .leaflet-container {
    touch-action: none !important;
}

.ss-map-touch-hint {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    z-index: 1250;
    transform: translate(-50%, -50%);
    border: 1px solid var(--border-accent);
    border-radius: 8px;
    background: rgba(15, 18, 24, 0.88);
    color: var(--text-primary);
    padding: 12px 16px;
    min-width: 190px;
    max-width: 260px;
    text-align: center;
    font-family: var(--font-mono);
    box-shadow: 0 8px 28px rgba(0,0,0,.35);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: pointer;
}

.ss-map-touch-hint.visible {
    display: block;
}

.ss-map-touch-title {
    display: block;
    font-size: 12px;
    font-weight: 800;
    color: var(--cyan);
    margin-bottom: 3px;
}

.ss-map-touch-sub {
    display: block;
    font-size: 10px;
    color: var(--text-muted);
    line-height: 1.4;
}

[data-theme="light"] .ss-map-touch-hint {
    background: rgba(255,255,255,.92);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* Never show the tap overlay on desktop pointer devices */
@media (pointer: fine) {
    .ss-map-touch-hint {
        display: none !important;
    }
}


/* ═══════════════════════════════════════════════════════════
   MOBILE LAYOUT + MAP PANEL QOL
   Fix initial mobile left-shift and separate radar/replay/opacity controls.
   ═══════════════════════════════════════════════════════════ */

html.ss-mobile-layout-fix,
body.ss-mobile-layout-fix {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

body.ss-mobile-layout-fix {
    position: relative;
    left: 0 !important;
}

.ss-mobile-layout-fix .page-wrap,
.ss-mobile-layout-fix .test-shell,
.ss-mobile-layout-fix .content-grid,
.ss-mobile-layout-fix .main-col,
.ss-mobile-layout-fix .sidebar,
.ss-mobile-layout-fix .card,
.ss-mobile-layout-fix .storm-map-wrap,
.ss-mobile-layout-fix .ss-header,
.ss-mobile-layout-fix .ss-header-inner,
.ss-mobile-layout-fix .ss-mobile-search,
.ss-mobile-layout-fix .ss-mobile-nav {
    max-width: 100% !important;
}

@media (max-width: 900px) {
    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .page-wrap,
    .test-shell,
    .content-grid,
    .main-col,
    .sidebar,
    .card,
    .storm-map-wrap {
        max-width: 100% !important;
    }

    .page-title-block h1 {
        overflow-wrap: anywhere;
    }
}

/* Keep StormerSite controls on the right side of the map */
.storm-map-wrap .map-toolbar {
    top: 10px !important;
    right: 10px !important;
    left: auto !important;
    z-index: 1250 !important;
}

/* LIVE badge lives below Leaflet zoom on the left */
.storm-map-wrap .live-badge {
    top: 78px !important;
    left: 10px !important;
    right: auto !important;
    z-index: 1000 !important;
}

/* Fullscreen close belongs at the top-right, toolbar below it */
.storm-map-wrap.fullscreen .fs-close-btn {
    display: flex !important;
    top: 10px !important;
    right: 10px !important;
    bottom: auto !important;
    left: auto !important;
    z-index: 1400 !important;
}

.storm-map-wrap.fullscreen .map-toolbar {
    top: 52px !important;
    right: 10px !important;
    left: auto !important;
}

/* Radar replay panel: hidden unless Play/Replay is clicked */
.storm-map-wrap #nxrd-player,
.storm-map-wrap .nxrd-player,
.storm-map-wrap .ss-replay-panel {
    display: none !important;
}

.storm-map-wrap #nxrd-player.active,
.storm-map-wrap .nxrd-player.active,
.storm-map-wrap .ss-replay-panel.active {
    display: flex !important;
}

/* Replay panel should not dominate mobile map space */
.storm-map-wrap .ss-replay-panel {
    position: absolute;
    left: 10px !important;
    right: 10px !important;
    bottom: 48px !important;
    transform: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    z-index: 1300 !important;
}

@media (min-width: 768px) {
    .storm-map-wrap .ss-replay-panel {
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        min-width: 320px !important;
        max-width: 460px !important;
    }
}

/* Opacity panel opens separately from the left side */
.ss-opacity-panel {
    display: none;
    position: absolute;
    left: 10px;
    top: 118px;
    z-index: 1300;
    width: min(300px, calc(100% - 20px));
    padding: 10px 12px;
    border-radius: var(--radius);
    border: 1px solid var(--border-accent);
    background: rgba(15, 18, 24, 0.92);
    color: var(--text-secondary);
    box-shadow: 0 8px 32px rgba(0,0,0,.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.ss-opacity-panel.active {
    display: block;
}

.ss-opacity-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .6px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.ss-opacity-close {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}

.ss-opacity-close:hover {
    color: var(--cyan);
}

.ss-opacity-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 6px;
}

.ss-opacity-panel .nxrd-slider-row {
    width: 100%;
}

.ss-opacity-panel .nxrd-slider {
    width: 100%;
}

[data-theme="light"] .ss-opacity-panel {
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

/* Make added toolbar glyphs match existing map controls */
.ss-radar-replay-btn,
.ss-opacity-btn {
    font-family: var(--font-mono);
    font-weight: 800;
}

