:root {
    --border: rgba(212, 175, 55, 0.05);
    --border-medium: rgba(212, 175, 55, 0.1);
    --text: #e8f0ff;
    --text-muted: #6b7a8d;
    --text-secondary: #9aadca;
    --accent-green: #22c55e;
    --accent-red: #ef4444;
    --accent-positive: #22c55e;
    --accent-negative: #ef4444;
    --insights-accent: rgba(212, 175, 55, 0.7);
    --insights-accent-dim: rgba(212, 175, 55, 0.6);
    --accent-orange: #ffaa33;
    --accent-gold: rgba(212, 175, 55, 0.75);
    --accent-pink: #ec4899;
    --font-display: 'DM Sans', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-number: 'DM Sans', sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-body);
    color: var(--text);
    min-height: 100vh;
}
/* body::before inherited from shared-styles.css (background image) */

/* Hero gold accents — now in shared-nav.css */

.container {
    max-width: var(--container-max, 2000px);
    margin: 0 auto;
    padding: 0 var(--container-padding) 3rem;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(480px, 100%), 1fr));
    gap: 32px;
}

#insightsSkeleton {
    display: contents;
}
.skeleton-card {
    border: 1px solid rgba(212, 175, 55, 0.06);
    border-radius: 14px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    height: 500px;
    position: relative;
    overflow: hidden;
}
.skeleton-card::before {
    content: '';
    display: block;
    height: 20px;
    width: 60%;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.09) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 400px 100%;
    animation: shimmerInsight 1.5s ease-in-out infinite;
    border-radius: 6px;
    margin-bottom: 12px;
}
@keyframes shimmerInsight {
    0% { background-position: -200px 0; }
    100% { background-position: 200px 0; }
}
.skeleton-card::after {
    content: '';
    position: absolute;
    top: 60px;
    left: 20px;
    right: 20px;
    bottom: 20px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
    animation: skeletonPulse 1.8s ease-in-out infinite;
}
@keyframes skeletonPulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.8; }
}

.insights-empty {
    text-align: center;
    padding: 80px 20px;
    color: rgba(255,255,255,0.5);
}
.insights-empty-icon { font-size: 48px; margin-bottom: 16px; }
.insights-empty-title { font-size: var(--text-base); color: rgba(255,255,255,0.7); margin-bottom: 8px; }
.insights-empty-desc { font-size: var(--text-2xs); margin-bottom: 24px; }
.insights-retry-btn {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: rgba(212, 175, 55, 0.8);
    padding: 10px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: var(--text-2xs);
}
.insights-retry-btn:hover { background: rgba(212, 175, 55, 0.2); }

/* Focus-visible for interactive elements */
.highlight-btn:focus-visible,
.sector-btn:focus-visible,
.type-btn:focus-visible,
.insights-retry-btn:focus-visible { outline: 2px solid rgba(212, 175, 55, 0.7); outline-offset: 2px; }

@media (max-width: 520px) { .insights-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
    .insights-grid { gap: 12px; }
    .insight-card { padding: 16px; }
    .container { padding: 0 1rem 2rem; }
}
@media (max-width: 480px) {
    .insight-card { padding: 14px; }
    .chart-container { height: 350px; }
}

.insight-card {
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 14px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    animation: fadeInUp 0.45s ease-out forwards;
}
.insight-card::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 10%;
    right: 10%;
    height: 60px;
    border-radius: 50%;
    filter: blur(30px);
    opacity: 0.7;
    pointer-events: none;
    background: rgba(212, 175, 55, 0.06);
    transition: opacity 0.4s ease;
}
.insight-card:hover {
    transform: translateY(-4px);
    border-color: rgba(212, 175, 55, 0.18);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4), 0 0 30px rgba(212, 175, 55, 0.06);
}
.insight-card:hover::after {
    opacity: 0.4;
}

.insight-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.insight-title {
    font-family: var(--font-display);
    font-size: var(--text-md);
    font-weight: 200;
    margin-bottom: 4px;
}

.insight-axes {
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.insight-badge {
    font-size: var(--text-sm);
    font-weight: 200;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 10px;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.06);
}

.chart-container {
    position: relative;
    height: 420px;
    margin-bottom: 16px;
    margin-left: -20px;
    margin-right: -20px;
    cursor: pointer;
}

.quadrant-labels {
    position: absolute;
    inset: 30px 10px 35px 40px;
    pointer-events: none;
    font-size: var(--text-xs);
    font-weight: 200;
    letter-spacing: 0.03em;
}

.quadrant-label {
    position: absolute;
    padding: 4px 9px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    }

.quadrant-label.top-left { top: 5px; left: 5px; }
.quadrant-label.top-right { top: 5px; right: 5px; }
.quadrant-label.bottom-left { bottom: 5px; left: 5px; }
.quadrant-label.bottom-right { bottom: 5px; right: 5px; }

.insight-text {
    border-left: 3px solid var(--accent-gold);
    padding: 10px 12px;
    margin-bottom: 16px;
    border-radius: 0 6px 6px 0;
}

.insight-text-title {
    font-size: var(--text-xs);
    font-weight: 200;
    /* uppercase removed */
    letter-spacing: 0.05em;
    color: var(--accent-gold);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.insight-text-body {
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.85);
    line-height: 1.5;
}
.insight-text-body strong {
    color: #fff;
    font-weight: 200;
    padding: 1px 4px;
    border-radius: 3px;
}

.insight-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    margin-top: auto;
}

.insight-stat {
    text-align: center;
    min-width: 60px;
}

.insight-stat-value {
    font-family: var(--font-number);
    font-size: var(--text-xs);
    font-weight: 200;
}

.insight-stat-value.green { color: var(--accent-green); }
.insight-stat-value.red { color: var(--accent-red); }
.insight-stat-value.blue { color: var(--insights-accent); }
.insight-stat-value.orange { color: var(--accent-orange); }
.insight-stat-value.purple { color: var(--insights-accent-dim); }

.insight-stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin-top: 1px;
}

.highlight-btns {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.highlight-btn {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.highlight-btn:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.4);
    color: #fff;
}

.highlight-btn.active {
    font-weight: 200;
}

.sector-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.sector-btn {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    padding: 8px 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}

.sector-btn:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}
.sector-btn.active {
    border-color: var(--accent-gold);
    background: rgba(212, 175, 55, 0.08);
    color: #fff;
}

/* Badge type filter */
.type-filter {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.type-btn {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    padding: 8px 18px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.3);
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
}
.type-btn:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}
.type-btn.active {
    font-weight: 200;
    color: #fff;
}

/* Sector Heatmap */
.insight-section {
    margin-top: 48px;
}
.sector-rotation-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
    font-family: var(--font-number);
    margin-top: 16px;
}
.sector-rotation-table thead {
    border-bottom: 1px solid var(--border-medium);
}
.section-title {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 200;
    margin-bottom: 4px;
}
.section-subtitle {
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin-bottom: 4px;
}
.heatmap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 4px;
    padding: 16px 0;
}
.heatmap-cell {
    border-radius: 6px;
    padding: 14px 12px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}
.heatmap-cell:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}
.heatmap-sector {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    font-weight: 200;
    color: #fff;
    margin-bottom: 4px;
}
.heatmap-return {
    font-family: var(--font-number, 'DM Sans', sans-serif);
    font-size: var(--text-sm);
    font-weight: 200;
    color: #fff;
}
.heatmap-count {
    font-family: var(--font-body);
    font-size: var(--text-xs);
    color: rgba(255,255,255,0.6);
    margin-top: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .insight-card { animation: none; opacity: 1; }
    .insight-card:hover { transform: none; }
    .insight-skeleton::after { animation: none; }
}
