:root {
    --weather-ink: #1f2d3d;
    --weather-muted: #45566a;
    --weather-border: #d5e0e7;
    --weather-accent: #204756;
    --weather-tint: #e8f3f5;
    --weather-gap: 0.75rem;
}

body {
    margin: 0;
    color: var(--weather-ink);
    background: #f0f4f7;
    font: 0.875rem/1.5 system-ui, sans-serif;
}

.weather-dashboard {
    max-width: 100rem;
    margin-inline: auto;
    padding: clamp(0.75rem, 2vw, 1.75rem);
}

.weather-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--weather-gap);
    margin-bottom: var(--weather-gap);
}

.weather-card.weather-header {
    padding: clamp(0.75rem, 2vw, 1.25rem);
}

.weather-brand,
.weather-header-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.weather-brand img {
    display: block;
    width: clamp(3.25rem, 6vw, 5rem);
    height: auto;
    border-radius: 0.375rem;
}

.weather-brand h1,
.weather-toolbar h2 {
    margin: 0;
    color: var(--weather-ink);
    line-height: 1.15;
}

.weather-brand h1 {
    font-size: clamp(1.25rem, 3vw, 2rem);
    letter-spacing: -0.025em;
}

.weather-eyebrow {
    margin: 0 0 0.125rem;
    color: var(--weather-accent);
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.weather-station-status {
    margin: 0;
    color: var(--weather-accent);
    font-size: 0.75rem;
    font-weight: 700;
}

.weather-station-status::before {
    display: inline-block;
    width: 0.4375rem;
    height: 0.4375rem;
    margin-inline-end: 0.375rem;
    background: #247750;
    border-radius: 50%;
    content: "";
}

.weather-station-status.is-stale::before {
    background: #9c4f21;
}

.weather-header-meta time {
    color: var(--weather-muted);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
}

.weather-layout {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    align-items: start;
    gap: var(--weather-gap);
}

.weather-sidebar {
    display: grid;
    gap: var(--weather-gap);
    min-width: 0;
}

.weather-card {
    padding: 0.75rem;
    min-width: 0;
    color: var(--weather-ink);
    background: #fff;
    border: 1px solid var(--weather-border);
    border-radius: 0.625rem;
    box-shadow: 0 1px 2px rgb(31 45 61 / 8%);
}

.weather-card-title {
    margin: 0 0 0.5rem;
    padding: 0.5rem 0.625rem;
    color: var(--weather-accent);
    background: var(--weather-tint);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 700;
}

.weather-sidebar table {
    border-collapse: collapse;
    font-size: 0.75rem;
    line-height: 1.4;
}

.weather-sidebar td {
    width: auto;
    padding: 0.35rem 0.2rem;
    border-bottom: 1px solid #e5ebf0;
    font-variant-numeric: tabular-nums;
}

.weather-sidebar td:first-child {
    width: 100%;
    color: var(--weather-muted);
}

.weather-sidebar td:not(:first-child) {
    white-space: nowrap;
}

.weather-sidebar img {
    display: block;
    width: 15px;
    height: auto;
}

.weather-current tr:nth-child(-n+3) td:nth-child(2) {
    color: var(--weather-accent);
    font-size: 0.875rem;
    font-weight: 700;
}

.weather-sidebar-links center {
    margin: 0.625rem 0.25rem 0.25rem;
    color: var(--weather-muted);
    font-size: 0.75rem;
    font-weight: bold;
    text-align: left;
}

.weather-sidebar-links table {
    width: 100%;
    border: 0;
    border-collapse: separate;
    border-spacing: 0.25rem;
    table-layout: fixed;
}

.weather-sidebar-links td,
.weather-sidebar-links td:first-child {
    width: auto;
    padding: 0;
    border: 0;
    background: transparent;
}

.weather-sidebar-links :is(a, .quick-link-disabled) {
    display: block;
    padding: 0.375rem 0.125rem;
    color: var(--weather-accent);
    background: #f0f5f8;
    border: 1px solid #d9e4ec;
    border-radius: 0.375rem;
    font-size: 0.6875rem;
    line-height: 1.25;
    text-decoration: none;
}

.weather-sidebar-links .quick-link-disabled {
    color: #677482;
    background: #f4f5f6;
    border-color: #e3e6e9;
}

.weather-sidebar-links a:hover,
.weather-sidebar-links a:focus-visible {
    background: #dceef2;
    border-color: #86aab5;
    text-decoration: underline;
}

.weather-sidebar-links a font {
    color: inherit;
    font-size: inherit;
}

.weather-history,
.dashboard-main {
    display: grid;
    gap: var(--weather-gap);
    min-width: 0;
}

.weather-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--weather-gap);
}

.weather-toolbar h2 {
    padding-inline: 0.25rem;
    font-size: 1rem;
}

.weather-periods {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.weather-button,
.weather-periods a {
    padding: 0.375rem 0.625rem;
    color: var(--weather-accent);
    background: #f3f7fa;
    border: 1px solid var(--weather-border);
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
}

.weather-button:hover,
.weather-periods a:hover {
    background: var(--weather-tint);
    border-color: #86aab5;
}

.weather-periods [aria-current="page"] {
    color: #fff;
    background: var(--weather-accent);
    border-color: var(--weather-accent);
}

.weather-periods [aria-current="page"]:hover {
    background: #2e5d6f;
}

.weather-dashboard a:focus-visible {
    outline: 2px solid #276e82;
    outline-offset: 2px;
}

.weather-plots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, max(18.5rem, calc((100% - 1.5rem) / 3))), 1fr));
    gap: var(--weather-gap);
}

.weather-plot-card {
    padding: 0.5rem;
}

.weather-plot-card .weather-card-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.weather-plot-unit {
    color: var(--weather-muted);
    font-size: 0.75rem;
    font-weight: 600;
}

.weather-plot {
    height: 220px;
}

.dashboard-grid,
.temperature-plots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--dashboard-card-width, 18rem)), 1fr));
    gap: var(--weather-gap);
    align-items: start;
}

.temperature-plots {
    --dashboard-card-width: 27rem;
}

.temperature-plots .weather-plot {
    height: 24rem;
}

.weather-dashboard .legendLayer .background {
    fill: #fff;
    fill-opacity: 0.9;
    stroke: var(--weather-border);
}

.dashboard-content {
    padding: 1rem;
}

.dashboard-content > :first-child {
    margin-top: 0;
}

.dashboard-content > :last-child {
    margin-bottom: 0;
}

.dashboard-main a:not(.weather-button, .weather-periods a) {
    color: var(--weather-accent);
}

.dashboard-main button,
.dashboard-main input,
.dashboard-main select {
    font: inherit;
    padding: 0.35rem 0.5rem;
    color: var(--weather-ink);
    background: #fff;
    border: 1px solid var(--weather-border);
    border-radius: 0.375rem;
}

.dashboard-main button {
    color: #fff;
    background: var(--weather-accent);
    cursor: pointer;
}

.dashboard-table-scroll {
    overflow-x: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.dashboard-table th,
.dashboard-table td {
    padding: 0.5rem 0.625rem;
    border-bottom: 1px solid var(--weather-border);
    text-align: start;
}

.dashboard-table th {
    color: var(--weather-accent);
    background: var(--weather-tint);
}

.dashboard-table tbody tr:nth-child(even) td {
    background: #f5f8fa;
}

.dashboard-image {
    display: block;
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

.dashboard-media > .dashboard-image,
.dashboard-media > a > .dashboard-image {
    width: 100%;
}

.dashboard-unavailable {
    color: var(--weather-muted);
}

.weather-notice {
    border-inline-start: 3px solid #9c4f21;
}

.weather-notice h3,
.weather-notice p {
    margin: 0;
}

@media (max-width: 800px) {
    .weather-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .dashboard-main {
        grid-row: 1;
    }
}

@media (max-width: 360px) {
    .weather-dashboard,
    .weather-plot-card {
        padding-inline: 0.375rem;
    }
}
