@import url('https://fonts.googleapis.com/css?family=Roboto+Condensed:300,400,700&display=swap');

/* Scoped under #climatealmanac-page so it can be linked into the NWS CMS page
   without leaking. The JS builds all markup inside that div. */
#climatealmanac-page, #climatealmanac-page *, #climatealmanac-page *::before, #climatealmanac-page *::after { box-sizing: border-box; }

/* The weather.gov page around it, adjusted the same way cliplot2026.js does:
   no My Forecast widget, breadcrumb or left sidebar, and the content full width.
   These are the only rules outside #climatealmanac-page. */
ul#subMenuNav li { margin-right: 25px; }
.breadcrumb { margin-bottom: 0; display: none; }
#myfcst-widget { display: none; }
.full-width-border { border-top: white; }
.partial-width-borderbottom { border-bottom: white; }
.five-sixth-first { width: 100%; padding-right: 0; padding-left: 0; }
div#sidebar.one-sixth-first { display: none; }

#climatealmanac-page {
    font-family: 'Roboto Condensed', sans-serif;
    width: 960px;
    max-width: 100%;
    margin: 0 auto;
    padding: 16px 16px 48px;
    color: #222;
    background: #fff;
}

#climatealmanac-page .ch-stationbar,
#climatealmanac-page .ch-controls {
    display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px;
}
#climatealmanac-page .ch-stationbar { padding-bottom: 12px; border-bottom: 1px solid #ddd; }
#climatealmanac-page .ch-por { font-size: 13px; color: #666; }
#climatealmanac-page .ch-por-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
#climatealmanac-page .ch-warn { margin: 12px 0 0; padding: 10px 14px; border: 1px solid #e6c25a; border-radius: 6px; background: #fdf6e1; color: #5c4705; font-size: 14px; line-height: 1.45; }

#climatealmanac-page .ch-control {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: #666;
}
#climatealmanac-page select {
    font: inherit; font-size: 15px; text-transform: none; letter-spacing: 0; color: #222;
    padding: 6px 8px; border: 1px solid #bbb; border-radius: 4px; background: #fff;
}
#climatealmanac-page .ch-mmdd { display: flex; gap: 4px; }

#climatealmanac-page .ch-groups { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 16px; border-bottom: 2px solid #1f4e79; }
#climatealmanac-page .ch-groups button {
    font: inherit; font-size: 15px; font-weight: 700; padding: 8px 16px; cursor: pointer;
    border: 1px solid #ccc; border-bottom: none; border-radius: 4px 4px 0 0; background: #f2f2f2; color: #333;
}
#climatealmanac-page .ch-groups button.active { background: #1f4e79; border-color: #1f4e79; color: #fff; }
#climatealmanac-page .ch-tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; }
#climatealmanac-page .ch-tools button {
    font: inherit; font-size: 14px; padding: 4px 12px; cursor: pointer;
    border: 1px solid #1f4e79; border-radius: 999px; background: #fff; color: #1f4e79;
}
#climatealmanac-page .ch-tools button.active { background: #1f4e79; color: #fff; }
#climatealmanac-page button:focus-visible,
#climatealmanac-page select:focus-visible { outline: 2px solid #e8a33d; outline-offset: 2px; }

#climatealmanac-page .ch-card { border: 1px solid #ddd; border-radius: 4px; padding: 16px; }
#climatealmanac-page h2 { font-size: 22px; margin: 0; }
#climatealmanac-page .ch-subtitle { margin: 2px 0 12px; font-size: 14px; color: #666; }
#climatealmanac-page .ch-controls { padding-bottom: 12px; border-bottom: 1px solid #eee; }
#climatealmanac-page .ch-control-row { display: flex; flex-wrap: wrap; gap: 12px; }
#climatealmanac-page .ch-context { font-size: 13px; color: #555; }

#climatealmanac-page .ch-hero {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px;
    margin: 16px 0; padding: 16px; background: #f5f6f7; border-radius: 4px;
}
#climatealmanac-page .ch-tile-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #666; }
#climatealmanac-page .ch-tile-value { font-size: 40px; font-weight: 700; line-height: 1.1; }
#climatealmanac-page .ch-tile-sub { font-size: 14px; color: #444; }

#climatealmanac-page h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: #555; margin: 0 0 6px; }
#climatealmanac-page .ch-hist-ends { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; }

#climatealmanac-page .ch-ranks { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 20px; }
#climatealmanac-page .ch-rank-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; color: #666; }
#climatealmanac-page table.ch-rank { width: 100%; border-collapse: collapse; font-size: 15px; }
#climatealmanac-page table.ch-rank td { padding: 5px 6px; border-bottom: 1px solid #eee; }
#climatealmanac-page td.r { width: 3em; font-size: 13px; color: #666; }
#climatealmanac-page td.y { font-weight: 700; }
#climatealmanac-page td.v { text-align: right; font-weight: 700; }
#climatealmanac-page tr.is-obs td { background: #fff4d6; }

#climatealmanac-page .tone-warm { color: #C0392B; }
#climatealmanac-page .tone-cool { color: #2E86C1; }
#climatealmanac-page .tone-wet { color: #1B7A4A; }
#climatealmanac-page .tone-dry { color: #9A6B12; }
#climatealmanac-page .tone-snow { color: #3B6B9A; }
#climatealmanac-page .tone-neutral { color: #222; }
/* The cool blue passes contrast as large hero text, not as table text: darker in tables. */
#climatealmanac-page td.tone-cool, #climatealmanac-page td .tone-cool { color: #2471A3; }

#climatealmanac-page input.ch-number {
    font: inherit; font-size: 15px; width: 6em; color: #222;
    padding: 6px 8px; border: 1px solid #bbb; border-radius: 4px; background: #fff;
}
#climatealmanac-page input.ch-number:focus-visible { outline: 2px solid #e8a33d; outline-offset: 2px; }

#climatealmanac-page h3.ch-section { margin-top: 24px; }
#climatealmanac-page .ch-note { font-size: 13px; color: #666; margin: 8px 0 0; }
#climatealmanac-page .ch-sub { font-size: 12px; font-weight: 400; color: #666; }

#climatealmanac-page .ch-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 24px; }
#climatealmanac-page .ch-detail td.l { color: #444; }
#climatealmanac-page .ch-detail td.v { text-align: left; }
#climatealmanac-page .ch-detail td.n { text-align: right; font-size: 13px; color: #666; }

/* Scrolls sideways on narrow screens instead of shrinking cells below tap size. */
#climatealmanac-page .ch-heat-wrap { overflow-x: auto; }
/* Wide day-by-day tables scroll sideways on phones instead of widening the page. */
#climatealmanac-page .ch-scroll { overflow-x: auto; }
#climatealmanac-page svg.ch-heat { display: block; width: 100%; min-width: 720px; height: auto; }
#climatealmanac-page .ch-heat-labels { font-size: 10px; fill: #555; }
#climatealmanac-page .ch-heat-row { cursor: pointer; }
#climatealmanac-page .ch-heat-row:hover { opacity: 0.85; }
#climatealmanac-page .ch-legend { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 8px; font-size: 14px; font-weight: 700; }
#climatealmanac-page .ch-legend-bar { width: 220px; max-width: 40vw; height: 10px; border-radius: 5px; }
#climatealmanac-page .ch-steps { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: center; gap: 2px; margin-top: 8px; font-size: 11px; }
#climatealmanac-page .ch-step { display: flex; flex-direction: column; align-items: center; min-width: 26px; }
#climatealmanac-page .ch-step > span { display: block; width: 100%; height: 10px; border: 1px solid #d5d9de; box-sizing: border-box; margin-bottom: 2px; }
#climatealmanac-page .ch-steps > .ch-sub { margin-left: 8px; align-self: center; }

#climatealmanac-page table.ch-ledger { width: 100%; border-collapse: collapse; font-size: 15px; }
#climatealmanac-page table.ch-ledger th {
    text-align: left; font-size: 11px; font-weight: 400; text-transform: uppercase; letter-spacing: 0.06em;
    color: #666; padding: 4px 6px; border-bottom: 1px solid #ddd;
}
#climatealmanac-page table.ch-ledger td { padding: 5px 6px; border-bottom: 1px solid #eee; vertical-align: top; }
#climatealmanac-page table.ch-ledger td.d { font-weight: 700; width: 3em; }
#climatealmanac-page table.ch-ledger td.ch-strong { font-weight: 700; }
#climatealmanac-page table.ch-pr td div { white-space: nowrap; }
#climatealmanac-page table.ch-ledger td.ch-week { white-space: nowrap; }
#climatealmanac-page table.ch-ledger .v { font-weight: 700; }
/* The first column labels the row; every other column (header and cells) lines up on the right. */
#climatealmanac-page table.ch-ledger th:not(:first-child),
#climatealmanac-page table.ch-ledger td:not(:first-child) { text-align: right; }

#climatealmanac-page table.ch-bars { width: 100%; border-collapse: collapse; font-size: 15px; }
#climatealmanac-page table.ch-bars td { padding: 5px 6px; border-bottom: 1px solid #eee; }
#climatealmanac-page table.ch-bars td.r { width: 3em; font-size: 13px; color: #666; }
#climatealmanac-page table.ch-bars td.bar { width: 45%; }
#climatealmanac-page table.ch-bars td.v { text-align: right; font-weight: 700; white-space: nowrap; }
#climatealmanac-page .ch-bar { height: 10px; border-radius: 5px; min-width: 2px; }

#climatealmanac-page .ch-search-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 16px 0 0; }
#climatealmanac-page .ch-search-row .ch-note { margin: 0; }
#climatealmanac-page button.ch-search {
    font: inherit; font-size: 15px; font-weight: 700; padding: 8px 20px; cursor: pointer;
    border: 1px solid #1f4e79; border-radius: 4px; background: #1f4e79; color: #fff;
}
#climatealmanac-page button.ch-search:disabled { opacity: 0.6; cursor: progress; }
#climatealmanac-page .ch-stale { opacity: 0.45; }

#climatealmanac-page .ch-card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#climatealmanac-page button.ch-csv {
    font: inherit; font-size: 13px; padding: 4px 12px; cursor: pointer; white-space: nowrap;
    border: 1px solid #1f4e79; border-radius: 4px; background: #fff; color: #1f4e79;
}
#climatealmanac-page button.ch-csv[hidden] { display: none; }
#climatealmanac-page a.ch-link { color: inherit; text-decoration: underline; text-decoration-color: #9fb3c8; text-underline-offset: 2px; }
#climatealmanac-page a.ch-link:hover, #climatealmanac-page a.ch-link:focus { color: #1f4e79; text-decoration-color: currentColor; }
#climatealmanac-page .ch-card-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

#climatealmanac-page table.ch-grid { border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
/* The grid scrolls inside its own box, so its header row and year column stay in view. */
#climatealmanac-page .ch-grid-wrap { max-height: 70vh; overflow: auto; }
#climatealmanac-page table.ch-grid th { padding: 3px 6px; font-weight: 700; text-align: right; background: #fff; }
#climatealmanac-page table.ch-grid thead th { position: sticky; top: 0; z-index: 2; }
#climatealmanac-page table.ch-grid tbody th, #climatealmanac-page table.ch-grid tfoot th { text-align: left; position: sticky; left: 0; z-index: 1; }
#climatealmanac-page table.ch-grid thead th:first-child { left: 0; z-index: 3; text-align: left; }
#climatealmanac-page table.ch-grid td.g { padding: 3px 6px; text-align: right; border-bottom: 1px solid #f2f2f2; }
#climatealmanac-page table.ch-grid td.inc { color: #666; font-style: italic; }
#climatealmanac-page table.ch-grid tfoot td, #climatealmanac-page table.ch-grid tfoot th { border-top: 1px solid #ccc; background: #f5f6f7; font-weight: 700; white-space: nowrap; }

/* Year Calendar: 31 days by 12 months, every cell colored on a fixed scale. */
#climatealmanac-page table.ch-cal { border-collapse: collapse; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; width: 100%; min-width: 520px; }
#climatealmanac-page table.ch-cal th { padding: 2px 6px; text-align: right; font-weight: 700; background: #fff; }
#climatealmanac-page table.ch-cal thead th { text-align: center; }
#climatealmanac-page table.ch-cal tbody th, #climatealmanac-page table.ch-cal tfoot th { position: sticky; left: 0; z-index: 1; }
#climatealmanac-page table.ch-cal td { padding: 3px 2px; text-align: center; border: 1px solid #fff; }
#climatealmanac-page table.ch-cal td.none { background: #d4d4d4; }
#climatealmanac-page table.ch-cal td.inc { font-style: italic; opacity: 0.55; }
#climatealmanac-page table.ch-cal tfoot tr:first-child td, #climatealmanac-page table.ch-cal tfoot tr:first-child th { border-top: 3px solid #000; }
#climatealmanac-page .ch-cal-legend { max-width: 360px; margin: 12px auto 0; text-align: center; }
#climatealmanac-page .ch-cal-ramp { height: 14px; border: 1px solid #333; }
#climatealmanac-page .ch-cal-ticks { position: relative; height: 16px; font-size: 11px; }
#climatealmanac-page .ch-cal-ticks span { position: absolute; transform: translateX(-50%); }

#climatealmanac-page .ch-stripes-wrap { margin-top: 16px; }
#climatealmanac-page svg.ch-stripes { display: block; width: 100%; height: 260px; }
#climatealmanac-page .ch-stripes-axis { display: flex; justify-content: space-between; font-size: 12px; color: #555; margin-top: 4px; }

#climatealmanac-page .ch-swatches { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; font-size: 12px; color: #444; }
#climatealmanac-page .ch-swatches i { display: inline-block; width: 12px; height: 12px; border-radius: 2px; margin-right: 4px; vertical-align: -2px; }
#climatealmanac-page table.ch-ledger td.ch-thin { color: #666; background: #f7f7f7; }
#climatealmanac-page table.ch-ledger td.ch-thin .v { color: #666; }

#climatealmanac-page .ch-brief { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 16px 0; }
#climatealmanac-page .ch-brief-col { display: flex; flex-direction: column; gap: 14px; padding: 16px; background: #f5f6f7; border-radius: 4px; }
#climatealmanac-page .ch-brief-col h3 { margin: 0; }
#climatealmanac-page .ch-brief-dates { font-weight: 400; text-transform: none; letter-spacing: 0; color: #666; }
#climatealmanac-page .ch-brief .ch-tile-value { font-size: 30px; }

#climatealmanac-page p.ch-summary { font-size: 17px; line-height: 1.55; max-width: 46em; margin: 16px 0; }

#climatealmanac-page .ch-notice { padding: 24px; text-align: center; color: #555; }
#climatealmanac-page .ch-notice.error { color: #a00; }
#climatealmanac-page .ch-footer { margin-top: 16px; font-size: 12px; color: #666; }

/* Five or six tiles: three to a row, so none sits alone on the second row. */
@media (min-width: 720px) {
    #climatealmanac-page .ch-hero:has(> :nth-child(5):last-child),
    #climatealmanac-page .ch-hero:has(> :nth-child(6):last-child) { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    #climatealmanac-page .ch-ranks,
    #climatealmanac-page .ch-detail { grid-template-columns: 1fr; }
    #climatealmanac-page table.ch-ledger { font-size: 13px; }
    #climatealmanac-page table.ch-bars td.bar { width: 30%; }
    #climatealmanac-page .ch-tile-value { font-size: 32px; }
}
#climatealmanac-page .ch-rose-row { display: flex; flex-wrap: wrap; gap: 12px; }
#climatealmanac-page .ch-rose-row .ch-rose { flex: 1 1 340px; min-width: 0; }
#climatealmanac-page table.ch-bins { font-size: 13px; }
#climatealmanac-page table.ch-bins td { text-align: right; padding: 3px 4px; }
#climatealmanac-page table.ch-bins td:first-child { text-align: left; white-space: nowrap; }
