:root {
  font:
    16px/1.55 "Atkinson Hyperlegible Next",
    system-ui,
    sans-serif;
  color: #183c35;
  background: #f6f7ef;
  --teal: #08756b;
  --muted: #465c55;
  --line: #c9d2c7;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
a {
  color: #125f51;
  text-underline-offset: 0.18em;
}
a:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #a44421;
  outline-offset: 3px;
}
header,
main,
footer {
  width: min(1100px, calc(100% - 48px));
  margin: auto;
}
header,
footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
header a,
footer a {
  font-size: 0.93rem;
}
main {
  padding: 34px 0;
}
h1,
h2,
h3,
p {
  margin: 0 0 12px;
}
h1 {
  font:
    700 clamp(3.35rem, 8vw, 6.8rem) / 1.03 Georgia,
    serif;
  letter-spacing: -0.07em;
}
.intro {
  font-size: 1.17rem;
  max-width: 730px;
  color: var(--muted);
  margin: 15px 0 26px;
}
.controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  background: #e7ece1;
  border-block: 1px solid var(--line);
  padding: 16px 18px;
}
label {
  display: grid;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
}
select {
  font: inherit;
  font-size: 0.94rem;
  width: 100%;
  min-height: 42px;
  background: #fff;
  color: #173c34;
  border: 1px solid #92a399;
  border-radius: 4px;
  padding: 7px 6px;
}
#status,
#station-note,
#peaks,
#retrieved,
#sources,
.methods p {
  color: var(--muted);
}
#status {
  margin: 8px 0 24px;
  font-size: 0.86rem;
}
h2 {
  font:
    600 clamp(1.4rem, 3vw, 2rem) / 1.25 Georgia,
    serif;
  letter-spacing: -0.035em;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-block: 1px solid var(--line);
  margin: 18px 0 22px;
  padding-block: 10px;
}
.metrics div {
  padding: 6px 15px;
  border-left: 1px solid var(--line);
}
.metrics div:first-child {
  border: 0;
  padding-left: 0;
}
.metrics span,
.metrics strong {
  display: block;
}
.metrics span {
  font-size: 0.78rem;
  color: var(--muted);
}
.metrics strong {
  font-size: clamp(1.05rem, 2.2vw, 1.55rem);
  font-variant-numeric: tabular-nums;
}
.chart-heading,
.legend {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.chart-heading h3 {
  margin: 0;
}
h3 {
  font-size: 1.1rem;
}
.legend,
.methods p,
#peaks {
  font-size: 0.92rem;
}
.dot::before {
  content: "";
  display: inline-block;
  width: 20px;
  vertical-align: middle;
  border-top: 3px solid var(--teal);
  margin-right: 6px;
}
.dot.model::before {
  border-top: 3px dashed #ab5126;
}
canvas {
  width: 100%;
  height: 245px;
  display: block;
  background: #fcfdf7;
  margin: 8px 0;
}
.table-scroll {
  max-height: 340px;
  overflow: auto;
  border: 1px solid var(--line);
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  background: #fcfdf7;
}
th,
td {
  padding: 7px 9px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  position: sticky;
  top: 0;
  background: #e7ece1;
}
summary {
  cursor: pointer;
  font-weight: 650;
  padding-block: 10px;
}
.methods {
  border-top: 1px solid var(--line);
  margin-top: 25px;
  padding-top: 18px;
  max-width: 88ch;
}
.methods h2 {
  font-size: 1.4rem;
}
.skip {
  position: absolute;
  left: -999em;
}
.skip:focus {
  left: 1em;
  top: 1em;
  background: #fff;
  padding: 0.4em;
}
footer {
  border-block: 1px solid var(--line);
}
[hidden] {
  display: none !important;
}
@media (max-width: 760px) {
  .controls,
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .metrics div:nth-child(3) {
    border: 0;
    padding-left: 0;
  }
  .chart-heading {
    gap: 5px;
  }
}
@media (max-width: 470px) {
  header,
  main,
  footer {
    width: calc(100% - 30px);
  }
  header,
  footer {
    padding: 12px 0;
  }
  main {
    padding-top: 24px;
  }
  .controls {
    gap: 10px;
    padding: 10px;
  }
  .chart-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .legend {
    gap: 10px;
  }
  canvas {
    height: 200px;
  }
}

.ow-credit::before {
  content: "";
  background: url("./openweather-logo.png") left center / contain no-repeat;
  display: inline-block;
  width: 6rem;
  height: 2.6rem;
  margin-right: 0.55rem;
  vertical-align: middle;
}

.analysis {background:#edf3e8;border-inline-start:4px solid var(--teal);padding:1rem 1.25rem;margin:1.2rem 0 1.5rem}
.analysis select {max-width:10rem;margin:.3rem 0 .7rem}
.analysis p:last-child {font-size:.85rem;color:var(--muted);margin:0}

.global-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:1rem}.global-fields fieldset{border:1px solid #b8c6c0;border-radius:8px;padding:1rem}.global-fields label,#observation-form label{display:grid;gap:.3rem;margin:.7rem 0}.global-fields input{font:inherit;padding:.6rem;min-width:0;width:100%;box-sizing:border-box}#broader form{margin:1.2rem 0}#broader button{font:inherit;padding:.65rem 1rem}#broader-result svg{width:100%;height:auto;max-height:330px;background:#fff}#broader-result{overflow-wrap:anywhere}
