:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  color: #202123;
  background: #fff;
  font-synthesis: none;
  --muted: #686b70;
  --line: #e7e8ea;
  --accent: #1763ce;
  --surface: #f6f7f8;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a:hover { color: var(--accent); }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
::selection { background: #dbe9fc; color: #172a45; }
svg { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wrap { width: min(1100px, calc(100% - 64px)); margin-inline: auto; }
.site-header { display: flex; justify-content: space-between; align-items: center; min-height: 88px; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 7px; font-size: 18px; font-weight: 600; text-decoration: none; letter-spacing: -.03em; }
.brand-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; align-self: flex-start; margin-top: 3px; }
nav { display: flex; gap: 28px; }
nav a { padding-block: 13px; font-size: 14px; text-decoration: none; color: var(--muted); }
nav a[aria-current] { color: #202123; text-decoration: underline; text-underline-offset: 8px; }
h1, h2, p { margin: 0; }
h1 { font-size: 28px; line-height: 1.2; font-weight: 500; letter-spacing: -.035em; }
h2 { font-size: 20px; line-height: 1.3; letter-spacing: -.02em; font-weight: 500; }
.home-intro { padding-block: 72px 40px; }
.home-intro h1 { font-size: clamp(28px, 4vw, 40px); }
.home-intro > p { color: var(--muted); font-size: 16px; line-height: 1.6; margin-top: 12px; }
.city-choices { border-top: 1px solid var(--line); }
.city-choice { display: grid; grid-template-columns: 1fr auto 32px; align-items: center; gap: 44px; padding: 40px 0; border-bottom: 1px solid var(--line); text-decoration: none; transition: background-color .15s; }
.city-choice:hover { background: #fafbfc; color: #202123; }
.city-choice h2 { font-size: 28px; margin-bottom: 10px; }
.city-choice p { color: var(--muted); font-size: 14px; line-height: 1.5; }
.choice-reading { text-align: right; font-variant-numeric: tabular-nums; }
.choice-temperature { font-size: 44px; line-height: 1; letter-spacing: -.04em; }
.choice-unit { font-size: 20px; color: var(--muted); vertical-align: top; padding-left: 6px; }
.choice-count { display: block; margin-top: 12px; font-size: 12px; line-height: 1.5; color: var(--muted); }
.choice-arrow { width: 24px; height: 24px; }
.city-heading { padding-top: 36px; display: flex; align-items: start; justify-content: space-between; gap: 20px; }
.city-heading p { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 8px; }
.back-link { font-size: 13px; color: var(--muted); padding-block: 6px; }
.average-section { text-align: center; padding: 35px 16px 30px; }
.average-section h2 { font-size: 14px; letter-spacing: 0; color: var(--muted); font-weight: 400; }
.average-reading { margin-block: 13px 8px; display: flex; justify-content: center; align-items: baseline; gap: 10px; font-variant-numeric: tabular-nums; }
.average-value { font-size: clamp(76px, 9vw, 112px); line-height: 1.05; color: var(--accent); font-weight: 400; letter-spacing: -.04em; }
.average-unit { font-size: 30px; color: var(--muted); }
.average-context { font-size: 14px; line-height: 1.5; }
.source-count { font-size: 13px; color: var(--muted); margin-top: 6px; line-height: 1.5; }
.official-reading { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin-bottom: 27px; font-size: 12px; color: var(--muted); }
.official-reading strong { font-size: 18px; color: #202123; font-weight: 400; font-variant-numeric: tabular-nums; }
.official-reading strong span { color: var(--muted); font-size: 13px; }
.connection { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 52px; padding-block: 12px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.connection p { font-size: 12px; line-height: 1.6; color: var(--muted); }
.connection-dot { display: inline-block; width: 5px; height: 5px; margin-right: 8px; border-radius: 50%; background: #60666d; vertical-align: 2px; }
.connection-error { background: #faf7f1; }
.connection-error p { color: #6e4f22; }
.connection-error .connection-dot { background: #8d662b; }
.updated { display: inline; margin-left: 20px; font-variant-numeric: tabular-nums; }
.refresh { color: #4c5055; background: transparent; border: 1px solid #d5d7da; border-radius: 4px; padding: 7px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.refresh:hover { background: var(--surface); color: #202123; }
.refresh:disabled { color: #86898e; cursor: default; }
.sources-section { margin-top: 34px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading > p { font-size: 12px; line-height: 1.6; color: var(--muted); max-width: 65ch; }
.source-list { list-style: none; padding: 0; margin: 0; }
.source-row { display: grid; grid-template-columns: minmax(230px, 1fr) 110px 150px 125px; column-gap: 28px; padding-block: 20px; border-top: 1px solid var(--line); align-items: start; }
.source-row:last-child { border-bottom: 1px solid var(--line); }
.source-name > a { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; line-height: 1.5; font-weight: 500; text-decoration: none; }
.source-name a:hover { text-decoration: underline; }
.source-name svg { width: 13px; height: 13px; flex: 0 0 13px; color: var(--muted); }
.source-name > p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.source-included .source-name > p { color: var(--accent); }
.source-value { padding-top: 2px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.source-value strong { font-size: 24px; line-height: 1.3; font-weight: 400; letter-spacing: -.025em; }
.source-value .unit { padding-left: 5px; color: var(--muted); font-size: 12px; }
.small-label { display: block; color: var(--muted); font-size: 11px; margin-bottom: 6px; line-height: 1.4; }
.source-time, .source-freshness { text-align: right; font-variant-numeric: tabular-nums; }
.source-time time, .source-age { font-size: 14px; line-height: 1.5; }
.received-time { display: block; margin-top: 5px; font-size: 11px; line-height: 1.5; color: var(--muted); }
.source-status { display: block; font-size: 11px; margin-top: 5px; line-height: 1.5; color: var(--muted); }
.status-stale { color: #81591f; }
.status-unavailable { color: #7a4d4d; }
.mobile-label { display: none; }
details { margin-top: 6px; font-size: 11px; line-height: 1.6; color: var(--muted); }
summary { cursor: pointer; width: fit-content; }
details p { padding-top: 6px; max-width: 65ch; }
.history-section { margin-top: 36px; }
.history-scroll { width: 100%; max-width: 100%; max-height: 528px; overflow: auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); scrollbar-color: #c4c7cb #f6f7f8; scrollbar-width: thin; overscroll-behavior: contain; }
table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; }
th, td { padding: 13px 18px; min-width: 115px; border-bottom: 1px solid var(--line); white-space: nowrap; }
thead th { position: sticky; top: 0; z-index: 2; font-weight: 400; font-size: 11px; line-height: 1.5; color: var(--muted); background: #fff; vertical-align: bottom; max-width: 215px; white-space: normal; }
thead th span { display: block; margin-top: 4px; }
tr > :first-child { position: sticky; left: 0; background: #fff; text-align: left; z-index: 1; min-width: 130px; padding-left: 0; }
thead tr > :first-child { z-index: 3; }
tbody th { font-weight: 400; }
tbody tr:hover > * { background: #fafbfc; }
.history-average { color: var(--accent); font-weight: 500; }
.empty-state { background: var(--surface); color: var(--muted); padding: 30px 20px; font-size: 14px; line-height: 1.6; }
.site-footer { padding-block: 28px; }
.site-footer p { font-size: 11px; line-height: 1.7; color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 20; padding: 12px 16px; background: #202123; color: #fff; }
.skip-link:focus { top: 12px; }

@media (max-width: 850px) {
  .wrap { width: calc(100% - 40px); }
  .source-row { grid-template-columns: minmax(180px, 1fr) 88px 125px 100px; column-gap: 16px; }
  .section-heading { display: block; }
  .section-heading > p { margin-top: 7px; }
}

@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { min-height: 72px; gap: 18px; }
  .brand { font-size: 16px; }
  nav { gap: 18px; }
  nav a { font-size: 12px; }
  .home-intro { padding-block: 45px 28px; }
  .home-intro > p { font-size: 14px; }
  .city-choice { grid-template-columns: 1fr auto 20px; gap: 14px; padding-block: 32px; }
  .city-choice h2 { font-size: 24px; }
  .city-choice p { font-size: 12px; max-width: 20ch; }
  .choice-temperature { font-size: 36px; }
  .choice-unit { font-size: 15px; padding-left: 3px; }
  .choice-count { font-size: 11px; max-width: 16ch; }
  .choice-arrow { width: 20px; }
  .city-heading { padding-top: 28px; }
  h1 { font-size: 26px; }
  .city-heading p { font-size: 12px; }
  .back-link { font-size: 12px; }
  .average-section { padding: 34px 0 28px; }
  .average-unit { font-size: 24px; }
  .average-context { font-size: 13px; }
  .official-reading { margin-bottom: 24px; font-size: 11px; gap: 10px; }
  .connection { align-items: flex-start; gap: 12px; }
  .connection p { font-size: 11px; }
  .updated { display: block; margin-left: 13px; }
  .refresh { font-size: 11px; padding: 7px 9px; }
  .source-row { grid-template-columns: minmax(0, 1fr) 108px; gap: 16px 20px; padding-block: 19px; }
  .source-name > a { font-size: 13px; overflow-wrap: anywhere; }
  .source-name > p { font-size: 11px; }
  .source-value strong { font-size: 26px; }
  .source-time { text-align: left; }
  .source-freshness { grid-column: 2; }
  .source-time time, .source-age { font-size: 13px; }
  .small-label { margin-bottom: 3px; }
  .sources-section, .history-section { margin-top: 28px; }
  .section-heading { margin-bottom: 16px; }
  .section-heading > p { font-size: 11px; }
  th, td { min-width: 108px; padding-inline: 14px; }
  tr > :first-child { min-width: 115px; }
  .history-scroll { max-height: 476px; }
  .site-footer { padding-block: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
