/* Brand sources and asset provenance: docs/branding.md. */
@font-face {
  font-family: "Proxima Nova";
  src: url("./assets/fonts/proxima-nova-regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Proxima Nova";
  src: url("./assets/fonts/proxima-nova-semibold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  font-family: "Proxima Nova", Arial, sans-serif;
  font-synthesis: none;
  color: #172b43;
  background: #f4f7fa;
  --navy: #083266;
  --cyan: #25bfe2;
  --teal: #083266;
  --gold: #a95313;
  --purple: #6851a5;
  --muted: #526579;
  --line: #d8e1eb;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
a { color: var(--navy); text-underline-offset: 4px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid #087f9c; outline-offset: 4px; }
button:disabled { cursor: default; opacity: .5; }
.skip-link { position: absolute; left: 16px; top: -70px; padding: 12px; background: #fff; z-index: 5; }
.skip-link:focus { top: 12px; }
.site-header { background: #fff; }
.masthead, .heading-row { max-width: 1426px; margin: auto; padding-left: 28px; padding-right: 28px; }
.masthead { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-top: 22px; padding-bottom: 22px; }
.wordmark { display: block; flex-shrink: 0; }
.brand-logo { display: block; width: 228px; height: auto; }
.environment-tag { color: var(--navy); font-size: 12px; font-weight: 600; letter-spacing: 1.1px; border-left: 4px solid var(--cyan); padding: 8px 0 8px 14px; }
.heading-row { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-top: 26px; padding-bottom: 30px; border-top: 1px solid var(--line); }
.eyebrow { color: var(--navy); font-size: 12px; letter-spacing: 1.3px; font-weight: 600; text-transform: uppercase; margin: 0 0 12px; }
h1, h2, h3 { color: var(--navy); font-weight: 600; }
h1 { font-size: clamp(34px, 4vw, 54px); line-height: 1.08; letter-spacing: -.7px; margin: 0 0 14px; }
h1 > span { color: var(--cyan); }
.subtitle { margin: 0; color: #334b65; font-size: 17px; line-height: 1.5; }
.connection { display: grid; grid-template-columns: 10px auto; gap: 8px 10px; white-space: nowrap; font-size: 14px; color: var(--navy); }
.connection small { grid-column: 2; color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; align-self: center; background: #8997a6; }
.dot.fresh { background: #287850; box-shadow: 0 0 0 4px #28785012; }
.dot.warning { background: #b76c12; }
.dot.error { background: #b34130; }
.location { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; background: var(--navy); border-bottom: 4px solid var(--cyan); color: #fff; font-size: 13px; padding: 13px max(28px, calc((100vw - 1370px) / 2)); }
.location-pin { font-size: 21px; color: var(--cyan); }
.divider { color: #9cc0e3; }
main { max-width: 1426px; margin: auto; padding: 28px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin: 8px 0 18px; }
.section-title h2 { font-size: 24px; margin: 0; }
.section-title > span { font-size: 13px; color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric-card { padding: 21px 20px 0; background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--navy); border-radius: 3px; }
.metric-card.humidex { border-top-color: var(--gold); }
.metric-card.uv { border-top-color: #9b770d; }
.metric-card.particles { border-top-color: var(--purple); }
.card-top { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; font-weight: 600; color: var(--navy); }
.card-top > span:last-child { color: var(--muted); font-size: 18px; }
.reading { display: flex; align-items: baseline; gap: 9px; margin-top: 20px; min-height: 66px; }
.reading > strong { font-size: clamp(38px, 3.8vw, 56px); font-weight: 600; color: var(--navy); letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.reading > span { font-size: 15px; color: var(--muted); }
.metric-card > p { font-size: 13px; color: var(--muted); min-height: 39px; margin: 4px 0 15px; line-height: 1.5; }
.channel-reading { gap: 16px; flex-wrap: wrap; align-content: start; }
.channel-reading > div { display: flex; flex-direction: column; gap: 3px; }
.channel-reading strong { font-size: clamp(27px, 2.7vw, 39px); font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }
.channel-reading small { font-size: 12px; color: var(--purple); }
.channel-reading > span { font-size: 12px; align-self: flex-end; margin-bottom: 4px; }
.card-foot { border-top: 1px solid var(--line); padding: 13px 0; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.badge { border-radius: 3px; padding: 4px 6px; background: #eef2f6; color: #526579; white-space: nowrap; }
.badge.fresh { background: #e8f3eb; color: #286443; }
.badge.stale, .badge.missing, .badge.future { background: #fbefdb; color: #80510b; }
.weather-details { display: flex; flex-wrap: wrap; gap: 12px 28px; padding: 19px 2px 25px; font-size: 13px; color: var(--muted); border-bottom: 1px solid var(--line); }
.weather-details strong { margin-left: 6px; color: var(--navy); font-weight: 600; }
.weather-details > span:last-child { margin-left: auto; }
.history-section { padding-top: 25px; }
.history-controls { align-items: center; margin-bottom: 22px; }
.history-controls p { font-size: 13px; color: var(--muted); margin: 7px 0 0; }
.controls { display: flex; gap: 12px; align-items: center; }
.range-selector { display: flex; border: 1px solid #b5c6d8; border-radius: 4px; padding: 3px; background: #fff; }
.range-selector button, .refresh-button { min-height: 40px; border: 0; background: transparent; padding: 8px 15px; border-radius: 3px; font-size: 14px; font-weight: 600; color: var(--navy); }
.range-selector button[aria-pressed=true] { background: var(--navy); color: #fff; }
.range-selector button:hover:not([aria-pressed=true]), .refresh-button:hover, .download-buttons button:hover { background: #e9f4fa; }
.refresh-button { border: 1px solid #8ca4be; background: #fff; padding: 11px 15px; }
.chart-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 18px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 3px; padding: 24px; min-width: 0; }
.panel-heading { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.panel h3 { margin: 0; font-size: 22px; line-height: 1.2; }
.panel .eyebrow { font-size: 11px; margin-bottom: 9px; }
.unit-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin: 20px 0 8px; }
.legend span { display: flex; gap: 7px; align-items: center; }
.swatch { width: 19px; height: 3px; display: block; }
.swatch.temp-line { background: var(--navy); }
.swatch.humidex-line { background: var(--gold); }
.swatch.channel-a { background: var(--purple); }
.swatch.channel-b { background: #087f9c; }
.swatch.uv-line { background: #96720b; }
.chart { width: 100%; min-height: 225px; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 14px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.grid-line { stroke: #e3eaf1; stroke-width: 1; }
.axis-label { fill: #526579; font-size: 11px; }
.data-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.temp-line { stroke: var(--navy); }
.humidex-line { stroke: var(--gold); }
.channel-a { stroke: var(--purple); }
.channel-b { stroke: #087f9c; stroke-dasharray: 5 3; }
.uv-line { stroke: #96720b; }
.chart-point { fill: #fff; stroke-width: 1.5; }
.chart-point:focus { outline: none; stroke-width: 4; }
.chart-caption { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 12px 0 0; }
.uv-panel .chart { min-height: 205px; }
.source-panel { background: #eaf4fa; border-top: 4px solid var(--cyan); display: flex; flex-direction: column; }
.source-panel > p:not(.eyebrow) { font-size: 15px; line-height: 1.65; color: #3c556f; max-width: 470px; margin: 15px 0; }
.source-status { display: grid; gap: 12px; font-size: 14px; padding: 8px 0; }
.source-row { display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid #caddea; padding-bottom: 10px; }
.source-row > span { color: #405b75; text-align: right; font-size: 12px; }
.download-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 20px; }
.download-buttons button { min-height: 42px; background: #fff; border: 1px solid #8ca4be; border-radius: 3px; padding: 9px 13px; font-size: 13px; font-weight: 600; color: var(--navy); }
.data-table-panel { margin-top: 18px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 3px; background: #fff; font-size: 15px; }
.data-table-panel summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.data-table-panel > p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.table-scroll { max-height: 300px; overflow: auto; margin-top: 14px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 13px; white-space: nowrap; }
th, td { padding: 10px; border-bottom: 1px solid var(--line); }
th { background: #eaf1f8; position: sticky; top: 0; }
caption { text-align: left; font-weight: 600; padding-bottom: 10px; color: var(--navy); }
.about { border-top: 4px solid var(--cyan); display: grid; grid-template-columns: 1fr 1.6fr; gap: 70px; margin-top: 38px; padding: 30px 0 20px; }
.about h2 { font-size: 32px; line-height: 1.2; margin: 0; }
.about > div > p:not(.eyebrow) { font-size: 15px; line-height: 1.8; color: #3c536a; margin: 0 0 14px; }
.reference-links a { display: inline-block; margin: 0 0 0 10px; }
.status { background: #eaf4fa; border: 1px solid #bed8e8; padding: 12px 16px; font-size: 14px; line-height: 1.6; border-radius: 3px; margin: 0 0 18px; }
.status.warning { background: #fbf1df; border-color: #dec79f; color: #745016; }
.status.error { background: #f9ece6; border-color: #e0b8a7; color: #813e29; }
.status.loading { color: #3c536a; }
footer { max-width: 1370px; margin: 0 auto; padding: 24px 0 30px; border-top: 1px solid var(--line); display: flex; gap: 20px; justify-content: space-between; font-size: 13px; color: var(--muted); }
footer > a { font-weight: 600; text-decoration: none; }
[hidden] { display: none !important; }
@media (min-width: 1600px) { .chart { min-height: 250px; } }
@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reading > strong { font-size: 52px; }
  .channel-reading strong { font-size: 38px; }
  .weather-details > span:last-child { margin-left: 0; }
  .chart-grid { grid-template-columns: 1fr 1fr; }
  .panel { padding: 20px; }
  .panel-heading { align-items: flex-start; }
  .unit-label { font-size: 11px; }
  .about { gap: 30px; }
  footer { margin: 0 28px; }
}
@media (max-width: 800px) {
  .heading-row { flex-direction: column; align-items: flex-start; gap: 20px; }
  .connection { font-size: 13px; }
  .connection small { font-size: 12px; }
  .chart-grid { grid-template-columns: 1fr; }
  .history-controls { flex-direction: column; align-items: flex-start; gap: 16px; }
  .controls { width: 100%; justify-content: space-between; }
}
@media (max-width: 600px) {
  .masthead { padding: 20px 16px; gap: 18px; }
  .brand-logo { width: 174px; }
  .environment-tag { max-width: 135px; font-size: 10px; letter-spacing: .5px; line-height: 1.5; padding-left: 10px; }
  .heading-row { padding: 24px 16px; }
  .heading-row .eyebrow { font-size: 10px; }
  h1 { font-size: 36px; max-width: 350px; }
  .subtitle { font-size: 15px; }
  .location { font-size: 11px; gap: 10px; padding: 10px 16px; }
  main { padding: 22px 16px; }
  .section-title > span { display: none; }
  .metric-grid { gap: 10px; }
  .metric-card { padding: 15px 13px 0; }
  .card-top { font-size: 13px; }
  .reading { margin-top: 16px; min-height: 60px; }
  .reading > strong { font-size: 43px; }
  .reading > span { font-size: 12px; }
  .channel-reading { gap: 8px; }
  .channel-reading strong { font-size: 29px; }
  .channel-reading > span { width: 100%; font-size: 11px; margin-top: -3px; }
  .card-foot { font-size: 11px; gap: 6px; }
  .metric-card > p { font-size: 12px; min-height: 54px; }
  .weather-details { gap: 12px 20px; font-size: 12px; }
  .range-selector button { padding: 8px 12px; }
  .refresh-button { padding: 11px 12px; }
  .panel { padding: 18px; }
  .panel h3 { font-size: 21px; }
  .chart { min-height: 185px; }
  .source-row { font-size: 13px; }
  .about { grid-template-columns: 1fr; gap: 20px; }
  .about h2 { font-size: 28px; }
  .reference-links a { margin: 0 8px 0 0; }
  footer { flex-wrap: wrap; margin: 0 16px; gap: 12px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
