* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #000000;
    --fg: #00ff41;
    --fg-dim: #00aa2e;
    --fg-muted: #008822;
    --accent: #ff6b6b;
    --accent-dim: #cc5555;
    --card-bg: #0a0a0a;
    --border: #1a1a1a;
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

body {
    background: var(--bg);
    color: var(--fg);
    font-family: var(--font-mono);
    min-height: 100vh;
    line-height: 1.4;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

header {
    text-align: center;
    padding: 30px 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 30px;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.subtitle {
    color: var(--fg-dim);
    font-size: 0.9rem;
    margin-top: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.subtitle a {
    color: var(--fg-dim);
    text-decoration: none;
    transition: color 0.2s;
}

.subtitle a:hover {
    color: var(--fg);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 40px;
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 20px;
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-card:hover {
    border-color: var(--fg);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

.metric-label {
    font-size: 0.7rem;
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 8px;
}

.metric-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--fg);
    font-variant-numeric: tabular-nums;
}

.chart-section {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 30px;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
    align-items: start;
}

.charts-grid .chart-section {
    margin-bottom: 0;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h2 {
    font-size: 0.85rem;
    color: var(--fg-dim);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.chart-container {
    position: relative;
    height: 450px;
    width: 100%;
}

.chart-equation {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.85rem;
    color: var(--fg-dim);
    margin-bottom: 16px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
    word-break: break-word;
}

.equation-form {
    position: relative;
    cursor: help;
    display: inline-block;
}

.equation-tooltip {
    display: none;
    position: absolute;
    bottom: 120%;
    left: 0;
    width: 250px;
    background: #111;
    border: 1px solid var(--fg);
    padding: 10px;
    font-size: 0.72rem;
    color: var(--fg);
    z-index: 100;
    pointer-events: none;
}

.equation-form:hover .equation-tooltip {
    display: block;
}

.chart-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--fg-dim);
}

.legend-color {
    width: 24px;
    height: 2px;
    border-radius: 1px;
}

.legend-color.dashed {
    background: repeating-linear-gradient(
        90deg,
        currentColor,
        currentColor 6px,
        transparent 6px,
        transparent 12px
    );
}

.legend-color.band {
    height: 8px;
    border-radius: 1px;
}

footer {
    text-align: center;
    padding: 20px;
    color: var(--fg-muted);
    font-size: 0.7rem;
    border-top: 1px solid var(--border);
}

.status {
    margin-bottom: 12px;
}

.links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 24px;
}

.links-label {
    color: var(--fg-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.65rem;
}

.links a {
    color: var(--fg-dim);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.65rem;
    transition: color 0.2s;
}

.links a:hover {
    color: var(--fg);
}

.credit {
    margin-top: 12px;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.credit a {
    color: var(--fg-dim);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.credit a:hover {
    color: var(--fg);
}

@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 12px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .metric-value {
        font-size: 1.4rem;
    }

    .chart-container {
        height: 350px;
    }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}