:root {
    color-scheme: light;
    --bg: #eef3f0;
    --ink: #14201a;
    --muted: #66756d;
    --panel: #ffffff;
    --line: #d8e1dc;
    --green: #1f7a4f;
    --teal: #087f8c;
    --amber: #b7791f;
    --red: #c2410c;
    --blue: #2563eb;
    --violet: #6d5bd0;
    --shadow: 0 14px 34px rgba(23, 36, 29, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(31, 122, 79, 0.10), transparent 340px),
        var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 36px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.eyebrow {
    margin: 0 0 6px;
    color: var(--green);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(26px, 4vw, 40px);
    line-height: 1.05;
}

h2 {
    font-size: 18px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 142px;
    justify-content: center;
    padding: 10px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--muted);
    font-size: 14px;
    box-shadow: 0 8px 30px rgba(24, 37, 30, 0.06);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--amber);
}

.status.online .status-dot {
    background: var(--green);
}

.status.offline .status-dot {
    background: var(--red);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.metric,
.panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
}

.metric {
    min-height: 122px;
    padding: 16px;
    display: grid;
    align-content: space-between;
    position: relative;
    overflow: hidden;
}

.metric::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--green);
}

.metric-accent::before {
    background: var(--amber);
}

.metric span,
.metric small,
.panel-title span {
    color: var(--muted);
    font-size: 14px;
}

.metric strong {
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1;
    white-space: nowrap;
}

.overview-grid {
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
    gap: 12px;
    margin-bottom: 12px;
}

.panel {
    padding: 18px;
}

.panel-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.thermometer-panel {
    display: grid;
    grid-template-rows: auto 1fr;
}

.thermometer-wrap {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    align-items: center;
    gap: 24px;
}

.thermometer {
    position: relative;
    width: 72px;
    height: 220px;
    margin: 0 auto;
    border: 1px solid #cad7cf;
    border-radius: 40px;
    background: linear-gradient(180deg, #f8faf9, #edf3ef);
    overflow: hidden;
}

.thermometer::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 13px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    transform: translateX(-50%);
    background: var(--red);
    box-shadow: inset 0 0 0 8px rgba(255, 255, 255, 0.35);
}

.thermometer-fill {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 34px;
    height: 0;
    min-height: 8px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(180deg, #f59e0b, var(--red));
    transition: height 350ms ease;
}

.reading-list {
    display: grid;
    gap: 10px;
}

.reading-list div {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbf9;
}

.reading-list strong {
    font-size: 18px;
}

.gas-current-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.gas-current {
    min-height: 170px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(180deg, #f8fbf9, #ffffff);
}

.gas-current span,
.gas-current small {
    color: var(--muted);
}

.gas-current strong {
    font-size: clamp(34px, 6vw, 58px);
    line-height: 1;
}

canvas {
    width: 100%;
    display: block;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.chart-panel canvas {
    height: 250px !important;
    max-height: 250px;
}

@media (max-width: 820px) {
    .topbar,
    .panel-title {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .overview-grid,
    .chart-grid {
        grid-template-columns: 1fr;
    }

    .thermometer-wrap {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .shell {
        width: min(100% - 20px, 1180px);
        padding-top: 18px;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}
