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

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
  color: #f4f7f8;
  background: #041018;
  background-image:
    radial-gradient(ellipse 120% 80% at 100% 0%, rgba(20, 105, 184, 0.35), transparent 55%),
    radial-gradient(ellipse 90% 70% at 0% 100%, rgba(31, 107, 74, 0.22), transparent 50%),
    linear-gradient(165deg, #041018 0%, #071827 45%, #0a1520 100%);
}

.gateway-page {
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.gateway-shell {
  width: min(100%, 56rem);
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.gateway-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
  text-align: center;
}

.gateway-logo {
  display: block;
  width: min(100%, 18rem);
  height: auto;
  filter: drop-shadow(0 1px 0 #f4f7f8) drop-shadow(0 10px 28px rgba(4, 16, 24, 0.55));
}

.gateway-tagline {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(244, 247, 248, 0.72);
}

.gateway-panel {
  padding: 1.35rem 1.25rem 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(244, 247, 248, 0.14);
  background: rgba(4, 16, 24, 0.55);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 48px rgba(4, 16, 24, 0.45);
}

.gateway-title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #f4f7f8;
}

.gateway-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 1.15rem;
  align-items: stretch;
}

@media (max-width: 720px) {
  .gateway-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }
}

.gateway-map {
  margin: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.gateway-map__leaflet {
  flex: 1 1 auto;
  width: 100%;
  min-height: 16rem;
  border-radius: 14px;
  border: 1px solid rgba(244, 247, 248, 0.1);
  overflow: hidden;
  background: #071827;
}

@media (max-width: 720px) {
  .gateway-map__leaflet {
    height: min(52vh, 22rem);
    flex: none;
  }
}

.gateway-map__leaflet.leaflet-container {
  font-family: "Segoe UI", "Trebuchet MS", sans-serif;
}

.gateway-map__leaflet .leaflet-tile-pane {
  filter: brightness(0.58) contrast(1.06) saturate(0.72);
}

.gateway-map__leaflet .leaflet-control-zoom a {
  color: #041018;
  background: rgba(244, 247, 248, 0.92);
  border-color: rgba(4, 16, 24, 0.2);
}

.gateway-map__leaflet .leaflet-control-attribution {
  font-size: 0.62rem;
  background: rgb(4 16 24 / 72%);
  color: rgba(244, 247, 248, 0.55);
}

.gateway-map__leaflet .leaflet-control-attribution a {
  color: rgba(150, 210, 255, 0.85);
}

.gateway-leaflet-pin-wrap {
  background: transparent;
  border: none;
}

.gateway-leaflet-pin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  transform: translate(-50%, -50%);
  cursor: pointer;
  text-decoration: none;
}

.gateway-leaflet-pin__dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1469b8;
  border: 2px solid #f4f7f8;
  box-shadow: 0 0 0 3px rgb(20 105 184 / 35%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.gateway-leaflet-pin:hover .gateway-leaflet-pin__dot,
.gateway-leaflet-pin:focus-visible .gateway-leaflet-pin__dot {
  transform: scale(1.12);
  box-shadow: 0 0 0 5px rgb(20 105 184 / 45%);
}

.gateway-leaflet-pin__label {
  padding: 0.12rem 0.45rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.04em;
  color: #f4f7f8;
  background: rgb(4 16 24 / 78%);
  border: 1px solid rgb(244 247 248 / 18%);
  white-space: nowrap;
  pointer-events: none;
}

.gateway-leaflet-pin--unavailable {
  cursor: default;
  opacity: 0.42;
}

.gateway-leaflet-pin--unavailable .gateway-leaflet-pin__dot {
  background: rgba(244, 247, 248, 0.35);
  border-color: rgba(244, 247, 248, 0.25);
  box-shadow: none;
}

.gateway-leaflet-popup__host {
  font-size: 0.78rem;
  color: rgba(4, 16, 24, 0.65);
}

.gateway-leaflet-popup__link {
  display: inline-block;
  margin-top: 0.35rem;
  font-weight: 600;
  color: #1469b8;
}

.gateway-leaflet-popup__muted {
  font-size: 0.78rem;
  color: rgba(4, 16, 24, 0.55);
}

.gateway-stations {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.gateway-station {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(20, 105, 184, 0.35);
  background: linear-gradient(180deg, rgba(20, 105, 184, 0.18), rgba(20, 105, 184, 0.06));
  color: inherit;
  text-decoration: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.gateway-station:hover,
.gateway-station:focus-visible {
  border-color: rgba(20, 105, 184, 0.75);
  background: linear-gradient(180deg, rgba(20, 105, 184, 0.32), rgba(20, 105, 184, 0.12));
  transform: translateY(-1px);
  outline: none;
}

.gateway-station--unavailable {
  opacity: 0.42;
  border-color: rgba(244, 247, 248, 0.12);
  background: rgba(4, 16, 24, 0.35);
  transform: none;
  pointer-events: none;
}

.gateway-station__name {
  font-size: 1.12rem;
  font-weight: 600;
  font-variant: small-caps;
  letter-spacing: 0.06em;
  color: #f4f7f8;
}

.gateway-station__host {
  font-size: 0.78rem;
  color: rgba(244, 247, 248, 0.58);
  word-break: break-all;
}

.gateway-station__status {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(244, 247, 248, 0.45);
}

.gateway-footer {
  text-align: center;
  font-size: 0.75rem;
  color: rgba(244, 247, 248, 0.45);
}
