.how-route-page {
  max-width: 1080px;
  padding-bottom: var(--s9);
}

.how-route-crumb {
  display: flex;
  gap: var(--s2);
  padding: var(--s5) 0 var(--s4);
  color: var(--ink-3);
  font-size: var(--fs-small);
}

.how-route-crumb a {
  color: var(--ink-2);
  font-weight: 750;
}

.how-route-hero {
  max-width: 860px;
  padding: var(--s4) 0 var(--s6);
}

.how-route-kicker,
.how-route-result-kicker {
  margin-bottom: var(--s2);
  color: var(--teal);
  font-size: var(--fs-small);
  font-weight: 850;
}

.how-route-hero h1 {
  margin-bottom: var(--s3);
  color: var(--navy);
  font-size: 46px;
  letter-spacing: 0;
}

.how-route-hero > p {
  color: var(--ink-2);
  font-size: 18px;
  line-height: 1.75;
}

.how-route-hero dl,
.how-route-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s3);
  margin-top: var(--s5);
}

.how-route-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.how-route-hero dl div,
.how-route-stats div {
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.how-route-hero dt,
.how-route-stats dt {
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 800;
}

.how-route-hero dd,
.how-route-stats dd {
  margin-top: 3px;
  color: var(--navy);
  font-size: 22px;
  font-weight: 900;
}

.how-route-finder,
.subway-info-route-finder {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: var(--s5);
  align-items: end;
  padding: var(--s5);
  border: 1px solid var(--line);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.subway-info-route-finder {
  margin: 0 0 var(--s6);
}

.how-route-finder h2,
.subway-info-route-finder h2 {
  color: var(--navy);
  font-size: 24px;
  letter-spacing: 0;
}

.how-route-finder p,
.subway-info-route-finder p {
  margin-top: var(--s1);
  color: var(--ink-3);
  font-size: var(--fs-small);
  line-height: 1.65;
}

.how-route-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: var(--s3);
  align-items: end;
}

.how-route-fields label span {
  display: block;
  margin-bottom: var(--s2);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
}

.how-route-fields select {
  width: 100%;
  height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.how-route-fields button,
.how-route-reverse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--r-s);
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-size: var(--fs-small);
  font-weight: 850;
  cursor: pointer;
  box-shadow: var(--sh-1);
}

.how-route-result,
.how-route-graph-panel,
.how-route-steps,
.how-route-alert,
.how-route-note,
.how-route-guide,
.how-route-featured {
  margin-top: var(--s5);
  padding: var(--s5);
  border-radius: var(--r-l);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.how-route-hero + .how-route-graph-panel {
  margin-top: 0;
}

.how-route-result + .how-route-finder {
  margin-top: var(--s5);
}

.how-route-result {
  border: 1px solid rgba(25, 165, 160, .25);
  background: #f2fbfa;
}

.how-route-result h2,
.how-route-graph-panel h2,
.how-route-steps h2 {
  color: var(--navy);
  font-size: 28px;
  letter-spacing: 0;
}

.how-route-reverse {
  margin-top: var(--s4);
  background: var(--teal);
}

.how-route-graph {
  margin-top: var(--s4);
  overflow-x: auto;
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: #fff;
}

.how-route-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s3);
  margin: 0 0 var(--s4);
  padding: 0 0 var(--s3);
  border-bottom: 1px solid var(--line);
  list-style: none;
}

.how-route-legend li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 800;
}

.how-route-legend-line {
  width: 24px;
  height: 6px;
  border-radius: var(--r-pill);
  background: var(--route-color);
}

.how-route-legend-marker {
  width: 13px;
  height: 13px;
  border: 3px solid #fff;
  border-radius: var(--r-pill);
  background: #66738d;
  box-shadow: 0 0 0 2px #66738d;
}

.how-route-legend-marker--start {
  border-radius: 3px;
  background: var(--teal);
  box-shadow: 0 0 0 2px var(--teal);
}

.how-route-legend-marker--end {
  width: 16px;
  height: 16px;
  background: var(--navy);
  box-shadow: 0 0 0 2px var(--navy);
}

.how-route-legend-marker--transfer {
  border-style: double;
  background: #fff;
  box-shadow: 0 0 0 2px #66738d;
}

.how-route-node {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--s3);
  align-items: center;
  min-width: 320px;
}

.how-route-marker {
  width: 18px;
  height: 18px;
  justify-self: center;
  border: 3px solid #fff;
  border-radius: var(--r-pill);
  background: var(--route-color);
  box-shadow: 0 0 0 3px var(--route-color);
}

.how-route-node.is-start .how-route-marker {
  border-radius: 5px;
  background: var(--teal);
  box-shadow: 0 0 0 3px var(--teal);
}

.how-route-node.is-end .how-route-marker {
  width: 22px;
  height: 22px;
  background: var(--navy);
  box-shadow: 0 0 0 3px var(--navy);
}

.how-route-node.is-transfer .how-route-marker {
  border-color: #fff;
  box-shadow: 0 0 0 3px var(--route-color), 0 0 0 6px #66738d;
}

.how-route-node.is-start.is-transfer .how-route-marker,
.how-route-node.is-end.is-transfer .how-route-marker {
  box-shadow: 0 0 0 3px var(--teal), 0 0 0 6px #66738d, 0 0 0 8px #fff;
}

.how-route-node.is-end.is-transfer .how-route-marker {
  box-shadow: 0 0 0 3px var(--navy), 0 0 0 6px #66738d, 0 0 0 8px #fff;
}

.how-route-node-label {
  min-width: 0;
}

.how-route-node-label strong,
.how-route-node-label small {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
}

.how-route-node-label strong {
  color: var(--navy);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.35;
}

.how-route-node-label small {
  width: max-content;
  max-width: 100%;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--route-color);
  background: color-mix(in srgb, var(--route-color) 10%, white);
  color: var(--navy);
  font-size: 12px;
  font-weight: 850;
}

.how-route-edge {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: var(--s3);
  min-height: 34px;
}

.how-route-edge::before {
  content: "";
  width: 6px;
  height: 100%;
  justify-self: center;
  border-radius: var(--r-pill);
  background: var(--route-color);
}

.how-route-edge > span {
  align-self: center;
  color: var(--ink-3);
  font-size: 12px;
  font-weight: 800;
}

.how-route-edge--transfer::before {
  background: repeating-linear-gradient(to bottom, #7c879f 0, #7c879f 7px, transparent 7px, transparent 13px);
}

.how-route-edge--transfer > span {
  width: max-content;
  max-width: 100%;
  padding: 3px 9px;
  border-radius: var(--r-pill);
  background: #eef1f6;
  color: var(--ink-2);
}

.how-route-steps ol {
  display: grid;
  gap: var(--s3);
  margin: var(--s4) 0 0;
  padding: 0;
  list-style: none;
}

.how-route-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: var(--s3);
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: #fff;
}

.how-route-step-badge,
.how-route-transfer-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--r-pill);
  box-sizing: border-box;
  border: 3px solid var(--route-color);
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 900;
}

.how-route-transfer-dot {
  border: 0;
  background: #7c879f;
}

.how-route-transfer-dot::before {
  content: "";
  width: 14px;
  height: 14px;
  border: 3px solid #fff;
  border-radius: var(--r-pill);
}

.how-route-step h3 {
  color: var(--navy);
  font-size: 18px;
  letter-spacing: 0;
}

.how-route-step p {
  margin-top: 4px;
  color: var(--ink-2);
  line-height: 1.65;
}

.how-route-step-stations {
  font-size: var(--fs-small);
}

.how-route-alert {
  border: 1px solid rgba(229, 57, 53, .22);
  background: #fff7f7;
  color: var(--ink-2);
}

.how-route-alert strong,
.how-route-note strong {
  color: var(--navy);
}

.how-route-alert p,
.how-route-note p {
  margin-top: var(--s1);
  color: var(--ink-2);
  line-height: 1.75;
}

.how-route-note {
  background: #eef6ff;
}

.how-route-note a {
  display: inline-block;
  margin-top: var(--s2);
  color: var(--blue);
  font-size: var(--fs-small);
  font-weight: 800;
}

.how-route-guide {
  border: 1px solid var(--line);
}

.how-route-guide-heading {
  max-width: 760px;
}

.how-route-guide h2,
.how-route-guide h3 {
  color: var(--navy);
  letter-spacing: 0;
}

.how-route-guide h2 {
  font-size: 28px;
}

.how-route-guide-heading > p {
  margin-top: var(--s2);
  color: var(--ink-2);
  line-height: 1.75;
}

.how-route-guide-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s3);
  margin-top: var(--s4);
}

.how-route-guide-card {
  padding: var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-m);
  background: #fff;
}

.how-route-guide-card--coverage {
  grid-column: 1 / -1;
  background: #f7fbff;
}

.how-route-guide-card h3 {
  font-size: 18px;
}

.how-route-guide-card p {
  margin-top: var(--s2);
  color: var(--ink-2);
  font-size: var(--fs-small);
  line-height: 1.75;
}

.how-route-featured {
  border: 1px solid var(--line);
  background: #f8fbfd;
}

.how-route-featured h2 {
  color: var(--navy);
  font-size: 24px;
  letter-spacing: 0;
}

.how-route-featured > div > p {
  margin-top: var(--s1);
  color: var(--ink-2);
  font-size: var(--fs-small);
  line-height: 1.65;
}

.how-route-featured ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--s2);
  margin: var(--s4) 0 0;
  padding: 0;
  list-style: none;
}

.how-route-featured a {
  display: block;
  min-height: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-s);
  background: #fff;
  color: var(--navy);
  font-size: var(--fs-small);
  font-weight: 800;
  line-height: 1.45;
}

.how-route-featured a:hover,
.how-route-featured a:focus-visible {
  border-color: var(--teal);
  color: var(--teal);
  outline: 0;
}

@media (max-width: 840px) {
  .how-route-finder,
  .subway-info-route-finder {
    grid-template-columns: 1fr;
  }

  .how-route-fields {
    grid-template-columns: 1fr 1fr;
  }

  .how-route-fields button {
    grid-column: 1 / -1;
  }

  .how-route-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .how-route-guide-grid {
    grid-template-columns: 1fr;
  }

  .how-route-featured ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .how-route-guide-card--coverage {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .how-route-hero h1 {
    font-size: 34px;
  }

  .how-route-hero > p {
    font-size: 16px;
  }

  .how-route-hero dl,
  .how-route-stats,
  .how-route-fields {
    grid-template-columns: 1fr;
  }

  .how-route-finder,
  .subway-info-route-finder,
  .how-route-result,
  .how-route-graph-panel,
  .how-route-steps,
  .how-route-alert,
  .how-route-note,
  .how-route-guide,
  .how-route-featured {
    padding: var(--s4);
  }

  .how-route-featured ul {
    grid-template-columns: 1fr;
  }

  .how-route-step {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: var(--s3);
  }
}
