:root {
  color-scheme: light;
  font-family: "Yu Gothic UI", "Hiragino Sans", system-ui, sans-serif;
  color: #192b36;
  background: #edf4f6;
  line-height: 1.65;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
main { max-width: 64rem; margin: auto; padding: 3.5rem 1.5rem; }
header { margin-bottom: 2rem; }
.context { color: #246452; font-weight: 700; margin: 0 0 .5rem; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.2; margin: 0; letter-spacing: -.04em; }
.mobile-break { display: none; }
.lead { color: #405965; margin: 1rem 0 0; }
.panel { background: #fff; border: 1px solid #c9dce1; border-radius: 1rem; margin-bottom: 1rem; padding: 1.4rem; }
h2 { font-size: 1.35rem; margin: 0 0 1rem; }
.inputs, .metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.field { background: #f4f8f9; border-radius: .65rem; padding: 1rem; }
label, summary { font-weight: 700; }
.field p, .actions p, .muted { color: #405965; font-size: .9rem; }
.field p { margin: .2rem 0 .8rem; }
input { display: block; width: 100%; font: inherit; font-size: .875rem; }
input::file-selector-button { border: 1px solid #a0bac0; border-radius: .4rem; background: white; color: #192b36; padding: .4rem .6rem; margin-right: .5rem; cursor: pointer; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1rem; margin-top: 1rem; }
.actions p { margin: .3rem 0; }
button { background: #17604e; border: 0; border-radius: .5rem; color: white; cursor: pointer; font: inherit; font-weight: 700; padding: .6rem 1.2rem; }
button:hover { background: #0b4b3a; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #1d64a0; outline-offset: 3px; }
#status { margin: .7rem 0 0; }
#status:empty { display: none; }
#status.error { color: #a52326; font-weight: 650; }
.metrics { margin: 0; }
.metrics div { border-radius: .65rem; background: #edf6f8; padding: .8rem 1rem; }
.metrics dd { font-size: 1.65rem; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.metrics small { font-size: .875rem; font-weight: 500; }
figure { margin: 1.3rem 0 0; }
figcaption { font-weight: 700; margin-bottom: .3rem; }
canvas { display: block; width: 100%; height: 18rem; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; padding: 0; margin: .5rem 0; list-style: none; }
.legend li { display: flex; align-items: center; gap: .4rem; }
.legend li::before { content: ""; width: 1.1rem; border-top: 3px solid #253847; }
.legend .baseline::before { border-top: 3px dashed #aa520c; }
.legend .weather::before { border-color: #007b71; }
.sources summary { cursor: pointer; }
.sources li + li { margin-top: .6rem; }
.sources p { margin-bottom: 0; }
a { color: #135968; }

@media (max-width: 40rem) {
  main { padding: 2rem .85rem; }
  .panel { padding: 1rem; }
  .inputs { grid-template-columns: 1fr; }
  .mobile-break { display: initial; }
  canvas { height: 15rem; }
}
