:root {
    --bg: #edf5f2;
    --bg-warm: #fbf1e6;
    --card: #ffffff;
    --ink: #12222a;
    --muted: #4f6570;
    --accent: #0a8c95;
    --accent-strong: #056b72;
    --sun: #f2a541;
    --danger: #e05d5d;
    --line: rgba(18, 34, 42, 0.12);
    --shadow: 0 24px 50px rgba(8, 34, 42, 0.12);
}

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

body {
    background: radial-gradient(circle at top left, #dff3ef 0, var(--bg) 35%, var(--bg-warm) 85%);
    color: var(--ink);
    font-family: "Space Grotesk", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    inset: -30% -10% auto -10%;
    height: 360px;
    background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0));
    pointer-events: none;
    z-index: -1;
}

.hero {
    background: linear-gradient(135deg, #0a8c95 0%, #0a7783 45%, #104a56 100%);
    color: #f4fffe;
    padding: 3.5rem 1.5rem 4.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 70px;
    background: radial-gradient(circle at 20% -20%, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0) 55%);
}

.hero-inner {
    max-width: 900px;
    margin: 0 auto;
    animation: rise 0.6s ease both;
}

.eyebrow {
    letter-spacing: 0.2em;
    font-size: 0.75rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    color: rgba(244, 255, 254, 0.8);
}

h1 {
    font-family: "Fraunces", serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    margin-bottom: 0.5rem;
}

.subhead {
    font-size: 1.1rem;
    color: rgba(244, 255, 254, 0.85);
}

.page {
    max-width: 1120px;
    margin: -2.5rem auto 0;
    padding: 0 1.5rem 3rem;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    border: 1px solid rgba(10, 140, 149, 0.08);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: rise 0.6s ease both;
}

.stat-card--primary {
    border: 1px solid rgba(10, 140, 149, 0.25);
    box-shadow: 0 24px 60px rgba(8, 34, 42, 0.18);
}

.stat-card:nth-child(1) {
    animation-delay: 0.05s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.15s;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

h2 {
    font-size: 1.1rem;
    font-weight: 600;
}

.helper {
    font-size: 0.85rem;
    color: var(--muted);
}

.number {
    font-size: 3rem;
    color: var(--accent-strong);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sub-number {
    color: var(--muted);
    font-size: 0.95rem;
}

.trend {
    display: inline-flex;
    align-items: center;
    font-size: 0.5em;
}

.up {
    color: var(--danger);
}

.down {
    color: #1a9b64;
}

.same {
    color: #9aa6ad;
}

.info {
    font-size: 0.95rem;
    color: var(--muted);
}

.info-list {
    display: grid;
    gap: 0.5rem;
    color: var(--muted);
    font-size: 0.95rem;
    margin-top: 0.75rem;
}

.info-list strong {
    color: var(--ink);
    font-weight: 600;
}

.muted {
    color: var(--muted);
}

.progress-container {
    width: 100%;
    background-color: rgba(10, 140, 149, 0.08);
    border-radius: 999px;
    padding: 4px;
    margin-top: 0.25rem;
}

.progress-bar {
    width: 0;
    height: 28px;
    background-color: var(--accent);
    border-radius: 999px;
    text-align: center;
    line-height: 28px;
    color: white;
    transition: width 1.2s ease-in-out;
    font-size: 0.85rem;
    font-weight: 600;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    color: var(--muted);
}

.meta-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
}

.meta-value {
    font-weight: 600;
}

.status-row {
    display: flex;
    justify-content: flex-start;
}

.status-pill {
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: rgba(10, 140, 149, 0.12);
    color: var(--accent-strong);
}

.status-pill[data-state="calm"] {
    background: rgba(26, 155, 100, 0.16);
    color: #11704a;
}

.status-pill[data-state="steady"] {
    background: rgba(242, 165, 65, 0.2);
    color: #b36c1b;
}

.status-pill[data-state="busy"] {
    background: rgba(224, 93, 93, 0.18);
    color: #b13434;
}

.sync-pill {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    background: rgba(10, 140, 149, 0.12);
    color: var(--accent-strong);
}

.sync-pill[data-state="live"] {
    background: rgba(26, 155, 100, 0.16);
    color: #11704a;
}

.sync-pill[data-state="error"] {
    background: rgba(224, 93, 93, 0.18);
    color: #7b2b2b;
}

.chart-card {
    margin-top: 2rem;
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1.75rem;
    border: 1px solid rgba(18, 34, 42, 0.08);
    animation: rise 0.6s ease both;
    animation-delay: 0.2s;
}

.chart-card--compare {
    border: 1px solid rgba(10, 140, 149, 0.18);
}

.info-card {
    margin-top: 2rem;
    background: var(--card);
    border-radius: 20px;
    box-shadow: var(--shadow);
    padding: 1.75rem;
    border: 1px solid rgba(18, 34, 42, 0.08);
    display: grid;
    gap: 0.85rem;
}

.info-card h2 {
    font-size: 1.2rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.info-grid h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.info-grid ul {
    padding-left: 1.1rem;
    color: var(--muted);
    display: grid;
    gap: 0.4rem;
}

.info-card a {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 600;
}

.info-card a:hover {
    text-decoration: underline;
}

.info-note {
    color: var(--muted);
    font-size: 0.9rem;
}

.sparkline-wrap {
    background: linear-gradient(135deg, rgba(10, 140, 149, 0.08), rgba(242, 165, 65, 0.08));
    border-radius: 14px;
    padding: 0.6rem;
    height: 140px;
}

.sparkline-wrap canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.chart-subtitle {
    color: var(--muted);
    font-size: 0.95rem;
    max-width: 420px;
}

.chart-chip {
    background: rgba(10, 140, 149, 0.12);
    color: var(--accent-strong);
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.chart-canvas {
    height: 360px;
}

.chart-canvas canvas {
    width: 100% !important;
    height: 100% !important;
}

.chart-footer {
    margin-top: 0.75rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.site-footer {
    color: var(--muted);
    text-align: center;
    padding: 2rem 1rem 3rem;
    font-size: 0.9rem;
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.25rem;
}

.footer-links a {
    color: var(--accent-strong);
    text-decoration: none;
    font-weight: 600;
}

.footer-links a:hover {
    text-decoration: underline;
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 3rem 1.25rem 3.5rem;
    }

    .page {
        margin-top: -2rem;
        padding: 0 1.25rem 2.5rem;
    }

    .number {
        font-size: 2.5rem;
    }

    .chart-header {
        flex-direction: column;
    }

    .chart-canvas {
        height: 300px;
    }

    .footer-inner {
        flex-direction: column;
    }

    .sparkline-wrap {
        height: 120px;
    }
}

