/* ============================================================
   HARPER WEATHER STATION
   W5TWO - Harper, Texas
   Main stylesheet
   ============================================================ */

:root {
    --blue-dark: #063b78;
    --blue: #075eb5;
    --blue-light: #eaf3fc;

    --green: #2d8a32;
    --green-light: #edf8ed;

    --red: #d32f2f;
    --blue-low: #1976d2;

    --background: #f5f8fb;
    --card: #ffffff;
    --text: #17212b;
    --muted: #65727e;
    --border: #d8e0e8;

    --radius: 12px;
    --shadow: 0 3px 10px rgba(0, 0, 0, 0.10);
}


/* ============================================================
   GENERAL
   ============================================================ */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    background: var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

.page {
    width: min(1500px, calc(100% - 28px));
    margin: 14px auto 30px;
}


/* ============================================================
   HEADER
   ============================================================ */

header {
    background: var(--blue-dark);
    color: white;
    padding: 22px 28px 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 900;
}

header p {
    margin: 4px 0 0;
    color: #dbeafa;
    font-size: 0.95rem;
}

header .station-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: white;
}


/* ============================================================
   NAVIGATION
   ============================================================ */

nav {
    margin-top: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 8px 12px;
}

nav a {
    display: inline-block;
    padding: 7px 13px;
    margin-right: 4px;
    border-radius: 8px;
    color: var(--blue-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

nav a:hover {
    background: var(--blue-light);
}

nav a.active {
    background: var(--blue-dark);
    color: white;
}


/* ============================================================
   GENERAL SECTIONS / CARDS
   ============================================================ */

.section {
    margin-top: 18px;
}

.section-title {
    margin: 0 0 10px;
    color: var(--blue-dark);
    font-size: 1.25rem;
    font-weight: 900;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}


/* ============================================================
   CURRENT CONDITIONS
   PAGE 1
   ============================================================ */

.current-conditions {
    padding: 22px;
}

.current-conditions h2 {
    margin: 0 0 14px;
    color: var(--blue-dark);
}

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

.current-item {
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.current-item .label {
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.current-item .value {
    font-size: 1.15rem;
    font-weight: 900;
}


/* ============================================================
   FORECAST
   PAGE 1
   ============================================================ */

.forecast {
    padding: 20px;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.forecast-day {
    padding: 14px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
}

.forecast-day h3 {
    margin: 0 0 8px;
    font-size: 0.95rem;
}

.forecast-day .high {
    font-size: 1.2rem;
    font-weight: 900;
}

.forecast-day .low {
    color: var(--muted);
}


/* ============================================================
   IMAGERY
   PAGE 1
   ============================================================ */

.imagery {
    padding: 18px;
}

.imagery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.imagery-card {
    overflow: hidden;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.imagery-card img {
    display: block;
    width: 100%;
    height: auto;
}

.imagery-card h3 {
    margin: 0;
    padding: 10px 12px 2px;
    font-size: 1rem;
}

.imagery-card p {
    margin: 0;
    padding: 0 12px 12px;
    color: var(--muted);
    font-size: 0.85rem;
}


/* ============================================================
   WEATHER DISCLAIMER
   ============================================================ */

.weather-disclaimer {
    margin-top: 14px;
    padding: 12px 15px;
    background: #fff8e6;
    border: 1px solid #ead7a3;
    border-radius: 10px;
    color: #66511d;
    font-size: 0.84rem;
}


/* ============================================================
   PAGE 2 — WEATHER FOR GEEKS
   ============================================================ */

.geek-section {
    margin-top: 20px;
}

.geek-section > h2 {
    margin: 0 0 11px;
    color: var(--blue-dark);
    font-size: 1.3rem;
    font-weight: 900;
}


/* ------------------------------------------------------------
   Placeholder / future sections
   ------------------------------------------------------------ */

.sensor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.geek-placeholder,
.sensor-placeholder,
.aviation-placeholder {
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.geek-placeholder h3,
.sensor-placeholder h3,
.aviation-placeholder h3 {
    margin: 0 0 6px;
    color: var(--blue-dark);
}

.geek-placeholder p,
.sensor-placeholder p,
.aviation-placeholder p {
    margin: 0;
    color: var(--muted);
}


/* ============================================================
   AVIATION WEATHER
   ============================================================ */

.aviation-disclaimer {
    margin-bottom: 16px;
    padding: 12px 15px;
    background: #fff8e6;
    border: 1px solid #ead7a3;
    border-radius: 10px;
    color: #66511d;
    font-size: 0.83rem;
}

.aviation-subheading {
    margin: 20px 0 10px;
    color: var(--blue-dark);
    font-size: 1.05rem;
    font-weight: 900;
    letter-spacing: 0.01em;
}


/* ============================================================
   PRIMARY AIRPORT CARD — KERV
   ============================================================ */

.aviation-primary-card {
    margin-top: 16px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #ccd8e4;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.11);
}

.aviation-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 13px;
    border-bottom: 1px solid var(--border);
}

.aviation-card-header h3 {
    margin: 0;
    color: var(--text);
    font-size: 1.25rem;
}

.aviation-icao {
    display: block;
    margin-bottom: 2px;
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.flight-category {
    flex-shrink: 0;
    padding: 5px 10px;
    border-radius: 7px;
    background: var(--green-light);
    color: var(--green);
    font-size: 0.95rem;
    font-weight: 900;
}
.flight-vfr {
    background: var(--green-light);
    color: var(--green);
}

.flight-mvfr {
    background: var(--blue-light);
    color: var(--blue);
}

.flight-ifr {
    background: #fdecec;
    color: var(--red);
}

.flight-lifr {
    background: #f7e9fb;
    color: #8e24aa;
}



/* ------------------------------------------------------------
   METAR observations
   ------------------------------------------------------------ */

.aviation-observations {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 11px;
    margin-top: 15px;
}

.aviation-observation {
    padding: 11px 13px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.aviation-observation span {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.aviation-observation strong {
    display: block;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
}


/* ------------------------------------------------------------
   Raw METAR
   ------------------------------------------------------------ */

.raw-metar {
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-family: "Courier New", Courier, monospace;
    font-size: 0.90rem;
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.raw-metar span {
    display: block;
    margin-bottom: 3px;
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


/* ============================================================
   REGIONAL AIRPORT CARDS
   ============================================================ */

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

.aviation-card,
.camera-card {
    padding: 17px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.aviation-card .aviation-card-header {
    padding-bottom: 10px;
}

.aviation-card .aviation-card-header h3 {
    font-size: 1.05rem;
}

.aviation-card .flight-category {
    font-size: 0.82rem;
    padding: 4px 8px;
}

.aviation-card .aviation-observations {
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
    margin-top: 11px;
}

.aviation-card .aviation-observation {
    padding: 9px 10px;
}

.aviation-card .aviation-observation span {
    font-size: 0.68rem;
}

.aviation-card .aviation-observation strong {
    font-size: 0.9rem;
}

.aviation-card .raw-metar {
    margin-top: 12px;
    padding-top: 10px;
    font-size: 0.84rem;
}


/* ============================================================
   AVIATION WEATHER RESOURCES
   ============================================================ */

.aviation-resources-card {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 16px;
    padding: 13px 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.aviation-resources-title {
    flex-shrink: 0;
    color: var(--blue-dark);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.06em;
}

.aviation-resource-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.aviation-resource-link {
    display: inline-block;
    padding: 6px 11px;
    border: 1px solid #c9d8e8;
    border-radius: 8px;
    background: var(--blue-light);
    color: var(--blue-dark);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
}

.aviation-resource-link:hover {
    background: #dcecfb;
    border-color: #a9c4df;
}


/* ============================================================
   INTERACTIVE GFA
   ============================================================ */

.gfa-card {
    margin-top: 16px;
    padding: 18px 20px;
    background: white;
    border: 1px solid #c8d7e6;
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.gfa-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.gfa-card h3 {
    margin: 0;
    color: var(--blue-dark);
    font-size: 1.08rem;
}

.gfa-card p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

.gfa-link {
    display: inline-block;
    flex-shrink: 0;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--blue-dark);
    color: white;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 900;
}

.gfa-link:hover {
    background: var(--blue);
}


/* ============================================================
   REGIONAL WEATHER PICTURE
   RADAR + SATELLITE
   ============================================================ */

.weather-picture-card {
    margin-top: 16px;
    padding: 18px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
}

.weather-picture-header {
    margin-bottom: 13px;
}

.weather-picture-header h3 {
    margin: 0;
    color: var(--blue-dark);
    font-size: 1.08rem;
}

.weather-picture-header p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 0.82rem;
}

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

.weather-picture-panel {
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.weather-picture-panel a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.weather-picture-panel img {
    display: block;
    width: 100%;
    height: auto;
    background: #e9eef3;
}

.weather-picture-caption {
    padding: 9px 11px;
}

.weather-picture-caption strong {
    display: block;
    color: var(--text);
    font-size: 0.84rem;
}

.weather-picture-caption span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.76rem;
}


/* ============================================================
   MORE WEATHER GEEKERY
   ============================================================ */

.geekery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.geekery-card {
    padding: 16px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.geekery-card h3 {
    margin: 0 0 5px;
    color: var(--blue-dark);
    font-size: 1rem;
}

.geekery-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
}


/* ============================================================
   AVIATION HAZARDS / PLANNING
   Retained for compatibility with existing Page 2 markup.
   ============================================================ */

.aviation-hazards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.aviation-hazard-card {
    padding: 14px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.aviation-hazard-card h3 {
    margin: 0 0 5px;
    color: var(--blue-dark);
    font-size: 0.92rem;
}

.aviation-hazard-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.78rem;
}


/* ============================================================
   FOOTER
   ============================================================ */

footer {
    margin-top: 22px;
    padding: 14px 4px;
    color: var(--muted);
    text-align: center;
    font-size: 0.78rem;
}


/* ============================================================
   RESPONSIVE — TABLETS
   ============================================================ */

@media (max-width: 1000px) {

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

    .forecast-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .sensor-grid,
    .geekery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .aviation-observations {
        grid-template-columns: repeat(2, 1fr);
    }

    .aviation-hazards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ============================================================
   RESPONSIVE — PHONES
   ============================================================ */

@media (max-width: 700px) {

    .page {
        width: calc(100% - 16px);
        margin: 8px auto 20px;
    }

    header {
        padding: 17px 18px;
    }

    header h1 {
        font-size: 1.45rem;
    }

    nav {
        padding: 7px;
    }

    nav a {
        padding: 6px 9px;
        font-size: 0.82rem;
    }

    .current-grid,
    .forecast-grid,
    .imagery-grid,
    .sensor-grid,
    .geekery-grid,
    .aviation-regional-grid,
    .weather-picture-grid {
        grid-template-columns: 1fr;
    }

    .aviation-observations,
    .aviation-card .aviation-observations {
        grid-template-columns: repeat(2, 1fr);
    }

    .aviation-resources-card {
        display: block;
    }

    .aviation-resources-title {
        display: block;
        margin-bottom: 8px;
    }

    .gfa-card-header {
        display: block;
    }

    .gfa-link {
        margin-top: 11px;
    }

    .aviation-primary-card {
        padding: 15px;
    }

    .aviation-card {
        padding: 14px;
    }

    .aviation-hazards-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================================
   RESPONSIVE — VERY SMALL SCREENS
   ============================================================ */

@media (max-width: 430px) {

    .aviation-observations,
    .aviation-card .aviation-observations {
        grid-template-columns: 1fr;
    }

    .aviation-card-header {
        align-items: flex-start;
    }

    .flight-category {
        font-size: 0.82rem;
    }
}

/* ============================================================
   PAGE 1 — CURRENT WEATHER
   Current Conditions
   ============================================================ */

.conditions-card {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 18px;
    margin-top: 20px;
    padding: 20px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}


/* ------------------------------------------------------------
   Main temperature panel
   ------------------------------------------------------------ */

.temperature-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 20px;
    background: var(--blue-light);
    border: 1px solid #c9d8e8;
    border-radius: 11px;
    text-align: center;
}

.current-temperature {
    color: var(--blue-dark);
    font-size: 3.6rem;
    line-height: 1;
    font-weight: 900;
}

.temperature-unit {
    margin-left: 3px;
    font-size: 1.45rem;
    font-weight: 600;
}

.feels-like {
    margin-top: 8px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
}

.condition-placeholder {
    margin-top: 14px;
    color: var(--blue-dark);
    font-size: 0.9rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.temperature-panel .observation-detail {
    margin-top: 4px;
}


/* ------------------------------------------------------------
   Observation grid
   ------------------------------------------------------------ */

.observation-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}

.observation {
    padding: 13px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.observation-label {
    margin-bottom: 4px;
    color: var(--text);
    font-size: 0.80rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.045em;
}

.observation-value {
    color: var(--text);
    font-size: 1.15rem;
    font-weight: 900;
}

.observation-value.high {
    color: var(--red);
}

.observation-value.low {
    color: var(--blue-low);
}

.observation-detail {
    margin-top: 3px;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 800;
}


/* ============================================================
   PAGE 1 — NWS FORECAST
   ============================================================ */

.forecast-section {
    margin-top: 20px;
    padding: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.section-heading {
    margin-bottom: 13px;
}

.section-heading h2 {
    margin: 0;
    color: var(--blue-dark);
    font-size: 1.15rem;
}

.section-subtitle {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.82rem;
}

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

.forecast-card {
    padding: 13px 10px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    text-align: center;
}

.forecast-period {
    min-height: 1.3em;
    color: var(--blue-dark);
    font-size: 0.9rem;
    font-weight: 900;
}

.forecast-icon {
    display: block;
    width: 72px;
    height: 72px;
    margin: 9px auto;
    border-radius: 7px;
}

.forecast-condition {
    min-height: 2.8em;
    font-size: 0.85rem;
    font-weight: 600;
}

.forecast-temperature {
    margin-top: 5px;
    font-size: 1.15rem;
    font-weight: 900;
}

.forecast-wind,
.forecast-rain {
    margin-top: 3px;
    color: var(--muted);
    font-size: 0.77rem;
}

.forecast-source {
    margin-top: 16px;
    color: var(--muted);
    font-size: 0.74rem;
}


/* ============================================================
   PAGE 1 — REGIONAL WEATHER PICTURE
   ============================================================ */

.imagery-section {
    margin-top: 20px;
    padding: 18px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.imagery-section > .section-heading {
    margin-bottom: 14px;
}

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

.imagery-panel {
    overflow: hidden;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.imagery-panel .section-heading {
    padding: 12px 13px 8px;
    margin: 0;
}

.imagery-panel .section-heading h2 {
    font-size: 1rem;
}

.radar-display,
.satellite-display {
    overflow: hidden;
    background: #e9eef3;
}

.radar-display a,
.satellite-display a {
    display: block;
}

.radar-display img,
.satellite-display img {
    display: block;
    width: 100%;
    height: auto;
}

.imagery-link {
    padding: 9px 11px 2px;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 600;
}

.imagery-credit {
    padding: 2px 11px 10px;
    color: var(--muted);
    font-size: 0.72rem;
}


/* ============================================================
   PAGE 1 — RESPONSIVE
   ============================================================ */

@media (max-width: 1000px) {

    .conditions-card {
        grid-template-columns: 230px minmax(0, 1fr);
    }

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

    .forecast-section .forecast-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 700px) {

    .conditions-card {
        grid-template-columns: 1fr;
        padding: 14px;
    }

    .temperature-panel {
        padding: 18px;
    }

    .current-temperature {
        font-size: 3rem;
    }

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

    .forecast-section .forecast-grid {
        grid-template-columns: 1fr;
    }

    .imagery-section .imagery-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 430px) {

    .observation-panel {
        grid-template-columns: 1fr;
    }
}

.rainfall-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 5px;
}

.rainfall-row span {
    color: var(--muted);
    font-size: 0.78rem;
}

.rainfall-row strong {
    color: var(--text);
    font-size: 1rem;
}

/* =====================================================
   PAGE 2 — CLIMATOLOGICAL REPORT ARCHIVE
   ===================================================== */

.climate-summary-card {
    margin-top: 16px;
}

.climate-description {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: .82rem;
}

.climate-ytd-title {
    margin: 16px 0 9px;
    color: var(--blue-dark);
    font-size: .82rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .045em;
}

.climate-archive-heading {
    margin-top: 22px;
    padding-top: 17px;
    border-top: 1px solid var(--border);
}

.climate-archive-heading > div {
    color: var(--blue-dark);
    font-size: 1rem;
    font-weight: 900;
}

.climate-archive-heading > span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: .78rem;
}

.climate-year-row {
    display: grid;
    grid-template-columns: 115px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}

.climate-year-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--blue-dark);
    font-weight: 900;
}

.climate-year-report-link {
    padding: 2px 6px;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--muted);
    text-decoration: none;
    font-size: .7rem;
    font-weight: 600;
}

.climate-year-report-link:hover {
    background: var(--blue-light);
    color: var(--blue-dark);
}

.climate-month-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.climate-month-link {
    display: inline-block;
    min-width: 40px;
    padding: 5px 8px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--blue-dark);
    text-align: center;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 900;
}

.climate-month-link:hover {
    background: var(--blue-light);
    border-color: #b9cce0;
}

.climate-earlier-years {
    margin-top: 13px;
}

.climate-earlier-years > summary {
    cursor: pointer;
    color: var(--blue-dark);
    font-size: .85rem;
    font-weight: 900;
}

.climate-earlier-years-content {
    margin-top: 8px;
}

.climate-noscript {
    margin-top: 15px;
    padding: 12px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--muted);
    font-size: .8rem;
}

.climate-noscript-links {
    margin-top: 8px;
}

.climate-noscript-links a {
    margin-right: 8px;
}

@media (max-width: 700px) {

    .climate-year-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

}


/* =====================================================
   PAGE 2 — HISTORICAL WEATHER GRAPHS
   ===================================================== */

.history-graph-card {
    min-width: 0;
}

.history-graph-controls {
    display: flex;
    gap: 6px;
    margin: 8px 0 10px;
}

.history-graph-button {
    padding: 4px 9px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--blue-dark);
    font-family: inherit;
    font-size: .75rem;
    font-weight: 900;
    cursor: pointer;
}

.history-graph-button:hover {
    background: var(--blue-light);
    border-color: #b9cce0;
}

.history-graph-button.active {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
    color: #ffffff;
}

.history-graph-image {
    display: block;
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
}


/* ============================================================
   FORECAST CENTER
   ============================================================ */

.forecast-center-intro,
.geek-page-intro {
    margin: 0 0 28px 0;
    padding: 16px 18px;
    background: #f5f7f9;
    border: 1px solid #d9dee3;
    border-radius: 8px;
    line-height: 1.5;
}


.forecast-center-heading {
    margin-top: 34px;
    margin-left: 16px;
}


.forecast-center-grid {
    display: grid;
    grid-template-columns:
        repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-left: 16px;
    margin-right: 16px;
}


.forecast-center-card {
    display: flex;
    flex-direction: column;
}


.forecast-center-card .forecast-detail {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #d9dee3;
    font-size: 0.92rem;
    line-height: 1.45;
}


/* ------------------------------------------------------------
   AREA FORECAST DISCUSSION
   ------------------------------------------------------------ */

.afd-card {
    margin-top: 16px;
    border: 1px solid #d9dee3;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}


.afd-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 18px;
    background: #f5f7f9;
    border-bottom: 1px solid #d9dee3;
}


.afd-issued {
    font-size: 0.9rem;
    color: #555555;
    text-align: right;
}


.afd-text {
    margin: 0;
    padding: 20px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: normal;
    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        "Liberation Mono",
        monospace;
    font-size: 0.9rem;
    line-height: 1.45;
    background: #ffffff;
    overflow-x: auto;
}


/* ------------------------------------------------------------
   NATIONAL FORECAST CHARTS
   ------------------------------------------------------------ */

.national-chart-card {
    margin-top: 16px;
    padding: 18px;
    border: 1px solid #d9dee3;
    border-radius: 8px;
    background: #ffffff;
}


.national-chart-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}


.national-chart-button {
    padding: 9px 18px;
    border: 1px solid #aab2bb;
    border-radius: 6px;
    background: #f5f7f9;
    cursor: pointer;
    font: inherit;
}


.national-chart-button:hover {
    background: #e9edf1;
}


.national-chart-button.active {
    font-weight: bold;
    background: #dfe7ee;
}


.national-chart-display {
    text-align: center;
}


.national-chart-image {
    display: none;
    width: 100%;
    max-width: 1100px;
    height: auto;
    margin: 0 auto;
}


.national-chart-image.active {
    display: block;
}


/* ------------------------------------------------------------
   FORECAST CENTER — SMALL SCREENS
   ------------------------------------------------------------ */

@media (max-width: 700px) {

    .forecast-center-grid {
        grid-template-columns: 1fr;
    }

    .afd-header {
        flex-direction: column;
        gap: 5px;
    }

    .afd-issued {
        text-align: left;
    }

    .afd-text {
        padding: 14px;
        font-size: 0.82rem;
    }

    .national-chart-card {
        padding: 12px;
    }

}


/* ============================================================
   FORECAST CENTER — COMPACT TUNING
   ============================================================ */

.forecast-center-intro,
.geek-page-intro {
    padding: 12px 15px;
    margin-bottom: 22px;
    font-size: 0.95rem;
}

.forecast-center-heading {
    margin-top: 28px;
    margin-left: 16px;
}

.forecast-center-grid {
    grid-template-columns:
        repeat(auto-fit, minmax(195px, 1fr));
    gap: 14px;
    margin-left: 16px;
    margin-right: 16px;
}

.forecast-center-card {
    font-size: 0.92rem;
}

.forecast-center-card .forecast-period {
    font-size: 0.95rem;
}

.forecast-center-card .forecast-icon {
    max-width: 70px;
}

.forecast-center-card .forecast-temperature {
    font-size: 1.35rem;
}

.forecast-center-card .forecast-detail {
    margin-top: 9px;
    padding-top: 9px;
    font-size: 0.84rem;
    line-height: 1.35;
}

.afd-text {
    font-size: 1.00rem;
    line-height: 1.45;
    padding: 16px 18px;
    font-weight: 600;
    color: #17212b;
}

.national-chart-image {
    max-width: 1000px;
}

.national-chart-card {
    padding: 14px;
}

/* Forecast Center visual depth */
.forecast-center-card,
.national-chart-card {
    box-shadow: var(--shadow);
}

/* ============================================================
   AVIATION PAGE — AUTO REFRESH NOTICE
   ============================================================ */

.aviation-refresh-notice {
    display: flex;
    align-items: center;
    gap: 18px;

    margin: 12px 0 16px 0;
    padding: 16px 20px;

    border: 2px solid #2f80d8;
    border-radius: 10px;

    background: #eef6ff;
    box-shadow: var(--shadow);
}

.aviation-refresh-icon {
    flex: 0 0 auto;
    font-size: 3rem;
    line-height: 1;
    color: #0d4f91;
    font-weight: 900;
}

.aviation-refresh-title {
    color: #0d4f91;
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    margin-bottom: 4px;
}

.aviation-refresh-text {
    font-size: 0.92rem;
    line-height: 1.4;
    color: #24415f;
}

.page-update {
    margin-top: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
}

.temp-high {
    color: var(--red);
}

.temp-low {
    color: var(--blue-low);
}

/* Harper header scenic overlay */
header {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    box-sizing: border-box;
}

header h1,
header p {
    position: relative;
    z-index: 2;
}

header::after {
    content: "";
    position: absolute;
    z-index: 1;
    top: 0;
    right: -8px;
    width: 575px;
    height: 100%;
    background-image: url("harper-banner-overlay.webp?v=1");
    background-repeat: no-repeat;
    background-position: right center;
    background-size: 575px auto;
    pointer-events: none;
}

/* Page 1 station notice */
.station-message {
    margin-top: 12px;
    padding: 12px 16px;
    border: 2px solid #d68a00;
    border-radius: var(--radius);
    background: #fff4d6;
    color: #5a3900;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.4;
    box-shadow: var(--shadow);
}

/* ============================================================
   STATION / SERVER TELEMETRY
   ============================================================ */

.telemetry-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.telemetry-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.telemetry-item:nth-child(odd) {
    border-right: 1px solid var(--border);
}

.telemetry-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.telemetry-value {
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 800;
    white-space: nowrap;
}

.telemetry-mars {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 15px 16px;
    background: #f8fafc;
}

.telemetry-mars-value {
    color: var(--blue-dark);
}

@media (max-width: 700px) {

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

    .telemetry-item:nth-child(odd) {
        border-right: none;
    }

    .telemetry-mars {
        justify-content: space-between;
    }
}


.forecast-jump-links {
    margin-top: 16px;
    font-size: 0.92rem;
}

.forecast-jump-links a {
    font-weight: 700;
    text-decoration: none;
}

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

/* Historical Weather graphs — larger two-column layout */
.history-graph-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 700px) {
    .history-graph-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   SUN & MOON ALMANAC
   ============================================================ */

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

.almanac-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.almanac-card h3 {
    margin: 0;
    padding: 13px 16px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border);
    color: var(--blue-dark);
    font-size: 1rem;
}

.almanac-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 16px;
    border-bottom: 1px solid var(--border);
}

.almanac-row:last-child {
    border-bottom: none;
}

.almanac-label {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.almanac-value {
    color: var(--text);
    font-size: 0.94rem;
    font-weight: 800;
    text-align: right;
}

@media (max-width: 700px) {
    .almanac-grid {
        grid-template-columns: 1fr;
    }

    .almanac-row {
        gap: 12px;
    }
}

/* Aviation regional cards — breathing room below primary airport */
.aviation-regional-grid {
    margin-top: 16px;
}

/* ============================================================
   PAGE 1 — LIGHTNING TRACKER
   ============================================================ */

.lightning-section {
    margin-top: 18px;
}

.lightning-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.lightning-map {
    display: block;
    width: 100%;
    height: 520px;
    border: 0;
}

.lightning-note {
    padding: 8px 12px 10px;
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

@media (max-width: 700px) {
    .lightning-map {
        height: 420px;
    }
}

/* Lightning map — click to activate interaction */
.lightning-map-wrap {
    position: relative;
}

.lightning-activate {
    position: absolute;
    inset: 0;
    z-index: 5;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(0, 0, 0, 0.12);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.lightning-map-wrap.is-active .lightning-activate {
    display: none;
}

.lightning-resume {
    display: none;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 6;
    padding: 8px 12px;
    border: 0;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.lightning-map-wrap.is-active .lightning-resume {
    display: block;
}

/* Lightning map activation prompt — decorative pill */
.lightning-activate {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.10);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
}

.lightning-activate::before {
    content: "⚡  Click to interact with map";
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.68);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.lightning-activate {
    font-size: 0;
}

/* ============================================================
   PAGE 1 — SECTION JUMP LINKS
   ============================================================ */

.page-jumps {
    margin: 14px 0 18px;
    text-align: center;
    font-size: 0.88rem;
    font-weight: 800;
}

.page-jumps a {
    color: var(--blue-dark);
    text-decoration: none;
}

.page-jumps a:hover,
.page-jumps a:focus {
    text-decoration: underline;
}

.page-jumps span {
    margin: 0 0.45rem;
    color: var(--text-muted);
}

/* Page 1 jump menu — compact local navigation */
.page-jumps {
    width: fit-content;
    max-width: calc(100% - 32px);
    margin: 14px auto 18px;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: var(--shadow);
    text-align: center;
}

.page-jumps-label {
    margin-right: 0.7rem;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

@media (max-width: 700px) {
    .page-jumps {
        line-height: 1.8;
    }
}

/* ============================================================
   UV INDEX — RISK GAUGE
   ============================================================ */

.uv-risk-label {
    margin-top: 4px;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.uv-scale {
    position: relative;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: 18px;
    margin: 14px 0 5px;
    border-radius: 9px;
    overflow: visible;
}

.uv-band:first-child {
    border-radius: 9px 0 0 9px;
}

.uv-band:nth-child(5) {
    border-radius: 0 9px 9px 0;
}

.uv-low {
    background: #4CAF50;
}

.uv-moderate {
    background: #FBC02D;
}

.uv-high {
    background: #FB8C00;
}

.uv-very-high {
    background: #E53935;
}

.uv-extreme {
    background: #C2185B;
}

.uv-marker {
    position: absolute;
    top: -6px;
    left: 0;
    width: 4px;
    height: 30px;
    border-radius: 2px;
    background: #20252b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    transform: translateX(-50%);
    transition: left 0.25s ease;
}

.uv-scale-labels {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    font-size: 0.62rem;
    color: var(--text-muted);
    text-align: center;
}

.uv-scale-labels span {
    white-space: nowrap;
}

/* ============================================================
   SOLAR RADIATION — INTENSITY GAUGE
   ============================================================ */

.solar-band-level {
    margin-top: 4px;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.045em;
    text-transform: uppercase;
}

.solar-band-wrap {
    margin-top: 14px;
}

.solar-band-bar {
    position: relative;
    display: flex;
    height: 18px;
    overflow: visible;
    border-radius: 9px;
}

.solar-band {
    flex: 1 1 20%;
    height: 100%;
}

.solar-band-1 {
    background: #4CAF50;
    border-radius: 9px 0 0 9px;
}

.solar-band-2 {
    background: #FBC02D;
}

.solar-band-3 {
    background: #FB8C00;
}

.solar-band-4 {
    background: #E53935;
}

.solar-band-5 {
    background: #C2185B;
    border-radius: 0 9px 9px 0;
}

.solar-band-marker {
    position: absolute;
    top: -6px;
    width: 4px;
    height: 30px;
    border-radius: 2px;
    background: #20252b;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
    transform: translateX(-50%);
}

.solar-band-scale {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    margin-top: 5px;
    font-size: 0.62rem;
    color: var(--text-muted);
    text-align: center;
}

.solar-band-scale span {
    white-space: nowrap;
}

@media (max-width: 700px) {
    .solar-band-scale {
        font-size: 0.58rem;
    }
}
