@media (max-width: 960px) {
    .station-explorer {
        grid-template-columns: 1fr;
    }

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

    .search-row {
        grid-template-columns: 1fr 1fr;
    }

    .search-row button {
        grid-column: 1 / -1;
    }
}
@media (max-width: 640px) {
    .page {
        width: min(100% - 16px, 1180px);
        padding-top: 14px;
    }

    .grid,
    .two-col,
    .search-row {
        grid-template-columns: 1fr;
    }

    .station-search-card,
    .cheapest-leaderboard {
        padding: 10px;
    }

    .map-expand-button {
        min-width: 112px;
        padding: 6px 8px;
        font-size: 0.78rem;
    }

    .section-header {
        flex-direction: column;
        align-items: start;
    }

    .ranking-header {
        align-items: stretch;
    }

    .period-nav {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 4px;
        scrollbar-width: thin;
    }

    .period-nav a {
        flex: 0 0 auto;
    }

    .chart-header-controls {
        width: 100%;
    }

    .mode-select {
        width: 100%;
    }

    .chart-shell {
        height: 300px;
    }

    #stationMap {
        height: 230px;
    }

    .search-map-stack {
        min-height: 230px;
    }

    .station-map-area.is-expanded {
        inset: 10px;
    }
}
