/* A route's own page, on top of the landing page's styles. */

.route-page .route-badge {
  display: inline-block;
  min-width: 1.6em;
  margin-right: 0.15em;
  padding: 0 0.25em;
  box-sizing: border-box;
  border: 3px solid #000000;
  border-radius: 0.2em;
  background: var(--chip-bg);
  color: var(--chip-fg);
  text-align: center;
}

.route-page .open-app {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 1.75rem 0 0;
  font-weight: 600;
}

@media (max-width: 39.99rem) {
  .route-page .hero h1 { font-size: 1.75rem; }
}

/* The route's line, drawn from its shape. */
.route-page .route-shape {
  margin: 0;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--bg);
  text-align: center;
}

.route-page .shape {
  display: block;
  width: 100%;
  max-width: 18rem;
  max-height: 22rem;
  height: auto;
  margin: 0 auto;
}

.route-page .shape-line polyline {
  fill: none;
  stroke: var(--route);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-page .shape-ends circle {
  fill: var(--bg);
  stroke: var(--route);
  stroke-width: 3;
}

@media (max-width: 51.99rem) {
  .route-page .shape { max-height: 15rem; }
}

.route-page figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.route-page .plain-list {
  max-width: 40rem;
  padding-left: 1.25rem;
}

.route-page .plain-list li + li {
  margin-top: 0.5rem;
}

.route-page .source-note {
  color: var(--muted);
  font-size: 0.95rem;
}

/* Other routes, as small tags. */
.route-page .route-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  max-width: 40rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Plain labels until the route has a page; then links, sized for a finger. */
.route-page .route-tag {
  display: inline-block;
  min-width: 2.75rem;
  padding: 0.25rem 0.5rem;
  box-sizing: border-box;
  border-radius: 0.375rem;
  background: var(--panel);
  font-weight: 600;
  text-align: center;
}

.route-page a.route-tag {
  min-height: 2.75rem;
  border: 1px solid var(--border);
  line-height: 2.1rem;
}

/* Stop lists, one collapsed list per direction. */
.route-page details {
  max-width: 40rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
}

.route-page details + details {
  margin-top: 0.75rem;
}

.route-page summary {
  padding: 0.75rem 1rem;
  font-weight: 600;
  cursor: pointer;
}

.route-page .stop-list {
  margin: 0;
  padding: 0 1rem 1rem 2.75rem;
}

.route-page .stop-list li + li {
  margin-top: 0.25rem;
}

.route-page #questions ~ h3 {
  margin: 1.5rem 0 0.25rem;
  font-size: 1.1rem;
}

.route-page #link-result h3 {
  margin: 1.5rem 0 0;
}

@media (forced-colors: active) {
  .route-page .route-badge {
    border-color: CanvasText;
  }
  .route-page .shape-line polyline,
  .route-page .shape-ends circle {
    stroke: CanvasText;
  }
}

/* The index of route pages: number, name, and main streets. */
.route-page .route-index {
  max-width: 44rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-page .route-index li {
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}

.route-page .route-index a {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  padding: 0.25rem 0;
  font-weight: 600;
}

.route-page .route-index .route-tag {
  flex: none;
  text-decoration: none;
}

.route-page .index-streets {
  display: block;
  margin-left: 3.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}
