/* Widok "Archiwum" — lista stacji + wykres szeregu czasowego. Reguły
   wspólne (tokeny, reset, nagłówek) są w base.css, mapa w map.css. */

/* ---- Układ --------------------------------------------------------- */
.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: calc(100vh - 60px);
}
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  aside { border-right: none !important; border-bottom: 1px solid var(--line); }
}

aside {
  border-right: 1px solid var(--line);
  padding: 14px;
  overflow-y: auto;
  max-height: calc(100vh - 60px);
}
aside .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 4px 6px 12px;
}

.station {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 4px;
  color: var(--fg);
  cursor: pointer;
  transition: background var(--dur) ease, border-color var(--dur) ease;
}
.station:hover { background: var(--panel); }
.station.active { background: var(--panel-2); border-color: var(--line); }
.station:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.station .name { font-size: 14px; font-weight: 500; }
.station .meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  display: flex;
  gap: 10px;
}
.station .code { color: var(--accent); }

/* ---- Panel główny -------------------------------------------------- */
main { padding: 20px 24px; min-width: 0; }

.controls {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.segmented {
  display: inline-flex;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  /* Na wąskich ekranach 6 przycisków metryk nie mieści się w jednym
     rzędzie — przewijanie w poziomie zamiast obcinania (overflow:hidden
     czyniło "Kierunek"/"Opad" niewidoczne I nieklikalne na telefonach). */
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}
.segmented button {
  background: var(--panel);
  border: none;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 12px;
  cursor: pointer;
  border-right: 1px solid var(--line);
  transition: color var(--dur) ease, background var(--dur) ease;
  flex: none;
}
.segmented button:last-child { border-right: none; }
.segmented button:hover { color: var(--fg); }
.segmented button.active { background: var(--panel-2); color: var(--warm); }
.segmented button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

.range { margin-left: auto; font-family: var(--mono); font-size: 12px; color: var(--muted); }
.range input {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--fg);
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 8px;
  border-radius: 6px;
}

.readout {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
  height: 20px;
  margin-bottom: 6px;
}
.readout b { color: var(--fg); font-weight: 600; }
.readout .val { color: var(--warm); }

.plot-wrap {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
}
canvas { display: block; width: 100%; height: 420px; }

.empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  padding: 24px;
}
.empty code {
  color: var(--accent);
  background: var(--panel-2);
  padding: 2px 6px;
  border-radius: 4px;
}
