/* Weather Map - A Free Design by Bryant Smith (bryantsmith.com)
   The page is a TV weather map. Everything you can see is drawn with
   ordinary boxes, borders and gradients - there is not a single image.
   Look for the section headings below to find what you want to change. */


/* ---- BODY: the misty desk behind the chart ---- */

body {
    background: #e9eeec;
    color: #33474f;
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    padding: 36px 16px;
    text-align: center;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

a {
    color: #2f6f9f;
}

a:focus {
    outline: 2px solid #f0b429;
    outline-offset: 2px;
}


/* ---- PAGE: the rounded card that holds every band ---- */

#page {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(20, 50, 63, 0.08), 0 18px 42px rgba(20, 50, 63, 0.12);
    margin: 0 auto;
    max-width: 920px;
    overflow: hidden;
    text-align: left;
}


/* ---- STATION: the dark broadcast bar at the top ---- */

#station {
    background: #16323f;
    color: #eaf2f5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 30px 22px 30px;
    position: relative;
}

/* the thin warm/cold colour line across the bottom of the bar */
#station::after {
    background: linear-gradient(90deg, #cf4b2c 0 50%, #2f6f9f 50% 100%);
    bottom: 0;
    content: "";
    height: 4px;
    left: 0;
    position: absolute;
    right: 0;
}

.brand {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* a little yellow sun beside the name */
.brand-mark {
    background: #f0b429;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(240, 180, 41, 0.22);
    flex: 0 0 auto;
    height: 18px;
    width: 18px;
}

.brand-name {
    font-size: 19px;
    font-weight: bold;
    letter-spacing: 0.3px;
}

.brand-sub {
    color: #9fc0cf;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

#menu {
    font-size: 12px;
}

#menu a,
#menu a:visited {
    border-bottom: 2px solid transparent;
    color: #cfe0e8;
    letter-spacing: 1.5px;
    margin-left: 18px;
    padding-bottom: 3px;
    text-decoration: none;
    text-transform: uppercase;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#menu a:hover {
    border-bottom-color: #f0b429;
    color: #ffffff;
}


/* ---- CHART-BAND: the pale blue weather map panel ---- */

#chart-band {
    background: #e3eef3;
    padding: 24px 24px 18px 24px;
}

/* the map box itself - everything sits inside this */
#chart {
    background: linear-gradient(160deg, #d9eaf1 0%, #c4dbe7 55%, #b2d0e1 100%);
    border: 1px solid #a9c6d4;
    border-radius: 12px;
    box-shadow: inset 0 0 44px rgba(60, 110, 140, 0.16);
    height: 520px;
    overflow: hidden;
    position: relative;
}

.chart-caption {
    color: #4a6572;
    font-size: 13px;
    line-height: 1.6;
    margin-top: 12px;
    padding: 0 4px;
}


/* ---- GRATICULE: the faint latitude / longitude grid ---- */

.graticule {
    background-image:
        repeating-linear-gradient(0deg, rgba(90, 130, 160, 0.14) 0 1px, transparent 1px 78px),
        repeating-linear-gradient(90deg, rgba(90, 130, 160, 0.14) 0 1px, transparent 1px 78px);
    bottom: 0;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    z-index: 0;
}


/* ---- LAND: big soft blobs of dry colour ---- */

.land {
    background: #e9e3cd;
    border: 1px solid #d3c9a8;
    box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.4);
    position: absolute;
    z-index: 1;
}

.land-west {
    border-radius: 56% 44% 62% 38% / 46% 58% 42% 54%;
    height: 70%;
    left: -6%;
    top: 6%;
    width: 38%;
}

.land-east {
    border-radius: 48% 52% 42% 58% / 56% 44% 58% 42%;
    height: 64%;
    right: -5%;
    top: 20%;
    width: 34%;
}

.land-south {
    border-radius: 52% 48% 46% 54% / 62% 58% 40% 36%;
    bottom: -14%;
    height: 40%;
    left: 34%;
    width: 36%;
}


/* ---- ISOBARS: rings of equal pressure, drawn as ellipses ---- */

.isobar {
    border: 2px solid rgba(70, 110, 140, 0.5);
    border-radius: 50%;
    position: absolute;
    transform: rotate(10deg);
    z-index: 2;
}

/* a deep low sits over the western mountains ... */
.isobar-1 {
    border-color: rgba(70, 110, 140, 0.58);
    height: 44%;
    left: 19.5%;
    top: 4%;
    width: 27%;
}

.isobar-2 {
    border-color: rgba(70, 110, 140, 0.46);
    height: 65%;
    left: 13%;
    top: -6.5%;
    width: 40%;
}

.isobar-3 {
    border-color: rgba(70, 110, 140, 0.34);
    height: 88%;
    left: 5.5%;
    top: -18%;
    width: 55%;
}

.isobar-4 {
    border-color: rgba(70, 110, 140, 0.24);
    height: 116%;
    left: -3%;
    top: -32%;
    width: 72%;
}

/* ... and a fair high is parked in the southeast */
.isobar-5 {
    border-color: rgba(70, 110, 140, 0.55);
    height: 26%;
    left: 73.5%;
    top: 57%;
    transform: none;
    width: 15%;
}

.isobar-6 {
    border-color: rgba(70, 110, 140, 0.32);
    height: 44%;
    left: 68%;
    top: 48%;
    transform: none;
    width: 26%;
}

/* the small numbers printed on the rings. Each label is a child of
   its ring, parked at the bottom of the ellipse so it sits on the line. */
.ring-label {
    background: #daeaf1;
    border-radius: 6px;
    bottom: -9px;
    color: #3c5f76;
    font-size: 11px;
    font-weight: bold;
    left: 50%;
    padding: 0 4px;
    position: absolute;
    transform: translateX(-50%);
    white-space: nowrap;
}

/* the slanted low rings rotate their labels back upright */
.isobar-1 .ring-label,
.isobar-2 .ring-label,
.isobar-3 .ring-label,
.isobar-4 .ring-label {
    transform: translateX(-50%) rotate(-10deg);
}


/* ---- CENTRES: the big H and L letters ---- */

.centre {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 54px;
    font-weight: bold;
    line-height: 1;
    position: absolute;
    z-index: 5;
}

.centre-low {
    color: #c0392b;
    left: 30.5%;
    text-shadow: 0 0 7px #d9e9f0, 0 0 7px #d9e9f0;
    top: 20%;
}

.centre-high {
    color: #1f5f8b;
    left: 78.5%;
    text-shadow: 0 0 7px #d9e9f0, 0 0 7px #d9e9f0;
    top: 65%;
}


/* ---- FRONTS: a coloured line with triangles or half-circles ----
   The line is a border-top. The bumps hanging off it are a repeating
   gradient placed with a ::after pseudo-element. */

.front {
    height: 0;
    position: absolute;
    transform-origin: 0 0;
    z-index: 3;
}

.front.warm {
    border-top: 3px solid #cf4b2c;
}

.front.cold {
    border-top: 3px solid #1f5f8b;
}

/* warm front: a row of half-circles */
.front.warm::after {
    background-image: radial-gradient(circle at 50% 0, #cf4b2c 0 8px, transparent 8px);
    background-repeat: repeat-x;
    background-size: 24px 11px;
    content: "";
    height: 11px;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
}

/* cold front: a row of triangles */
.front.cold::after {
    background-image: conic-gradient(from 45deg at 50% 0, #1f5f8b 0 90deg, transparent 90deg 360deg);
    background-repeat: repeat-x;
    background-size: 24px 12px;
    content: "";
    height: 12px;
    left: 0;
    position: absolute;
    right: 0;
    top: -1px;
}

.front-cold-1 {
    left: 33%;
    top: 26%;
    transform: rotate(150deg);
    width: 42%;
}

.front-warm-1 {
    left: 33%;
    top: 26%;
    transform: rotate(28deg);
    width: 66%;
}

.front-cold-2 {
    left: 44%;
    top: 120%;
    transform: rotate(-26deg);
    width: 66%;
}


/* ---- CITIES: a dot, a name and a temperature ---- */

.city {
    align-items: center;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(120, 150, 168, 0.4);
    border-radius: 20px;
    color: #22333b;
    display: flex;
    font-size: 11px;
    gap: 6px;
    padding: 2px 10px 2px 8px;
    position: absolute;
    white-space: nowrap;
    z-index: 6;
}

.city .dot {
    background: #1f5f8b;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(31, 95, 139, 0.22);
    height: 7px;
    width: 7px;
}

.city em {
    color: #2f6f9f;
    font-style: normal;
    font-weight: bold;
}

.city-1 { left: 10%; top: 21%; }
.city-2 { left: 15%; top: 46%; }
.city-3 { left: 47%; top: 27%; }
.city-4 { left: 70%; top: 20%; }
.city-5 { left: 55%; top: 61%; }
.city-6 { left: 14%; top: 72%; }
.city-7 { left: 62%; top: 84%; }


/* ---- CHART FURNITURE: title, issue time, legend, compass ---- */

.chart-title {
    background: rgba(22, 50, 63, 0.88);
    border-left: 4px solid #f0b429;
    border-radius: 8px;
    color: #eaf2f5;
    left: 18px;
    padding: 8px 12px;
    position: absolute;
    top: 16px;
    z-index: 7;
}

.chart-title .kicker {
    color: #9fc0cf;
    display: block;
    font-size: 10px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.chart-title strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-weight: normal;
}

.chart-issue {
    background: rgba(255, 255, 255, 0.72);
    border-radius: 12px;
    color: #3c5f76;
    font-size: 10px;
    letter-spacing: 1.5px;
    padding: 3px 9px;
    position: absolute;
    right: 18px;
    text-transform: uppercase;
    top: 18px;
    z-index: 7;
}

.legend {
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(120, 150, 168, 0.4);
    border-radius: 8px;
    bottom: 18px;
    color: #22333b;
    display: flex;
    flex-direction: column;
    font-size: 11px;
    gap: 7px;
    left: 18px;
    padding: 10px 12px;
    position: absolute;
    z-index: 7;
}

.legend-item {
    align-items: center;
    display: flex;
    gap: 8px;
}

/* small copies of the two fronts for the key */
.sample {
    border-top: 3px solid;
    display: inline-block;
    flex: 0 0 auto;
    height: 0;
    position: relative;
    width: 42px;
}

.sample.warm { border-color: #cf4b2c; }
.sample.cold { border-color: #1f5f8b; }

.sample.warm::after {
    background-image: radial-gradient(circle at 50% 0, #cf4b2c 0 5px, transparent 5px);
    background-repeat: repeat-x;
    background-size: 14px 9px;
    content: "";
    height: 9px;
    left: 5px;
    position: absolute;
    right: 0;
    top: 0;
}

.sample.cold::after {
    background-image: conic-gradient(from 45deg at 50% 0, #1f5f8b 0 90deg, transparent 90deg 360deg);
    background-repeat: repeat-x;
    background-size: 14px 9px;
    content: "";
    height: 9px;
    left: 5px;
    position: absolute;
    right: 0;
    top: -1px;
}

.legend-letter {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 15px;
    font-style: normal;
    font-weight: bold;
}

.compass {
    align-items: center;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(60, 95, 118, 0.5);
    border-radius: 50%;
    bottom: 22px;
    color: #3c5f76;
    display: flex;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 12px;
    font-weight: bold;
    height: 44px;
    justify-content: center;
    position: absolute;
    right: 24px;
    width: 44px;
    z-index: 7;
}

/* the red north arrow poking out of the compass */
.compass::before {
    border: 5px solid transparent;
    border-bottom: 9px solid #c0392b;
    content: "";
    left: 50%;
    margin-left: -5px;
    position: absolute;
    top: -10px;
}


/* ---- FORECAST-BAND: the five-day cards ---- */

#forecast {
    background: #ffffff;
    padding: 42px 34px;
}

h2 {
    border-bottom: 1px solid #e0e8ea;
    color: #16323f;
    font-size: 13px;
    letter-spacing: 2.5px;
    margin-bottom: 18px;
    padding-bottom: 10px;
    text-transform: uppercase;
}

h2::before {
    background: #cf4b2c;
    content: "";
    display: inline-block;
    height: 3px;
    margin-right: 10px;
    vertical-align: middle;
    width: 20px;
}

.lead {
    color: #3c525b;
    font-size: 17px;
    line-height: 1.65;
    margin-bottom: 26px;
}

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

.day {
    background: #ffffff;
    border: 1px solid #dbe4e7;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(20, 50, 63, 0.05);
    padding: 16px 8px 14px 8px;
    text-align: center;
}

.day.is-today {
    border-color: #2f6f9f;
    box-shadow: 0 0 0 2px rgba(47, 111, 159, 0.14);
}

.dow {
    color: #5f7078;
    display: block;
    font-size: 11px;
    letter-spacing: 1.5px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.hi {
    color: #22333b;
    display: block;
    font-size: 22px;
    font-weight: bold;
    line-height: 1.2;
}

.lo {
    color: #7d8d94;
    display: block;
    font-size: 14px;
}

.note {
    color: #5f7078;
    display: block;
    font-size: 10px;
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.discussion-title {
    color: #16323f;
    font-size: 12px;
    letter-spacing: 1.5px;
    margin: 34px 0 10px 0;
    text-transform: uppercase;
}


/* ---- WEATHER SYMBOLS: little pictures built from shapes ----
   A symbol is one box. Its cloud, sun or rain is a pseudo-element
   (::before / ::after) or a small inner .cloud span. */

.symbol {
    display: block;
    height: 44px;
    margin: 0 auto 10px auto;
    position: relative;
    width: 54px;
}

/* the sun: a disc with a ring of thin rays */
.sun::before {
    background: #f0b429;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(240, 180, 41, 0.22);
    content: "";
    height: 28px;
    left: 13px;
    position: absolute;
    top: 7px;
    width: 28px;
    z-index: 2;
}

.sun::after {
    background: repeating-conic-gradient(from 0deg, #f0b429 0 5deg, transparent 5deg 45deg);
    border-radius: 50%;
    content: "";
    height: 48px;
    left: 3px;
    opacity: 0.85;
    position: absolute;
    top: -3px;
    width: 48px;
    z-index: 1;
}

/* a reusable grey cloud, made of a bar and two round puffs */
.cloud {
    background: #c3ced4;
    border-radius: 10px;
    bottom: 11px;
    height: 16px;
    left: 6px;
    position: absolute;
    width: 42px;
}

.cloud::before {
    background: #c3ced4;
    border-radius: 50%;
    bottom: 7px;
    box-shadow: 15px 4px 0 0 #c3ced4;
    content: "";
    height: 19px;
    left: 7px;
    position: absolute;
    width: 19px;
}

/* rain under a cloud */
.showers::after {
    background: repeating-linear-gradient(100deg, #4a86ad 0 2px, transparent 2px 7px);
    border-radius: 2px;
    bottom: 1px;
    content: "";
    height: 12px;
    left: 12px;
    position: absolute;
    width: 30px;
}

/* a yellow bolt under a cloud */
.storm::after {
    background: #f0b429;
    bottom: -2px;
    clip-path: polygon(58% 0, 18% 56%, 46% 56%, 30% 100%, 82% 42%, 52% 42%);
    content: "";
    height: 18px;
    left: 23px;
    position: absolute;
    width: 14px;
}

/* bluish flakes under a cloud */
.snow::after {
    background-image:
        radial-gradient(circle, #7fb2d1 0 2px, transparent 2px),
        radial-gradient(circle, #7fb2d1 0 2px, transparent 2px);
    background-position: 0 0, 4px 4px;
    background-repeat: repeat;
    background-size: 8px 8px;
    bottom: 0;
    content: "";
    height: 12px;
    left: 14px;
    position: absolute;
    width: 28px;
}

/* three speed-lines and a curl for wind */
.wind::before {
    background: #7fa0b3;
    border-radius: 2px;
    box-shadow: 0 8px 0 #7fa0b3, 0 16px 0 #7fa0b3;
    content: "";
    height: 3px;
    left: 6px;
    position: absolute;
    top: 12px;
    width: 40px;
}

.wind::after {
    border: 3px solid #5b8aa6;
    border-bottom-color: transparent;
    border-radius: 50%;
    border-right-color: transparent;
    content: "";
    height: 14px;
    left: 28px;
    position: absolute;
    top: 3px;
    transform: rotate(45deg);
    width: 14px;
}


/* ---- SYMBOLS-BAND: the glossary ---- */

#symbols {
    background: #eef3f2;
    padding: 42px 34px;
}

.glossary {
    column-gap: 28px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    list-style: none;
    row-gap: 22px;
}

.glossary li {
    align-items: center;
    display: grid;
    grid-template-columns: 62px 1fr;
}

.glossary .symbol {
    grid-row: span 2;
    margin: 0;
}

.glossary b {
    color: #22333b;
    font-size: 14px;
}

.glossary span:last-child {
    color: #5f7078;
    font-size: 12px;
    line-height: 1.5;
}


/* ---- NOTES-BAND: how to edit the template ---- */

#notes {
    background: #ffffff;
    padding: 42px 34px 26px 34px;
}

.notes-columns {
    display: grid;
    gap: 6px 32px;
    grid-template-columns: 1fr 1fr;
}

.notes-columns p {
    margin-bottom: 16px;
}

code {
    background: #eef3f2;
    border: 1px solid #dbe4e7;
    border-radius: 4px;
    color: #1f5f8b;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    padding: 1px 5px;
}


/* ---- FOOTER: the required credit link ---- */

#footer {
    background: #16323f;
    color: #9fc0cf;
    font-size: 10px;
    letter-spacing: 1px;
    padding: 20px;
    text-align: center;
    text-transform: uppercase;
}

#footer a,
#footer a:visited {
    border-bottom: 1px solid rgba(207, 224, 232, 0.4);
    color: #cfe0e8;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease;
}

#footer a:hover {
    border-bottom-color: #ffffff;
    color: #ffffff;
}


/* ---- SMALL SCREENS: squeeze the chart and stack the cards ---- */

@media (max-width: 640px) {
    body {
        padding: 0;
    }

    #page {
        border-radius: 0;
        box-shadow: none;
    }

    #station {
        padding: 16px 18px 20px 18px;
    }

    #menu a {
        margin-left: 0;
        margin-right: 14px;
    }

    #chart-band {
        padding: 16px 12px 14px 12px;
    }

    #chart {
        height: 430px;
    }

    /* hide the busier labels so the smaller map stays clear */
    .city-3,
    .city-4,
    .city-5,
    .legend,
    .compass {
        display: none;
    }

    .chart-title strong {
        font-size: 13px;
    }

    #forecast,
    #symbols,
    #notes {
        padding: 30px 20px;
    }

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

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

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