:root {
    --bg: #eef4f7;
    --panel: #ffffff;
    --ink: #10212b;
    --muted: #62727d;
    --line: #dbe6eb;
    --blue: #0d6ea8;
    --teal: #0f9b8e;
    --green: #50a65a;
    --amber: #c58b1f;
    --shadow: 0 18px 45px rgba(22, 46, 60, .12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 44px;
}

.hero {
    display: grid;
    gap: 14px;
    align-items: stretch;
    margin-bottom: 18px;
}

.hero-main,
.stat,
.card,
.map-panel,
.drought-panel,
.history-details,
.notice {
    background: rgba(255, 255, 255, .86);
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 8px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(14px);
}

.hero-main {
    padding: 18px 20px;
    min-height: auto;
    display: grid;
    gap: 6px;
    overflow: hidden;
    position: relative;
}

.hero-main > * {
    position: relative;
    z-index: 1;
}

.hero-main::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: clamp(110px, 18vw, 190px);
    aspect-ratio: 1;
    background:
        radial-gradient(circle at 100% 100%, rgba(13, 110, 168, .18) 0 54%, rgba(15, 155, 142, .13) 55% 72%, transparent 73%),
        repeating-radial-gradient(circle at 100% 100%, rgba(255, 255, 255, .34) 0 1px, transparent 1px 18px);
    border-radius: 100% 0 0 0;
    opacity: .78;
    pointer-events: none;
}

.eyebrow {
    color: var(--teal);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1 {
    max-width: 100%;
    margin: 8px 0 4px;
    font-size: clamp(1.65rem, 3vw, 2.35rem);
    line-height: 1.05;
    letter-spacing: 0;
    overflow-wrap: anywhere;
    hyphens: auto;
}

.lead {
    max-width: 890px;
    margin: 0;
    color: var(--muted);
    font-size: 1rem;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.stat {
    padding: 14px 16px;
}

.stat-label {
    margin: 0 0 5px;
    color: var(--muted);
    font-size: .86rem;
    font-weight: 700;
    text-transform: uppercase;
}

.stat-value {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2rem);
    font-weight: 850;
    line-height: 1;
}

.stat-sub {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: .9rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.card {
    padding: 22px;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.card-title {
    min-width: 0;
}

h2 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.2;
}

.timestamp {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .92rem;
}

.badge {
    flex: 0 0 auto;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
}

.badge.low {
    background: #fff1df;
    color: #9a5b00;
}

.badge.stable {
    background: #e8f6f2;
    color: #087568;
}

.badge.high {
    background: #e6f0fb;
    color: #0d5f95;
}

.badge.very-high {
    background: #edf7e8;
    color: #407d20;
}

.badge.unknown {
    background: #eef2f4;
    color: #5d6a72;
}

.card-status {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.chart-jump {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #f8fbfc;
    color: var(--blue);
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.chart-jump:hover,
.chart-jump:focus-visible {
    border-color: currentColor;
    background: #ffffff;
    transform: translateY(-1px);
    outline: none;
}

.chart-jump svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.chart-axis {
    opacity: .28;
    stroke-width: 1.8;
}

.chart-line,
.chart-arrow {
    stroke-width: 2.2;
}

.chart-jump.trend-up {
    color: var(--green);
    background: #f0f8ec;
}

.chart-jump.trend-down {
    color: #a35d0b;
    background: #fff5e4;
}

.gauge {
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    gap: 18px;
    align-items: center;
}

.ring {
    --value: 0;
    width: 112px;
    aspect-ratio: 1;
    border-radius: 50%;
    background: conic-gradient(var(--blue) calc(var(--value) * 1%), #e3edf2 0);
    display: grid;
    place-items: center;
    position: relative;
}

.ring.is-missing {
    background: repeating-conic-gradient(from -15deg, #d7e2e8 0 7deg, #eef4f7 7deg 14deg);
    color: var(--muted);
}

.ring::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: var(--panel);
}

.ring span {
    position: relative;
    font-size: 1.34rem;
    font-weight: 850;
}

.bar {
    height: 12px;
    border-radius: 999px;
    overflow: hidden;
    background: #e3edf2;
}

.bar span {
    display: block;
    height: 100%;
    width: min(calc(var(--value) * 1%), 100%);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal), var(--blue));
}

.bar.is-missing span {
    width: 100%;
    background: repeating-linear-gradient(90deg, #d7e2e8 0 10px, #eef4f7 10px 20px);
}

.fill-copy {
    color: var(--muted);
    margin: 8px 0 0;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: auto;
}

.metric {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.metric strong {
    display: block;
    margin-top: 3px;
    font-size: 1.08rem;
}

.history {
    margin-top: 18px;
}

.history.is-loading {
    opacity: .64;
    pointer-events: none;
    transition: opacity .16s ease;
}

.map {
    display: grid;
    gap: 18px;
    margin-top: 24px;
}

.map-panel,
.drought-panel,
.history-details {
    overflow: hidden;
}

.drought-panel {
    margin-top: 0;
}

.map-panel summary,
.drought-panel summary,
.history-summary {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    min-height: 68px;
    padding: 16px 18px;
    cursor: pointer;
    list-style: none;
}

.map-panel summary::-webkit-details-marker,
.drought-panel summary::-webkit-details-marker,
.history-summary::-webkit-details-marker {
    display: none;
}

.map-panel summary::after,
.drought-panel summary::after,
.history-summary::after {
    content: "+";
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1px solid var(--line);
    color: var(--blue);
    background: #f8fbfc;
    font-weight: 850;
}

.map-panel[open] summary::after,
.drought-panel[open] summary::after,
.history-details[open] .history-summary::after {
    content: "-";
}

.map-panel summary:focus-visible,
.drought-panel summary:focus-visible,
.history-summary:focus-visible {
    outline: 3px solid rgba(13, 110, 168, .28);
    outline-offset: -3px;
}

.map-title,
.drought-title {
    margin-top: 4px;
    font-size: 1.45rem;
    font-weight: 850;
}

.map-panel h2,
.drought-panel h2 {
    margin-bottom: 0;
}

.map-canvas {
    position: relative;
    width: 100%;
    aspect-ratio: var(--map-aspect, 5 / 3);
    min-height: 360px;
    background: #d9e8ee;
    overflow: hidden;
}

.map-canvas img {
    position: absolute;
    display: block;
    object-fit: cover;
}

.map-marker {
    position: absolute;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 3px solid #ffffff;
    border-radius: 50%;
    background: var(--blue);
    box-shadow: 0 10px 22px rgba(16, 33, 43, .28);
    color: #ffffff;
    text-decoration: none;
    transform: translate(calc(-50% + var(--marker-x-offset, 0px)), calc(-50% + var(--marker-y-offset, 0px)));
    transition: transform .16s ease, box-shadow .16s ease;
}

.map-marker::after {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, .28);
}

.map-marker:hover,
.map-marker:focus-visible {
    z-index: 120;
    box-shadow: 0 14px 28px rgba(16, 33, 43, .34);
    outline: none;
    transform: translate(calc(-50% + var(--marker-x-offset, 0px)), calc(-50% + var(--marker-y-offset, 0px))) scale(1.08);
}

.map-marker.low {
    background: #b46708;
}

.map-marker.stable {
    background: var(--teal);
}

.map-marker.high {
    background: var(--blue);
}

.map-marker.very-high {
    background: var(--green);
}

.map-marker.unknown {
    background: #697780;
}

.map-marker-label {
    position: absolute;
    z-index: 140;
    left: 50%;
    bottom: calc(100% + 8px);
    min-width: 150px;
    max-width: 210px;
    padding: 7px 9px;
    border: 1px solid rgba(16, 33, 43, .12);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 10px 24px rgba(16, 33, 43, .16);
    color: var(--ink);
    font-size: .78rem;
    line-height: 1.25;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-50%) translateY(4px);
    transition: opacity .16s ease, transform .16s ease;
}

.map-marker-id-5 .map-marker-label {
    top: calc(100% + 8px);
    bottom: auto;
}

.map-marker-label strong,
.map-marker-label span {
    display: block;
}

.map-marker-label span {
    margin-top: 2px;
    color: var(--muted);
    font-weight: 800;
}

.map-marker:hover .map-marker-label,
.map-marker:focus-visible .map-marker-label {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.map-attribution {
    margin: 0;
    padding: 9px 12px;
    background: rgba(255, 255, 255, .92);
    color: var(--muted);
    font-size: .8rem;
    font-weight: 700;
    text-align: right;
}

.drought-summary {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 5px 10px;
    border-radius: 999px;
    background: #eef2f4;
    color: #5d6a72;
    font-size: .84rem;
    font-weight: 850;
    white-space: nowrap;
}

.drought-summary.stable {
    background: #e8f6f2;
    color: #087568;
}

.drought-summary.watch {
    background: #fff7e3;
    color: #8a5a00;
}

.drought-summary.dry {
    background: #fff1df;
    color: #9a4f00;
}

.drought-summary.is-estimate {
    border: 1px dashed currentColor;
}

.drought-body {
    border-top: 1px solid var(--line);
    padding: 18px;
}

.drought-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.drought-metric {
    min-width: 0;
    border-left: 3px solid rgba(13, 110, 168, .22);
    padding-left: 12px;
}

.tooltip-trigger {
    cursor: help;
}

.drought-metric.tooltip-trigger:focus-visible {
    border-radius: 8px;
    outline: 3px solid rgba(13, 110, 168, .28);
    outline-offset: 4px;
}

.drought-metric span {
    display: block;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.drought-metric strong {
    display: block;
    margin-top: 3px;
    font-size: 1.16rem;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.drought-metric small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
    line-height: 1.3;
}

.drought-chart {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    padding-top: 12px;
}

.drought-chart svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
}

.drought-gridline {
    stroke: rgba(16, 33, 43, .12);
    stroke-width: 1;
}

.drought-line {
    fill: none;
    stroke: var(--blue);
    stroke-width: 4;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.drought-line-stable {
    stroke: var(--teal);
}

.drought-line-watch {
    stroke: var(--amber);
}

.drought-line-dry {
    stroke: #b46708;
}

.drought-dot {
    stroke: #ffffff;
    stroke-width: 1;
}

.drought-dot-current {
    fill: var(--blue);
}

.drought-dot-target {
    fill: var(--amber);
}

.drought-dot-stable {
    fill: var(--teal);
}

.drought-dot-watch {
    fill: var(--amber);
}

.drought-dot-dry {
    fill: #b46708;
}

.drought-dot-estimate {
    fill: rgb(190, 158, 133);
}

.drought-missing-marker {
    stroke: var(--muted);
    stroke-width: 3;
    stroke-linecap: round;
}

.drought-point {
    cursor: pointer;
    outline: none;
}

.drought-hit {
    fill: rgba(13, 110, 168, 0);
    pointer-events: all;
    stroke: rgba(13, 110, 168, 0);
    stroke-width: 2;
    transition: fill .16s ease, stroke .16s ease;
}

.drought-point:hover .drought-hit,
.drought-point:focus .drought-hit,
.drought-point:focus-visible .drought-hit {
    fill: rgba(13, 110, 168, .12);
    stroke: rgba(13, 110, 168, .62);
}

.drought-axis,
.drought-date {
    fill: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.drought-date-end {
    text-anchor: end;
}

.drought-date-single {
    text-anchor: middle;
}

.drought-chart-empty {
    margin: 16px 0 0;
    border-top: 1px solid var(--line);
    padding-top: 14px;
    color: var(--muted);
    font-size: .92rem;
}

.drought-note {
    margin: 12px 0 0;
    color: #76520d;
    font-size: .92rem;
    font-weight: 700;
}

.history-summary h2 {
    display: grid;
    gap: 4px;
    margin: 0;
    font-size: 1.45rem;
    font-weight: 850;
}

.history-summary-range {
    margin-left: auto;
    color: var(--muted);
    font-weight: 850;
    white-space: nowrap;
}

.history-body {
    display: grid;
    gap: 12px;
    border-top: 1px solid var(--line);
    padding: 16px 18px 18px;
}

.section-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
    margin-bottom: 14px;
}

.section-head h2 {
    margin-top: 4px;
    font-size: 1.45rem;
}

.history-range {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.history-meta {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px 12px;
    align-items: center;
    width: 100%;
}

.history-periods,
.history-scale {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 6px;
}

.history-scale {
    justify-content: center;
}

.history-periods a,
.history-scale a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 6px 11px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fbfc;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 850;
    text-decoration: none;
}

.history-periods a:hover,
.history-periods a.is-active,
.history-scale a:hover,
.history-scale a.is-active {
    border-color: rgba(13, 110, 168, .36);
    background: #e8f4fa;
    color: var(--blue);
}

.history-tabs {
    display: grid;
    gap: 12px;
}

.history-tab-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(108px, 1fr));
    gap: 8px;
    padding-bottom: 2px;
}

.history-tab {
    display: grid;
    align-content: center;
    width: 100%;
    min-height: 58px;
    padding: 10px 13px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .74);
    color: var(--muted);
    box-shadow: 0 10px 24px rgba(22, 46, 60, .08);
    cursor: pointer;
    font: inherit;
    text-align: left;
    user-select: none;
    transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, color .16s ease;
}

.history-tab:hover,
.history-tab:focus-visible,
.history-tab.is-active {
    border-color: rgba(13, 110, 168, .36);
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 14px 32px rgba(22, 46, 60, .12);
}

.history-tab:focus-visible {
    outline: 3px solid rgba(13, 110, 168, .24);
    outline-offset: 2px;
}

.history-tab span,
.history-tab strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-tab span {
    font-size: .9rem;
    font-weight: 850;
}

.history-tab strong {
    margin-top: 4px;
    color: var(--blue);
    font-size: .82rem;
}

.history-list {
    display: grid;
    gap: 12px;
}

.history-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .74);
    overflow: hidden;
    scroll-margin-top: 18px;
}

.history-tabs.history-tabs-ready .history-panel:not(.is-active) {
    display: none;
}

.history-tabs.history-tabs-ready .history-panel:target {
    display: block;
}

.history-panel:focus-visible {
    outline: 3px solid rgba(13, 110, 168, .24);
    outline-offset: 3px;
}

.history-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    min-height: 58px;
    padding: 16px 18px 0;
}

.history-panel-head h3 {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.2;
}

.history-current {
    margin-left: auto;
    color: var(--blue);
    font-weight: 850;
    white-space: nowrap;
}

.history-chart {
    padding: 12px 18px 18px;
}

.history-chart svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 180px;
}

.history-gridline {
    stroke: #dbe6eb;
    stroke-width: 1;
}

.history-line {
    fill: none;
    stroke: var(--blue);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.history-dot {
    fill: var(--teal);
    stroke: var(--panel);
    stroke-width: var(--history-dot-stroke, 3);
}

.history-dot.is-partial {
    fill: var(--amber);
}

.history-dot.is-repeated {
    fill: #c84b4b;
    stroke: var(--panel);
    stroke-width: var(--history-dot-stroke, 3);
}

.history-missing-marker {
    stroke: var(--amber);
    stroke-width: 4;
    stroke-linecap: round;
}

.history-point {
    cursor: pointer;
    outline: none;
}

.history-hit {
    fill: rgba(13, 110, 168, 0);
    pointer-events: all;
    stroke: rgba(13, 110, 168, 0);
    stroke-width: 2;
    transition: fill .16s ease, stroke .16s ease;
}

.history-point:hover .history-hit,
.history-point:focus .history-hit,
.history-point:focus-visible .history-hit {
    fill: rgba(13, 110, 168, .12);
    stroke: rgba(13, 110, 168, .62);
}

.history-point.is-partial:hover .history-hit,
.history-point.is-partial:focus .history-hit,
.history-point.is-partial:focus-visible .history-hit,
.history-point-missing:hover .history-hit,
.history-point-missing:focus .history-hit,
.history-point-missing:focus-visible .history-hit {
    fill: rgba(197, 139, 31, .16);
    stroke: rgba(197, 139, 31, .72);
}

.history-point.is-repeated:hover .history-hit,
.history-point.is-repeated:focus .history-hit,
.history-point.is-repeated:focus-visible .history-hit {
    fill: rgba(200, 75, 75, .14);
    stroke: rgba(200, 75, 75, .7);
}

.history-axis,
.history-date {
    fill: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.history-date-end {
    text-anchor: end;
}

.history-empty {
    margin: 0;
    padding: 12px 18px 18px;
    color: var(--muted);
}

.history-note {
    margin: -8px 18px 18px;
    color: #76520d;
    font-size: .92rem;
    font-weight: 700;
}

.notice {
    margin-top: 18px;
    padding: 16px 18px;
    color: var(--muted);
}

.notice-warning {
    margin-bottom: 18px;
    border-color: rgba(197, 139, 31, .34);
    background: rgba(255, 248, 232, .9);
}

.notice strong {
    color: var(--ink);
}

.utility-note {
    display: grid;
    gap: 14px;
    font-size: .86rem;
}

.utility-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    align-items: center;
    justify-content: space-between;
}

.utility-meta span {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: baseline;
}

.utility-method {
    display: grid;
    gap: 8px;
    border-top: 1px solid var(--line);
    padding-top: 13px;
    color: var(--muted);
    line-height: 1.5;
}

.utility-method p {
    margin: 0;
}

.utility-method strong {
    color: var(--ink);
}

.utility-method code {
    padding: 1px 4px;
    border-radius: 4px;
    background: #eef4f7;
    color: var(--ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .92em;
}

.utility-note a {
    color: var(--blue);
    font-weight: 850;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.history-tooltip {
    position: fixed;
    z-index: 30;
    display: none;
    min-width: 180px;
    max-width: min(280px, calc(100vw - 24px));
    padding: 10px 12px;
    border: 1px solid rgba(13, 110, 168, .2);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(16, 33, 43, .18);
    color: var(--ink);
    pointer-events: none;
}

.history-tooltip.is-visible {
    display: block;
}

.history-tooltip-title {
    font-weight: 850;
    line-height: 1.2;
}

.history-tooltip-meta {
    margin-top: 5px;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 700;
}

.history-tooltip-value {
    margin-top: 4px;
    color: var(--blue);
    font-size: 1.24rem;
    font-weight: 850;
    line-height: 1.1;
}

@media (max-width: 980px) {
    .hero {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .drought-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .page {
        width: min(100% - 20px, 1180px);
        padding-top: 10px;
    }

    .hero-main {
        padding: 20px;
    }

    .hero-main::after {
        right: 0;
        bottom: 0;
        width: 112px;
        opacity: .48;
    }

    .stats,
    .grid,
    .metrics,
    .drought-metrics {
        grid-template-columns: 1fr;
    }

    .map-canvas {
        min-height: 420px;
    }

    .section-head,
    .map-panel summary,
    .drought-panel summary,
    .history-panel-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .history-summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
    }

    .history-summary h2 {
        grid-column: 1;
    }

    .history-summary::after {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .drought-summary,
    .history-summary-range {
        margin-left: 0;
        white-space: normal;
    }

    .history-summary-range {
        grid-column: 1 / -1;
        grid-row: 2;
        text-align: left;
    }

    .history-meta {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .history-range {
        text-align: left;
        white-space: normal;
    }

    .history-periods,
    .history-scale {
        justify-content: flex-start;
    }

    .history-current {
        margin-left: 0;
    }

    .history-tab-list {
        display: flex;
        overflow-x: auto;
        scroll-padding-inline: 1px;
        scroll-snap-type: inline proximity;
        scrollbar-width: thin;
    }

    .history-tab {
        flex: 0 0 min(78vw, 220px);
        width: auto;
        min-width: 0;
        scroll-snap-align: start;
    }

    .gauge {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .ring {
        width: 96px;
    }
}
