* {
    box-sizing: border-box;
}
body {
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
    color: #202020;
}
#map {
    /* Keep the popup pane in the same stacking context as the title panel. */
    position: absolute;
    inset: 0;
}
.leaflet-fade-anim > .leaflet-popup-pane .leaflet-popup {
    opacity: 1;
}
.pattern-definitions {
    position: absolute;
    width: 0;
    height: 0;
}
.map-panel {
    position: fixed;
    top: 1rem;
    left: 4.5rem;
    right: 4.5rem;
    max-width: 35rem;
    margin: auto;
    z-index: 500;
    pointer-events: none;
}
#disease-tabs {
    display: flex;
    width: max-content;
    pointer-events: auto;
    gap: 2px;
}
button,
input,
select,
summary {
    font: inherit;
}
button,
select,
summary {
    cursor: pointer;
}
button,
input,
select {
    color: inherit;
    border: 1px solid #aaa;
    background: #fff;
    border-radius: 3px;
    padding: 0.35rem 0.6rem;
}
button:hover {
    background: #f0edf4;
}
button:disabled {
    cursor: default;
    opacity: 0.45;
}
input:disabled {
    color: #666;
    background: #eee8;
    cursor: default;
}
#latest[aria-pressed='true'] {
    background: #333;
    color: #fff;
    border-color: #333;
}
.latest-controls {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
}
#latest {
    flex-shrink: 0;
}
#reporting-dates {
    font-size: 0.8rem;
    line-height: 1.4;
    margin: 0;
    min-width: 0;
}
#reporting-dates span {
    display: block;
}
button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible,
a:focus-visible {
    outline: 3px solid #735091;
    outline-offset: 3px;
}
#disease-tabs button {
    padding: 0.2rem 0.7rem;
    min-height: 24px;
    border-radius: 5px 5px 0 0;
    border-color: #bbb;
    font-size: 0.8rem;
    line-height: 1.2;
    background: #e5e2e8;
}
#disease-tabs button[aria-selected='true'] {
    background: rgba(255, 255, 255, 0.4);
    border-bottom-color: transparent;
    font-weight: bold;
}
.controls {
    pointer-events: auto;
    padding: 1rem 1.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 0 5px 5px 5px;
    box-shadow: 0 2px 9px #0002;
}
.map-panel:has(#about[open]) .controls,
.map-panel:has(#about[open]) #disease-tabs button[aria-selected='true'] {
    background: rgba(255, 255, 255, 0.9);
}
h1 {
    font-size: clamp(1.15rem, 3vw, 1.8rem);
    line-height: 1.2;
    margin: 0 0 0.7rem;
}
#flu-view-group {
    font-size: 0.85rem;
    margin-bottom: 0.65rem;
}
#flu-view-group:not([hidden]) {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}
select {
    max-width: 100%;
    font-size: 0.85rem;
}
#date-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.date-controls,
#calendar-controls:not([hidden]) {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    flex-wrap: wrap;
}
.date-controls {
    min-height: 2rem;
}
.date-controls button,
#latest {
    font-size: 0.8rem;
}
#current_end_date_input {
    font-family: system-ui, sans-serif;
    font-size: 0.8rem;
    min-width: 0;
}
#previous,
#next {
    font-size: 1.2rem;
    line-height: 1;
    padding: 0.3rem 0.55rem;
}
#update_button.pending_updates {
    background: #f9e5a6;
    border-color: #8d6b20;
}
#legend {
    margin-top: 0.85rem;
    height: 7px;
    border: 1px solid #0002;
}
#legend-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    margin-top: 0.2rem;
}
#legend-caption {
    font-size: 0.72rem;
    color: #555;
    margin: 0.3rem 0;
}
#reporting-window {
    font-size: 0.75rem;
    line-height: 1.45;
    margin: 0.5rem 0;
}
#current_end_date_input.bold-date {
    font-weight: 700;
}
#supplement,
#footer-stats {
    border-top: 1px dashed #bbb;
    padding-top: 0.5rem;
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    line-height: 1.5;
}
#supplement:empty,
#footer-stats:empty,
#legend-caption:empty,
#reporting-window:empty,
#status:empty {
    display: none;
}
#status {
    color: #555;
    font-size: 0.75rem;
    line-height: 1.45;
    margin: 0.5rem 0;
}
.panel-footer {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.35rem;
    border-top: 1px solid #ddd;
    font-size: 0.75rem;
}
summary {
    padding: 0.2rem 0;
}
.about-content {
    position: absolute;
    left: 0;
    right: 0;
    /* Leave at least 342px outside the scrollable About content. */
    max-height: min(calc(100vh - 342px), calc(100vh - var(--about-top, 0px) - 1rem));
    max-height: min(calc(100dvh - 342px), calc(100dvh - var(--about-top, 0px) - 1rem));
    overflow: auto;
    background: rgba(255, 255, 255, 0.9);
    padding: 1rem 1.25rem;
    border-radius: 0 0 5px 5px;
    box-shadow: 0 3px 6px #0002;
    font-size: 0.9rem;
    line-height: 1.55;
}
.about-content p {
    margin: 0 0 0.85rem;
}
.about-content ul {
    padding-inline-start: 1em;
}
.about-content h2 {
    font-size: 1.1rem;
    font-style: normal;
    margin: 0 0 0.85rem;
}
.cover-note {
    font-style: normal;
}
.cover-note .contact-details {
    font-style: italic;
}
.about-content abbr[title] {
    text-decoration: none;
    border-bottom: 1px dotted;
}
.about-context {
    border-bottom: 1px solid #aaa;
    margin-bottom: 1rem;
    padding-bottom: 0.15rem;
}
#license a {
    display: block;
    font-style: normal;
    text-align: center;
    line-height: 1.6;
    font-size: 0.7rem;
    margin-top: 2rem;
    color: rgb(170, 170, 170);
    text-decoration: none;
}
#license a:hover {
    text-decoration: underline;
}
#license a > span:first-child {
    font-style: normal;
    font-size: 0.5rem;
}
a {
    color: #56346f;
}
.license {
    font-size: 0.65rem;
    color: #666;
}
.leaflet-popup-content {
    font-family: Georgia, 'Times New Roman', serif;
    font-style: italic;
    color: black;
    line-height: 1.5;
}
.leaflet-popup-content h3 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
    font-style: normal;
}
.leaflet-popup-content a,
.leaflet-popup-content a:visited,
.leaflet-popup-content a:focus,
.leaflet-popup-content a:hover,
.leaflet-popup-content a:active {
    color: revert;
    text-decoration: underline;
}
.leaflet-popup-content p {
    margin: 0.25rem 0;
}
.geography-label,
.source-note {
    color: #666;
    font-size: 0.75rem;
}
.result-value {
    font-size: 1.4rem;
    font-weight: bold;
    font-style: normal;
}
.leaflet-popup-content time {
    white-space: nowrap;
}
.sparkline {
    display: block;
    margin: 0.5rem 0;
}
.leaflet-top .leaflet-control {
    margin-top: 1rem;
}
.no-script {
    position: relative;
    z-index: 600;
    padding: 1rem;
    background: white;
}
@media (max-width: 600px) {
    .map-panel {
        top: 0.6rem;
        left: 3.5rem;
        right: 0.6rem;
    }
    .controls {
        padding: 0.7rem 0.75rem 0.55rem;
    }
    h1 {
        font-size: 1.2rem;
    }
    #flu-view-group {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    .date-controls {
        gap: 0.25rem;
    }
    .date-controls button,
    #latest {
        padding: 0.3rem 0.4rem;
    }
    #current_end_date_input {
        max-width: 8.4rem;
        padding: 0.25rem;
    }
}
