/* Shared year and month archive comparison. */
.history-timeline { --timeline-high: #ad5938; --timeline-low: #36758c; border-top: 1px solid #dce4e8; margin-top: 48px; padding-top: 40px; }
.history-timeline-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 28px; }
.history-timeline-heading h2 { margin-top: 8px; }
.history-timeline-eyebrow { color: #58717f; font-size: 10px; line-height: 1.6; letter-spacing: 1.9px; font-weight: 650; }
.history-timeline-heading > div > p:last-child { color: #59717f; font-size: 13px; line-height: 1.8; margin-top: 12px; }
.history-timeline-note { color: #59717f; font-size: 11px; line-height: 1.8; margin-top: 24px; }
.history-timeline[hidden] { display: none; }
.history-timeline[data-metric="total-precipitation"] { --timeline-high: #297985; --timeline-low: #b18a57; }
.history-timeline[data-metric="wet-days"] { --timeline-high: #297985; --timeline-low: #b18a57; }
.history-timeline[data-metric="highest-wind"], .history-timeline[data-metric="cloud-coverage"] { --timeline-high: #4a786e; --timeline-low: #8c9ca8; }
.history-timeline[data-metric="frost-days"], .history-timeline[data-metric="snow-days"] { --timeline-high: #36758c; --timeline-low: #b18a57; }
.history-timeline-table-link { color: #426071; font-size: 12px; text-decoration: underline; text-decoration-color: #b1c3cd; text-underline-offset: 5px; white-space: nowrap; padding-bottom: 5px; }
.history-timeline-table-link span { margin-left: 12px; }
.history-timeline-metrics { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.history-timeline-metrics button { min-height: 44px; border: 1px solid #ccd9de; border-radius: 24px; padding: 10px 18px; color: #526c79; font-size: 12px; }
.history-timeline-metrics button[aria-pressed="true"] { background: #244e60; border-color: #244e60; color: #fff; }
.history-timeline-metrics button:hover { border-color: #244e60; }
.history-timeline button:focus-visible, .history-timeline a:focus-visible { outline: 2px solid #173c50; outline-offset: 3px; }
.history-timeline-canvas { padding: 26px 28px 0; background: #fff; border: 1px solid #dce4e8; border-radius: 6px; overflow: hidden; }
.history-timeline-caption { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; color: #426071; font-size: 12px; }
.history-timeline-caption > p { font-weight: 600; }
.history-timeline-caption > span { color: #59717f; }
.history-timeline-legend { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 18px; color: #59717f; font-size: 11px; }
.history-timeline-legend > span { display: flex; align-items: center; gap: 7px; }
.history-timeline-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 1px; }
.history-timeline-swatch.is-above { background: var(--timeline-high); }
.history-timeline-swatch.is-below { background: var(--timeline-low); }
.history-timeline-swatch.is-missing { height: 2px; background: #9badb6; }
.history-timeline-help { font-size: 11px; color: #59717f; line-height: 1.7; margin-top: 16px; }
.history-timeline-scroll { overflow-x: auto; scrollbar-color: #a7bdc8 #edf2f5; padding: 14px 4px 8px; margin: 0 -4px; }
.history-timeline-plot { position: relative; }
.history-timeline-bars { position: relative; display: grid; gap: 2px; height: 260px; }
.history-timeline-baseline { position: absolute; top: 130px; left: 0; right: 0; border-top: 1px solid #c4d3da; pointer-events: none; }
.history-timeline-baseline > span { position: absolute; top: 5px; right: 0; color: #59717f; font-size: 9px; background: #fff; padding: 0 3px; z-index: 1; }
.history-timeline-year { position: relative; display: block; width: 100%; height: 100%; border: 0; background: transparent; padding: 0; cursor: pointer; }
.history-timeline-year > span { position: absolute; left: 0; right: 0; height: var(--bar-height); opacity: var(--bar-opacity); border-radius: 2px 2px 0 0; }
.history-timeline-year[data-side="above"] > span { bottom: 50%; background: var(--timeline-high); }
.history-timeline-year[data-side="below"] > span { top: 50%; background: var(--timeline-low); border-radius: 0 0 2px 2px; }
.history-timeline-year[data-side="missing"] > span { top: calc(50% - 1px); height: 2px; background: #9badb6; opacity: 1; }
.history-timeline-year[aria-pressed="true"] { background: #173c5008; box-shadow: 0 2px #244e60; }
.history-timeline-year[aria-pressed="true"] > span, .history-timeline-year:hover > span { opacity: 1; outline: 1px solid #244e60; }
.history-timeline-axis { position: relative; height: 30px; margin-top: 12px; color: #59717f; font-size: 10px; font-variant-numeric: tabular-nums; }
.history-timeline-axis span { position: absolute; transform: translateX(-50%); }
.history-timeline-axis span:first-child { transform: none; left: 0 !important; }
.history-timeline-axis span:last-child { transform: translateX(-100%); left: 100% !important; }
.history-timeline-detail { display: grid; grid-template-columns: 1.1fr 1fr 1fr auto; align-items: center; gap: 20px; border-top: 1px solid #dce4e8; margin-top: 8px; padding: 24px 0; font-variant-numeric: tabular-nums; }
.history-timeline-detail-label { display: block; font-size: 11px; color: #59717f; margin-bottom: 8px; }
.history-timeline-detail strong { font-size: 18px; font-weight: 500; color: #426071; }
.history-timeline-selected-value strong { font-family: Georgia, 'Times New Roman', serif; font-size: 30px; color: #244e60; }
.history-timeline-detail > a { font-size: 12px; color: #25627a; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; }
.history-timeline-canvas > .history-timeline-note { margin: 0 0 24px; }
@media (max-width: 760px) {
  .history-timeline-canvas { padding: 20px 18px 0; }
  .history-timeline-detail { grid-template-columns: 1fr 1fr; gap: 24px 16px; }
  .history-timeline-detail > a { align-self: end; padding-bottom: 4px; }
}
@media (max-width: 640px) {
  .history-timeline { margin-top: 32px; padding-top: 28px; }
  .history-timeline-heading { display: block; margin-bottom: 24px; }
  .history-timeline-heading h2 { font-size: 28px; }
  .history-timeline-table-link { display: inline-block; margin-top: 18px; }
  .history-timeline-metrics { gap: 8px; margin-bottom: 18px; }
  .history-timeline-metrics button { font-size: 11px; padding: 9px 14px; }
  .history-timeline-legend { gap: 10px 16px; }
  .history-timeline-detail strong { font-size: 16px; }
  .history-timeline-selected-value strong { font-size: 26px; }
}
