/* City forecast and climate pages (scripts/build-pages.mjs, api/_placePage.ts), on top of /site/site.css.
   The shell gives the column (.page), type and colours; this file holds only what these pages add. */
.category, .source-note, .app-link { color: var(--ink-2); font-size: 15px; }
.category { margin-bottom: 8px !important; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: 14px; }
.intro { font-size: 20px; color: var(--ink-2); }
.source-note { display: block; }
.table-scroll { max-width: 100%; margin: 20px 0; overflow-x: auto; }
.table-scroll:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
table { width: 100%; min-width: 36rem; border-collapse: collapse; font-size: 16px; font-variant-numeric: lining-nums tabular-nums; }
th, td { overflow-wrap: normal; word-break: normal; hyphens: none; padding: 9px 12px; border-bottom: 1px solid var(--hairline); text-align: start; vertical-align: top; }
th:first-child, td:first-child { min-width: 6.5rem; font-weight: 600; }
th { background: var(--card); font-weight: 650; }
details.provenance { margin: 0 0 16px; color: var(--ink-2); font-size: 15px; }
details.provenance summary { cursor: pointer; min-height: 40px; display: flex; align-items: center; }

.place-server-forecast .place-forecast-label { font-size: 15px; margin-bottom: 6px; }
.place-forecast-table { max-width: 100%; overflow-x: auto; margin-block: 12px; }
.place-forecast-table:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.place-forecast-table caption { text-align: start; font-weight: 650; padding-block: 4px; }
.place-forecast-table :is(th, td) { padding: 6px; }
.place-forecast-table :is(th, td):first-child { min-width: 0; }
.place-forecast-table time { white-space: nowrap; }
.hub-hero:has(.hub-current__reading[data-now-fill]) .place-server-current,
.hub-hero:has(.hub-hour-strip) :is(.place-forecast-table--hourly, .place-server-unavailable),
main:has(#days .wk__item) .place-forecast-table--daily,
main:has(.hub-current__reading[data-now-fill]):has(.hub-hour-strip):has(#days .wk__item) .place-forecast-label {
  display: none;
}
main:has(#hub-location noscript p) > #hub-forecast:empty,
.hub-hero:has(#hub-location noscript p) :is(#hub-hero-weather, #hub-hero-hours):empty {
  display: none;
}

.place-current {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-bottom: 12px;
}

.place-current p {
  margin: 0;
}

.place-temperature {
  font-size: clamp(36px, 9vw, 64px);
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.1;
  font-weight: 630;
  letter-spacing: -.025em;
}

.place-condition {
  font-size: clamp(20px, 5vw, 25px);
}

.place-probability,
.place-times,
.place-hours {
  font-size: 15px;
  font-variant-numeric: lining-nums tabular-nums;
}

.place-probability,
.place-times dt {
  color: var(--ink-2);
}

.place-times {
  display: grid;
  grid-template-columns: fit-content(42%) 1fr;
  gap: 4px 16px;
  margin-block: 16px 0;
}

.place-times dd {
  margin: 0;
}

.place-hours,
.place-models {
  margin: 0;
  padding: 0;
  list-style: none;
}

.place-hours li {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 16px;
  padding-block: 10px;
  margin: 0;
  border-bottom: 1px solid var(--hairline);
}

.place-hours time {
  font-weight: 600;
}

.ecmwf-credit {
  font-weight: 600;
  margin-bottom: 0;
}

.place-source-links,
.place-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0 18px;
  font-size: 15px;
}

.place-actions {
  margin-top: 28px;
}

.place-actions a,
.place-source-links a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
}

.place-models .place-source-links {
  margin-bottom: 5px;
}

@media (min-width: 660px) {
  .place-hours li {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, .45fr) minmax(0, .95fr) minmax(0, 1fr);
  }
}

.page .place-list {
  column-gap: 24px;
  padding: 0;
  list-style: none;
}
.place-list li { break-inside: avoid; border-bottom: 1px solid var(--hairline); }
.page .place-list li + li { margin-top: 0; }
.place-list a { display: flex; align-items: center; min-height: 44px; text-decoration: none; }
.place-list a:hover { text-decoration: underline; }
@media (min-width: 600px) { .place-list { columns: 2; } }
@media (min-width: 900px) { .place-list { columns: 3; } }

.page .place-hours,
.page .place-models {
  padding: 0;
}

.place-times + p {
  margin-top: 16px;
}

.climate-index__cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.climate-index__cards a {
  display: grid;
  gap: 3px;
  min-height: 64px;
  align-content: center;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--card-shadow);
  text-decoration: none;
}
.climate-index__cards a:hover strong { text-decoration: underline; }
.climate-index__cards a:active { opacity: .85; }
@media (prefers-reduced-motion: no-preference) {
  .climate-index__cards a { transition: box-shadow var(--dur-press) var(--ease), opacity var(--dur-press) var(--ease); }
}
.climate-index__cards span { color: var(--ink-2); font-size: 15px; }

/* Phones: the climate month table becomes one card per month (every value stays, labelled); the city comparison only needs fewer pixels. */
table.compact { min-width: 0; }
@media (max-width: 480px) {
  table.stack { min-width: 0; }
  table.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  table.stack tr { display: block; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
  table.stack th, table.stack td { display: block; min-width: 0; padding: 2px 0; border: 0; background: none; }
  table.stack th { margin-bottom: 4px; font-size: 18px; }
  table.stack td::before { content: attr(data-label) ": "; color: var(--ink-2); }
  table.stack .source-note { display: inline; }
  table.compact th, table.compact td { padding: 8px 6px; }
  table.compact th:first-child, table.compact td:first-child { min-width: 0; }
}
