.station-map {
  --ink: #17221c;
  --muted: #66736b;
  --line: #dce3de;
  --paper: #f6f7f2;
  --green: #1f5941;
  max-width: 1440px;
  margin: 0;
  color: var(--ink);
}

.station-map__breadcrumbs {
  display: flex;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 2.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.station-map__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(16rem, 0.75fr);
  column-gap: 4rem;
  align-items: end;
  margin-bottom: 2rem;
}

.station-map__eyebrow {
  grid-column: 1 / -1;
  margin: 0 0 0.5rem;
  color: #b34d2f;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.station-map__intro h1 {
  margin: 0;
  max-width: 820px;
  font-size: 2.75rem;
  font-weight: 520;
  line-height: 1.1;
}

.station-map__lede {
  margin: 0 0 0.35rem;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
}

.station-map__explorer {
  border: 1px solid var(--line);
  overflow: hidden;
  background: #fff;
}

.station-map__toolbar {
  display: grid;
  grid-template-columns: minmax(18rem, 1fr) minmax(14rem, 0.55fr) auto;
  gap: 1rem;
  align-items: end;
  padding: 1rem;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.station-map__search-field,
.station-map__region-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.station-map__field-label {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.station-map__input-wrap {
  position: relative;
}

.station-map__search-icon {
  position: absolute;
  top: 50%;
  left: 0.85rem;
  color: var(--muted);
  font-size: 1.2rem;
  transform: translateY(-52%);
}

.station-map__toolbar input,
.station-map__toolbar select {
  width: 100%;
  height: 2.75rem;
  border: 1px solid #cbd4ce;
  border-radius: 4px;
  background: #fbfcfa;
  color: var(--ink);
  font: inherit;
}

.station-map__toolbar input {
  padding: 0 0.85rem 0 2.5rem;
}

.station-map__toolbar select {
  padding: 0 2.3rem 0 0.85rem;
}

.station-map__toolbar input:focus,
.station-map__toolbar select:focus {
  outline: 3px solid rgba(49, 121, 86, 0.18);
  border-color: var(--green);
}

.station-map__result-count {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  height: 2.75rem;
  padding: 0 0.45rem;
  white-space: nowrap;
}

.station-map__result-count strong {
  font-size: 1.45rem;
  font-weight: 540;
}

.station-map__result-count span {
  color: var(--muted);
  font-size: 0.8rem;
}

.station-map__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  height: min(68vh, 720px);
  min-height: 540px;
}

.station-map__map-panel {
  position: relative;
  min-width: 0;
  background: #dfe9e2;
}

.station-map__map {
  width: 100%;
  height: 100%;
  z-index: 0;
  font-family: inherit;
}

.station-map__marker {
  display: block;
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--station-color);
  box-shadow: 0 1px 3px rgba(15, 28, 20, 0.3);
}

.station-map__marker--selected {
  width: 24px;
  height: 24px;
  border-width: 4px;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.6), 0 2px 6px rgba(15, 28, 20, 0.4);
}

.station-map__legend {
  position: absolute;
  z-index: 500;
  left: 1rem;
  bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.75rem;
  max-width: calc(100% - 5.5rem);
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.station-map__legend span {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: #435048;
  font-size: 0.67rem;
}

.station-map__legend i,
.station-map__station-row i {
  flex: 0 0 auto;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
}

.station-map__sidebar {
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: #fbfcfa;
}

.station-map__selection-card {
  position: relative;
  padding: 1.4rem;
  border-bottom: 1px solid var(--line);
  background: var(--green);
  color: #fff;
}

.station-map__close-button {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
}

.station-map__card-label {
  margin: 0 0 0.7rem;
  color: #bcd7c9;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.station-map__selection-card h2 {
  margin: 0;
  padding-right: 2rem;
  font-size: 1.35rem;
  font-weight: 560;
  line-height: 1.2;
}

.station-map__station-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.3rem 0 0;
}

.station-map__station-facts dt {
  color: #a9c8b8;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.station-map__station-facts dd {
  margin: 0.18rem 0 0;
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.station-map__history-link {
  display: inline-block;
  margin-top: 1.25rem;
  color: #fff;
  font-size: 0.82rem;
  font-weight: 650;
  text-underline-offset: 0.2rem;
}

.station-map__station-list-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.1rem 0.75rem;
  background: #fbfcfa;
  border-bottom: 1px solid var(--line);
}

.station-map__station-list-header h2 {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.station-map__station-list-header button {
  border: 0;
  background: transparent;
  color: var(--green);
  cursor: pointer;
  font: inherit;
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 0.2rem;
}

.station-map__station-list {
  padding: 0 0.65rem 0.65rem;
}

.station-map__station-row[hidden] {
  display: none;
}

.station-map__station-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.7rem;
  align-items: center;
  width: 100%;
  padding: 0.75rem 0.55rem;
  border: 0;
  border-bottom: 1px solid #e8ece9;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.station-map__station-row:hover,
.station-map__station-row--selected {
  background: #eef3ef;
}

.station-map__station-row strong,
.station-map__station-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.station-map__station-row strong {
  font-size: 0.82rem;
  font-weight: 580;
}

.station-map__station-row small {
  margin-top: 0.18rem;
  color: var(--muted);
  font-size: 0.7rem;
}

.station-map__station-row b {
  color: #93a198;
  font-size: 1.15rem;
  font-weight: 400;
}

.station-map__empty-state[hidden] {
  display: none;
}

.station-map__empty-state {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 2.5rem 1rem;
  color: var(--muted);
  text-align: center;
}

.station-map__empty-state strong {
  color: var(--ink);
}

.station-map__coordinate-note,
.station-map__source {
  color: var(--muted);
  font-size: 0.75rem;
}

.station-map__coordinate-note {
  margin: 0;
  padding: 0.65rem 1rem;
  border-top: 1px solid var(--line);
}

.station-map__source {
  margin: 1rem 0 3rem;
}

@media (max-width: 900px) {
  .station-map__intro {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .station-map__lede {
    max-width: 40rem;
  }

  .station-map__workspace {
    grid-template-columns: 1fr;
    height: auto;
  }

  .station-map__map-panel {
    height: 58vh;
    min-height: 430px;
  }

  .station-map__sidebar {
    max-height: 480px;
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .station-map__breadcrumbs {
    margin-bottom: 1.5rem;
  }

  .station-map__intro h1 {
    font-size: 2.6rem;
  }

  .station-map__toolbar {
    grid-template-columns: 1fr 1fr;
  }

  .station-map__search-field {
    grid-column: 1 / -1;
  }

  .station-map__result-count {
    justify-content: flex-end;
  }

  .station-map__map-panel {
    height: 54vh;
    min-height: 390px;
  }

  .station-map__legend {
    display: none;
  }
}
