/* A quieter, editorial companion to the landing page's weather atlas. */
.history-page { background: #f7f9fa; }
.history-main { padding-top: 0; }
.history-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 64px; padding: 56px 0 44px; position: relative; }
.history-hero::before { content: ""; position: absolute; inset: 0 calc(50% - 50vw); background: #eaf1f4; border-bottom: 1px solid #d3dfe5; z-index: -1; }
.history-page .history-eyebrow { color: #58717f; font-size: 10px; line-height: 1.6; letter-spacing: 1.9px; font-weight: 650; }
.history-main .history-hero h1 { font-size: clamp(42px, 5.2vw, 66px); margin-top: 16px; letter-spacing: -.045em; }
.history-hero h1 em { color: #25627a; font-weight: 400; white-space: nowrap; }
.history-hero-description { color: #566c79; max-width: 600px; margin-top: 20px; font-size: 16px; line-height: 1.85; }
.history-hero-stat { border-left: 1px solid #c7d8e0; padding: 8px 0 8px 40px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #426477; }
.history-hero-count { font-family: Georgia, 'Times New Roman', serif; font-size: 76px; letter-spacing: -4px; color: #25627a; line-height: 1; }
.history-hero-stat .history-hero-source { font-size: 11px; margin-top: 9px; color: #59717f; }
.history-jump-nav { display: flex; align-items: center; gap: 36px; padding: 22px 0; border-bottom: 1px solid #dce4e8; font-size: 13px; }
.history-jump-nav a { display: inline-flex; align-items: center; gap: 10px; min-height: 28px; }
.history-jump-nav a > span:first-child { font-size: 10px; color: #708692; font-variant-numeric: tabular-nums; }
.history-jump-nav a:last-child { margin-left: auto; }
.history-jump-nav a:hover { color: #a5512f; }
.history-section { margin-top: 48px; }
.history-section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: 28px; }
.history-section-heading h2 { margin-top: 8px; }
.history-section-heading > p, .history-section-heading > div > p:last-child:not(:first-child) { color: #59717f; font-size: 13px; line-height: 1.8; max-width: 300px; }
.history-section-heading > div > p:last-child:not(:first-child) { margin-top: 12px; max-width: none; }
.history-main .history-group-title { color: #59717f; font-family: inherit; font-size: 10px; font-weight: 650; letter-spacing: 1.4px; text-transform: uppercase; margin-bottom: 16px; }
.history-summary-stack { display: grid; gap: 32px; }
.history-card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 32px; }
.history-page .history-metric-card, .history-page .history-top-card { border: 0; border-top: 1px solid #dce4e8; border-radius: 0; background: transparent; box-shadow: none; min-width: 0; }
.history-metric-card { --metric-accent: #25627a; --metric-soft: #eaf1f4; padding: 22px 0; }
.history-page [data-tone="warm"] { --metric-accent: #a65d36; --metric-soft: #f5ebe2; }
.history-page [data-tone="cold"] { --metric-accent: #356c91; --metric-soft: #e6eff6; }
.history-page [data-tone="precipitation"] { --metric-accent: #367784; --metric-soft: #e7f0f2; }
.history-page [data-tone="snow"] { --metric-accent: #527a8e; --metric-soft: #eaf1f4; }
.history-page [data-tone="wind-cloud"] { --metric-accent: #4a786e; --metric-soft: #e7f0ed; }
.history-metric-label { color: #426071; font-size: 13px; line-height: 1.5; }
.history-metric-value { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; margin-top: 10px; color: var(--metric-accent); }
.history-metric-number { font-family: Georgia, 'Times New Roman', serif; font-size: 34px; font-weight: 400; letter-spacing: -1px; line-height: 1.1; }
.history-metric-unit { color: #59717f; font-family: Inter, ui-sans-serif, system-ui, sans-serif; font-size: 12px; font-weight: 400; }
.history-metric-detail { display: block; color: #59717f; font-size: 11px; line-height: 1.6; margin-top: 9px; }
a.history-metric-detail { text-decoration: underline; text-decoration-color: #b1c3cd; text-underline-offset: 4px; }
a.history-metric-detail span { display: inline-block; margin-left: 8px; }
a.history-metric-detail:hover { color: var(--metric-accent); text-decoration-color: currentColor; }
[data-kind="records"] .history-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.history-page [data-kind="records"] .history-metric-card { background: var(--metric-soft); border: 0; border-radius: 4px; padding: 26px 28px; }
[data-kind="records"] .history-metric-label { color: var(--metric-accent); }
[data-kind="records"] .history-metric-number { font-size: clamp(40px, 4.4vw, 54px); }
[data-kind="records"] .history-metric-value { margin-top: 18px; }
[data-kind="records"] .history-metric-detail { margin-top: 18px; }
.history-records-section { border-top: 1px solid #dce4e8; padding-top: 40px; }
.history-weather-tabs { display: flex; flex-wrap: wrap; gap: 8px 24px; border-bottom: 1px solid #dce4e8; margin-bottom: 24px; }
.history-weather-tabs[hidden], .history-top-group[hidden] { display: none; }
.history-weather-tabs button { position: relative; padding: 12px 0 16px; font-size: 13px; font-weight: 550; color: #59717f; min-height: 44px; }
.history-weather-tabs button::after { content: ""; position: absolute; height: 2px; bottom: -1px; left: 0; right: 0; background: transparent; }
.history-weather-tabs button[aria-selected="true"] { color: var(--metric-accent); }
.history-weather-tabs button[aria-selected="true"]::after { background: var(--metric-accent); }
.history-weather-tabs button:hover { color: var(--metric-accent); }
.history-top-group { margin-top: 28px; }
.history-top-group[role="tabpanel"] { margin-top: 0; }
.history-top-group[role="tabpanel"] > h3 { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.history-top-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 32px; }
.history-top-card { padding: 20px 0 8px; }
.history-top-label { font-size: 13px; font-weight: 550; color: #426071; margin-bottom: 10px; }
.history-top-entries { list-style: none; margin: 0; padding: 0; }
.history-top-entry { display: flex; align-items: baseline; gap: 12px; padding: 10px 0; color: #59717f; }
.history-top-entry + .history-top-entry { border-top: 1px solid #e4eaed; }
.history-top-rank { font-size: 10px; color: #708692; min-width: 10px; }
.history-top-year { font-size: 14px; color: #426071; font-variant-numeric: tabular-nums; text-decoration: underline; text-decoration-color: #bccdd5; text-underline-offset: 4px; }
.history-top-year:hover { color: var(--metric-accent); text-decoration-color: currentColor; }
.history-top-value { margin-left: auto; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.history-top-value > span { font-size: 11px; font-weight: 400; }
.history-top-entry:first-child { padding: 10px 0 18px; }
.history-top-entry:first-child .history-top-year { font-family: Georgia, 'Times New Roman', serif; font-size: 27px; color: var(--metric-accent); }
.history-top-entry:first-child .history-top-value { font-family: Georgia, 'Times New Roman', serif; font-size: 25px; color: var(--metric-accent); }
.history-section-note { color: #59717f; font-size: 11px; line-height: 1.8; margin-top: 24px; }
.history-years-section { border-top: 1px solid #dce4e8; padding-top: 40px; }
.history-sort-label { display: flex; flex-direction: column; gap: 8px; color: #59717f; font-size: 11px; min-width: 200px; }
.history-sort-label select { background-color: #fff; border: 1px solid #c5d3db; padding: 10px 36px 10px 14px; }
.history-sort-status { color: #59717f; font-size: 12px; margin-bottom: 16px; }
.history-table-hint { display: flex; align-items: center; justify-content: space-between; gap: 24px; font-size: 11px; line-height: 1.6; color: #59717f; padding: 14px 18px; background: #edf2f5; border: 1px solid #dce4e8; border-bottom: 0; border-radius: 6px 6px 0 0; }
.history-table-hint span { font-size: 20px; }
.history-table-wrap { overflow: auto; overflow-anchor: none; max-height: 620px; border: 1px solid #dce4e8; border-radius: 0 0 6px 6px; background: white; scrollbar-color: #a7bdc8 #edf2f5; }
.history-table-wrap:focus-visible { outline: 3px solid #b8672c; outline-offset: 4px; }
.history-table { border-collapse: separate; border-spacing: 0; min-width: 92rem; font-variant-numeric: tabular-nums; color: #426071; }
.history-table :is(th, td) { border-bottom: 1px solid #e5ebee; border-right: 0; white-space: nowrap; text-align: right; padding: 12px 16px; }
.history-table th { position: sticky; top: 0; z-index: 3; background: #f3f6f8; border-bottom-color: #cfdee5; }
.history-table .sortable-header-button { justify-content: flex-end; }
.history-table .history-sticky-col { position: sticky; left: 0; z-index: 2; background: white; text-align: left; border-right: 1px solid #dce4e8; }
.history-table th.history-sticky-col { z-index: 4; background: #f3f6f8; }
.history-table td.history-sticky-col a { color: #25627a; text-decoration: underline; text-decoration-color: #c1d2da; text-underline-offset: 4px; }
.history-table tbody tr:hover td { box-shadow: inset 0 0 0 999px #173c5005; }
.history-empty { padding: 56px 0; color: #59717f; }
@media (min-width: 1180px) {
  .history-top-grid:has(> .history-top-card:nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
}
@media (max-width: 1000px) {
  .history-hero { gap: 32px; }
  .history-hero-stat { padding-left: 28px; }
  .history-card-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .history-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .history-main { padding-top: 0; }
  .history-hero { display: block; padding: 36px 0 28px; }
  .history-main .history-hero h1 { font-size: 43px; }
  .history-hero h1 em { display: block; }
  .history-hero-description { font-size: 14px; margin-top: 18px; line-height: 1.8; }
  .history-hero-stat { flex-direction: row; align-items: baseline; flex-wrap: wrap; gap: 7px; border: 0; padding: 24px 0 0; font-size: 12px; }
  .history-hero-count { font-size: 30px; letter-spacing: -1px; }
  .history-hero-stat .history-hero-source { margin: 0 0 0 auto; font-size: 10px; }
  .history-jump-nav { gap: 16px; font-size: 12px; padding: 16px 0; }
  .history-jump-nav a { gap: 7px; }
  .history-section { margin-top: 32px; }
  .history-section-heading { display: block; margin-bottom: 24px; }
  .history-section-heading > p { margin-top: 12px; max-width: none; }
  .history-main .history-section-heading h2 { font-size: 28px; }
  [data-kind="records"] .history-card-grid { grid-template-columns: 1fr; gap: 8px; }
  .history-page [data-kind="records"] .history-metric-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 16px; padding: 20px; }
  [data-kind="records"] .history-metric-value { grid-column: 2; grid-row: 1 / 3; margin: 0; }
  [data-kind="records"] .history-metric-number { font-size: 38px; }
  [data-kind="records"] .history-metric-detail { margin: 0; grid-column: 1; }
  .history-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
  .history-metric-card { padding: 20px 0; }
  .history-metric-number { font-size: 30px; }
  .history-metric-label { font-size: 12px; }
  .history-metric-detail { font-size: 10px; }
  .history-records-section, .history-years-section { padding-top: 28px; }
  .history-weather-tabs { gap: 0 20px; margin-top: -4px; }
  .history-weather-tabs button { font-size: 12px; padding-bottom: 12px; }
  .history-top-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .history-top-entry { gap: 6px; flex-wrap: wrap; }
  .history-top-entry:first-child { padding-bottom: 14px; }
  .history-top-entry:first-child .history-top-year { font-size: 24px; }
  .history-top-entry:first-child .history-top-value { font-size: 21px; width: 100%; margin-left: 16px; }
  .history-top-value { font-size: 12px; }
  .history-top-value > span { font-size: 9px; }
  .history-top-year { font-size: 12px; }
  .history-sort-label { margin-top: 20px; }
  .history-table-wrap { max-height: 520px; }
}
@media (max-width: 360px) {
  .history-hero-stat .history-hero-source { width: 100%; margin: 4px 0 0; }
  .history-top-grid { grid-template-columns: 1fr; }
}
@media print {
  .history-weather-tabs, .history-jump-nav, .history-sort-label, .history-table-hint { display: none; }
  .history-top-group[hidden] { display: block; }
  .history-top-group[role="tabpanel"] > h3 { position: static; width: auto; height: auto; clip-path: none; }
  .history-table-wrap { max-height: none; overflow: visible; }
}
