:root {
    --bg-main: #e8edf1;
    --panel: #f7fafc;
    --panel-border: #c9d8e3;
    --title: #20323f;
    --muted: #486272;
    --shadow: 0 0.0vw 0.8vw rgba(10, 35, 54, 0.74);
    --radius: 1.4vw;
    --gap: 0.6vw;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100vh;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(170deg, #dde8f0 0%, #eef3f7 55%, #dce6ed 100%);
    background: #ffffff;
    font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
    cursor: none;
}

.page {
    height: 95vh;
    padding: 1.2vw 1.4vw;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.plots {
    flex: 1;
    height: 100%;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.8fr);
    grid-template-rows: 1fr 0.5fr 0.5fr;
    grid-template-areas:
        "pastyear flux"
        "overview flux"
        "today flux";
    gap: var(--gap);
    min-height: 0;
}

.plot-card {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 0.45vw;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.plot-card.today {
    grid-area: today;
}

.plot-card.branding {
    grid-area: today;
}

.plot-card.pastyear {
    grid-area: pastyear;
}

.plot-card.overview {
    grid-area: overview;
    background: linear-gradient(180deg, #f8fbfe 0%, #eef5fb 100%);
    border-color: #bcd2e2;
    box-shadow: 0 0.2vw 0.7vw rgba(20, 63, 95, 0.16);
}

.plot-card.square {
    grid-area: flux;
}

.plot-title {
    margin: 0 0 0.25vw;
    color: #1f3f54;
    font-size: clamp(0.72rem, 0.86vw, 5.5rem);

    line-height: 1.1;
    font-weight: 700;
    text-align: center;
}

.plot-frame {
    flex: 1;
    min-height: 0;
    border: 1px solid #d7e3eb;
    border-radius: 0.75vw;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
}

.plot-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #fff;
}

.plot-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: #fff;
}

.plot-card.overview .plot-title {
    color: #1b4d69;
    letter-spacing: 0.01em;
    margin: 0 0 0.2vw;
}

.plot-card.overview .plot-frame {
    border-color: #c4d9e8;
    background: linear-gradient(180deg, #f7fbff 0%, #edf5fb 100%);
    border-radius: 0.65vw;
    padding: 0.2vw;
    align-items: stretch;
    justify-content: stretch;
}

.plot-card.overview .plot-frame iframe {
    border-radius: 0.45vw;
    background: #f7fbff;
}

.plot-card.square .plot-frame {
    height: 100%;
    max-height: none;
    width: 100%;
    margin: 0;
}

.plot-card.branding .plot-frame {
    justify-content: center;
    align-items: center;
    padding: 0.8vw;
}

.brand-strip {
    width: 100%;
    height: 100%;
    border: 1px solid #d7e3eb;
    border-radius: 0.6vw;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1vw;
    background: #ffffff;
    padding: 0.6vw;
}

.brand-strip .brand-image {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
    background: #fff;
}

@media (max-width: 980px) {

    html,
    body {
        height: 100dvh;
    }

    .page {
        height: 100dvh;
        width: 100%;
        padding: 6px;
    }

    .plots {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        grid-template-areas:
            "pastyear"
            "overview"
            "today"
            "flux";
        gap: 6px;
    }

    .plot-card {
        padding: 5px;
        width: 98vw;
        max-width: 98vw;
    }

    .plot-title {
        margin: 0 0 2px;
        font-size: clamp(0.56rem, 2.1vw, 0.7rem);
        line-height: 1.05;
    }

    .plot-frame {
        min-height: clamp(86px, 20vh, 140px);
        border-radius: 8px;
    }

    .plot-card.square .plot-frame {
        height: auto;
        width: 100%;
    }

    .plot-card.branding .plot-frame {
        padding: 4px;
    }

    .brand-strip {
        border-radius: 6px;
        gap: 4px;
        padding: 4px;
    }

    .plot-card.overview .plot-frame {
        border-radius: 6px;
        padding: 2px;
    }

    .plot-card.overview .plot-frame iframe {
        border-radius: 4px;
    }

    .plot-card.square {
        display: none;
    }
}