/* High-contrast, flat, animation-free styling — keeps the door open for e-ink rendering later */
:root {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0 0.75rem 2rem;
  background: #ffffff;
  color: #000000;
  font-family: "Segoe UI", Arial, sans-serif;
}

header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  background: #fff;
  border-bottom: 3px solid #000;
  padding: 0.75rem 0.25rem;
  margin-bottom: 0.5rem;
  z-index: 10;
}

h1 {
  margin: 0;
  font-size: clamp(1.5rem, 6vw, 2rem);
  letter-spacing: 0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
}

.nav-link {
  color: #000;
}

button {
  font-size: 1rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0.5rem 1rem;
  border: 2px solid #000;
  background: #fff;
  color: #000;
  cursor: pointer;
}

button:active {
  background: #000;
  color: #fff;
}

.platform {
  margin-bottom: 1.5rem;
}

.platform h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  padding: 0 0.25rem;
  color: #333;
}

.lines {
  display: flex;
  flex-direction: column;
}

.line-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.25rem;
  min-height: 56px;
  border-bottom: 1px solid #000;
}

.line-badge {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3.4rem;
  min-height: 3rem;
  border: 2px solid #000;
  border-radius: 6px;
  line-height: 1.1;
}

.line-badge .transport-label {
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  color: #555;
}

.line-badge .line-number {
  font-size: 1.3rem;
  font-weight: 800;
}

.line-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.headsign {
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.arrivals {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.next-arrival {
  font-size: 1.5rem;
  font-weight: 700;
  white-space: nowrap;
}

.next-arrival .clock-time {
  font-size: 0.8rem;
  font-weight: 400;
  color: #444;
  margin-left: 0.3rem;
}

.more-arrivals {
  font-size: 0.9rem;
  color: #555;
}

#status {
  font-size: 1.1rem;
  padding: 0 0.25rem;
}

.stale {
  color: #b00000;
}

@media (min-width: 480px) {
  body {
    padding: 0 1.25rem 2rem;
  }
}
.stop-input {
  flex: 1 1 10rem;
  min-height: 44px;
  padding: 0.5rem;
  font-size: 1rem;
  border: 2px solid #000;
  background: #fff;
  color: #000;
}

.stop-picker {
  position: relative;
  flex: 1 1 10rem;
  display: flex;
}
.stop-picker .stop-input {
  width: 100%;
}
.stop-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  max-height: 50vh;
  overflow-y: auto;
  background: #fff;
  border: 2px solid #000;
  z-index: 20;
}
.stop-suggestions li {
  padding: 0.75rem;
  min-height: 44px;
  cursor: pointer;
}
.stop-suggestions li.active,
.stop-suggestions li:hover {
  background: #000;
  color: #fff;
}
.stop-suggestions li.empty {
  cursor: default;
}

.platform-meta {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}
