/* Fare lookup — dark route-board treatment, matching the atlas. */
.fare {
  position: relative;
  background: var(--paper);
}
.fare-shell {
  margin-top: clamp(24px, 4vw, 46px);
}
.fare-panel {
  position: relative;
  overflow: hidden;
  padding: clamp(22px, 3.4vw, 42px);
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  box-shadow: 12px 12px 0 var(--coral);
}
.fare-panel::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(241, 233, 218, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(241, 233, 218, 0.03) 1px, transparent 1px);
  background-size: 52px 52px;
  content: "";
  pointer-events: none;
}
.fare-panel > * {
  position: relative;
  z-index: 1;
}
.fare-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: clamp(16px, 2vw, 24px);
  border-bottom: 1px solid rgba(241, 233, 218, 0.14);
}
.fare-kicker {
  margin: 0;
  color: var(--coral);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.08em;
}
.fare-kicker span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 91, 53, 0.12);
}
.fare-panel-head h3 {
  margin: 10px 0 0;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: clamp(1.55rem, 3vw, 2.8rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1.15;
}
.fare-state {
  flex: none;
  margin: 2px 0 0;
  color: rgba(241, 233, 218, 0.55);
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  line-height: 1.6;
  text-align: right;
}
.fare-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 14px;
  padding: clamp(18px, 2.5vw, 28px) 0;
  border-bottom: 1px solid rgba(241, 233, 218, 0.14);
}
.fare-field {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.fare-field > span {
  color: rgba(241, 233, 218, 0.58);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
}
.fare-field select {
  width: 100%;
  min-height: 52px;
  padding: 12px 38px 12px 14px;
  border: 1px solid rgba(241, 233, 218, 0.28);
  border-radius: 0;
  background:
    linear-gradient(45deg, transparent 50%, var(--coral) 50%) calc(100% - 18px) 50% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--coral) 50%, transparent 50%) calc(100% - 12px) 50% / 6px 6px no-repeat,
    rgba(241, 233, 218, 0.055);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.3vw, 1.1rem);
  color-scheme: dark;
  cursor: pointer;
}
.fare-field select:focus {
  border-color: var(--lime);
  outline: 1px solid var(--lime);
  outline-offset: 2px;
}
.fare-field select:disabled {
  opacity: 0.42;
  cursor: wait;
}
.fare-swap {
  width: 52px;
  height: 52px;
  border: 1px solid var(--coral);
  background: var(--coral);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.fare-swap:hover {
  background: var(--lime);
  transform: rotate(180deg);
}
.fare-result {
  min-height: 188px;
  padding-top: clamp(20px, 2.5vw, 30px);
}
.fare-placeholder,
.fare-message {
  margin: 0;
  color: rgba(241, 233, 218, 0.56);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.8;
}
.fare-message {
  padding: 18px;
  border: 1px dashed rgba(241, 233, 218, 0.24);
}
.fare-message strong {
  display: block;
  margin-bottom: 6px;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
}
.fare-message.is-error {
  border-color: rgba(255, 91, 53, 0.5);
  color: var(--coral);
}
.fare-message.is-error strong {
  color: var(--coral);
}
.fare-message.is-warn {
  border-color: rgba(215, 242, 106, 0.45);
  color: var(--lime);
}
.fare-message.is-warn strong {
  color: var(--lime);
}
.fare-ticket {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.fare-summary {
  display: grid;
  grid-template-columns: minmax(190px, 0.62fr) minmax(0, 1.38fr);
  align-items: end;
  gap: 28px;
}
.fare-price-block {
  min-width: 0;
}
.fare-price-label,
.fare-path-label {
  display: block;
  color: rgba(241, 233, 218, 0.55);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.09em;
}
.fare-price {
  display: block;
  margin-top: 5px;
  color: var(--lime);
  font-family: var(--font-pixel);
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}
.fare-price-sub {
  display: block;
  margin-top: 9px;
  color: var(--coral);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.04em;
}
.fare-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(241, 233, 218, 0.14);
  border-bottom: 1px solid rgba(241, 233, 218, 0.14);
}
.fare-stat {
  min-width: 0;
  padding: 13px 12px;
}
.fare-stat + .fare-stat {
  border-left: 1px solid rgba(241, 233, 218, 0.14);
}
.fare-stat span {
  display: block;
  color: rgba(241, 233, 218, 0.48);
  font-family: var(--font-mono);
  font-size: 7.5px;
  letter-spacing: 0.05em;
  line-height: 1.5;
}
.fare-stat strong {
  display: block;
  margin-top: 7px;
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: clamp(0.95rem, 1.5vw, 1.2rem);
  font-weight: 500;
  line-height: 1.3;
}
.fare-path-block {
  padding-top: 2px;
}
.fare-path-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}
.fare-stop {
  display: inline-block;
  padding: 6px 8px;
  border: 1px solid rgba(241, 233, 218, 0.2);
  background: rgba(241, 233, 218, 0.035);
  color: rgba(241, 233, 218, 0.8);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.3;
}
.fare-stop.is-origin,
.fare-stop.is-destination {
  border-color: var(--lime);
  color: var(--lime);
}
.fare-stop.is-transfer {
  border-color: rgba(255, 91, 53, 0.58);
  color: var(--coral);
}
.fare-arrow {
  color: rgba(241, 233, 218, 0.34);
  font-family: var(--font-mono);
  font-size: 11px;
}
.fare-path-empty {
  margin: 10px 0 0;
  color: rgba(241, 233, 218, 0.48);
  font-family: var(--font-mono);
  font-size: 10px;
}
.fare-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding-top: 13px;
  border-top: 1px solid rgba(241, 233, 218, 0.14);
  color: rgba(241, 233, 218, 0.42);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.03em;
}
.fare-note {
  margin: 0;
  padding-left: 10px;
  border-left: 2px solid var(--coral);
  color: rgba(241, 233, 218, 0.68);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  line-height: 1.7;
}
.fare-foot {
  margin: 20px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(241, 233, 218, 0.12);
  color: rgba(241, 233, 218, 0.35);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.02em;
  line-height: 1.7;
}
@media (max-width: 900px) {
  .fare-panel {
    box-shadow: 8px 8px 0 var(--coral);
  }
  .fare-panel-head {
    flex-direction: column;
    gap: 12px;
  }
  .fare-state {
    text-align: left;
  }
  .fare-controls {
    grid-template-columns: minmax(0, 1fr);
  }
  .fare-swap {
    justify-self: start;
    width: 46px;
    height: 46px;
    transform: rotate(90deg);
  }
  .fare-swap:hover {
    transform: rotate(270deg);
  }
  .fare-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 20px;
  }
}
@media (max-width: 560px) {
  .fare-panel {
    padding: 20px 16px;
    box-shadow: 5px 5px 0 var(--coral);
  }
  .fare-panel-head h3 {
    font-size: 1.7rem;
  }
  .fare-stats {
    grid-template-columns: minmax(0, 1fr);
  }
  .fare-stat + .fare-stat {
    border-top: 1px solid rgba(241, 233, 218, 0.14);
    border-left: 0;
  }
  .fare-stat {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
  }
  .fare-stat strong {
    margin-top: 0;
  }
  .fare-stop {
    font-size: 0.78rem;
    padding: 5px 7px;
  }
  .fare-price {
    font-size: 3.1rem;
  }
}

/* Tighten the transition from the route atlas into fare lookup. */
#line.section-pad {
  padding-bottom: clamp(36px, 4vw, 56px);
}
#fare.section-pad {
  padding-top: clamp(32px, 4vw, 52px);
}

/* Two-step endpoint pickers: line first, then station. */
.fare-controls {
  align-items: stretch;
}
.fare-endpoint {
  --endpoint-line: rgba(241, 233, 218, 0.25);
  position: relative;
  min-width: 0;
  padding: 14px 14px 14px 18px;
  border: 1px solid rgba(241, 233, 218, 0.16);
  background: rgba(241, 233, 218, 0.035);
}
.fare-endpoint::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--endpoint-line);
  content: "";
}
.fare-endpoint-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(241, 233, 218, 0.12);
}
.fare-endpoint-head span {
  color: var(--coral);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.08em;
}
.fare-endpoint-head em {
  min-width: 0;
  color: rgba(241, 233, 218, 0.55);
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  line-height: 1.4;
  text-align: right;
  overflow-wrap: anywhere;
}
.fare-endpoint .fare-field + .fare-field {
  margin-top: 10px;
}
.fare-endpoint .fare-field select {
  min-height: 46px;
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 0.95rem;
}
.fare-swap {
  align-self: center;
}
@media (max-width: 900px) {
  .fare-endpoint {
    padding: 13px 13px 13px 16px;
  }
  .fare-swap {
    justify-self: start;
  }
}

/* Custom line picker, matching the atlas picker instead of a native select. */
.fare-panel {
  overflow: visible;
}
.fare-line-native {
  display: none;
}
.fare-line-picker {
  position: relative;
}
.fare-line-trigger {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(241, 233, 218, 0.28);
  border-radius: 0;
  background: rgba(241, 233, 218, 0.055);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.fare-line-trigger:focus {
  border-color: var(--lime);
  outline: 1px solid var(--lime);
  outline-offset: 2px;
}
.fare-line-trigger:disabled {
  opacity: 0.42;
  cursor: wait;
}
.fare-line-trigger-swatch {
  display: block;
  width: 22px;
  height: 4px;
  border-radius: 2px;
  background: transparent;
}
.fare-line-trigger-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fare-line-trigger-caret {
  color: var(--coral);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1;
}
.fare-line-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: min(360px, 52vh);
  overflow-y: auto;
  padding: 8px 0;
  border: 1px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  box-shadow: 8px 8px 0 rgba(14, 25, 19, 0.25);
}
.fare-line-menu[hidden] {
  display: none;
}
.fare-line-group {
  margin: 0;
  padding: 9px 14px 5px;
  color: var(--coral);
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}
.fare-line-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.fare-line-option:hover {
  background: rgba(14, 25, 19, 0.06);
}
.fare-line-option.is-active {
  background: var(--ink);
  color: var(--paper);
}
.fare-line-option-swatch {
  display: block;
  width: 22px;
  height: 4px;
  border-radius: 2px;
}
.fare-line-option-name {
  min-width: 0;
  overflow: hidden;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fare-line-option-type {
  color: rgba(14, 25, 19, 0.5);
  font-family: var(--font-mono);
  font-size: 8px;
  white-space: nowrap;
}
.fare-line-option.is-active .fare-line-option-type {
  color: rgba(241, 233, 218, 0.58);
}
@media (max-width: 900px) {
  .fare-line-menu {
    max-height: 48vh;
  }
  .fare-line-option-name {
    font-size: 0.9rem;
  }
}

/* Orange filled down-triangle affordances, not corner badges. */
.fare-line-trigger-caret {
  display: block;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--coral);
  font-size: 0;
  line-height: 0;
}
.fare-field select {
  background-color: rgba(241, 233, 218, 0.055);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7' viewBox='0 0 10 7'%3E%3Cpath d='M0 0h10L5 7z' fill='%23ff5b35'/%3E%3C/svg%3E");
  background-position: calc(100% - 14px) 50%;
  background-size: 10px 7px;
  background-repeat: no-repeat;
}
.fare-line-menu {
  overscroll-behavior: contain;
}

/* Keep the open line menu above the result/footer so the whole menu scrolls. */
.fare-controls {
  position: relative;
  z-index: 5;
}

/* Custom station picker, matching the line picker. */
.fare-station-picker {
  position: relative;
}
.fare-station-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(241, 233, 218, 0.28);
  border-radius: 0;
  background: rgba(241, 233, 218, 0.055);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
}
.fare-station-trigger:focus {
  border-color: var(--lime);
  outline: 1px solid var(--lime);
  outline-offset: 2px;
}
.fare-station-trigger:disabled {
  opacity: 0.42;
  cursor: wait;
}
.fare-station-trigger-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fare-station-trigger-caret {
  display: block;
  flex: none;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid var(--coral);
  font-size: 0;
  line-height: 0;
}
.fare-station-menu {
  max-height: min(320px, 48vh);
}

/* Station list is narrower than the line menu, and hovers orange. */
.fare-station-menu {
  width: min(360px, 100%);
}
.fare-station-menu .fare-line-option {
  grid-template-columns: 20px minmax(0, 1fr) auto;
  padding: 9px 12px;
}
.fare-station-menu .fare-line-option:hover {
  background: var(--coral);
  color: var(--ink);
}
.fare-station-menu .fare-line-option:hover .fare-line-option-type {
  color: rgba(14, 25, 19, 0.68);
}
@media (max-width: 900px) {
  .fare-station-menu {
    width: 100%;
  }
}

/* Compact station list with direction tabs and live next-train labels. */
.fare-station-menu {
  width: min(340px, 100%);
  max-height: min(360px, 54vh);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.fare-station-tabs {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(14, 25, 19, 0.12);
}
.fare-station-tab {
  padding: 4px 6px;
  border: 1px solid rgba(14, 25, 19, 0.22);
  background: transparent;
  color: rgba(14, 25, 19, 0.62);
  font-family: var(--font-mono);
  font-size: 8px;
  line-height: 1.3;
  cursor: pointer;
}
.fare-station-tab.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.fare-station-list {
  position: relative;
  flex: 1;
  min-height: 0;
  max-height: 304px;
  overflow-y: auto;
  padding: 4px 0 6px;
}
.fare-station-list::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 12px;
  width: 2px;
  background: var(--station-line, var(--coral));
  content: "";
  opacity: 0.9;
}
.fare-station-row {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  width: 100%;
  min-height: 30px;
  padding: 3px 10px 3px 5px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}
.fare-station-row:hover {
  background: var(--coral);
  color: var(--ink);
}
.fare-station-row.is-active {
  background: var(--ink);
  color: var(--paper);
}
.fare-station-dot {
  position: relative;
  z-index: 1;
  display: block;
  width: 7px;
  height: 7px;
  margin-left: 4px;
  border: 1px solid var(--station-line, var(--coral));
  border-radius: 50%;
  background: var(--paper);
}
.fare-station-name {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
.fare-station-name strong {
  flex: none;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.25;
}
.fare-station-name small {
  min-width: 0;
  overflow: hidden;
  color: rgba(14, 25, 19, 0.48);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  line-height: 1.25;
  text-overflow: ellipsis;
}
.fare-station-name.is-tight strong {
  font-size: 0.72rem;
}
.fare-station-name.is-tight small {
  font-size: 0.56rem;
}
.fare-station-name.is-tighter strong {
  font-size: 0.68rem;
}
.fare-station-name.is-tighter small {
  font-size: 0.52rem;
}
.fare-station-eta {
  min-width: 36px;
  color: var(--coral);
  font-family: var(--font-pixel);
  font-size: 8px;
  font-style: normal;
  letter-spacing: 0.02em;
  text-align: right;
}
.fare-station-row.is-active .fare-station-name strong,
.fare-station-row.is-active .fare-station-name small,
.fare-station-row.is-active .fare-station-eta {
  color: var(--paper);
}
.fare-station-row.is-active .fare-station-eta {
  color: var(--lime);
}
.fare-station-row:hover .fare-station-name strong,
.fare-station-row:hover .fare-station-name small,
.fare-station-row:hover .fare-station-eta {
  color: var(--ink);
}
@media (max-width: 900px) {
  .fare-station-menu {
    width: 100%;
    max-height: min(380px, 54vh);
  }
  .fare-station-list {
    max-height: 320px;
  }
}

/* Restore the original full-width station menu. */
.fare-station-menu {
  width: 100%;
}

/* The colored line must span the whole scroll content, not just the viewport. */
.fare-station-list::before {
  display: none;
}
.fare-station-track {
  position: relative;
}
.fare-station-track::before {
  position: absolute;
  top: 15px;
  bottom: 15px;
  left: 12px;
  width: 2px;
  background: var(--station-line, var(--coral));
  content: "";
  opacity: 0.9;
}

/* Larger station list type; seven rows per visible page. */
.fare-station-menu {
  max-height: min(380px, 58vh);
}
.fare-station-tabs {
  padding: 9px 12px;
}
.fare-station-tab {
  font-size: 9px;
  padding: 5px 7px;
}
.fare-station-list {
  max-height: 284px;
  padding: 2px 0;
}
.fare-station-list::before {
  display: none;
}
.fare-station-track::before {
  top: 20px;
  bottom: 20px;
}
.fare-station-row {
  min-height: 40px;
  padding: 4px 12px 4px 5px;
}
.fare-station-dot {
  width: 8px;
  height: 8px;
}
.fare-station-name {
  gap: 8px;
}
.fare-station-name strong {
  font-size: 0.96rem;
}
.fare-station-name small {
  font-size: 0.76rem;
}
.fare-station-eta {
  min-width: 44px;
  font-size: 9.5px;
}
.fare-station-name.is-tight strong {
  font-size: 0.88rem;
}
.fare-station-name.is-tight small {
  font-size: 0.68rem;
}
.fare-station-name.is-tighter strong {
  font-size: 0.82rem;
}
.fare-station-name.is-tighter small {
  font-size: 0.62rem;
}
@media (max-width: 900px) {
  .fare-station-list {
    max-height: 284px;
  }
  .fare-station-row {
    min-height: 39px;
  }
  .fare-station-track::before {
    top: 19.5px;
    bottom: 19.5px;
  }
  .fare-station-name strong {
    font-size: 0.9rem;
  }
  .fare-station-name small {
    font-size: 0.7rem;
  }
}

/* Readability pass for all microcopy on the fare page. */
.fare .section-index {
  font-size: 11px;
}
.fare .section-index span {
  font-size: 12px;
}
.fare-kicker {
  font-size: 13px;
}
.fare-state {
  font-size: 12px;
}
.fare-field > span,
.fare-endpoint-head span,
.fare-endpoint-head em {
  font-size: 12px;
}
.fare-price-label,
.fare-price-sub,
.fare-path-label {
  font-size: 12px;
}
.fare-stat span {
  font-size: 11px;
}
.fare-stat strong {
  font-size: 1.15rem;
}
.fare-stop {
  font-size: 0.95rem;
}
.fare-arrow {
  font-size: 14px;
}
.fare-path-empty {
  font-size: 13px;
}
.fare-meta {
  font-size: 11px;
}
.fare-note {
  font-size: 0.95rem;
}
.fare-foot {
  font-size: 10.5px;
}
.fare-placeholder,
.fare-message {
  font-size: 14px;
}
.fare-message strong {
  font-size: 1.15rem;
}
.fare-line-group {
  font-size: 13px;
}
.fare-line-option-name {
  font-size: 1rem;
}
.fare-line-option-type {
  font-size: 11px;
}
.fare-line-trigger,
.fare-station-trigger {
  font-size: 1rem;
}
.fare-station-tab {
  font-size: 11.5px;
  padding: 6px 8px;
}
.fare-station-name strong {
  font-size: 1rem;
}
.fare-station-name small {
  font-size: 0.92rem;
}
.fare-station-name.is-tight strong {
  font-size: 0.92rem;
}
.fare-station-name.is-tight small {
  font-size: 0.82rem;
}
.fare-station-name.is-tighter strong {
  font-size: 0.86rem;
}
.fare-station-name.is-tighter small {
  font-size: 0.74rem;
}
.fare-station-eta {
  min-width: 46px;
  font-size: 12px;
}
.fare-station-row {
  min-height: 44px;
  padding: 5px 12px 5px 5px;
}
.fare-station-list {
  max-height: 308px;
}
.fare-station-menu {
  max-height: min(410px, 62vh);
}
.fare-station-track::before {
  top: 22px;
  bottom: 22px;
}
@media (max-width: 900px) {
  .fare-station-list {
    max-height: 308px;
  }
  .fare-station-menu {
    max-height: min(410px, 62vh);
  }
  .fare-station-row {
    min-height: 44px;
  }
  .fare-station-name strong {
    font-size: 0.94rem;
  }
  .fare-station-name small {
    font-size: 0.84rem;
  }
  .fare-station-eta {
    font-size: 11px;
  }
}

/* Line-to-take badge under each path station. */
.fare-path-row {
  align-items: flex-start;
  row-gap: 12px;
}
.fare-path-node {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
}
.fare-node-line {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  color: rgba(241, 233, 218, 0.72);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.4;
  white-space: nowrap;
}
.fare-node-line span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.fare-leg-swatch {
  display: inline-block;
  flex: none;
  width: 3px;
  height: 12px;
  border-radius: 2px;
  background: var(--leg-color, var(--coral));
}
.fare-arrow {
  margin-top: 8px;
}

.fare-node-line {
  gap: 6px;
  color: rgba(255, 252, 245, 0.8);
  font-size: 11.5px;
  font-weight: 500;
}
.fare-leg-swatch {
  width: 4px;
  height: 13px;
}

/* Connected fare path diagram: station dots, colored legs, line labels. */
.fare-route-scroll {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 0 8px;
  -webkit-overflow-scrolling: touch;
}
.fare-route-chain {
  display: flex;
  align-items: flex-start;
  min-width: max-content;
}
.fare-route-stop {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: max-content;
  max-width: 150px;
}
.fare-route-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 40px;
  max-height: 40px;
  overflow: hidden;
  gap: 2px;
  text-align: center;
}
.fare-route-name strong {
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.2;
}
.fare-route-name small {
  max-width: 150px;
  overflow: hidden;
  color: rgba(241, 233, 218, 0.48);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fare-route-dot-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 18px;
}
.fare-route-dot {
  display: block;
  width: 9px;
  height: 9px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--ink);
  box-sizing: border-box;
}
.fare-route-stop.is-origin .fare-route-dot,
.fare-route-stop.is-destination .fare-route-dot {
  border-color: var(--lime);
}
.fare-route-stop.is-transfer .fare-route-dot {
  width: 15px;
  height: 15px;
  border-color: var(--lime);
  background: var(--coral);
}
.fare-route-link {
  display: flex;
  flex: 1 1 84px;
  flex-direction: column;
  align-items: center;
  min-width: 84px;
}
.fare-route-link-spacer {
  display: block;
  min-height: 40px;
  max-height: 40px;
}
.fare-route-line-wrap {
  display: flex;
  align-items: center;
  width: 100%;
  height: 18px;
}
.fare-route-line {
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--leg-color, var(--coral));
  background: color-mix(in srgb, var(--leg-color, var(--coral)) 76%, var(--paper) 24%);
  box-shadow: 0 0 7px color-mix(in srgb, var(--leg-color, var(--coral)) 45%, transparent);
}
.fare-route-link-label {
  margin-top: 3px;
  overflow: hidden;
  max-width: 120px;
  color: var(--leg-color, var(--coral));
  color: color-mix(in srgb, var(--leg-color, var(--coral)) 68%, var(--paper) 32%);
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .fare-route-name strong {
    font-size: 0.82rem;
  }
  .fare-route-link {
    flex-basis: 72px;
    min-width: 72px;
  }
}

.fare-route-link-label {
  font-size: 11px;
}

/* White station dots; only real line changes get the larger transfer dot. */
.fare-route-stop {
  position: relative;
}
.fare-route-stop::before,
.fare-route-stop::after {
  position: absolute;
  top: 47.5px;
  z-index: 0;
  display: none;
  width: 50%;
  height: 3px;
  content: "";
}
.fare-route-stop.has-incoming::before {
  left: 0;
  display: block;
  background: color-mix(in srgb, var(--incoming) 76%, var(--paper) 24%);
}
.fare-route-stop.has-outgoing::after {
  right: 0;
  display: block;
  background: color-mix(in srgb, var(--outgoing) 76%, var(--paper) 24%);
}
.fare-route-dot {
  position: relative;
  z-index: 2;
  width: 8px;
  height: 8px;
  border: 0;
  background: var(--paper);
}
.fare-route-stop.is-origin .fare-route-dot,
.fare-route-stop.is-destination .fare-route-dot {
  width: 8px;
  height: 8px;
  border: 0;
  background: var(--paper);
}
.fare-route-stop.is-transfer .fare-route-dot {
  width: 12px;
  height: 12px;
  border: 0;
  background: var(--paper);
}
.fare-route-line {
  background: var(--leg-color, var(--coral));
  background: color-mix(in srgb, var(--leg-color, var(--coral)) 76%, var(--paper) 24%);
}

/* Non-transfer stations are small hollow rings; transfer stations are larger rings. */
.fare-route-dot,
.fare-route-stop.is-origin .fare-route-dot,
.fare-route-stop.is-destination .fare-route-dot {
  width: 8px;
  height: 8px;
  border: 1.5px solid var(--paper);
  background: var(--ink);
}
.fare-route-stop.is-transfer .fare-route-dot {
  width: 12px;
  height: 12px;
  border: 2px solid var(--paper);
  background: var(--ink);
}

/* Transfer stations: larger solid dots. */
.fare-route-stop.is-transfer .fare-route-dot {
  width: 12px;
  height: 12px;
  border: 0;
  background: var(--paper);
}

/* Line menu rows also turn orange on hover. */
.fare-line-option:hover {
  background: var(--coral);
  color: var(--ink);
}
.fare-line-option:hover .fare-line-option-name,
.fare-line-option:hover .fare-line-option-type {
  color: var(--ink);
}
.fare-line-option:hover .fare-line-option-type {
  opacity: 0.68;
}

/* Fare notice / operator logos. */
.fare-notice {
  margin-top: 18px;
  padding: 20px 22px;
  border: 1px solid rgba(241, 233, 218, 0.2);
  border-left: 3px solid var(--lime);
  background: rgba(14, 25, 19, 0.55);
  color: var(--paper);
}
.fare-notice-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(241, 233, 218, 0.14);
  color: var(--lime);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}
.fare-notice-head span:last-child {
  color: rgba(241, 233, 218, 0.4);
  font-size: 9px;
}
.fare-notice-list {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.fare-notice-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.fare-notice-no {
  color: var(--coral);
  font-family: var(--font-pixel);
  font-size: 11px;
  line-height: 1.8;
}
.fare-notice-item p {
  color: rgba(241, 233, 218, 0.8);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.85;
}
.fare-notice-item strong {
  color: var(--paper);
  font-weight: 600;
}
.fare-logo-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 4px;
  padding: 3px 7px;
  background: var(--paper);
  line-height: 0;
  vertical-align: middle;
}
.fare-logo-pill img {
  display: block;
  width: auto;
  height: 19px;
}
.fare-logo-pill--tall img {
  height: 27px;
}
@media (max-width: 700px) {
  .fare-notice {
    padding: 16px;
  }
  .fare-notice-item {
    grid-template-columns: 26px minmax(0, 1fr);
    gap: 10px;
  }
  .fare-notice-item p {
    font-size: 0.9rem;
  }
  .fare-logo-pill--tall img {
    height: 24px;
  }
  .fare-logo-pill img {
    height: 17px;
  }
}

/* Slightly larger center-railway mark without making its transparent container taller. */
.fare-logo-pill--tall {
  padding: 1px 5px;
}
.fare-logo-pill--tall img {
  height: 31px;
}

/* Keep the fare notice to a readable measure. */
.fare-notice {
  width: 100%;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

/* Restore full-width notice; halve the empty gap below the fare section. */
.fare-notice {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}
#fare.section-pad {
  padding-bottom: clamp(46px, 6vw, 88px);
}

/* Line status labels and name wrappers. */
.fare-line-option-main {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.fare-line-option-main .fare-line-option-name {
  flex: 0 1 auto;
}
.fare-line-option-status,
.atlas-tab-status,
.atlas-line-status {
  flex: none;
  padding: 1px 5px;
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 8px;
  font-style: normal;
  line-height: 1.35;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.fare-line-option-status[data-status="停运"],
.atlas-tab-status[data-status="停运"],
.atlas-line-status[data-status="停运"] {
  color: #c34a3a;
}
.fare-line-option-status[data-status="规划中"],
.atlas-tab-status[data-status="规划中"],
.atlas-line-status[data-status="规划中"] {
  color: #56717d;
}
.fare-line-option-status[data-status="在建"],
.atlas-tab-status[data-status="在建"],
.atlas-line-status[data-status="在建"] {
  color: #557a26;
}
.fare-line-option.is-active .fare-line-option-status[data-status="停运"] {
  color: #ff8a72;
}
.fare-line-option.is-active .fare-line-option-status[data-status="规划中"] {
  color: #b9d4df;
}
.fare-line-option.is-active .fare-line-option-status[data-status="在建"] {
  color: var(--lime);
}
.fare-line-option:hover .fare-line-option-status {
  color: var(--ink);
}
.atlas-tab-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex: 1;
}
.atlas-tab-name strong {
  min-width: 0;
}
.atlas-tab.is-active .atlas-tab-status[data-status="停运"] {
  color: #ff8a72;
}
.atlas-tab.is-active .atlas-tab-status[data-status="规划中"] {
  color: #b9d4df;
}
.atlas-tab.is-active .atlas-tab-status[data-status="在建"] {
  color: var(--lime);
}
.atlas-line-status {
  font-size: 7px;
}

/* Slightly larger status labels for readability. */
.fare-line-option-status {
  padding: 1px 5px;
  font-size: 9px;
}
.atlas-tab-status {
  padding: 1px 4px;
  font-size: 8px;
}
.atlas-line-status {
  font-size: 8px;
}
