.substack-link {
    display: inline-flex;
    align-items: center;
    align-self: center;
    margin-left: auto;
    padding: 8px 16px;
    background: #DF4601;
    color: #fff !important;
    border-radius: 8px;
    font-family: Montserrat, sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: background 0.15s;
}

.substack-link:hover {
    background: #c53d01;
}

@media (max-width: 767px) {
    .substack-link {
        padding: 10px 14px;
        font-size: 13px;
        margin-left: 8px;
    }
}

.weather-tile-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.weather-time-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 12px;
    border: 1px solid #ced4da;
    background: #f8f9fa;
    font-size: 14px;
    font-weight: 600;
    color: #343a40;
    white-space: nowrap;
}

.weather-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 9px;
    border-radius: 12px;
    border: 1px solid #ced4da;
    background: #f8f9fa;
    font-size: 14px;
    font-weight: 600;
    color: #343a40;
    white-space: nowrap;
}

.calendar-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    position: relative;
    box-sizing: border-box;
    border: 2px solid #495057;
    border-radius: 3px;
    background: #ffffff;
}

.calendar-icon::before {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: -2px;
    height: 4px;
    background: #495057;
    border-top-left-radius: 2px;
    border-top-right-radius: 2px;
}

.calendar-icon::after {
    content: "";
    position: absolute;
    width: 2px;
    height: 2px;
    left: 4px;
    top: 7px;
    background: #868e96;
    box-shadow: 4px 0 #868e96;
}

.clock-icon {
    width: 14px;
    height: 14px;
    display: inline-block;
    border: 2px solid #495057;
    border-radius: 50%;
    position: relative;
    box-sizing: border-box;
}

.clock-icon::before {
    content: "";
    position: absolute;
    width: 1px;
    height: 5px;
    background: #495057;
    left: 50%;
    top: 2px;
    transform: translateX(-50%);
}

.clock-icon::after {
    content: "";
    position: absolute;
    width: 4px;
    height: 1px;
    background: #495057;
    left: 50%;
    top: 50%;
}

.graph-container {
    width: 100%;
}

.trajectory-graph {
    width: 100%;
}

@media (min-width: 768px) {
    .responsive-dropdown {
        width: 100% !important;
    }

    /* Ensure dropdowns are side by side */
    .dropdown-container {
        display: flex;
        gap: 20px;
        /* Increase spacing between dropdowns */
        align-items: flex-start;
        width: 100%;
    }

    .dropdown-wrapper {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .slider-row {
        display: flex;
        gap: 20px;
        align-items: flex-start;
    }

    .slider-wrapper {
        width: calc(50% - 10px);
    }

    .trajectory-graph {
        height: 72vh !important;
        min-height: 520px;
    }
}

@media (min-width: 1024px) {
    .responsive-dropdown {
        width: 50% !important;
    }

    .dropdown-container {
        gap: 30px;
        /* Further increase spacing between dropdowns */
    }
}

/* Eutaw Street zoom controls — horizontal row at top */
.eutaw-zoom-controls {
    display: flex;
    flex-direction: row;
    gap: 6px;
    justify-content: center;
    padding: 6px 0 2px 0;
}

.eutaw-zoom-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #aaa;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    font-size: 22px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.eutaw-zoom-btn:active {
    background: #e8e0d5;
}

/* Eutaw detail card — below the chart */
.eutaw-detail-card {
    margin: 0 auto;
    max-width: 560px;
}

@media (max-width: 767px) {
    .eutaw-zoom-btn {
        width: 52px;
        height: 52px;
        font-size: 28px;
    }

    .eutaw-zoom-controls {
        gap: 10px;
        padding: 8px 0 4px 0;
    }

    .eutaw-graph {
        height: 60vh !important;
        min-height: 340px !important;
        max-height: 600px !important;
    }
}

@media (max-width: 767px) {
    .slider-row {
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .slider-wrapper {
        width: 100%;
    }

    .graph-container {
        padding-top: 6px;
    }

    .trajectory-graph {
        height: 56vh !important;
        min-height: 340px;
        max-height: 520px;
    }

    /* Eutaw detail card: full-width, stacked layout on mobile */
    .eutaw-detail-card {
        max-width: 100% !important;
        width: 100% !important;
        flex-direction: column !important;
        border-radius: 0 !important;
        box-sizing: border-box;
    }

    /* Eutaw plot: prevent touch scroll hijacking */
    #eutaw-plot {
        touch-action: pan-y;
    }
}
}