:root {
  --paper: #f4f1e9;
  --paper-light: #faf8f2;
  --ink: #111313;
  --muted: #5d5f5c;
  --rule: #222522;
  --soft-rule: #bdbbb2;
  --blue: #103f82;
  --blue-dark: #0b2f65;
  --rust: #a33113;
  --green: #176436;
  --gray: #7b7e7a;
  --content: 1480px;
  --sans: Inter, "Avenir Next", Avenir, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 150 150' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.09'/%3E%3C/svg%3E");
}

a {
  color: var(--blue);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--blue-dark);
}

button,
input {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--blue);
  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;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--ink);
  color: var(--paper-light);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header,
main,
.site-footer {
  width: min(calc(100% - 6rem), var(--content));
  margin-inline: auto;
}

.site-header {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
}

.wordmark {
  color: var(--ink);
  font-size: clamp(1.55rem, 2.2vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.desktop-nav {
  align-self: stretch;
  display: flex;
  align-items: stretch;
  gap: clamp(1.5rem, 3vw, 3rem);
}

.desktop-nav a {
  display: flex;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: var(--ink);
  font-size: 0.96rem;
  text-decoration: none;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  border-bottom-color: var(--blue);
  color: var(--blue);
}

.mobile-nav {
  display: none;
}

.location-band {
  position: relative;
  z-index: 4;
  min-height: 126px;
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) 1.15fr auto;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  border-bottom: 1px solid var(--rule);
}

.search-shell {
  position: relative;
}

.search-shell input {
  width: 100%;
  min-height: 53px;
  padding: 0.75rem 3.2rem;
  border: 1px solid var(--blue);
  border-radius: 2px;
  background: rgba(250, 248, 242, 0.72);
  font-size: 1rem;
}

.search-shell input:focus {
  box-shadow: 0 0 0 1px var(--blue);
  outline: none;
}

.search-icon {
  position: absolute;
  top: 17px;
  left: 17px;
  z-index: 1;
  width: 18px;
  height: 18px;
  border: 1.8px solid var(--ink);
  border-radius: 50%;
  pointer-events: none;
}

.search-icon::after {
  position: absolute;
  right: -6px;
  bottom: -4px;
  width: 8px;
  height: 1.8px;
  content: "";
  background: var(--ink);
  transform: rotate(48deg);
  transform-origin: left;
}

.clear-search {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 39px;
  height: 39px;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
}

.search-shell.has-value .clear-search {
  opacity: 1;
  pointer-events: auto;
}

.search-results {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  left: 0;
  z-index: 20;
  max-height: min(390px, 55vh);
  padding: 0;
  margin: 0;
  overflow-y: auto;
  border: 1px solid var(--rule);
  background: var(--paper-light);
  list-style: none;
  box-shadow: 0 10px 25px rgba(17, 19, 19, 0.09);
}

.search-results[hidden] {
  display: none;
}

.search-result {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border: 0;
  border-bottom: 1px solid var(--soft-rule);
  background: transparent;
  text-align: left;
}

.search-result:last-child {
  border-bottom: 0;
}

.search-result:hover,
.search-result.active {
  background: #ebe8e1;
}

.search-result::before {
  flex: none;
  width: 12px;
  height: 12px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  content: "";
}

.search-result strong {
  font-weight: 600;
}

.search-result span {
  color: var(--muted);
}

.search-message {
  padding: 1rem 1.1rem;
  color: var(--muted);
  font-family: var(--serif);
}

.location-copy h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 2vw, 2rem);
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.location-copy p,
.local-time {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.local-time {
  display: grid;
  justify-items: end;
  gap: 0.35rem;
}

.local-time strong {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 500;
}

.status-banner {
  display: flex;
  min-height: 42px;
  align-items: center;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--soft-rule);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.76rem;
}

.status-banner.error {
  color: #7d210c;
}

.status-banner:empty {
  display: none;
}

.retry-button {
  padding: 0.22rem 0;
  margin-left: 0.55rem;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: transparent;
  color: var(--blue);
  font: inherit;
}

.weather-report {
  display: grid;
  grid-template-columns: minmax(290px, 0.52fr) minmax(0, 1.48fr);
  border-bottom: 1px solid var(--rule);
}

.current-panel {
  min-width: 0;
  padding: clamp(1.7rem, 3vw, 3rem) clamp(1.5rem, 3vw, 3rem) 1.5rem 0.65rem;
  border-right: 1px solid var(--rule);
}

.temperature {
  margin: 0;
  font-size: clamp(5.5rem, 9vw, 9.5rem);
  font-weight: 500;
  letter-spacing: -0.09em;
  line-height: 0.78;
}

.temperature .unit {
  margin-left: 0.08em;
  font-size: 0.27em;
  font-weight: 500;
  letter-spacing: -0.04em;
  vertical-align: 0.2em;
}

.feels-like {
  margin: 1rem 0 0;
  font-family: var(--serif);
  font-size: 1.25rem;
}

.condition {
  margin: 1.45rem 0 0.85rem;
  font-family: var(--mono);
  font-size: 1rem;
}

.conditions-list {
  padding: 0.75rem 0;
  margin: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--soft-rule);
}

.conditions-list div {
  display: flex;
  min-height: 33px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.conditions-list dt,
.conditions-list dd {
  margin: 0;
}

.conditions-list dt {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.83rem;
}

.conditions-list dd {
  font-size: 0.95rem;
}

.metric-mark {
  display: inline-flex;
  width: 1.6rem;
  justify-content: center;
  color: var(--ink);
  font-size: 1.25rem;
}

.wind-mark {
  font-size: 1.5rem;
}

.current-source {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.69rem;
}

.forecast-panel {
  min-width: 0;
  padding-left: clamp(1.2rem, 2.8vw, 2.6rem);
}

.forecast-tabs {
  height: 51px;
  display: flex;
  align-items: stretch;
  gap: 1.3rem;
  border-bottom: 1px solid var(--rule);
}

.tab {
  padding: 0 0.75rem;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--ink);
}

.tab.active {
  border-bottom-color: var(--blue);
  color: var(--blue);
  font-weight: 700;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2,
.providers-panel h2,
.evidence-section h2,
.method-section h2 {
  margin: 0;
  font-size: 1.26rem;
  letter-spacing: -0.025em;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.forecast-heading {
  min-height: 66px;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  font-size: 0.76rem;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}

.line-key {
  width: 2.6rem;
  height: 2px;
  background: var(--blue);
}

.bar-key {
  width: 1.5rem;
  height: 0.72rem;
  background: var(--rust);
}

.hourly-chart {
  min-height: 245px;
  padding: 0.5rem 0 1rem;
  overflow: hidden;
}

.hourly-chart svg {
  width: 100%;
  height: auto;
  min-height: 230px;
  display: block;
  overflow: visible;
}

.chart-axis {
  stroke: #777974;
  stroke-width: 1;
}

.chart-grid {
  stroke: #d0cec5;
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.chart-line {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.2;
}

.chart-point {
  fill: var(--blue);
}

.chart-bar {
  fill: var(--rust);
}

.chart-label,
.chart-time,
.chart-rain {
  fill: var(--ink);
  font-family: var(--mono);
  font-size: 11px;
}

.chart-rain {
  fill: var(--rust);
  font-size: 9px;
}

#panel-daily {
  padding: 1.2rem 0 1.8rem;
}

.forecast-details {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(300px, 0.88fr);
  border-bottom: 1px solid var(--rule);
}

.outlook-panel {
  min-width: 0;
  padding: 1rem 2rem 0.6rem 0.2rem;
  border-right: 1px solid var(--rule);
}

.providers-panel {
  min-width: 0;
  padding: 1rem 0 0.6rem 2rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--mono);
  font-size: 0.71rem;
}

th,
td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px dotted var(--soft-rule);
  text-align: left;
  vertical-align: middle;
}

th {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--soft-rule);
  color: var(--muted);
  font-weight: 500;
}

th:last-child,
td:last-child {
  text-align: right;
}

.provider-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.5rem 1rem;
  align-items: center;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--rule);
}

.provider-row h3 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.provider-row h3 a {
  color: var(--ink);
  text-decoration: none;
}

.provider-row h3 a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.provider-row p,
.provider-state small {
  margin: 0.18rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.63rem;
}

.provider-state {
  min-width: 124px;
}

.provider-state strong {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  font-weight: 500;
}

.provider-state strong::before {
  width: 9px;
  height: 9px;
  flex: none;
  border-radius: 50%;
  background: var(--gray);
  content: "";
}

.provider-state.live strong::before {
  background: var(--green);
}

.provider-state.failed strong::before {
  background: var(--rust);
}

.cross-check {
  margin: 0.8rem 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.66rem;
}

.evidence-section {
  padding: 1.2rem 0 1.5rem;
  border-bottom: 1px solid var(--rule);
}

.evidence-heading {
  margin-bottom: 1rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: var(--rust);
  font-family: var(--mono);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.camera-status {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.7rem;
}

.camera-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}

.camera-card {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(180px, 1.1fr);
  border-top: 1px solid var(--rule);
}

.camera-copy {
  padding: 0.8rem 1rem 0.6rem 0;
}

.camera-copy h3 {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
}

.camera-copy p {
  margin: 0.25rem 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.62rem;
}

.camera-image {
  min-height: 154px;
  display: grid;
  place-items: center;
  margin-top: 0.75rem;
  overflow: hidden;
  border: 1px solid var(--soft-rule);
  background: #e6e3da;
}

.camera-image img {
  width: 100%;
  height: 100%;
  max-height: 220px;
  display: block;
  object-fit: contain;
}

.camera-empty {
  grid-column: 1 / -1;
  min-height: 134px;
  display: grid;
  place-content: center;
  padding: 1.5rem;
  border: 1px dashed var(--muted);
  text-align: center;
}

.camera-empty strong {
  font-size: 0.9rem;
}

.camera-empty p {
  max-width: 55ch;
  margin: 0.45rem auto 0;
  color: var(--muted);
  font-family: var(--serif);
  font-size: 0.85rem;
}

.method-section {
  display: grid;
  grid-template-columns: minmax(250px, 0.55fr) minmax(0, 1.45fr);
  gap: 3rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.method-section > p {
  max-width: 80ch;
  margin: 0;
  font-family: var(--serif);
  font-size: 1rem;
}

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  padding: 1.2rem 0 2.2rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.65rem;
}

.site-footer p {
  max-width: 86ch;
  margin: 0 0 0.35rem;
}

.noscript {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  z-index: 30;
  padding: 1rem;
  border: 1px solid var(--rust);
  background: var(--paper-light);
  text-align: center;
}

@media (max-width: 1080px) {
  .site-header,
  main,
  .site-footer {
    width: min(calc(100% - 3rem), var(--content));
  }

  .location-band {
    grid-template-columns: minmax(250px, 0.85fr) 1.15fr;
  }

  .local-time {
    display: none;
  }

  .weather-report {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .legend {
    gap: 0.8rem;
  }

  .camera-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  html {
    scroll-behavior: auto;
  }

  .site-header,
  main,
  .site-footer {
    width: min(calc(100% - 2rem), var(--content));
  }

  .site-header {
    min-height: 72px;
  }

  .wordmark {
    font-size: 2rem;
  }

  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    position: relative;
    display: block;
  }

  .mobile-nav summary {
    width: 45px;
    height: 45px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 7px;
    cursor: pointer;
    list-style: none;
  }

  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav summary span {
    height: 3px;
    display: block;
    background: var(--ink);
  }

  .mobile-nav nav {
    position: absolute;
    top: 51px;
    right: 0;
    z-index: 30;
    width: min(260px, calc(100vw - 2rem));
    display: grid;
    border: 1px solid var(--rule);
    background: var(--paper-light);
  }

  .mobile-nav nav a {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--soft-rule);
    color: var(--ink);
    text-decoration: none;
  }

  .location-band {
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    align-items: stretch;
    padding: 1.5rem 0 0;
  }

  .location-copy {
    order: -1;
    padding-inline: 0.25rem;
  }

  .location-copy h1 {
    font-size: 1.75rem;
  }

  .search-shell input {
    min-height: 58px;
    font-size: 1.05rem;
  }

  .search-results {
    max-height: 310px;
  }

  .status-banner {
    min-height: 40px;
  }

  .weather-report {
    display: block;
  }

  .current-panel {
    padding: 2.2rem 0.25rem 1.5rem;
    border-right: 0;
    border-bottom: 1px solid var(--rule);
  }

  .temperature {
    font-size: clamp(6rem, 31vw, 8.2rem);
  }

  .forecast-panel {
    padding: 0;
  }

  .forecast-tabs {
    height: 62px;
  }

  .forecast-heading {
    min-height: 92px;
    align-items: start;
    flex-direction: column;
    padding: 1.35rem 0 0.5rem;
  }

  .legend {
    width: 100%;
    justify-content: flex-end;
    gap: 1rem;
  }

  .line-key {
    width: 2rem;
  }

  .hourly-chart {
    min-height: 270px;
    padding-top: 1rem;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
  }

  .hourly-chart svg {
    width: 690px;
    min-height: 260px;
  }

  .forecast-details {
    display: block;
  }

  .outlook-panel {
    display: none;
  }

  .providers-panel {
    padding: 1.35rem 0;
  }

  .table-scroll {
    overflow-x: auto;
  }

  table {
    min-width: 590px;
  }

  .evidence-heading {
    align-items: start;
    flex-direction: column;
  }

  .camera-card {
    display: block;
  }

  .camera-image {
    min-height: 190px;
    margin-top: 0;
  }

  .method-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
}

@media (max-width: 430px) {
  .site-header,
  main,
  .site-footer {
    width: calc(100% - 1.75rem);
  }

  .status-banner {
    font-size: 0.66rem;
  }

  .temperature {
    font-size: 6.8rem;
  }

  .feels-like {
    font-size: 1.1rem;
  }

  .legend {
    justify-content: flex-start;
    font-size: 0.68rem;
  }

  .provider-row {
    grid-template-columns: minmax(0, 1fr) 112px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-contrast: more) {
  :root {
    --muted: #343634;
    --soft-rule: #6f716e;
  }
}
