:root {
  --ink: #14201c;
  --muted: #64706b;
  --paper: #f2f5f0;
  --surface: #fbfcf9;
  --line: #d8ded8;
  --lime: #d9ef5a;
  --deep: #163f37;
  --imo: #286cbd;
  --met: #087d73;
  --ecmwf: #6c54b5;
  --gfs: #d56a31;
  --icon: #638415;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Avenir Next", Avenir, "Helvetica Neue", Arial, ui-sans-serif, system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 8% 2%, rgba(217, 239, 90, 0.2), transparent 24rem),
    var(--paper);
}

button,
a {
  font: inherit;
}

button:focus-visible,
a:focus-visible,
.station-search input:focus-visible,
.table-scroll:focus-visible,
.profile-dialog input:focus-visible {
  outline: 3px solid rgba(22, 63, 55, 0.3);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.page-shell {
  width: min(1480px, 100%);
  margin: 0 auto;
  padding: 0 30px;
}

.site-header {
  min-height: 84px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.9rem;
}

.brand-mark {
  width: 37px;
  height: 27px;
  display: flex;
  align-items: end;
  gap: 3px;
  padding: 5px;
  border-radius: 50%;
  background: var(--deep);
  transform: rotate(-7deg);
}

.brand-mark i {
  display: block;
  width: 7px;
  border-radius: 4px;
  background: var(--lime);
}

.brand-mark i:nth-child(1) { height: 7px; }
.brand-mark i:nth-child(2) { height: 16px; }
.brand-mark i:nth-child(3) { height: 11px; }

.brand-note,
.clock {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.brand-note {
  letter-spacing: 0.04em;
}

.clock {
  font-family: var(--mono);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 14px;
}

.login-button,
.profile-button {
  min-height: 38px;
  border: 1px solid var(--deep);
  border-radius: 999px;
  background: transparent;
  color: var(--deep);
  cursor: pointer;
  font-size: 0.69rem;
  font-weight: 700;
  text-decoration: none;
}

.login-button {
  display: inline-flex;
  align-items: center;
  padding: 0 15px;
}

.login-button:hover,
.profile-button:hover {
  background: var(--deep);
  color: white;
}

.login-button.disabled {
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
  pointer-events: none;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 13px 4px 5px;
}

.profile-avatar {
  display: grid;
  width: 28px;
  height: 28px;
  overflow: hidden;
  place-items: center;
  border-radius: 50%;
  background: var(--deep);
  color: var(--lime);
  font-size: 0.68rem;
}

.profile-button:hover .profile-avatar {
  background: var(--lime);
  color: var(--deep);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.place-nav {
  min-height: 70px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  border-bottom: 1px solid var(--line);
}

.view-switch {
  display: flex;
  flex: 0 0 auto;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.5);
}

.view-switch button {
  min-width: 54px;
  padding: 7px 10px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.68rem;
  font-weight: 700;
}

.view-switch button.active {
  background: var(--deep);
  color: white;
}

.place-list {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.place-list::-webkit-scrollbar {
  display: none;
}

.favorites-empty {
  align-self: center;
  color: var(--muted);
  font-size: 0.68rem;
}

.place-button {
  flex: 0 0 auto;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 600;
  transition: 160ms ease;
}

.place-button:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.6);
}

.place-button.active {
  color: white;
  background: var(--deep);
}

.station-search {
  position: relative;
  z-index: 20;
  flex: 0 0 260px;
}

.station-search-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--muted);
}

.station-search-control:focus-within {
  border-color: var(--deep);
  background: white;
}

.station-search-control input {
  width: 100%;
  min-width: 0;
  padding: 9px 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.76rem;
}

.station-search-control input::placeholder {
  color: #89928e;
}

.station-search-results {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  width: min(390px, calc(100vw - 28px));
  max-height: 360px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: 0 18px 45px rgba(20, 32, 28, 0.16);
}

.station-result {
  display: grid;
  width: 100%;
  grid-template-columns: 1fr auto;
  gap: 5px 14px;
  padding: 11px 12px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.station-result:hover,
.station-result.active {
  background: rgba(217, 239, 90, 0.28);
}

.station-result-name {
  overflow: hidden;
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-result-id,
.station-result-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.58rem;
}

.station-result-meta {
  grid-column: 1 / -1;
}

.station-search-empty {
  margin: 0;
  padding: 17px 12px;
  color: var(--muted);
  font-size: 0.72rem;
}

.empty-view {
  min-height: 66vh;
  padding: clamp(70px, 12vh, 145px) 0 80px;
}

.empty-view h1 {
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7rem);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.empty-view > p:not(.section-kicker) {
  max-width: 590px;
  margin: 27px 0 30px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.empty-view button,
.settings-save {
  padding: 12px 17px;
  border: 1px solid var(--deep);
  border-radius: 4px;
  background: var(--deep);
  color: white;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 700;
}

.empty-view button:hover,
.settings-save:hover {
  background: transparent;
  color: var(--deep);
}

.map-view {
  padding: 46px 0 34px;
  border-bottom: 1px solid var(--line);
}

.map-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 21px;
}

.map-heading h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4.5vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.map-heading .section-kicker {
  margin-bottom: 9px;
}

#map-status {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
  text-align: right;
}

.map-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #dce6e3;
}

.station-map {
  width: 100%;
  height: clamp(480px, 66vh, 760px);
  z-index: 1;
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(242, 245, 240, 0.88);
  color: var(--muted);
  font-size: 0.78rem;
}

.map-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 2px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.59rem;
}

.map-legend span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.map-legend i {
  width: 9px;
  height: 9px;
  border: 1px solid white;
  border-radius: 50%;
  background: #d74335;
  box-shadow: 0 0 0 1px rgba(20, 32, 28, 0.25);
}

.leaflet-container {
  background: #dce6e3;
  font-family: var(--sans);
}

.station-marker-dot {
  border: 1.5px solid white;
  border-radius: 50%;
  background: #d74335;
  box-shadow: 0 0 0 1px rgba(20, 32, 28, 0.18);
  transition: box-shadow 120ms ease, opacity 120ms ease;
}

.station-marker-dot.no-observation {
  opacity: 0.48;
}

.station-marker-dot:hover,
.station-marker-dot:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(215, 67, 53, 0.28), 0 0 0 1px var(--deep);
}

.station-marker-dot.selected {
  border-width: 3px;
  border-color: var(--deep);
  box-shadow: 0 0 0 3px rgba(215, 67, 53, 0.32);
  opacity: 1;
}

.leaflet-control-attribution {
  font-size: 9px;
}

.leaflet-tooltip.station-map-tooltip {
  min-width: 220px;
  padding: 0;
  border: 1px solid var(--deep);
  border-radius: 4px;
  background: var(--deep);
  color: white;
  box-shadow: 0 12px 30px rgba(20, 32, 28, 0.2);
}

.leaflet-tooltip-top.station-map-tooltip::before {
  border-top-color: var(--deep);
}

.station-tooltip {
  display: grid;
  gap: 9px;
  padding: 13px 14px;
}

.station-tooltip strong {
  max-width: 260px;
  overflow: hidden;
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-tooltip-time,
.station-tooltip-empty {
  color: rgba(255, 255, 255, 0.64);
  font-family: var(--mono);
  font-size: 0.57rem;
}

.station-tooltip-values {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  font-family: var(--mono);
  font-size: 0.6rem;
}

.station-tooltip-values span {
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 410px);
  align-items: end;
  gap: clamp(34px, 6vw, 90px);
  padding: 64px 0 36px;
}

.hero-copy {
  min-width: 0;
}

.hero-side {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #4c9f39;
  box-shadow: 0 0 0 5px rgba(76, 159, 57, 0.12);
}

.hero h1 {
  margin: 0;
  max-width: 850px;
  font-size: clamp(3.5rem, 8vw, 7.7rem);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.place-meta {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.74rem;
}

.place-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 13px 18px;
  margin-top: 25px;
}

.favorite-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.65rem;
  font-weight: 700;
}

.favorite-button:hover,
.favorite-button[aria-pressed="true"] {
  border-color: var(--deep);
  color: var(--deep);
}

.favorite-button[aria-pressed="true"] span {
  color: #c18a00;
}

.current-observation {
  min-width: 0;
  min-height: 226px;
  padding: 20px 21px 17px;
  border: 1px solid var(--deep);
  border-radius: 4px;
  background: var(--deep);
  color: white;
}

.current-observation-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.current-observation-head p,
.current-observation-head time,
.current-source,
.current-temperature,
.current-empty,
.current-metrics {
  margin: 0;
}

.current-observation-head p {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.current-observation-head p span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 4px rgba(217, 239, 90, 0.13);
}

.current-observation-head time {
  color: rgba(255, 255, 255, 0.68);
  font-family: var(--mono);
  font-size: 0.57rem;
}

.current-observation-body {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 27px;
  min-height: 119px;
}

.current-temperature {
  color: var(--lime);
  font-family: var(--mono);
  font-size: clamp(3.1rem, 5vw, 4.35rem);
  font-weight: 500;
  letter-spacing: -0.09em;
  line-height: 1;
}

.current-metrics {
  display: grid;
  gap: 8px;
}

.current-metrics div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 15px;
}

.current-metrics dt {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.62rem;
}

.current-metrics dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.67rem;
  white-space: nowrap;
}

.current-source {
  overflow: hidden;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--mono);
  font-size: 0.58rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.current-empty {
  display: grid;
  min-height: 119px;
  place-items: center start;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
}

.current-observation.loading .current-observation-head p span {
  animation: pulse 1.1s ease infinite;
}

.current-observation.missing {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.35);
  color: var(--ink);
}

.current-observation.missing .current-observation-head {
  border-bottom-color: var(--line);
}

.current-observation.missing .current-observation-head p span {
  background: var(--muted);
  box-shadow: none;
}

.current-observation.missing .current-observation-head time,
.current-observation.missing .current-empty,
.current-observation.missing .current-source {
  color: var(--muted);
}

.refresh-button {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  padding: 13px 18px;
  border: 1px solid var(--deep);
  border-radius: 4px;
  background: transparent;
  color: var(--deep);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
}

.hero-side .refresh-button {
  width: 100%;
  justify-content: center;
}

.refresh-button:hover {
  background: var(--deep);
  color: white;
}

.refresh-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.refresh-button.busy .refresh-icon {
  animation: spin 850ms linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.model-overview {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.35);
}

.model-card {
  min-height: 94px;
  padding: 17px 18px 15px;
  border-right: 1px solid var(--line);
}

.model-card:last-child { border-right: 0; }

.model-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.model-swatch {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--model-color, var(--muted));
}

.model-card h3 {
  margin: 0;
  font-size: 0.79rem;
  font-weight: 700;
}

.model-card p {
  margin: 11px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
  line-height: 1.5;
}

.model-card.missing {
  opacity: 0.55;
}

.forecast-section {
  padding: 86px 0 24px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.section-heading h2,
.method-note h2 {
  margin: 0;
  font-size: clamp(1.75rem, 3.2vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.055em;
}

.section-kicker {
  margin-bottom: 8px;
}

.horizon-control {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px;
  background: rgba(255, 255, 255, 0.5);
}

.horizon-control button {
  padding: 8px 12px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 700;
}

.horizon-control button.active {
  background: var(--deep);
  color: white;
}

.notice {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--surface);
  font-size: 0.8rem;
}

.notice.error {
  color: #81391f;
  background: #fff5ec;
  border-color: #eccab9;
}

.loading-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--deep);
  animation: pulse 1.1s ease infinite;
}

@keyframes pulse {
  50% { transform: scale(1.7); opacity: 0.45; }
}

.table-frame {
  border: 1px solid var(--line);
  background: var(--surface);
}

.table-scroll {
  overflow: auto;
  max-height: 680px;
  scrollbar-color: #aeb8b2 transparent;
}

.forecast-table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.forecast-table th,
.forecast-table td {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.forecast-table th:last-child,
.forecast-table td:last-child { border-right: 0; }
.forecast-table tbody tr:last-child td { border-bottom: 0; }

.forecast-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 82px;
  padding: 14px 14px;
  background: #f8faf6;
  box-shadow: inset 0 3px 0 var(--model-color, transparent);
}

.forecast-table thead th:first-child {
  left: 0;
  z-index: 5;
  width: 116px;
  box-shadow: none;
}

.forecast-table th .model-name {
  display: block;
  font-size: 0.78rem;
  line-height: 1.25;
}

.forecast-table th .model-meta {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.57rem;
  font-weight: 400;
  line-height: 1.35;
}

.forecast-table tbody td {
  height: 104px;
  padding: 14px;
  background: white;
}

.forecast-table tbody tr:hover td {
  background: #fbfdf7;
}

.forecast-table .time-cell {
  position: sticky;
  left: 0;
  z-index: 2;
  width: 116px;
  background: #f8faf6;
  vertical-align: middle;
}

.time-day {
  display: block;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.time-hour {
  display: block;
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
}

.temperature {
  margin-bottom: 9px;
  font-family: var(--mono);
  font-size: 1.26rem;
  font-weight: 500;
  letter-spacing: -0.06em;
}

.metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.25;
}

.metrics span {
  white-space: nowrap;
}

.metric-symbol {
  display: inline-block;
  width: 15px;
  color: var(--model-color, var(--muted));
  font-family: var(--sans);
  font-weight: 700;
}

.no-data {
  display: grid;
  height: 100%;
  place-items: center;
  color: #a7b0ab;
  font-family: var(--mono);
}

.table-hint {
  margin: 0;
  padding: 12px 15px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.59rem;
}

.method-note {
  display: grid;
  grid-template-columns: 120px minmax(0, 650px);
  gap: 28px;
  margin: 80px 0 90px;
  padding-top: 28px;
  border-top: 1px solid var(--ink);
}

.note-number {
  font-family: var(--mono);
  font-size: 0.72rem;
}

.method-note p {
  max-width: 600px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.75;
}

.profile-dialog {
  width: min(680px, calc(100vw - 28px));
  max-height: min(820px, calc(100vh - 28px));
  padding: 0;
  overflow: auto;
  border: 1px solid var(--deep);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(20, 32, 28, 0.28);
}

.profile-dialog::backdrop {
  background: rgba(20, 32, 28, 0.53);
  backdrop-filter: blur(3px);
}

.profile-dialog-inner {
  padding: 30px;
}

.profile-dialog-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 25px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--line);
}

.profile-dialog-head h2 {
  margin: 0;
  font-size: 2.1rem;
  font-weight: 500;
  letter-spacing: -0.055em;
}

#profile-email {
  margin: 9px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.64rem;
}

.dialog-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.dialog-close:hover {
  border-color: var(--deep);
  background: var(--deep);
  color: white;
}

.settings-section {
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.settings-heading h3 {
  margin: 0;
  font-size: 0.96rem;
}

.settings-heading p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.settings-favorites {
  display: grid;
  gap: 7px;
  margin-top: 17px;
}

.settings-favorite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 0.75rem;
}

.settings-favorite button {
  padding: 5px 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.65rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.settings-favorite button:hover {
  color: #8a3323;
}

.provider-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.provider-options label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.72rem;
}

.provider-options label:hover {
  border-color: #aeb9b2;
}

.provider-options input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--deep);
}

.settings-save:disabled {
  cursor: wait;
  opacity: 0.55;
}

.settings-status {
  display: inline-block;
  margin: 0 0 0 10px;
  color: var(--muted);
  font-size: 0.67rem;
}

.logout-button {
  margin-top: 24px;
  padding: 9px 0;
  border: 0;
  background: transparent;
  color: #81391f;
  cursor: pointer;
  font-size: 0.7rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

footer {
  min-height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.68rem;
}

footer p { margin: 0; }
footer div { display: flex; gap: 18px; }
footer a { color: inherit; text-underline-offset: 3px; }
footer a:hover { color: var(--ink); }

[hidden] { display: none !important; }

@media (max-width: 900px) {
  .page-shell { padding: 0 20px; }
  .site-header { grid-template-columns: 1fr 1fr; }
  .brand-note { display: none; }
  .station-search { flex-basis: 210px; }
  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 350px);
    align-items: end;
    gap: 30px;
    padding-top: 48px;
  }
  .hero h1 { font-size: clamp(3.2rem, 8.5vw, 5rem); }
  .model-overview {
    grid-template-columns: repeat(5, 205px);
    overflow-x: auto;
  }
  .model-card { border-bottom: 0; }
}

@media (max-width: 650px) {
  .page-shell { padding: 0 14px; }
  .site-header { min-height: 72px; }
  .clock { display: none; }
  .login-button { padding-inline: 11px; font-size: 0.62rem; }
  .profile-button #profile-name { display: none; }
  .profile-button { padding-right: 5px; }
  .place-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    min-height: 112px;
    gap: 9px;
    padding: 10px 0 12px;
  }
  .view-switch { grid-column: 1; }
  .place-list {
    grid-column: 2;
    margin-right: -14px;
    padding-right: 14px;
  }
  .station-search { grid-column: 1 / -1; width: 100%; }
  .station-search-results { right: 0; left: 0; width: 100%; }
  .map-view { padding-top: 34px; }
  .map-heading { display: block; }
  #map-status { margin-top: 12px; text-align: left; }
  .station-map { height: 530px; }
  .map-legend { display: grid; gap: 8px; }
  .hero {
    display: block;
    padding: 42px 0 28px;
  }
  .hero h1 { font-size: clamp(3.4rem, 18vw, 5.8rem); }
  .place-meta-row { margin-top: 19px; }
  .place-meta { line-height: 1.6; }
  .hero-side { margin-top: 28px; }
  .current-observation { padding-inline: 18px; }
  .current-observation-body {
    display: block;
    min-height: 0;
    padding: 20px 0 18px;
  }
  .current-temperature {
    margin-bottom: 18px;
    font-size: 3.4rem;
  }
  .current-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    min-width: 0;
  }
  .current-metrics div { display: block; }
  .current-metrics dt { font-size: 0.56rem; }
  .current-metrics dd {
    margin-top: 4px;
    font-size: 0.58rem;
    line-height: 1.35;
    white-space: normal;
  }
  .current-source { white-space: normal; }
  .refresh-button { width: 100%; justify-content: center; }
  .forecast-section { padding-top: 64px; }
  .section-heading { display: block; }
  .horizon-control { width: 100%; margin-top: 20px; }
  .horizon-control button { flex: 1; }
  .forecast-table { min-width: 970px; }
  .forecast-table thead th:first-child,
  .forecast-table .time-cell { width: 92px; }
  .method-note { grid-template-columns: 45px 1fr; margin: 60px 0; }
  footer { display: block; padding: 28px 0; }
  footer div { margin-top: 16px; flex-wrap: wrap; }
  .profile-dialog-inner { padding: 22px 18px; }
  .provider-options { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; }
}
