:root {
  --bg: #eef2f7;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-strong: #ffffff;
  --text: #0f172a;
  --muted: #5b6474;
  --line: rgba(15, 23, 42, 0.08);
  --accent: #0f766e;
  --accent-soft: rgba(15, 118, 110, 0.12);
  --danger: #b42318;
  --danger-soft: rgba(180, 35, 24, 0.08);
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 999px;
  --content-width: 920px;
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.14), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

button,
input {
  font: inherit;
}

.page-shell {
  width: min(100% - 28px, var(--content-width));
  margin: 0 auto;
  padding: 32px 0 48px;
}

.hero {
  padding: 20px 4px 28px;
}

.eyebrow,
.panel-label,
.meta-text,
.station-address,
.station-meta,
.count-pill,
.status-pill {
  letter-spacing: 0.01em;
}

.eyebrow,
.panel-label {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  max-width: 10ch;
  font-size: clamp(2.5rem, 7vw, 4.6rem);
  line-height: 0.95;
}

.hero-copy {
  max-width: 38rem;
  margin-top: 16px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

main {
  display: grid;
  gap: 18px;
}

.panel {
  padding: 22px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: var(--radius-lg);
  background: var(--panel);
  backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

.controls-panel {
  position: sticky;
  top: 14px;
  z-index: 5;
}

.panel-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.panel-head-tight {
  align-items: center;
}

h2 {
  font-size: 1.18rem;
}

.ghost-button {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  padding: 10px 14px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.ghost-button:hover,
.ghost-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(15, 118, 110, 0.35);
  outline: none;
}

.toggle {
  display: inline-grid;
  grid-template-columns: auto 76px auto;
  gap: 14px;
  align-items: center;
  margin-top: 20px;
}

.toggle-label {
  font-weight: 600;
  color: var(--muted);
}

.toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-track {
  position: relative;
  display: block;
  width: 76px;
  height: 42px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  transition: background 0.2s ease;
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--panel-strong);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease;
}

.toggle input:checked + .toggle-track {
  background: rgba(15, 118, 110, 0.24);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(34px);
}

.meta-row {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.meta-text,
.station-address,
.station-meta,
.count-pill {
  color: var(--muted);
  font-size: 0.94rem;
}

.count-pill {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.05);
}

.state-card {
  margin-top: 18px;
  padding: 18px;
  border: 1px dashed rgba(15, 23, 42, 0.12);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.58);
}

.state-card-error {
  border-style: solid;
  border-color: rgba(180, 35, 24, 0.18);
  color: var(--danger);
  background: var(--danger-soft);
}

.stations {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.station-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.92);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.station-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.06);
}

.station-top,
.station-bottom {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}

.station-name {
  font-size: 1.08rem;
}

.station-distance {
  flex-shrink: 0;
  font-weight: 700;
}

.station-bottom {
  align-items: flex-end;
}

.station-meta {
  display: flex;
  gap: 10px;
  align-items: center;
}

.station-meta span + span::before {
  content: "•";
  margin-right: 10px;
  color: rgba(91, 100, 116, 0.55);
}

.status-pill {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 700;
}

.status-available {
  color: #0f766e;
  background: var(--accent-soft);
}

.status-busy {
  color: #92400e;
  background: rgba(217, 119, 6, 0.12);
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, var(--content-width));
    padding-top: 20px;
  }

  .panel,
  .station-card {
    padding: 18px;
  }

  .panel-head,
  .station-top,
  .station-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .ghost-button,
  .count-pill {
    width: 100%;
    text-align: center;
  }

  .toggle {
    width: 100%;
    justify-content: space-between;
  }

  .station-distance,
  .status-pill {
    width: 100%;
  }

  .status-pill {
    text-align: center;
  }
}
